Jump to content

[uvm_reg] best effort front door access does not work?

Recommended Posts

Hi, exports,

uvm1.1 class reference illustrate the "best effort" access in uvm_reg filed write (front door).

If a front-door access is used, and if the field is the only field in a byte lane and if the

physical interface corresponding to the address map used to access the field support

byte-enabling, then only the field is written.

however, my test does not work. a 32-bit reg reg32 contains 4 fields byte0, byte1, byte2, byte3.

my code:

reg32_inst.byte0_inst.write(status, 0x88);

then the adaptor still recevie the below uvm_reg_bus_op

d= 0x0000_0088

nbits = 32

byte_enable = 0x1111 (expected to be 0x0001)

Any hint for debuging this? thank you very much!

Link to comment
Share on other sites

  • 3 months later...

After update to uvm 1.1a, This problem still persists in my case. perhaps some mistakes of mine, could anyone give me a hint? thanks!





regmodel.reg1.update(st); -> write 4 bytes



regmodel.reg1.update(st); -> still write 4 bytes // but half word access is expected.

Link to comment
Share on other sites

Thanks Amit!

with your suggestion to set supports_byte_enable =1, the following line could perform byte access.

regmodel.reg1_f1.write(st, 1); // nbits = 8, byte_en = 1

regmodel.reg1_f2.write(st, 1); // nbits = 8, byte_en = 2

regmodel.reg1_f3.write(st, 1); // nbits = 8, byte_en = 4

regmodel.reg1_f4.write(st, 1); // nbits = 8, byte_en = 8

Another question, any seggustion on how to perform the halfword access? thanks!

Link to comment
Share on other sites

Sean, If a field occupies 2 byte lanes, you can perform a halfword access through a fld.write()..

Otherwise, you will have to do a register.write()/update() but manually override the byte_enable property in the adapter.. for the adapter to understand when to override, it can query the extension argument.. see


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