APB UVM Agent  0.0.1
Public Member Functions | Public Attributes | List of all members
apb_agent_pkg::apb_driver Class Reference

Implements an APB bus master acting as the driver of an APB agent. More...

+ Inheritance diagram for apb_agent_pkg::apb_driver:
+ Collaboration diagram for apb_agent_pkg::apb_driver:

Public Member Functions

 uvm_component_utils (apb_driver) virtual apb_if APB
 Reference to the APB interface. More...
 
int sel_lookup (logic< 31:0 > address)
 Looks up the address and returns PSEL line that should be activated. More...
 
 new (string name="apb_driver", uvm_component parent=null)
 Conventional UVM component constructor. More...
 
task run_phase (uvm_phase phase)
 Forks off a forever loop in which the driver pulls transactions and drives them on the APB bus. More...
 
void build_phase (uvm_phase phase)
 Merely obtains the driver configuration from the UVM Configuration DB. More...
 

Public Attributes

apb_agent_config m_cfg
 Driver configuration. Normally this aliases with the parent agent configuration. More...
 

Detailed Description

Implements an APB bus master acting as the driver of an APB agent.

The driver receives transactions through a pull port, normally connected to the agent's sequencer. The transactions are translated into APB bus transactions.

This driver implementation supports only valid and properly framed bus transactions.

The driver supports multiple bus slaves. The number of slaves and their address map is controlled through an agent's configuration obtained from the UVM Configuration DB during the build phase.

Todo:
A more proper way to configure the driver is through a direct config object assignment, rather than through the UVM Config DB.

Definition at line 38 of file apb_agent_pkg.sv.

Member Function Documentation

◆ build_phase()

void apb_driver::build_phase ( uvm_phase  phase)

Merely obtains the driver configuration from the UVM Configuration DB.

Definition at line 127 of file apb_agent_pkg.sv.

◆ new()

apb_driver::new ( string  name = "apb_driver",
uvm_component  parent = null 
)

Conventional UVM component constructor.

Definition at line 81 of file apb_agent_pkg.sv.

◆ run_phase()

task apb_driver::run_phase ( uvm_phase  phase)

Forks off a forever loop in which the driver pulls transactions and drives them on the APB bus.

Definition at line 85 of file apb_agent_pkg.sv.

◆ sel_lookup()

int apb_driver::sel_lookup ( logic< 31:0 >  address)

Looks up the address and returns PSEL line that should be activated.

If the address is invalid, a non positive integer is returned to indicate an error.

Definition at line 133 of file apb_agent_pkg.sv.

◆ uvm_component_utils()

apb_agent_pkg::apb_driver::uvm_component_utils ( apb_driver  )

Reference to the APB interface.

The reference is obtained from the driver's configuration instance (and hence somewhat duplicates the information contained therein).

Member Data Documentation

◆ m_cfg

apb_agent_config apb_agent_pkg::apb_driver::m_cfg

Driver configuration. Normally this aliases with the parent agent configuration.

Definition at line 53 of file apb_agent_pkg.sv.


The documentation for this class was generated from the following file: