轉載:Verdi UVM Debug Mode 簡單使用_Holden_Liu的博客-CSDN博客
文檔與源碼:
User Guide: UVMDebugUserGuide.pdf in $VERDI_HOME/doc
Verdi online doc: Verdi Ooline Doc //need log in SolvNet before
testbench使用的是《UVM實戰》的7.4.3章節源碼:
源碼地址:UVM實戰源碼下載
介紹:
Verdi UVM Debug tool: 針對UVM 平台的debug工具,可以像打開RTL一樣,層次化顯示testbench,便於閱讀。同時針對UVM特有的Resource,Factory,Phase,Sequence,Register,TLM connection等,可以顯示仿真的詳細內容。
准備:
環境變量: $VERDI_HOME, $LD_LIBRARY_PATH 等
TB: 包含reg_model.
top_tb.sv:
add dump wave
Makefile:
和正常的編譯運行一樣,只需在run time階段,加上 “-gui=verdi"。
UVM_VERDI_XXX:具體含義如下
UVM_VERDI_COMPWAVE: 記錄UVM Component的波形
UVM_TR_RECORD: 收集sequence中transaction信息。
使用:
1. 進入 Verdi的Interactive mode,此時並沒有開始仿真,需要點擊紅框的綠色箭頭或者在左下的Console輸入"run"。
完場上述步驟,即完成仿真過程。運行的testcase就是Makefile腳本里指定的,可以在Tool->Preferences->Simulation中看到具體run_time Options:
2. 打開TB的Hierarchy Tree:
UVM-> All Views顯示
Hierarchy Tree左側顯示
下方其他debug窗口
3. 顯示更多信息
選中一個component或者TLM,右鍵可以選擇其他信息,show connections, show objects,Add to Waveform等。
4. Resource/Factory/Phase View見User Guide.
5. Sequence View:
5.1: 選中一個sequence,右鍵 Add Sequence to Watches
5.2: 可以顯示transaction的”波形“和詳細內容
選中一個sequence,右鍵 Add Sequence to Transaction Browser, 會在最下方調出 Protocol Analyzer界面。界面右側有 transaction每個域的具體數值。也可以通過界面左側的Hierarchy Tree添加其他sequence。
tansaction debug具體操作見:
Verdi Transaction Debug Tool 簡單使用
6. Register View
界面顯示:
1=> 選擇Register_View
2=> 快捷篩選
3=> reg_model的寄存器access history。最后一次read發生在reference model中。(verdi-2017.12測試並不會記錄 set,update寄存器的操作)
add to waveform,set breakpoint等。
Debugging UVM Registers in Verdi Post-Processing Mode see in User Guide.
7. 手動設置斷點
在source code界面,右鍵選擇set breakpoint,彈出Manage to Breakpoints界面,有多種設置方式,選擇在Line 70行設置斷點。
F10往下運行,會在Local tab顯示數值變化。也可以右鍵選擇Add to Watch.
(更多操作見:Verdi_SVTB_Interactive_Deubg.pdf)
8. Verdi Smart Log
加載log,方便搜索,篩選,定位。參考:Verdi_Smart_Log.pdf in $VERDI_HOME/doc
待續:
參考:文檔參考《UVMDebugUserGuide》