complete construction, environmental and economics information of biomass com...
Matlab to vhdl
1. Matlab to VHDL
Code Conversion
A Tutorial by:
http://appliedelectronicsengineering.blogspot.com
VHDL
2. Introduction
In this tutorial we show how a to write a
Matlab function code and covert it to a VHDL
code. We will write a simple multiplexer
code for the purpose of illustration.
Send Feedback to:
http://appliedelectronicsengineering.blogspot.com
3. • Create a new Project in Matlab
and create a Function File
named mux_func(a,b,sel)
• Save the function file with name
mux_func.m
Step1: Create a Function File
http://appliedelectronicsengineering.blogspot.com
4. • Create another script file enter
the code as shown
• Save the script file with some
name like test.m
• This script file is used to test the
function mux_func that was
created earlier
Step 2: Create a script file
http://appliedelectronicsengineering.blogspot.com
5. • Run the test file to ensure
that the function works as
intended
• To do this just click on the
Run button in the Editor tab
Step 3: Run the Test file
Run
Editor
Tab
http://appliedelectronicsengineering.blogspot.com
6. Select the APPS tab and click on the HDL Coder
Step 4: Select HDL Coder
7. Step 5: Specify Project Name to your
HDL Code Project
Once you click the HDL coder in step 4 a window will pop up just like the
one below where you can specify a project name for you HDL coder
project with the name of your choosing. In this case mux_hdl was given
as project name
8. Step 6: Select File to Convert
The HDL Coder screen will open as shown
http://appliedelectronicsengineering.blogspot.com
9. Browse for the Files
Click here to Add
MATLAB function
Add the function file
mux_func to convert