Synchroizing a counter with another signal

Discussion in 'VHDL' started by tonyfai, Sep 13, 2007.

  1. tonyfai

    tonyfai

    Joined:
    Sep 13, 2007
    Messages:
    2
    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, Sep 13, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Eeediot
    Replies:
    3
    Views:
    2,209
    =?Utf-8?B?UnVsaW4gSG9uZw==?=
    Dec 22, 2004
  2. Michael Pronath
    Replies:
    1
    Views:
    1,134
    Diez B. Roggisch
    Jan 3, 2005
  3. Jack Orenstein

    threading.Thread vs. signal.signal

    Jack Orenstein, Sep 18, 2005, in forum: Python
    Replies:
    0
    Views:
    445
    Jack Orenstein
    Sep 18, 2005
  4. Weng Tianxiang
    Replies:
    2
    Views:
    631
    Jonathan Bromley
    Jan 30, 2007
  5. George2
    Replies:
    1
    Views:
    778
    Alf P. Steinbach
    Jan 31, 2008
Loading...

Share This Page