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

HCLK Support #258

Merged
merged 21 commits into from
Aug 13, 2024
Merged

HCLK Support #258

merged 21 commits into from
Aug 13, 2024

Conversation

Seyviour
Copy link
Contributor

@Seyviour Seyviour commented Jul 6, 2024

Summary

This pull request documents the CLKDIV and CLKDIV2 HCLK bels for the GW1N-9(C) and GW2A-18(C). A follow up pull request will document pinouts for other devices. This PR also provides two examples of HCLK Bel usage (blinky and DVI), along with documentation on the general structure of HCLK.

Examples

  1. blinky-clkdiv: A blinky example that shows CLKDIV configured with different DIV_MODES. make -f Makefile.himbaechel blinky-clkdiv-tangnano9k.fs
  2. DVI: A simple DVI example that 'wipes' a new colour across the screen every few seconds. make -f Makefile.himbaechel dvi-example-tangnano9k.fs`

Named/Renamed Wires

Along with naming new HCLK wires, this PR renames some others. Specifically, the wires previously named HCLK_OUT have been renamed to HCLK_SECTION_IN to be more descriptive of their apparent function. This renaming does not affect the rest of the current HCLK implementation since the HCLK_OUT name still applies to the wires defined to connect out of HCLK.

Documentation

doc/hclk.md provides documentation on the (currently understood) standard structure of HCLK.

  • HCLK in other devices (except perhaps the GW1NS-4) are expected to behave like the HCLK in the GW2A-18. A follow up PR will provide the necessary documentation needed to get HCLK working in them.
  • A 'sister' PR will also be made to nextpnr for HCLK.

Companion nextpnr PR: YosysHQ/nextpnr#1340



_hclk_default_params ={"GSREN": "false", "DIV_MODE":"2"}
def set_hclk_attrs(db, params, num, typ, cell_name, device):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no need to pass device here - this is already a global variable

Copy link
Contributor Author

@Seyviour Seyviour Jul 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true! I'll correct that. I didn't notice that it was global earlier.

@pepijndevos
Copy link
Member

At first glance this looks great, but after the move all my electronics are still in boxes so it's hard for me to test.
So if @yrabbit has reviewed and tested it, the nextpnr side is in, and CI passes, it's good to go as far as I'm concerned.

@Seyviour
Copy link
Contributor Author

Thank you @pepijndevos. There's a bug on the nextpnr side that I need to address first.

@yrabbit yrabbit merged commit 9250ce6 into YosysHQ:master Aug 13, 2024
9 checks passed
@pepijndevos
Copy link
Member

Thank you very much!

@Seyviour
Copy link
Contributor Author

My pleasure. Thanks for merging!

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.

3 participants