soc.base: add support for adding user-provided template parameters.
authorJean-François Nguyen <jf@lambdaconcept.com>
Mon, 28 Jun 2021 17:56:47 +0000 (19:56 +0200)
committerJean-François Nguyen <jf@lambdaconcept.com>
Mon, 28 Jun 2021 17:56:56 +0000 (19:56 +0200)
lambdasoc/soc/base.py

index ceb3663c021c6a5e2365f6470f0983282cbecbc8..1c48f12b9aec795b03cd33c68109485fd985a38c 100644 (file)
@@ -65,7 +65,7 @@ class ConfigBuilder:
     }
     command_templates = []
 
-    def prepare(self, soc, build_dir, name):
+    def prepare(self, soc, build_dir, name, **render_params):
         name = name or type(soc).__name__.lower()
 
         autogenerated = "Automatically generated by LambdaSoC {}. Do not edit.".format(__version__)
@@ -110,6 +110,7 @@ class ConfigBuilder:
                 "periph_csrs": periph_csrs,
                 "soc": soc,
                 "software_dir": os.path.dirname(software.__file__),
+                **render_params,
             })
 
         plan = BuildPlan(script="build_{}".format(name))