Skip to content

Addition of Custom Topology and Custom Routing Algorithms to Constellation #85

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

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

YashCK
Copy link

@YashCK YashCK commented May 8, 2025

This pull request introduces a CustomTopology in Topologies.scala. This class allows anyone to create any NoC topology by specifying the number of nodes and all the edges present in the network graph.

There are 3 new routing relations, CustomLayeredRouting, ShortestPathGeneralizedDatelineRouting, and ShortestPathRouting. The first two algorithms are deadlock free on any arbitrary graph/topology while the ShortestPathRouting is not deadlock free. However it can be used in combination with EscapeChannelRouting.

The new routing relations call helper methods from classes defined in RoutingHelpers.scala. There are some tests provided in the CustomConfigs.scala however an exhaustive suite is not present at the moment.

* using BFS and restricts flow transitions to only those that follow the precomputed
* shortest-path next hop. No deadlock avoidance mechanism is enforced.
*
* If multiple virtual channels (VCs) are available, this router assigns flows to
Copy link
Collaborator

Choose a reason for hiding this comment

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

I actually think the VC allocation policy should not be determined here, it should be done by which implementation of the VCallocator class is chosen. The default might be a PriorityEncoder, but some of the variants use LSFRs (with some logic cost).

I think this approach actually would be more HW-efficient than a LSFR, perhaps, since the randomly assigned flow is chosen statically, rather than dynamically. But this might not be able to load-balance as well as the dynamic approach.

Copy link
Author

@YashCK YashCK May 9, 2025

Choose a reason for hiding this comment

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

Would you suggest making a new VC allocator?
The current hashing scheme was meant to assist the PrioritizingVCAllocator to achieve better VC utilization. However, I realized afterwards that we are actually using the RotatingVCAllocator (the default allocator) in our tapeout so this utilization scheme has actually not been tested yet.

I can also remove the getPrio() function similar to some of the other routing relations.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The original intention of PrioritizingVCAllocator was to avoid sticking flows into escape VCs while non-escape VCs are available, I didn't think it would be used to load-balance across VCs (although it does make sense).

I think we can leave it in, although my intuition is that a better approach is to do a "PriotizingISLIP" or "PrioritizingPIM" allocator that avoids allocating the escape VC, then dynamically load-balances across the non-escape VCs.

Copy link
Collaborator

@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.

This is awesome. This should actually supersede a lot of the custom-defined deadlock-free routing algorithms actually, assuming this thing will also produce a VC-efficient routing relation.

@jerryz123
Copy link
Collaborator

Would you be willing to add some text on this to the documentation? in docs/

I think CustomTopology should be another sub-section under Topology, and the auto-deadlock-free routing generator should be mentioned under the routing section.

@YashCK
Copy link
Author

YashCK commented May 14, 2025

I added some documentation in Topology.rst and RoutingSpec.rst. Let me know if I should move around or adjust any of the explanations.

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