vtr-verilog-to-routing icon indicating copy to clipboard operation
vtr-verilog-to-routing copied to clipboard

Post-Routing Annotations Is Not Done When Flat-Router Is Enabled

Open amin1377 opened this issue 1 year ago • 4 comments

There is a function named "sync_netlists_to_routing." This function synchronizes the results of packing and routing. During the routing, the pin that a net is connected to may change, and this would make the routing and packing results inconsistent.

When flat-routing is enabled, this function is skipped. This may cause problems for people who use the results of this function to generate a bitstream.

amin1377 avatar Mar 14 '23 21:03 amin1377

@amin1377

Post-routing annotation is required when there is a local routing architecture, which allows router to swap nets freely between the IPINs that are defined as logic_equivalent in architecture file. Since router may apply such optimization, the routing traces in clustering results should be synchronized accordingly. Otherwise, we see incorrect bitstreams.

For bitstream generators in OpenFPGA, when decoding bitstreams of clusters, we always refer to the ClusteringContext as the final results of any routing traces inside any cluster. Therefore, we need post-routing annotation so that we can always get correct results from ClusteringContext. As a system-level, VPR's date structure should guarantee the correctness of their content. Otherwise, it is very hard to trace bugs in bitstream if any happens.

When flat-routing is enabled, the current post-routing annotation step is not enough, because it only consider the correction on the routing traces of crossbars (only touch nodes at depth of 1 in the local routing resource graph). If flat-routing is enabled, we need to thoroughly update the routing traces of each clusters, because router may change every routing traces, due to

  • the nature logic equivalent pins of LUT inputs
  • the logic equivalent pins of CLB inputs etc.

So, currently OpenFPGA cannot support flat router. But once the post-routing annotation is upgraded, I believe the problem should be resolved.

tangxifan avatar Apr 05 '23 19:04 tangxifan