steveb Posted March 14, 2012 Report Share Posted March 14, 2012 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. Steve Quote Link to comment Share on other sites More sharing options...
uwes Posted March 15, 2012 Report Share Posted March 15, 2012 hi, 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". Quote Link to comment Share on other sites More sharing options...
steveb Posted March 15, 2012 Author Report Share Posted March 15, 2012 hi, 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. Steve Quote Link to comment Share on other sites More sharing options...
uwes Posted March 16, 2012 Report Share Posted March 16, 2012 (edited) hi, 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. /uwe Edited March 16, 2012 by uwes Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.