Hi,
I have a 32 bit register in which some of the bits are reserved. I have added the mask in the register model. But the reserved bits are also read/writable.
I only wont to write to the bits which are not reserved.
foreach (rg[i]) begin
foreach (fields[j]) begin
if (fields[j].get_name() == "UNUSED" ) begin
$display("UNUSED field= %s",fields[j].get_name());
end
else begin
fields[j].write(status, wdata,.parent(this));
end
end
I tried the obove solution, but it writes for every field which is slowing me down.
Is their a way i can get the mask from the register model? Or any other solution?
Thanks