Skip to content

Commit

Permalink
liteeth_gen: Finish adding Etherbone support.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Jun 22, 2023
1 parent 52e94c0 commit 2681a4f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions liteeth/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,22 @@ def __init__(self, platform, core_config):

# Etherbone --------------------------------------------------------------------------------

# /!\ WIP /!\
with_etherbone = False
if with_etherbone:
etherbone = core_config.get("etherbone", False)
etherbone_port = core_config.get("etherbone_port", 1234)
etherbone_buffer_depth = core_config.get("etherbone_buffer_depth", 16)

if etherbone:
assert (data_width == 32)
self.submodules.etherbone = LiteEthEtherbone(self.core.udp, 1234, buffer_depth=16, cd="sys")
self.submodules.etherbone = LiteEthEtherbone(
udp = self.core.udp,
udp_port = etherbone_port,
buffer_depth = etherbone_buffer_depth,
cd = "sys"
)
axil_bus = axi.AXILiteInterface(address_width=32, data_width=32)
platform.add_extension(axil_bus.get_ios("mmap"))
self.submodules += axi.Wishbone2AXILite(self.etherbone.wishbone.bus, axil_bus)
self.comb += axil_bus.connect_to_pads(platform.request("mmap"), mode="master")
# /!\ WIP /!\

# UDP Ports --------------------------------------------------------------------------------
for name, port in core_config["udp_ports"].items():
Expand Down

0 comments on commit 2681a4f

Please sign in to comment.