HDL code generation of simple Discrete Transfer Function Block
6 ビュー (過去 30 日間)
古いコメントを表示
Hi, when I use the TF block and generate the HDL code with double type input data and making all parameters of TF to default / inherited, it works fine.
On the other hand it gives the following error if we choose input data type to fixdt(1,16,0) etc. Error:
Error: "When input of Discrete Transfer Fcn block is floating point, all the internal data-type should be inherited to support HDL code generation. Change data-type setting of 'Discrete Transfer Fcn '"
input block Const : fixdt(1,16,0)
next block : Discrete Block with default settings
Thank You,
0 件のコメント
回答 (2 件)
Bharath Venkataraman
2015 年 6 月 23 日
Is it possible to attach your model? With floating point inputs, the Inherit via Internal Rule setting is required, but it appears that you meet this requirement.
Bharath Venkataraman
2015 年 6 月 25 日
When you change the data to fixed-point, each of the settings on the Discrete Transfer Function block needs to be specified. I suggest figuring out what your coefficient and product settings are, and then the output data type. All the settings should be specified as fixdt(1,WL<FL), where WL is the number of total bits and FL is the number of fraction bits.
One other suggestion I have is not to specify data types a number of times in the ports and in the blocks. You can remove the data type conversions in the ports of the subsystem as well as immediately after inside the Subsystem Data type conversion blocks. Just keep one outside the Subsystem input ports.
With these changes, I was able to generate HDL code for both the floating and fixed point versions.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Model Compatibility Checks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!