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

Logic to act as an AXI slave (responder) for all 5 channels. More...

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

Public Member Functions

 uvm_component_utils (axi_responder) axi_if_abstract vif
 
 new (string name="axi_responder", uvm_component parent=null)
 Constructor. More...
 
void build_phase (uvm_phase phase)
 Creates the virtual interface. More...
 
void connect_phase (uvm_phase phase)
 Nothing to connect so doesn't actually do anything except call parent connect phase. More...
 
task run_phase (uvm_phase phase)
 Launches channel responder threads and then acts as a dispatcher. More...
 
task write_address ()
 Write Address channel thread. More...
 
task write_data ()
 Write Data channel thread. More...
 
task write_response ()
 Write Response channel thread. More...
 
task read_address ()
 Read Address channel thread. More...
 
task read_data ()
 Read Data channel thread. More...
 

Public Attributes

axi_agent_config m_config
 
memory m_memory
 
mailbox< axi_seq_itemwriteaddress_mbx = new(0)
 
mailbox< axi_seq_itemwritedata_mbx = new(0)
 
mailbox< axi_seq_itemwriteresponse_mbx = new(0)
 
mailbox< axi_seq_itemreadaddress_mbx = new(0)
 
mailbox< axi_seq_itemreaddata_mbx = new(0)
 

Detailed Description

Logic to act as an AXI slave (responder) for all 5 channels.

Definition at line 31 of file axi_responder.svh.

Member Function Documentation

void axi_responder::build_phase ( uvm_phase  phase)

Creates the virtual interface.

Definition at line 66 of file axi_responder.svh.

void axi_responder::connect_phase ( uvm_phase  phase)

Nothing to connect so doesn't actually do anything except call parent connect phase.

Definition at line 76 of file axi_responder.svh.

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

Constructor.

Doesn't actually do anything except call parent constructor

Definition at line 61 of file axi_responder.svh.

task axi_responder::read_address ( )

Read Address channel thread.

Does nothing. The monitor handles taking AXI read data transfers and creating a read data packet that gets sent to the read data channel thread.

Definition at line 274 of file axi_responder.svh.

References axi_agent_config::arready_toggle_pattern, and m_config.

Referenced by run_phase().

Here is the caller graph for this function:

task axi_responder::read_data ( )

Read Data channel thread.

  1. Deassert rvalid
  2. wait for tlm packet (responder packet from axi_monitor)
  3. loop through data
  4. if ready and valid, wait X clocks where x>=0, then check for any more queued items
  5. if avail, then fetch and goto 'Loop through data' step.
  6. if no items to be driven on next clk, drive all read data signals low and goto 'Wait for TLM item in mailbox' step.

Definition at line 288 of file axi_responder.svh.

References axi_seq_item::addr, axi_agent_config::axi_incompatible_rvalid_toggling_mode, axi_seq_item::burst_size, calculate_axlen(), axi_agent_config::clks_without_rvalid_or_rready_max, axi_seq_item::convert2string(), axi_seq_item::get_beat_N_data(), axi_seq_item::len, m_config, axi_agent_config::max_clks_between_r_transfers, axi_agent_config::min_clks_between_r_transfers, axi_seq_item_r_vector_s::rdata, readdata_mbx, axi_seq_item_r_vector_s::rid, axi_seq_item_r_vector_s::rlast, axi_seq_item_r_vector_s::rvalid, and axi_seq_item::valid.

Referenced by run_phase().

Here is the call graph for this function:

Here is the caller graph for this function:

task axi_responder::run_phase ( uvm_phase  phase)

Launches channel responder threads and then acts as a dispatcher.

After launching 5 different threads (one for each channel), this task acts as a dispatcher. It waits for TLM packets and then stuffs them into the appropriate thread's mailbox. IE: If it's an AXI write packet then it puts the packet into the write_address's mailbox so it can handle it. It the waits for the next TLM packet. NOTE: it does not wait for the other thread to finish processing the packet, it just puts it in the mailbox and then immediately waits for the next packet.

Definition at line 90 of file axi_responder.svh.

References axi_seq_item::cmd, axi_seq_item::convert2string(), e_READ_DATA, e_WRITE, read_address(), read_data(), readdata_mbx, write_address(), write_data(), write_response(), and writeaddress_mbx.

Here is the call graph for this function:

axi_responder::uvm_component_utils ( axi_responder  )
task axi_responder::write_address ( )

Write Address channel thread.

Actually does almost nothing. The monitor handles taking AXI write data and storing it into memory and loadable logic in the axi_if handles awready. This task is basically part of a chain that guarantees that a write response won't be sent back before both write address and write data have been received.

Todo:
: clean up this task. Destroy that chain.

Definition at line 134 of file axi_responder.svh.

References axi_agent_config::awready_toggle_pattern, m_config, writeaddress_mbx, and writedata_mbx.

Referenced by run_phase().

Here is the caller graph for this function:

task axi_responder::write_data ( )

Write Data channel thread.

Actually does almost nothing. The monitor handles taking AXI write data and storing it into memory and loadable logic in the axi_if handles awready. This task is basically part of a chain that guarantees that a write response won't be sent back before both write address and write data have been received.

Todo:
: clean up this task. Destroy that chain.

Definition at line 158 of file axi_responder.svh.

References axi_seq_item::convert2string(), m_config, axi_seq_item_w_vector_s::wlast, axi_agent_config::wready_toggle_pattern, writedata_mbx, and writeresponse_mbx.

Referenced by run_phase().

Here is the call graph for this function:

Here is the caller graph for this function:

task axi_responder::write_response ( )

Write Response channel thread.

  1. Deassert bvalid
  2. Wait for TLM item in mailbox
  3. Initialize variables
  4. Write out
  5. if ready and valid, wait X clocks where x>=0, then check for any more queued items
  6. if avail, then fetch and goto 'Initialize variables' step.
  7. if no items to be driven on next clk, drive all write response signals low and goto 'Wait for TLM item in mailbox' step. \todo: response values are hardcoded. Get from response seq?

Definition at line 199 of file axi_responder.svh.

References ADDR_WIDTH, axi_seq_item_b_vector_s::bid, axi_seq_item_b_vector_s::bresp, axi_seq_item::convert2string(), m_config, axi_agent_config::max_clks_between_b_transfers, axi_agent_config::min_clks_between_b_transfers, and writeresponse_mbx.

Referenced by run_phase().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

axi_agent_config axi_responder::m_config
memory axi_responder::m_memory

Definition at line 36 of file axi_responder.svh.

Referenced by axi_agent::build_phase().

mailbox<axi_seq_item> axi_responder::readaddress_mbx = new(0)

Definition at line 41 of file axi_responder.svh.

mailbox<axi_seq_item> axi_responder::readdata_mbx = new(0)

Definition at line 42 of file axi_responder.svh.

Referenced by read_data(), and run_phase().

mailbox<axi_seq_item> axi_responder::writeaddress_mbx = new(0)

Definition at line 38 of file axi_responder.svh.

Referenced by run_phase(), and write_address().

mailbox<axi_seq_item> axi_responder::writedata_mbx = new(0)

Definition at line 39 of file axi_responder.svh.

Referenced by write_address(), and write_data().

mailbox<axi_seq_item> axi_responder::writeresponse_mbx = new(0)

Definition at line 40 of file axi_responder.svh.

Referenced by write_data(), and write_response().


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