Skip to content

Commit

Permalink
Added the .spiceinit generation commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyantra698Sumanto committed Aug 29, 2022
1 parent a653afe commit d21e140
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/kicadtoNgspice/Convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,20 @@ def addDeviceLibrary(self, schematicInfo, kicadFile):
shutil.copy2(src, dst)

elif eachline[0:6] == 'scmode':
(filepath, filemname) = os.path.split(self.clarg1)
self.Fileopen = os.path.join(filepath, ".spiceinit")
print("======================================================")
print("Writing to the .spiceinit file to make ngspice SKY130 compatible")
self.writefile = open(self.Fileopen, "w")
self.writefile.write('''
set ngbehavior=hsa ; set compatibility for reading PDK libs
set ng_nomodcheck ; don't check the model parameters
set num_threads=8 ; CPU hardware threads available
option noinit ; don't print operating point data
optran 0 0 0 100p 2n 0 ; don't use dc operating point, but transient op)
''')
print("======================================================")

tempStr = completeLibPath.split(':')
print(tempStr)
libs = '''
Expand Down

0 comments on commit d21e140

Please sign in to comment.