I have a register read sequence that goes something like this:
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;
};
};
Now, I have a virtual sequence that does the vr_ad_sequence above:
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 main objective is to read the value of a specific register bit field which is MY_FIELD in the above example. Is there a way to do it without modifying anything in the original READ_REG vr_ad_sequence
? If it can't be helped, how do I make the READ_REG vr_ad_sequence
return the read value to the calling sample_vseq
?
Thanks very much in advance.