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

Site PIP usage contract #50

Closed
gatecat opened this issue May 6, 2021 · 1 comment · Fixed by #51
Closed

Site PIP usage contract #50

gatecat opened this issue May 6, 2021 · 1 comment · Fixed by #51

Comments

@gatecat
Copy link
Collaborator

gatecat commented May 6, 2021

Currently there is an undocumented contract inside nextpnr that site PIPs should only be used for nets that originate/terminate inside that site: https://github.com/YosysHQ/nextpnr/blob/c322cda3f875a5e5dd2575d3a390cbe1cee073e0/fpga_interchange/arch.cc#L1769-L1791

In particular, site PIPs shouldn't be used as general route-throughs, for example through sites that aren't otherwise occupied at all. Tile pseudo-PIPs should be used for these cases.

However, there are two problems:

  • this contract currently isn't documented anywhere (I suspect it might originate from an implicit contract of Vivado) and would be a surprise to anyone implementing another PnR implementation without looking at nextpnr
  • there are edge cases not covered by this as discussed later on in Wrong LUT equation when used as LUT-thru python-fpga-interchange#76. In particular for the case where a net re-enters a site via a site pin being used for another purpose. Use of site route-through PIPs should probably be disallowed in this edge case too but we need to formally document the exact allowed/illegal behaviour here and then implement accordingly in nextpnr.
@gatecat
Copy link
Collaborator Author

gatecat commented May 6, 2021

I think the second bullet point is somewhat covered by this FIXME and was intended to be illegal but not implemented: https://github.com/YosysHQ/nextpnr/blob/c322cda3f875a5e5dd2575d3a390cbe1cee073e0/fpga_interchange/arch.cc#L1793

GitHub
nextpnr portable FPGA place and route tool. Contribute to YosysHQ/nextpnr development by creating an account on GitHub.

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 a pull request may close this issue.

1 participant