UVM Register Environment

This environment is a template for other register test enviornments or may be used as-is.

Summary
UVM Register Environment
This environment is a template for other register test enviornments or may be used as-is.

uvm_register_env

An environment that can be used for automated register testing.

It contains a driver, sequencer, bus_driver, monitor and scoreboard.

Once things are built and connected, this env uses the factory to find sequences to run.

Summary
uvm_register_env
An environment that can be used for automated register testing.
Class Hierarchy
uvm_env
uvm_register_env
Class Declaration
class uvm_register_env extends uvm_env
Ports
bus_transport_portThe “downstream” side of the env.
bus_rsp_analysis_exportPublishes the register monitor analysis export.
Variables
m_sequencerThe sequencer contained in the env.
m_driverThe driver contained in the env.
m_bus_driverThe bus_driver contained in the env.
m_register_monitorThe register monitor contained in the env.
m_register_mapConvenient place to house the register map for users of this env to reference.
Methods
new()Construct this object.
build()Build the components and ports.
connect()Connect the upstream side of the driver to the sequencer.
run()1) Find a sequence to run.

bus_transport_port

The “downstream” side of the env.  The register driver transport_port is connected here.

bus_rsp_analysis_export

Publishes the register monitor analysis export.  This is an “input”.  Register transaction responses should come back here to be processed by the uvm_register_monitor (built-in scoreboard).

m_sequencer

uvm_register_sequencer #(uvm_register_transaction,
uvm_register_transaction) m_sequencer

The sequencer contained in the env.

m_driver

uvm_register_driver #(uvm_register_transaction,
uvm_register_transaction) m_driver

The driver contained in the env.

m_bus_driver

uvm_register_bus_driver #(uvm_register_transaction,
uvm_register_transaction) m_bus_driver

The bus_driver contained in the env.

m_register_monitor

uvm_register_monitor #(uvm_register_transaction) m_register_monitor

The register monitor contained in the env.  Used to scoreboard register transactions.

m_register_map

uvm_register_map m_register_map

Convenient place to house the register map for users of this env to reference.  This is the register map being exercised.

new()

function new(string name,  
uvm_component parent =  null)

Construct this object.

build()

function void build()

Build the components and ports.  Setup the default configurations.

connect()

function void connect()

Connect the upstream side of the driver to the sequencer.  Connect the bus_driver “downstream” side to the bus_transport_port.  Connect the bus monitor analysis port (the output side) to the register monitor (scoreboard).

run()

task run()

1) Find a sequence to run.  Either by name or by type.  2) Run it. ie. m_sequence.start(m_sequencer);

class uvm_register_env extends uvm_env
An environment that can be used for automated register testing.
uvm_register_sequencer #(uvm_register_transaction,
uvm_register_transaction) m_sequencer
The sequencer contained in the env.
uvm_register_driver #(uvm_register_transaction,
uvm_register_transaction) m_driver
The driver contained in the env.
uvm_register_bus_driver #(uvm_register_transaction,
uvm_register_transaction) m_bus_driver
The bus_driver contained in the env.
uvm_register_monitor #(uvm_register_transaction) m_register_monitor
The register monitor contained in the env.
uvm_register_map m_register_map
Convenient place to house the register map for users of this env to reference.
function new(string name,  
uvm_component parent =  null)
Construct this object.
function void build()
Build the components and ports.
function void connect()
Connect the upstream side of the driver to the sequencer.
task run()
1) Find a sequence to run.