Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

Floating Point Adder Multiplier

Contents of Readme

  1. About
  2. Modules
  3. Interface Description
  4. Performance and Resource Utilization
  5. Simulation
  6. Test
  7. Status Information
  8. Issues

Repo on GitLabRepo on GitHub


About

Work in Progress!

Fully combinational adder and multiplier modules for IEEE 754 single-precision (binary32) and double-precision (binary64) floating point format.

Modules

Two computation modules and a simple wrapper that contains both adder and multiplier.

Interface Description

Ports

Ports of the all modules/IPs named in same manner.

PortTypeWidthOccurrenceDescriptionNotes
num0IBIT_SIZEMandatoryOperand
num1IBIT_SIZEMandatoryOperand
resOBIT_SIZEMandatoryResult
overflowO1OptionalResult is infinite / Overflowed
zeroO1OptionalResult is zero
NaNO1OptionalAt least one of the inputs are not a number
precisionLostO1OptionalPrecision Lost in Result
flagRaisedO1OptionalOne of the Implemented Flags are raised
selectI1OptionalSelect OperationOnly in wrapper

I: Input O: Output

Parameters

Following parameters can be used to modify the size of operation and the output flags.

ParameterPossible ValuesDescription
BIT_SIZE32, 64Operation Size
ROUNDING_TYPEboolRounding to the closer value, when disabled floor
ENABLE_FLAGS_MASTERboolMaster enable for flags
ENABLE_FLAGS_COMMONboolEnable flagRaised
ENABLE_FLAGS_OFboolEnable overflow
ENABLE_FLAGS_ZEROboolEnable zero
ENABLE_FLAGS_NaNboolEnable NaN
ENABLE_FLAGS_PLostboolEnable precisionLost

For custom exponent formats, one can enable "value override" mode with FORMAT_OVERRIDE and enter corresponding widths to EXPONENT_SIZE_OR and FRACTION_SIZE_OR. Sign bit is always 1 bit. Custom formats are not tested.

Performance and Resource Utilization

All values in this section are for Xilinx Artix-7 (XC7A100TCSG324-1) FPGA. (Without Rounding/With Rounding)

Single-Precision Adder

  • Utilization after synthesis: 473/502 LUT as Logic
  • Maximum clock frequency (for input output registers): 65/55 MHz

Double-Precision Adder

  • Utilization after synthesis: 985/1007 LUT as Logic
  • Maximum clock frequency (for input output registers): 50/40 MHz

Simulation

Test benches will both generate a waveform and display overview of the test cases. Overview messages show operands, result, manually calculated expected result, and flag information.

convertFloat.py can be used to help with verification. It should convert values between formats. However this script is not thoroughly tested.

Test

Hardware tests of all modules is done by a VIO and placing a register between VIO and module ports.

Status Information

Last Simulation:

Issues

Nothing so far.

For newly found bugs; contact me, open an issue at gitlab (preferred) or github.

About

Combinational adder and multiplier modules for IEEE 754 single-precision and double-precision floating point format.

Topics

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages