Skip to content

Two Stage CMOS Operational Amplifier IP Design using Skywater 130nm Technology

License

Notifications You must be signed in to change notification settings

rohinthram/avsd_opamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

avsd_opamp - IP Design

avsd_opamp

This project presents the design of a Two Stage CMOS Operational Amplifier using open source SkyWater 130nm Technology

Size Last Commit License

Contents

Open-Source-Tools-Used

  • 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

  • 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/

Block Diagram

Block Diagram

Specifications

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

Installation

  • 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
    

eSim Installation

Please refer to the following links for proper installation of eSim

Ngspice Installation

Please refer to the following links for proper installation of Ngspice

SkyWater PDK Installation

  • In Windows

  • 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
    

Magic Installation

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
    

Clone This Project

To Clone this repository, execute the following from terminal

$ git clone https://github.com/rohinthram/avsd_opamp

Or download and extract the files

Pre Layout Schematic and Simulations

  • Go to the directory pre_layout/pre_layout_simulation

    $ cd pre_layout/pre_layout_simulation
    
  • Execute each and every .cir using ngspice command from terminal

    $ ngspice <file-name>
    
    • Replace <file-name> with file name of the analysis required
  • The necessary plot is obtained upon successful execution of the file

Differential Mode Gain

$ ngspice differential_gain.cir

Differential Gain Magnitude in dB

Differential Gain Phase in degrees

Common Mode Gain

$ ngspice common_mode_gain.cir

Common Gain Magnitude in dB

Offset Voltage

$ ngspice offset_voltage.cir

Offset Voltage

Input Noise Spectrum

$ 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 available

    ngspice-> 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
    

Input Noise Spectrum

Power Dissipation

$ ngspice power_dissipation.cir

Power Dissipation for 1kOhm load with 2V p-p sine input

Slew Rate

$ ngspice slew_rate.cir

Slew Rate

A much easier plot to see slew rate could be obtained by changing the analysis as

.tran 0.01u 2u

Slew Rate

Transient Analysis

$ ngspice transient.cir

Transient Analysis

Layout Design Using Magic

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>
  • Magic Workspace : Magic Workspace

  • 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
      
  • 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)

Post Layout Simulations

  • 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 using ngspice command from terminal

    $ ngspice <file-name>
    
    • Replace <file-name> with file name of the analysis required
  • The necessary plot is obtained upon successful execution of the file

Differential Mode Gain

$ ngspice differential_gain.cir

Differential Gain Magnitude in dB

Differential Gain Phase in degrees

Common Mode Gain

$ ngspice common_mode_gain.cir

Common Gain Magnitude in dB

Offset Voltage

$ ngspice offset_voltage.cir

Offset Voltage

Input Noise Spectrum

$ 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 available

    ngspice-> 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
    

Input Noise Spectrum

Power Dissipation

$ ngspice power_dissipation.cir

Power Dissipation for 1kOhm load with 2V p-p sine input

Slew Rate

$ ngspice slew_rate.cir

Slew Rate

A much easier plot to see slew rate could be obtained by changing the analysis as

.tran 0.01u 2u

Slew Rate

Transient Analysis

$ ngspice transient.cir

Transient Analysis

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

Future Work

  • The Area of the Operational Amplifier can be reduced
  • The Gain of the Operational Amplifier can be increased

Author

  • R.V.Rohinth Ram

Acknowledgements


About

Two Stage CMOS Operational Amplifier IP Design using Skywater 130nm Technology

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published