Goal: I would like to get transaction recording in Questa 10.1b to work in a useful way. I want to create a transaction stream for every UVM Monitor I instantiate and be able to add it to my wave by clicking through the hierarchy in the structure window, ie:
/uvm_root/uvm_test_top/env/agent/monitor
( and then click on it’s stream in the object window)
Notes:
- I am using the pre-compiled uvm version that came with Questasim
- I pass -uvmcontrol=all flag into the simulation.
- I have set recording detail in the top_level test
Once transactions appear on a sequencer, QuestaSim automatically creates a trStream for each uniquely named transaction which I can add through the structure window. (locate sequencer and select from object window).
What I want is a single stream that shows all transaction traffic on an interface (which I then have a monitor for) instead of an individual stream for each unique transaction name. This is also appealing because it lets me view transactions passively read off of an interface, while a sequencer does not.
So I looked into the Questa documentation to create custom streams and added to the monitor’s build method:
function void st_monitor::create_streams();
string name = { "..", get_full_name(), ".", "raw_stream" };
string type_name = "raw_packet";
h_raw_stream = $create_transaction_stream( name, type_name );
endfunction
then every time I receive a transaction on the monitor’s import:
trans = $begin_transaction( h_raw_stream, pkt.get_name(), pkt.start_time );
// <add some code here to somehow call their do_record functions and $add_attribute to trans>
$end_transaction( trans, pkt.end_time, 1 );
The trouble is, the transaction stream doesn’t appear in the hierarchy like the sequencer’s specific transactions do, instead the only path I can reach my newly created stream at is:
/uvm_pkg::uvm_phase::m_run_phases/raw_stream
(which I determined by viewing the vsim.wlf file)
And even then I only see a single stream with the combined traffic of all monitors, instead of a separate transaction stream for every monitor.
The questa documentation for naming conventions of $create_transaction_stream( stream_name, stream_kind ) dictate:
For OVM designs, the string specified must adhere to the following format:
{“…”,get_full_name(),“.”,“your_name”}
(Since I am using UVM instead of OVM maybe this is no longer valid.)
Summary:
I think I am fairly close to getting transaction recording working in a useful way, any advice on how to:
- Make the custom transaction streams (there should be 1 per monitor) appear in the UVM hierarchy so they can be easily added to the wave window.
- Call the do_record function using trans handle to automatically $add_attribute() for all fields in my transaction type.
Any help would be greatly appreciated!!