-
Notifications
You must be signed in to change notification settings - Fork 87
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
Added dynamic phase shift information into output and output file comments #175
base: master
Are you sure you want to change the base?
Conversation
…hift occurs for all clocks per pulse.
float phase_count = ns_phase * (fvco * 1e6); | ||
params.primary_cphase = phase_count; | ||
int cphase = (int) phase_count; | ||
params.primary_fphase = (int) ((phase_count - cphase) * 8); |
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.
This is the same calculation as done for secondary clocks is this correct?
@@ -422,7 +484,7 @@ void write_pll_config(const pll_params & params, const string &name, ofstream& f | |||
file << " .CLKOP_ENABLE(\"ENABLED\"),\n"; | |||
file << " .CLKOP_DIV(" << params.output_div << "),\n"; | |||
file << " .CLKOP_CPHASE(" << params.primary_cphase << "),\n"; | |||
file << " .CLKOP_FPHASE(0),\n"; | |||
file << " .CLKOP_FPHASE(" << params.primary_fphase << "),\n"; |
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.
Why was 0 used here? The calculated fphase is not always 0.
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.
Thanks, I'll need to take some time to look into this as it's been a good while since I touched the ECP5 PLLs. I will keep this on my list though.
Added documentation how much of a dynamic phase shift occurs for all clocks per pulse.