From 15bca4535f61e9dc2bf97d120bb310089efa8f3d Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 2 Oct 2018 11:31:08 +0200 Subject: [PATCH] targets/sim: fix integrated_main_ram_size when with_sdram --- litex/boards/targets/sim.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/boards/targets/sim.py b/litex/boards/targets/sim.py index f92552506..7c324007a 100755 --- a/litex/boards/targets/sim.py +++ b/litex/boards/targets/sim.py @@ -167,11 +167,13 @@ def main(): sim_config.add_module("serial2console", "serial") if args.rom_init: soc_kwargs["integrated_rom_init"] = get_mem_data(args.rom_init) - soc_kwargs["integrated_main_ram_size"] = 0x10000 if not args.with_sdram: + soc_kwargs["integrated_main_ram_size"] = 0x10000 if args.ram_init is not None: soc_kwargs["integrated_main_ram_init"] = get_mem_data(args.ram_init) soc_kwargs["integrated_main_ram_size"] = max(len(soc_kwargs["integrated_main_ram_init"]), 0x10000) + else: + soc_kwargs["integrated_main_ram_size"] = 0x0 if args.with_ethernet: sim_config.add_module("ethernet", "eth", args={"interface": "tap0", "ip": "192.168.1.100"}) if args.with_etherbone: