当前位置:网站首页>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 .
边栏推荐
- [Fantasy 4] introduction and use of UMG components (under update...)
- Application of rxjs operator withlatestfrom in Spartacus UI of SAP e-commerce cloud
- Transport Optimization abstraction
- Feature (5): how to organize information
- pytest框架实现前后置
- stm32和电机开发(上位系统)
- 【Unity3D】制作进度条——让Image同时具有Filled和Sliced的功能
- Basic usage of mock server
- 12. Process synchronization and semaphore
- Blender camera surround motion, animation rendering, video synthesis
猜你喜欢
随机推荐
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
MongoDB-快速上手MongoDB命令行的一些简单操作
sqoop的表的导入
Solution of mysql8 forgetting password file in Windows Environment
Importing tables from sqoop
对话吴纲:我为什么笃信“大国品牌”的崛起?
Nonlinear optimization: establishment of slam model
Operator-1初识Operator
Metaclass type and using metaclass to implement model class ORM
stm32和電機開發(上比特系統)
flume 190 INSTALL
(五)APA场景搭建之挡位控制设置
Lunix reallocates root and home space memory
AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
Flink submitter
Solutions to a series of problems in sqoop job creation
Flutter——Canvas自定义曲线图
Shapiro Wilk normal analysis by SPSS
Postman -- use
【避坑指南】使用UGUI遇到的坑:Text组件无法首行缩进两格