我有一个寄存器读取序列,如下所示:
extend vr_ad_sequence_kind: [READ_REG];
extend READ_REG vr_ad_sequence {
// register to read
reg_kind : vr_ad_reg_kind;
!reg : vr_ad_reg;
// more fields no longer shown here
body() @driver.clock is {
var reg_item : vr_ad_reg; // reg_item gets a value from a
// method that returns the correct
// register instance from the addr_map,
// which I no longer want to show here
reg = new vr_ad_reg with { .kind = reg_kind; };
read_reg { .static_item == reg_item; } reg;
};
};
现在,我有一个执行上述 vr_ad_sequence 的虚拟序列:
extend MAIN MAIN_TEST sample_vseq {
!reg_read : READ_REG vr_ad_sequence;
body() @driver.clock is first {
do reg_read keeping {
.driver == driver.reg_driver;
.reg_kind == MY_REGISTER;
};
// how to get the value of MY_REGISTER.MY_FIELD from
// the reg_read sequence above?
};
};
我的主要目标是读取特定寄存器位字段的值,即上面示例中的 MY_FIELD。有没有办法在不修改原始内容的情况下做到这一点READ_REG vr_ad_sequence
?如果无法帮助,我如何READ_REG vr_ad_sequence
将读取的值返回给调用sample_vseq
?
首先十分感谢。