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

json2dcp: replace deprecated RapidWright API; fix cell placement and routing #51

Open
hansemro opened this issue Oct 30, 2024 · 7 comments

Comments

@hansemro
Copy link

hansemro commented Oct 30, 2024

json2dcp has not been maintained for some time but could be useful for post-placement/routing validation and DRC in Vivado. While replacing deprecated RapidWright API is fairly straightforward, it will be less trivial to fix json2dcp to handle a post-route netlist json file produced with more recent versions of nextpnr-xilinx.

From what I have experimented so far, the following needs work:

  • IOB PAD/IBUF/OBUF cell instantiation/placement and routing
    • createAndPlaceIOB should be used to create IBUF/OBUF cells but require specifying IOSTANDARD and PACKAGE_PIN attributes which are retained in PAD cells.
    • Need to investigate how to configure IOB sites for differential IO pins
  • inter-site and intra-site net/PIP routing
    • In general, when handling intra-site (SITEWIRE/<SITE>/<SRCNET> to SITEWIRE/<SITE>/<SNKNET>) routing, we can use routeIntraSiteNet
    • Inter-site/tile routing involves defining a set of PIPs that establishes a routed net
  • Enhancement: ingest a post-placement netlist, skip routing processing, and produce DCP with just cell placement.
    • This could be useful for testing routing feasibility using Vivado's router as we test with more congested designs.

Experimental branch: https://github.com/hansemro/nextpnr-xilinx/commits/rapidwright-2024.1.0/

@hansemro
Copy link
Author

hansemro commented Nov 1, 2024

Ported json2dcp to python jupyter notebook with IOB PAD/IBUF/OBUF and routing handling improvements: https://github.com/hansemro/json2dcp-notebook/blob/main/json2dcp.ipynb

This should hopefully help out anyone interested in experimenting with this work.

@hansemro
Copy link
Author

hansemro commented Nov 2, 2024

Experimental branch with inter-site/tile net routing: https://github.com/hansemro/json2dcp-notebook/tree/inter-site-routing-dev

Partially routed jtag-test design:
image

Now focusing on identifying remaining routing and DRC issues...

@hansemro
Copy link
Author

hansemro commented Nov 3, 2024

Currently, createIBUFDS only supports Ultrascale series with DIFFINBUF+IBUFCTRL BELs, so we will need to find a different way to support 7 series.

@hansemro
Copy link
Author

hansemro commented Nov 7, 2024

I am seeing some bogus PIPs in the nextpnr netlist:

  • incorrect INT tile name for GND_WIRE and VCC_WIRE routing nodes (from TIEOFF sites)
    • Example of invalid PIP: INT_L_X0Y134/VCC_WIRE->INT_R_X25Y134/FAN_ALT7
      • Note that the horizontal position is off (and possibly why the prefix between source and sink tiles do not match)
      • Incorrect position may have derived from the following: NULL_X0Y260/PSEUDO_VCC_WIRE_GLBL->INT_L_X0Y134/VCC_WIRE
    • json2dcp workaround: use sink tile name when retrieving source GND_WIRE/VCC_WIRE routing nodes.
  • invalid site pin destination in some CLB tile to site routings:
    • Bogus PIP (D5 != D1): CLBLM_R_X25Y133/CLBLM_M_D5->SITEWIRE/SLICE_X36Y133/D1

clb jtag test json netlist: https://gist.github.com/hansemro/dea2b6b9eac13566f113f7a91474b5d1

Currently, createIBUFDS only supports Ultrascale series with DIFFINBUF+IBUFCTRL BELs, so we will need to find a different way to support 7 series.

IBUFDS support for 7 series being experimented in https://gist.github.com/hansemro/24adef209d9ff91f2c01b6f053990861

@hansemro
Copy link
Author

hansemro commented Nov 9, 2024

Finally got around to handling IBUFDS in hansemro/json2dcp-notebook@9a41b82.

@hansfbaier
Copy link
Collaborator

Where did you find json2dcp? I did not find it in nextpnr-xilinx nor prjxray, nor searching the net gave anything useful.
Did you write it yourself?

@hansemro
Copy link
Author

Where did you find json2dcp? I did not find it in nextpnr-xilinx nor prjxray, nor searching the net gave anything useful.

Located at nextpnr-xilinx/xilinx/java/json2dcp.java:

Did you write it yourself?

The original java utility was left abandoned for some time (without following RapidWright API changes over time) but it seemed promising for checking the netlist visually and for bugs. To make testing changes a bit easier for myself, I ported the project as a python notebook and later made improvements to fix placement and routing bugs that I encountered. There are still some bugs left but some of it comes from nextpnr-xilinx's final json netlist missing some details (missing PIPs/SitePIPs) that make filling in the gaps a bit more challenging (which also raises some questions of the validity of json2dcp as a verification tool).

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

No branches or pull requests

2 participants