Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Synchroizing a counter with another signal

Reply
Thread Tools

Synchroizing a counter with another signal

 
 
tonyfai tonyfai is offline
Junior Member
Join Date: Sep 2007
Posts: 2
 
      09-13-2007
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page File counter and Private Bytes Counter George2 C++ 1 01-31-2008 09:27 AM
VHDL problem - Signal counter cannot be synthesized, bad synchronous description. shipacpoloy Software 0 08-14-2007 06:26 AM
threading.Thread vs. signal.signal Jack Orenstein Python 0 09-17-2005 11:24 PM
Async-signal safe functions in signal handlers (unix) Michael Pronath Python 1 01-03-2005 01:10 PM
Session("counter") vs. ViewState("counter")...a newbie question The Eeediot ASP .Net 3 12-22-2004 09:31 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57