AXI muckbucket
|
Logic to act as an AXI slave (responder) for all 5 channels. More...
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_item > | writeaddress_mbx = new(0) |
mailbox< axi_seq_item > | writedata_mbx = new(0) |
mailbox< axi_seq_item > | writeresponse_mbx = new(0) |
mailbox< axi_seq_item > | readaddress_mbx = new(0) |
mailbox< axi_seq_item > | readdata_mbx = new(0) |
Logic to act as an AXI slave (responder) for all 5 channels.
Definition at line 31 of file axi_responder.svh.
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().
task axi_responder::read_data | ( | ) |
Read Data channel thread.
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().
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.
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.
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().
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.
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().
task axi_responder::write_response | ( | ) |
Write Response channel thread.
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().
axi_agent_config axi_responder::m_config |
Definition at line 35 of file axi_responder.svh.
Referenced by axi_agent::build_phase(), read_address(), read_data(), write_address(), write_data(), and write_response().
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().