Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
you have a couple of options
Altera has some floating point megafunctions, i think Verilog is supported: http://www.altera.com/literature/ug/ug_altfp_mfug.pdf DSP Builder Advanced Blockset has some floating point blocks and full "math.h" support. it generates VHDL: http://www.altera.com/literature/hb/dspb/hb_dspb_adv.pdf you could also try the VHDL 2008 floating point package (there are some modified for VHDL-93 out there). this is not optimized for/by Altera, so i would expect the lowest fmax and highest resource usage out of the 3 - Altera_Forum
Honored Contributor
or you can try and convert it all to fixed point :)
- Altera_Forum
Honored Contributor
Thanks pancake,
I already looked into megacore ip and I don't know where to start. Do you have any samples to let me fresh start. In C code. float scale_factor; scale_factor = 1 / (float) number_of_samples; Is there module .v that I just plug the float value in/out? Thanks, I will look over the weekend. Sean