A while back my student developed a work to produce non-linear functions for FPGA through various linear approximations and lookups with the goal to minimize hw resources while maintaining good and quantifiable accuracy.  It included arctan among others:

S. M. H. Ho and H. K. So, "NnCore: A parameterized non-linear function generator for machine learning applications in FPGAs," /2017 International Conference on Field Programmable Technology (ICFPT)/, 2017, pp. 160-167, doi: 10.1109/FPT.2017.8280134.

Code:

https://bitbucket.org/hku-casr/nncore/src/master/

It's a bit dated but may be worth taking a look.

Hope it helps.

--Hayden



Bob Stricklin wrote on 13/12/2021 11:54 PM:
Consider making a lookup table. If your accuracy requirements and space will 
allow it. This is the way things use to be done before calculators and 
computers and it will work in a lot of cases.

Bob Stricklin

On Dec 13, 2021, at 6:55 AM, baldwin <[email protected]> wrote:

Hi Guys,

Quick question; I'm just wondering what is the best way to calculate arctan on 
the FPGA? I am currently using the Xilinx CORDIC block to take I and Q and use 
them to calculate phase, but have found this to give unreliable data. While it 
sometimes gives out the correct phase value, it often just gives completely 
nonsensical results. Just wondering if anybody else has ever had similar issues.

All the best,

Eoin.

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/6a1e1ff7f781ec963db9c826b973adec%40cp.dias.ie.

--

/**********************************************************
* Hayden Kwok-Hay So
* Associate Professor
* Department of Electrical and Electronic Engineering
* Program Co-director, Computer Engineering
* Co-director, Joint Lab on Future Cities (JLFC <https://www.jlfc.hku.hk>)
* PI, Computer Architecture and System Research Lab (CASR 
<https://casr.eee.hku.hk>)
* The University of Hong Kong
*http://www.eee.hku.hk/~hso
**********************************************************/

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/697beb2c-a22c-7085-664e-c6d2603aa53a%40eee.hku.hk.

Reply via email to