using event attribute

Discussion in 'VHDL' started by eliascm, Feb 10, 2009.

  1. eliascm

    eliascm

    Joined:
    Jan 30, 2009
    Messages:
    42
    I have the following code in a testbench

    while not end_sim loop
    if seconds_tp'event then
    report integer'image(TO_INTEGER(unsigned(seconds_tp)));
    end if;
    wait for 100 ns;
    end loop;
    wait;

    end_sim is false until the end of the simulation.

    seconds_tp is a std_logic_vector that starts at 0 and increments by 1 every simulated second.

    The idea is to display the value of simulated seconds elapsed while the simulation is running.

    When the simulation is running no value for seconds_tp is displayed.
    However, seconds_tp does display correctly on the waveform viewer when the simulation is stopped.

    What am I missing here?
     
    eliascm, Feb 10, 2009
    #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. Bostonasian
    Replies:
    1
    Views:
    826
    Joris Gillis
    Sep 18, 2005
  2. vjethava@gmail.com
    Replies:
    2
    Views:
    1,085
    Henry S. Thompson
    Mar 6, 2006
  3. Donnal Walter

    class attribute to instance attribute

    Donnal Walter, Jun 30, 2005, in forum: Python
    Replies:
    4
    Views:
    482
    Greg Ewing
    Jul 6, 2005
  4. Russell Warren
    Replies:
    5
    Views:
    486
    Russell Warren
    Jan 17, 2006
  5. anonymous
    Replies:
    1
    Views:
    5,997
    MatsL@newsgroups.nospam
    Aug 2, 2006
Loading...

Share This Page