bus/lasmibus/Crossbar: support cba_shift=0

This commit is contained in:
Sebastien Bourdeauducq 2013-06-11 18:15:49 +02:00
parent fe54c68762
commit 1ec1fb9ebe
1 changed files with 4 additions and 1 deletions

View File

@ -133,7 +133,10 @@ class Crossbar(Module):
cba_upper = cba_shift + controller_bits + bank_bits
self.comb += cba.eq(master.adr[cba_shift:cba_upper])
if cba_shift < rca_bits:
self.comb += rca.eq(Cat(master.adr[:cba_shift], master.adr[cba_upper:]))
if cba_shift:
self.comb += rca.eq(Cat(master.adr[:cba_shift], master.adr[cba_upper:]))
else:
self.comb += rca.eq(master.adr[cba_upper:])
else:
self.comb += rca.eq(master.adr[:cba_shift])