From: Luke Kenneth Casson Leighton Date: Sun, 6 Sep 2020 11:50:47 +0000 (+0100) Subject: move DEC and TB from StateRegs to FastRegs for several reasons X-Git-Tag: semi_working_ecp5~173 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee491651861ed89c44ced180189656b8a80fbee0;p=soc.git move DEC and TB from StateRegs to FastRegs for several reasons first: SPR pipeline already has fast1 read/write second: a new DecodeStateIn/Out object would be needed instead just add FastRegs.DEC/TB to DecodeA/Out third: there is probably a third somewhere --- diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 83238391..66cc8d97 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -149,7 +149,12 @@ class DecodeA(Elaboratable): with m.Case(SPR.XER.value): comb += self.fast_out.data.eq(FastRegs.XER) comb += self.fast_out.ok.eq(1) - pass # do nothing + with m.Case(SPR.DEC.value): + comb += self.fast_out.data.eq(FastRegs.DEC) + comb += self.fast_out.ok.eq(1) + with m.Case(SPR.TB.value): + comb += self.fast_out.data.eq(FastRegs.TB) + comb += self.fast_out.ok.eq(1) # : map to internal SPR numbers # XXX TODO: dec and tb not to go through mapping. with m.Default(): @@ -332,7 +337,12 @@ class DecodeOut(Elaboratable): with m.Case(SPR.XER.value): comb += self.fast_out.data.eq(FastRegs.XER) comb += self.fast_out.ok.eq(1) - pass # do nothing + with m.Case(SPR.TB.value): + comb += self.fast_out.data.eq(FastRegs.TB) + comb += self.fast_out.ok.eq(1) + with m.Case(SPR.DEC.value): + comb += self.fast_out.data.eq(FastRegs.DEC) + comb += self.fast_out.ok.eq(1) # : map to internal SPR numbers # XXX TODO: dec and tb not to go through mapping. with m.Default(): diff --git a/src/soc/decoder/power_regspec_map.py b/src/soc/decoder/power_regspec_map.py index 65caf014..6c1e76e7 100644 --- a/src/soc/decoder/power_regspec_map.py +++ b/src/soc/decoder/power_regspec_map.py @@ -91,7 +91,7 @@ def regspec_decode_read(e, regfile, name): if regfile == 'STATE': # STATE register numbering is *unary* encoded PC = 1<