How to include the packets generated by a transcation class in a File in systemverilog?

Dear all,
Can some one plz guide me how to include or put inside, the Packets generated by a transaction class, into a File which can be stored somewhere, in system verilog?

Also how to include Timings for the packets generated in the transaction class? Any macros or system functions or utilities are used for this purpose. I am using UVM methodology. Any help is appreciated.

Thanks,
Swapnil

Hi Swapnil,

If you want to direct all the transactions from one class to one file, you need to use the “set_report_severity_file” method. The file handle for class can be set by using this method.

If i understand your second question correctly, Timings of the packets also need to be via class members only.

Thanks,
Vishnu

In reply to vishnuprasanth:

Hello Vishnu,

Thanks for your reply. Can u plz elaborate how to use “set_report_severity_method” ? Would I not have to use “set_report_id_file” also? I have never used these methods before, hence plz guide me.

For timings part, I actually want to see, at what times, the packets get generated and I should be able to note that time also? Can this be done with any macro in UVM methodology?

Your help is appreciated,

Thanks,
Swapnil

In reply to swapnilm:

The UVM has a built-in transaction recording mechanism. See Transaction/Methods | Verification Academy

Hi Swapnil,

You need to create one file handle and set that handle to the class via “set_report_severity_file” method.
Example:
int specific_log_file; //Creating the File handle.
In the elaboration phase of the component or where ever you require, create one file.
specific_log_file = $fopen(“Transaction.log”},“w”);
Set the file by using below command
set_report_severity_file(specific_log_file);

As dave suggests, you can use the Recording option for timing. But this feature will work only with UVM Package provided with Simulation tool only. This feature won’t work the UVM package downloaded from verificationacademy as this tool dependent feature.

-Vishhu

In reply to vishnuprasanth:

Vishhu - Not correct. The UVM will dump out a text file transaction log if you use the generic UVM package.

In reply to dave_59:

Thank you dave for correcting me.

In reply to vishnuprasanth:

[UVM]It is possible to print report message of multiple class(component Ex. driver, monitor) in single file.?