How to deal with math functions like tan,atan in matlab code while converting them to verilog using hdlcoder?
조회 수: 7 (최근 30일)
이전 댓글 표시
I need to convert matlab code to verilog. I tried using hdlcoder,but in my code I have math functions like tan,atan,log etc. which are causing errors during Hdl conversion.It says "The MATLAB design contains constructs that are unsupported for HDL code generation."
Also they are giving errors during fixed point conversion. I tried setting "Keep original types" but still the above error is coming.
Waiting for any help.
Thanks, Susmitha.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Tim McBrayer
2016년 7월 5일
An alternative approach is to use a lookup-table based function substitution. This works better for sin or cos than it does for tan, due to the limited range of the function input and output. Nonetheless, dependent upon your system requirements and input ranges to these functions you can get quite good results at your desired precision using lookup tables as well.
참고 항목
카테고리
Help Center 및 File Exchange에서 User-Defined MATLAB Functions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!