Altera_Forum
Honored Contributor
14 years agoFloating point multiplication megafunction
Hello everyone,
I am currently trying to use floating point multiplication megafunction. But I always get result 0 no matter what are the inputs. This is what I do: 1. Get into megawizard and choose to generate verilog file 2. define floating point format as "Single extended precision(43 to 64 bits) 3. define dataa, datab and result widths as 45 bits 4. define exponent width as 13 bits 5. define output latency to be 11 6. choose to generate verilog file and symbol file 7. click finish For the input data I use concatenation method to fit the width of dataa and datab(that were defined in step 3). My dataa is a constant which is 0.172212 in decimal and then I convert it using fraction binary method as mantissa bit. Then I use concatenation method to insert the sign bits(0 because positive) and exponent width(13'b0) into the mantissa bit. It become 1 bit sign, 13 bits exponent bits and 31 bit mantissa. My datab is not a constant and I use also concatenation method to fit the width of the megafuntion. After I do that, no matter what I always get 0 at result. After that I thought may be I should use the clk_en port at the megafunction. Then I add clk_en port and feed it with high signal. But the result is still 0. What should I do everyone to get a correct result? Thank you in advanced for your guidance:D