interconnect/wishbonebridge: refresh/simplify.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 12 May 2020 10:53:01 +0000 (12:53 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 12 May 2020 11:40:28 +0000 (13:40 +0200)
commit873d95e517b3e6074c3b07502c4a5f05aef09bf4
treed1ed76c45a5804cf32c3985a3e1c7d23996bdb2e
parentc136113a9b71cbcbdf525aaad38acb012f4a12f3
interconnect/wishbonebridge: refresh/simplify.

This should also improve Wishbone timings.

Tested on iCEBreaker:
./icebreaker.py --cpu-type=None --uart-name=uartbone --csr-csv=csr.csv --build --flash

With the following script:

#!/usr/bin/env python3

import sys

from litex import RemoteClient

wb = RemoteClient()
wb.open()

# # #

print("scratch: 0x{:08x}".format(wb.regs.ctrl_scratch.read()))

errors = 0
for i in range(2):
for j in range(32):
wb.write(wb.mems.sram.base + 4*j, i + j)
for j in range(32):
if wb.read(wb.mems.sram.base + 4*j) != (i + j):
errors += 1
print("sram errors: {:d}".format(errors))

# # #

wb.close()
litex/soc/interconnect/wishbonebridge.py