ngspicepy.netlist package¶
Module contents¶
The Netlist Class¶
The Netlist class encapsulates the ngspicepy library into a single data structure. The netlist class can be used to perform the AC, DC, TRAN and OP analysis.
There are three steps involved:
- Load the netlist file for the circuit.
- Set up the simulation type and the simulation parameters.
- Run the simulation
- Extract the data
Example¶
>>> amp = Netlist('CS-Amp.cir')
>>> amp.setup_sim('tran', tstep='1u', tstop='10m')
>>> amp.run()
>>> t = amp.get_vector('time')
>>> v_in = amp.get_vector('nin')
>>> v_out = amp.get_vector('nout')