From 47851c232868bfcbf6b088d04916476c1de10e97 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sat, 2 Sep 2023 21:27:01 +0000 Subject: [PATCH] vendor.GowinPlatform: fix fencepost error in oscillator range. Python ranges are half-open (exclusive). --- amaranth/vendor/_gowin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amaranth/vendor/_gowin.py b/amaranth/vendor/_gowin.py index 1dd1c65..38a4625 100644 --- a/amaranth/vendor/_gowin.py +++ b/amaranth/vendor/_gowin.py @@ -161,7 +161,7 @@ class GowinPlatform(TemplatedPlatform): @property def _osc_div(self): - div_range = range(2, 128, 2) + div_range = range(2, 130, 2) div_frac = Fraction(self._osc_base_freq, self.osc_frequency) if div_frac.denominator != 1 or div_frac not in div_range: