summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEyantra698Sumanto2022-08-26 18:13:04 +0530
committerEyantra698Sumanto2022-08-26 18:13:04 +0530
commit381b96af815f619719d490824c23077fb893eff8 (patch)
tree16b44e73d2c134f20ba84c2c5e36253e43c42c71
parent2dbc0fbd2c125c8e1d879d623c3967cea79d1cbe (diff)
downloadeSim-381b96af815f619719d490824c23077fb893eff8.tar.gz
eSim-381b96af815f619719d490824c23077fb893eff8.tar.bz2
eSim-381b96af815f619719d490824c23077fb893eff8.zip
Fixed path_name undefined and out of bound index errors
-rwxr-xr-xsrc/kicadtoNgspice/Convert.py2
-rwxr-xr-xsrc/kicadtoNgspice/DeviceModel.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index 9aec6cce..7d68e44e 100755
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -554,7 +554,7 @@ class Convert:
print(tempStr)
includeLine.append(
".lib \"" + tempStr[0] + "\" " + tempStr[1])
- deviceLine[index] = ''
+ deviceLine[index] = '*scmode'
# words.append(completeLibPath)
# deviceLine[index] = words
diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py
index b120f2e7..c1eb5f90 100755
--- a/src/kicadtoNgspice/DeviceModel.py
+++ b/src/kicadtoNgspice/DeviceModel.py
@@ -159,11 +159,13 @@ sky130_fd_pr/models/sky130.lib.spice")
self.entry_var[self.count].setText("")
self.entry_var[self.count].setMaximumWidth(150)
self.entry_var[self.count].setObjectName("%d" % beg)
+ path_name = ''
for child in self.root:
if child.tag == "scmode1":
if child[1].text:
self.entry_var[self.count] \
.setText(child[1].text)
+ path_name = child[0].text
else:
self.entry_var[self.count].setText("")
@@ -223,6 +225,7 @@ sky130_fd_pr/models/sky130.lib.spice")
sky130box.setTitle(
"Add parameters for " +
words[0] + " : " + words[-1])
+ path_name = ''
# Adding to get sky130 dimension
self.parameterLabel[self.count] = QtWidgets.QLabel(
@@ -251,7 +254,7 @@ sky130_fd_pr/models/sky130.lib.spice")
if child[0].text:
self.entry_var[self.count] \
.setText(child[0].text)
- path_name = ""
+ path_name = child[0].text
else:
self.entry_var[self.count].setText("")
path_name = ""