summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEyantra698Sumanto2022-08-29 14:59:02 +0530
committerEyantra698Sumanto2022-08-29 14:59:02 +0530
commitd21e1405e29a3d3a1766f23bb469ec6edf575235 (patch)
tree04bb912a0a08a1062cc02ec6ae01791045b0e786 /src
parenta653afe64c75a66c0b64600d492f7375e4ac6601 (diff)
downloadeSim-d21e1405e29a3d3a1766f23bb469ec6edf575235.tar.gz
eSim-d21e1405e29a3d3a1766f23bb469ec6edf575235.tar.bz2
eSim-d21e1405e29a3d3a1766f23bb469ec6edf575235.zip
Added the .spiceinit generation commands
Diffstat (limited to 'src')
-rwxr-xr-xsrc/kicadtoNgspice/Convert.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py
index a4f9e642..c1209cd3 100755
--- a/src/kicadtoNgspice/Convert.py
+++ b/src/kicadtoNgspice/Convert.py
@@ -550,6 +550,20 @@ class Convert:
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 = '''