Dear All,
i really find the UVM_VERBOSITY settings great. It’s a fantastic debug aid… if you are debug uvm_components.
Sequences are ok, but when you select the sequencer, you only see the messages from the bottom sequence. What is more interesting is the debug message from virtual sequences.
As documented here the verbosity here is dependent on uvm_top, because the virtual sequence has no sequencer to run on.
I have been burned in the past messing around with virtual sequencers, but would they allow me to distinguish the verbosity settings of a virtual sequence if i used one?
Thanks
You can use any context when issuing a message. You are correct that when you use class derived from uvm_component which is derived from uvm_report_object, the context is set for you to that component, otherwise the global uvm_top is used as the context.
To use another context, you can do
obj.uvm_report_info("ID","MESSAGE",verbosity);
or
`uvm_info_context("ID","MESSAGE",verbosity,obj)
where obj is another object derived from uvm_report_object. That could be another component like the agent where this sequence is running, or you could construct another object
class my_item extends uvm_sequence_item;
static uvm_report_object log=new("my_item");
...
`uvm_info_context("ID","message",UVM_HIGH,log)
// use my_item::log.set_report_verbosity_level(level);
In reply to dave_59:
Thanks Dave, useful information, but i am struggling a little to relate it to my use case.
I’ll start by explaining my normal debug routine…
I have categorised my UVM_INFO messages by severity based on their location in the testbench hierarchy and their importance in that class. e.g. my driver will have more UVM_HIGH messages and less UVM_LOW messages that my test.
If i have a problem with a particular interface i can select the driver and its report verbosity so i can monitor what exactly is going on. I select this from my base_test or my test in the end_of_elaboration_phase e.g.
function void block_A_base_test_vc::end_of_elaboration_phase(uvm_phase phase);
tb.OCP_tb_env.m_agents[1].m_driver.set_report_verbosity_level(UVM_LOW);
tb.OCP_tb_env.m_agents[1].m_seqr.set_report_verbosity_level(UVM_HIGH);
tb.scoreboards[0].set_report_verbosity_level(UVM_MEDIUM);
endfunction
Above i have deliberately put the sequencer on UVM_HIGH. However i know that the sequence running on m_seqr is the lowest sequence. Which in most cases i am not interested in because its too verbose.
9 time out of 10 i have made an error in the virtual sequence that calls the lower level sequences. what i would really like to do is something like…
function void block_A_base_test_vc::end_of_elaboration_phase(uvm_phase phase);
vseq_OCP_i2c.set_report_verbosity_level(UVM_LOW);
endfunction
where vseq_OCP_i2c is a virtual sequence that coordinates sequences running on a sequencer for a OCP bus and a sequencer for a i2c bus.
I have not changed my approach to categorising UVM report messages between uvm objects and uvm_components. So i guess this is my question… what is the best method to debug sequences and virtual sequences using the uvm_report_server?