Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Managing Shared Resources, Contention, and Arbitration (FPGA Module)

LabVIEW FPGA Module 8.2 Help
August 2006

NI Part Number:
371599B-01

»View Product Info

Many LabVIEW FPGA Module applications contain shared resources that are accessed from multiple objects, such as functions or subVIs, in an FPGA VI. Possible shared resources include digital output lines, analog lines, memory items, FIFOs, the interrupt line, local and global variables, and non-reentrant subVIs. Each shared resource contains one or more resource interfaces. A resource interface communicates between objects and shared resources, as shown in the following figure.

Figure 1. Two objects request access to the same shared resource through separate resource interfaces.

Resource contention occurs when you include two or more objects on the FPGA VI block diagram that simultaneously request access to the same shared resource through the same resource interface. In the figure above, resource contention does not occur because the objects request access to the shared resource through two different resource interfaces.

However, in the following figure, the two Memory Write functions request access to the same shared resource (My Memory Item) through the same resource interface. If the two Memory Write functions request access to the shared resource at the same time, resource contention occurs.

Figure 2. Two objects request access to the same shared resource through the same resource interface.

To help you avoid resource contention, the FPGA Module offers arbitration options to determine which object can access the resource if multiple objects request access at the same time. The arbitration option you select determines if LabVIEW uses an arbiter. The arbitration options from which you can select vary by resource. Objects that request access to a resource through a resource interface are called requestors. A requestor becomes an accessor when the arbiter grants access to the resource, as shown in the following figure.

Figure 3. An arbiter grants access to one of the requestors.

Most objects interact with a single resource interface. However, in some situations, some objects interact with multiple interfaces. For example, if you use the FPGA I/O Node for a bidirectional digital line, the FPGA I/O Node interacts with the output data and output enable interfaces on the corresponding resource, as shown in the following figure.

Figure 4. An object interacts with two resource interfaces.

The figure above approximately maps to a circuit as shown in the following schematic diagram.

In the figure above, the circuit controls Output Enable and Output Data separately, so the circuit abstracts Output Enable and Output Data into separate resource interfaces.

You can configure the arbitration options for FPGA I/O, FIFOs, and memory items if you need to optimize the FPGA VI. If the FPGA VI design fits on the FPGA, meets the performance expectations, and compiles without errors, keep the default arbitration option. The default arbitration option for I/O depends on the FPGA target and the I/O resource. The default arbitration option for FIFOs and memory items is Arbitrate if Multiple Requestors Only. Other resources that include arbitration, such as controls and global variables, include fixed arbitration settings. You cannot change the arbitration option for such resources, so in some situations, you might need to modify the code on the block diagram to avoid resource contention.


Resources


 

Note  The arbitration process can take several clock cycles to execute. Arbitration takes additional time and FPGA space and can add jitter to an application. You can design the FPGA VI to avoid jitter.
Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit