From 3f6ca424b5d11aab83e62de35e5c00cd577cb54b Mon Sep 17 00:00:00 2001 From: Eder Matheus Rodrigues Monteiro Date: Mon, 2 Dec 2019 14:08:59 -0300 Subject: [PATCH] Add FastRoute4-lefdef --- .gitmodules | 3 +++ include/openroad/OpenRoad.hh | 5 +++++ src/CMakeLists.txt | 5 +++++ src/FastRoute4-lefdef | 1 + src/OpenRoad.cc | 7 ++++++- 5 files changed, 20 insertions(+), 1 deletion(-) create mode 160000 src/FastRoute4-lefdef diff --git a/.gitmodules b/.gitmodules index e847b2d72f7..aeba9f68dba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -15,3 +15,6 @@ path = src/opendp url = https://github.com/The-OpenROAD-Project/OpenDP.git branch = openroad +[submodule "src/FastRoute4-lefdef"] + path = src/FastRoute4-lefdef + url = https://github.com/The-OpenROAD-Project/FastRoute4-lefdef.git diff --git a/include/openroad/OpenRoad.hh b/include/openroad/OpenRoad.hh index 566bd898d93..66599cab1a6 100644 --- a/include/openroad/OpenRoad.hh +++ b/include/openroad/OpenRoad.hh @@ -28,6 +28,10 @@ class dbNetwork; class Resizer; } +namespace FastRoute { +class FastRouteKernel; +} + namespace opendp { class opendp_external; } @@ -79,6 +83,7 @@ private: sta::dbSta *sta_; sta::Resizer *resizer_; opendp::opendp_external *opendp_; + FastRoute::FastRouteKernel *fastRoute_; // Singleton used by tcl command interpreter. static OpenRoad *openroad_; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c0d5061400f..ee46d2f1ccd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,6 +21,8 @@ set(OPENDB_WRAP ${CMAKE_CURRENT_BINARY_DIR}/OpenDB_wrap.cc) set(RESIZER_HOME ${PROJECT_SOURCE_DIR}/src/resizer) set(OPENDP_HOME ${PROJECT_SOURCE_DIR}/src/opendp) +set(FASTROUTE_HOME ${PROJECT_SOURCE_DIR}/src/FastRoute4-lefdef) + set(OPENROAD_WRAP ${CMAKE_CURRENT_BINARY_DIR}/OpenRoad_wrap.cc) set(OPENROAD_TCL_INIT ${CMAKE_CURRENT_BINARY_DIR}/OpenRoadTclInitVar.cc) @@ -77,6 +79,7 @@ add_subdirectory(resizer) add_subdirectory(flute3) add_subdirectory(replace) add_subdirectory(opendp) +add_subdirectory(FastRoute4-lefdef) ################################################################ @@ -168,6 +171,7 @@ target_include_directories(openroad ${OPENROAD_HOME}/src ${OPENDB_HOME}/include ${OPENDP_HOME}/include + ${FASTROUTE_HOME}/include flute3 ) @@ -179,6 +183,7 @@ target_link_libraries(openroad dbSta OpenSTA opendb + FR4lefdef zutil zlib tm diff --git a/src/FastRoute4-lefdef b/src/FastRoute4-lefdef new file mode 160000 index 00000000000..a8f23f2d25e --- /dev/null +++ b/src/FastRoute4-lefdef @@ -0,0 +1 @@ +Subproject commit a8f23f2d25eacdfc21430ccc81e648f6f4492f62 diff --git a/src/OpenRoad.cc b/src/OpenRoad.cc index 9e902c73e60..4bcc78353b5 100644 --- a/src/OpenRoad.cc +++ b/src/OpenRoad.cc @@ -32,6 +32,8 @@ #include "opendp/MakeOpendp.h" #include "replace/src/MakeReplace.h" +#include "FastRoute4-lefdef/src/MakeFastRoute.h" + namespace sta { extern const char *openroad_tcl_inits[]; } @@ -41,6 +43,7 @@ extern "C" { extern int Openroad_Init(Tcl_Interp *interp); extern int Opendbtcl_Init(Tcl_Interp *interp); extern int Replace_Init(Tcl_Interp *interp); +extern int Fastroute_Init(Tcl_Interp *interp); } namespace ord { @@ -95,6 +98,7 @@ OpenRoad::init(Tcl_Interp *tcl_interp, verilog_network_ = makeDbVerilogNetwork(); resizer_ = makeResizer(); opendp_ = makeOpendp(); + fastRoute_ = (FastRoute::FastRouteKernel*) makeFastRoute(); // Init components. Openroad_Init(tcl_interp); @@ -108,7 +112,8 @@ OpenRoad::init(Tcl_Interp *tcl_interp, initFlute(prog_arg); initReplace(this); initOpendp(this); - + initFastRoute(this); + // Import exported commands to global namespace. Tcl_Eval(tcl_interp, "sta::define_sta_cmds"); Tcl_Eval(tcl_interp, "namespace import sta::*");