我有两个事件具有相同的采样事件@sim
:
unit monitor_a_u is {
sample_a : interface_port of tlm_analysis of data_item_s is instance;
data_a : simple_port of uint(bits:32) is instance;
keep data_a.hdl_path() == "<data_a's path>";
event signal_a_r is rise(signal_a$) @sim;
on signal_a_r {
var data_a : data_item_s = new;
data_a = data_a$;
sample_a$.write(data_a);
};
unit monitor_b_u is {
sample_b : interface_port of tlm_analysis of data_item_s is instance;
data_b : simple_port of uint(bits:32) is instance;
keep data_b.hdl_path() == "<data_b's path>";
event signal_b_f is fall(signal_b$) @sim;
on signal_b_f {
var data_b : data_item_s = new;
data_b = data_b$;
sample_b$.write(data_b);
};
当触发上述两个事件时,数据将被采样并通过记分板进行比较:
unit my_scbd_u like uvm_scoreboard {
scbd_port sample_a : add data_item_s;
scbd_port sample_b : match data_item_s;
sample_a_predict(item: data_item_s) is only {
add_to_scbd(item);
set_match_port(item, sample_b);
};
};
extend my_top_env {
my_scbd : my_scbd_u is instance;
mon_a : monitor_a_u is instance;
mon_b : monitor_b_u is instance;
connect_ports() is also {
mon_a.sample_a.connect(my_scbd.sample_a);
mon_b.sample_b.connect(my_scbd.sample_b);
};
};
现在在模拟器中(IES版本15),我想要采样的数据位于下面波形中的垂直光标处,值显示在“值”列中:
__
signal_a __________| |____________
__________ _______________
data_a ____0x1___X____0x0________
_____
signal_b _________| |___________
_______________ ___________
data_b _____0xA_______X___0xB_____
在signal_b下降时检测到数据不匹配,显示的消息类似于:"data_b (0xA) is not equal to data_a (0x0)"
。我希望错误报告为"data_b (**0xB**) is not equal to data_a (0x0)"
。
有人可以解释为什么记分牌看起来与波形上的数据有所不同吗?这可能是Specman中的delta延迟问题吗?
答案 0 :(得分:1)
记分板本身不对线路进行采样,只是添加通过端口传递给它的值。我想当写入port_b时,记分板得到了当前值(当时是A)。比较值时,写入port_a时 - 记分板与存储值(A)进行比较,而不是新值。
我看到了正确 - 值B(“添加”)在B之前更新(“匹配”)?如果是这样,我假设您正在使用delay_match_in_scbd()而不是match_in_scbd()。这意味着记分板存储值,并且在调用add()时进行比较。
您可以发出命令“trace scoreboard”以查看何时将项目写入记分板端口以及何时进行比较。