Skip to content

Conversation

@clavin-xlnx
Copy link
Member

@clavin-xlnx clavin-xlnx commented Jan 6, 2026

This is a tool that extracts a timing path from a design and recreates it in a new empty design. It reproduces the netlist hierarchy sufficiently to keep the same names of cells and nets. It also reproduces any clock nets involved in the timing path. This is useful for creating slimmed down test cases.

Signed-off-by: Chris Lavin <chris.lavin@amd.com>
Signed-off-by: Chris Lavin <chris.lavin@amd.com>
Signed-off-by: Chris Lavin <chris.lavin@amd.com>
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.

I'm seeing this for output.dcp:

report_route_status
Design Route Status
                                               :      # nets :
   ------------------------------------------- : ----------- :
   # of logical nets.......................... :          27 :
       # of nets not needing routing.......... :          20 :
           # of internally routed nets........ :          19 :
           # of nets with no loads............ :           1 :
       # of routable nets..................... :           7 :
           # of fully routed nets............. :           6 :
       # of nets with routing errors.......... :           1 :
           # of nets with some unrouted pins.. :           1 :
           # of nets with antennas/islands.... :           1 :
   ------------------------------------------- : ----------- :


Nets with Routing Errors:
  base_mb_i/clk_wiz_1/inst/clk_out1
    Antenna Nodes: XIPHY_L_X32Y120/CLK_BUFGCE_92_CLK_OUT

Selected (white) node is the antenna node above -- looks like you're missing some intra-site routing?

Image

Overall, I think this is a really helpful utility and has potential in lots of areas. We might need to talk about the exact use case you've built this for to see if any more features are required/warranted.


@Test
public void testPathReplicator(@TempDir Path dir) {
if (FileTools.isVivadoOnPath()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you want to gate the whole test, I would use:

Assumptions.assumeTrue(FileTools.isVivadoOnPath());

instead so that this test comes up as "skipped" rather than as "passed".

Otherwise, I think there's still some value in running the class here without checking it with Vivado, so perhaps you don't need any gating since assertFullyRouted() gates already.

import com.xilinx.rapidwright.util.FileTools;

/**
* This is a tool to extract a signal path implementation from one DCP and copy
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think PathExtractor is a better name for this class, since replicate could be taken as in-place replication?

if (args.length != 3) {
System.out.println("USAGE: <source.dcp> <dest.dcp> <path.txt>");
System.out.println(" path.txt could be generated from Vivado with a Tcl command such as:");
System.out.println(" 'set fp [open path.txt \"w\"]; foreach p [get_pins -of [get_timing_paths -nworst 1 ]] {puts $fp $p}; close $fp'");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this only work for a single path? or does it work for a list of pins (which could represent no paths (completely disjoint), a single path, or many disjoint or non-disjoint paths?)


// Tie off CE/SR pins
DesignTools.createCeSrRstPinsToVCC(dst);
PartialRouter.routeDesignPartialNonTimingDriven(dst, null);
Copy link
Collaborator

Choose a reason for hiding this comment

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

You're invoking the router to route all unrouted pins. That seems to be an overkill, and could cause pins that failed to be copied above to show up as routed which could be dangerous.

I think your thought process here is that CE/SR pins connected to VCC must be unambiguously routed, and so there's no harm in re-routing it? If so, I think it would more efficient/less risky if you were to call GlobalSignalRouting.routeStaticNet() directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there an example of how to use GlobalSignalRouting.routeStaticNet() without using RWRoute? It also seems like I need to identify the SitePinInst objects explicitly.

@clavin-xlnx
Copy link
Member Author

I'm seeing this for output.dcp:

report_route_status
Design Route Status
                                               :      # nets :
   ------------------------------------------- : ----------- :
   # of logical nets.......................... :          27 :
       # of nets not needing routing.......... :          20 :
           # of internally routed nets........ :          19 :
           # of nets with no loads............ :           1 :
       # of routable nets..................... :           7 :
           # of fully routed nets............. :           6 :
       # of nets with routing errors.......... :           1 :
           # of nets with some unrouted pins.. :           1 :
           # of nets with antennas/islands.... :           1 :
   ------------------------------------------- : ----------- :


Nets with Routing Errors:
  base_mb_i/clk_wiz_1/inst/clk_out1
    Antenna Nodes: XIPHY_L_X32Y120/CLK_BUFGCE_92_CLK_OUT

Very strange, it passes clean in my sandbox and when I load the DCP into Vivado, it is fully routed.

I've tried in a different sandbox and it also exhibits the error you have described so I'll have to investigate what is the difference.

@clavin-xlnx
Copy link
Member Author

I'm seeing this for output.dcp:

report_route_status
Design Route Status
                                               :      # nets :
   ------------------------------------------- : ----------- :
   # of logical nets.......................... :          27 :
       # of nets not needing routing.......... :          20 :
           # of internally routed nets........ :          19 :
           # of nets with no loads............ :           1 :
       # of routable nets..................... :           7 :
           # of fully routed nets............. :           6 :
       # of nets with routing errors.......... :           1 :
           # of nets with some unrouted pins.. :           1 :
           # of nets with antennas/islands.... :           1 :
   ------------------------------------------- : ----------- :


Nets with Routing Errors:
  base_mb_i/clk_wiz_1/inst/clk_out1
    Antenna Nodes: XIPHY_L_X32Y120/CLK_BUFGCE_92_CLK_OUT

Very strange, it passes clean in my sandbox and when I load the DCP into Vivado, it is fully routed.

I've tried in a different sandbox and it also exhibits the error you have described so I'll have to investigate what is the difference.

Ok, it looks like with Vivado 2025.1, the result is interpreted as fully routed. However, with 2025.2, it gives the result you shared above. Digging into it further, there was a site wire on the BUFGCE that was not populated. Apparently, 2025.1 is more forgiving than 2025.2. I've fixed that issue but now it also flags other antennas where clock pins are going to unused SitePinInsts. I will have to devise a new solution to work around those.

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.

3 participants