当前位置:网站首页>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 .
边栏推荐
- Solution of mysql8 forgetting password file in Windows Environment
- 2021-10-04
- Postman--使用
- 【避坑指南】Unity3D项目接入腾讯Bugly工具时遇到的坑
- Nonlinear optimization: establishment of slam model
- 从MediaRecord录像中读取H264参数
- 两数之和,求目标值
- sqoop创建job出现的一系列问题解决方法
- Shapiro Wilk normal analysis by SPSS
- What are the popular frameworks for swoole in 2022?
猜你喜欢

Postman--使用

13. Semaphore critical zone protection

Internet News: Tencent conference application market was officially launched; Soul went to Hong Kong to submit the listing application

Session cookies and tokens

Sum the two numbers to find the target value

07数据导入Sqoop

Ks009 implement pet management system based on SSH

【JetBrain Rider】构建项目出现异常:未找到导入的项目“D:\VisualStudio2017\IDE\MSBuild\15.0\Bin\Roslyn\Microsoft.CSh

Understand the composition of building energy-saving system

Message mechanism -- getting to know messages and message queues for the first time
随机推荐
02-taildir source
使用sqlcipher打开加密的sqlite方法
Understand the composition of building energy-saving system
lunix重新分配root 和 home 空间内存
Rapid prototyping
【Unity3D】嵌套使用Layout Group制作拥有动态子物体高度的Scroll View
记录 AttributeError: ‘NoneType‘ object has no attribute ‘nextcall‘
【Visual Studio】每次打开一个Unity3D的脚本,都会自动重新打开一个新的VS2017
两数之和,求目标值
网络通信学习
Nonlinear optimization: establishment of slam model
[Fantasy 4] introduction and use of UMG components (under update...)
Blender stone carving
【避坑指南】使用UGUI遇到的坑:Text组件无法首行缩进两格
[MySQL] an exception occurs when connecting to MySQL: connection must be valid and open
What is the significance of the college entrance examination
MYSQL关键字
Network real-time video streaming based on OpenCV
Test -- Summary of interview questions
Use WinDbg to statically analyze dump files (summary of practical experience)