Another IEEE paper
authorSam Moore <[email protected]>
Tue, 15 Apr 2014 15:47:15 +0000 (23:47 +0800)
committerSam Moore <[email protected]>
Tue, 15 Apr 2014 15:47:15 +0000 (23:47 +0800)
On floating point adders

LiteratureNotes.pdf
LiteratureNotes.tex
ProjectProposalDavid.pdf
ProjectProposalSam.pdf
irc/#ipdf.log
papers.bib
references/seidel2001onthe.pdf [new file with mode: 0644]

index 506817a..e63a14d 100644 (file)
Binary files a/LiteratureNotes.pdf and b/LiteratureNotes.pdf differ
index 694e76e..1d4fe12 100644 (file)
@@ -477,6 +477,30 @@ Using unix domain sockets we can execute the FPU as a child process and communic
 
 Using \shell{ghdl} the testbench can also be linked as part a C/C++ program and run using a function; however there is still no way to communicate with it other than forking a child process and using a unix domain socket anyway. Also, compiling the VHDL FPU as part of our document viewer would clutter the code repository and probably be highly unportable. The VHDL FPU has been given a seperate repository.
 
 
 Using \shell{ghdl} the testbench can also be linked as part a C/C++ program and run using a function; however there is still no way to communicate with it other than forking a child process and using a unix domain socket anyway. Also, compiling the VHDL FPU as part of our document viewer would clutter the code repository and probably be highly unportable. The VHDL FPU has been given a seperate repository.
 
+\section{On the design of fast IEEE floating-point adders\cite{seidel2001onthe}}
+
+This paper gives an overview of the ``Naive'' floating point addition/subtraction algorithm and gives several optimisation techniques:
+
+TODO: Actually understand these...
+
+\begin{itemize}
+       \item Use parallel paths (based on exponent)
+       \item Unification of significand result ranges
+       \item Reduction of IEEE rounding modes
+       \item Sign-magnitude computation of a difference
+       \item Compound Addition
+       \item Approximate counting of leading zeroes
+       \item Pre-computation of post-normalization shift
+\end{itemize}
+
+They then give an implementation that uses these optimisation techniques including very scary looking block diagrams.
+
+They simulated the FPU. Does not mention what simulation method was used directly, but cites another paper (TODO: Look at this. I bet it was VHDL).
+
+The paper concludes by summarising the optimisation techniques used by various adders in production (in 2001).
+
+This paper does not specifically mention the precision of the operations, but may be useful because a faster adder design might mean you can increase the precision.
+
 
 % Back to software
 \section{Basic Issues in Floating Point Arithmetic and Error Analysis\cite{demmel1996basic}}
 
 % Back to software
 \section{Basic Issues in Floating Point Arithmetic and Error Analysis\cite{demmel1996basic}}
index 725bfbb..861b06d 100644 (file)
Binary files a/ProjectProposalDavid.pdf and b/ProjectProposalDavid.pdf differ
index 0f3e860..0a2ef8d 100644 (file)
Binary files a/ProjectProposalSam.pdf and b/ProjectProposalSam.pdf differ
index 8df9546..745f842 100644 (file)
---- Log opened Mon Mar 17 12:20:15 2014
-12:20 -!- matches [[email protected]] has joined #ipdf
-12:20 -!- Irssi: #ipdf: Total of 2 nicks [1 ops, 0 halfops, 0 voices, 1 normal]
-12:20 -!- Irssi: Join to #ipdf was synced in 0 secs
-12:20 -!- sulix changed the topic of #ipdf to: Angry Strawberry Summer
-12:20 -!- mode/#ipdf [+o matches] by sulix
-12:39 <@sulix> This is sensible discussion about the project.
-12:39 <@matches> The suspense
-12:39 <@sulix> Anyone up for lunch?
-12:39 <@matches> Yes
-12:40 <@sulix> drumroll...
-12:41 <@matches> I don't think it worked
-12:42 <@matches> Yes I did it manually
-12:42 <@matches> Maybe cron is broken on motsugo
-12:43 <@sulix> We shall find out next time at 12:40, I guess.
-12:43 <@sulix> (Or the next time cron emails errors out, maybe)
-12:52 <@matches> Let the record show that it didn't work because I didn't install the crontab
---- Day changed Wed Mar 19 2014
-10:59 <@matches> Some guy asked me if he could use the whiteboard, so I let him rub out our timeline
-10:59 <@matches> And all he did was write "hello world"
-10:59 <@matches> >:(
-19:10 <@matches> Testing
-19:25 <@matches> So the IRC commits should have a different author
-19:25 <@matches> So that I don't get a ridiculous number of daily IRC commits
-19:26 <@matches> I could rebase the first three of them but I think that might break things
-19:45 <@matches> Ok, and now it will only commit when there is more than one new line, so we won't get one every day when no one says anything
-19:54 <@matches> Alright, and in theory
-19:54 <@matches> If I spam this some more
-19:54 <@matches> There will be a commit soonish
-19:56 <@matches> Any second...
-19:56 <@matches> Yes
-19:56 <@matches> Now that is sorted out I can attain maximum productivity
-19:56 <@matches> (Sorry)
---- Log closed Mon Mar 24 01:12:25 2014
---- Log opened Mon Mar 24 08:40:12 2014
-08:40 -!- matches [[email protected]] has joined #ipdf
-08:40 -!- Irssi: #ipdf: Total of 2 nicks [1 ops, 0 halfops, 0 voices, 1 normal]
-08:40 -!- Irssi: Join to #ipdf was synced in 3 secs
-13:26 -!- Netsplit arctic.uniirc.com <-> mussel.ucc.au.uniirc.com quits: @sulix
-13:27 < matches> Uh oh
-13:29 -!- Netsplit over, joins: @sulix
-13:31 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
-13:32 -!- Netsplit over, joins: @sulix
-13:40 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
-13:40 -!- Netsplit over, joins: @sulix
-16:19 < matches> Well that will make a nice automatic commit
---- Day changed Tue Mar 25 2014
-21:33 < matches> So, I am pretty much free all day tomorrow
-21:33 < matches> Also Thursday
-21:34 <@sulix> I'm pretty busy Thursday, but I'm free all tomorrow so long as I can get some maths done at some point.
-21:34 -!- mode/#ipdf [+o matches] by sulix
-21:35 <@matches> I'm supervising a test from 2-3pm but that's it
-21:35 <@matches> So, I will try and get to UWA as early as I can
-21:35 <@matches> It might be a good idea to have some kind of start on a code base
-21:35 <@matches> Even though we're supposed to be focusing on a literature review, I don't really like not having any code done yet
-21:36 <@sulix> Yeah. I agree.
-21:36 <@sulix> Code + fixing git stuff + preparing for this "talk" on Friday.
---- Day changed Wed Mar 26 2014
-11:32 <@matches> I am in the super secret room
-11:36 <@sulix> Okay, I'll head in shortly. Had a small "parents fell for a scam email and entered passwords on dodgy websites" crisis here this morning.
-11:37 <@matches> Oh dear
-11:42 <@matches> The phone is ringing :O
-11:43 <@matches> Phew, it stopped
-22:42 <@matches> I think I have a way to do tests in the Makefile without using cmake
-22:42 <@matches> You can alter a variable for a target
-23:20 <@matches> Well, that ended badly
-23:21 <@matches> With me erasing my own Makefile using make
-23:21 <@matches> :P
-23:24 <@sulix> Better than erasing the source code, I guess.
-23:34 <@matches> This is why we have git
---- Day changed Thu Mar 27 2014
-00:15 <@sulix> Crazy templated loading and saving!
-00:15 <@sulix> And now for bed!
-00:30 <@matches> Well
-00:30 <@matches> It doesn't break the test
-01:22 <@matches> We now have an arbitrary precision float
-01:22 <@matches> Where in this case arbitrary precision means I have no idea what the precision is but it is very bad
-01:35 <@matches> Ok I think I made a half precision float
-01:35 <@matches> They are quite bad
-01:36 <@matches> Um, I can probably make a graph of it being terrible as my contribution for Friday
-01:36 <@matches> Assuming I've done it right
---- Day changed Wed Apr 02 2014
-09:41 <@matches> Dammit codejam is coming up again
-09:41 <@matches> There goes productivity
-09:42 <@matches> If you are not busy this afternoon we should do work
-09:42 <@matches> On the project I mean
-09:45 <@matches> Although it is tempting to just practice codejam problems for the next week
-12:44 <@matches> If I work on the project it will help when the inevitable "64 bits is not enough" problem comes up!
-12:45 <@matches> Maybe
---- Day changed Sun Apr 06 2014
-13:40 <@matches> I get the feeling my part of the project could just be "typedef Real to something from boost"
-14:15 <@matches> I suppose I could talk about FPU and hardware
---- Day changed Mon Apr 07 2014
-21:42 <@matches> I had a horrible horrible thought... implement a FPU in VHDL and then somehow run all our floating point operations on it :P
-21:42 <@matches> (This is not a good idea at all but it might be fun)
-21:42 <@matches> You know, for some definition of fun
-21:44 <@matches> So my lit review will probably be 1) We need higher precision documents because science (Pixels or Perish) 2) This is how FP works in hardware 3) This is how you can get higher precision in software
-21:45 <@matches> Oh, and 4) Document formats and rendering them (PDF/PostScript etc)
-21:46 <@matches> That is starting to sound suitably ridiculously broad?
-21:46 <@matches> Can always cut things out I guess
-21:47 <@matches> To reflect what we actually end up doing
-22:05 <@sulix> From what Tim was saying, I don't think "too broad" is a possibility.
-22:05 <@sulix> We could be talking about Aztec history and it'd probably not be "too broad."
-22:05 <@sulix> I do need to remember to read "Pixels of Perish," though.
-22:19 <@matches> I'll have a look into VHDL stuff, there seem to be compilers and simulators for linux
-22:20 <@matches> For a minute I was afraid I'd have to use the UWA EE VHDL environment
-22:20 <@matches> Which is like, running a Java program in a Windows XP VM
-22:20 <@matches> I heard you liked simulations of hardware so I simulated some hardware in your simulated hardware
---- Day changed Tue Apr 08 2014
-10:46 -!- Netsplit arctic.uniirc.com <-> mits.mits.au.uniirc.com, services.uniirc.com, irc.cassa.au.uniirc.com, mussel.ucc.au.uniirc.com quits: @sulix
-10:46 -!- Netsplit over, joins: @sulix
-11:31 <@matches> The "Experiment Running" sign seems to have worked
-11:31 <@matches> Also open source VHDL stuff is less "actually compiles" than I had hoped
-11:32 <@matches> The two I've tried so far seem to generate absolute monstrosities of C or C++ files and then fail to compile and/or link
---- Day changed Wed Apr 09 2014
-15:27 <@sulix> So I've been hitting my head against my desk for about half an hour trying to work out where some bugs were in some ipdf code I'm writing.
-15:27 <@sulix> Turns out to have mostly been precision issues due to the lack of precision in your Real data type.
-15:28 <@sulix> Switching it to double fixes them all.
-15:32 <@matches> Oh
-15:32 <@matches> Sorry
-15:37 <@sulix> Nah: it's good. It means that precision actually is important!
-15:37 <@sulix> (I was getting a little bit concerned for a while :P)
-15:40 <@matches> Well
-15:40 <@matches> I have rediscovered just how awful VHDL is
-15:41 <@matches> It seems like you can't define anything without typing it three times
-15:42 <@matches> You define an entity
-15:42 <@matches> Then you define a component with identical ports
-15:42 <@matches> Then you tell it to use the entity for that component
-15:42 <@matches> Then you tell it to map the identical ports to the entity ports
-15:42 <@matches> adder_0 : adder port map (a=>a, b=>b, cin=>cin, s=>s, cout=>cout);
-15:44 <@matches> Pretty much all the hardware papers I found talk about using VHDL for things
-15:46 <@matches> Let's see if I can make any sense of this jop-devel thing that appears to be a JVM implemented in VHDL
-15:47 <@matches> Uh oh, .bat files
-15:48 <@matches> This looks ominous
-15:51 <@sulix> The whole swapping out main thing breaks the makefile in a few ways btw.
-15:51 <@sulix> Because none of main.cpp's dependencies are listed.
-15:51 <@matches> Ah
-15:51 <@sulix> So if you change main.h, nothing gets recompiled.
-16:02 <@sulix> Okay, just pushed support for click+drag and zoom in and out in the viewer.
-16:03 <@sulix> (I did change the default precision to single, rather than half, as zoom out was totally broken with half-precision)
-16:05 <@matches> The half precision implementation is broken itself anyway
-16:07 <@matches> Hmm
-16:07 <@matches> I can't seem to compile anymore
-16:07 <@matches> Hang on
-16:07 <@matches> That would be because `uname -i` reports "unknown"
-16:12 <@matches> I have made unknown default to x86_64 :S
-16:13 <@matches> I can see the precision issues! Good work
-16:14 <@matches> These lecture notes seem useful: http://www.cs.berkeley.edu/~demmel/cs267/lecture21/lecture21.html
-16:14 <@matches> Lecture notes > Blog post in terms of suitable reference?
-16:16 <@sulix> It's got fortran in it, it must be suitably acedemic.
-16:18 <@matches> Haha
-16:18 <@matches> The VHDL compiler I am experimenting with uses Ada
-16:18 <@sulix> I'm getting my fill of new languages by trying out some c++11 features.
-16:20 <@sulix> I think I broak realtofloat by changing things to be single precision by default.
-16:22 <@sulix> (Hopefully fixed)
-16:49 -!- Netsplit mantis.ucc.au.uniirc.com <-> arctic.uniirc.com quits: @sulix
-16:49 -!- Netsplit over, joins: @sulix
-16:54 <@matches> What's with the netsplits
-16:55 <@matches> You're on mussel? I'm on mantis? They are VMs on the same host?
-16:55 <@matches> I don't know what this uniirc nonsense is
-16:56 <@matches> What is "arctic"
-16:56 -!- matches changed the topic of #ipdf to: Happy Bannana Netsplit
-17:33 <@matches> Well I compiled the VHDL FPU
-17:33 <@matches> It seems to work quite well
-17:33 <@matches> Except for the part where it never actually finishes an operation
-17:34 <@matches> One of the virtual transistors must have overheated
-17:43 <@matches> Oops it might help to actually give it a valid operation
-18:27 <@matches> Alright, so I'm going to experiment with getting our Real operations to run on the virtual FPU
-18:28 <@matches> Then I can look into both hardware and software ways of getting arbitrary precision.
-18:30 <@matches> VHDL appears to have text I/O so I could make everything read and write from pipes, but this seems like a terrible idea
-18:30 <@matches> On the other hand the compiler is using Ada
-19:21 <@matches> Oh wow
-19:21 <@matches> To open stdout
-19:22 <@matches> You pass it a string "STD_OUTPUT" for the filename
-21:40 <@matches> Ok, I give up trying to link this thing
-21:40 <@matches> fork() and exec() is seeming more and more elegant
-22:11 <@matches> Nooo, buffering
-22:11 <@matches> Ok, screw this
---- Day changed Thu Apr 10 2014
-00:00 <@matches> Note: Actually exec'ing the program instead of just going straight to "exit(EXIT_FAILURE)" is generally important
-00:00 <@matches> Wall of text commit message incoming
-00:01 <@matches> Horribly inefficient interface to virtual FPU sort of implemented
-00:02 <@matches> I would have made it based on binary read/write rather than hex strings but I could not work out how to do that in VHDL
-00:08 <@matches> I still can't believe what I have just done, it seems ludicrous
-00:08 <@matches> Using an entire executable and stdio operations
-00:08 <@matches> To do a floating point addition
-00:10 <@matches> You should see how much is involved in compiling the VHDL FPU...
-00:11 <@matches> I'm very pleased that it actually compiled from the version in jop's github without much effort, but still
-00:11 <@matches> It's like 30 object files
-00:11 <@matches> This is why it isn't in the code repo
-00:19 <@matches> Whoops, there are some blatantly wrong comments in vfpu.cpp
-00:19 <@matches> Oh well
---- Day changed Fri Apr 11 2014
-13:38 <@matches> Warning! I am about to make a ipdf/vfpu repo
-13:43 <@matches> You know what's really cool
-13:43 <@matches> You can run it as `vfpu --vcd=output.vcd`
-13:43 <@matches> And it will create a gtkwave file as it runs showing all the operations
-13:44 <@matches> You only get the simulated time from the point of view of the device
-13:44 <@matches> Which is probably useful
-13:46 <@matches> Or it would be if I wanted to compare different devices
-13:47 <@matches> To do that I need to actually make different devices...
-17:12 <@matches> Would you prefer seperate repos for the individual reports or just sub directories in the documents repo?
-17:12 <@matches> I can't decide
-17:12 <@matches> On the one hand 5+ repos is getting a bit out of hand
-17:12 <@matches> On the other hand they are individual work
-17:24 <@matches> Individual seems best
-20:31 <@matches> Hmm
-20:31 <@matches> The sqrt op in the fpu appears to have been commented out
-20:31 <@matches> Also despite having constants for the sizes of things they have just used magic numbers everywhere
-20:34 <@matches> I need an IRC script to prevent myself from saying stuff unless someone else has said things, or this channel will just be me ranting
+--- Log opened Mon Apr 14 20:18:05 2014
+20:18 -!- matches [[email protected]] has joined #ipdf
+20:18 -!- Irssi: #ipdf: Total of 2 nicks [1 ops, 0 halfops, 0 voices, 1 normal]
+20:18 -!- Irssi: Join to #ipdf was synced in 0 secs
+22:04 < matches> Ergh
+22:06 < matches> http://szmoore.net/ghdl.bug
+22:06 < matches> Pretty
+22:10 < matches> Looks like we'll be sticking with ASCII input files for the FPU
+--- Log closed Mon Apr 14 22:29:33 2014
+--- Log opened Mon Apr 14 22:44:34 2014
+22:44 -!- matches [[email protected]] has joined #ipdf
+22:44 -!- Irssi: #ipdf: Total of 1 nicks [1 ops, 0 halfops, 0 voices, 0 normal]
+22:44 -!- sulix [[email protected]] has joined #ipdf
+22:44 -!- Irssi: Join to #ipdf was synced in 12 secs
+22:53 <@matches> Someone's VPS was compromised and killing our network
+22:53 <@matches> For reference
+22:53 <@matches> It affects this project because
+23:07 <@matches> Argh
+23:07 <@matches> So I thought I was being really clever
+23:07 <@matches> I had files of type "bit" and everything
+23:07 <@matches> Guess how a "bit" is represented...
+23:08 <@matches> It's an ASCII "0" or "1"
+23:09 <@matches> I guess I will just conclude that ASCII strings treated as hex is the only way
index bbbe44a..0dec3ca 100644 (file)
@@ -499,6 +499,18 @@ doi={10.1109/ARITH.1991.145549},}
        note = "Application Notes (webpage)"
 }
 
        note = "Application Notes (webpage)"
 }
 
+% On the design of IEEE floating point adders
+% Has algorithms!
+@INPROCEEDINGS{seidal2001onthe,
+author={Seidel, P.-M. and Even, G.},
+booktitle={Computer Arithmetic, 2001. Proceedings. 15th IEEE Symposium on},
+title={On the design of fast IEEE floating-point adders},
+year={2001},
+month={},
+pages={184-194},
+keywords={adders;circuit optimisation;floating point arithmetic;logic design;IEEE rounding modes;IEEE standard;addition;approximate counting;borrow-save representation;clock periods;complement subtraction;compound adders;double precision;fast IEEE floating-point adder design;fast circuits;latches;latency;leading zeros;logic levels;normalized numbers;normalized rounded sum/difference;optimization techniques;rounding algorithm;sign-magnitude computation;subtraction;Adders;Algorithm design and analysis;Circuits;Clocks;Delay;Design optimization;Latches;Logic design;Partitioning algorithms;Pipelines},
+doi={10.1109/ARITH.2001.930118},
+ISSN={1063-6889},}
 
 
 @article{demmel1996basic,
 
 
 @article{demmel1996basic,
diff --git a/references/seidel2001onthe.pdf b/references/seidel2001onthe.pdf
new file mode 100644 (file)
index 0000000..ad00d33
Binary files /dev/null and b/references/seidel2001onthe.pdf differ

UCC git Repository :: git.ucc.asn.au