Main Content

aximanager

Read and write memory locations on FPGA board fromMATLAB

Description

aximanagerobject communicates with the AXI manager IP when it is running on an FPGA board. The object forwards read and write commands to the IP to access subordinate memory locations on the FPGA board. Before using this object, follow the steps inSet Up AXI Manager

笔记

Aximasterobject has been renamed to theaximanager目的。For more information, seeCompatibility Considerations

创建

Description

例子

mem= aximanager(小贩returns an object, that controls an AXI4 manager IP for the FPGA that is running on your board.小贩指定FPGA品牌名称。此连接使您可以从MATLAB访问SOC设计中的内存位置®

mem= aximanager(小贩,,,,姓名,,,,Value使用一个或多个名称值对参数设置属性。将每个属性名称和价值包装在报价中。例如,'DeviceAddress','192.168.0.10'指定FPGA板的Internet协议(IP)地址为192.168.0.10。

输入参数

展开全部

FPGA的品牌名称,指定为“英特尔”或“Xilinx”。This value specifies the manufacturer of the FPGA board. The AXI manager IP varies depending on the type of FPGA that you specify.

特性

展开全部

用于与FPGA板进行通信的接口类型,指定为“ JTAG”(默认),“ PCIE”或“ UDP”。此值指定用于在主机和FPGA之间进行通信的接口类型。

用于与FPGA板通信的JTAG电缆的名称,该名称表示为角色向量或代表JTAG电缆名称的字符串标量。如果将同一类型的多个JTAG电缆连接到主机计算机,则指定此属性。如果主机计算机具有多个JTAG电缆,并且未指定此属性,则该对象将返回错误。错误消息包含可用JTAG电缆的名称。有关更多详细信息,请参阅Select from Multiple JTAG Cables

数据类型:char|细绳

Internet protocol (IP) address of the Ethernet port on the FPGA board, specified as a character vector or string scalar representing an IP address.

Example:'192.168.0.10'

依赖性

To enable this property, set the界面'udp'

数据类型:char|细绳

目标设备的类型,指定为“ FPGA”(默认)或“ SOC”。当您使用Xilinx Zynq或Intel SOC作为目标设备时,将此属性指定为“ SOC”。

Example:'SOC'

User datagram protocol (UDP) port number of the target FPGA board, specified as an integer.

Example:'12345'

依赖性

To enable this property, set the界面财产为'udp'DeviceType财产为'FPGA'

数据类型:uint16

对象功能

readmemory Read data out of AXI4 memory-mapped subordinates
发布 释放JTAG或以太网电缆资源
写入 Write data to AXI4 memory-mapped subordinates

Examples

collapse all

此示例显示了如何在Matlab®的Intel®FPGA板上读写内存位置。

在使用此示例之前,您必须在连接到MATLAB主机机器的FPGA板上运行设计。FPGA设计必须包括为您的FPGA供应商定制的AXI Manager IP。支持软件金宝app包安装包括此IP。要在项目中包括IP,请参阅Access FPGA External Memory Using AXI Manager例子。

Create an AXI manager object. The object connects MATLAB with the FPGA board and confirms that the IP is present.

mem = aximanager('英特尔'
mem =
aximanager with properties:
Vendor: 'Intel' JTAGCableName: 'auto'

Write 10 addresses and then read data from a single location. By default, these functions auto-increment the address for each word of data.

Writemory(MEM,140,[10:19]);rd_d = redmemory(mem,140,1)
rd_d =
UINT32
10

Read data from 10 locations.

rd_d = redmemory(mem,140,10)
rd_d =
1x10 UINT32行矢量
10 11 12 13 14 15 16 17 18 19

通过指定AXI Manager从同一地址读取所有数据(禁用自动插入),从同一地址读取数据10次。

rd_d = redmemory(mem,140,10,'BurstType',,,,'固定的'
rd_d =
1x10 UINT32行矢量
10101010101010101010

将数据写10次到同一地址。在这种情况下,存储在地址中的最终值140is29

Writemory(MEM,140,[20:29],'BurstType',,,,'固定的'); rd_d = readmemory(mem,140,10)
rd_d =
1x10 UINT32行矢量
29 11 12 13 14 15 16 17 18 19

将地址指定为十六进制值。指定该函数将读取数据施加到以外的数据类型UINT32

Writemory(MEM,0x1C,[0:4:64]);rd_d = redmemory(mem,0x1c,16,'OutputDataType',数字型(0,6,4))
rd_d =
Columns 1 through 10 0 0.2500 0.5000 0.7500 1.0000 1.2500 ... 1.5000 1.7500 2.0000 2.2500 Columns 11 through 16 2.5000 2.7500 3.0000 3.2500 3.5000 3.7500
datatypemode:固定点:二进制点缩放签名:无符号wordlength:6馏分长度:4

When you no longer need to access the board, release the JTAG connection.

发布(mem);

This example shows how to select the required JTAG cable from the multiple JTAG cables that are connected to your host computer.

If two cables of the same type are connected to your host computer, specify theJTAGCableNameAXI Manager IP正在运行的板的属性标识符。要查看JTAG电缆标识符,请尝试创建一个aximanager目的。这object returns a list of the current JTAG cable names.

h = aximanager('英特尔'
Error使用fpgadebug_mexFoundmorethanJTAGcable:0(max10):#tpt_0001#ptc_0002#210203991642 1(arria):#tpt_0001#ptc_0002#210319789795请断开extracable, 或者specifycable姓名作为一个输入argument.文档ofFPGAData捕获orAxi经理如何cable姓名。

要与Arria板进行通信,请指定匹配的JTAG电缆名称。

h = aximanager('英特尔',,,,'JTAGCableName',,,,'#tpt_0001#ptc_0002#210319789795');

版本历史记录

在R2017A中引入

展开全部

Warns starting in R2022a