From 847b84d7e0a1fb8c86512cd85a19844fe066daea Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 11 Aug 2020 14:13:13 +0100 Subject: [PATCH] reduce regfile ports by creating separate STATE regfile --- src/soc/decoder/power_regspec_map.py | 38 +++++++++------- src/soc/fu/branch/pipe_data.py | 2 +- src/soc/fu/spr/pipe_data.py | 4 +- src/soc/fu/trap/pipe_data.py | 6 ++- src/soc/regfile/regfiles.py | 66 ++++++++++++++++++---------- src/soc/simple/issuer.py | 32 +++++++------- 6 files changed, 89 insertions(+), 59 deletions(-) diff --git a/src/soc/decoder/power_regspec_map.py b/src/soc/decoder/power_regspec_map.py index 7413cdd6..1dd3f0e4 100644 --- a/src/soc/decoder/power_regspec_map.py +++ b/src/soc/decoder/power_regspec_map.py @@ -35,7 +35,7 @@ has to be "remapped" to internal SPR Enum indices (see SPRMap in PowerDecode2) see https://libre-soc.org/3d_gpu/architecture/regfile/ section on regspecs """ from nmigen import Const -from soc.regfile.regfiles import XERRegs, FastRegs +from soc.regfile.regfiles import XERRegs, FastRegs, StateRegs from soc.decoder.power_enums import CryIn @@ -82,22 +82,26 @@ def regspec_decode_read(e, regfile, name): if name == 'xer_ca': return (e.do.input_carry == CryIn.CA.value) | e.xer_in, CA + # STATE regfile + + if regfile == 'STATE': + # STATE register numbering is *unary* encoded + PC = 1<