Jump to content

Bit bashing through big endian 32-bit regmodel


Recommended Posts

Hi,

In `uvm-tests/tests/examples/simple/registers/models/aliasing/`, the register map has been set up using n_bytes = 4 and UVM_BIG_ENDIAN setting. In the test, a bit bashing sequence is is being run. Initially, the bit bashing sequence uses 64-bit data. Hence, the reg2bus function takes as input an object with a 64-bit data field and transforms it into a uvm_sequence_item with a 32-bit data field, to be executed on the bus.

Before the uvm_sequence_item is created, the bytes are reversed (because of UVM_BIG_ENDIAN) through lines 1823-1825 of `uvm_reg_map.svh`:

if ((rw_access.kind == UVM_WRITE) && (endian == UVM_BIG_ENDIAN)) begin
  { >> { rw_access.data }} = { << byte { rw_access.data}};
end
 

Due to this, the input data `'h0000000000000001` is translated into `'h0100000000000000`.

The issue is now that the reg2bus function simply ignores the 32 MSB, and therefore, a `0` is written every time.

Can someone from the UVM team confirm that this is correct? (but then, the bit bashing doesn't really make sense in this example)

Or, shouldn't we only reverse the bytes that fit in the bus width (e.g. the 4 LSB)?

Thanks!

--
Bas

Link to comment
Share on other sites

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.

×
×
  • Create New...