Design Considerations for Data Capture
Signals to Capture
To get started with FPGA data capture, you must specify port names and sizes for the generated IP. You then connect these ports to the signals in your design that you want to capture. You can specify bit widths between 1 and 128 bits. The default data type of the captured data depends on this bit width.
The FPGA data capture tools do not limit the total number of signals or bits you can capture. You are limited only by the hardware resource usage on your FPGA. When you select signals and the depth of the capture buffer, consider the memory and signal routing resources required on the FPGA.
In the FPGA Data Capture Component Generator, you can specify a signal for use as data or trigger. When you specify a signal as data, the signal is captured to the sample buffer and returned to MATLAB®, but it cannot contribute to a trigger condition and capture condition. A data signal uses memory resources on the FPGA. When you specify a signal as a trigger, it is available for defining a trigger condition and capture condition at capture time, but is not captured and returned to MATLAB. A trigger signal uses logic resources on the FPGA. You can also specify that the signal is used as both trigger and data.
At capture time, you can configure the data type of the variable returned to MATLAB or Simulink®. You can select built-in types, or, with Fixed-Point Designer™, you can specify fixed-point data types. If you do not have Fixed-Point Designer, data capture can only return built-in data types, such as
uint8
. In this case, you must specify ports for the generated IP that match
the sizes of the built-in data types, that is, 1, 8, 16, 32, or 64 bits.
Capture Timing
The data capture feature captures a fixed-size buffer of data each time you request a capture. The feature does not stream continuous data from your FPGA into MATLAB or Simulink. You can capture a buffer immediately, or you can configure a logical trigger condition to control when the buffer is captured. You can configure the timing of the capture relative to the cycle the trigger is detected in, and configure the capturing of multiple windows of trigger events. You can also configure a logical capture condition to filter the data to be captured. While the data capture IP waits for a trigger, captures data, and returns the captured data to MATLAB, you cannot initiate a new capture request. Therefore, you cannot capture back-to-back buffers from the FPGA.
Use this feature to investigate design behavior around a specific event or to sample data occasionally, rather than for continuous observation. For more information about how to use trigger condition and capture condition, see Triggers and Capture Conditions, respectively.
JTAG Considerations
The generated data capture IP can coexist in your design with other IPs that use the JTAG connection, such as Altera® SignalTap II or AMD® Vivado® Logic Analyzer cores. However, only one of these applications can use the JTAG cable at a time. You must close the FPGA Data Capture tool or model, or release the object, to return the JTAG resource for use by other applications.
The most common conflicting use of the JTAG cable is to reprogram the FPGA. You must stop any FPGA data capture or AXI manager JTAG connection before you can use the cable to program the FPGA.
The maximum data rate between host computer and FPGA is limited by the JTAG clock frequency. For Intel® boards, the JTAG clock frequency is 12 or 24 MHz. For AMD boards, the JTAG clock frequency is 33 or 66 MHz. The JTAG frequency depends on the type of cable and the maximum clock frequency supported by the FPGA board.
Simultaneous Use of FPGA Data Capture and AXI Manager
The nonblocking capture mode enables you to simultaneously use FPGA data capture and AXI manager, which share a common JTAG interface. You do not need to close or release the JTAG resource to switch between FPGA data capture and AXI manager.
FPGA data capture supports these two capture modes.
Blocking mode — FPGA data capture blocks MATLAB while retrieving captured data. In this capture mode, the JTAG resource is allocated to either FPGA data capture or AXI manager at a time.
Nonblocking mode — FPGA data capture does not block MATLAB while retrieving captured data. In this capture mode, you can use FPGA data capture and AXI manager simultaneously.
By default, FPGA data capture is configured in blocking mode. Change the capture mode to
nonblocking mode by using the CaptureMode property for an hdlverifier.FPGADataReader
System object™. After changing the capture mode to nonblocking, you can use the command line
interface or graphical user interface for performing the remaining steps in FPGA data capture
and AXI manager. For an example, see Debug IP Core Using FPGA Data Capture (HDL Coder).
Ethernet Considerations
The generated data capture IP can coexist in your design with other IPs that use the Ethernet connection, such as UDP AXI Manager IP. However, you must connect these IPs to the same Ethernet MAC Hub IP using different port addresses. For more information on Ethernet MAC Hub IP, see Ethernet AXI Manager.