projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6acf232
)
use Cat(*list) on CR mask
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 17 May 2020 16:08:22 +0000
(17:08 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 17 May 2020 16:08:22 +0000
(17:08 +0100)
src/soc/cr/main_stage.py
patch
|
blob
|
history
diff --git
a/src/soc/cr/main_stage.py
b/src/soc/cr/main_stage.py
index b3b2b44fa1aa6dff2e7d6d90e82e376b1fd419b2..e29d5eed451baa2a9da5e24396f6f3b6020926b6 100644
(file)
--- 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):