gsd_orangecrab/butterstick: Add assert on devices.

This commit is contained in:
Florent Kermarrec 2022-03-18 10:44:16 +01:00
parent 9faa805ab9
commit 3ebad7f7cc
2 changed files with 2 additions and 0 deletions

View File

@ -188,6 +188,7 @@ class Platform(LatticePlatform):
def __init__(self, revision="1.0", device="85F", toolchain="trellis", **kwargs):
assert revision in ["1.0"]
assert device in ["25F", "45F", "85F"]
self.revision = revision
io = {"1.0": _io_r1_0}[revision]
connectors = {"1.0": _connectors_r1_0}[revision]

View File

@ -222,6 +222,7 @@ class Platform(LatticePlatform):
def __init__(self, revision="0.2", device="25F", toolchain="trellis", **kwargs):
assert revision in ["0.1", "0.2"]
assert device in ["25F", "45F", "85F"]
self.revision = revision
io = {"0.1": _io_r0_1, "0.2": _io_r0_2 }[revision]
connectors = {"0.1": _connectors_r0_1, "0.2": _connectors_r0_2}[revision]