Jump to content

RAL Backdoor write


Recommended Posts

Hi ,

We are trying to do backdoor one of the register in our RAL and set hdl path using add_hdl_path_slice fucntion. 

Will take similar example here. say we have 32 bit REG1. REG1 has two fields F1 and F2 each of 16 bits. 

We have set below HDL path :

REG1.add_hdl_path_slice("IP.REG.regout", 0,16);

REG1.add_hdl_path_slice("IP.REG.regout", 16,16);


When we write through REG1.poke and read back , we see only value deposited by last slice. If we deposit value 0x12345678, while reading back , it returns value 0x1234 only. Looks like it overrides value written by previous slice.

Question is  it necessary to provide bit range in first argument of add_hdl_path_slice ?  Or UVM will take care of that ? 

If we set below path as add_hdl_path_slice , then it works fine and returns correct value 0x12345678.

REG1.add_hdl_path_slice("IP.REG.regout[15:0]", 0,16);

REG1.add_hdl_path_slice("IP.REG.regout[31:16]", 16,16);


Link to comment
Share on other sites

I believe the UVM intent of 


REG1.add_hdl_path_slice("IP.REG.regout", 16,16);

is to associate the (whole) signal "IP.REG.regout" with the 16 bits starting at offset 16 of the data in the reg model.  The start and offset do not affect the signal, and so you do need to provide the bit range as you show to associate a slice of the signal with a slice of the internal data.  I agree the documentation does not make that clear, and I have filed a Mantis to improve that documentation.

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.

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...