AXI muckbucket
|
Logic to act as an AXI master for all 5 channels. More...
Public Member Functions | |
uvm_component_utils (axi_driver) axi_if_abstract vif | |
new (string name="axi_driver", 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 driver 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 () |
monitors Read Data channel and sends out TLM pkt 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 master for all 5 channels.
Definition at line 31 of file axi_driver.svh.
void axi_driver::build_phase | ( | uvm_phase | phase | ) |
Creates the virtual interface.
Definition at line 67 of file axi_driver.svh.
void axi_driver::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_driver.svh.
axi_driver::new | ( | string | name = "axi_driver" , |
uvm_component | parent = null |
||
) |
Constructor.
Doesn't actually do anything except call parent constructor
Definition at line 62 of file axi_driver.svh.
task axi_driver::read_address | ( | ) |
Read Address channel thread.
Definition at line 515 of file axi_driver.svh.
References ADDR_WIDTH, ar_from_class(), axi_seq_item_ar_vector_s::araddr, axi_seq_item_ar_vector_s::arburst, axi_seq_item_ar_vector_s::arid, axi_seq_item_ar_vector_s::arsize, axi_seq_item::convert2string(), m_config, axi_agent_config::max_clks_between_ar_transfers, axi_agent_config::min_clks_between_ar_transfers, readaddress_mbx, and readdata_mbx.
Referenced by run_phase().
task axi_driver::read_data | ( | ) |
monitors Read Data channel and sends out TLM pkt
This task should match the corresponding on in axi_monitor but it doesn't yet
Definition at line 605 of file axi_driver.svh.
References axi_seq_item::addr, ADDR_WIDTH, axi_seq_item::burst_size, axi_seq_item::burst_type, calculate_axlen(), axi_seq_item::cmd, axi_seq_item::data, e_READ_DATA, get_beat_N_byte_lanes(), axi_seq_item::len, m_config, axi_seq_item_r_vector_s::rdata, readdata_mbx, and axi_agent_config::rready_toggle_pattern.
Referenced by run_phase().
task axi_driver::run_phase | ( | uvm_phase | phase | ) |
Launches channel driver 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 91 of file axi_driver.svh.
References axi_seq_item::cmd, axi_seq_item::convert2string(), e_READ, e_WRITE, read_address(), read_data(), readaddress_mbx, write_address(), write_data(), write_response(), and writeaddress_mbx.
axi_driver::uvm_component_utils | ( | axi_driver | ) |
task axi_driver::write_address | ( | ) |
Write Address channel thread.
Definition at line 138 of file axi_driver.svh.
References ADDR_WIDTH, aw_from_class(), axi_seq_item_aw_vector_s::awaddr, axi_seq_item_aw_vector_s::awburst, axi_seq_item_aw_vector_s::awid, axi_seq_item_aw_vector_s::awsize, axi_seq_item::convert2string(), m_config, axi_agent_config::max_clks_between_aw_transfers, axi_agent_config::min_clks_between_aw_transfers, writeaddress_mbx, and writedata_mbx.
Referenced by run_phase().
task axi_driver::write_data | ( | ) |
Write Data channel thread.
Definition at line 233 of file axi_driver.svh.
References axi_seq_item::addr, axi_agent_config::axi_incompatible_wvalid_toggling_mode, axi_seq_item::burst_size, calculate_axlen(), axi_agent_config::clks_without_wvalid_or_wready_max, axi_seq_item::convert2string(), axi_seq_item::get_beat_N_data(), axi_seq_item::len, m_config, axi_agent_config::max_clks_between_w_transfers, axi_agent_config::min_clks_between_w_transfers, axi_seq_item::valid, axi_seq_item_w_vector_s::wdata, axi_seq_item_w_vector_s::wlast, writedata_mbx, writeresponse_mbx, axi_seq_item_w_vector_s::wstrb, axi_agent_config::wvalid, and axi_seq_item_w_vector_s::wvalid.
Referenced by run_phase().
task axi_driver::write_response | ( | ) |
Write Response channel thread.
Wait for write response (bvalid and bready) Convert to TLM itemand send back to sequence
Definition at line 479 of file axi_driver.svh.
References axi_seq_item::bid, axi_seq_item_b_vector_s::bid, axi_agent_config::bready_toggle_pattern, axi_seq_item::bresp, axi_seq_item_b_vector_s::bresp, axi_seq_item::cmd, e_WRITE_RESPONSE, m_config, and writeresponse_mbx.
Referenced by run_phase().
axi_agent_config axi_driver::m_config |
Definition at line 35 of file axi_driver.svh.
Referenced by axi_agent::build_phase(), read_address(), read_data(), write_address(), write_data(), and write_response().
memory axi_driver::m_memory |
Definition at line 36 of file axi_driver.svh.
Referenced by axi_agent::build_phase().
mailbox<axi_seq_item> axi_driver::readaddress_mbx = new(0) |
Definition at line 41 of file axi_driver.svh.
Referenced by read_address(), and run_phase().
mailbox<axi_seq_item> axi_driver::readdata_mbx = new(0) |
Definition at line 42 of file axi_driver.svh.
Referenced by read_address(), and read_data().
mailbox<axi_seq_item> axi_driver::writeaddress_mbx = new(0) |
Definition at line 38 of file axi_driver.svh.
Referenced by run_phase(), and write_address().
mailbox<axi_seq_item> axi_driver::writedata_mbx = new(0) |
Definition at line 39 of file axi_driver.svh.
Referenced by write_address(), and write_data().
mailbox<axi_seq_item> axi_driver::writeresponse_mbx = new(0) |
Definition at line 40 of file axi_driver.svh.
Referenced by write_data(), and write_response().