如何转储 UVM TB class 图?
How to Dump a UVM TB class diagram?
是否可以转储 UVM(或 SV)TB class/object 层次结构图?
它有助于轻松浏览代码和查看 TB。
提前致谢:)
我不确定是否可以将其动态转储到波形中(这可能需要模拟器支持)。但是如果你只想打印你创建的整个 UVM 验证环境,那么在 end_of_elaboration_phase
.
调用 uvm_top.print_topology()
class your_test extends uvm_test;
//...
virtual function void end_of_elaboration_phase(uvm_phase phase);
uvm_top.print_topology();
endfunction
endclass
如果您想要打印整个拓扑,请在您的基础测试中创建一个 uvm_table_printer,然后在您的 end_of_elaboration_phase 中使用它来打印您的 class 层次结构 table格式
class my_test extends uvm_test
uvm_table_printer m_printer;
// .... All other class variables
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
m_printer = new();
// Rest of your build phase
endfunction
virtual function void end_of_elaboration_phase(uvm_phase phase);
`uvm_info(get_full_name(), "Printing test topology", UVM_NONE)
uvm_top.print_topology(m_printer);
endfunction
endclass;
这将以可读的 table 格式打印您的整个 class 层次结构。请注意,它不会打印出端口之间的连接
是否可以转储 UVM(或 SV)TB class/object 层次结构图?
它有助于轻松浏览代码和查看 TB。
提前致谢:)
我不确定是否可以将其动态转储到波形中(这可能需要模拟器支持)。但是如果你只想打印你创建的整个 UVM 验证环境,那么在 end_of_elaboration_phase
.
uvm_top.print_topology()
class your_test extends uvm_test;
//...
virtual function void end_of_elaboration_phase(uvm_phase phase);
uvm_top.print_topology();
endfunction
endclass
如果您想要打印整个拓扑,请在您的基础测试中创建一个 uvm_table_printer,然后在您的 end_of_elaboration_phase 中使用它来打印您的 class 层次结构 table格式
class my_test extends uvm_test
uvm_table_printer m_printer;
// .... All other class variables
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
m_printer = new();
// Rest of your build phase
endfunction
virtual function void end_of_elaboration_phase(uvm_phase phase);
`uvm_info(get_full_name(), "Printing test topology", UVM_NONE)
uvm_top.print_topology(m_printer);
endfunction
endclass;
这将以可读的 table 格式打印您的整个 class 层次结构。请注意,它不会打印出端口之间的连接