当前位置:网站首页>UVM learning - object attribute of UVM phase
UVM learning - object attribute of UVM phase
2022-07-02 10:41:00 【weixin_ forty-five million seven hundred and four thousand five】
UVM Objection
effect
1、 control taskphase Operation and termination of
2、 Synchronize the various component Homonymous task phase
Code example
Example 1
stay Last blog On the basis of driver The code of , Then run the simulation .
class my_driver extends uvm_driver #(my_transaction);
`uvm_component_utils(my_driver)
function new(string name = "my_driver", uvm_component parent);
super.new(name, parent);
endfunction
virtual task reset_phase(uvm_phase phase);
phase.raise_objection(this);
#100;
`uvm_info("DRV_RESET_PHASE", "Now driver reset the DUT...", UVM_MEDIUM);
phase.drop_objection(this);
endtask
virtual task configure_phase(uvm_phase phase);
phase.raise_objection(this);
#100;
`uvm_info("DRV_CONFIGURE_PHASE", "Now driver config the DUT...", UVM_MEDIUM);
phase.drop_objection(this);
endtask
virtual task run_phase(uvm_phase phase);
# 3000;
forever begin
seq_item_port.get_next_item(req);
`uvm_info("DRV_RUN_PHASE", req.sprint(), UVM_MEDIUM)
#100;
seq_item_port.item_done();
end
endtask
endclass
reset_phase Not in the middle raise and drop objection, Run the simulation , As can be seen from the printed information ,reset_phase The statement in is not executed .
stay reset_phase Medium plus raise and drop objection after ,reset phase Normal execution of the statement .
There are no time statements that consume simulation time phase Can be executed normally , Part of the above code comments is as follows , It can also be executed normally .
virtual task reset_phase(uvm_phase phase);
// phase.raise_objection(this);
// #100;
`uvm_info("DRV_RESET_PHASE", "Now driver reset the DUT...", UVM_MEDIUM);
// phase.drop_objection(this);
endtask
Be careful
1、Objection about task phase It makes sense , control task phase Operation and termination of .
2、 You must execute statements that consume simulation time raise objection
3、 stay task phase At the end drop objection.
4、 In a component One of the task phase in raise and drop objection It will affect others component Of the same name task phase.
5、 The suggestion is in every task phase Zhongdu raise and drop objection once .
Usage principle
1、raise and drop objection Use in pairs .
2、 Try to task phase Use raise objection and drop objection.
3、 Do not use in infinite loops raise objection and drop objection.
4、 Every phase Try to use it only once .
5、raise objection Before the time statement that consumes simulation time .
边栏推荐
- Transport Optimization abstraction
- 【JetBrain Rider】构建项目出现异常:未找到导入的项目“D:\VisualStudio2017\IDE\MSBuild\15.0\Bin\Roslyn\Microsoft.CSh
- 【虚幻4】从U3D到UE4的转型之路
- 618再次霸榜的秘密何在?耐克最新财报给出答案
- Flutter——Canvas自定义曲线图
- MongoDB-快速上手MongoDB命令行的一些简单操作
- 4.随机变量
- Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
- 使用Windbg静态分析dump文件(实战经验总结)
- shell编程01_Shell基础
猜你喜欢
【JetBrain Rider】构建项目出现异常:未找到导入的项目“D:\VisualStudio2017\IDE\MSBuild\15.0\Bin\Roslyn\Microsoft.CSh
Internet News: Tencent conference application market was officially launched; Soul went to Hong Kong to submit the listing application
Flink实时计算topN热榜
Pytest-- test report allure configuration
数据库字典Navicat自动生成版本
[Fantasy 4] the transformation from U3D to UE4
Postman -- use
2021-10-04
Session cookies and tokens
Shapiro Wilk normal analysis by SPSS
随机推荐
Sus system availability scale
MongoDB-快速上手MongoDB命令行的一些简单操作
02-taildir source
[Fantasy 4] introduction and use of UMG components (under update...)
Shutter - canvas custom graph
JS reduce accumulator
快速做出原型
对话吴纲:我为什么笃信“大国品牌”的崛起?
flume 190 INSTALL
Is this code PHP MySQL redundant?
Internet News: Tencent conference application market was officially launched; Soul went to Hong Kong to submit the listing application
Blender stone carving
2021-09-12
Pytest-- test report allure configuration
MYSQL关键字
2021-10-04
Flink submitter
Pytest framework implements pre post
[SUCTF2018]followme
AI技术产业热点分析