Use of 'simple_name/instance/path attributes - are they any

T

Tricky

Guest
I cant think of any use for these attributes except in assertions, and
even then there is no way of calling something like this:


assert (generics_are_good)
report this'path_name & ": Generics are bad"
severity failure;

So you could identify where the assert output came from. Is there any
way of getting hold of the path of the entity/architecture you are
currently in?
 
On Tue, 9 Jun 2009 08:51:49 -0700 (PDT), Tricky <Trickyhead@gmail.com>
wrote:

On 9 June, 16:49, Tricky <Trickyh...@gmail.com> wrote:
I cant think of any use for these attributes except in assertions, and
even then there is no way of calling something  like this:

assert (generics_are_good)
  report this'path_name & ": Generics are bad"
    severity failure;

So you could identify where the assert output came from. Is there any
way of getting hold of the path of the entity/architecture you are
currently in?
Use the architecture's name in place of your "this".
You'll get The Right Answer (tm).

entity foo is end;
architecture bar of foo is
begin
assert FALSE report "I'm in " & bar'path_name severity note;
end;
--
Jonathan Bromley, Consultant

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

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
Tricky wrote:
On 9 June, 16:49, Tricky <Trickyh...@gmail.com> wrote:
I cant think of any use for these attributes except in assertions,
Me neither. The scope is very limited.
Not much use for a testbench message.
I print custom messages for errors and warnings.

-- Mike Treseler
 
On 9 June, 16:49, Tricky <Trickyh...@gmail.com> wrote:
I cant think of any use for these attributes except in assertions, and
even then there is no way of calling something  like this:

assert (generics_are_good)
  report this'path_name & ": Generics are bad"
    severity failure;

So you could identify where the assert output came from. Is there any
way of getting hold of the path of the entity/architecture you are
currently in?
I mean 'instance_name, not path_name, but it still has the same
problem.
 
"Tricky" <Trickyhead@gmail.com> wrote in message
news:a6b9c473-4fda-439a-bc7b-bb4151fc9085@o14g2000vbo.googlegroups.com...
On 9 June, 16:49, Tricky <Trickyh...@gmail.com> wrote:
I cant think of any use for these attributes except in assertions, and
even then there is no way of calling something like this:
I've used 'path_name to create the name of a unique log file when the entity
is something that gets reused in a design and where the sim model writes
data to some output file for logging/debugging purposes.

KJ
 
Tricky <Trickyhead@gmail.com> writes:

On 9 June, 16:49, Tricky <Trickyh...@gmail.com> wrote:
I cant think of any use for these attributes except in assertions, and
even then there is no way of calling something  like this:

assert (generics_are_good)
  report this'path_name & ": Generics are bad"
    severity failure;

So you could identify where the assert output came from. Is there any
way of getting hold of the path of the entity/architecture you are
currently in?

I mean 'instance_name, not path_name, but it still has the same
problem.
So long as "this" refers to something like an entity, you can do it.
I've used it for logging msgs in the past.

Unfortunately, when applied to a procedure, it just reports the
procedure name, not back to the entity that called it :(

Cheers,
Martin
--
martin.j.thompson@trw.com
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
 

Welcome to EDABoard.com

Sponsor

Back
Top