필터 지우기
필터 지우기

When generate HDL codes, can not support fixed point division. My dividend has 40 bits of fraction, and the divisor has 20, the result have 20 fractional bits.

조회 수: 2 (최근 30일)
Maybe the question is "En_35"? But I can not find more information in help center.Please help me.

채택된 답변

Walter Roberson
Walter Roberson 2023년 5월 16일
ufix40 divided by ufix20 would give a result with (40-20)=20 bits, but you are requesting en35 which is 35 bits.
You can create a ufix20 result and potentially convert it to _en35 as a separate step, understanding that the bottom 15 bits will not contain useful information.
  댓글 수: 4
Zora Aria Jade
Zora Aria Jade 2023년 5월 17일
Successfully!Do not need a convert block. Change the data type of "2" from ufix2 to unfix41_En36.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by