diff --git a/litex/soc/cores/led.py b/litex/soc/cores/led.py index 477b93e046..e6bc6d9a7f 100644 --- a/litex/soc/cores/led.py +++ b/litex/soc/cores/led.py @@ -137,7 +137,8 @@ def __init__(self, pad, nleds, sys_clk_freq, bus_mastering=False, bus_base=None, self.bus = bus = wishbone.Interface(data_width=32, address_width=32, addressing="word") else: # Memory. - mem = Memory(32, nleds, init=init) + mem_depth = max(nleds, 2) + mem = Memory(32, mem_depth, init=init) port = mem.get_port() self.specials += mem, port