build/toolchains: Specify passed toolchain when unknown.

This commit is contained in:
Florent Kermarrec 2022-01-26 11:55:39 +01:00
parent 3020344fd8
commit 419d605e38
9 changed files with 9 additions and 9 deletions

View file

@ -22,7 +22,7 @@ class AlteraPlatform(GenericPlatform):
if toolchain == "quartus": if toolchain == "quartus":
self.toolchain = quartus.AlteraQuartusToolchain() self.toolchain = quartus.AlteraQuartusToolchain()
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
def add_ip(self, filename): def add_ip(self, filename):
self.ips.add((os.path.abspath(filename))) self.ips.add((os.path.abspath(filename)))

View file

@ -20,7 +20,7 @@ class AnlogicPlatform(GenericPlatform):
if toolchain == "td": if toolchain == "td":
self.toolchain = anlogic.TangDinastyToolchain() self.toolchain = anlogic.TangDinastyToolchain()
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): def get_verilog(self, *args, special_overrides=dict(), **kwargs):
so = dict(common.anlogic_special_overrides) so = dict(common.anlogic_special_overrides)

View file

@ -41,7 +41,7 @@ class EfinixPlatform(GenericPlatform):
if toolchain == "efinity": if toolchain == "efinity":
self.toolchain = efinity.EfinityToolchain(self.efinity_path) self.toolchain = efinity.EfinityToolchain(self.efinity_path)
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
self.parser = EfinixDbParser(self.efinity_path, self.device) self.parser = EfinixDbParser(self.efinity_path, self.device)
self.pll_available = self.parser.get_block_instance_names('pll') self.pll_available = self.parser.get_block_instance_names('pll')

View file

@ -27,7 +27,7 @@ class GowinPlatform(GenericPlatform):
elif toolchain == "apicula": elif toolchain == "apicula":
raise ValueError("Apicula toolchain needs more work") raise ValueError("Apicula toolchain needs more work")
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): def get_verilog(self, *args, special_overrides=dict(), **kwargs):
so = dict(common.gowin_special_overrides) so = dict(common.gowin_special_overrides)

View file

@ -27,7 +27,7 @@ class LatticePlatform(GenericPlatform):
elif toolchain == "oxide": elif toolchain == "oxide":
self.toolchain = oxide.LatticeOxideToolchain() self.toolchain = oxide.LatticeOxideToolchain()
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): def get_verilog(self, *args, special_overrides=dict(), **kwargs):
so = dict() # No common overrides between ECP5 and iCE40. so = dict() # No common overrides between ECP5 and iCE40.

View file

@ -17,7 +17,7 @@ class MicrosemiPlatform(GenericPlatform):
if toolchain == "libero_soc_polarfire": if toolchain == "libero_soc_polarfire":
self.toolchain = libero_soc.MicrosemiLiberoSoCPolarfireToolchain() self.toolchain = libero_soc.MicrosemiLiberoSoCPolarfireToolchain()
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): def get_verilog(self, *args, special_overrides=dict(), **kwargs):
so = dict() so = dict()

View file

@ -19,7 +19,7 @@ class QuickLogicPlatform(GenericPlatform):
if toolchain == "symbiflow": if toolchain == "symbiflow":
self.toolchain = symbiflow.SymbiflowToolchain() self.toolchain = symbiflow.SymbiflowToolchain()
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
def get_verilog(self, *args, special_overrides=dict(), **kwargs): def get_verilog(self, *args, special_overrides=dict(), **kwargs):
so = dict(common.quicklogic_special_overrides) so = dict(common.quicklogic_special_overrides)

View file

@ -24,7 +24,7 @@ class SimPlatform(GenericPlatform):
if toolchain == "verilator": if toolchain == "verilator":
self.toolchain = verilator.SimVerilatorToolchain() self.toolchain = verilator.SimVerilatorToolchain()
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
# we must always request the sim_trace signal # we must always request the sim_trace signal
self.trace = self.request("sim_trace") self.trace = self.request("sim_trace")

View file

@ -36,7 +36,7 @@ class XilinxPlatform(GenericPlatform):
# import symbiflow_nextpnr # import symbiflow_nextpnr
# self.toolchain = symbiflow_nextpnr.SymbiflowNextpnrToolchain() # self.toolchain = symbiflow_nextpnr.SymbiflowNextpnrToolchain()
else: else:
raise ValueError("Unknown toolchain") raise ValueError(f"Unknown toolchain {toolchain}")
def add_edif(self, filename): def add_edif(self, filename):
self.edifs.add((os.path.abspath(filename))) self.edifs.add((os.path.abspath(filename)))