Berkeley HardFloat is a free, highquality Verilog encoding of digital hardware modules for binary floatingpoint arithmetic. HardFloat fully conforms to the IEEE Standard for FloatingPoint Arithmetic, supporting all required rounding modes, exception flags, and special values, including subnormals. These operations are implemented:
A wide range of floatingpoint sizes is supported, with modules taking
parameters that independently determine the widths of the exponent and
significand fields.
The set of possible formats includes the standard IEEE ones of
HardFloat converts IEEEformat floatingpoint inputs into a more convenient recoded format for its arithmetic operations. However, the results computed by HardFloat modules are always the exact values dictated by the IEEE Standard, just represented in the recoded format. Computed results can be converted back to a standard IEEE format at any time.
HardFloat is written for the 2001 standard for Verilog.
Different floatingpoint specializations are provided to customize the
arithmetic appropriately for Intel x86, Arm, or
Berkeley HardFloat is currently in its inaugural release,
HardFloatVerilog.html 

HardFloattestVerilog.html 

HardFloattestVerilator.html 
The following archive contains all source code and documentation for
zip archive,
HardFloat1.zip 
The HardFloat package includes testbenches that require either a Verilog simulator or Verilator. A Verilog simulator that may be used is Icarus Verilog:
Icarus Verilog is a free Verilog simulator supporting the 2005 Verilog Standard. 
Verilator is a free tool that converts a subset of Verilog or SystemVerilog into equivalent C++ code. 
HardFloat’s simulation testbenches depend on the
testfloat_gen
program from Berkeley TestFloat.
TestFloat in turn depends on Berkeley SoftFloat.
To perform these tests, the SoftFloat and TestFloat packages must be obtained
and built separately:
Berkeley SoftFloat is a free software implementation of binary floatingpoint that conforms to the IEEE Standard for FloatingPoint Arithmetic.  
Berkeley TestFloat is a small collection of programs for testing that an implementation of binary floatingpoint conforms to the IEEE Standard for FloatingPoint Arithmetic. 
Berkeley HardFloat was written by me, John R. Hauser. Funding for the development of HardFloat was provided indirectly by portions of grants to the University of California, Berkeley, from Microsoft, Intel, DARPA, Nokia, NVIDIA, Oracle, Samsung, Google, Futurewei, Seagate, Siemens, and SK Hynix, and by a portion of a U.C. Discovery Grant. The HardFloat documentation has more details.
Bugs in HardFloat and other comments can be reported to me at
j
h
@
jhauser
.
u
s