Jump to content

[uvm_reg] issue detecting 'x' values on bus


Recommended Posts

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

Link to comment
Share on other sites

  • 3 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...