Jump to content

Change radix value for transaction recording.

Recommended Posts

When transaction recording is enabled and logged to the tr_db.log file, all the values written are specified in decimal. The radix is printed along with the value, but the value is always in decimal.

By the look of the uvm_recorder.svh file it appears that outputting the value in decimal is hardcoded:

$fdisplay(file," SET_ATTR @%0t {TXH:%0d NAME:%s VALUE:%0d RADIX:%s BITS=%0d}",

$time,txh, nm, (value & ((1<<numbits)-1)),radix.name(),numbits);

Would it be possible to get the value printed in the specified radix instead of in decimal?

I didn't see any open UVM issues regarding this, so I believe this would be a new change request.


Link to comment
Share on other sites


a simple "workaround" would be to derive a new uvm_recorder and implement set_attribute with that change and override the uvm_default_recorder. i mean i dont really see that as "issue".

I guess I thought it was a missing feature because in set_attribute it performs a call to uvm_radix_to_string so it could format the value correctly but then never uses it. Just seems weird to pass it a radix and have it pretty much ignore it.

But either way, I don't know why I didn't think of overriding the default recorder. This workaround works fine for me. Thanks.


Link to comment
Share on other sites


i think the point is that the text file is not really intended to be viewed. its rather a vaguely "defined" exchange format so that other tools may display stream information. in that context the RADIX is simply a marker of your preferred way to print a uvm_field so (basically a hint how you want to have it displayed).

i'm going to file a mantis to clean this up.


Edited by uwes
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...