[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [oc] "1/x" function




Take a look at the hardware dividers on the OpenCores website.
They should do what you require for the HC11 project.

Richard

> 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,

--
To unsubscribe from cores mailing list please visit http://www.opencores.org/mailinglists.shtml