HDL Coder atan / atan2

조회 수: 4 (최근 30일)
TS
TS 2017년 6월 23일
댓글: TS 2017년 7월 5일
Hi, I want to implement an algorithm containing atan2 in HDL with the HDL Coder. The trigonomic function block is supported (hdllib). Atan2 is avaiable for use with CORDIC and fixed point, yet the HDL Coder states that the Block is not supportet. How so?
If the block realy is not supportet, what are my options to implement atan2 or at least atan in HDL using the HDL Coder?

채택된 답변

Kiran Kintali
Kiran Kintali 2017년 6월 23일
currently, atan2 is supported with single inputs.
CORDIC Atan2 with fixpt inputs is on the roadmap. What is the fixpt input wordlength you expect to use? if it is small wordlength you can use a lookup table. if it is large you are better off using the single precision solution which supports a large dynamic range.
thanks

추가 답변 (2개)

Bharath Venkataraman
Bharath Venkataraman 2017년 6월 23일
You can use the Complex To Magnitude Angle block which does atan2 using CORDIC.
  댓글 수: 1
TS
TS 2017년 7월 5일
Thanks for this idear. Works well

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


TS
TS 2017년 6월 23일
Hi, Thanks for the quick answer. And atan is also not supported for fixed point implementation? Please note that im on 2016a so i cant use native floating point support. Is there an integrated way in matlab to generate a lookup table in my desired fixed point format (fixed 16,10)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by