Skip to content

Commit

Permalink
adding python tech parser
Browse files Browse the repository at this point in the history
  • Loading branch information
nbingham1 committed Mar 29, 2024
1 parent abc0ddf commit 973a85b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tupfile
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down
2 changes: 1 addition & 1 deletion deps/ruler
Submodule ruler updated 4 files
+2 −2 Tupfile
+240 −0 ruler/Script.cpp
+9 −0 ruler/Script.h
+0 −345 ruler/Tech.cpp
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -27,6 +28,7 @@ void printVersion() {

int main(int argc, char **argv) {
string cellsDir = "";
string techPath = "";
string outputDir = "";
vector<string> spiceFiles;
set<string> cellNames;
Expand Down Expand Up @@ -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]);
}
Expand All @@ -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])) {
Expand Down

0 comments on commit 973a85b

Please sign in to comment.