From 3061bf91ceba97e6caf2496678990f9b84c6f8e9 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 29 Feb 2024 14:56:52 +0100 Subject: [PATCH] liteeth_gen: Make udp_ports definition optional in .yml file (ex for configuration with only Etherbone). --- liteeth/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liteeth/gen.py b/liteeth/gen.py index 810b851..6498fff 100755 --- a/liteeth/gen.py +++ b/liteeth/gen.py @@ -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"