please help me to fix this error " HDL code generation for fixed point division is only supported when 'RoundMode' is 'Fix' or 'Nearest' "
    조회 수: 3 (최근 30일)
  
       이전 댓글 표시
    
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

%
댓글 수: 0
답변 (1개)
  Kiran Kintali
    
 2021년 6월 30일
        If this is staill an issue please share dut.m (design) and testbench.m (testbench calling the design) and a project file that is used for fixed-point conversion.
Thanks
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

