#UVM# 关于run_test(““) 的几点理解

本文深入探讨了UVM中的run_test()任务,包括其来源、使用方法和执行过程。run_test()源自uvm_test.svh,作为虚类提供执行不同测试的能力。在initial块中调用,并遵循特定的命令行或参数使用规则。执行时,run_test()通过uvm_root::run_test触发UVM活动。注意,传入参数必须为uvm_component类型。
摘要由CSDN通过智能技术生成

刨根问底 run_test() task

今天通过查看 UVM 源码,分析 run_test()的来龙去脉。在此基础上,总结run_test()的用法指南、执行原理以及注意事项(优先级问题)。个人理解,希望大家批评指正。

1. run_test("") 来自哪里 ?

搭建过UVM 验证平台的验证人员,都接触过run_test() 这个最基础的task。张强前辈在白皮书中教过我们这么用,但是还是充满好奇。于是,自己追究了一下uvm 源码。
下面这段完整代码,摘自 uvm_test.svh 源文件中。

//------------------------------------------------------------------------------
//
// CLASS: uvm_test
//
// This class is the virtual base class for the user-defined tests.
//
// The uvm_test virtual class should be used as the base class for user-defined
// tests. Doing so provides the ability to select which test to execute using
// the UVM_TESTNAME command line or argument to the <uvm_root::run_test> task.
//
// For example
//
//|  prompt> SIM_COMMAND +UVM_TESTNAME=test_bus_retry
//
// The global run_test() task should be specified inside an initial block
// such as
//
//|  initial run_test();
// 
// Multiple tests, identified by their type name, are compiled in and then
// selected for execution from the command line without need for recom
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

那么菜

你的鼓励和批评是我最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值