aboutsummaryrefslogtreecommitdiffstats
path: root/icepll
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-05-15 12:54:04 +0200
committerClifford Wolf <clifford@clifford.at>2016-05-15 12:54:04 +0200
commit9ebed4d055f624274e9a793b7e0e8774ae88ace5 (patch)
tree65d56fd83ddeb5b101c635ba5876b59c443fb880 /icepll
parent37cc00c3dfe28430411275aaabee1f4784a0eb9d (diff)
downloadicestorm-9ebed4d055f624274e9a793b7e0e8774ae88ace5.tar.gz
icestorm-9ebed4d055f624274e9a793b7e0e8774ae88ace5.tar.bz2
icestorm-9ebed4d055f624274e9a793b7e0e8774ae88ace5.zip
Added FILTER_RANGE support to icepll
Diffstat (limited to 'icepll')
-rw-r--r--icepll/icepll.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/icepll/icepll.cc b/icepll/icepll.cc
index 7a3593d..a832b8c 100644
--- a/icepll/icepll.cc
+++ b/icepll/icepll.cc
@@ -142,6 +142,13 @@ int main(int argc, char **argv)
double f_pfd = f_pllin / (best_divr + 1);;
double f_vco = f_pfd * (best_divf + 1);
+ int filter_range =
+ f_pfd < 17 ? 1 :
+ f_pfd < 26 ? 2 :
+ f_pfd < 44 ? 3 :
+ f_pfd < 66 ? 4 :
+ f_pfd < 101 ? 5 : 6;
+
if (!simple_feedback)
f_vco *= exp2(best_divq);
@@ -170,5 +177,9 @@ int main(int argc, char **argv)
printf("\n");
+ printf("FILTER_RANGE: %d (3'b%s)\n", filter_range, binstr(filter_range, 3));
+
+ printf("\n");
+
return 0;
}