MATLAB to VHDL/Verilog conversion using Simulink HDL Coder
1 次查看(过去 30 天)
显示 更早的评论
I have a project that requires me to implement my MATLAB code into Altera's DE1 board. Thus, I have done some readings on how to use Simulink HDL Coder to obtain VHDL/Verilog. But the generation of HDL can only be obtained through Simulink model or stateflow chart.
Is there any way to obtain HDL code from MATLAB code itself? I can't draw a Simulink model as well as my MATLAB code contains many "for" loops and Simulink HDL coder doesn't support implementation of "for" block as well.
Please help. Many thanks.
0 个评论
回答(1 个)
Kaustubha Govind
2011-3-11
Why not use the Embedded MATLAB block to insert the portion of the MATLAB code that contains for loops?
3 个评论
Kaustubha Govind
2011-3-14
According to the Embedded MATLAB Library Reference (http://www.mathworks.com/help/toolbox/eml/ug/bq1h2z7-9.html), COS is one of the supported functions.
Rob Graessle
2011-3-15
For HDL code generation the supported EML subset is limited to Fixed-Point Embedded MATLAB functions.
http://www.mathworks.com/access/helpdesk/help/toolbox/fixedpoint/ug/bq4c8a0-1.html
The COS function is not supported, but the CORDIC function is.
http://www.mathworks.com/help/toolbox/fixedpoint/ref/cordiccos.html
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 HDL Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!