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 Chip ID Pin #212

Merged
merged 2 commits into from
Jan 16, 2024
Merged

Add Chip ID Pin #212

merged 2 commits into from
Jan 16, 2024

Conversation

schwarz-em
Copy link

Adds a pin to set the chip id for each chip. The pin drives a read-only MMIO register attached to the CBUS.

The purpose of adding this pin is to enable cache coherency across multi-chip configs in Chipyard.

import freechips.rocketchip.subsystem._

case class ChipIdPinParams (
numChips: Int = 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of numChips, lets just make this width. Everything is in relation to the width.


val inner_io = tlbus {
val node = TLRegisterNode(
address = Seq(AddressSet(params.chipIdAddr, 0xfff)), //TODO: fix address set size
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets make the address set size 4096 bytes, to match all the other devices.

A wider size than the actual register also simplifies address decoding.

Copy link
Contributor

@jerryz123 jerryz123 left a comment

Choose a reason for hiding this comment

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

Minor nits, otherwise looks good here

@jerryz123 jerryz123 merged commit edacb21 into master Jan 16, 2024
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