@@ -39,6 +39,7 @@ public class VivadoTools {
3939
4040 public static final String REPORT_ROUTE_STATUS = "report_route_status" ;
4141 public static final String PLACE_DESIGN = "place_design" ;
42+ public static final String ROUTE_DESIGN = "route_design" ;
4243 public static final String WRITE_CHECKPOINT = "write_checkpoint" ;
4344 public static final String WRITE_EDIF = "write_edif" ;
4445
@@ -337,11 +338,49 @@ public static Design placeDesign(Path dcp, Path workdir, boolean encrypted) {
337338 }
338339
339340 /**
340- * Run Vivado's `get_timing_paths -setup` command on the provided DCP path
341- * (to find its worst setup timing path) and return its SLACK property as a float.
342- *
343- * @param dcp Path to DCP to report on.
341+ * Run Vivado's `route_design` command on the design provided and get the
342+ * `report_route_status` results. Note: this method does not preserve the routed
343+ * output from Vivado.
344+ *
345+ * @param design The design to route and report on.
344346 * @param workdir Directory to work within.
347+ * @return The results of `report_route_status`.
348+ */
349+ public static ReportRouteStatusResult routeDesignAndGetStatus (Design design , Path workdir ) {
350+ boolean encrypted = !design .getNetlist ().getEncryptedCells ().isEmpty ();
351+ Path dcp = workdir .resolve ("routeDesignAndGetStatus.dcp" );
352+ design .writeCheckpoint (dcp );
353+ return routeDesignAndGetStatus (dcp , workdir , encrypted );
354+ }
355+
356+ /**
357+ * Run Vivado's `route_design` command on the provided DCP path and return the
358+ * `report_route_status` results. Note: this method does not preserve the routed
359+ * output from Vivado.
360+ *
361+ * @param dcp Path to DCP to route and report on.
362+ * @param workdir Directory to work within.
363+ * @param encrypted Indicates whether DCP contains encrypted EDIF cells.
364+ * @return The results of `report_route_status`.
365+ */
366+ public static ReportRouteStatusResult routeDesignAndGetStatus (Path dcp , Path workdir , boolean encrypted ) {
367+ final Path outputLog = workdir .resolve ("outputLog.log" );
368+
369+ StringBuilder sb = new StringBuilder ();
370+ sb .append (createTclDCPLoadCommand (dcp , encrypted ));
371+ sb .append (ROUTE_DESIGN + "; " );
372+ sb .append (REPORT_ROUTE_STATUS + "; " );
373+
374+ List <String > log = VivadoTools .runTcl (outputLog , sb .toString (), true );
375+ return new ReportRouteStatusResult (log );
376+ }
377+
378+ /**
379+ * Run Vivado's `get_timing_paths -setup` command on the provided DCP path (to
380+ * find its worst setup timing path) and return its SLACK property as a float.
381+ *
382+ * @param dcp Path to DCP to report on.
383+ * @param workdir Directory to work within.
345384 * @param encrypted Indicates whether DCP contains encrypted EDIF cells.
346385 * @return Worst slack of design as float.
347386 */
0 commit comments