Table Of Contents

Multirate Diagram Node Behavior in an FPGA VI

Last Modified: February 16, 2016

The Multirate Diagram node allows you to integrate a Multirate diagram into a VI targeted to an FPGA.

The Multirate Diagram node behaves differently in a VI targeted to an FPGA than in a VI targeted to a host. If you call a Multirate diagram from a VI targeted to an FPGA, the Multirate Diagram node outputs a FIFO reference for each port on the Multirate diagram, including input ports.

The following image shows a Top-Level FPGA VI that contains a Multirate Diagram integration node. The Context Help window in the image shows the names of the input and output terminals of the Multirate Diagram integration node.

Because the FIFO references originate from the Multirate Diagram node, all FIFO references are outputs on the Multirate Diagram node, including the FIFO references for the input ports on the Multirate diagram. You can use those FIFO references to transmit data to and from the Multirate diagram as streams. To transmit data between the Multirate diagram and the rest of the application, you must write to and read from the referenced FIFOs within a Clock-Driven Loop.

In the Top-Level FPGA VI, the code inside the Clock-Driven Loop reads data from the host via the Data 1 In and Data 2 In FIFO constants. The Write FIFO nodes then send that data to the Stream In 1 and Stream In 2 ports on the Multirate diagram. The bottom section of code inside the Clock-Driven Loop reads data from the Multirate diagram and sends that data to the host via the Data Out FIFO constant.

Whenever enough data samples are available in the FIFOs that correspond to Stream In 1 and Stream In 2, the Multirate diagram consumes those samples and produces output samples. The Multirate diagram continues to process samples as long as the Top-Level FPGA VI executes.


Recently Viewed Topics