当前位置:网站首页>UVM入门实验1
UVM入门实验1
2022-07-27 08:22:00 【Bunny9__】
UVM入门实验1
零、一些补充回顾
共有9个phase,其中run_phase是任务类型,run_phase中,可以细分出12个小phase,小phase是依次执行,但和run_phase又是并行执行的
raise_objection()、drop_objection()用于控制仿真的开始和结束,建议在已进入run_phase就拉起,保证objection counter能够及时增加,防止仿真退出
uvn_config_db可以传递virtual interface到环境中、设置单一变量、传递配置对象到环境
interface的set()、get()只能发生在组件中
接口传递一定要发生在run_test()之前,确保进入build_phase的时候vif已经在uvm_config_db中了。set()、get()路径一直,类型也要一致,virtual
test是验证环境的唯一入口,所有测试实例的场景都必须继承于uvm_test
关于配置,使用config_db是一种静态配置,只需要在build阶段配置一次,整个仿真中的模式就会被固化。动态配置可以用transaction,动态创建、动态传输、动态配置
一、工厂的注册、创建和覆盖机制
1.运行object_crearte

2.运行object_override

3.运行component_create

4.运行component_override

- t1/t2/t3/t4、u1/u2/u3/u4都被创建了。
- trans对象的name没有被修改,unit对象的name被修改了。
- t1用new()直接创建,t2/t3/t4用工厂创建,所以后三个被覆盖(工厂提供的便利)。u同理。
- 类型覆盖要发生在创建之间,否则覆盖无效。
- 没有注册到工厂下,用工厂方法type_id::create()会报错。
二、域的自动化以及uvm_object的常用方法

- 域的自动化后可以使用uvm_object提供的一些预定义方法,自动化声明要放在声明变量后。
- do_compare()是compare()的回调函数,当do_compare()显示声明的时候,才会被执行。
- 默认比较器为1,即当第一个比较错误发生的时候,就不会进行后续的比较。
为了一直比较,有两种方法:
1.修改全局uvm_comparer对象
uvm_default_comparer.show_max = 10;
2.创建一个uvm_comparer对象,自己修改变量值
三、phase机制

- 共有9个phase,其中run_phase是任务类型,run_phase中,可以细分出12个小phase,小phase是依次执行,但和run_phase又是并行执行的。reste_phase和main_phase与run_phase并行执行,所以只花了2us。
- build_phase是自顶向下执行,其余都是自底向上。
- raise_objection()、drop_objection()用于控制仿真的开始和结束,建议在已进入run_phase就拉起,保证objection counter能够及时增加,防止仿真退出。
四、config机制



- 接口在传递的时候,类型要加virtual。接口传递要早于run_test()、create()
五、消息管理
- 设置在build_phase中的消息屏蔽,不影响创建时的消息打印
- set_report_id_verbosity_level_hier(str, verb)可以选择控制某些ID的消息
边栏推荐
- regular expression
- Shenzhi Kalan Temple
- Use of "PHP Basics" delimiters
- STM32 small bug summary
- Opengauss stopped from the library and found that the main library could not write data
- 2020 International Machine Translation Competition: Volcano translation won five championships
- On Valentine's day, I drew an object with characters!
- The third letter to the little sister of the test | Oracle stored procedure knowledge sharing and test instructions
- How to play with the purchase of SAP variant materials? Look at this article and you will understand
- Use of NPM
猜你喜欢

情人节,我用字符画出了一个对象!

Data extraction 1

DEMO:ST05 找文本ID 信息

All in one 1353 -- expression bracket matching (stack)

第2章 前台数据展现

Interviewer: what is scaffolding? Why do you need scaffolding? What are the commonly used scaffolds?

Solve the problem of slow batch insertion of MySQL JDBC data

Introduction to depth first search (DFS)

SSTI template injection

海量数据肖枫:共建共治openGauss根社区,共享欣欣向荣新生态
随机推荐
1178 questions of Olympiad in informatics -- ranking of grades
Demo:st05 find text ID information
How to update PIP3? And running PIP as the 'root' user can result in broken permissions and conflicting behavior
[netding cup 2020 Qinglong group]areuserialz (buuctf)
Node installation and debugging
Want the clouds in the picture to float? Video editing services can be achieved in three steps with one click
Five day travels to Beijing
QT creator code style plug-in beautifier
虚拟机克隆
Introduction to depth first search (DFS)
Containerd failed to pull private database image (kubelet)
代码接口自动化的有点
JS basic exercises
[geek challenge 2019] finalsql 1
Methods of server network testing
JS rotation chart
Dasctf2022.07 enabling game password WP
Database startup report error_ user_ connect_ times > 0 error
Use of "PHP Basics" delimiters
What is the real HTAP? (1) Background article