필터 지우기
필터 지우기

Matlab power function passing HDL coder requirements

조회 수: 1 (최근 30일)
Jesus
Jesus 2014년 1월 15일
댓글: Shubham Kapoor 2015년 4월 21일
Which could be the easiest way of realizing the MATLAB function power(a,b) in order to fulfill HDL coder conversion requirements?
According to HDL code generation, none of the power functions are supported.
Thanks in advance.

채택된 답변

Tim McBrayer
Tim McBrayer 2014년 1월 15일
편집: Tim McBrayer 2014년 1월 15일
There are several ways that you could approach this, depending on your data types and value requirements. One big question is, can your exponent be fractional, or is it limited to integer values? You could build a Stateflow chart or write a MATLAB Function block, if using Simulink. You could also build a subsystem that will repeatedly multiply by your value, using only basic blocks.
If generating HDL Code from MATLAB, you can write your own function, using whatever technique you wish.
  댓글 수: 4
Jesus
Jesus 2014년 1월 27일
Okay, i get it. I have realized LUTs for log2, log, sqrt, etc. using the scripts provided in Mathworks:
but i have not tried with exp function. I understand that these functions are not valid for negative entries (it is explicitely written within them).
My question is if it's convenient to follow this structure (LUT table + normalization & leading zeros) and which might be the changes in order to accept negative numbers without losing functionality.
Shubham Kapoor
Shubham Kapoor 2015년 4월 21일
can you help me out?I need to realize LUT for exponential function

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by