data capture workflow -凯发k8网页登录

main content

data capture workflow

use the fpga data capture feature to observe signals from your design while the design is running on the fpga. this feature captures a window of signal data from the fpga and returns the data to matlab® or simulink® over a jtag or ethernet interface.

note

fpga data capture support for jtag connections is available for intel® and xilinx® fpga boards. support for ethernet connections is available for xilinx fpga boards only.

to use this feature, you must download a hardware support package for your fpga board. see .

you can choose between two workflows to capture data from your fpga board and return it to matlab or simulink.

  • first workflow — if you generate the hdl ip with hdl coder™, use the hdl workflow advisor tool to generate the data capture ip and integrate it into your fpga design.

  • second workflow — if you have an existing hdl design, use hdl verifier™ tools to generate the data capture ip. then, manually integrate the generated ip into your fpga design.

to capture signals from your design, hdl verifier generates an ip core that communicates with matlab. use the hdl coder workflow to automatically integrate the data capture ip core in your design. otherwise, manually integrate this ip core into your hdl project and deploy it to the fpga along with the rest of your design. then, use one of these methods to capture data.

  • for capturing data to matlab – hdl verifier generates a customized app that returns the captured signal data. alternatively, you can use the generated system object™ to capture data programmatically.

  • for capturing data to simulink – hdl verifier generates a block that has output ports corresponding to the signals you captured.

in both cases, you can specify data types for the captured data, number of windows to capture, trigger condition that controls when to capture the data, and capture condition that controls which data to capture.

when the design is running on the fpga, first the generated ip core waits for the trigger condition that you specify. define a trigger condition by specifying values matched on one or more signals. when the trigger is detected, the logic captures the designated signals to a buffer and returns the data over the jtag or ethernet interface to the host machine. you can then analyze and display these signals in your matlab workspace or simulink model.

to make the best use of the buffer size and capture only the valid data, you can also define a capture condition. define a capture condition in the same way as you define the trigger condition. when both the trigger is detected and the capture condition is satisfied, the logic captures only the valid values of the designated signals.

generate and integrate data capture ip using hdl workflow advisor

when you use hdl workflow advisor tool to generate your hdl design, first mark desired signals as (simulink) in simulink. configure your design using hdl workflow advisor tool to:

  • select the type of connection channel by setting the fpga data capture (hdl verifier required) parameter in the set target reference design task. for more information, see (hdl coder).

  • enable test point generation by selecting the enable hdl dut port generation for test points option in the set target interface task. for more information, see (hdl coder).

  • connect test point signals to the fpga data capture interface in the set target interface task.

  • set up the buffer size and maximum sequence depth for data collection in the generate rtl code and ip core task. to include capture condition logic in the ip core, select include capture condition logic in fpga data capture. for more information, see (hdl coder).

then, execute the remaining steps to generate hdl for your design and program the fpga. the data capture ip core is integrated into the generated fpga design. you can now capture data from the fpga.

for an example of using data capture with hdl workflow advisor, see (hdl coder).

configure and generate ip core for an existing hdl design

before capturing fpga data, you must first specify which signals to capture and how many data samples to return. when using an existing hdl design, use the fpga data capture component generator tool to configure settings and generate the data capture ip core. the ip core contains:

  • a port for each signal you want to capture or use as part of a trigger condition

  • memory to capture the number of samples you requested for each signal

  • jtag or ethernet interface logic to communicate with matlab

  • trigger and capture condition logic that can be configured at run time

  • a ready-to-capture signal to control data flow from the fpga

the fpga data capture component generator tool also generates a customized fpga data capture tool, system object, and model that communicate with the fpga.

integrate ip into fpga

for matlab to communicate with the fpga, you must integrate the generated hdl ip core into your fpga design. if you used the hdl workflow advisor tool to generate your data capture ip, this step is automated. in this case, data capture ip operates on a single-clock rate, which is the primary clock of your design under test (dut). if you did not use the hdl workflow advisor tool, follow these instructions in the generation report.

  1. create an fpga project.

  2. navigate to the hdlsrc folder.

  3. follow one of these steps based on your connection type.

    • jtag — add the generated hdl files in the hdlsrc folder into your fpga project. then, instantiate the hdl ip core, datacapture, in your hdl code. connect datacapture to the signals you requested for capture and triggers.

    • ethernet — run the insertethernet.tcl script in the vivado® tcl console by entering the source ./insertethernet.tcl command.

compile the project and program the fpga with the new image via a jtag cable. you can now capture data from the fpga.

capture data

the fpga data capture ip core communicates over the jtag or ethernet cable between your fpga board and the host computer. make sure that the required cable is connected. before capturing data, you can set data types for the captured data, and set trigger conditions that specify when to capture the data. to configure these options and capture data, you can:

  • open the fpga data capture tool. set trigger, capture condition, and data type parameters, and then capture data into the matlab workspace.

  • use the generated system object derived from hdlverifier.fpgadatareader. set the data types, trigger condition, and capture condition using the methods and properties of the system object, and then call the object to capture data.

  • in simulink, open the generated model, and configure the parameters of the fpga data reader block. then, run the model to capture data.

after you capture the data into the matlab workspace or simulink model, you can analyze, verify, and display the data.

related topics

网站地图