display message in vhdl

Discussion in 'VHDL' started by bedrr, Nov 28, 2007.

  1. bedrr

    bedrr

    Joined:
    Nov 22, 2007
    Messages:
    5
    Location:
    morocco
    I have a testbench, in wich i have to send values to inputs of a DUT and recuperate its output and display it wich a process.
    my question is that there is a process wich counts the numbers of clock cycles and I have to display a signal value with the exact clock cycle.
    the process is :

    P1: process(CLOCK)
    begin
    IF (CLOCK'event AND CLOCK = '0' ) THEN
    count <= count +1;
    stopwatch <= stopwatch+20;
    END IF;
    end process P1;
    and the display is

    Pr: process(count)
    begin
    if (count < RST_COUNT) and ((count mod 20) = 0) then
    report " SIMULATION RESET ACTIVE STATE ... AT CLOCK EDGE : "
    & count
    severity note;
    end if;

    end process Pr;
    when i compile this, it shows me the error :
    ncvhdl_p: *E,OPTYMM (/vobs/MPU_RTLIP/t1xp_z160/generic/bist_ctrl.vhd,121|65): operator argument type mismatch
    it means the line : report " SIMULATION RESET ACTIVE STATE ... AT CLOCK EDGE : " & count
    the error is about &count.
    Do you know how to help me in this ?
    thnx
     
    bedrr, Nov 28, 2007
    #1
    1. Advertising

  2. bedrr

    scottcarl

    Joined:
    May 4, 2007
    Messages:
    49
    Location:
    USA
    bedrr,

    The -& count- statement must be turned into a string before it can be reported. Such as EDGE:" & to_string(count) . This also implies that you have the correct library called out that contains the to_string library.

    Scott
     
    scottcarl, Nov 28, 2007
    #2
    1. Advertising

  3. bedrr

    bedrr

    Joined:
    Nov 22, 2007
    Messages:
    5
    Location:
    morocco
    thanks scott,
    during my research with my colleagues i found the solution :
    it is to put an image like :
    & integer'image(count) this implies a display of the current value inside the message to display.
    bedr
     
    bedrr, Nov 28, 2007
    #3
    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. walala
    Replies:
    3
    Views:
    4,885
    walala
    Sep 18, 2003
  2. albert.neu@gmail.com
    Replies:
    2
    Views:
    8,835
    Jim Lewis
    Mar 21, 2006
  3. dude

    VHDL 2002 vs VHDL 1993

    dude, Mar 23, 2006, in forum: VHDL
    Replies:
    1
    Views:
    1,348
    Nicolas Matringe
    Mar 23, 2006
  4. afd
    Replies:
    1
    Views:
    8,567
    Colin Paul Gloster
    Mar 23, 2007
  5. Mufasa
    Replies:
    6
    Views:
    904
    Scott M.
    Jul 27, 2007
Loading...

Share This Page