Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Synchroizing a counter with another signal

 
Thread Tools Search this Thread
Old 09-13-2007, 01:42 AM   #1
Lightbulb Synchroizing a counter with another signal


Hi all! I am new to VHDL, and I am having a lot of trouble with it. Could all of the experts out there please help me with this problem?

I need a counter to synchronize the write and read operation for a image memory device. The counter needs to be reseted every time the signal OE triggers, both H to L and L to H. I wrote something like this:

COUNTER: PROCESS(OE,CLK)
variable counter : INTEGER RANGE 0 TO 60000;
BEGIN
IF (OE'EVENT) THEN
counter := 60000;
ELSIF (CLK'EVENT AND CLK= '1') THEN
counter := counter - 1;
END IF;

IF ( (counter < 60000) AND (counter > 57000) ) THEN
signal1 <= '1';
ELSE
signal1 <= '0';
END IF;

IF ( (counter < 3000) AND (counter > 0) ) THEN
signal2 <= '1';
ELSE
signal2 <= '0';
END IF;

END PROCESS COUNTER;

When I tried to compiled, Quartus will complain: Error (10633): VHDL Case Statement or If Statement error at Control.vhd(141): can't synthesize condition that contains an isolated 'EVENT predefined attribute

Is it possible to have the counter to depend on two signals, ie CLK and OE? If not, what can I do?

Thank you for your advices in advance!


tonyfai
tonyfai is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Counter Strikes... aihockey44 Gaming 0 04-29-2009 08:35 PM
I am having trouble editing a signal in a sub program. Haai Hardware 0 08-28-2007 02:58 PM
VHDL problem - Signal counter cannot be synthesized, bad synchronous description. shipacpoloy Software 0 08-14-2007 07:26 AM
Need help on Modelsim VHDL syntax? ASAP:) kaji General Help Related Topics 0 03-14-2007 10:43 PM
IMHO, Digital SECAM video is better than Analog NTSC video Radium DVD Video 167 10-25-2006 04:16 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46