Compiling fixedpt converted code into VHDL
조회 수: 1 (최근 30일)
이전 댓글 표시
We have a matlab code that we compile into VHDL. We have a make file that did this programmatically using something like
codegen -float2fixed fixptcfg -config hdlcfg -args {...} function_name
Since we need more control over fixedpt conversion, we now first run the script made by
fixedPointConverter -tocode spectrometer -script fixpt_conversion
and then we directly compile the generated code with something like:
addpath('./codegen/spectrometer/fixpt')
codegen -config hdlcfg -args {int16(0),int16(0)} spectrometer_fixpt
I have three questions:
- Is this the right way to do it?
- How does it deal with test_bench? The supplied test_bench of course calls spectrometer, not spectrometer_fixpt. Would it automatically adapt it? Or do I need to manually create a version of test bench that calls spectrometer_fixpt?
- How can I compile a subroutine inside spectrometer_fixpt? spectrometer calls function, I want to compile them individually, without having to rerun fixpt converson manually for each of them. Is that possible?
댓글 수: 0
답변 (1개)
Kiran Kintali
2023년 2월 22일
Generate HDL Code from MATLAB Code Using the Command Line Interface
This example shows how to use the HDL Coder™ command line interface to generate HDL code from MATLAB® code, including floating-point to fixed-point conversion and FPGA programming file generation.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!