05-17-2014 02:35 AM
Hello everyone in this forum. This is the first time here 🙂
I have a problem with reading values from my FPGA block memory.
In summary, this is bit counter for each word in Huffman tree.
In first times it completes while cycles correctly, but later it starts to read uncorrect values from memory addreses which it has already read several times.
I am new in LV and in LV FPGA. Could someone suggest a solution?
Thanks
05-18-2014 02:59 AM
Your usage of front panel elements in this case may be hurting you.
Any element on your main panel will be more than just a register in the fabric of the FPGA.
When you compile that code LabVIEW will generate IP for the front panel element that will allow any data present to be sent to the host processor. So, that front panel element turns into a shared resource.
If you look in the help files of LabVIEW Help Files or
http://zone.ni.com/reference/en-XX/help/371599F-01/lvfpgaconcepts/parallel_data_transfer/
Your front panel element will have multiple assessors.
This may be a very bad thing for you because you are trying to use a front panel element as a feedback node.
This method works in the regular LabVIEW word, but in LabVIEW FPGA word you should really be using feedback nodes to prevent loss of data. (Leave it to National Instruments to create a scenario on a FPGA for a chase condition, if you program in VHDL you would find that comment very funny.)
I don’t understand your usage of “Address”, I think you are trying to use this as a feedback node.
I highly suggest that you break this down into states. And use a state machine.
I also highly suggest that you use feedback nodes or shift registers for iterative data.
I have written Huffman encoding programs before for some very large datasets. I am curious to know how you are getting data into the FPGA? If you are using an array on a front panel element this will eat your resources like candy, so don’t do that.
This will give you some ideas. https://decibel.ni.com/content/docs/DOC-6375
I in no way believe that the examples shown on this site are examples that should be practice, but it gives you an example of how to implement a state machine and a few examples of feedback nodes.
-good luck.