Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rowanG077
Copy link

@rowanG077 rowanG077 commented Jul 28, 2021

Added documentation how much of a dynamic phase shift 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);
Copy link
Author

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";
Copy link
Author

@rowanG077 rowanG077 Jul 28, 2021

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.

Copy link
Member

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.

@gatecat gatecat self-requested a review July 29, 2021 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants