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

Gowin. Add DHCEN primitive. #1349

Merged
merged 7 commits into from
Sep 11, 2024
Merged

Gowin. Add DHCEN primitive. #1349

merged 7 commits into from
Sep 11, 2024

Conversation

yrabbit
Copy link
Contributor

@yrabbit yrabbit commented Aug 13, 2024

This primitive allows you to dynamically turn off and turn on the networks of high-speed clocks.

This is done tracking the routes to the sinks and if the route passes through a special HCLK MUX (this may be the input MUX or the output MUX, as well as the interbank MUX), then the control signal of this MUX is used.

This primitive allows you to dynamically turn off and turn on the
networks of high-speed clocks.

This is done tracking the routes to the sinks and if the route passes
through a special HCLK MUX (this may be the input MUX or the output MUX,
as well as the interbank MUX), then the control signal of this MUX is
used.

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

yrabbit commented Aug 14, 2024

I am not enthusiastic about this function - this is a terrible look in the implementation and I would very much like such a function to be part of the API.

https://github.com/yrabbit/nextpnr/blob/05ff80a24eec8b2305a672a4c0d4977d41be3201/himbaechel/uarch/gowin/gowin_utils.h#L41

And I must notice that Xilinx is also spying :)

ioclk0 = ctx->normalise_wire(tile, i);

@gatecat
Copy link
Member

gatecat commented Aug 16, 2024

I don't think this is a massive problem myself, in general if you're normalising wires in the first place then you are also not really dealing with canonical WireIds (there's a general avoidance of using WireIds for non-canonical identifiers).

However, could get_dhcen_bel perhaps analyse connectivity (e.g. following pips up/downhill and then using getWireBelPins) instead of doing the wire normalization thing?

@yrabbit
Copy link
Contributor Author

yrabbit commented Aug 16, 2024

Of course, I can think about making these wires as DHCEN pins, only now it is not attached to them - it only “permits/prohibits” the passage of the signal through them. Does non -existent networks make sense? Hm...

Or I can turn the names of the wires from the very beginning into nomalized right in gowin_arch_gen.py. There is probably a normalization function there, I need to look it up, I don’t remember so offhand.

Use the entire PIP instead of a wire - avoids normalisation and may also
be useful in the future when calculating clock stuff.

Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
Signed-off-by: YRabbit <rabbit@yrabbit.cyou>
@gatecat gatecat merged commit ff7b853 into YosysHQ:master Sep 11, 2024
8 checks passed
@yrabbit yrabbit deleted the dhcen branch September 11, 2024 09:36
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