_toolchain,build.plat,vendor.*: add required_tools list and checks.
This commit is contained in:
parent
4e91710933
commit
c4e8ac734f
8 changed files with 75 additions and 22 deletions
8
nmigen/vendor/lattice_ecp5.py
vendored
8
nmigen/vendor/lattice_ecp5.py
vendored
|
|
@ -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":
|
||||
|
|
|
|||
6
nmigen/vendor/lattice_ice40.py
vendored
6
nmigen/vendor/lattice_ice40.py
vendored
|
|
@ -39,6 +39,12 @@ class LatticeICE40Platform(TemplatedPlatform):
|
|||
device = abstractproperty()
|
||||
package = abstractproperty()
|
||||
|
||||
required_tools = [
|
||||
"yosys",
|
||||
"nextpnr-ice40",
|
||||
"icepack",
|
||||
]
|
||||
|
||||
_nextpnr_device_options = {
|
||||
"iCE40LP384": "--lp384",
|
||||
"iCE40LP1K": "--lp1k",
|
||||
|
|
|
|||
2
nmigen/vendor/xilinx_7series.py
vendored
2
nmigen/vendor/xilinx_7series.py
vendored
|
|
@ -50,6 +50,8 @@ class Xilinx7SeriesPlatform(TemplatedPlatform):
|
|||
package = abstractproperty()
|
||||
speed = abstractproperty()
|
||||
|
||||
required_tools = ["vivado"]
|
||||
|
||||
file_templates = {
|
||||
**TemplatedPlatform.build_script_templates,
|
||||
"{{name}}.v": r"""
|
||||
|
|
|
|||
8
nmigen/vendor/xilinx_spartan_3_6.py
vendored
8
nmigen/vendor/xilinx_spartan_3_6.py
vendored
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue