interconnect/wishbone: remove CSRBank (probably not used by anyone).
This commit is contained in:
parent
e404608cf4
commit
86952a6e06
|
@ -517,28 +517,3 @@ class Cache(Module):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Wishbone CSRBank ---------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class CSRBank(csr.GenericBank):
|
|
||||||
def __init__(self, description, bus=None):
|
|
||||||
if bus is None:
|
|
||||||
bus = Interface()
|
|
||||||
self.bus = bus
|
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
csr.GenericBank.__init__(self, description, len(self.bus.dat_w))
|
|
||||||
|
|
||||||
for i, c in enumerate(self.simple_csrs):
|
|
||||||
self.comb += [
|
|
||||||
c.r.eq(self.bus.dat_w[:c.size]),
|
|
||||||
c.re.eq(self.bus.cyc & self.bus.stb & ~self.bus.ack & self.bus.we & \
|
|
||||||
(self.bus.adr[:self.decode_bits] == i))
|
|
||||||
]
|
|
||||||
|
|
||||||
brcases = dict((i, self.bus.dat_r.eq(c.w)) for i, c in enumerate(self.simple_csrs))
|
|
||||||
self.sync += [
|
|
||||||
Case(self.bus.adr[:self.decode_bits], brcases),
|
|
||||||
If(bus.ack, bus.ack.eq(0)).Elif(bus.cyc & bus.stb, bus.ack.eq(1))
|
|
||||||
]
|
|
||||||
|
|
Loading…
Reference in New Issue