在UVM平台验证中,所有的test cases都extends uvm_test,首先,来看源代码

//------------------------------------------------------------------------------
//
// 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 recompilation.
// Random seed selection is also available on the command line.
//
// If +UVM_TESTNAME=test_name is specified, then an object of type 'test_name'
// is created by factory and phasing begins. Here, it is presumed that the
// test will instantiate the test environment, or the test environment will
// have already been instantiated before the call to run_test().
//
// If the specified test_name cannot be created by the <uvm_factory>, then a
// fatal error occurs. If run_test() is called without UVM_TESTNAME being
// specified, then all components constructed before the call to run_test will
// be cycled through their simulation phases.
//
// Deriving from uvm_test will allow you to distinguish tests from other
// component types that inherit from uvm_component directly. Such tests will
// automatically inherit features that may be added to uvm_test in the future.
//
//------------------------------------------------------------------------------ virtual class uvm_test extends uvm_component; // Function: new
//
// Creates and initializes an instance of this class using the normal
// constructor arguments for <uvm_component>: ~name~ is the name of the
// instance, and ~parent~ is the handle to the hierarchical parent, if any. function new (string name, uvm_component parent);
super.new(name,parent);
endfunction const static string type_name = "uvm_test"; virtual function string get_type_name ();
return type_name;
endfunction endclass
除了new() method之外,什么都没有。所有的test case 都扩展自uvm_test.一般的做法:

class default_test extends uvm_test
endclass
default_test 可以用来对验证平台做冒烟测试。
This class is the virtual base class for the user-defined tests.
User-defined test is derived from uvm_test, uvm_test is inherited from uvm_component.
Test defines the test scenario for the testbench.
test class contains the environment, configuration properties, class overrides etc.
A sequence/sequences are created and started in the test.

参考文献:
 

uvm_test——测试用例的起点的更多相关文章

  1. 2017-12-09 JavaScript实现ZLOGO子集: 测试用例

    续前文JavaScript实现ZLOGO子集: 前进+转向. 在添加新功能之前, 先添加测试用例, 以应对日益复杂的代码. 选择使用QUnit编写运行测试用例. 暂时对比较复杂和I/O无关的部分进行测 ...

  2. JUint4的下载、配置及对一个算法编写单元测试用例(测试多组数据每组多个参数)

    一.JUnit4 jar包下载 链接:https://pan.baidu.com/s/1AdeVGGikcY5dfL151ZnWHA 提取码:h1am 下载完成后,解压一下即可. 二.导入JUnit4 ...

  3. TFS 测试用例步骤数据统计

    TFS系统集成了一套BI系统,基于SQL Server的Analysis Service进行实现的.通过这几年的深入使用,能够感触到这个数据数据仓库模型是多么的优秀,和微软官方提供的数据仓库示例Adv ...

  4. 如何使用RobotFramework编写好的测试用例

    如何使用Robot Framework编写优秀的测试用例 概述 命名 测试套件命名 测试用例命名 关键字命名 setup和teardown的命名 文档 测试套件文档 测试用例文档 用户关键字文档 测试 ...

  5. Vertica 导出数据测试用例

    需求:构建简单的测试用例,完成演示Vertica导出数据的功能. 测试用例:导出test业务用户t_jingyu表中的数据. 一.初始化测试环境 二.导出数据 2.1 vsql命令说明帮助 2.2 导 ...

  6. Appium简单测试用例

    工程目录如下: 封装初始化androiddriver 方法 import org.openqa.selenium.remote.DesiredCapabilities; import java.io. ...

  7. qunit 前端脚本测试用例

    首先引用qunit 测试框架文件 <link rel="stylesheet" href="qunit-1.22.0.css"> <scrip ...

  8. .NET程序员项目开发必知必会—Dev环境中的集成测试用例执行时上下文环境检查(实战)

    Microsoft.NET 解决方案,项目开发必知必会. 从这篇文章开始我将分享一系列我认为在实际工作中很有必要的一些.NET项目开发的核心技术点,所以我称为必知必会.尽管这一系列是使用.NET/C# ...

  9. Windows10 会不会成为微软的新起点?

    Because if you change the way you see the world, you can change the world you see. 如果你改变看世界的方式,你就能改变 ...

随机推荐

  1. Lecture0 -- Introduction&&Linear Regression with One Variable

    Introduction What is machine learning? Tom Mitchell provides a more modern definition: "A compu ...

  2. SparseArray浅析

    HashMap是java里比较常用的一个集合类,我们一般用来缓存一些处理后的结果.但当你做一个Android项目时,在代码中定义这样一个变量,实例化时,Eclipse却给出了一个 performanc ...

  3. 2.1-2.2 HBase数据存储

    一.HBase数据检索流程 一篇介绍HBase数据读写流程的解析的博文:http://hbasefly.com/2016/12/21/hbase-getorscan/?wsfatm=uqvhl3 1. ...

  4. Makefile研究(三) —— 实际应用

    转自:http://blog.csdn.net/jundic/article/details/17886637 前面讲了Makefile 的简单语法和简单的应用模板,但在实际项目应用中比这个肯定复杂很 ...

  5. HDU4248【DP】

    题意: 有n种石头,每种石头有a[i]个,然后让你去组合,问有多少种组合: 思路: 这种题,排列组合知识一上,非常麻烦,已经搞了好几题,看似就是排列组合的姿势,然而最终都是一种递推,也就是DP,而且比 ...

  6. 3D max模型导入unity 3D中注意事项

    一.单位,比例统一   在建模型前先设置好单位,在同一场景中会用到的模型的单位设置必须一样,模型与模型之间的比例要正确,和程序的导入单位一致,即便到程序需要缩放也可以统一调整缩放比例.统一单位为米. ...

  7. CTP 下单返回错误: 没有报单权限 和字段错误需要注意的问题

    没有报单权限一般被认为期货公司没有开权限, 但是更多的问题是没有填写 BrokerId, InvestorId 下单字段错误注意一个容易忽略的地方: a. order 应该全部设为0, b. orde ...

  8. JAVA团队开发手册 - 3. 开发流程

    开发流程 对于一个项目,最大的问题就是如何拆解为任务,分配到合适的人手里,并在有限的时间内完成它. 就像做建筑工程一样,其实做IT也是可以量化的,可能有的人砌砖砌得慢一些,有的人快一些. 但是我们把整 ...

  9. Django的锁和事务

    Django的锁和事务 锁 select_for_update(nowait=False, skip_locked=False) 返回一个锁住行直到事务结束的查询集,如果数据库支持,它将生成一个 SE ...

  10. HDU6441(费马大定理)

    听队友说过结论:a^n + b^n = c^n在n > 2时无解. 勾股那里本菜数学不好直接暴举了Orz. 跟大家学一波勾股数的构造:a是奇数时,tmp = a / 2; b = (tmp + ...