Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Multiplication on floating point format

question: in order to use the quartus ii to do the calculation (multiplication) of floating point, may i know what is the format type used in quartus ii to convert the floating point value to binary? thanks

19 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    A megafunction is a block of Altera IP. Most of it is written in VHDL and/or verilog, so you can simulate it alongside your own bits of HDL. You can create megafunction blocks via the Megawizard in the tools menu. The megawizard will create VHDL files with all of the setup parameters already specified (or if you are more confident, instantiate them straight from your VHDL - you can get all the parameters in the megafunction help section). These can be instantiated in your VHDL. You just treat them as a black box.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Tricky, I am new with MegaFunction. What is the different between the VHDL coding in Megafunction and normal VHDL that I usually use in the lectures? How should i start my VHDL of floating point multiplication program?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I also using NIOS II to boot in the program into DE2 Board. can it work?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    floating point is never simple. The floating point mega functions are quite large and have a few clocks of latency. But a couple inside a cyclone 2 should be fine.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks everyone.:o

    I was plan to use cyclone II as family devices and do a simple twice multiplication between twiddle factor and any input values. I am using Quartus II ver.8.1 currently. Is it possible to do so?:(
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Quartus uses IEEE standard float format, as described in detail in the altfp_xxx Megafunctions manual.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Altera have megafunctions for doing floating point arithmatic, so there is no conversion. There is a floating to fixed point megafunction too if you want to do fixed point instead.