More fixes on the two spectre-to-SPICE conversion scripts.
diff --git a/common/split_spice.py b/common/split_spice.py
index 75cea9e..d8c5539 100755
--- a/common/split_spice.py
+++ b/common/split_spice.py
@@ -48,6 +48,9 @@
for line in inplines:
+ if subname == 'xrdn':
+ print('handling line in xrdn, file ' + in_file + ': "' + line + '"')
+
# Item 1. Handle comment lines
if line.startswith('*'):
if subcktlines != []:
@@ -66,7 +69,17 @@
if inpinlist:
inpinlist = False
- # Item 3. Handle continuation lines
+ # Item 3. Handle blank lines like comment lines
+ if line.strip() == '':
+ if subname == 'xrdn':
+ print('blank line in xrdn subcircuit')
+ if subcktlines != []:
+ subcktlines.append(line)
+ else:
+ spicelines.append(line)
+ continue
+
+ # Item 4. Handle continuation lines
if contline:
if inparam:
# Continue handling parameters
@@ -76,7 +89,7 @@
spicelines.append(line)
continue
- # Item 4. Regexp matching
+ # Item 5. Regexp matching
# If inside a subcircuit, remove "parameters". If outside,
# change it to ".param"