build/xilinx/vivado: Add pre_optimize_commands.

This commit is contained in:
Florent Kermarrec 2023-10-03 17:24:01 +02:00
parent ca43b00337
commit c0d3766596
1 changed files with 5 additions and 0 deletions

View File

@ -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}")