From a2c2d7084176b8b16ed1076dbeab1ffa13f1941c Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Wed, 10 Jan 2024 06:52:06 +0100 Subject: [PATCH] build/gowin/gowin: adding list of additional cst commands (to place resources) Signed-off-by: Gwenhael Goavec-Merou --- litex/build/gowin/gowin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litex/build/gowin/gowin.py b/litex/build/gowin/gowin.py index 8ee97cecf..7129db38e 100644 --- a/litex/build/gowin/gowin.py +++ b/litex/build/gowin/gowin.py @@ -26,6 +26,7 @@ class GowinToolchain(GenericToolchain): def __init__(self): super().__init__() self.options = {} + self.additional_cst_commands = [] def finalize(self): if self.platform.verilog_include_paths: @@ -108,6 +109,8 @@ class GowinToolchain(GenericToolchain): if self.named_pc: cst.extend(self.named_pc) + cst.extend(self.additional_cst_commands) + tools.write_to_file(f"{self._build_name}.cst", "\n".join(cst)) return (f"{self._build_name}.cst", "CST")