LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW FPGA: Look-Up Table Compile Issue

Solved!
Go to solution

Current Versions of Software:

LabVIEW 2014 SP1

LabVIEW FPGA 2014

Xilinx Vivado

 

I'm having a huge issue trying to compile my LabVIEW FPGA code.

 

Some background on the code:

This is all within a SCTL.

I am streaming in a DMA FIFO, and comparing it with previous values stored in shift registers (that are initialized to 0 when the loop starts) in the SCTL.

Those comparison results are then packed into a U16 and loaded to a lookup table (I am using the LUT-1D), and I'm then using this LUT to decide which value will be loaded to the shift register for the next loop iteration, which in every case, would be either the current stream values, or the previous shift register value.

(It's a sorting loop)

 

 

I am able to run the code fine in simulation mode, but when I try to compile it, I get this error:

 

"The selected object has an embedded shift register that makes the output on a particular loop iteration correspond to the inputs from the previous iteration.

Wire the outputs for the object directly to the minimum number of Feedback Nodes or uninitialized shift registers. You cannot wire the outputs to another object.

Refer to the LabVIEW Help for more information about objects with embedded shift registers."

 

Anyone have any ideas why this is occurring, and what possible workarounds could be?

 

I'm tempted to break this down into separate loops, but I'd rather not as it's all in one loop now (and working in my simulation).

0 Kudos
Message 1 of 3
(2,761 Views)

Can you show your code? Have you tried what is suggested in the error message: wiring the lookup-table outputs to a shift register? The message is telling you that the outputs of the look-up table don't become valid until the next clock cycle. Wiring them to a shift register around the single-cycle loop means they're available on the next loop iteration; if the compiler allowed you to use those values in the current cycle, the values would be stale, invalid, or inconsistent.

Message 2 of 3
(2,677 Views)
Solution
Accepted by topic author Colonel1013

I figured out my issue.

 

Any time a LUT is in a shift register chain, it cannot:

 

1.Be part of a shift register chain that has an initialized variable

2.Be followed by any deciding structures, like a case structure.

 

I just moved the LUT position and it works.

0 Kudos
Message 3 of 3
(2,595 Views)