当前位置:网站首页>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
边栏推荐
猜你喜欢

CH423要如何使用,便宜的国产IO扩展芯片

About Random Numbers

自定义MVC(导成jar包)+与三层架构的区别+反射+面试题

3線spi屏幕驅動方式

The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry

ML:机器学习工程化之团队十大角色背景、职责、产出物划分之详细攻略

Law of Large Numbers

Interface test framework practice (I) | requests and interface request construction

超越锂电池——未来电池的概念

C#程序结构预览最基础入门
随机推荐
These 10 copywriting artifacts help you speed up the code. Are you still worried that you can't write a copywriting for US media?
What are the skills and methods for slip ring installation
JSON解析,ESP32轻松获取时间气温和天气
寻找旋转排序数组中的最小值 II[经典抽象二分 + 如何破局左中右三者相等]
架构实战营模块五作业
Ml: a detailed introduction to the division of the top ten roles, backgrounds, responsibilities and outputs of the machine learning engineering team
Keepalived 实现 Redis AutoFailover (RedisHA)16
Gaussian and Summary Stats
Beyond lithium battery -- the concept of battery in the future
memcached基础7
getReader() has already been called for this request
USB协议中HID设备描述符以及键盘按键值对应编码表
Custom MVC (imported into jar package) + difference from three-tier architecture + reflection + interview questions
Amazon ElastiCache 飞速搭建缓存服务集群,这才叫快
Memcached foundation 1
Unable to create a folder to save the sketch: MKDIR sketch
memcached基础
Kept to implement redis autofailover (redisha) 14
ESP32实验-自建web服务器配网02
你的case真的pass了吗?