liteeth_gen: Make udp_ports definition optional in .yml file (ex for configuration with only Etherbone).

This commit is contained in:
Florent Kermarrec 2024-02-29 14:56:52 +01:00
parent 21ff1b9369
commit 3061bf91ce
1 changed files with 1 additions and 1 deletions

View File

@ -579,7 +579,7 @@ class UDPCore(PHYCore):
self.comb += axil_bus.connect_to_pads(platform.request("mmap"), mode="master")
# UDP Ports --------------------------------------------------------------------------------
for name, port_cfg in core_config["udp_ports"].items():
for name, port_cfg in core_config.get("udp_ports", {}).items():
# mode either `raw` or `stream`, default to streamer to be backwards compatible
mode = port_cfg.get("mode", "streamer")
assert mode == "raw" or mode == "streamer"