Skip to content

Commit

Permalink
Fix PLL limits for GW2A-18 C8/I7 (#293)
Browse files Browse the repository at this point in the history
* Fix pll limits for GW2A-18 C8/I7

* Update GW2A-18 permitted frequencies
  • Loading branch information
TrAyZeN authored Nov 26, 2024
1 parent b3d962f commit 49035e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apycula/gowin_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ def infovaluemap(infovalue, start=2):
"GW1N-9": (400, 500, 3.125, 1000, 400),
"GW1N-9C": (400, 600, 3.125, 1200, 400),
"GW1NS-2": (400, 500, 3.125, 1200, 400),
"GW2A-18": (400, 600, 3.125, 1200, 400), # XXX check it
"GW2A-18C": (400, 600, 3.125, 1200, 400), # XXX check it
"GW2A-18": (500, 625, 3.90625, 1250, 500),
"GW2A-18C": (500, 625, 3.90625, 1250, 500),
}
# input params are calculated as described in GOWIN doc (UG286-1.7E_Gowin Clock User Guide)
# fref = fclkin / idiv
Expand Down
16 changes: 9 additions & 7 deletions apycula/gowin_pll.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# pll tool to find best match for the target frequency
# calculations based on: https://github.com/juj/gowin_fpga_code_generators/blob/main/pll_calculator.html
# limits from: http://cdn.gowinsemi.com.cn/DS117E.pdf, http://cdn.gowinsemi.com.cn/DS861E.pdf
#
# limits from:
# - http://cdn.gowinsemi.com.cn/DS117E.pdf,
# - http://cdn.gowinsemi.com.cn/DS861E.pdf,
# - https://cdn.gowinsemi.com.cn/DS226E.pdf

import sys
import re
Expand Down Expand Up @@ -218,11 +220,11 @@ def main():
"comment": "untested",
"pll_name": "rPLL",
"pfd_min": 3,
"pfd_max": 400,
"vco_min": 400,
"vco_max": 1000,
"clkout_min": 3.125,
"clkout_max": 500,
"pfd_max": 500,
"vco_min": 500,
"vco_max": 1250,
"clkout_min": 3.90625,
"clkout_max": 625,
},
}

Expand Down

0 comments on commit 49035e0

Please sign in to comment.