mbowler Posted November 30, 2011 Report Share Posted November 30, 2011 I have a register R with several fields, A and B. R is read-only and volatile as it is a status register. I am finding that a read of R does not seem to update the mirrored values of the fields. Is it supposed too? If not how do I get a single bus read transaction to update all the fields in a register. e.g. R.read(stat, rd_data) R.A.get(aval); R.B.get(bval); R.get(rval); With the above code, - rval and rd_data match and are as expected. - aval and bval contain the reset value. What am I doing wrong here? Thanks, Michael Quote Link to comment Share on other sites More sharing options...
bhunter1972 Posted November 30, 2011 Report Share Posted November 30, 2011 Try setting auto predict on the map that the register is reading through (the default map, since you didn't specify one): my_reg_block.my_map.set_auto_predict(1); Also, make sure that the status of the read was UVM_IS_OK. I think that will do it. Quote Link to comment Share on other sites More sharing options...
mbowler Posted November 30, 2011 Author Report Share Posted November 30, 2011 Ooops. My fault... my code should be: aval = R.A.get(); bval = R.B.get(); Sometimes I wish SV had stricter type checking. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.