03-09-2013 01:11 AM
hi! i am trying to do pilot insertion using labview fpga. the problem is that i can't seem to figure out how to insert elements into array without changing the size of the array. since this is not allowed in fpga labview, i am having problems implementing pilot insertion. can anyone please suggest anything that i can do so that i can insert elements into an array without changing the size of the output but also without replacing the element on the index where i need to insert the element? thanks very much!
03-09-2013 10:34 AM
How are you planning to add an element, without replacing any existing ones, and also not increasing the size?
It's like asking how, if you have 10 toys, you can buy another toy, not get rid of any of your existing toys, and still have only 10 toys.
It doesn't make sense.
03-09-2013 02:02 PM
You need to define an array at the maximum size you ever need and keep the information on the location of the last valid element elsewhere, for example.
03-09-2013 03:15 PM
thanks for your reply. one solution i was thinking of was when i need to insert a new element on a certain index:
1. shift the elements of the array to the right (but the shifting will only start after the index where the new element would be inserted)
2. insert the new element
but i can't seem to think of a way to do the shifting array such that only selected elements in the array are shifted. thanks very much!
03-09-2013 08:23 PM
Can you tell us why you are doing this, and maybe we can tell you a different how to do it that would be easier? You may want to pass the values to be inserted off to the RT. Let the RT manage the array (if you can).
03-15-2013 07:06 AM
03-15-2013 09:22 AM
Hi,
what for(imstuck) said.
I feel we need to know something more abput the big picture of your problem, not the tiny portion of it you're focusing on.
Regards
Florian
03-15-2013 10:59 AM - edited 03-15-2013 11:00 AM
Insert array will do what it says, insert an element into the array, AND resize it accordingly.
If this is not what you want it to do, you should not use Insert Array!
Instead you would have to do some work of this on your own. The principle would be to allocate a fixed size array in the beginning and maintain how many elements are already in the array. If you now need to insert some data into the array you first move all the data beyond the insertions point by the number of elements that you want to insert. Then copy the data into the array and finally update the bookkeepng about how much data is really in the array. Not as convinient as using a ready made node, but also no rocket science by far.
There are no out of the box functions that allow to insert data into an array without resizing the array, which is what you want to avoid for the FPGA code.
03-15-2013 11:54 AM
One of the data elements is going to get left out in the cold. How do you determine which it is?
03-15-2013 07:00 PM
For the bigger picture, I am trying to develop an OFDM physical layer. I am now in the subcarrier allocation and pilot insertion blocks. So after I have suballocated the symbols (into an array of 1440 symbols), I am now trying to insert some pilot symbols into the array and this is where the problem starts.