reduce XICS address lookup by 2 bits
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 5 Sep 2020 18:06:37 +0000 (19:06 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 5 Sep 2020 18:06:37 +0000 (19:06 +0100)
src/soc/interrupts/xics.py

index 7abd2e95c4f210a983087bb927bab95f0c29b251..1b6b95fd26505020035e9cd73ad27b5d6495804a 100644 (file)
@@ -117,7 +117,7 @@ class XICS_ICP(Elaboratable):
             comb += v.wb_ack.eq(1) # always ack
             with m.If(self.bus.we): # write
                 # writes to both XIRR are the same
-                with m.Switch(self.bus.adr[:8]):
+                with m.Switch(self.bus.adr[:6]):
                     with m.Case(XIRR_POLL):
                         # report "ICP XIRR_POLL write";
                         comb += v.cppr.eq(be_in[24:32])
@@ -151,7 +151,7 @@ class XICS_ICP(Elaboratable):
 
             with m.Else(): # read
 
-                with m.Switch(self.bus.adr[:8]):
+                with m.Switch(self.bus.adr[:6]):
                     with m.Case(XIRR_POLL):
                         # report "ICP XIRR_POLL read";
                         comb += be_out.eq(r.xisr & r.cppr)