Jump to content

Recommended Posts

Posted

Hi,

 

I would like to dump the output data into a file.

I'm currently implementing it in the following way.

 

integer mcd = $fopen("abc.txt", "w");

$fwrite(mcd, "This is my data");

$fclose(mcd);

 

I need to implement the same functionality using any of the in-build UVM methods like uvm_report_info.

Can you please help me with the same.?

 

Thanks in advance.

 

-Subbu

Posted

Hi Subbu,

 

you can set UVM to send all the UVM_INFO messages to a file like this:

virtual function void end_of_elaboration_phase(input uvm_phase phase);
   int output_file = $fopen("output.log", "w");
   uvm_top.set_report_default_file_hier(output_file);
   uvm_top.set_report_severity_action_hier(UVM_INFO, UVM_LOG);
endfunction

You can also control the messages by ID using set_report_severity_id_hier() function.

 

Hope this helps!

Cristi

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