From: Luke Kenneth Casson Leighton Date: Thu, 14 Feb 2019 12:47:12 +0000 (+0000) Subject: add set-to-zero function X-Git-Tag: ls180-24jan2020~1999 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=486d6745fad6f8e16fd9e418847f8ca82a8ea453;p=ieee754fpu.git add set-to-zero function --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 914074c9..ae5d5892 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -47,6 +47,9 @@ class FPNum: def inf(self, s): return self.create(s, 0x80, 0) + def zero(self, s): + return self.create(s, -127, 0) + def is_nan(self): return (self.e == 128) & (self.m != 0)