【VCS版】【mentor公司的例子】基於UVM的UART驗證環境


之前偶然在群里看到有人分享了Mentor Graphics提供的一個UART的UVM驗證環境代碼,包含了UVM的基本使用以及進階的UVM寄存器模型。這里也分享給大家。

文件說明

agents/apb_agent - APB agent used in the UVM testbench
agents/uart_agent - UART agent user in the UVM testbench
agents/modem_agent - UART Modem interface agent, used in the UVM testbench
docs
protocol_monitor - contains an example APB protocol monitor
rtl - Contains the UART RTL source code***
sim - Simulation directory for the example, contains the Makefile
uvm_tb/tb - Top level testbench
uvm_tb/tests
uvm_tb/virtual_sequences
uvm_tb/sequences
uvm_tb/register_model
uvm_tb/env - contains the functional coverage monitors described in the cookbook

DUT是16550A UART模塊,接口主要包含apb、uart以及一些狀態信號,agents下是不同接口的agent。16550A UART推薦大家自己搜索下載詳細的spec。

docs是uart模塊的簡單說明,包含了一些寄存器的說明

protocol_monitor是一個協議檢查模塊,通過斷言對apb協議進行檢查

環境集成以及sequence等編寫在uvm_tb下。

運行仿真

由於是mentor公司提供的例子,所以原來的makefile調用的是Questa,本次改了一下makefile,用vcs運行,然后生成覆蓋率之后可以導出網頁報告,或者用verdi查看覆蓋率。

make all運行

覆蓋率報告生成在cg_report目錄下

make verdi_cg使用verdi查看覆蓋率

例子中的編寫的testcase並不能達到100%覆蓋率,有興趣可以自己試着寫新的case,去提高覆蓋率

后台回復uart_vcs獲得驗證環境

另外,仿真的EDA工具也可以看下面的文章

https://www.cnblogs.com/icparadigm/p/13827684.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM