HDL Coder - reducing size of fixed-point variables

1 回表示 (過去 30 日間)
Mark Hoffmann
Mark Hoffmann 2019 年 6 月 29 日
回答済み: Bharath Venkataraman 2019 年 7 月 9 日
When running HDL Coder a fixed-point version of my MATLAB-script is generated as 'example_fixpt.m'.
In this script the function 'fi' is applied to all variables, e.g.:
test=fi(pi, 1, 16, fm);
If I run 'whos' (in example_fixpt.m) I'm told the new variable (type 'embedded.fi') uses 428 bytes.
Can I somehow reduce the size of fixed-point variables?
Does this mean my VHDL-code will also make use of variables this big?

回答 (1 件)

Bharath Venkataraman
Bharath Venkataraman 2019 年 7 月 9 日
The number of bytes taken to store the fixed-point variable in MATLAB does not determine the number of bits in HDL. te number of bits in HDL will be determined by the wordlength of the fi variable, so in your case, the HDL code will contain a signal of 16 bits.

カテゴリ

Help Center および File ExchangeFPGA, ASIC, and SoC Development についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by