Comment
Author: Admin | 2025-04-28
With a voltage of 2.5 voltsVin in 0 2.5 ; Voltage source Vin connected between node 'in' and ground (0) with a voltage of 2.5 volts*** SIMULATION Commands ***.op ; Perform a DC operating point analysis.dc Vin 0 2.5 0.05 ; Perform a DC sweep of Vin from 0 to 2.5 volts in steps of 0.05 volts*** include tsmc_025um_model.mod *** ; Include the model file 'tsmc_025um_model.mod'.LIB "tsmc_025um_models.mod" CMOS_MODELS ; Link the library 'tsmc_025um_models.mod' and define it as 'CMOS_MODELS'.end ; End of the SPICE netlistSPICE Simulation Using NgspiceFollow these steps for simulation:Source the circuit file in Ngspice using source .cir.Execute the simulations using the run command.Use setplot to prepare for plotting.For DC analysis (as indicated in the .cir file), use dc1 to prepare the DC plot.Display available vectors using display.Plot specific vectors, e.g., plot vout vs vin, to visualize the circuit behavior.SPICE Simulation using NgspiceFollow these steps for SPICE simulation:Source the circuit file in Ngspice using the command: source .cir Once the .cir file is loaded, execute the simulations by typing: runTo prepare for plotting, use the setplot command. Since we are performing a DC analysis, use dc1 to prepare the DC plot.To see all the available vectors for plotting, type: display To plot Vout vs. Vin, use the command: plot vout vs vin To obtain a symmetric DC plot, you can scale the aspect ratio of PMOS by 2.5 times. The Vin = Vout point is crucial as it indicates when both transistors are active, leading to peak power consumption. The symmetric DC plot can be achieved by adjusting the PMOS aspect ratio. SPICE Deck for Transient AnalysisFor transient analysis, the following SPICE deck can be used:spiceCopy code*** MODEL DESCRIPTIONS ****** NETLIST DESCRIPTION ***M1 out in vdd vdd pmos W=0.375u L=0.25u ; PMOS transistor M1 with width (W) 0.375u and length (L) 0.25uM2 out in 0 0 nmos W=0.375u L=0.25u ; NMOS transistor M2 with width (W) 0.375u and length (L) 0.25ucload out 0 10f ; Capacitive load (cload) between node out and ground (0) with a value of 10 femtofarads (10f)Vdd vdd 0 2.5 ; Voltage source Vdd with a value of 2.5V, connected between node vdd and ground (0)Vin in 0 0 pulse 0 2.5 0 10p 10p 1n 2n ; Voltage source Vin with a pulse waveform*** SIMULATION Commands ***.op ; Operating point analysis.trans 10p 4n ; Transient analysis from 10 picoseconds to 4 nanoseconds*** include tsmc_025um_model.mod
Add Comment