LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA, Linear Algebra matrix multiply, not resetting in a for loop

Greetings, I have the following code (simplified to the basics form of my general application) where I need to run a Linear Algebra matrix multiply block on an FPGA in a loop.

 

matrix_multiply.png

 

 

When running the code in simulation mode for a cRIO-9054, the issues are:

  1. The first time I run the code, the Linear Algebra matrix multiply the block on the first pass through the loop correctly. All following iterations of the loop are wrong. 
  2. If I rerun the code, iterations are wrong
  3. If I change anything on the code and rerun it, it reverts back to issue 1 where the first pass through the loop is correct, but the successive passes are wrong. Note that this is as simple as adding an unconnected integer to the first frame. 

After lots of digging, I suspect the Linear Algebra matrix multiply block is not "resetting" with each loop iteration. It continues to ask for new data even after it has ingested all it needs, and on the new loop does not "start" in the same place. I may not have the correct words here but I think this is what is happening. 

 

My question is, how do I reset the Linear Algebra matrix multiply block for each iteration? What if I put it in a function, will that allow it to start from the same place each time?

 

I have attached the project, host, and target VIs in case this helps. 

 

Thanks in advance!

 

 

 

0 Kudos
Message 1 of 3
(1,374 Views)

Nothing was attached.  If your Project, Host, and Target VIs all "live" in a single folder (perhaps named for the Project), then compress that Folder (which creates a .ZIP file that we all can open) and attach your file to your Reply.

 

Bob Schor

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

Sorry, see attached. 

 

Also, on the host VI, I expect the first waveform for 0 to 20 to be repeated, however, as you can see, this is not the case. I don't know where these larger numbers are coming from as they are not in the preallocated LUT memories. 

 

Austin-Downey_0-1621742620207.png

 

 

0 Kudos
Message 3 of 3
(1,299 Views)