Forum Discussion
calculator arcsin(x)
Everyone can help me calculator arcsin(x) by VHDL. thanks!
11 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- (other cordic possibly, not sure?) --- Quote End --- i would look into CORDIC methods. - Altera_Forum
Honored Contributor
For a selection of suitable methods, you should specify your intended resolution, number format and design constraints (speed or resource usage optimzed).
- Altera_Forum
Honored Contributor
--- Quote Start --- but how command in vhdl support convert real to integer and it can synthesised? --- Quote End --- to cast from real to integer: signal r : real; siganl i : integer; begin i <= integer(r); But no, it cannot be synthesized. real types CANNOT be synthesised at all. forget about real types. specify a fixed point type you can use instead. Look at this package: http://www.vhdl.org/fphdl/vhdl.html It does support floating point (arrays of bits, not real type) but I wouldnt try and synthesis floating point. You'll have a very slow clock. - Altera_Forum
Honored Contributor
but how command in vhdl support convert real to integer and it can synthesised?
- Altera_Forum
Honored Contributor
you can send for me a example code write by vhdl in case?
- Altera_Forum
Honored Contributor
forget about real/floating point types. instead think about fixed point.
Floating point could be done, but the address part of the LUT would still have to be fixed point. And then with 32 bit results in the LUT (for FP) you'll have a large LUT. Go to fixed point instead. - Altera_Forum
Honored Contributor
LUT to be in 2's complement(signed) as usual.
You convert real from software tool to integers for LUT as usual - Altera_Forum
Honored Contributor
but if we use LUT that mean we processing with real type? so quartus II don't support real type. everyone help me?
- Altera_Forum
Honored Contributor
Indeed, VHDL was designed for simulation only when it started. Then it was realised that it can be done for synthesis, great inventions started from garage and kitchen work...
By the way the netlist language(edif) was invented by two drunk engineers in a pub? really - Altera_Forum
Honored Contributor
or, if you dont want to synthesise it, use the arcsin(x :real) function from the ieee.math_real package.