Skip to content

Commit

Permalink
Merge pull request #217 from Eyantra698Sumanto/sky130-dev
Browse files Browse the repository at this point in the history
Fixed path_name undefined and out of bound index errors
  • Loading branch information
Eyantra698Sumanto authored Aug 26, 2022
2 parents 2dbc0fb + 381b96a commit 076d3b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/kicadtoNgspice/Convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ def addDeviceLibrary(self, schematicInfo, kicadFile):
print(tempStr)
includeLine.append(
".lib \"" + tempStr[0] + "\" " + tempStr[1])
deviceLine[index] = ''
deviceLine[index] = '*scmode'
# words.append(completeLibPath)
# deviceLine[index] = words

Expand Down
5 changes: 4 additions & 1 deletion src/kicadtoNgspice/DeviceModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ def eSim_sky130(self, schematicInfo):
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("")

Expand Down Expand Up @@ -223,6 +225,7 @@ def eSim_sky130(self, schematicInfo):
sky130box.setTitle(
"Add parameters for " +
words[0] + " : " + words[-1])
path_name = ''

# Adding to get sky130 dimension
self.parameterLabel[self.count] = QtWidgets.QLabel(
Expand Down Expand Up @@ -251,7 +254,7 @@ def eSim_sky130(self, schematicInfo):
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 = ""
Expand Down

0 comments on commit 076d3b2

Please sign in to comment.