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

Add parameter check and DUTY handling #134

Merged
merged 12 commits into from
Dec 6, 2022
Merged

Conversation

yrabbit
Copy link
Collaborator

@yrabbit yrabbit commented Nov 15, 2022

As stated in the documentation: "For example, when the phase shift setting is "0" (00000), 50% duty cycle will be "8" (1000). If the phase shift setting is "180", the 50%, the 50% duty cycle setting is "0" (0000)."

As there are fuses for all DUTY values at the moment we do not check for special missing cases 0, 1, 15.

In the case of static divider assignment, check the permissible frequency range for the desired chip.

Signed-off-by: YRabbit rabbit@yrabbit.cyou

As stated in the documentation: "For example, when the phase shift
setting is "0" (00000), 50% duty cycle will be "8" (1000). If the phase
shift setting is "180", the 50%, the 50% duty cycle setting is "0"
(0000)."

As there are fuses for all DUTY values at the moment we do not check for
special missing cases 0, 1, 15.

In the case of static divider assignment, check the permissible
frequency range for the desired chip.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
It's more honest to call it a formula to approximate the combination of
fuses for different frequencies as we are unlikely to ever find out
exactly how the PLL internals of these chips are set up.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
@yrabbit
Copy link
Collaborator Author

yrabbit commented Nov 15, 2022

I think the PLL examples need to be reworked so that several images with different output frequencies are generated for each board. hm...

The frequencies used are the most appropriate for the quartz resonators
of the different boards.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Having dedicated ports for dividers makes configuration on the move much easier.

Examples have been added for dynamic PLL reconfiguration.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Convert some numerical attribute values to strings and combine port
wires.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Adding a flip-flop to the PLL example so there is no swearing.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Also an illustration of disabling ports in the example (reset, reset_p,
clkouto and ckoutpd3 are not used).

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
When unpacking, all unused ports are removed.

Also:
  - RESET and RESET_P inputs are disabled by default;
  - allowing feedback via dedicated pin and general routing.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
@yrabbit
Copy link
Collaborator Author

yrabbit commented Dec 4, 2022

About support for different feedback and clkin routes - gowin_pack of course does not do routing, it just removes restrictions on usage, the routes themselves are created in nextpnr :)

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
If the input MUX (for CLKIN input) is in a state where all its 3
programming bits are 0, the PLL is assumed to be disabled.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
@yrabbit yrabbit marked this pull request as ready for review December 6, 2022 12:55
@yrabbit yrabbit merged commit 61b1c14 into YosysHQ:master Dec 6, 2022
@yrabbit yrabbit deleted the stage-1 branch December 6, 2022 13:10
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.

1 participant