LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to replace a large shift register with a FIFO

Hi there,
 
I have produced a VI which does what I want but when I have come to transfer it to the FPGA on the 7811R card the compilation time is vast >4days.
I believe this must be due to the large array that I use for a shift register 1024 elements, I therefore would like to replace this with a FIFO if this is possible but due to being new at writing for the FPGA I am out of my depth a bit.  Could somebody point me in the right direction or show me an example of how I could achieve this?  I have attached my current vi and a picture of it.
 
Any helpis greatly appreicated as I have been going around in circles for days now.
 
Cheers
Nigel
Download All
0 Kudos
Message 1 of 18
(5,220 Views)
Hi Nigel,

first of all: to add up arrays you don't need to make clusters of them, unbundle the clusters and add all single elements. Just use the 'add array elements' from the math palette!
Why do you use shift reg A-H? You just shift values starting from reg A through all registers. Just make one shift register holding 8*10=80 values!

Message Edited by GerdW on 06-23-2006 01:58 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 18
(5,205 Views)

Hi GerdW

Unfortunately when using the pallette in conjunction with the FPGA module "add array elements" does not exist so the only way I could think of obtaining the total was to convert to a cluster.  Also when I then converted to a cluster for some strange reason it would only produce a cluster of 8-9 elements hence my need to divide the shift register into A-H originally I just had a single shift register of 64 elements and used the add array elements fromthe numeric pallette to get the total but as mentioned this all went to pot when I tried to implement it using the FPGA module.

Cheers

Nigel

0 Kudos
Message 3 of 18
(5,200 Views)
Hi Nigel,

to add up an array (without 'add up array' 🙂 you should use an auto-indexing for loop.
To change the number of elements of 'array to cluster' right-click this function and you will find a property to change the number of array elements. But to unbundle big clusters just for addition of the elements it's a very uncomfortable way...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 18
(5,194 Views)
The reason the cluster was only 9 elements is because that's the default for the conversion function.

You can change it by right clicking on the "cluster to array" function...

At least in 7.X.  I'm trying this in LV8, but nothing's showing up in the context menu?  Have they changed it in 8 to accept whatever?
Message 5 of 18
(5,193 Views)

Thanks for that I though it was a bit strange that the cluster could not be resized properly.  Unfortunately I am the reason for using the FPGA is that I require this vi to execute on a sub micro second time period so I don't think the use of the auto indexing for loop will work as it will delay the execution too much - am I correct in thinking this, I realise that unbuncling the cluster just to add the elements is very clumbersome but I think it may be nrequired.

My main sticking point, however, is the large array (1024 elements) whcih is used to delay the incoming signal and form a delayed strobe - can this be replaced with something more efficient i.e. FIFO so that the vi will compile in a reasonable time?

Thanks again,

 

Nigel

0 Kudos
Message 6 of 18
(5,182 Views)

Hi Nigel,

Your compilation time would be reduced by removing the conversion between arrays and clusters.

I have modified your code so as to maintain the same functionality but improve performance by avoiding array to cluster conversion.

I have attached the modified version of your code to this post, named "VimodImpl.vi".

I hope that this helps you.

I also was wondering if you could tell me what processor and size of memory you have on your compilation machine?

Regards,

Emma Rogulska

NIUK & Ireland

0 Kudos
Message 7 of 18
(5,136 Views)
Hi,
 
Thanks for the help but unfortunately I am currently using LabView 7.1 and socould not load your VI, could you possibly post a screenshot of it?  I will get back to you with regards to the full spec of the hardware that I am using for this as I am currently away frommy lab.
 
Thanks again,
 
Nigel
0 Kudos
Message 8 of 18
(5,126 Views)
0 Kudos
Message 9 of 18
(5,126 Views)

Many thanks for that it tidies up the vi a lot.

However, my major problem still stands and that is caused by the large array.  I have now discovered that this will simply not compile without causing errors, hence my initial question as to if it was possible to replace these arrays with a FIFO?  I will post more details when I can get a print out of the errors tomorrow.

Regards

Nige

0 Kudos
Message 10 of 18
(5,119 Views)