我有两个具有相同采样事件的事件@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 中的增量延迟问题吗?