steve Posted August 22, 2011 Report Share Posted August 22, 2011 Hi all, I noticed the following limitation (bug?) when 'x' values are present in data read back via uvm_reg_sequence. The status returned by <reg>.read / read_reg() should be UVM_HAS_X if unknown bits are found in the return data. However, this never happens. The code which does the 'x' checking is in uvm_reg_map::do_bus_read() (uvm_reg_map lines 1940..1945) data = rw_access.data & ((1<<bus_width*8)-1); rw.status = rw_access.status; if (rw.status == UVM_IS_OK && (^data) === 1'bx) rw.status = UVM_HAS_X; The problem is that rw_access.data is of type uvm_reg_data_t (2-state data value), so the above code will never return UVM_HAS_X. The only workaround I can see is to hack uvm_reg_bus_op as it is a struct and not a factory-registered class. Has anyone else seen this one or implemented their own workaround? I consider checking for unknowns in register values to be particularly important. Regards, Steve Quote Link to comment Share on other sites More sharing options...
uwes Posted September 6, 2011 Report Share Posted September 6, 2011 hi, i think that code portion is a fallback (a field is X but the status is kep at UVM_IS_OK). what should be done is to set the status in the reg_adapter::bus2reg() appropriatly to UVM_HAS_X. 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.