_toolchain,build.plat,vendor.*: add required_tools list and checks.

This commit is contained in:
Emily 2019-08-31 00:27:22 +01:00 committed by whitequark
parent 4e91710933
commit c4e8ac734f
8 changed files with 75 additions and 22 deletions

View file

@ -239,6 +239,14 @@ class LatticeECP5Platform(TemplatedPlatform):
assert toolchain in ("Trellis", "Diamond")
self.toolchain = toolchain
@property
def required_tools(self):
if self.toolchain == "Trellis":
return ["yosys", "nextpnr-ecp5", "ecppack"]
if self.toolchain == "Diamond":
return ["pnmainc", "ddtcmd"]
assert False
@property
def file_templates(self):
if self.toolchain == "Trellis":

View file

@ -39,6 +39,12 @@ class LatticeICE40Platform(TemplatedPlatform):
device = abstractproperty()
package = abstractproperty()
required_tools = [
"yosys",
"nextpnr-ice40",
"icepack",
]
_nextpnr_device_options = {
"iCE40LP384": "--lp384",
"iCE40LP1K": "--lp1k",

View file

@ -50,6 +50,8 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
package = abstractproperty()
speed = abstractproperty()
required_tools = ["vivado"]
file_templates = {
**TemplatedPlatform.build_script_templates,
"{{name}}.v": r"""

View file

@ -57,6 +57,14 @@ class XilinxSpartan3Or6Platform(TemplatedPlatform):
package = abstractproperty()
speed = abstractproperty()
required_tools = [
"xst",
"ngdbuild",
"map",
"par",
"bitgen",
]
@property
def family(self):
device = self.device.upper()