Jump to content
Sign in to follow this  
Henry

Explicit Prediction of Unmapped Registers

Recommended Posts

Hello everyone,

I have a register model that contains one or more unmapped registers. These registers are accessed through a user-defined frontdoor.

More over, in my environment, I am using explicit prediction to keep my register model updated. My problem is the following:

For registers that are mapped into memory, I see that they are updated after bus2reg is called.

But for registers that are not mapped into memory, I see that they are not being updated even though bus2reg is called.

I get the following message:

Observed transaction does not target a register

How can I updated the register model value when calling bus2reg without any address?

Thanks in advance. 

Share this post


Link to post
Share on other sites

I found out that the uvm_reg_predictor class only updates the register based on the bus address, as described below.

Updates the register model mirror based on observed bus transactions   

This class converts observed bus transactions of type ~BUSTYPE~ to generic
registers transactions, determines the register being accessed based on the
bus address, then updates the register's mirror value with the observed bus
data, subject to the register's access mode. See <uvm_reg::predict> for details.

Memories can be large, so their accesses are not predicted.

Is there any way to update the register based on just the transaction content, since for unmapped registers there is no address?

Share this post


Link to post
Share on other sites

I believe the problem comes from here.

The UVM Reference Manual says:

If unmapped is True, the register does not occupy any physical addresses and the base address is ignored.
Unmapped registers require a user-defined front door to be specified. The default value of unmapped shall
be 0, which is FALSE.

Because there is no physical address for this type of registers it will  not be updated.

Share this post


Link to post
Share on other sites

Exactly!

I defined a frontdoor and set it to the unmapped register, so now I can call write/read reg. The frontdoor acts as a reg2bus function.

However, it doesn't work as a bus2reg, so the mirrored value in my register model is never updated by the predictor.

I wonder if there is a workaround for this. Any ideas? 

Share this post


Link to post
Share on other sites
On 4/24/2020 at 3:17 AM, chr_sue said:

I believe the problem comes from here.

The UVM Reference Manual says:

If unmapped is True, the register does not occupy any physical addresses and the base address is ignored.
Unmapped registers require a user-defined front door to be specified. The default value of unmapped shall
be 0, which is FALSE.

Because there is no physical address for this type of registers it will  not be updated.

I was reading Accellera's "uvm_users_guide_1.2" and found this:

5.7.2.2 Mirroring Unmapped Registers
When using explicit or passive monitoring to update the mirror value in unmapped registers, it will be
necessary to override the uvm_reg::predict() method of the register(s) used to access the unmapped
registers, since the observed transactions will be using the address of those access registers, not the
unmapped (unaddressable) registers that are ultimately accessed.

So I think if I am able to override the predict method of my unmapped registers, then I will be able to mirror their values correctly. However, I don't know how to override the predict method of a register. Could anyone teach me how? Thanks!

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...