vendor.GowinPlatform: fix fencepost error in oscillator range.

Python ranges are half-open (exclusive).
This commit is contained in:
Catherine 2023-09-02 21:27:01 +00:00
parent bfd62569c8
commit 47851c2328

View file

@ -161,7 +161,7 @@ class GowinPlatform(TemplatedPlatform):
@property @property
def _osc_div(self): 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) div_frac = Fraction(self._osc_base_freq, self.osc_frequency)
if div_frac.denominator != 1 or div_frac not in div_range: if div_frac.denominator != 1 or div_frac not in div_range: