Matrix multiplication in MATLAB HDL Coder

조회 수: 2 (최근 30일)
Pankaja Tanjore
Pankaja Tanjore 2015년 10월 1일
댓글: Mateus Silva 2016년 1월 4일
Hello,
I have generated 3D point cloud in MATLAB(3-dimensional) and I need to generate HDL code(.vhd) for 3D Point Cloud using MATLAB HDL Coder.
I read from the following link
As i need to get the 3D Point cloud using HDL Coder , it would be grateful if you let me know how this can be handled.
Looking forward to hear from you at the earliest.
Thanks
Pankaja
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 10월 2일
It is not clear why you need matrix multiplication for this purpose?

댓글을 달려면 로그인하십시오.

답변 (1개)

Tim McBrayer
Tim McBrayer 2015년 10월 2일
You will need to algorithmically decompose your required matrix multiplication into its scalar equivalent operations.
Even the simplest matrix multiplications require a large number of scalar multiplies; for example, the straightforward algorithm for 3x3 square * 3x1 column matrices requires 9 scalar multiplications. Multipliers are reasonably scarce on FPGAs; designers need to be conscious of their designs' resource usage and create their model appropriately.
HDL Coder offers the capability to share similar multipliers in a design, time-multiplexing the limited hardware resources to meet the design requirements and device constraints. But, this needs to be guided by the designer. A blind expansion of a matrix multiply is unlikely to satisfy most users.
  댓글 수: 1
Mateus Silva
Mateus Silva 2016년 1월 4일
Hi Tim MyBrayer,
I understood your reply about Matrix Multiplication, but it is not totally clear to me. I've read the manual, and there it says that matrix is allowed. It seems the restriction is that matrix format is not permitted as an input/output in the design top level. Isn't it? I tested it, and I got a HDL code with a sort of for loop responsible for doing the multiplication. In the matlab code, I implemented a function with vectors as parameters. Then, I concatenated them and executed the direct multiplication. I reassigned the multiplication result to output vectors.
So, the problem of doing it is that it will not be possible to execute any kind of design exploration with this generated module. Is that right? Would it have another drawback?
I'm actually trying to implement a control design using state space representation. So, it involves a lot of matrix multiplication and summation. What would be the best way for doing that? Should I implement the algorithm of matrix multiplication manually then?
Thanks a lot !!
Mateus Silva

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by