swathi92 Posted August 6, 2014 Report Posted August 6, 2014 by default when a numerical value is printed, it is displayed as hexa decimal. how can i change it to decimal using print(). eg; class mycls extends uvm_sequence_item; int a,b,c; endclass in top module........ mycls m1=new; m1.print(); above displays a,b,c in hexa. how to change to decimal? Quote
uwes Posted August 6, 2014 Report Posted August 6, 2014 hi, if you use the field macros then you just need something like `uvm_field_int (a, UVM_DEFAULT|UVM_HEX) if you implemented do_print() instead you need to use something like printer.print_field_int ("address", m_address, 64, UVM_HEX); /uwe Quote
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.