Interfaces reperesents only connections and can be used for synthesis.
If you want to drive them for simulation purposes, use classes listed below.
For example projects refer to ./tb directory.
You can make yourself convinced by running
vsim -do make.tcl
in ./tb directory and following the instructions.
Tested in QuestaSim 10.4e and ModelSim 10.5b
./src/interface/axi4_if.sv
./src/interface/axi4_lite_if.sv
./src/interface/axi4_stream_if.sv
DATA_WIDTH, ADDR_WIDTH, ID_WIDTH, DEST_WIDTH, USER_WIDTH, AWUSER_WIDTH, WUSER_WIDTH, BUSER_WIDTH, ARUSER_WIDTH RUSER_WIDTH
Must be equal to connected interface.
VERBOSE
Enbales debug text output (higher the value, more information will be outputed).
WATCHDOG_EN
Enbales watchdog for handshakes.
WATCHDOG_LIMIT
Amount of ticks before watchdog timeout.
./src/class/AXI4Master.sv
axi4_if axi4_if_v
mailbox rd_data_mbx
RANDOM_WVALID
Random deassertion of wvalid signal during write transaction
RANDOM_RREADY
Random deassertion of rready signal during read transaction
wr_transaction_byte( bit [ADDR_WIDTH - 1 : 0] start_addr, bit [7 : 0] wr_byte_q [$] )
Nonblocking task that takes byte queue as input, splits it by bursts and sends it.
wr_transaction_word( bit [ADDR_WIDTH - 1 : 0] start_addr, bit [DATA_WIDTH - 1 : 0] wr_word_q [$] )
Nonblocking task that takes word size queue as input, splits it by bursts and sends it.
rd_transaction( bit [ADDR_WIDTH - 1 : 0] start_addr, int words_amount )
Non blocking task that reads required amount of data and puts it as word size queue into rd_data_mbx mailbox
run()
Enables internal mailbox scanning. Executes at class construction
stop()
Disables internal mailbox scanning
event wr_transaction_start
Triggers when first handshake of firts burst of write transaction appears
event wr_transaction_end
Triggers when last handshake of last burst of write transaction appears
event rd_transaction_start
Triggers when first handshake of first burst of read transaction appears
event rd_transaction_end
Triggers when last handshake of last burst of read transaction appears
./src/class/AXI4Slave.sv
axi4_if axi4_if_v
RANDOM_WREADY
Random deassertion of wready signal during write transaction
RANDOM_RVALID
Random deassertion of rvalid signal during write transaction
INIT_PATH
Relative path to initialization file
init_memory()
Initialize memory with file specified in INIT_PATH parameter
run()
Enables interface listening. Executes at class construction
stop()
Disable interface listening
event wr_transaction_start
Triggers when first handshake of firts burst of write transaction appears
event wr_transaction_end
Triggers when last handshake of last burst of write transaction appears
event rd_transaction_start
Triggers when first handshake of first burst of read transaction appears
event rd_transaction_end
Triggers when last handshake of last burst of write transaction appears
./src/class/AXI4LiteMaster.sv
axi4_lite_if axi4_lite_if_v
wr_data( bit [ADDR_WIDTH - 1 : 0] addr, bit [DATA_WIDTH - 1 : 0] data )
Blocking task that writes one word to specified address
rd_data( bit [ADDR_WIDTH - 1 : 0] addr, bit [DATA_WIDTH - 1 : 0] data )
Blocking task that reads one word from specified address and writes it to passed data signal
./src/class/AXI4LiteSlave.sv
axi4_lite_if axi4_lite_if_v
INIT_PATH
Relative path to initialization file
init_memory()
Initialize memory with file specified in INIT_PATH parameter
run()
Enables interface listening. Executes at class construction
stop()
Disables interface listening
./src/class/AXI4StreamMaster.sv
axi4_stream_if axi4_stream_if_v
RANDOM_TVALID
Random deassertion of tvalid signal during packet transmitting
send_pkt( bit [7 : 0] byte_q [$] )
Nonblocking task that takes queue as input and puts it into internal mailbox
run()
Runs mailbox scanning. Executed at class creation.
stop()
Stops mailbox scanning after last packet will be sent
event pkt_start
Triggers right after packet was get from mailbox
event pkt_end
Triggers right after tready/tvalid/tlast handshake
./src/class/AXI4StreamSlave.sv
axi4_stream_if axi4_stream_if_v
mailbox rx_data_mbx
RANDOM_TREADY
Random deassertion of tready signal during packet receiving
run()
Starts receiving incoming data. Every incoming packet will be puted to shared mailbox. Executed at class creation
stop()
Stops receiving incoming data.
event pkt_start
Triggers right after first tvalid detection in incoming packet
event pkt_end
Triggers right after received packet was puted in shared mailbox