This project presents the design of a Two Stage CMOS Operational Amplifier using open source SkyWater 130nm Technology
- Open Source Tools Used
- Block Diagram
- Specifications
- Installation
- Clone This Project
- Pre Layout Schematic and Simulations
- Layout Design Using Magic
- Post Layout Simulations
- Future Work
- Author
- Acknowledgements
-
eSim
- eSim (previously known as Oscad / FreeEDA) is a free/libre and open source EDA tool for circuit design, simulation, analysis and PCB design. It is an integrated tool built using free/libre and open source software such as KiCad, Ngspice and GHDL. eSim is released under GPL.
- https://esim.fossee.in/home
-
Ngspice
- ngspice is the open source spice simulator for electric and electronic circuits.
- https://ngspice.sourceforge.net/
-
SkyWater Open Source PDK
- The SkyWater Open Source PDK is a collaboration between Google and SkyWater Technology Foundry to provide a fully open source Process Design Kit and related resources, which can be used to create manufacturable designs at SkyWater’s facility.
- https://github.com/google/skywater-pdk
-
Magic
- Magic is a venerable VLSI layout tool, written in the 1980's at Berkeley by John Ousterhout, now famous primarily for writing the scripting interpreter language Tcl. Due largely in part to its liberal Berkeley open-source license, magic has remained popular with universities and small companies. The open-source license has allowed VLSI engineers with a bent toward programming to implement clever ideas and help magic stay abreast of fabrication technology.
- https://opencircuitdesign.com/magic/
Specification | Value |
---|---|
Differential Gain | 31.55dB |
CMRR | 41.4dB |
Gain Bandwidth Product | 46MHz |
Phase Margin | 101.93° |
Input Offset Voltage | -24.55mV |
Power Dissipation at 60Hz 1mV p-p sinusoid with 1kΩ |
17µW |
Slew Rate | 180 V/µs |
-
The eSim Software is currently available for Windows 7, 8 and 10 and Ubuntu 16.04 LTS and above
-
The Magic Design Tool is available for Ubuntu
-
Ngspice is installed when eSim is installed, but if any other version is needed please follow the steps mentioned
-
The Pre-requisites for installing the following in Ubuntu are
- git
- make
-
Install them using
To make sure that you install the latest version of the software(that is the package information is up to date)
$ sudo apt-get update
$ sudo apt install git $ sudo apt install make
Please refer to the following links for proper installation of eSim
-
https://static.fossee.in/esim/installation-files/Install_eSim_on_Windows.pdf
-
https://github.com/FOSSEE/eSim/blob/master/INSTALL
Please refer to the following links for proper installation of Ngspice
-
In Windows
- Download the GitHub Repository : https://github.com/google/skywater-pdk
-
In Ubuntu In terminal, execute the following commands
-
To download the repository into the current working directory
$ git clone git:https://opencircuitdesign.com/open_pdks
-
Go to
open_pks
directory$ cd open_pdks
-
Configure and install
$ ./configure --enable-sky130-pdk $ make $ sudo make install
In terminal, execute the following commands
-
To download the repository into the current working directory
$ git clone git:https://opencircuitdesign.com/magic
-
Go to
magic
directory$ cd magic
-
Configure and install
$ sudo ./configure $ sudo make $ sudo make install
To Clone this repository, execute the following from terminal
$ git clone https://github.com/rohinthram/avsd_opamp
Or download and extract the files
-
Go to the directory
pre_layout/pre_layout_simulation
$ cd pre_layout/pre_layout_simulation
-
Execute each and every
.cir
usingngspice
command from terminal$ ngspice <file-name>
- Replace
<file-name>
with file name of the analysis required
- Replace
-
The necessary plot is obtained upon successful execution of the file
$ ngspice differential_gain.cir
$ ngspice common_mode_gain.cir
$ ngspice offset_voltage.cir
$ ngspice input_noise_spectrum.cir
To obtain Noise Spectrum
-
Please run the following commands in the ngspice window for obtaining the plot
-
Use
setplot
to see all plots availablengspice-> setplot
-
select the plot which has "Noise Spectral Density Curves".For example,
ngspice-> setplot noise1
-
Then plot the graph using the command
ngspice-> plot inoise_spectrum
$ ngspice power_dissipation.cir
$ ngspice slew_rate.cir
A much easier plot to see slew rate could be obtained by changing the analysis as
.tran 0.01u 2u
$ ngspice transient.cir
Copy sky130A.tech
file and paste in the directory where we want to work with magic
Or execute the following command in the terminal
cp avsd_opamp/skywater_pdk/sky130A.tech <target-destination>
-
Save the changes made using
% save <file-name>
-
Conversion of .mag file into ngspice executable
- Extract the .mag file using (from tkcon terminal)(magic terminal)
% extract all
- Convert .ext to .spice using
% ext2spice
- Extract the .mag file using (from tkcon terminal)(magic terminal)
-
Make necessary changes to the .spice file so that it can be run in
ngspice
(The modified file can be found in post_layout/post_layout_simulations directory)
-
Go to the directory
post_layout/post_layout_simulation
by executing the command from parent directory$ cd post_layout/post_layout_simulation
-
Execute each and every
.cir
usingngspice
command from terminal$ ngspice <file-name>
- Replace
<file-name>
with file name of the analysis required
- Replace
-
The necessary plot is obtained upon successful execution of the file
$ ngspice differential_gain.cir
$ ngspice common_mode_gain.cir
$ ngspice offset_voltage.cir
$ ngspice input_noise_spectrum.cir
For obtaining Noise Spectrum
-
Please run the following commands in the ngspice window for obtaining the plot
-
Use
setplot
to see all plots availablengspice-> setplot
-
select the plot which has "Noise Spectral Density Curves".For example,
ngspice-> setplot noise1
-
Then plot the graph using the command
ngspice-> plot inoise_spectrum
$ ngspice power_dissipation.cir
$ ngspice slew_rate.cir
A much easier plot to see slew rate could be obtained by changing the analysis as
.tran 0.01u 2u
$ ngspice transient.cir
Note:
- For performing any of the simulation mentioned in this repository the sky130_fd_pr folder is necessary.
- All simulation given in this repository are properly linked to the sky130_fd_pr library. Hence files execute with no error if the folders are kept as such
- For any external simulation using SkyWater Models, it is a must to properly include the library
- The Area of the Operational Amplifier can be reduced
- The Gain of the Operational Amplifier can be increased
- R.V.Rohinth Ram
- Kunal Ghosh, Co-founder, VLSI System Design (VSD) Corp. Pvt. Ltd. - [email protected]