From 418d0f3c0dcc5e7fb96fee9c0bad82897ae06037 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sun, 26 Jun 2022 09:04:00 +0200 Subject: [PATCH] build/generic_toolchain: finalize() method: for toolchain specifics tasks one platform ready --- litex/build/generic_toolchain.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/litex/build/generic_toolchain.py b/litex/build/generic_toolchain.py index 4e9ea247c..75c3ef1ad 100644 --- a/litex/build/generic_toolchain.py +++ b/litex/build/generic_toolchain.py @@ -26,6 +26,9 @@ class GenericToolchain: self.named_sc = [] self._synth_opts = "" + def finalize(self): + pass # Pass since optional. + def build_io_constraints(self): raise NotImplementedError("GenericToolchain.build_io_constraints must be overloaded.") @@ -68,6 +71,11 @@ class GenericToolchain: # Generate Verilog. v_output = platform.get_verilog(fragment, name=build_name, **kwargs) + + # Finalize toolchain (after gateware is complete) + self.finalize() + + # Get signals and platform constraints self.named_sc, self.named_pc = platform.resolve_signals(v_output.ns) v_file = build_name + ".v" v_output.write(v_file)