Skip to content

Commit

Permalink
Moved exception raise
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Oct 7, 2023
1 parent e8da514 commit 671260d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions constants/ecp5_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down Expand Up @@ -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")),
Expand Down

0 comments on commit 671260d

Please sign in to comment.