AXI muckbucket
Namespaces | Enumerations | Functions | Variables
axi_uvm_pkg.sv File Reference
#include "uvm_macros.svh"
#include "axi_seq_item.svh"
#include "memory.svh"
#include "axi_agent_config.svh"
#include "axi_sequencer.svh"
#include "axi_seq.svh"
#include "axi_responder_seq.svh"
#include "axi_sequential_writes_seq.svh"
#include "axi_pipelined_writes_seq.svh"
#include "axi_sequential_reads_seq.svh"
#include "axi_pipelined_reads_seq.svh"
#include "axi_driver.svh"
#include "axi_responder.svh"
#include "axi_monitor.svh"
#include "axi_scoreboard.svh"
#include "axi_coveragecollector.svh"
#include "axi_agent.svh"
#include "axi_env_config.svh"
#include "axi_env.svh"
#include "axi_base_test.svh"
#include "axi_sequential_writes_test.svh"
#include "axi_pipelined_writes_test.svh"
#include "axi_sequential_reads_test.svh"
#include "axi_pipelined_reads_test.svh"
Include dependency graph for axi_uvm_pkg.sv:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 axi_uvm_pkg
 Systemverilog package for AXI UVM environment.
 

Enumerations

enum  axi_protocol_version_t { e_AXI3 =0, e_AXI4 =1 }
 Version 3 or Version 4. More...
 
enum  cmd_t {
  e_WRITE = 0, e_READ = 1, e_READ_DATA = 2, e_WRITE_DATA,
  e_WRITE_RESPONSE, e_SETAWREADYTOGGLEPATTERN, e_SETWREADYTOGGLEPATTERN, e_SETARREADYTOGGLEPATTERN,
  e_SET_MIN_CLKS_BETWEEN_AW_TRANSFERS, e_SET_MAX_CLKS_BETWEEN_W_TRANSFERS
}
 Command type - what is the purpose of this packet? More...
 
enum  driver_type_t { e_DRIVER, e_RESPONDER }
 Config variable that tells axi_driver whether it is a master driver or slave driver(responder) More...
 

Functions

automatic void aw_from_class (ref axi_seq_item t, output axi_seq_item_aw_vector_s v)
 Pull values out of axi_seq_item and stuff into a axi_seq_item_aw_vector_s. More...
 
automatic void aw_to_class (ref axi_seq_item t, input axi_seq_item_aw_vector_s v)
 Pull values out of a axi_seq_item_aw_vector_s and stuffs them into an axi_seq_item. More...
 
automatic void b_from_class (input[ID_WIDTH-1:0] bid, input[2] bresp, output axi_seq_item_b_vector_s v)
 take values from write response channel and stuff into a axi_seq_item_b_vector_s More...
 
automatic void b_to_class (ref axi_seq_item t, input axi_seq_item_b_vector_s v)
 return values from a axi_seq_item_b_vector_s and return an axi_seq_item More...
 
automatic void ar_from_class (ref axi_seq_item t, output axi_seq_item_ar_vector_s v)
 take values from an axi_seq_item and stuff into a axi_seq_item_ar_vector_s More...
 
automatic void ar_to_class (ref axi_seq_item t, input axi_seq_item_ar_vector_s v)
 Pull values out of a axi_seq_item_ar_vector_s and stuffs them into an axi_seq_item. More...
 

Variables

localparam ADDR_WIDTH = params_pkg::AXI_ADDR_WIDTH
 
localparam ID_WIDTH = params_pkg::AXI_ID_WIDTH
 
localparam LEN_WIDTH = params_pkg::AXI_LEN_WIDTH
 

Enumeration Type Documentation

Version 3 or Version 4.

A few differences:

  • AXI4 has no WID
  • if burst_type=e_INCR, then AxLEN can be to 256[2**8], instead of just 16 [2**4]
Enumerator
e_AXI3 
e_AXI4 

Definition at line 52 of file axi_uvm_pkg.sv.

enum cmd_t

Command type - what is the purpose of this packet?

Enumerator
e_WRITE 

AXI Write - Driver handles

e_READ 

AXI Read - Driver handles

e_READ_DATA 

Read Data - Responder handles

e_WRITE_DATA 
e_WRITE_RESPONSE 
e_SETAWREADYTOGGLEPATTERN 

Set awready toggle pattern - responder handles

e_SETWREADYTOGGLEPATTERN 

Set wready toggle pattern - responder handles

e_SETARREADYTOGGLEPATTERN 

Set bready toggle pattern - driver handles

e_SET_MIN_CLKS_BETWEEN_AW_TRANSFERS 

Set minimum pause between aw xfers - Driver uses

e_SET_MAX_CLKS_BETWEEN_W_TRANSFERS 

Set maximum pause between aw xfers - Driver uses

Definition at line 57 of file axi_uvm_pkg.sv.

Config variable that tells axi_driver whether it is a master driver or slave driver(responder)

Todo:
: Split driver and responder into different components.
Enumerator
e_DRIVER 

Agent is a master

e_RESPONDER 

Agent is a slave/responder

Definition at line 77 of file axi_uvm_pkg.sv.

Function Documentation

automatic void ar_from_class ( ref axi_seq_item  t,
output axi_seq_item_ar_vector_s  v 
)

take values from an axi_seq_item and stuff into a axi_seq_item_ar_vector_s

This funcion returns a ready-to-be used struct so arlen and araddr are calcuated in this function.

Parameters
t- The axi_seq_item is passed by reference
Returns
v - packed struct of type axi_seq_item_ar_vector_s

Definition at line 193 of file axi_uvm_pkg.sv.

References axi_seq_item_ar_vector_s::araddr, axi_seq_item_ar_vector_s::arburst, axi_seq_item_ar_vector_s::arcache, axi_seq_item_ar_vector_s::arid, axi_seq_item_ar_vector_s::arlen, axi_seq_item_ar_vector_s::arlock, axi_seq_item_ar_vector_s::arprot, axi_seq_item_ar_vector_s::arqos, axi_seq_item_ar_vector_s::arsize, calculate_axlen(), and calculate_burst_aligned_address().

Referenced by axi_driver::read_address().

Here is the call graph for this function:

Here is the caller graph for this function:

automatic void ar_to_class ( ref axi_seq_item  t,
input axi_seq_item_ar_vector_s  v 
)

Pull values out of a axi_seq_item_ar_vector_s and stuffs them into an axi_seq_item.

t.len is converted from arlen into a byte len. It uses burst_size (bytes per beat) * beats_per_burst to give a maximum byte length.

Parameters
t- an axi_seq_item
Returns
v - a packed struct of type axi_seq_item_ar_vector_s

Definition at line 229 of file axi_uvm_pkg.sv.

References axi_seq_item_ar_vector_s::araddr, axi_seq_item_ar_vector_s::arburst, axi_seq_item_ar_vector_s::arcache, axi_seq_item_ar_vector_s::arid, axi_seq_item_ar_vector_s::arlen, axi_seq_item_ar_vector_s::arlock, axi_seq_item_ar_vector_s::arprot, axi_seq_item_ar_vector_s::arqos, and axi_seq_item_ar_vector_s::arsize.

Referenced by axi_monitor::read_address().

Here is the caller graph for this function:

automatic void aw_from_class ( ref axi_seq_item  t,
output axi_seq_item_aw_vector_s  v 
)

Pull values out of axi_seq_item and stuff into a axi_seq_item_aw_vector_s.

This funcion returns a ready-to-be used struct so awlen and awaddr are calcuated in this function.

Parameters
tan axi_seq_item
Returns
v a packed struct of type axi_seq_item_aw_vector_s

Definition at line 94 of file axi_uvm_pkg.sv.

References axi_seq_item_aw_vector_s::awaddr, axi_seq_item_aw_vector_s::awburst, axi_seq_item_aw_vector_s::awcache, axi_seq_item_aw_vector_s::awid, axi_seq_item_aw_vector_s::awlen, axi_seq_item_aw_vector_s::awlock, axi_seq_item_aw_vector_s::awprot, axi_seq_item_aw_vector_s::awqos, axi_seq_item_aw_vector_s::awsize, calculate_axlen(), and calculate_burst_aligned_address().

Referenced by axi_driver::write_address().

Here is the call graph for this function:

Here is the caller graph for this function:

automatic void aw_to_class ( ref axi_seq_item  t,
input axi_seq_item_aw_vector_s  v 
)

Pull values out of a axi_seq_item_aw_vector_s and stuffs them into an axi_seq_item.

t.len is converted from awlen into a byte len. It uses burst_size (bytes per beat) * beats_per_burst to give a maximum byte length.

Returns
t an axi_seq_item
Parameters
va packed struct of type axi_seq_item_aw_vector_s

Definition at line 125 of file axi_uvm_pkg.sv.

References axi_seq_item_aw_vector_s::awaddr, axi_seq_item_aw_vector_s::awburst, axi_seq_item_aw_vector_s::awcache, axi_seq_item_aw_vector_s::awid, axi_seq_item_aw_vector_s::awlen, axi_seq_item_aw_vector_s::awlock, axi_seq_item_aw_vector_s::awprot, axi_seq_item_aw_vector_s::awqos, and axi_seq_item_aw_vector_s::awsize.

Referenced by axi_monitor::write_address().

Here is the caller graph for this function:

automatic void b_from_class ( inputbid  [ID_WIDTH-1:0],
inputbresp  [2],
output axi_seq_item_b_vector_s  v 
)

take values from write response channel and stuff into a axi_seq_item_b_vector_s

Parameters
bid- Write Response ID tag
bresp- Write Response
Returns
v - packed struct of type axi_seq_item_b_vector_s

Definition at line 154 of file axi_uvm_pkg.sv.

References axi_seq_item_b_vector_s::bid, and axi_seq_item_b_vector_s::bresp.

automatic void b_to_class ( ref axi_seq_item  t,
input axi_seq_item_b_vector_s  v 
)

return values from a axi_seq_item_b_vector_s and return an axi_seq_item

Parameters
v- packed struct of type axi_seq_item_b_vector_s
Returns
t - an axi_seq_item

Definition at line 172 of file axi_uvm_pkg.sv.

References axi_seq_item_b_vector_s::bid, and axi_seq_item_b_vector_s::bresp.

Referenced by axi_monitor::write_response().

Here is the caller graph for this function:

Variable Documentation

localparam ADDR_WIDTH = params_pkg::AXI_ADDR_WIDTH
localparam ID_WIDTH = params_pkg::AXI_ID_WIDTH
localparam LEN_WIDTH = params_pkg::AXI_LEN_WIDTH