From 9a216710a1faded6ed06ccbf594cec4fac0d4c7b Mon Sep 17 00:00:00 2001 From: Ned Bingham Date: Sat, 30 Dec 2023 19:52:53 -0500 Subject: [PATCH] starting work on gf --- convert.sh | 20 ++++++++++++++++---- hspice2xyce | 6 +++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/convert.sh b/convert.sh index df924cb..d8ab69a 100755 --- a/convert.sh +++ b/convert.sh @@ -2,12 +2,24 @@ for FILE in $(find . -name '*.l'); do echo "$FILE" - ~/workspace/broccoli/pr/hspice2xyce $FILE > tmp - mv tmp $FILE + /home/nbingham/workspace/broccoli/scripts/hspice2xyce $FILE > tmp + yes | mv tmp $FILE +done + +for FILE in $(find . -name '*.inc'); do + echo "$FILE" + /home/nbingham/workspace/broccoli/scripts/hspice2xyce $FILE > tmp + yes | mv tmp $FILE +done + +for FILE in $(find . -name '*.lib'); do + echo "$FILE" + /home/nbingham/workspace/broccoli/scripts/hspice2xyce $FILE > tmp + yes | mv tmp $FILE done for FILE in $(find . -name '*.spice'); do echo "$FILE" - ~/workspace/broccoli/pr/hspice2xyce $FILE > tmp - mv tmp $FILE + /home/nbingham/workspace/broccoli/scripts/hspice2xyce $FILE > tmp + yes | mv tmp $FILE done diff --git a/hspice2xyce b/hspice2xyce index f9e1192..55142fd 100755 --- a/hspice2xyce +++ b/hspice2xyce @@ -13,6 +13,8 @@ def emitOperation(number, command, operation, stack): return # Xyce does not support these commands elif command == ".option": operation = fixOption(number, operation, stack) + elif command in [".if", ".elif", ".elsif", ".else", ".endif"]: + pass else: operation = fixParams(number, operation, stack) @@ -45,7 +47,9 @@ def fixParams(number, operation, stack): if name == "dev/gauss": continue elif name in ["vt", "Vt", "vT", "VT"]: - name = "local_" + name + name = "local_" + name + #elif name.lower().endswith("_fc"): + # continue if definition: if ":" in definition: