-# IEEE754 Floating-Point ALU, in nmigen
+# IEEE754 Floating-Point ALU, in nmigen(tm)
-This project implements a pipelined IEEE754 floating-point ALU that
-supports FP16, FP32 and FP64. It is a general-purpose unit that
-may be used in any project (not limited to one specific processor).
+nmigen (and all aliases) are Trademarks of M-Labs.
+nmigen is a Registered Trademark of M-Labs
+https://uspto.report/TM/88980893
+
+This project implements a parameteriseable pipelined IEEE754 floating-point
+ALU that supports FP16, FP32 and FP64. Other FP sizes (FP80, BF16, FP128)
+are a matter of adding new parameters for mantissa and exponent.
+The IEEE754 FP Library is a general-purpose unit that may be used in
+any project (not limited to one specific processor). Limited Formal
+Correctness Proofs are provided (so far for fpadd, fpsub) as well as
+hundreds of thousands of unit tests.
+
+Developed under Grants from NLnet (http://nlnet.nl), from
+EU Grants 871528 and 957073. more information may be found at
+http://libre-soc.org
# Requirements
-* nmigen
+* nmigen (https://gitlab.com/nmigen/nmigen)
+* libresoc-nmutil (https://git.libre-soc.org/?p=nmutil.git;a=summary)
* yosys (latest git repository, required by nmigen)
* sfpy (running unit tests). provides python bindings to berkeley softfloat-3
to FP16 non-canonical NaNs.
The following modifications are required to the sfpy berkeley-softfloat-3
-Makefile:
-
- diff --git a/build/Linux-x86_64-GCC/Makefile b/build/Linux-x86_64-GCC/Makefile
- index 2ee5dad..566d225 100644
- --- a/build/Linux-x86_64-GCC/Makefile
- +++ b/build/Linux-x86_64-GCC/Makefile
- @@ -35,7 +35,7 @@
- #=============================================================================
-
- SOURCE_DIR ?= ../../source
- -SPECIALIZE_TYPE ?= 8086-SSE
- +SPECIALIZE_TYPE ?= RISCV
-
- SOFTFLOAT_OPTS ?= \
- -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 \
- @@ -45,7 +45,7 @@ DELETE = rm -f
- C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
- COMPILE_C = \
- gcc -c -Werror-implicit-function-declaration -DSOFTFLOAT_FAST_INT64 \
- - $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
- + $(SOFTFLOAT_OPTS) $(C_INCLUDES) -O2 -fPIC -o $@
- MAKELIB = ar crs $@
-
- OBJ = .o
+submodule:
+ cd /path/to/sfpy/berkeley-softfloat-3
+ git apply /path/to/ieee754fpu/berkeley-softfloat.patch
The following modifications are required to the sfpy SoftPosit Makefile:
- diff --git a/build/Linux-x86_64-GCC/Makefile b/build/Linux-x86_64-GCC/Makefile
- index 7affd4b..25dd39e 100644
- --- a/build/Linux-x86_64-GCC/Makefile
- +++ b/build/Linux-x86_64-GCC/Makefile
- @@ -69,7 +69,7 @@ endif
- C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
- OPTIMISATION = -O2 #-march=core-avx2
- COMPILE_C = \
- - $(COMPILER) -c -Werror-implicit-function-declaration -DSOFTPOSIT_FAST_INT64 \
- + $(COMPILER) -fPIC -c -Werror-implicit-function-declaration -DSOFTPOSIT_FAST_INT64 \
- $(SOFTPOSIT_OPTS) $(C_INCLUDES) $(OPTIMISATION) \
- -o $@
- MAKELIB = ar crs $@
+ cd /path/to/sfpy/SoftPosit
+ git apply /path/to/ieee754fpu/SoftPosit.patch
# Useful resources