Jump to content

how to display UVM_VERBOSITY

Recommended Posts

How do I display the name string of the UVM_VERBOSITY?


I have been using this to report the verbosity level, but it returns an int.




How would you display the enumerated name as opposed to the enumerated value?


I'm looking at section "6.19 Enumerations" of the LRM (1800-2012.pdf) and close, but not there yet, so I punt this question out into the ether.

.name() seems like it should be in there somewhere.

Link to comment
Share on other sites

Just as an aside, you can also use the %p formatter to display enumerated types (and pretty well anything else), e.g.


$display("Verbosity is %p", m_rh.get_verbosity_level() );


The disadvantage of %p compared to Tudor's string is that %p tends to print things out more verbosely (ironic in this case!)





P.S. You might have to cast m_rh to the type of the verbosity level in that context.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...