Search the web
Sign In
New User? Sign Up
32bit_fpu · 32bit FPU
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
possible error in multiplication of denormalized numbers   Message List  
Reply | Forward Message #106 of 148 |
Re: possible error in multiplication of denormalized numbers

I agree, there's a bug. I think it's in post_norm_mul.vhd, in the
process that sets s_shl2 and s_shr2 (starting around line 145 in my
copy, though I may have made cosmetic changes). It executes the code:

if s_exp_10b(9)='1' or s_exp_10b="0000000000" then
-- the first condition was true, s_exp_10b is "-22"
v_shr1:=(others=>'0');
v_shl1:=("0000"&s_zeros) - s_exp_10a;
-- s_zeros is the number of zeros before the first '1' in
-- the 48-bit product, not counting the carry bit, 23.
-- s_exp_10a is opa's exponent ("7f") plus opb's exponent
-- ("01") minus the bias ("7f") -> "01", plus 1 if the product
-- was too big (but it isn't in this case). So V_shl1 becomes
-- 22. That's wrong for this case.
s_expo1 <= "000000001";
-- that would be the right value for the exponent, but the
-- shift should be just zero.

I think the code should be doing different things for a negative
s_exp_10b. I don't have the fix though.

By the way, this is a confirmation that the millions of test vectors
are a waste of time, as I said
http://tech.groups.yahoo.com/group/32bit_fpu/message/99


39


--- In 32bit_fpu@yahoogroups.com, "rambo_jvmhw" <rambo_jvmhw@...> wrote:
>
>
> Now my problem is that the multiplication of denormalized numbers does
> not quite add up.
> Take for example the following two numbers
> 0x00000001 (1.4E-45) by 0x3F800000 (1.0) should equal the former
> (0x00000001) but the FPU produces 0x00400000 (which is 5.877E-39).
>
> (Notice that 0x400000 is 1.0 in the mantissa but that might be
> coincidence.)
>
> Could someone else please confirm that.
>




Thu Jul 12, 2007 10:55 pm

thirtyninewinks
Offline Offline
Send Email Send Email

Forward
Message #106 of 148 |
Expand Messages Author Sort by Date

Hi everyone! For the past few months I've worked on a comparison between the FPU and a Softfloat implementation in Java running on an Altera FPGA with JOP, the...
rambo_jvmhw
Offline Send Email
Jul 12, 2007
9:02 pm

I agree, there's a bug. I think it's in post_norm_mul.vhd, in the process that sets s_shl2 and s_shr2 (starting around line 145 in my copy, though I may have...
thirtyninewinks
Offline Send Email
Jul 12, 2007
10:57 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help