Henry Posted April 23, 2020 Report Share Posted April 23, 2020 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. Quote Link to comment Share on other sites More sharing options...
Henry Posted April 23, 2020 Author Report Share Posted April 23, 2020 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? Quote Link to comment Share on other sites More sharing options...
chr_sue Posted April 23, 2020 Report Share Posted April 23, 2020 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. Quote Link to comment Share on other sites More sharing options...
Henry Posted April 24, 2020 Author Report Share Posted April 24, 2020 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? Quote Link to comment Share on other sites More sharing options...
Henry Posted July 13, 2020 Author Report Share Posted July 13, 2020 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.