필터 지우기
필터 지우기

Error when converting design from Matlab Simulink to HDL

조회 수: 12 (최근 30일)
Ho
Ho 2023년 6월 19일
편집: Kiran Kintali 2024년 6월 28일 13:46
I am a newbie here. I really hope someone can help me with this problem. I made a simple design using simulink and did it convert it to VHDL language however it throws an error: "Slope and bias scaling 'sfix64_S9p765625en13' is not supported for HDL code generation. Slope must be equal to a power of 2, and bias should always be 0". I've been messing around for a week but haven't fixed it yet. I very much hope maybe someone knows how to solve it here. Thank you so much everyone.
This is the file simulink:
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 6월 19일
How did the sfix64_S9p765625en13 output get chosen?
The error is effectively saying that it is not permitted for VHDL purposes to have a conversion which is (INTERNAL times 9 plus 765625) and that instead you have to use (INTERNAL times 2^some_power + 0) . Or to put it another way, you can only use power-of-2 scaling, EXTERNAL = 2^N * INTERNAL for some integer N.

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

답변 (1개)

Kiran Kintali
Kiran Kintali 2023년 6월 19일
The model has an incorrect/undefined type specification. You need to use the fixdt(1,64,32) syntax.
In addition, please note HDL Coder does not currently support Slopbias scaling. Hardware friendly binary point scaling is suitable for HDL Code generation.
  댓글 수: 2
Andrew Sol
Andrew Sol 2024년 6월 28일 10:43
What does the notation fixdt(1,64,32) mean?
Kiran Kintali
Kiran Kintali 2024년 6월 28일 13:00
편집: Kiran Kintali 2024년 6월 28일 13:46
>> a = fixdt(1,64,32)
a =
NumericType with properties:
DataTypeMode: 'Fixed-point: binary point scaling'
Signedness: 'Signed'
WordLength: 64
FractionLength: 32
IsAlias: 0
DataScope: 'Auto'
HeaderFile: ''
Description: ''
>> b = numerictype(1,64,32)
b =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 64
FractionLength: 32
>> range(b)
ans =
1.0e+09 *
-2.1475 2.1475
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 64
FractionLength: 32
>>

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

카테고리

Help CenterFile Exchange에서 Fixed Point에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by