instancename of current entity/architecture -- equivalent to

E

Eric Peers

Guest
I have two watchers that are identical, but watching different
interfaces.

I would like to obtain the instancename of the current
entity/architecture so that I can print it out in an error message.

I know there is a `instancename as an attribute. So I could create my
watcher and pass as a signal port to it, it's instancename. But that's
dumb.

I could also create a signal inside of the watcher and find the
'path_name to it and parse it. but that's dumb.

what I want is the equivalent of the "this" pointer in C++:

this'instancename -- I want the instance name of the current
architecture that I am sitting in.

Is there some special VHDL construct to reference the current
architecture/entity?

Thanks!
- -eric
 
eric_peers@yahoo.com (Eric Peers) wrote in message news:<1994eeec.0411171144.72adf1c3@posting.google.com>...
I have two watchers that are identical, but watching different
interfaces.

I would like to obtain the instancename of the current
entity/architecture so that I can print it out in an error message.

I know there is a `instancename as an attribute. So I could create my
watcher and pass as a signal port to it, it's instancename. But that's
dumb.
Yes, but 'instance_name (and its variants 'simple_name and 'path_name)
don't have to be used like that. Suppose you have...

entity E is ....
end;
architecture A of E is ....
...
begin
...
assert <all_is_well>
report "Failure in " & E'instance_name;
...
end;

you will get what you want.

Note, though, that "report" and "assert" messages include this
information anyway (along with the value of simulation time,
which is also very handy). So maybe you don't need to
specify this at all.
--
Jonathan Bromley
 
"Eric Peers" <eric_peers@yahoo.com> wrote in message
news:1994eeec.0411171144.72adf1c3@posting.google.com...
I have two watchers that are identical, but watching different
interfaces.

I would like to obtain the instancename of the current
entity/architecture so that I can print it out in an error message.

I know there is a `instancename as an attribute. So I could create
my
watcher and pass as a signal port to it, it's instancename. But
that's
dumb.

I could also create a signal inside of the watcher and find the
'path_name to it and parse it. but that's dumb.

what I want is the equivalent of the "this" pointer in C++:

this'instancename -- I want the instance name of the current
architecture that I am sitting in.

Is there some special VHDL construct to reference the current
architecture/entity?
Can't you just use

A'INSTANCE_NAME

where A is the architecture name? Or are you referring specifically
to the label of a component instance?

Alan


--
Alan Fitch
Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project
Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24
1AW, UK
Tel: +44 (0)1425 471223 mail:
alan.fitch@doulos.com
Fax: +44 (0)1425 471573 Web:
http://www.doulos.com

The contents of this message may contain personal views which are not
the
views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top