Usage of do_record

I have been seen do_reord usage but I am confused about its usage.



function void do_record(uvm_recorder recorder);
    super.do_record(recorder);
    `uvm_record_field("cmd",  m_cmd)  // Confined to integral fields
    `uvm_record_field("addr", m_addr)
    foreach (m_data[i])
      `uvm_record_field($sformatf("data%0d",i), m_data[i])
  endfunction


I read that

It is useful to take all the informatin about transaction and record it into simulation debug database

Are UVM macros, such as uvm_object utils for registering varibales and transactions into uvm factory to override them? " uvm_record_field" is for recording for simulation debug database?

And from uvm class references

uvm_record_attribute Vendor-independent macro for recording attributes (fields) to a vendor-specific transaction database. uvm_record_field Macro for recording name-value pairs into a transaction recording database.

What is “`uvm_record_attribute” also?
I read also that

Questa uses $add_attribute.

Thanks in advance,
Regards,
Hakan

In reply to hcglu:

The UVM provides hooks for vendor specific waveform capture tools to record UVM transactions together with DUT signals. Without these hooks, the UVM just dumps out a text file.

This Mentor/Siemens EDA sponsored public forum is not for discussing tool specific usage or issues. Please read your tool’s user manual or contact your tool vendor directly for support.

In reply to hcglu:

Basically you don’t need that function if you are an DV engineer imo.
record-related functions are for vendor simulators to record transactions so that in your waveform you could display not only DUT waveform but also transactions from your TB.

In reply to Jeff_Li_90:

Thank you Jeff. As far as I understand, simulators aleeady perform recording, I don’t have to worry about it?

In reply to hcglu:

No you don’t need to worry about it at all.

VIP vendors use record-related functions to store that information so that they could provide UVM-AWARE debug capability in debug-gui. Inside do_record hooks different vendors could bury their built-in VPI/DPI functions there to store the TXN information into their proprietary database, which is of no interest to you.