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 support for symmetric serial-tilelink #1716

Merged
merged 16 commits into from
Jan 12, 2024
Merged

Add support for symmetric serial-tilelink #1716

merged 16 commits into from
Jan 12, 2024

Conversation

jerryz123
Copy link
Contributor

Updated APIs:

  • ClockedIO[SerialIO] and variants are now InternalSyncSerialIO/ExternalSyncSerialIO, for clarity
  • SimDRAM/SimTSI now can take a chipId parameter, allowing simulating multiple SimTSI interfaces, as well as multiple DRAM interfaces across multiple chips

New:

  • SourceSyncSerialIO, configuration option for testchipip's serial-TL generator that generates a symmetric credited source-synchronous interface
  • SymmetricRocketChipletConfig, demonstrates a RocketConfig that exposes a second symmetric serial-TL port, that can be connected to an instance of itself

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?

new testchipip.serdes.WithSerialTL(Seq(testchipip.serdes.SerialTLParams( // 1 serial tilelink port
manager = Some(testchipip.serdes.SerialTLManagerParams( // port acts as a manager of offchip memory
memParams = Seq(testchipip.serdes.ManagerRAMParams( // 4 GB of off-chip memory
address = BigInt("80000000", 16),

Choose a reason for hiding this comment

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

Do we want these addresses to be configurable? What if my chip has address space larger than 80000000?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is describing the base address of DRAM in the example ChipLikeRocketConfig. The user is free to select any base+size here, as long as it does not conflict with something else, and as long as the FPGA setup is configured to match.

isMemoryDevice = true
)),
client = Some(testchipip.serdes.SerialTLClientParams()), // Allow an external manager to probe this chip
phyParams = testchipip.serdes.ExternalSyncSerialParams(width=4) // 4-bit bidir interface, sync'd to an external clock

Choose a reason for hiding this comment

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

I am assuming that width=4 is only for testing? Have you tested with wider interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, wider interfaces have been built and tested in the past. I haven't changed the behavior of the serializer for the ExternalSync/InternalSync cases, so this is just changing to the user parameterizes the width.

// Simulates 2X of the SymmetricChipletRocketConfig in a multi-sim config
class MultiSimSymmetricChipletRocketConfig extends Config(
new chipyard.harness.WithAbsoluteFreqHarnessClockInstantiator ++
new chipyard.harness.WithMultiChipSerialTL(chip0=0, chip1=1, chip0portId=1, chip1portId=1) ++

Choose a reason for hiding this comment

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

Why is the chip0portId the same =1 ?
Can chipId and chip portId be different? Why do we need both?

Copy link
Contributor Author

@jerryz123 jerryz123 Dec 27, 2023

Choose a reason for hiding this comment

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

Each chip exposes 2 serial TL ports

  • Chip0
    • serTL0 => goes to FPGA bringup platform
    • serTL1 => goes to Chip1
  • Chip1
    • serTL0 => goes to FPGA bringup platform
    • serTL1 => goes to Chip0

val bits = port.io.bits
if (DataMirror.directionOf(port.io.clock) == Direction.Input) {
port.io.clock := th.harnessBinderClock
case (th: HasHarnessInstantiators, port: SerialTLPort, chipId: Int) if (port.portId == 0) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the SerialTL port to external memory / bringup FPGA have to be on port 0? If so, is this documented somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, its not required to be port0, but for convention, I think it should be. This HarnessBinder assumes its port0, as you've noticed. We should stick to this standard, but I'm not sure this is easy to enforce in the generator (since the generator doesn't know what a serial-TL port will connect to.).

Copy link
Contributor

Choose a reason for hiding this comment

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

That seems reasonable. It does seem difficult to add an assert for that. How about adding a config to the TL-serdesser which allows for adding a port instead of requiring the user to configure all the ports at once? Like WithSerialTL but instead of passing a seq, pass SerialTLParams and (optionally?) an index. Since the abstract config already adds the external serial-TL port, this will help enforce that port0 is the external port and overwriting all the ports can be use-at-your-own-risk.
This could probably be added later though. I do think the chipyard documentation should be updated at some point with all the chiplet/multi-chiptop changes, and the external port0 thing would be good to note.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about adding a config to the TL-serdesser which allows for adding a port instead of requiring the user to configure all the ports at once?

Yeah, that can be added. I think it will inevitably be confusing, however, to keep track of what is being "appended to", vs "overwritten".

@jerryz123 jerryz123 force-pushed the symmetric_sertl branch 2 times, most recently from fe13a6b to 0a6e895 Compare December 28, 2023 15:57
@jerryz123 jerryz123 marked this pull request as ready for review January 1, 2024 23:45
Merge remote-tracking branch 'origin/main' into symmetric_sertl
@jerryz123
Copy link
Contributor Author

jerryz123 commented Jan 12, 2024

Merging this to fix a bug on main and to unblock other work.

@jerryz123 jerryz123 merged commit dda3dcc into main Jan 12, 2024
53 checks passed
@jerryz123 jerryz123 deleted the symmetric_sertl branch January 21, 2024 00:52
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.

None yet

3 participants