From 7df635d6d1e790b931b61951fa7a2322182d68c1 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 17 May 2020 17:08:22 +0100 Subject: [PATCH] use Cat(*list) on CR mask --- src/soc/cr/main_stage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/cr/main_stage.py b/src/soc/cr/main_stage.py index b3b2b44f..e29d5eed 100644 --- a/src/soc/cr/main_stage.py +++ b/src/soc/cr/main_stage.py @@ -77,8 +77,7 @@ class CRMainStage(PipeModBase): # replicate every fxm field in the insn to 4-bit, as a mask mask = Signal(32, reset_less=True) - for i in range(8): - comb += mask[i*4:(i+1)*4].eq(Repl(fxm[i], 4)) + comb += mask.eq(Cat(*[Repl(fxm[i], 4) for i in range(8)])) ################################# ##### main switch statement ##### @@ -132,6 +131,7 @@ class CRMainStage(PipeModBase): comb += cr_o.eq((self.i.a[0:32] & mask) | (self.i.cr & ~mask)) + ##### mfcr ##### with m.Case(InternalOp.OP_MFCR): # mfocrf with m.If(move_one): -- 2.30.2