Altera_Forum
Honored Contributor
14 years agoUsing alt_multfp and other floating points operations from megawizard
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