An open source Virtual FPU implemented in the VHDL language has been successfully compiled and can be substituted into our testbed software in place of native arithmetic running on the CPU. The timing diagram for this FPU throughout the execution of test programs can be extracted. Currently the virtual FPU is restricted to 32 bit floats and the square root operation is unimplemented.
-Mainly motivated by producing Figure \ref{minifloat.pdf} we have also implemented functions to convert an arbitrary \verb/Real/ type (which may be IEEE-754 floats) to and from a fixed size floating point representation of our choosing. We have not implemented any operations for floating point arithmetic using these representations.
+Mainly motivated by producing Figure \ref{floats.pdf} we have also implemented functions to convert an arbitrary \verb/Real/ type (which may be IEEE-754 floats) to and from a fixed size floating point representation of our choosing. We have not implemented any operations for floating point arithmetic using these representations.
By using the functions to convert real numbers to variable precision floats as an interface for the virtual FPU, we hope to illustrate the limitations of floating point arithmetic more clearly than would be possible using IEEE-754 binary32 as is native to the C and C++ languages. Using the virtual FPU instead of a CPU based software library will prove useful for determining the exact performance of floating point operations.
%xB debug
}
{
- x1 y1 moveto x2 y2 lineto
+ x1 y1 lineto x2 y2 lineto
} ifelse
end
% End prolog
+/iterations 7 def % Define to the desired number of iterations to crash your pdf viewer
+0 0 1 setrgbcolor
+0 0 moveto
+0 0 50 100 iterations koch
+50 100 100 0 iterations koch
+100 0 0 0 iterations koch closepath
+stroke
% Draw some text and the initial triangle faintly
0.9 0.9 1 setrgbcolor
1E-6 setlinewidth
0 0 moveto 50 100 lineto 100 0 lineto 0 0 lineto stroke
-/iterations 7 def % Define to the desired number of iterations to crash your pdf viewer
-0 0 1 setrgbcolor
-0 0 moveto
-0 0 50 100 iterations koch
-50 100 100 0 iterations koch
-100 0 0 0 iterations koch closepath
-fill
+
showpage