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

Improve GCD example #1757

Merged
merged 3 commits into from
Jan 26, 2024
Merged

Improve GCD example #1757

merged 3 commits into from
Jan 26, 2024

Conversation

jerryz123
Copy link
Contributor

With recent rocket-chip bumps. the example GCD MMIO peripheral had to update. Given that many people base their own MMIO peripheral implementations off the example GCD, I thought it best to update the example GCD to match a more "standard" style of peripheral device construction.

This change

  • Reduces the number of traits in the example
  • Switches to a more straightforward LazyModule + node structure, instead of the opaque (and to-be-deprecated) TLRegisterRouter API
  • Sacrifices concision for clarity, the examples for AXI and TL duplicate some code, but this makes each example clearer
  • Demonstrates how to declare a peripheral as a ClockSinkDomain, which enables it to be placed under BaseSubsystem without being wrapped in another layer of module hierarchy.

Related PRs / Issues:

Type of change:

  • Bug fix
  • New feature
  • Other enhancement

Impact:

  • RTL change
  • Software change (RISC-V software)
  • Build system change
  • Other

Contributor Checklist:

  • Did you set main as the base branch?
  • Is this PR's title suitable for inclusion in the changelog and have you added a changelog:<topic> label?
  • Did you state the type-of-change/impact?
  • Did you delete any extraneous prints/debugging code?
  • Did you mark the PR with a changelog: label?
  • (If applicable) Did you update the conda .conda-lock.yml file if you updated the conda requirements file?
  • (If applicable) Did you add documentation for the feature?
  • (If applicable) Did you add a test demonstrating the PR?
  • (If applicable) Did you mark the PR as Please Backport?

Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

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

LGTM. Doc change?

@jerryz123 jerryz123 merged commit 50d9770 into main Jan 26, 2024
53 checks passed
@jerryz123 jerryz123 deleted the clean-gcd branch January 26, 2024 20:42
@gonsolo
Copy link
Contributor

gonsolo commented Jan 29, 2024

https://chipyard.readthedocs.io/en/latest/Customization/MMIO-Peripherals.html still refers to TLRegisterRouter.
I guess that has to be updated too?

@gonsolo gonsolo mentioned this pull request Jan 29, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants