创建并运行读取传输事务 - 2023.2 简体中文

Vivado Design Suite 用户指南: 编程和调试 (UG908)

Document ID
UG908
Release Date
2023-10-19
Version
2023.2 简体中文

用于创建 AXI 传输事务的 Tcl 命令为 create_hw_axi_txn。如需了解有关如何使用此命令的更多信息,请在 Vivado IDE 的“Tcl console”(Tcl 控制台)中输入“help create_hw_axi_txn”。以下是有关如何从地址 0 创建 4 字 AXI 读取突发传输事务的示例:

create_hw_axi_txn read_txn [get_hw_axis hw_axi_1] -type READ -address 00000000 -len 4

其中:

  • read_txn 是用户定义的传输事务名称
  • [get_hw_axis hw_axi_1] 会返回 hw_axi_1 对象
  • -address 00000000 是起始地址
  • -len 4 会将 AXI 突发长度设置为 4 个字

下一步是运行先前使用 run_hw_axi 命令创建的传输事务。操作方式如下:

run_hw_axi [get_hw_axi_txns read_txn]

最后一步是获取通过运行该传输事务所读取的数据。您可使用 report_hw_axi_txnreport_property 命令在屏幕上打印此数据,或者也可以使用 get_property 命令来返回值,以供在别处使用。

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