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

[fpu] fdiv unit



hi jamil & rudi,

attached is the fdiv code (which is roughly a copy of fmul, but
it works). I did't bother about any of the operand being '0'.
in fact inside the code there is no exception check on operands.

In my view, you should make exception checks for operands only once at the
top level when inetegrating all fpu units...there is no need to 
make same checks inside each unit (i.e. fmul, fadd, fdiv). however,
I would agree (if someone argues) that it would be sensible to have
zero_detection inside fdiv....because other units don't need it ....

Rudi, make any change/modification if you feel needed. code is almost 
same as your fmul and all signal/wire names are same.... I was free
for some time today....so thought of sharing some of your load. 


regards,
sagheer.



-----Original Message-----
From: Jamil Khatib [mailto:jamilkhatib75@yahoo.com]
Sent: Sunday, September 03, 2000 6:13 AM
To: fpu@opencores.org
Subject: Re: [fpu] '/' operator



--- Rudolf Usselmann <rudi@asics.ws> wrote:
> on 9/3/00 19:19, Jamil Khatib at
> jamilkhatib75@yahoo.com wrote:
> > 
> ...
> > but what about this exponent equations:
> > 
> > E1 = e1 - 127
> > E2 = e2 - 127
> > E1 - E2 = (e1 - 127 )- (e2 - 127)
> > E1 - E2 = e1 - 127 - e2 + 127
> > = e1 - e2 
> > Please correct me if I am wrong
> 
> No, no, no, the default equation for the exponent
> is:
> exp_result = expa - expb + 127;
> 
Why? can you explain more?

> However, there are a lot of exceptions. Read a good
> book.
> 
> >> 2) Why do you add 3 bits at the beginning of the
> >> exponents ?
> >> 3) Why do you add 8 bits at the end of both
> >> fractions ?
> > 
> > I am doing the conversion to the extended format
> which
> > is 32 bit for fraction and 11 bit for exp
> 
> That is wrong. There is no need to convert to
> extended format.
> 
I thought that the standard mentioned that, and we
discussed it on the mailing list and no one said that
I should not do it!!!

> >> 4) The reason you think that the '/' operator
> does
> >> not work
> >> is because you do not understand how to recover
> >> precision. That
> >> is done by shifting opa 23 bits to the left.
> > 
> > Could you explaine more because I thought when I
> added
> > the 8 bit to the right I am doing shift to the
> left!!
> 
> Yes, I understand that, but it's still wrong. You
> want to
> add 23 bit to opa, and none to opb.
> 
why? 

> >> 5) You do not handle de-normalized numbers at
> all.
> >> 
> > 
> > How did you get this conclusion?
> 
> Looking at your code.
> 
> rudi
> 
Anyhow is there is real bugs they could be fixed from
the begining I posted my code lot of times before but
I did not get any comment? where is the cooperation?


Jamil Khatib

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

fdiv.v

fdiv_tb.v