Skip to content

Commit

Permalink
Merge pull request #1769 from Icenowy/gw5a-pll-fix
Browse files Browse the repository at this point in the history
clock/gowin_gw5a: change allowed frequency range for GW5A- prefix
  • Loading branch information
enjoy-digital authored Sep 6, 2023
2 parents e185871 + 7afe06a commit e1025c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions litex/soc/cores/clock/gowin_gw5a.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def __init__(self, devicename, device, vco_margin=0):
@staticmethod
def get_vco_freq_range(device):
vco_freq_range = None
if device.startswith('GW5A-') or device.startswith('GW5AT-') or device.startswith('GW5AST-'):
if device.startswith('GW5A-'):
vco_freq_range = (800e6, 1600e6) # As restricted by Gowin toolchain 1.9.9b3
elif device.startswith('GW5A-') or device.startswith('GW5AT-') or device.startswith('GW5AST-'):
vco_freq_range = (800e6, 2000e6) # datasheet values
if vco_freq_range is None:
raise ValueError(f"Unsupported device {device}.")
Expand All @@ -45,7 +47,9 @@ def get_vco_freq_range(device):
@staticmethod
def get_pfd_freq_range(device):
pfd_freq_range = None
if device.startswith('GW5A-') or device.startswith('GW5AT-') or device.startswith('GW5AST-'):
if device.startswith('GW5A-'):
pfd_freq_range = (19e6, 400e6) # As restricted by Gowin toolchain 1.9.9b3
elif device.startswith('GW5AT-') or device.startswith('GW5AST-'):
pfd_freq_range = (10e6, 400e6) # datasheet values
if pfd_freq_range is None:
raise ValueError(f"Unsupported device {device}.")
Expand Down

0 comments on commit e1025c6

Please sign in to comment.