From d3f3f658cb8bb723d05687a4e713e8ae214d1a4a Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 24 Mar 2022 11:54:50 +0100 Subject: [PATCH] integration/soc: Generate RAM_INIT config defined when ram is initialized. --- litex/soc/integration/soc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litex/soc/integration/soc.py b/litex/soc/integration/soc.py index 9b8a6502b..1fe83b03c 100644 --- a/litex/soc/integration/soc.py +++ b/litex/soc/integration/soc.py @@ -855,6 +855,8 @@ class SoC(Module): colorer("added", color="green"), self.bus.regions[name])) setattr(self.submodules, name, ram) + if contents != []: + self.add_config(f"{name}_INIT", 1) def add_rom(self, name, origin, size, contents=[], mode="r"): self.add_ram(name, origin, size, contents, mode=mode)