Conversion of GMM in MATLAB Code to VHDL using HDL Coder
1 view (last 30 days)
Happy New Year. I am a student from UniMap and doing a project by using simulink tool. I encounter a problem that need profession Matlab support.
May I know the way to use HDL coder for the purpose of converting the existing algorithm in MATLAB code which is the "Detection Car by using Gaussian Mixture Model (GMM)" into VHDL code?
The major problem is how to create a testbench for the algorithm since it needs to be used for the conversion or do it has the exist testbench for it?
Your help is really much appreciated. Thanks for spending your precious time to see and reply this message.
Regards, Lee Kuang Shen
Tim McBrayer on 9 Feb 2017
You mention Simulink, but then discuss generating code from MATLAB if I understand correctly. I will answer as if you are generating HDL from MATLAB code.
When you have a piece of MATLAB code that you want to convert to HDL, you need to have a testbench to go along with it. If you've already developed your design you should have testbench code that you have already written to ensure that your design works as desired. You can use it as is or modify it as necessary.
The testbench code should provide inputs to your design, and receive the outputs. These can be processed in any fashion; you can log the data, graph it, manipulate it, or discard it. Any MATLAB code is allowed in the testbench.
The testbench code is not just used for providing stimulus and receiving outputs. It also can define the data type of your input and output ports and potentially the actual data type of all the internal signals in your design.
I recommend that you study the documentation for generating HDL code from MATLAB carefully. The featured examples are designed to introduce and explain the topics that I've touched on here.