AXI muckbucket
Public Member Functions | Public Attributes | List of all members
axi_seq_item Class Reference

contains all data and functions related to axi and usage More...

Inheritance diagram for axi_seq_item:
Inheritance graph
[legend]
Collaboration diagram for axi_seq_item:
Collaboration graph
[legend]

Public Member Functions

 uvm_object_utils (axi_seq_item) rand axi_protocol_version_t protocol
 
constraint protocol_c ()
 
constraint burst_type_c ()
 
constraint addr_c ()
 
constraint burst_size_c ()
 
constraint max_len ()
 
 new (string name="axi_seq_item")
 Constructor. More...
 
string convert2string ()
 Convert item's variable into one printable string. More...
 
void do_copy (uvm_object rhs)
 Deep copy. More...
 
bit do_compare (uvm_object rhs, uvm_comparer comparer)
 Deep compare. More...
 
void do_print (uvm_printer printer)
 prints out immediate object, but no parents' stuff. More...
 
void pre_randomize ()
 
void post_randomize ()
 Tweak things after randomization. More...
 
void get_beat_N_data (input int beat_cnt, input int data_bus_bytes, ref bit< 7:0 > data[], ref bit wstrb[], output bit wlast)
 return beat values for write data and read data channels More...
 

Public Attributes

rand bit< ADDR_WIDTH-1:0 > addr
 
rand bit< 7:0 > data []
 
rand int len
 
rand bit< ID_WIDTH-1:0 > id
 
rand logic< 2:0 > burst_size
 
rand logic< 1:0 > burst_type
 
rand bit valid []
 
rand bit wstrb []
 
rand bit wlast []
 
bit< LEN_WIDTH-1:0 > axlen
 
logic< 0:0 > lock = 0x0
 
logic< 3:0 > cache = 0x0
 
logic< 2:0 > prot = 0x0
 
logic< 3:0 > qos = 0x0
 
logic< ID_WIDTH-1:0 > bid = 0xF
 
logic< 1:0 > bresp = 0x3
 
rand cmd_t cmd
 
rand logic< 31:0 > toggle_pattern = 0xFFFF_FFFF
 
const shortint c_AXI3_MAXBEATCNT =16
 
const shortint c_AXI4_MAXBEATCNT =256
 

Detailed Description

contains all data and functions related to axi and usage

In addition to variables like addr,len, id, this alsocontains functions that could be moved into axi_uvm_pkg to save object space. Things like calculating aligned_address from address.

Todo:
: this seq_item is laughably large. Don't judge me, I've seen your 'temporary' code too. ;)

Definition at line 34 of file axi_seq_item.svh.

Member Function Documentation

constraint axi_seq_item::addr_c ( )
inline
constraint axi_seq_item::burst_size_c ( )
inline

Definition at line 142 of file axi_seq_item.svh.

References len.

constraint axi_seq_item::burst_type_c ( )
inline

Definition at line 102 of file axi_seq_item.svh.

References addr, and e_RESERVED.

string axi_seq_item::convert2string ( )
bit axi_seq_item::do_compare ( uvm_object  rhs,
uvm_comparer  comparer 
)

Deep compare.

Compare everything

Todo:
: This function needs some attention.

Definition at line 369 of file axi_seq_item.svh.

References addr, data, id, and len.

Referenced by max_len().

Here is the caller graph for this function:

void axi_seq_item::do_copy ( uvm_object  rhs)

Deep copy.

Deep copy everything

Definition at line 334 of file axi_seq_item.svh.

References addr, bid, bresp, burst_size, burst_type, cache, cmd, data, id, len, lock, prot, qos, valid, wlast, and wstrb.

Referenced by max_len().

Here is the caller graph for this function:

void axi_seq_item::do_print ( uvm_printer  printer)

prints out immediate object, but no parents' stuff.

Definition at line 392 of file axi_seq_item.svh.

References convert2string().

Referenced by max_len().

Here is the call graph for this function:

Here is the caller graph for this function:

void axi_seq_item::get_beat_N_data ( input int  beat_cnt,
input int  data_bus_bytes,
ref bit< 7:0 >  data[],
ref bit  wstrb[],
output bit  wlast 
)

return beat values for write data and read data channels

given the beat number and how wide the bus is, return field values that can be placed directly on the bus.

Parameters
beat_cntwhich beat inthe burst, starting at 0.
data_bus_bytes- how wide is the bus (the driver/responder can get this from the interface
data- data to be put on wdata/rdata busses (dynamic array, depth=data_bus_bytes)
wstrb- byte strobes, to be put on wstrb bus (dynamic array, depth=data_bus_bytes)
wlast- just what you think it is.

Definition at line 492 of file axi_seq_item.svh.

References addr, burst_size, burst_type, calculate_axlen(), get_beat_N_byte_lanes(), and len.

Referenced by max_len(), axi_responder::read_data(), and axi_driver::write_data().

Here is the call graph for this function:

Here is the caller graph for this function:

constraint axi_seq_item::max_len ( )
inline
axi_seq_item::new ( string  name = "axi_seq_item")

Constructor.

Doesn't actually do anything except call parent constructor

Definition at line 276 of file axi_seq_item.svh.

void axi_seq_item::post_randomize ( )

Tweak things after randomization.

Currenly being used to reset the data[] to incrementing pattern ending with 'FE. This is for easier debugging. More love coming.

Definition at line 409 of file axi_seq_item.svh.

References cmd, data, e_WRITE, len, valid, wlast, and wstrb.

Referenced by max_len().

Here is the caller graph for this function:

void axi_seq_item::pre_randomize ( )

Definition at line 397 of file axi_seq_item.svh.

Referenced by max_len().

Here is the caller graph for this function:

constraint axi_seq_item::protocol_c ( )
inline

Definition at line 95 of file axi_seq_item.svh.

References e_AXI3, len, and LEN_WIDTH.

axi_seq_item::uvm_object_utils ( axi_seq_item  )

Member Data Documentation

rand bit<ADDR_WIDTH-1:0> axi_seq_item::addr
bit<LEN_WIDTH-1:0> axi_seq_item::axlen

Definition at line 58 of file axi_seq_item.svh.

Referenced by axi_coveragecollector::sample().

logic<ID_WIDTH-1:0> axi_seq_item::bid = 0xF

Definition at line 68 of file axi_seq_item.svh.

Referenced by convert2string(), do_copy(), and axi_driver::write_response().

logic<1:0> axi_seq_item::bresp = 0x3

Definition at line 69 of file axi_seq_item.svh.

Referenced by convert2string(), do_copy(), and axi_driver::write_response().

rand logic<2:0> axi_seq_item::burst_size
rand logic<1:0> axi_seq_item::burst_type
const shortint axi_seq_item::c_AXI3_MAXBEATCNT =16

Definition at line 89 of file axi_seq_item.svh.

Referenced by max_len().

const shortint axi_seq_item::c_AXI4_MAXBEATCNT =256

Definition at line 90 of file axi_seq_item.svh.

Referenced by max_len().

logic<3:0> axi_seq_item::cache = 0x0

Definition at line 64 of file axi_seq_item.svh.

Referenced by do_copy().

rand cmd_t axi_seq_item::cmd
rand bit<7:0> axi_seq_item::data[]
rand bit<ID_WIDTH-1:0> axi_seq_item::id
rand int axi_seq_item::len
logic<0:0> axi_seq_item::lock = 0x0

Definition at line 63 of file axi_seq_item.svh.

Referenced by do_copy().

logic<2:0> axi_seq_item::prot = 0x0

Definition at line 65 of file axi_seq_item.svh.

Referenced by do_copy().

logic<3:0> axi_seq_item::qos = 0x0

Definition at line 66 of file axi_seq_item.svh.

Referenced by do_copy().

rand logic<31:0> axi_seq_item::toggle_pattern = 0xFFFF_FFFF

Definition at line 73 of file axi_seq_item.svh.

rand bit axi_seq_item::valid[]
rand bit axi_seq_item::wlast[]

Definition at line 57 of file axi_seq_item.svh.

Referenced by do_copy(), and post_randomize().

rand bit axi_seq_item::wstrb[]

Definition at line 56 of file axi_seq_item.svh.

Referenced by do_copy(), post_randomize(), and axi_monitor::write_data().


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