From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-17-2014 08:30 AM - edited 04-17-2014 08:31 AM
I bet mine is simpler (and follows the example given in the original post)
04-17-2014 09:06 AM
@crossrulz wrote:
I bet mine is simpler (and follows the example given in the original post)
Tim,
It maybe a better solution for desktop but I dont think it will work for FPGA.
I cannot get it to work in 2012 not sure if 2013 is a bit more cleverer in determining the size of the array subset. It should be easy enough to determine the size if the length is a constant but it seems like the compiler is not happy with that situation (at least not in 2012).
Cheers
04-17-2014 09:24 AM
Thanks for the input - Correct the FPGA will not allow for any 2D arrays. However!
I have used combination from all advice and finally come up with a working solution. the spec changed slightly as the final parity check is on the parity check of the four colums - not the fifth column. Its hard to see but I have simply skipped out the every 5th ouput from the decimited arrary of 50.
Please advise if you think my solution is too heavy on resource and if maybe the loop with X-OR is better. That said for some reason when I use the loop with X-OR the process repeats and gives me different output every other iteration.
please see my solution- i am not saying its the best but its works for now.
04-17-2014 09:35 AM
The LabVIEW FPGA compiler, although it has come a long way, does not support For Loops with shift registers yet. Therefore, it is still hard to implement generic algorithms with compile-time inferred (deferred) array sizes. If you can choose the size of the array up front, then you can use the index array and compound arithmetic node to do parity checks.
Depending on the order of the elements in the node, you can change up the indexing or do some decimation and interleaving to get the format in an order you like (all these rearrangement operations are pretty much free on the FPGA).
04-17-2014 01:52 PM
I just realized that this post wasn't necessarily talking about an implementation inside a Single-Cycle Loop. If the implementation does not requires the SCL, then a solution with shift registers is perfectly valid. The solution I posted will be properly implemented inside a SCL as well.
Sorry if that confused anyone. And I can no longer edit my original post so here you go.