当前位置:网站首页>UVM in UVM_ config_ Setting and obtaining DB non-linear
UVM in UVM_ config_ Setting and obtaining DB non-linear
2022-06-27 01:25:00 【Alfred. HOO】
In the figure 3-4 Shown UVM In the tree ,driver The path of is uvm_test_top.env.i_agt.drv. stay uvm_test_top,env perhaps i_agt in , Yes driver Some of the variables in
adopt config_db Set the mechanism , It is called the setting of straight line . But if in other component, Such as scoreboard in , Yes driver Some variables of use config_db Mechanism
Set it up , It is called non-linear setting .
stay my_driver Use in config_db::get Get any other component Set to my_driver Parameters of , It is called the acquisition of straight lines . If you want to be in other component, If in reference model Get other from component Set to my_driver The value of the parameter , It is called non-linear acquisition .
Set non-linear , It needs to be set carefully set The first and second arguments of the function . In the scoreboard Set in driver Medium pre_num For example :
file :src/ch3/section3.5/3.5.6/set/my_scoreboard.sv
18 function void my_scoreboard::build_phase(uvm_phase phase);
…
22 uvm_config_db#(int)::set(this.m_parent, "i_agt.drv", "pre_num", 200);
26 `uvm_info("my_scoreboard", "in my_scoreboard, uvm_test_top.env.i_agt.drv.pre_num is set to 200", UVM_LOW)
27 endfunction
perhaps :
function void my_scoreboard::build_phase(uvm_phase phase);
super.build_phase(phase);
uvm_config_db#(int)::set(uvm_root::get(), "uvm_test_top.env.i_agt.drv", "pre_num", 200);
endfunction
Either way , Has brought a new problem . stay UVM In the tree ,build_phase It's top-down , But for graphs 3-4 Shown UVM For trees ,scb And i_agt At the same level ,UVM The same level of build_phase Execution order of . So when my_driver When getting the parameter value ,my_scoreboard Of build_phase It may have been implemented , It may not be implemented . therefore , This non-linear setting , There will be some risks , This should be avoided .
For the acquisition of non-linear lines, only the first and second parameters need to be set . If you want to be in reference model In order to get driver Of pre_num Value :
file :src/ch3/section3.5/3.5.6/get/my_model.sv
21 function void my_model::build_phase(uvm_phase phase);
22 super.build_phase(phase);
23 port = new("port", this);
24 ap = new("ap", this);
25 `uvm_info("my_model", $sformatf("before get, the pre_num is %0d", drv_pre_num), UVM_LOW)
26 void'(uvm_config_db#(int)::get(this.m_parent, "i_agt.drv", "pre_num", drv_pre_num));
27 `uvm_info("my_model", $sformatf("after get, the pre_num is %0d", drv_pre_num), UVM_LOW)
28 endfunction
perhaps :
void'(uvm_config_db#(int)::get(uvm_root::get(), "uvm_test_top.env.i_agt.drv",
"pre_num", drv_pre_num));
Both of these methods can be set correctly pre_num Value .
The acquisition of non-linear lines can be avoided in some cases config_db::set Redundancy of . The above example is in reference model In order to get driver Of pre_num Value , If
Don't do this , The method of straight line acquisition , Then you need to pass in the test case cofig_db::set Give to separately reference model and driver Set up pre_num Value .
The same parameter value setting appears in two different statements , This greatly increases the likelihood of mistakes . therefore , The non-linear acquisition can be performed on multiple components in the verification platform
(UVM Tree nodes ) When the same parameter is required , Reduce config_db::set Redundancy of .
边栏推荐
- NOKOV动作捕捉系统使多场协同无人机自主建造成为可能
- 3-wire SPI screen driving mode
- Memcached foundation 3
- George Washington University: Hanhan Zhou | PAC: auxiliary value factor decomposition with counterfactual prediction in Multi-Agent Reinforcement Learning
- JSON parsing, esp32 easy access to time, temperature and weather
- 3线spi屏幕驱动方式
- Statistical Hypothesis Testing
- 疫情期间居家办公的总结体会 |社区征文
- 每日刷题记录 (五)
- XSS attack notes (Part 1)
猜你喜欢

markdown表格(合并)

架构实战营模块五作业

getReader() has already been called for this request

Unable to create a folder to save the sketch: MKDIR sketch

Modeling specifications: environment settings

Analysis of ideal L9 product power: the price is 459800 yuan, the four cylinder engine is adopted, and the endurance is 1315km

Solve the problem that stc8g1k08 program cannot run and port configuration

Generate flow chart with code, and how to use markdown

做了两天的唯美蝴蝶动画

微博评论高性能高可用架构
随机推荐
对象的访问机制及其他
【系统分析师之路】第六章 复盘需求工程(案例论文)
在连接数据库的时候遇到了点问题,请问怎么解决呀?
两个页面之间传参方法
JVM 的指针压缩
Central Limit Theorem
Unable to create a folder to save the sketch: MKDIR sketch
Clip: learning transferable visual models from natural language monitoring
Memcached foundation 5
Visual introduction to Matplotlib and plotnine
How to measure the thickness of glass substrate by spectral confocal
疫情期间居家办公的总结体会 |社区征文
BS-GX-016基于SSM实现教材管理系统
Kept to implement redis autofailover (redisha) 11
About Random Numbers
Kept to implement redis autofailover (redisha) 13
Modeling specifications: environment settings
Gaussian and Summary Stats
Kept to implement redis autofailover (redisha) 15
NOKOV动作捕捉系统使多场协同无人机自主建造成为可能