栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

scoreboard

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

scoreboard

task ue_scoreboard::run();
	super.run();
	fork
		while(1)begin
			exp_gp.get(tran_exp);
			act_gp.get(tran_act);
				if(tran_exp.no!=tran_act.no) 
					`uvm_info(get_type_name(), $sformatf("no is different,exp:%0d act:%0d",tran_exp.no,tran_act.no), UVM_LOW)
				else begin 
					if(tran_exp.rd_data==tran_act.rd_data) begin 
						success_num+=1;						
						if(show_info) begin 
							`uvm_info(get_type_name(), $sformatf("compare successfully scaler:%0d base_number:%0d rd_data:%0d",tran_act.rd_scaler,tran_act.base_number,tran_act.rd_data), UVM_LOW)
							tran_act.print_info(get_type_name());
						end
					end
					else begin 
						failure_num+=1;
						`uvm_error("SCORE_ERROR", $sformatf("compare failed,scaler:%0d,base_number:%0d,exp_res:%0d,act_res:%0d",tran_exp.rd_scaler,tran_exp.base_number,tran_exp.rd_data,tran_act.rd_data))
					end
				end
		end
	join

endtask

这段直接偷懒了。比较两个fifo中transaction的序号和值是否相同。

        这个项目用的范式多为extern function build/connect/run/report,与uvm phase 相对应。driver向sqr发起请求,sqr传递transaction给driver,根据transaction的类型driver进行解析并传给DUT,同时i_agt的monitor监测输入数据并放入fifo;DUT进行预期功能并输出,同时o_agt的monitor监测输出数据放入act fifo。另一方面,reference model从fifo中取出i_agt.monitor中放入的数据,调用C++库函数进行计算,将新生成的transaction copy并传给ex fifo。scoreboard分别从act fifo和ex fifo中取出两个transaction进行对比,并输出打印信息。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/864340.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号