Forum Discussion
Altera_Forum
Honored Contributor
14 years agoArithmetics in VHDL
Hi, I need to implement some arithmetic functions in an FPGA (which I never done before) and I have a few questions. I'm currently using a Cyclone IV E dev kit, the actual design will use either C...
Altera_Forum
Honored Contributor
14 years agoMy suggestion is to use the Cordic algorithm coded in VHDL. The Cordic in rotation mode will give you sin(theta) and cos(theta), where you supply the theta. You can then use the Cordic algorithm in vectoring mode to get atan(y/x) and sqrt(x^2 + y^2), which is magnitude. With regards to the power function, I would suggest expansion in a Taylor series and then simply using the large amounts of embedded multipliers in Cyclone IV and up devices to do the multiplication and addition. -James