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


Cor

Joined
Oct 13, 2017
Messages
7
Reaction score
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
 
Ad

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. After that, you can post your question and our members will help you out.

Ask a Question

Top