How to get signal name as a string in a procedure?

Discussion in 'VHDL' started by Cor, Oct 13, 2017.

  1. Cor

    Cor

    Joined:
    Oct 13, 2017
    Messages:
    7
    Likes Received:
    1
    Hi,

    I like to report signal names during simulation, if some error occurs:

    assert my_signal='1' report "my_signal does not equal '1'";

    Now I'd like to use a procedure for this:

    procedure Check(signal a : in std_logic; b : std_logic) is
    begin
    assert a=b report "Error in signal "&a'simple_name;
    end Check;


    and use it like this:

    Check(my_signal,'1');

    unfortunately, the result is that the simulator will display "Error in signal a" and not "Error in signal my_signal" what I would like as an output...

    Any ideas?

    Regards,

    Cor
     
    Cor, Oct 13, 2017
    #1
    Java2Python likes this.
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.