I use this command to print the contents of the transaction class in Questasim:
`uvm_info("VALUES", tx.sprint(), UVM_LOW)
My transaction has a variable ans
. The problem is it is printing it as HEX rather than DECIMAL.
It shows:
ans integral 8 'h1c
How can I get it to display it as:
ans integral 8 'd28
You need to enable the UVM_DEC flag when register your uvm class:
`uvm_object_utils_begin(your_class)
`uvm_field_int(ans, UVM_ALL_ON | UVM_DEC)
`uvm_object_utils_end