Matlab C code or VHDL code import?
3 views (last 30 days)
Show older comments
- Does MATLAB allow imports of existing C code and/or VHDL code so that development/further design work can be done via the MATLAB interface?
- Can state machines and documentation be generated as part of the import process?
- How can the above be achieved and if there are any related documentation available?
- Can Simulink be setup so graphical programming can be done as part of designing and the related code in C or VHDL can be output?
Thanks...
0 Comments
Accepted Answer
Tim McBrayer
on 8 Dec 2014
For HDL Coder's side, you can import arbitrary code using the Black Box capability. It is well documented and has examples that ship with the product. See http://www.mathworks.com/matlabcentral/answers/26561-vhdl-code-as-a-black-box-subsystem for further details.
I'm not quite sure what you mean about' generating a state machine or documentation during the import process'; the imported text is whatever it is; there is no generation of anything except the interface to the imported code, into the rest of the generated code.
Your third question's answer is 'of course'. This is the entire purpose of the C and HDL coders that take Simulink models as inputs; it's their reason for existing. You create a design in Simulink with certain tool-specific limitations, and then you can generate C or HDL code from the design.
More Answers (0)
See Also
Categories
Find more on HDL Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!