[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Parallella Community • View topic - Various unclear floating point semantics

Various unclear floating point semantics

Any technical questions about the Epiphany chip and Parallella HW Platform.

Moderator: aolofsson

Various unclear floating point semantics

Postby alexrp » Wed Jan 01, 2014 4:01 pm

While implementing simulation for the various floating point instructions, I came across several things that are not entirely clear.

1. For FMADD/FMSUB, should a NaN result have the sign bit of RD ^ RN ^ RM, or just RN ^ RM?
2. Do FMADD/FMSUB not actually check for RD == NAN in Operation?
3. When an FPU exception is raised, should instructions still yield useful/well-defined results?
4. Some Operation descriptions for floating point instructions set some kind of N flag. What is this?
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: Various unclear floating point semantics

Postby timpart » Wed Jan 01, 2014 10:59 pm

timpart
 
Posts: 302
Joined: Mon Dec 17, 2012 3:25 am
Location: UK

Re: Various unclear floating point semantics

Postby aolofsson » Sun Jan 05, 2014 9:38 pm

Thanks Tim! It will be fixed!
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Various unclear floating point semantics

Postby aolofsson » Sun Jan 05, 2014 11:59 pm

Missed the first three questions...

Q: For FMADD/FMSUB, should a NaN result have the sign bit of RD ^ RN ^ RM, or just RN ^ RM?
A: It follows this exact logic:
nan_result_flag= rn_is_nan ? rn[31] :
rm_is_nan ? rm[31] : rd[31];

Q: Do FMADD/FMSUB not actually check for RD == NAN in Operation?
A: Yes they do.

Q: When an FPU exception is raised, should instructions still yield useful/well-defined results?
A: quiet NAN is returned
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Various unclear floating point semantics

Postby alexrp » Mon Jan 06, 2014 6:24 am

Regarding the first question:

1. Is this the same logic used for other floating point operations than FMADD/FMSUB? Or is that logic more like `nan_result_flag = rn_is_nan ? rn[31] : rm[31]`?
2. This logic isn't actually exactly equivalent to XORing the sign bits, is it?
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: Various unclear floating point semantics

Postby alexrp » Sat Jan 11, 2014 6:13 pm

@aolofsson ping - did you see my two extra questions?
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: Various unclear floating point semantics

Postby aolofsson » Wed Jan 15, 2014 4:04 am

User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: Various unclear floating point semantics

Postby alexrp » Wed Jan 15, 2014 5:07 am

Should I implement the XOR behavior or the chained-?: behavior? Which is more likely to be future-proof?
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: Various unclear floating point semantics

Postby alexrp » Tue Feb 04, 2014 1:52 pm

@aolofsson - ping in case you didn't see this :)
alexrp
 
Posts: 154
Joined: Mon Dec 17, 2012 3:22 am
Location: Thisted, Denmark

Re: Various unclear floating point semantics

Postby aolofsson » Wed Feb 05, 2014 2:08 pm

I recommend implementing the chained logic that I provided, since this covers the current two versions of the chip (Epiphany-III and Epiphany-IV).
I suspect there will be more than one interesting corner case popping up once we start running validation software comparing the simulator to the cgen model. :D
Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Next

Return to Epiphany and Parallella Q & A

Who is online

Users browsing this forum: No registered users and 20 guests

cron