11-01-2020 09:52 PM
All
I am trying out the matrix multiplication via Linear Algebra Matrix Multiply. Attaching the project where you should see the T_PZ.vi.All I am trying to do is to understand how this works. When I use the VI in FPGA simulation mode, I see weird results - not wrong but repeated numbers out of which a subset is the correct answer.
I don't see very many examples on web either. Anybody?
Solved! Go to Solution.
11-02-2020 09:12 AM
I would switch the FIFO Write Interface to use Handshaking (it is set to Timeout). You can then use its output to handshake with the matrix function and remove the case structure.
Timeout is not used as much any more (though it is still the default setting). That reminds me to put that request into the Idea Exchange.
11-02-2020 02:25 PM
Thank you for your reply. Something like this?
11-02-2020 03:54 PM
That's better. Next would be to switch the Read FIFO to handshaking mode and read only when Output Valid is true.
Get number of elements to read is not being used correctly (see https://zone.ni.com/reference/en-XX/help/371599P-01/lvfpga/fpga_fifo_num_elem_read/). If you use the handshaking, you do not need this function. What do you want to do with the data afterwards?
11-02-2020 04:44 PM
I tried that its the same results as previous effort. But a noob question - wouldn't the extra elements point to me writing to FIFO when I shouldn't be writing?
It almost seems like output valid is high for multiple cycles after i get the first valid output and it spews the same redundant result - confused as to why that will happen?
11-03-2020 06:03 AM
That's because a valid and b valid keep getting true values coming in.
Check out https://zone.ni.com/reference/en-XX/help/371599P-01/lvfpgaconcepts/fpga_handshaking/ to see more on how handshaking works in a more generic example. The issue you are facing is not specific to the matrix function.
11-03-2020 11:19 AM
Thank you!
I do understand the idea behind a and b being valid.
But outside of ready for a and ready for b I am not sure what other knobs I have to wire back?
I tried this, and it seems to work.
11-03-2020 03:03 PM
It doesn't make sense to wire "ready for a" into "a valid."
Ready for a (or b) gets wired back to the source, the function before the multiply. Do you know what will replace the control?
11-03-2020 03:28 PM
It'll be very similar to what i have on here. It'll be a matrix. In this case, I want to pass 2 vectors which grouped together constitute a matrix.
12-10-2020 08:59 AM