diff --git a/Tupfile b/Tupfile index 384b79c..74a0bca 100644 --- a/Tupfile +++ b/Tupfile @@ -2,7 +2,7 @@ NAME = floret CXXFLAGS = -O2 -g -Wall -fmessage-length=0 -std=c++17 INCLUDE_PATHS = -Ideps/ruler -Ideps/pgen -Ideps/gdstk/build/install/include -I. LIBRARY_PATHS = -Ldeps/ruler -Ldeps/pgen -Ldeps/gdstk/build/install/lib -Ldeps/gdstk/build/install/lib64 -LIBRARIES = -l:libruler.a -l:libpgen.a -l:libgdstk.a -l:libclipper.a -l:libqhullstatic_r.a -lz +LIBRARIES = -l:libruler.a -lpython3.10 -l:libpgen.a -l:libgdstk.a -l:libclipper.a -l:libqhullstatic_r.a -lz ifeq (@(TUP_PLATFORM),windows) CXX = x86_64-w64-mingw32-g++ diff --git a/deps/ruler b/deps/ruler index c2663fd..bcff766 160000 --- a/deps/ruler +++ b/deps/ruler @@ -1 +1 @@ -Subproject commit c2663fdcb47b2f16ff682afca402fc41c4686c2e +Subproject commit bcff766188e4c068cd07c6139986e3e82f12fff0 diff --git a/src/main.cpp b/src/main.cpp index b915e30..ccbb18a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,12 +3,13 @@ #include <vector> #include <ruler/Tech.h> +#include <ruler/Script.h> #include <floret/Library.h> using namespace std; void printHelp() { - printf("Usage: floret [options] <file.spi>...\n"); + printf("Usage: floret [options] <tech.py> <file.spi>...\n"); printf("A cell generator designed for advanced nodes.\n"); printf("\nOptions:\n"); printf(" -h,--help Display this information\n"); @@ -27,6 +28,7 @@ void printVersion() { int main(int argc, char **argv) { string cellsDir = ""; + string techPath = ""; string outputDir = ""; vector<string> spiceFiles; set<string> cellNames; @@ -69,6 +71,8 @@ int main(int argc, char **argv) { cout << "expected output directory" << endl; return 1; } + } else if (techPath == "") { + techPath = argv[i]; } else { spiceFiles.push_back(argv[i]); } @@ -80,6 +84,7 @@ int main(int argc, char **argv) { } Tech tech; + loadTech(tech, techPath); Library cellLib; for (int i = 0; i < (int)spiceFiles.size(); i++) { if (not cellLib.loadFile(tech, spiceFiles[i])) {