Forum Discussion
Altera_Forum
Honored Contributor
16 years agostrange behaviour of square root VHDL code
I need a plain VHDL-square root code for a special purpose and used "google code search". I thus found the following code in their files, obviously written by Altera. http://www.google.com/c...
Altera_Forum
Honored Contributor
16 years agoMy Appologies, I assumed you were talking about floating point.
The best thing to do may be to look into the floating point algorithm and use the new fixed point libraries from IEEE. VHDL '93 compatible version available from http://www.vhdl.org/fphdl/ This does NOT contain a square root function, but tracking the integer/fractional bits is now SOOO much easier. This code can be compiled by any compiler. And when all vendors catch up with the new VHDL 2008 standard, it will all be built in.