From: Jacob Lifshay Date: Tue, 7 Dec 2021 03:22:19 +0000 (-0800) Subject: move rotator mode assignments as requested by lkcl X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a7e5080b11e8fdf4ad1e619e371d0003d9821ac;p=soc.git move rotator mode assignments as requested by lkcl --- diff --git a/src/soc/fu/shift_rot/main_stage.py b/src/soc/fu/shift_rot/main_stage.py index b8ec7041..3f059b94 100644 --- a/src/soc/fu/shift_rot/main_stage.py +++ b/src/soc/fu/shift_rot/main_stage.py @@ -71,12 +71,17 @@ class ShiftRotMainStage(PipeModBase): comb += o.ok.eq(1) # defaults to enabled + # instruction rotate type + mode = Signal(4, reset_less=True) + comb += Cat(rotator.right_shift, + rotator.clear_left, + rotator.clear_right, + rotator.sign_ext_rs).eq(mode) + # outputs from the microwatt rotator module comb += [o.data.eq(rotator.result_o), self.o.xer_ca.data.eq(Repl(rotator.carry_out_o, 2))] - # instruction rotate type - mode = Signal(4, reset_less=True) with m.Switch(op.insn_type): with m.Case(MicrOp.OP_SHL): comb += mode.eq(0b0000) # L-shift @@ -99,11 +104,6 @@ class ShiftRotMainStage(PipeModBase): with m.Default(): comb += o.ok.eq(0) # otherwise disable - comb += Cat(rotator.right_shift, - rotator.clear_left, - rotator.clear_right, - rotator.sign_ext_rs).eq(mode) - ###### sticky overflow and context, both pass-through ##### comb += self.o.xer_so.data.eq(self.i.xer_so)