From 8766a3691df64e3d5108014bd5b9ae2bc2c4fe70 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 9 Jul 2020 22:08:55 +0100 Subject: [PATCH] also set so only if OE requires it --- src/soc/fu/alu/output_stage.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/soc/fu/alu/output_stage.py b/src/soc/fu/alu/output_stage.py index 0080ca54..58d9708d 100644 --- a/src/soc/fu/alu/output_stage.py +++ b/src/soc/fu/alu/output_stage.py @@ -22,15 +22,14 @@ class ALUOutputStage(CommonOutputStage): op = self.i.ctx.op xer_so_i, xer_ov_i = self.i.xer_so.data, self.i.xer_ov.data - # XXX see https://bugs.libre-soc.org/show_bug.cgi?id=319#c5 - comb += self.so.eq(xer_so_i[0] | xer_ov_i[0]) # SO - # copy overflow and sticky-overflow. indicate to CompALU if they # are actually required (oe enabled/set) otherwise the CompALU # can (will) ignore them. oe = Signal(reset_less=True) comb += oe.eq(op.oe.oe & op.oe.oe_ok) with m.If(oe): + # XXX see https://bugs.libre-soc.org/show_bug.cgi?id=319#c5 + comb += self.so.eq(xer_so_i[0] | xer_ov_i[0]) # SO comb += self.o.xer_so.data.eq(self.so) comb += self.o.xer_so.ok.eq(1) comb += self.o.xer_ov.data.eq(xer_ov_i) -- 2.30.2