vmm执行基本流程


`vmm_test_begin(testcase_name,vmm_env,"Test Case Name String") ;

env.build() ;

env.reset_dut() ;

env.start() ;

env.wait_for_end() ;

env.report() ;

`vmm_test_end(testcase_name);



参考文献:http://www.testbench.in/VM_09_VMM_TEST.html

vmm_test is introduced in vmm 1.1. 

To know the vmm version which you are using, use this command 
vcs -R -sverilog -ntb_opts dtm 
+incdir+$VMM_HOME/sv $VMM_HOME/sv/vmm_versions.sv 


vmm_test is used for compiling all the testcases in one compilation. The simulation of each testcase is done individually. Traditionally for each testcase, compile and simulation are done per testcase file. With this new approach, which dose compilation only once, will save lot of cup. 


Generally each testcase can be divided into two parts. 


(S)Procedural code part. 


The procedural code part (like passing the above new constrained transaction definition to some atomic generator, calling the env methods etc) has to be defined between these macros. vmm provides 2 macros to define testcase procedural part. 


`vmm_test_begin(testcase_name,vmm_env,"Test Case Name String") 
`vmm_test_env(testcase_name) 

(S)Declarative code part. 


The declarative part( like new constrained transacting definition) is defined outside these macros. 



Writing A Testcase 



Let us see an example of writing a testcase. 
Inside the testcase, we will define a new transaction and pass this transaction to the atomic generator. 



(S) Declarative part: 


1) Define all the declarative code. 


class constrained_tran extends pcie_transaction; 

// Add some constraints 
// Change some method definitions 

end class 


2) Define a handle to the above object. 


constrained_tran c_tran_obj; 

(S) Procedural part: 


Use a `vmm_test_begin . There are 3 arguments to macro. 

 
The first argument is the name of the testcase class and will also be used as the name of the testcase in the global testcase registry. 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值