From 973a85ba0da65b52250ebfa66105a56f7c080410 Mon Sep 17 00:00:00 2001 From: Ned Bingham Date: Fri, 29 Mar 2024 10:30:36 -0400 Subject: [PATCH] adding python tech parser --- Tupfile | 2 +- deps/ruler | 2 +- src/main.cpp | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) 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 #include +#include #include using namespace std; void printHelp() { - printf("Usage: floret [options] ...\n"); + printf("Usage: floret [options] ...\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 spiceFiles; set 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])) {