Compiling fixedpt converted code into VHDL
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Kiran Kintali
le 22 Fév 2023
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.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!