-
Notifications
You must be signed in to change notification settings - Fork 902
[tlgen] Relax xbar contraints to allow generating non-pow2 matchers #28452
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
Conversation
Should we make that change in upstream Darjeeling, so that we can test support of the feature in upstream CI / nightlies? Or wouldn't this work because the Darjeeling-internal address map should stay as-is, while the CTN crossbar outside Darjeeling (after base address translation) has 1-3 GB as the addr range for the egress port? |
If we agree on the approach, I can make this change here. Edit: Added the commit to make the change here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with two suggestions for follow-up changes. Thanks @Razer6!
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
Signed-off-by: Robert Schilling <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks @Razer6!
This PR expands the address-matching capabilities of the xbar generation to support a more flexible matching scheme. Previously, the system was limited to power-of-2 address matching, which uses a bitmask and bitwise operations to check if an address falls within a device's range.
This change is necessary to support a wider range of address configurations, specifically for Darjeeling. The CTN memory in Darjeeling requires routing the address range 1-3 GB to an egress port. This specific range cannot be matched using the existing power-of-2 scheme because the base address and the required mask are overlapping. To handle this, the system needs to fall back to Top-of-Range (TOR) matching, a more generalized and computationally more expensive method.
tlgen
and the xbar RTL templates already have support for TOR address matching. This PR enables the topgen tool to utilize this existing functionality. By doing so, it allows for more flexible address configurations beyond the power-of-2 constraint, addressing the specific needs of the Darjeeling project and similar future use cases.To trigger the case, make the following change in
top_darjeeling.hjson
: