Efficient packing of data for BlockRAMs, UltraRAMs
이전 댓글 표시
Hi,
I have a system where there's four channels of 18-bit data processed simultaneously and written to a RAM as 4096 words x 4 channels of data. HDL Coder seems to want to instantiate four separate RAMs (appears that way in the Verilog), and Vivado shows this too.
I'd like to see the four channels packed into a 72-bit word and written to one location in an UltraRAM. I specified "ultra" for the RAMDirective, and this "works" - the netlist shows four UltraRAMs in use, so at least we've got UltraRAMs.
But how do I get the data packed into a single 72-bit word? Is that something I need to do in the Simulink diagram?
Thanks,
Charles
채택된 답변
추가 답변 (2개)
Charles
2023년 3월 29일
0 개 추천
댓글 수: 1
Ryan Baird
2023년 3월 29일
There's a function "typecast" for converting between integer and floating point types, keeping the same underlying data (similar to a c++ reinterpret_cast), and there's a function "reinterpretcast" for converting between integer and fixedpoint types while keeping the same underlying data:
카테고리
도움말 센터 및 File Exchange에서 RAM and ROM Blocks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!