select bits 2:5 from BC to get CR0 to 7 in DecodeCRin
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 23 May 2020 03:13:22 +0000 (04:13 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 23 May 2020 03:13:22 +0000 (04:13 +0100)
src/soc/decoder/power_decoder2.py

index dbd87f967255f97bbec0b47a2b295780d6381033..e5aa0321f9c2a1a90a46bf5b59cbd1f0b06a22f0 100644 (file)
@@ -310,7 +310,7 @@ class DecodeCRIn(Elaboratable):
                 comb += self.cr_bitfield_o.data.eq(self.dec.BT[2:5])
                 comb += self.cr_bitfield_o.ok.eq(1)
             with m.Case(CRInSel.BC):
-                comb += self.cr_bitfield.data.eq(self.dec.BC[0:-1])
+                comb += self.cr_bitfield.data.eq(self.dec.BC[2:5])
                 comb += self.cr_bitfield.ok.eq(1)
             with m.Case(CRInSel.WHOLE_REG):
                 comb += self.whole_reg.eq(1)