Finished the first working draft of the spectre-to-SPICE conversion
script.
diff --git a/VERSION b/VERSION
index 2ac9634..5b09c67 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.13
+1.0.14
diff --git a/common/convert_spectre.py b/common/convert_spectre.py
index 343748e..9127712 100755
--- a/common/convert_spectre.py
+++ b/common/convert_spectre.py
@@ -62,18 +62,20 @@
value = pmatch.group(2)
rest = pmatch.group(3)
- # It is not clear why spectre allows space separators
- # in a parameter expression when there can be multiple
- # parameters per line as well (?).
- nmatch = parm3rex.match(rest)
- if not nmatch:
- value += rest.replace(' ', '').replace('\t', '')
- rest = ''
-
if is_number(value):
fmtline.append(value)
else:
- fmtline.append("'" + value + "'")
+ fmtline.append('{' + value + '}')
+
+ # These parameter sub-expressions are related to
+ # monte carlo simulation and are incompatible with
+ # ngspice. So put them in an in-line comment
+
+ if rest != '':
+ nmatch = parm3rex.match(rest)
+ if not nmatch:
+ fmtline.append(' $ ' + rest.replace(' ', '').replace('\t', ''))
+ rest = ''
else:
break