-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSunSpice.py
54 lines (41 loc) · 1.07 KB
/
SunSpice.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/python3
# -*- encoding="UTF-8" -*-
#
#Function: hspice-like
#Python Version: Python 2.7.12 (default, Dec 4 2017, 14:50:18)
#Date: Mar 2018
#Autor: Sun Yongshuai
#
#Import Package
import sys
import os
import matplotlib.pyplot as plt
import parameters
from Functions.readFile import readFile
from Functions.SimulationType.DC import DCSimulation
from Functions.SimulationType.AC import ACSimulation
from Functions.SimulationType.Tran import TranSimulation
from Functions.SimulationType.OP import OpSimulation
from Functions.helpGuide import helpGuide
from Functions.PlotAndPrint.plotDC import plotDC
from Functions.PlotAndPrint.plotTran import plotTran
from Functions.PlotAndPrint.plotAC import plotAC
def main(args):
if (len(args) == 1):
helpGuide(args)
elif (not os.access(args[1],os.F_OK)):
helpGuide(args)
else:
parameters.NetlistPath = args[1]
print(parameters.NetlistPath)
readFile()
OpSimulation()
DCSimulation()
ACSimulation()
TranSimulation()
plotDC()
plotAC()
plotTran()
plt.show()
if __name__ == '__main__':
main(sys.argv)