floating point operation consume how much clock cycles

Discussion in 'Embedded Systems and Microcontrollers' started by kkk150984, May 14, 2010.

  1. kkk150984

    Thread Starter New Member

    May 14, 2010
    7
    0
    Hello Friends.
    Can any one tell me, Floating point operation takes how many clock cycles in computer.
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    With the current information I would say it takes as many cycles as it needs:p
    But joking aside. You must give us more information as this is highly dependent on the CPU/MCU core and the code used.
     
  3. kkk150984

    Thread Starter New Member

    May 14, 2010
    7
    0
    I want to ask a FPU (floating point processing unit) takes how much clock cycle for a floating point operation.
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    On a general basis. A floating point operation is built up of one or more low level machine code instructions. A machine code instruction may take a number of clock cycles to finish. This number will be different among types of machine codes. But the number cycles each machine code instruction will be the same each time. The exception may be some jump on condition instructions. The data sheet will tell you how many clock cycles each machine code instruction take. So with this information you just add up how many cycles that are needed based the machine code instruction(s) used.
     
  5. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    I think the question is how long does a co-processor take to do a floating point op?

    The answer depends on the particular CPU, clock speed and Instruction in question.

    As t06afre says, you need to find the datasheet for the specific processor and start looking through it.
     
  6. kkk150984

    Thread Starter New Member

    May 14, 2010
    7
    0
    you are true man but if we compare it with a 64 bit adder than it will give the output in single clock cycle (for execution part not for fetch, decode etc.). like wise 64 bit floating point value takes how much clock cycle (for execution leave other instruction execution time)
     
  7. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    It still depends on exactly what device you refer to.

    I'd guess there are floating point DSPs that can do it in a single cycle, or other types of multiplier that take various larger numbers of clock cycles.

    The first math copro I used (with an 8 bit, 1MHz CPU) was an AMD9511. That did 32 bit floating point & trig etc. using a 2MHz clock.
    It took tens of microseconds to do a calculation.
     
  8. kkk150984

    Thread Starter New Member

    May 14, 2010
    7
    0
    thanks .......I got it man.........

    ok if my processor is intel@core2deo than how much clock cycle it should take for floating point multiplication...
     
Loading...