This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

PCI Express MATLAB as AXI Master

When using PCI Express® MATLAB as AXI Master, you must first include the following two intellectual property blocks (IPs) in your Quartus® Qsys project.

PCIe MATLAB as AXI Master IP

PCIe MATLAB as AXI Master is an HDL IP provided by MathWorks®. This IP connects the PCI Express (PCIe) core to your application code. It also has a configuration port for accessing configuration registers. This block diagram shows the interface to the HDL IP.

The interface includes the following parts:

  • clock and resetn are the clock and reset inputs. Connect them to the AXI clock and reset.

  • axs_so is a 32-bit slave interface and is used for accessing the PCIe configuration registers. Connect this interface to the Avalon Memory Mapped master interface.

  • axm_pcie is a 128-bit AXI master interface. Connect this interface to the TX slave port on the PCIe core.

  • axm_app is a 128-bit AXI master interface. Connect this interface to your application logic.

After instantiating this IP in your design, open the block parameters for configuration.

Configure these parameters:

  • ID_WIDTH – This parameter is the ID width in bits. Its value must match the ID width of the AXI slave.

  • AXI_DATA_WIDTH – This parameter is the data bus width. The IP supports 128-bit or 256-bit data.

  • AXI_ADDR_WIDTH – This parameter is the address bus width. The IP supports 32-bit address.

PCI Express Core

The Hard IP for PCI Express Core is a board-specific IP provided by Intel®. Use this IP for configuring and integrating the PCI Express port.

After instantiating the PCIe core HDL IP in your Quartus Qsys project, configure the PCIe core using these steps (this example is for an Arria® 10 board).

  1. On the Physical Function 0 IDs tab, set the parameters as shown in this figure.

  2. On the Avalon-MM Settings tab, set the parameters as shown in this figure.

  3. On the System Settings tab, select a Hard IP mode with a bus width to match the AXI_DATA_WIDTH parameter previously set in the PCIe MATLAB as AXI Master IP block parameters. (The IP currently supports 128-bit mode).

  4. Connect the PCIe MATLAB as AXI Master IP to the PCIe core (this example shows Arria 10 Hard IP for PCI Express).

  5. Compile and build your FPGA project.

  6. Insert the FPGA board into the PCI Express slot on the motherboard of the host computer.

  7. Program the FPGA with your compiled design.

  8. Reboot the host machine.

Once the program is running on your FPGA board, you can create a MATLAB® AXI master System object. See aximaster. To access the slave memory locations on the board, use the readmemory and writememory methods of this System object.

See Also

Related Topics