From 9ebed4d055f624274e9a793b7e0e8774ae88ace5 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 15 May 2016 12:54:04 +0200 Subject: Added FILTER_RANGE support to icepll --- icepll/icepll.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'icepll') 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; } -- cgit v1.2.3