CMOS OPAMP is Basic building block of analog and Mixed signal circuits. It is used in many applications such as ADC, DAC and Instrumentation Amplifier. It basically amplifies the difference between two input signals.
The files from this repository can be downloaded and used by the following commands :-
sudo apt install -y git
git clone https://github.com/MadhuriKadam9/Cmosopamp.git
Install the eSim tool using this https://esim.fossee.in/downloads
Note: You can also refer to the eSim Spoken Tutorialwebsite https://spoken-tutorial.org/tutorial-search/?search_foss=eSim
Ngspice is an open source mixed-signal circuit simulator. To install Ngspice on Ubuntu, open terminal window and type :-
sudo apt-get install -y ngspice
After successful installation, to invoke Ngspice type the following command on the terminal window.
ngspice “circuit file to be simulated”
To get the transient response of two stage OPAMP run the following file in ngspice: Opamp_TRAN.cir.out
To get the transient response of two stage OPAMP run the following file in ngspice: Opamp_AC.cir.out
Magnitude Response Vout-dB i.e. ADM
Phase Response Vout-Ph
Phase Margin Plot of Vout
The Layout for the circuit was done using Magic Layout editor tool. To observe the layout, install magic using the following commands :-
sudo wget “http://opencircuitdesign.com/magic/archive/magic-8.3.122.tgz”
tar -xvzf magic-8.3.122.tgz
cd magic-8.3.122
sudo ./configure
sudo make
sudo make install
After successful installation, To open Resistor layout in magic type following in terminal window:-
cd Cmosopamp/OPAMP_Layout_Files/
magic -T ../libs/sky130A.tech res.mag
To see capacitor layout give command magic -T ../libs/sky130A.tech mimcapt.mag
To see opamp1 layout give command magic -T ../libs/sky130A.tech opamp1.mag
To see opamp2 layout give command magic -T ../libs/sky130A.tech opamp2.mag
Run the following file in ngspice: opamp1_tran.spice
Vinp, Vinm Waveforms
Vo waveform
Run the following file in ngspice: opamp1_ac.spice
Magnitude Response i.e. VodB
Phase Response i.e Vo-ph
All AC Response of OPAMP1
Run the following file in ngspice: opamp2_tran.spice
Vinp, Vinm Waveforms
Vout waveform
Run the following file in ngspice: opamp2_ac.spice
Magnitude Response i.e. VodB
Phase Response Vout-ph
Phase Margin Plot Vout-PM
All AC Response
From the postlayout transient response of Two stage opamp it can be obsereved that the negative peak of vout is flattened. This results in reduction of overall voltage swing at the output. So with proper design this problem can be solved.
Kunal Ghosh, Co-Founder of VLSI System Design (VSD) Corp. Pvt. Ltd. - kunalpghosh@gmail.com