Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21327 Discussions

Using alt_multfp and other floating points operations from megawizard

Altera_Forum
Honored Contributor II
1,079 Views

Hello i have a code that is more or less like this: 

 

if (index< 48) begin // im <= im + (tensao * sen); //re <= re + (tensao * cos); index <= index+1; end end mult mult_im ( .clock ( clkin_50 ), .dataa ( tensao ), .datab ( sen), .result ( im_w ) ); mult mult_re ( .clock ( clkin_50 ), .dataa ( tensao), .result ( re_w ) ); I want to do the multiplication using floating points of single precision. The mult float point megawizard function must do a new multiplication when my input value changes (at each new index). I also need to store the result (re_w and im_w). 

 

Can someone help me? It looks like the mult function takes 10 cycles to complete and has a latency of 60. 

 

Link to altera's PDF: 

http://www.google.com.br/url?sa=t&source=web&cd=2&ved=0ccsqfjab&url=http%3a%2f%2fwww.altera.com%2fliterature%2fug%2fug_altfp_mfug.pdf&ei=ahtutr2diisnsqlz6yg8bw&usg=afqjcngy_hiepoyrnaqqkl-lzph9ztfyfq&sig2=9beyievwmrrqacyoq8ercw
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
374 Views

how did you come up with a latency of 60? on page 23 the latency is specified as 5, 6, 10, or 11 clocks

0 Kudos
Altera_Forum
Honored Contributor II
374 Views

Yup i think i was drunk (joking) 

The latency is 10, so if i set my clock enable to 1 after 10 clocks i will have the result right? 

What happens if i change my value in the 6th clock for example?
0 Kudos
Reply