I have part of a register that looks something like this
register CC {
field CSS @ [6:4] is write {
method write(uint64 value) {
if (CC.EN.val == 0b1) {
log spec_viol: "Command set selection should not " +
"occur when controller has been enabled.";
return;
}
default(value);
}
}
field EN @ [0];
}
How can I ensure that when CC.EN is set to 1 (for the first time) by setting the value of the register CC, that the spec-viol in CC.CSS does not occur?
I tried writing to the register for the first time and the spec-viol was triggered