User-defined Back-door Access
If DPI-based back-door access doesn’t meet your needs, you can create a custom back-door access method. This lets you use any SystemVerilog constructs or tool-specific utilities to access registers and memories.
For example, if a memory or register is inside an encrypted model, a custom back-door method can use an appropriate API to directly peek or poke values into the encrypted model.
A user-defined back-door for registers is created by extending the uvm_reg_backdoor
class.
- The back-door write operation is implemented in the
uvm_reg_backdoor::write()
method. - The back-door read operation is implemented in the
uvm_reg_backdoor::read()
method.
This custom back-door is linked to:
- A specific register using the
uvm_reg::set_backdoor()
method. - All registers in a block using the
uvm_reg_block::set_backdoor()
method.
Similarly, a user-defined back-door for memories is created by extending the uvm_mem_backdoor
class.
- The write operation is implemented in the
uvm_mem_backdoor::write()
method. - The read operation is implemented in the
uvm_mem_backdoor::read()
method.
This custom back-door is linked to a specific memory using the uvm_mem::set_backdoor()
method.
How It Works:
- Automatic Association:
Register model generators can define these back-doors. During thebuild()
method of the register model, they are automatically associated with the corresponding blocks, registers, or memories. - Manual Association:
You can also associate a user-defined back-door later, during the environment’sbuild()
method. This will override any default back-door mechanisms that were previously defined.