uvm_root.print_topolgy()
最簡單的使用方法是將enable_print_topology修改成1.
- 並不是從uvm_top開始打印的,而是從它的下一級,uvm_top只能有一個。
當然你的實際的環境不能修改源代碼。可以在外部設置uvm_root.enable_print_topology = 1來調print_topology().
如何添加uvm_top.enable_print_topology = 1這句話的位置?(uvm_top是uvm_root類型的全局變量)
- end_of_elaboration_phase之前,如果是放在之后,比如說run_phase,並不能夠打印出層級。
- build_phase之后,因為UVM 樹,要有uvm_top的樹根。
- 推薦放在connect_phase里面。
還有一種方法: - 在end_of_elaboration_phase之后,調用uvm_top.print_topolgy()函數。