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

[DesignTools] Conform to Vivado *RST* pin inversion site routing configuration #1053

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

clavin-xlnx
Copy link
Member

@clavin-xlnx clavin-xlnx commented Aug 27, 2024

as part of the DesignTools.createCeSrRstPinsToVCC() method which gets called by RWRoute.preprocess()

@eddieh-xlnx eddieh-xlnx changed the title [RWRoute] Adds site routing when adding RST site pins [DesignTools] Adds site routing when adding RST site pins Aug 27, 2024
@clavin-xlnx clavin-xlnx changed the title [DesignTools] Adds site routing when adding RST site pins [DesignTools] Conform to Vivado *RST* pin inversion site routing configuration Aug 28, 2024
@clavin-xlnx clavin-xlnx marked this pull request as ready for review August 28, 2024 03:46
Comment on lines +3309 to +3314
if (gndInvertibleToVcc != null) {
// For the RST inversion to be interpreted properly by Vivado, there must be no
// site routing on the path around the inverter BEL
BELPin belPin = sitePin.getBELPin();
si.unrouteIntraSiteNet(belPin, belPin);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would this be safer inside the (sitePin == null) condition so that we're only modifying the site routing if we were the one to insert it?

Copy link
Member Author

Choose a reason for hiding this comment

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

The intent of this method performs two tasks:

  1. Ensure that the site pin exists (create it if it doesn't)
  2. If architecturally relevant, modify the site routing (completely remove it) to ensure that the inversion is communicated.

If we guard that code, it seems like #2 would not be ensured.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the parent method is DesignTools.createCeSrRstPinsToVCC() I would argue that the main purpose is 1, and only when 1 is undertaken (which will paint the associated sitewire), to ensure 2. Right now, if the pin already exists, the sitewire is always unpainted which might be necessary if we're assuming that the design was faulty to begin with.

Copy link
Member Author

Choose a reason for hiding this comment

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

My concern is that RapidWright creates all site pins with the site wire attached painted (for better or worse). If we encounter a site pin that was created in another method, the site wire would never be reset (the requirement for inversion). I suppose we could change the site pin creation behavior, but I think that would touch and break a lot of things.

Copy link
Collaborator

@eddieh-xlnx eddieh-xlnx Aug 28, 2024

Choose a reason for hiding this comment

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

That's a very valid concern, in which case I would prefer that we fix them at/close to where those site pins were created (or come up with a more holistic solution). Note that DesignTools.createCeSrRstPinsToVCC() is only called by DesignTools.createPossiblePinsToStaticNets() which is always called for RWRoute.preprocess() but not always called by PartialRouter.preprocess() such that we shouldn't rely on createCeSrRstPinsToVCC() to fix it up for all scenarios.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Another thought is -- do we need to set that sitewire at all for VCC/GND nets? If so, perhaps not ever setting it for these two special nets could be a better way?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the cleanest solution is to simply stop setting the sitewire on site pin addition or creation. Unfortunately, this will probably break a lot of downstream use cases.

}
}
}
}

private static void maybeCreateVccPinAndPossibleInversion(SiteInst si, String sitePinName, Net vcc, Net gndInvertibleToVcc) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this still the most descriptive method name?

Copy link
Member Author

Choose a reason for hiding this comment

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

Any suggestions?

Copy link
Collaborator

Choose a reason for hiding this comment

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

My slight irk was that this method doesn't do any inversion by itself anymore, since it doesn't set any site PIPs nor do any site routing; rather, it erases some site routing to allow inversion to occur. Let's leave it then.

Copy link
Collaborator

@eddieh-xlnx eddieh-xlnx left a comment

Choose a reason for hiding this comment

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

An improvement on what we had previously.

@clavin-xlnx clavin-xlnx merged commit 3a84d0b into master Aug 28, 2024
14 checks passed
@clavin-xlnx clavin-xlnx deleted the rwroute_rst_site_routing branch August 28, 2024 21:13
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