LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cores > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: John Kent <jekent@o...>
    Date: Sat, 14 Dec 2002 02:35:41 +1100
    Subject: Re: [oc] "1/x" function
    Top

    Hi,
    
    I'll buy into this thread, simply because I need to implement a 
    Fractional Divide and Integer
    divider for a 68HC11 I'm working on.
    
    A fractional divide should be relatively easy, given that 1/x is a 
    fractional if X is an integer
    
    Given a fractional 32 bit numerator, and a 16 bit denominator, isn't it 
    simply a matter
    of doing a multiply in reverse.
    ie.
    If X is an integer you will probably have to have some leading zeros on 
    the numerator..
    
    compare the left justified denominator with the numerator.
    if the denominator is less than the numerator, subtact the denominator 
    to form a new numerator
    and set the least significant bit in the integer result
    right shift the denominator one bit, left shift the integer result one 
    bit and repeat the process
    16 times for a 32 bit numerator and a 16 bit denominator. The remainder 
    will be in the numerator.
    
    The design should be easily pipe lined.
    
    I'm not sure if this is what people were getting at when they said to do 
    it with a multiply.
    My appologies if I am stating the obvious. I suspect I might have missed 
    the point.
    
    If someone can confirm I'm on the right track, I might give the 68HC11 
    IDIV and FDIV another try.
    
    John.
    
    Rudolf Usselmann wrote:
    
    >Anybody have an efficient algorithm for a "1/x" function for
    >hardware implementations ? Or any pointer to white papers, etc ?
    >I need something that is fast and small, and can be pipelined.
    >
    >Any pointers appreciated !
    >
    >Thanks,
    >  
    >
    
    -- 
    http://members.optushome.com.au/jekent
    
    
    
    
    
    

    ReferenceAuthor
    [oc] "1/x" functionRudolf Usselmann

    Follow upAuthor
    Re: [oc] "1/x" functionRichard Herveille

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.