<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic FPGA constant matrix times a vector using Linear Algebra Matrix Multiply in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851004#M831769</link>
    <description>&lt;P&gt;Hi, I am attempting to use the Linear Algebra Matrix Multiply function in Labview 2013. I am attempting to multiply a 288x576 matrix by a 576x1 vector. The matrix is loaded from a file on the host computer and sent via a DMA FIFO to the target, and the vector is (for now) just filled with constants. In the future, the vector will be populated by data from an I/O module attached to the FPGA unit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wondering if anyone knows about/has any experience with using the Linear Algebra Matrix Multiply function to multiply a constant 2D matrix by a vector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached a screenshot of my current attempt at a solution to this post. Because FPGA only supports 1D arrays, I have the matrix coming into my timed loop as a 1D array with a length of 288 * 576 = 165,888. I then take the first 576 elements using the Array Subset function and feed them into the Matrix Multiply function. The next iteration takes the second 576 elements, then the third, etc. Each of these sets corresponds to a row of my matrix, so I am effectively feeding the matrix in one row at a time, which is the type of input I have the Matrix Multiply function configured to accept (see the screenshot of the dialog attached).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue with my current solution is that the Array Subset function does not return a fixed-size array unless the "index" input is wired to a constant (&lt;A href="https://www.ni.com/docs/en-US/bundle/labview-fpga-module/page/using-fixed-size-arrays-in-fpga-vis-fpga-module.html" target="_blank" rel="noopener"&gt;https://www.ni.com/docs/en-US/bundle/labview-fpga-module/page/using-fixed-size-arrays-in-fpga-vis-fpga-module.html).&lt;/A&gt; For my application, the index at which I take the subset needs to change, and so the type of the wire coming out is labeled as "bounded size" instead of "fixed size." The code I attached a screenshot of performs as I would like it to when I run it on the development computer, however when attempting to compile to the FPGA I get an error about the small bit of wire (circled in the picture) that is "bounded size" instead of "fixed size."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone knows any alternative methods to perform the type of matrix multiplication I described above, or a fix for the problem I am having with my code, it would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2024 17:22:39 GMT</pubDate>
    <dc:creator>etgohomeok</dc:creator>
    <dc:date>2024-08-13T17:22:39Z</dc:date>
    <item>
      <title>FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851004#M831769</link>
      <description>&lt;P&gt;Hi, I am attempting to use the Linear Algebra Matrix Multiply function in Labview 2013. I am attempting to multiply a 288x576 matrix by a 576x1 vector. The matrix is loaded from a file on the host computer and sent via a DMA FIFO to the target, and the vector is (for now) just filled with constants. In the future, the vector will be populated by data from an I/O module attached to the FPGA unit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wondering if anyone knows about/has any experience with using the Linear Algebra Matrix Multiply function to multiply a constant 2D matrix by a vector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached a screenshot of my current attempt at a solution to this post. Because FPGA only supports 1D arrays, I have the matrix coming into my timed loop as a 1D array with a length of 288 * 576 = 165,888. I then take the first 576 elements using the Array Subset function and feed them into the Matrix Multiply function. The next iteration takes the second 576 elements, then the third, etc. Each of these sets corresponds to a row of my matrix, so I am effectively feeding the matrix in one row at a time, which is the type of input I have the Matrix Multiply function configured to accept (see the screenshot of the dialog attached).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue with my current solution is that the Array Subset function does not return a fixed-size array unless the "index" input is wired to a constant (&lt;A href="https://www.ni.com/docs/en-US/bundle/labview-fpga-module/page/using-fixed-size-arrays-in-fpga-vis-fpga-module.html" target="_blank" rel="noopener"&gt;https://www.ni.com/docs/en-US/bundle/labview-fpga-module/page/using-fixed-size-arrays-in-fpga-vis-fpga-module.html).&lt;/A&gt; For my application, the index at which I take the subset needs to change, and so the type of the wire coming out is labeled as "bounded size" instead of "fixed size." The code I attached a screenshot of performs as I would like it to when I run it on the development computer, however when attempting to compile to the FPGA I get an error about the small bit of wire (circled in the picture) that is "bounded size" instead of "fixed size."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone knows any alternative methods to perform the type of matrix multiplication I described above, or a fix for the problem I am having with my code, it would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 17:22:39 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851004#M831769</guid>
      <dc:creator>etgohomeok</dc:creator>
      <dc:date>2024-08-13T17:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851288#M831825</link>
      <description>&lt;P&gt;That is a lot of resources you will be eating up. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;FYI: Last I looked you can't have a Quotient &amp;amp; Remainder Function inside a SCTL. Also, if each segment is 576 elements long, why are you using a quotient &amp;amp; Remainder function? Shouldn't you be multiplying by 288 instead?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Taking an array segment like this will not work because LabVIEW FPGA in it's current state isn't aware that the constant that you are feeding into the Array subset is a multiple of the fixed array size, and there are no checks to prevent the start location to be within bounds.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happens when you want to take the 289th segment?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In regards to breaking up a complex array I have come across this issue before.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are two ways (architecturally) to do this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both ways share a common technique.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you have a 1D array that essentially represents a 2D array, you need to have a mechanism to break up this large array into smaller 576 element chunks.&amp;nbsp; You cannot do this with the Array Subset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a choice to make for architecture.&lt;/P&gt;
&lt;P&gt;1.)&amp;nbsp;&amp;nbsp;&amp;nbsp; Have your array creation mechanism work in parallel with your Matrix Multiply, using parallel pipelining techniques, where you must have timing/syncing in place to ensure clean data out. (This is not for faint of heart, and suggest you don’t do this)&lt;/P&gt;
&lt;P&gt;2.)&amp;nbsp;&amp;nbsp;&amp;nbsp; Create a state type architecture (much easier)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In one state you will have a “Create Array”, and in the other you will have a “Multiply”&lt;/P&gt;
&lt;P&gt;All arrays will be fixed size. In the “Create Array” state you will extract a single element from your “multiply” array and inject it into your defined array that is 576 elements long.&amp;nbsp; After this array is filled you then transition to the “Multiply”&amp;nbsp; state. You will then monitor the “Output Valid” boolean. Once this boolean is true you go back to the “Create Array” state. Repeat 288 times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that explains things. It might sound complex, but it isn’t really that hard.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don’t have LabVIEW FPGA installed on my PC at the moment, or else I would show you a picture. If you need more help, I can make this on my home PC tonight.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 22:30:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851288#M831825</guid>
      <dc:creator>MrQuestion</dc:creator>
      <dc:date>2014-05-15T22:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851506#M831881</link>
      <description>&lt;P&gt;Have you looked at the Matrix*Vector VI which is in the Math/Control palette? &amp;nbsp;It looks like a simpler way to do what you want, given that your Matrix is constant.&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2014 03:12:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851506#M831881</guid>
      <dc:creator>GregSands</dc:creator>
      <dc:date>2014-05-16T03:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851514#M831883</link>
      <description>&lt;P&gt;Oops, just noted that the maximum array size for Matrix*Vector is 50x50. &amp;nbsp;That won't work for you. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &amp;nbsp;Unless perhaps you can break both your Matrix and Vector up into 288x50 and 50x1 segments, and recombine the results after?&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2014 03:25:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2851514#M831883</guid>
      <dc:creator>GregSands</dc:creator>
      <dc:date>2014-05-16T03:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2852274#M831991</link>
      <description>&lt;P&gt;Have you made any progress on this yet?&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2014 14:03:16 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2852274#M831991</guid>
      <dc:creator>MrQuestion</dc:creator>
      <dc:date>2014-05-16T14:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2852292#M831995</link>
      <description>&lt;P&gt;Have you tried using the Row-wise or Column-wise element interfaces? Since the matrix is coming from the host one element at a time using the elemental interface will allow the Matrix Multiply to buffer things internally in the most efficient manner.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/docs/en-US/bundle/lvfpga-api-ref/page/vi-lib/rvi/linearalgebra/matrixmultiply/xnode/nifxpla-matrixmultiply-xnode.html" target="_blank" rel="noopener"&gt;https://www.ni.com/docs/en-US/bundle/lvfpga-api-ref/page/vi-lib/rvi/linearalgebra/matrixmultiply/xnode/nifxpla-matrixmultiply-xnode.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 17:24:37 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2852292#M831995</guid>
      <dc:creator>Dragis</dc:creator>
      <dc:date>2024-08-13T17:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2856460#M832789</link>
      <description>&lt;P&gt;Hi, I'm not sure as to how I would extract the single element from the multiply array if the array is being stored on the FPGA target. Would that not require the use of the Index Array or Array Subset functions, which return bounded-size or variable-size arrays unless the index input is a constant?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm also worried that switching between states in such an archecture would slow the processing. For this particular application, the large matrix will be a fixed constant for the duration of the program (it is a "calibration" matrix of sorts that is loaded from a file on the host computer's disk at the beginning of the program's execution and does not change until a new calibration is done). The 1D array that is being multiplied by it will be populated by data from a sensor. As such, I would ideally like to only create the calibration array once then stay in a state where I'm constantly reading data from my sensor and multiplying it by my calibration matrix. I believe that if the program is frequently switching to a new state that reads bits of the calibration matrix from the DMA FIFO, I wouldn't be able to achieve the rapid processing that I'm aiming for with the FPGA. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GregS, I was initially trying to use that particular VI, but as you said, it has the 50x50 limitation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dragis, I've looked into those interfaces rather than the Row Vector and Column Vector interfacs, however the latency jumps from ~1500 to over 300,000 clock cycles, which is too slow for this application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've considered the possibility of having 288 separate arrays and wiring them manually through switches so that I can cycle through them. Would that perhaps be the best (although also the most painful) solution that will retain the processing speed I'm hoping to achieve?&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2014 16:14:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2856460#M832789</guid>
      <dc:creator>etgohomeok</dc:creator>
      <dc:date>2014-05-20T16:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2856562#M832808</link>
      <description>&lt;P&gt;When you replace array element in a fixed array the output is a fixed array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If timing is a consideration you can always create a new clock, and do your Multiplication in a different time domain.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many ways to optimize designs depending on your needs. The linear algabra matrix that you are using is based off of fabric; and a lot of it, so you will probably hit an upper clock limit fairly fast. I'm kinda surprised that you aren't hitting clock timing violations already in a 40Mhz time domain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Of course once you create the calibration matrix you wouldn't create it again. It would be stored in a shift register. You would never go back to that state again, unless you want to.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What type of FPGA are you using? There are many tricks to manage and manipulate large datasets in LabVIEW FPGA.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Depending on your FPGA you can really take advantage of the DSP48e Multiply and Accumulate function with a Dot Product algorithim. The DSP48e has no problems chunking away at data at a much higher clock speed.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, are you familer with the LabVIEW FPGA IP Builder? &amp;nbsp;If you do take the split up in 288 separate array approach the FPGA IP Builder will save you alot of time.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 17:25:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2856562#M832808</guid>
      <dc:creator>MrQuestion</dc:creator>
      <dc:date>2024-08-13T17:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2948796#M851114</link>
      <description>&lt;P&gt;I'm attempting a similar thing. I wrote the following code which doesn't work as expected?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ni.lithium.com/t5/image/serverpage/image-id/151172iA359D7BD9F45BFC7/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="FPGA Multiply By Constant Matrix BD.png" title="FPGA Multiply By Constant Matrix BD.png" align="middle" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ni.lithium.com/t5/image/serverpage/image-id/151170iF4356455264E01A7/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="FPGA Multiply By Constant Matrix FP.png" title="FPGA Multiply By Constant Matrix FP.png" align="middle" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was expecting this to work and I can't see why the first result is just repeated. I guess it has something to do with the hand-shaking, but I have no clue how to make it work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone help out? Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2014 14:04:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2948796#M851114</guid>
      <dc:creator>dfjuggler</dc:creator>
      <dc:date>2014-08-11T14:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2950414#M851413</link>
      <description>&lt;P&gt;Hi dfjuggler,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this part stood out to me:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/deb500fe43e9dc1cb43aa2996f1c0b0cbe82af1f/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31353132373069303937373443434230334143384630392f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Capture.PNG" title="Capture.PNG" align="center" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try just passing the array out? &amp;nbsp;I don't think you should need to index. &amp;nbsp; Also, since you're indexing at 0 each time, you're passing the same value into the new array.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2014 16:27:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2950414#M851413</guid>
      <dc:creator>Matt_L</dc:creator>
      <dc:date>2014-08-12T16:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2951309#M851577</link>
      <description>&lt;P&gt;Thanks Matt, the thing is that the configuration I've set for the high-throughput matrix multiply VI outputs a 1D array of one element. The Index Array VI is basically there to turn the 1D array into a scalar. I was hoping that the first iteration of the For Loop would make the inner SCTL ouput the first result and so on with the second.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've explored the process a bit more and realised I wasn't passing the second row of A at the right time. To illustrate the process I created arrays with the values for different signals part of the handshaking and got this result:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ni.lithium.com/t5/image/serverpage/image-id/151383i923419F076ACFEEF/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Multiply By Constant Matrix v02 BD.png" title="Multiply By Constant Matrix v02 BD.png" width="483" height="306" align="middle" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ni.lithium.com/t5/image/serverpage/image-id/151385iA658557BDA5BA5DE/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Multiply By Constant Matrix v02 FP.png" title="Multiply By Constant Matrix v02 FP.png" width="269" height="228" align="middle" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems that one needs to input the values for A and b during iterations 0 to 2. The results come 10 cycles later, at iterations 10 and 11. It should also be noted that during iterations 5 and 6, new values for A and b are being loaded, which means those will be used to provide results at 14 and 15. Similarly with values loaded on iterations 9 and 10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was intending to use this code as a SubVI, so I'm not sure it would work as is. It feels like I should be doing a cleverer management of the handshaking signals. For the time being, for this particular application I'll be using the Matrix*Vector block from the FPGA Math &amp;amp; Analysis &amp;gt;&amp;gt; Control palette. I've still got some studying to do regarding high-throughput VIs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 11:03:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2951309#M851577</guid>
      <dc:creator>dfjuggler</dc:creator>
      <dc:date>2014-08-13T11:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: FPGA constant matrix times a vector using Linear Algebra Matrix Multiply</title>
      <link>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2951539#M851622</link>
      <description>&lt;P&gt;From experience I caution the use of SCTL within a subVI.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is very possible that you will experience clock domain issues, and get compile errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless you intened to use some type of shared memory exchange, or FIFO where this is technically no longer a "subVI" but a parallel process. (FPGA's are good at this)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As soon as I get my home license going again I can create some sample code that will demonstrate the usage of the feedback nodes.&lt;/P&gt;
&lt;P&gt;(I wonder when NI will get completly on the cloud bandwagon where I can just log onto NI and use the full version of LabVIEW.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The "ready for A", and "ready for B" outputs are important feedback indicators.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without feeding back these outputs in the next iteration there is no way of telling where you are in the processing pipe. If you know the configuration of the IP (such as how long the processing pipe will be) you might be able to get away without using feedback, but it is more complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the "output valid" output is is used to literally tell you when the output is valid.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at this&amp;nbsp;&lt;A href="https://www.ni.com/docs/en-US/bundle/labview-fpga-module/page/optimizing-fpga-vis-using-pipelining-fpga-module.html" target="_blank" rel="noopener"&gt;Pipelining to Optimize FPGA&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The matrix VI that you are using utilizes pipelining. As you can see from the diagrams on that page any data that you get out of this Matrix VI is junk unless this "output valid" is high.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-good luck&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 17:25:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/FPGA-constant-matrix-times-a-vector-using-Linear-Algebra-Matrix/m-p/2951539#M851622</guid>
      <dc:creator>MrQuestion</dc:creator>
      <dc:date>2024-08-13T17:25:56Z</dc:date>
    </item>
  </channel>
</rss>

