UVM Register Agent

This collection of classes provides drivers, monitors and sqeuencers for the UVM Register Package.

Summary
UVM Register Agent
This collection of classes provides drivers, monitors and sqeuencers for the UVM Register Package.

uvm_register_driver

A driver which expects to be connected to a sequencer.  The requests are sent out the transport_port to a downstream TLM based cloud.  The cloud returns a response sometime later.  This class acts as a forwarding object.  It communicates with an uvm_sequencer to get requests and send responses, and it communicates with a request/response port to send requests and recieve responses.

Summary
uvm_register_driver
A driver which expects to be connected to a sequencer.
Class Hierarchy
uvm_driver#(REQ,RSP)
uvm_register_driver
Class Declaration
class uvm_register_driver #(
   type REQ =  uvm_register_transaction,
   type RSP =  uvm_register_transaction
) extends uvm_driver #(REQ, RSP)
Ports
transport_portThis is the “downstream” connection for this register driver.
Methods
new()Construct the register driver and the transport_port.
run()This is a standard uvm_driver, and uses get() and rsp_port.write() to communicate with the sequencer.

transport_port

This is the “downstream” connection for this register driver.  A REQ is sent down the transport_port, and a RSP is returned.  By default, both REQ and RSP are ‘uvm_register_transactions’.

new()

function new(string name,  
uvm_component parent =  null)

Construct the register driver and the transport_port.

run()

task run()

This is a standard uvm_driver, and uses get() and rsp_port.write() to communicate with the sequencer.

uvm_register_sequencer

A sequencer to use with an uvm_register_driver.  It contains a register_map (since the sequences are going to need a register_map, but it is more convenient to host the register map in an uvm_component based system, than an uvm_transaction based system).

Summary
uvm_register_sequencer
A sequencer to use with an uvm_register_driver.
Class Hierarchy
uvm_sequencer#(REQ,RSP)
uvm_register_sequencer
Class Declaration
class uvm_register_sequencer #(
   type REQ =  uvm_register_transaction,
   type RSP =  uvm_register_transaction
) extends uvm_sequencer #(REQ, RSP)
Variables
register_mapCan be used by sequences to find out what registers are available.
Methods
new()Construct this register sequencer.
build()Lookup the register map that may have been previously registered.

register_map

uvm_register_map register_map

Can be used by sequences to find out what registers are available.

new()

function new(string name,  
uvm_component parent =  null)

Construct this register sequencer.

build()

function void build()

Lookup the register map that may have been previously registered.  This lookup is a convenience function for the user of this class.

uvm_register_bus_monitor

A monitor which expects to monitor bus transactions

It uses a register_map to re-convert the bus transaction into a register transaction.  Then it publishes the register transaction to any connected subscribers.

Summary
uvm_register_bus_monitor
A monitor which expects to monitor bus transactions
Class Hierarchy
uvm_subscriber#(T)
uvm_register_bus_monitor
Class Declaration
class uvm_register_bus_monitor #(
   type T =  bus_transaction
) extends uvm_subscriber#(T)
Ports
apOutput port which publishes register transactions.
Variables
register_mapThe register map that lookups will occur in.
Methods
new()Construct this register bus monitor and the analysis port.
build()Lookup the register map that may have been previously registered.
write()This routine is called when something is published.

ap

Output port which publishes register transactions.

register_map

uvm_register_map register_map

The register map that lookups will occur in.

new()

function new(string name,  
uvm_component parent =  null)

Construct this register bus monitor and the analysis port.

build()

function void build()

Lookup the register map that may have been previously registered.  This lookup is a convenience function for the user of this class.

write()

function void write(t)

This routine is called when something is published.  This function is called from a bus monitor - so a bus transaction has been seen, and will be passed in as argument ‘t’.  This write() function then converts the bus transaction into a register transaction using the register map available.

uvm_register_bus_driver

This is not a real bus_driver; it is not meant to be used as part of a sequencer/sequence/driver triumvirate.  It is simply a convenience class to generate bus transactions instead of register transactions.

This driver does a get() on a register request channel (fifo).  It converts the register transaction into a bus transaction and sends it downstream to a bus transaction based cloud.

Summary
uvm_register_bus_driver
This is not a real bus_driver; it is not meant to be used as part of a sequencer/sequence/driver triumvirate.
Class Hierarchy
uvm_component
uvm_register_bus_driver
Class Declaration
class uvm_register_bus_driver #(
   type REQ =  uvm_register_transaction,
   type RSP =  uvm_register_transaction
) extends uvm_component
Variables
channelThe channel is used to
Ports
transport_exportThis export is connected to the channel, and is available for others outside to connect to.
transport_portBus request transactions are generated and sent down this transport_port.
Variables
register_mapThe register map that will be used for address lookup.
Methods
new()Construct this register bus driver, the internal channel, and the port connections.
connect()Connect the channel transport_export connection (an internal connection).
build()Lookup the register map that may have been previously registered.
run()Do a “get()” to get a register request transaction from the channel.

channel

uvm_tlm_transport_channel #(REQ,
RSP) channel

The channel is used to

transport_export

This export is connected to the channel, and is available for others outside to connect to.

transport_port

Bus request transactions are generated and sent down this transport_port.  Bus response transactions are received back on this transport_port.  This is the “downstream” connection.

register_map

uvm_register_map register_map

The register map that will be used for address lookup.

new()

function new(string name,  
uvm_component parent =  null)

Construct this register bus driver, the internal channel, and the port connections.

connect()

function void connect()

Connect the channel transport_export connection (an internal connection).

build()

function void build()

Lookup the register map that may have been previously registered.  This lookup is a convenience function for the user of this class.

run()

task run()

Do a “get()” to get a register request transaction from the channel.  Create a bus transaction and send it down the transport_port.  Receive a response on the transport_port, create the register response transaction and send it back to the channel using put().

uvm_register_monitor

A component which expects to be sent relevant register transactions.

Summary
uvm_register_monitor
A component which expects to be sent relevant register transactions.
Class Hierarchy
uvm_subscriber#(T)
uvm_register_monitor
Class Declaration
class uvm_register_monitor #(
   type T =  int
) extends uvm_subscriber#(T)
Variables
register_mapThe register map that will be used for name lookup.
Methods
new()Construct the register scoreboard.
build()Lookup the register map that may have been previously registered.
write()Receive a register transaction, and use the current register map to do shadow checking.

register_map

uvm_register_map register_map

The register map that will be used for name lookup.

new()

function new(string name,  
uvm_component parent =  null)

Construct the register scoreboard.

build()

function void build()

Lookup the register map that may have been previously registered.  This lookup is a convenience function for the user of this class.

write()

function void write(t)

Receive a register transaction, and use the current register map to do shadow checking.  (bus_read32() and bus_write32()).  Note - Usually T is uvm_register_transaction.

class uvm_register_driver #(
   type REQ =  uvm_register_transaction,
   type RSP =  uvm_register_transaction
) extends uvm_driver #(REQ, RSP)
A driver which expects to be connected to a sequencer.
function new(string name,  
uvm_component parent =  null)
Construct the register driver and the transport_port.
task run()
This is a standard uvm_driver, and uses get() and rsp_port.write() to communicate with the sequencer.
class uvm_register_sequencer #(
   type REQ =  uvm_register_transaction,
   type RSP =  uvm_register_transaction
) extends uvm_sequencer #(REQ, RSP)
A sequencer to use with an uvm_register_driver.
uvm_register_map register_map
Can be used by sequences to find out what registers are available.
function new(string name,  
uvm_component parent =  null)
Construct this register sequencer.
function void build()
Lookup the register map that may have been previously registered.
class uvm_register_bus_monitor #(
   type T =  bus_transaction
) extends uvm_subscriber#(T)
A monitor which expects to monitor bus transactions
uvm_register_map register_map
The register map that lookups will occur in.
function new(string name,  
uvm_component parent =  null)
Construct this register bus monitor and the analysis port.
function void build()
Lookup the register map that may have been previously registered.
function void write(t)
This routine is called when something is published.
class uvm_register_bus_driver #(
   type REQ =  uvm_register_transaction,
   type RSP =  uvm_register_transaction
) extends uvm_component
This is not a real bus_driver; it is not meant to be used as part of a sequencer/sequence/driver triumvirate.
uvm_tlm_transport_channel #(REQ,
RSP) channel
The channel is used to
uvm_register_map register_map
The register map that will be used for address lookup.
function new(string name,  
uvm_component parent =  null)
Construct this register bus driver, the internal channel, and the port connections.
function void connect()
Connect the channel transport_export connection (an internal connection).
function void build()
Lookup the register map that may have been previously registered.
task run()
Do a “get()” to get a register request transaction from the channel.
class uvm_register_monitor #(type T =  int) extends uvm_subscriber#(T)
A component which expects to be sent relevant register transactions.
uvm_register_map register_map
The register map that will be used for name lookup.
function new(string name,  
uvm_component parent =  null)
Construct the register scoreboard.
function void build()
Lookup the register map that may have been previously registered.
function void write(t)
Receive a register transaction, and use the current register map to do shadow checking.