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

T

Tricky

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?
 
T

Tricky

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.
 
M

Mike Treseler

Me neither. The scope is very limited.
Not much use for a testbench message.
I print custom messages for errors and warnings.

-- Mike Treseler
 
K

KJ

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
 
M

Martin Thompson

Tricky said:
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
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top