build/gowin: Use build_name instead of top for generated files.

This commit is contained in:
Florent Kermarrec 2022-08-05 08:30:07 +02:00
parent 3c1e8e74fc
commit 2fba07daf8
1 changed files with 6 additions and 6 deletions

View File

@ -82,8 +82,8 @@ class GowinToolchain(GenericToolchain):
if self.named_pc: if self.named_pc:
cst.extend(self.named_pc) cst.extend(self.named_pc)
tools.write_to_file("top.cst", "\n".join(cst)) tools.write_to_file(f"{self._build_name}.cst", "\n".join(cst))
return ("top.cst", "CST") return (f"{self._build_name}.cst", "CST")
# Timing Constraints (.sdc ) ------------------------------------------------------------------- # Timing Constraints (.sdc ) -------------------------------------------------------------------
@ -91,8 +91,8 @@ class GowinToolchain(GenericToolchain):
sdc = [] sdc = []
for clk, period in sorted(self.clocks.items(), key=lambda x: x[0].duid): for clk, period in sorted(self.clocks.items(), key=lambda x: x[0].duid):
sdc.append(f"create_clock -name {vns.get_name(clk)} -period {str(period)} [get_ports {{{vns.get_name(clk)}}}]") sdc.append(f"create_clock -name {vns.get_name(clk)} -period {str(period)} [get_ports {{{vns.get_name(clk)}}}]")
tools.write_to_file("top.sdc", "\n".join(sdc)) tools.write_to_file(f"{self._build_name}.sdc", "\n".join(sdc))
return ("top.sdc", "SDC") return (f"{self._build_name}.sdc", "SDC")
# Project (tcl) -------------------------------------------------------------------------------- # Project (tcl) --------------------------------------------------------------------------------
@ -103,10 +103,10 @@ class GowinToolchain(GenericToolchain):
tcl.append(f"set_device -name {self.platform.devicename} {self.platform.device}") tcl.append(f"set_device -name {self.platform.devicename} {self.platform.device}")
# Add IOs Constraints. # Add IOs Constraints.
tcl.append("add_file top.cst") tcl.append(f"add_file {self._build_name}.cst")
# Add Timings Constraints. # Add Timings Constraints.
tcl.append("add_file top.sdc") tcl.append(f"add_file {self._build_name}.sdc")
# Add Sources. # Add Sources.
for f, typ, lib in self.platform.sources: for f, typ, lib in self.platform.sources: