-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vcocalc.py improvements #1773
vcocalc.py improvements #1773
Conversation
refdiv_max = 63 | ||
|
||
def validRefdiv(string): | ||
if ((int(string) < refdiv_min) or (int(string) > refdiv_max)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a minor nit, but I think personally I'd do the int(string)
once, rather than three separate times?
if best[4] != 1: | ||
print( | ||
""" | ||
As the requires a non-standard refdiv, this will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"As the requires" -> "As this requires" ?
)\ | ||
""".format(best[4], int((args.input * 1_000_000) / best[4] * best[1]), best[2], best[3])) | ||
else: | ||
print("UNABLE TO COME UP WITH A SOLUTION....") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
Add extra check to match checks in check_sys_clock_khz, and add --lock-refdiv option to set fixed refdiv
Also add blurb to the output when a non-standard refdiv is required
Fixes #1665, and fixes #1451