Jump to content

Recommended Posts

Posted

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?

Posted

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

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.

Guest
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...