当前位置:网站首页>Reporting Classes中uvm_report_server的get_severity_count和get_server用法
Reporting Classes中uvm_report_server的get_severity_count和get_server用法
2022-06-27 00:46:00 【Alfred.HOO】
uvm_report_server.
Uvm_report_server是一个全局服务器,它处理由uvm_report_handler生成的所有报告。
uvm_report_server是一个抽象类,它将其许多方法声明为纯虚方法。UVM使用uvm_default_report_server类作为其默认的报表服务器实现。
方法
get_severity_count — 返回已传递的具有严重性的消息的数量
get_server — 获得用于报表的全局报表服务器。
get_severity_count
pure virtual function int get_severity_count(
uvm_severity severity
)
返回已传递的具有严重性的消息的数量。
get_serverstatic function uvm_report_server get_server()
获取用于报表的全局报表服务器。
此方法作为通过uvm_coreservice_t::get_report_server方法检索报表服务器的方便包装器提供。
//使用uvm_coreservice_t:
uvm_coreservice_t cs;
uvm_report_server rs;
cs = uvm_coreservice_t::get();
rs = cs.get_report_server();
//不使用uvm_coreservice_t:
uvm_report_server rs;
rs = uvm_report_server::get_server();
例子:
function void final_phase(uvm_phase phase);
uvm_report_server m_server = uvm_report_server::get_server();
super.final_phase(phase);
if(m_server.get_serverity_count(UVM_FATAL)||(m_server.get_serverity_count(UVM_ERROR))
$display("CASE FAILED");
else
$display("CASE PASS");
endfunction
或者
virtual function void check_phase(uvm_phase phase);
var uvm_report_server svr = get_report_server();
super.check_phase(phase);
if(svr.get_severity_count(UVM_ERROR) == 0 && svr.get_severity_count(UVM_FATAL) == 0) begin
`uvm_info(tID, `REPORT_PASS_STRING, UVm_NONE);
else
`uvm_info(tID, `REPORT_FATAL_STRING, UVM_NONE);
end
endfunction
边栏推荐
- Generate flow chart with code, and how to use markdown
- buuctf-pwn write-ups (6)
- CH423要如何使用,便宜的国产IO扩展芯片
- How to convert an old keyboard into a USB keyboard and program it yourself?
- Central Limit Theorem
- memcached基础3
- Memcached foundation 5
- Gaussian and Summary Stats
- One click acceleration of Sony camera SD card file copy operation, file operation batch processing tutorial
- Analysis of ideal L9 product power: the price is 459800 yuan, the four cylinder engine is adopted, and the endurance is 1315km
猜你喜欢
随机推荐
Kept to implement redis autofailover (redisha) 15
3 - wire SPI Screen Drive
Kept to implement redis autofailover (redisha) 13
Solve the problem that stc8g1k08 program cannot run and port configuration
Gaussian and Summary Stats
史上最难618,TCL夺得电视行业京东和天猫份额双第一
Keepalived 实现 Redis AutoFailover (RedisHA)13
buuctf-pwn write-ups (6)
IIS deploy static web site and FTP service
Esp32 experiment - self built web server distribution network 02
CLIP:从自然语言监督中学习可迁移的视觉模型
Kept to implement redis autofailover (redisha) 14
Structure the fifth operation of the actual camp module
About Random Numbers
Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
Memcached foundation 1
memcached基础1
解决unable to create a folder to save the sketch: mkdir sketch
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
Law of Large Numbers








