How to serialize an HDL Coder function with a vector input ?

Hello,
I have a function that I want to convert to HDL code.
The function input is a vector containing around 3000 elements. But when I convert the code and get the resource report, the number of I/O bits is too large for the FPGA to handle, so I read that I should instead feed the vector element by element to reduce the number of I/O bits. I searched in the workflow advisor but didn't manage to find anything to do that. So what is the proper way to do this ?
Thanks in advance

 采纳的回答

You can use mlhdlc_heq.m and mlhdlc_heq_tb.m example files on how to serialize input passed to the design. Thanks.

3 个评论

In the example, it seems to me that they are feeding the function segmented elements through the test bench.
In my case, I need to have all the 3000 elements at the same time in order to operate on them. Is there a way I can serially input the vector and the function will try to store them until they are all arrived ?
I tried using a persistant array and an index in my function and it solved the problem of having large number of I/O bits but it created another problem where the loops in the function are no longer been streamed and the number of adders and multiplers is now large.
Thanks
Nevermind, I think I figured it out.
Thank you very much.
Sir, I'm too facing the same problem. I need to serialise huge vector of elements. Could you please tell me how did you figure it out ? It would be very helpful, sir.

请先登录,再进行评论。

更多回答(1 个)

Can you share you algorithm? You would need to share a design.m and a testbech.m files.
Thanks

产品

版本

R2019b

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by