Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   VHDL (http://www.velocityreviews.com/forums/f18-vhdl.html)
-   -   attribute signal name in procedure (http://www.velocityreviews.com/forums/t949146-attribute-signal-name-in-procedure.html)

imed 08-06-2012 11:35 AM

attribute signal name in procedure
 
Hi !
My question was asked before (2005):
Quote:

Can I access a std_logic signal attribute that is the signals name as a
string?
The answer given by @Jonathan Bromley was to try the following:
Quote:

library ieee;
use ieee.std_logic_1164.all;
use std.textio.all;

entity name_attrib is end;

architecture A of name_attrib is
signal SIG: std_logic;
procedure P (signal S: in std_logic) is begin
write(output, "simple_name = " & S'simple_name & CR & LF);
write(output, "path_name = " & S'path_name & CR & LF);
write(output, "instance_name = " & S'instance_name & CR & LF);
end;
begin
process begin
P(SIG);
wait;
end process;
end;
The problem is that I tried that and I got:
# simple_name = s
# path_name = :name_attrib:p[std_logic]:s
# instance_name = :name_attrib(a):p[std_logic]:s

I was expecting # simple_name = SIG.
What did I miss?

I used ModelSim Altera Starter edition 6.5
Thanks.

imed 08-07-2012 01:40 PM

The aim of all this for me is to write a procedure that checks if a signal value is equal to a given expected value and print a message starting with the name of signal:
proc_check(signal signal_in, constant value_expected)
example proc_check(test,'0') ---> test: ok

any idea?
should that be possible?

imed 08-08-2012 02:17 PM

well,
It turns out the same guy, @Jonathan Bromley, posted a reply for the same question, 6 years later (2011) and said that there is no direct way to do that ! :)
https://groups.google.com/forum/?fro...dl/aDM07q3fLMk[1-25]

imed 08-08-2012 02:21 PM

that's why:
my procedure must have signal name of type string as an additional input :(
proc_check(test, "test checking", '0') for example :(


All times are GMT. The time now is 03:11 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57