Read multiple values from ArrMem at the same time
Posted: Sun Apr 26, 2015 1:16 pm
Hi Everyone,
I need some help concerning using ArrMem + Read primitives. Let's say I have an array with ~6000 values. I also have a code block which determines the sample that I need from that array. Awesome, that's simple. But what if I need to take more than one sample (let's assume 16) from that array at the moment? Do I need to duplicate Read primitive 16 times? That doesn't sound optimal... I ended up with the schematic similar to the one attached. Is there any easier way to take a few samples from an array at the same moment? Any hack or anything obvious that I've missed? Any other way to store the array? I'd be grateful for pointing me to anything helpful.
I was thinking about using Ruby to somehow implement this kind of functionality myself (taking an array and returning a few samples also as an array) - would that make any sense? I'm worried about synchronizing DSP code block with Ruby code block.
An additional info: you could ask why do I need 16 samples at the same time instead of taking them one by one in the following samples. Well, I will actually put them in a buffer and will use them later one by one but the thing is that during the next sample I might need another 16 to add them to the same buffer, so the Read primitives will be busy with something else anyway. I hope that makes sense. Just thought it might be helpful in case anyone sees some kind of workaround around this.
Btw in the real case scenario it's not even 16 but 64 so I'm really not comfortable with duplicating Read primitive 64 times...
Thanks!
I need some help concerning using ArrMem + Read primitives. Let's say I have an array with ~6000 values. I also have a code block which determines the sample that I need from that array. Awesome, that's simple. But what if I need to take more than one sample (let's assume 16) from that array at the moment? Do I need to duplicate Read primitive 16 times? That doesn't sound optimal... I ended up with the schematic similar to the one attached. Is there any easier way to take a few samples from an array at the same moment? Any hack or anything obvious that I've missed? Any other way to store the array? I'd be grateful for pointing me to anything helpful.
I was thinking about using Ruby to somehow implement this kind of functionality myself (taking an array and returning a few samples also as an array) - would that make any sense? I'm worried about synchronizing DSP code block with Ruby code block.
An additional info: you could ask why do I need 16 samples at the same time instead of taking them one by one in the following samples. Well, I will actually put them in a buffer and will use them later one by one but the thing is that during the next sample I might need another 16 to add them to the same buffer, so the Read primitives will be busy with something else anyway. I hope that makes sense. Just thought it might be helpful in case anyone sees some kind of workaround around this.
Btw in the real case scenario it's not even 16 but 64 so I'm really not comfortable with duplicating Read primitive 64 times...
Thanks!