From c0d376659669dda8615e65cdd414cbe68d8e7302 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 3 Oct 2023 17:24:01 +0200 Subject: [PATCH] build/xilinx/vivado: Add pre_optimize_commands. --- litex/build/xilinx/vivado.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/litex/build/xilinx/vivado.py b/litex/build/xilinx/vivado.py index 65f37938a..ed450efbd 100644 --- a/litex/build/xilinx/vivado.py +++ b/litex/build/xilinx/vivado.py @@ -103,6 +103,7 @@ class XilinxVivadoToolchain(GenericToolchain): self.additional_commands = [] self.project_commands = XilinxVivadoCommands() self.pre_synthesis_commands = XilinxVivadoCommands() + self.pre_optimize_commands = XilinxVivadoCommands() self.pre_placement_commands = XilinxVivadoCommands() self.pre_routing_commands = XilinxVivadoCommands() self.incremental_implementation = False @@ -302,6 +303,10 @@ class XilinxVivadoToolchain(GenericToolchain): tcl.append(f"report_utilization -file {self._build_name}_utilization_synth.rpt") tcl.append(f"write_checkpoint -force {self._build_name}_synth.dcp") + # Add pre-optimize commands + tcl.append("\n# Add pre-optimize commands\n") + tcl.extend(c.format(build_name=self._build_name) for c in self.pre_optimize_commands.resolve(self._vns)) + # Optimize tcl.append("\n# Optimize design\n") tcl.append(f"opt_design -directive {self.opt_directive}")