From 8b955e6f694e3dfa4e79025b078f849cacf15872 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Mon, 30 Dec 2019 19:24:26 +0100 Subject: [PATCH] Allow LiteX builder to be used without LiteDRAM. --- litex/soc/integration/builder.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/litex/soc/integration/builder.py b/litex/soc/integration/builder.py index 4b4eca60..665528a8 100644 --- a/litex/soc/integration/builder.py +++ b/litex/soc/integration/builder.py @@ -14,9 +14,16 @@ import struct import shutil from litex.build.tools import write_to_file -from litex.soc.integration import cpu_interface, soc_core, soc_sdram +from litex.soc.integration import cpu_interface, soc_core + +try: + from litex.soc.integration import soc_sdram + from litedram.init import get_sdram_phy_c_header +except ImportError: + class soc_sdram: + class SoCSDRAM: + pass -from litedram.init import get_sdram_phy_c_header __all__ = ["soc_software_packages", "soc_directory", "Builder", "builder_args", "builder_argdict"] -- 2.30.2