aboutsummaryrefslogtreecommitdiffstats
path: root/icepll/icepll.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-07-31 15:59:14 +0200
committerClifford Wolf <clifford@clifford.at>2017-07-31 15:59:14 +0200
commit6948c4370dc3f10d05eedfc4408ecb0cbd5f373c (patch)
treec9431ec1cb435318f0b3ded7d28ee8b18bd5e768 /icepll/icepll.cc
parent81e943e050dad652da795d21375bb700064116f4 (diff)
parent1f9d00bb9cb2eeea0261d00324ff44e9b3f02136 (diff)
downloadicestorm-6948c4370dc3f10d05eedfc4408ecb0cbd5f373c.tar.gz
icestorm-6948c4370dc3f10d05eedfc4408ecb0cbd5f373c.tar.bz2
icestorm-6948c4370dc3f10d05eedfc4408ecb0cbd5f373c.zip
Merge branch 'ice5k'
Diffstat (limited to 'icepll/icepll.cc')
-rw-r--r--icepll/icepll.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/icepll/icepll.cc b/icepll/icepll.cc
index 744b9b1..6b6cedb 100644
--- a/icepll/icepll.cc
+++ b/icepll/icepll.cc
@@ -108,14 +108,10 @@ int main(int argc, char **argv)
int best_divf = 0;
int best_divq = 0;
- //The documentation in the iCE40 PLL Usage Guide incorrectly lists the
- //maximum value of DIVF as 63, when it is only limited to 63 when using
- //feedback modes other that SIMPLE.
- int divf_max = 63;
- if(simple_feedback)
- {
- divf_max = 127;
- }
+ // The documentation in the iCE40 PLL Usage Guide incorrectly lists the
+ // maximum value of DIVF as 63, when it is only limited to 63 when using
+ // feedback modes other that SIMPLE.
+ int divf_max = simple_feedback ? 127 : 63;
if (f_pllin < 10 || f_pllin > 133) {
fprintf(stderr, "Error: PLL input frequency %.3f MHz is outside range 10 MHz - 133 MHz!\n", f_pllin);