The Tcl command used to create an AXI transaction is called create_hw_axi_txn. For more information on how to use this command, type "help create_hw_axi_txn" at the Tcl Console in the Vivado IDE. Here is an example on how to create a 4-word AXI read burst transaction from address 0:
create_hw_axi_txn read_txn [get_hw_axis hw_axi_1] -type READ -address 00000000 -len 4
where:
- read_txn is the user-defined name of the transaction
- [get_hw_axis hw_axi_1] returns the hw_axi_1 object
- -address 00000000 is the start address
- -len 4 sets the AXI burst length to 4 words
The next step is to run the transaction that was just created using the run_hw_axi command. Here is an example on how to do this:
run_hw_axi [get_hw_axi_txns read_txn]
The last step is to get the data that was read as a result of running the transaction. You can use either the report_hw_axi_txn or report_property
commands to print the data to the screen or you can use the get_property
command to return the value for use elsewhere.
report_hw_axi_txn [get_hw_axi_txns read_txn]
0 00000000 00000000
8 00000000 00000000
report_property [get_hw_axi_txns read_txn]
Property Type Read-only Visible Value
CLASS string true true hw_axi_txn
CMD.ADDR string false true 00000000
CMD.BURST enum false true INCR
CMD.CACHE int false true 3
CMD.ID int false true 0
CMD.LEN int false true 4
CMD.SIZE enum false true 32
DATA string false true 00000000000000000000000000000000
HW_AXI string true true hw_axi_1
NAME string true true read_txn
TYPE enum false true READ