From 09c37ea65fc5c4102fb8f71152e0bda0a03c1a04 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 30 Jul 2019 12:00:32 +0100 Subject: [PATCH] remove default and swap over DIV/SQRT operations, to make SQRT the default http://bugs.libre-riscv.org/show_bug.cgi?id=126 --- src/ieee754/div_rem_sqrt_rsqrt/core.py | 4 ++-- src/ieee754/fpdiv/div0.py | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ieee754/div_rem_sqrt_rsqrt/core.py b/src/ieee754/div_rem_sqrt_rsqrt/core.py index 507caf28..cef62a34 100644 --- a/src/ieee754/div_rem_sqrt_rsqrt/core.py +++ b/src/ieee754/div_rem_sqrt_rsqrt/core.py @@ -59,8 +59,8 @@ class DivPipeCoreOperation(enum.Enum): :attribute RSqrtRem: reciprocal-square-root/remainder. """ - UDivRem = 0 - SqrtRem = 1 + SqrtRem = 0 + UDivRem = 1 RSqrtRem = 2 def __int__(self): diff --git a/src/ieee754/fpdiv/div0.py b/src/ieee754/fpdiv/div0.py index 7a39d727..4b9f25a9 100644 --- a/src/ieee754/fpdiv/div0.py +++ b/src/ieee754/fpdiv/div0.py @@ -88,9 +88,6 @@ class FPDivStage0Mod(Elaboratable): self.o.divisor_radicand.eq(divr_rad), ] - # set default since it's not always set; non-zero value for debugging - comb += self.o.operation.eq(1) - with m.If(~self.i.out_do_z): # DIV with m.If(self.i.ctx.op == int(DPCOp.UDivRem)): -- 2.30.2