How to integrate with Verilog Code Generator with custome approach instead of Simulink?

2 views (last 30 days)
I want to make use of Matlab's Verilog Code Generator using a custom approach instead of simulink. Is this possible? If it is is there resource I can use to get started.
  2 Comments
Michael Tetteh
Michael Tetteh on 10 Sep 2020
I think these are useful links that were provided; given what I was hoping to achieve with HDL Coder might not feasible or even it were it will be a very daunting task.

Sign in to comment.

Answers (2)

Kiran Kintali
Kiran Kintali on 10 Sep 2020
Here are some links that can help in describing the workflow to translate MATLAB to Verilog. Please note you need to follow best practicses of coding for efficient hardware generation.
This example shows how to create a HDL Coder™ project and generate code from your MATLAB® design. In this example, you:
  1. Create a MATLAB HDL Coder project.
  2. Add the design and test bench files to the project.
  3. Start the HDL Workflow Advisor for the MATLAB design.
  4. Run fixed-point conversion and HDL code generation.
This example shows how to create a HDL Coder™ project, generate code for your MATLAB design, and synthesize the HDL code. In this example, you:
  1. Create a MATLAB HDL Coder project.
  2. Add the design and test bench files to the project.
  3. Start the HDL Workflow Advisor for the MATLAB design.
  4. Run fixed-point conversion and HDL code generation.
  5. Generate a HDL test bench from the MATLAB test bench.
  6. Verify the generated HDL code by using a HDL simulator. This example uses ModelSim® as the tool.
  7. Synthesize the generated HDL code by using a synthesis tool. This example uses Xilinx® Vivado® as the tool.
This example shows how to generate HDL code from a MATLAB® design that does image enhancement using histogram equalization.
  1 Comment
Michael Tetteh
Michael Tetteh on 10 Sep 2020
Thanks for these resources. What I am looking to achieve is to interact with the code generator directly through command line if possible where for example I can get it to generate code for say an adder, multiplier etc. Assumming this is possible how do I interface with the code generator and what format should the instructions be written in order to tell the code generator to generator an adder or multiplier.

Sign in to comment.


Kiran Kintali
Kiran Kintali on 10 Sep 2020
web(fullfile(docroot, 'hdlcoder/gs/generate-hdl-code-from-matlab-code-using-the-command-line-interface.html'))
This product help page documents in detail how to use command line workflow to get from MATLAB to Verilog including fixed-point conversion if necessary.

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!