05-02-2017 01:30 PM
I want to write a complex array to target to host FIFO for cross talk between host and FPGA. But FIFO accepts only scalar as I see.
How to achieve this?
05-02-2017 06:13 PM
I was working through something similar today too.
Yes, if you are doing Target to Host FIFOs, you can only input scalars, and a scalar gets written to the FPGA-side memory of the FIFO once each clock cycle.
There are a few ways to try this. What I did was, instead of using arrays, i packed bits into larger packets. So my algorithm has two 16-bit outputs. I pack those into one 32 bit and transmit to the host.
You can also index the array. Or, combine the two approaches - I had an 8 element array, and i tried indexing it (i used hte Index Array function and dragged it down to have 8 outputs) and then packed those into packets to send to the host.
In other words, you have a few options but yes it does need to be a scalar and can't be complex either. For complex values, I usually break it into real and imaginary, and then pack into one integer (i.e. 16 bits for I 16 bits for Q).
05-03-2017 06:31 AM
Hi!
Thanks for suggestions!
Actually mine is 1D 12 array of complex type, basically channel impulse to b used for dot product with data. I need to write it to host to do some calculations and send it back in correct format to the dot product block.
Which method do you suggest? I don't want to slow down the execution too.