Matrix Operations Using HDL Coder
显示 更早的评论
Hi folks,
I understood reading from other questions how matrix operations could be done using HDL Coder, 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
2 个评论
Sivakumaran Chandrasekaran
2016-1-13
HDL coder is for implementing using VLSI Technology, are you developing any application using VLSI?
Mateus Silva
2016-1-19
回答(2 个)
Walter Roberson
2016-1-13
0 个投票
The restriction is only on the I/O level. You can use a Reshape Block to shape the data as vectors, do I/O on the vectors to send them to the device, then inside the device you can reshape them back to whatever you want and proceed with matrix operations that Simulink would be happy to generate code for you.
类别
在 帮助中心 和 File Exchange 中查找有关 Code Generation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
