qwerty Posted July 22, 2014 Report Share Posted July 22, 2014 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) 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 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.