# UVM HDL Backdoor Access support routines.

These routines provide an interface to the DPI/PLI implementation of backdoor access used by registers.

If you DON’T want to use the DPI HDL API, then compile your SystemVerilog code with the vlog switch

>     vlog ... +define+UVM_HDL_NO_DPI ...

Summary

UVM HDL Backdoor Access support routines.
These routines provide an interface to the DPI/PLI implementation of backdoor access used by registers.
Variables |
UVM_HDL_MAX_WIDTH | Sets the maximum size bit vector for backdoor access.
Methods |
uvm_hdl_check_path | Checks that the given HDL path exists.
uvm_hdl_deposit | Sets the given HDL path to the specified value.
uvm_hdl_force | Forces the value on the given path.
uvm_hdl_force_time | Forces the value on the given path for the specified amount of force_time.
uvm_hdl_release_and_read | Releases a value previously set with uvm_hdl_force.
uvm_hdl_release | Releases a value previously set with uvm_hdl_force.
uvm_hdl_read() | Gets the value at the given path.

### Variables

### UVM_HDL_MAX_WIDTH

> parameter int UVM_HDL_MAX_WIDTH = `UVM_HDL_MAX_WIDTH

Sets the maximum size bit vector for backdoor access. This parameter will be looked up by the DPI-C code using: vpi_handle_by_name( “uvm_pkg::UVM_HDL_MAX_WIDTH”, 0);

### Methods

### uvm_hdl_check_path

> import "DPI-C" context function int uvm_hdl_check_path(
> | string | path
> )

Checks that the given HDL path exists. Returns 0 if NOT found, 1 otherwise.

### uvm_hdl_deposit

> import "DPI-C" context function int uvm_hdl_deposit(
> | string | path,
> | uvm_hdl_data_t | value
> )

Sets the given HDL path to the specified value. Returns 1 if the call succeeded, 0 otherwise.

### uvm_hdl_force

> import "DPI-C" context function int uvm_hdl_force(
> | string | path,
> | uvm_hdl_data_t | value
> )

Forces the value on the given path. Returns 1 if the call succeeded, 0 otherwise.

### uvm_hdl_force_time

> task uvm_hdl_force_time(
> | string | path, |  |
> | uvm_hdl_data_t | value, |  |
> | time | force_time | = | 0
> )

Forces the value on the given path for the specified amount of force_time. If force_time is 0, uvm_hdl_deposit is called. Returns 1 if the call succeeded, 0 otherwise.

### uvm_hdl_release_and_read

> import "DPI-C" context function int uvm_hdl_release_and_read(
> |  | string | path,
> | inout | uvm_hdl_data_t | value
> )

Releases a value previously set with uvm_hdl_force. Returns 1 if the call succeeded, 0 otherwise. value is set to the HDL value after the release. For ‘reg’, the value will still be the forced value until it has been procedurally reassigned. For ‘wire’, the value will change immediately to the resolved value of its continuous drivers, if any. If none, its value remains as forced until the next direct assignment.

### uvm_hdl_release

> import "DPI-C" context function int uvm_hdl_release(
> | string | path
> )

Releases a value previously set with uvm_hdl_force. Returns 1 if the call succeeded, 0 otherwise.

### uvm_hdl_read()

> import "DPI-C" context function int uvm_hdl_read(
> |  | string | path,
> | output | uvm_hdl_data_t | value
> )

Gets the value at the given path. Returns 1 if the call succeeded, 0 otherwise.

> parameter int UVM_HDL_MAX_WIDTH = `UVM_HDL_MAX_WIDTH

Sets the maximum size bit vector for backdoor access.

> import "DPI-C" context function int uvm_hdl_check_path(
> | string | path
> )

Checks that the given HDL path exists.

> import "DPI-C" context function int uvm_hdl_deposit(
> | string | path,
> | uvm_hdl_data_t | value
> )

Sets the given HDL path to the specified value.

> import "DPI-C" context function int uvm_hdl_force(
> | string | path,
> | uvm_hdl_data_t | value
> )

Forces the value on the given path.

> task uvm_hdl_force_time(
> | string | path, |  |
> | uvm_hdl_data_t | value, |  |
> | time | force_time | = | 0
> )

Forces the value on the given path for the specified amount of force_time.

> import "DPI-C" context function int uvm_hdl_release_and_read(
> |  | string | path,
> | inout | uvm_hdl_data_t | value
> )

Releases a value previously set with uvm_hdl_force.

> import "DPI-C" context function int uvm_hdl_release(
> | string | path
> )

Releases a value previously set with uvm_hdl_force.

> import "DPI-C" context function int uvm_hdl_read(
> |  | string | path,
> | output | uvm_hdl_data_t | value
> )

Gets the value at the given path.