-
Notifications
You must be signed in to change notification settings - Fork 245
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
interchange: fix site-thru pip legality #695
Conversation
a515193
to
dbcddac
Compare
Two problems I see here:
An alternative suggested solution would be to backtrace through
|
I believe that the general router should not perform such a check, mainly because the entire site is routed through with a tile PIP, and the sink will most probably reside outside the site of the tile PIP.
I agree, this will definetely make some valid PIP invalid, and yeah I guess backtracking could be a viable solution here. I wonder if, using backtracking, might be expensive (from a run-time point of view). Unclear though at what stage this check should be performed. |
It probably wouldn't be the biggest runtime issue ATM, runtime is something that currently needs a lot more thought (it's about 50x slower than nextpnr-xilinx overall in its present state...) If this patch does fix the problem, then I don't have a problem with it provided a comment is left detailing why it isn't quite optimal. |
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
dbcddac
to
beff2b9
Compare
@gatecat I have force pushed another solution that adds an additional check during site routing. This should prevent the site router to expand nodes that are in illegal paths, where an illegal path is present when a site is first entered and than left, meaning that a tile PIP should have been used instead. |
fpga_interchange/site_router.cc
Outdated
if (!node->is_valid_node()) { | ||
if (verbose_site_router(ctx)) { | ||
log_info( | ||
"Pip %s is not a valid for this path because it has left the site after entering it.\n", |
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.
nitpick - "not a valid PIP"
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.
Right, fixed, also for the other non-valid PIP logs
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.
Thanks!
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
So, I have run some more tests with this patch and unfortunately, this is not enough, as I have still hit some edge cases. There must be some other place where the illegal routes are still allowed, and I believe the possible cause might be this: nextpnr/fpga_interchange/arch.cc Lines 1809 to 1813 in 466de95
The general router is disallowed to route through a site, but this might not be true for edge cases in which the |
Signed-off-by: Alessandro Comodi acomodi@antmicro.com
This is an attempt at solving the issue described in this comment: chipsalliance/python-fpga-interchange#76 (comment).
Basically, a site-thru PIP should not be allowed in the cases where the a BEL is not in the same site of the site-thru PIP. The change in this PR is rather strict, as if a net has multiple sinks in different sites, the PIP is automatically considered illegal, even though the actual sink BEL of that connection resides in the same site.
cc @gatecat