From 671260da2dd71aaff01e0ec5939df5363e28c402 Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Sat, 7 Oct 2023 12:30:47 +0200 Subject: [PATCH] Moved exception raise --- constants/ecp5_platforms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/constants/ecp5_platforms.py b/constants/ecp5_platforms.py index c973967a7..8bca17145 100644 --- a/constants/ecp5_platforms.py +++ b/constants/ecp5_platforms.py @@ -60,6 +60,7 @@ def named_pin(self, names: list[str]): if name in self.pin_bag: self.pin_bag.remove(name) return name + raise RuntimeError("Named pins %s not free" % ", ".join(names)) ResourceBuilder: TypeAlias = Callable[[PinManager], list[Resource]] @@ -124,8 +125,6 @@ class ECP5BG756Platform(LatticeECP5Platform): default_rst = "rst" clk_pin = pins.named_pin(ecp5_bg756_pclk) - if clk_pin is None: - raise RuntimeError("No free clk pin found.") resources = [ Resource("rst", 0, PinsN(pins.p(), dir="i"), Attrs(IO_TYPE="LVCMOS33")), Resource("clk", 0, Pins(clk_pin, dir="i"), Clock(12e6), Attrs(IO_TYPE="LVCMOS33")),