HDL Coder giving Conformance error due to fi division
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to convert a matlab code to HDL using the HDL coder.
In my matlab file the following lines
NP_b = bitand(bitshift(uint16(16384), -6), 3);
full_bits = 2;
np_b=1/full_bits^(NP_b+1);
are converted to fixed point equivalent of
fm = fimath('RoundingMethod', 'Nearest', 'OverflowAction', 'Wrap', 'ProductMode', 'SpecifyPrecision', 'SumMode', 'FullPrecision', 'ProductWordLength', 32, 'ProductFractionLength', 30);
np_b = fi(fi_div(fi(1, 0, 1, 0, fm), full_bits^(NP_b + 1)), 0, 1, 0, fm);
function c = fi_div(a,b)
coder.inline( 'always' );
if isfi( a ) && isfi( b )
a1 = fi( a, 'RoundMode', 'fix' );
b1 = fi( b, 'RoundMode', 'fix' );
c1 = divide( divideType( a1, b1 ), a1, b1 );
c = fi( c1, numerictype( c1 ), fimath( a ) );
else
c = a/b;
end
end
At the HDL code generation step there is an error that is thrown, which says "Found an unsupported unbounded loop structure. This loop may be user written or automatically generated due to the use of specific vector expressions or functions."
Could any of you kindly help me with this error please?
2 件のコメント
Shruthi Sampathkumar
2016 年 3 月 1 日
Hi Varuna,
I've the same error. Could you resolve it?
Thanks, Shruthi Sampathkumar.
回答 (1 件)
Kiran Kintali
2021 年 6 月 22 日
Without dut.m and testbench.m files and a MATLAB HDL Coder project it woudl be difficult to do further analysis.
running the following code through fixed-point conversion does not product any error
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!