Giter Site home page Giter Site logo

phase-locked-loop-ic-design's Introduction

Phase Locked Loop IC Design

Wokshop

VSD workshop - Phase Locked Loop(PLL) IC Design!

The following repo is the documentation of learnings and activities done throughout a 2-day workshop on PLL IC Design with SKY130 Technology conducted by VLSI sytem design.

Contents



Introduction to PLL

Phase locked loops are important components in any digital circuits. It is responsible for creating a precise clock signal without any noise(frequency or phase). PLL-basic-structure

The above diagram shows basic block diagram of the PLL to be implemented. The functionality of PLL can be decribed as two processes.

  • Comparing frequency of reference and ouput(PFD)
  • Adjusting frequency to match reference signal(CP and VCO)

Phase Frequency Detector

The phase frequency detector(PFD) is responsible for comparing the reference signal given as input and the output signal. Then it should produce output which clearly shows the difference of phase. This phase difference is not just in terms of magnitude but it should also show whether the ouput is leading or lagging behind the reference. The ouput of PFD is in digital form.

Charge pump

The CP converts the digital output from PFD to an analog signal. This analog signal is what would control the VCO. The analog ouput from CP is passed through a low pass filter before connecting to the VCO. This low pass filter can help smoothen the signal in addition to stabilizing the feedback loop.

VCO and Frequency Divider

Voltage controlled oscillators are the actual parts which produces alternating digital clock signal. The frequency of this clock signal can be controlled by input voltage, hence the name. VCO can be implemented using simple inverters. A PLL with a frequency divider on its feedback loop is called a clock multiplier PLL. Such a PLL can make clock signals which are multiples of the reference signals.


Tools Overview and Design Flow

Design Flow

Design flow of the PLL IC has the following steps:

  1. Specifications of the IC
  2. SPICE level circuit development
  3. Pre-layout simulation
  4. Layout development
  5. Parastic Extraction
  6. Post-layout simulation
  7. Tapeout

Tool Setup

SKY130 PDK

The SKY130 are set of 180nm-130nm technology based process nodes and PDKs(Process Design Kits), provided for free. The content provided in this pdk include:

  • io-input-output
  • pr-primitives
  • sc-standard cell
  • hd-high density
  • hs-high speed
  • lp-low power
  • hdll-high density low leakage
NGSPICE

The ngspice is an open-source electronic circuit simulator widely used in ciruit design and analog VLSI domain. Ngspice is very simple to get in linux systems. The following terminal command can be used to install it in a linux system.

        sudo apt-get install ngspice
Magic

Magic is an open-source VLSI layout tool. It is mainly used for making the layout and the parasitic extraction which follows. For SKY130, the latest version of magic needs to be installed and this can be done by directly compiling and "making" the source code. Terminal commands for the same are given below.

       sudo apt-get update && sudo apt-get upgrade      //update OS
       git clone git://opencircuitdesign.com/magic      //clone magic repository
       sudo apt-get install csh                         //install csh shell if it is absent
       cd magic
       ./configure                                      //run configure script
       make                                             //run make command to compile
       sudo make install                                //install magic

Additionally, many of the files used in this workshop where provided through a github repository.
git_lakshmi


Circuit Design and Simulation

Specifications

As mentioned in the design flow, every design starts with determining the specifications. The specifications for PLL to be designed are:

  • Corner - 'TT' (Typical-Typical)
  • Supply Voltage - 1.8V
  • Room Temperature
  • VCO mode and PLL mode
  • Input Fmin=5Mhz; Fmax=12.5Mhz
  • Multiplier - 8x
  • Jitter(RMS) < ~20ns
  • Duty Cycle - 50%

Frequency Divider Circuit

A simple 2x frequency divider circuit can be obtained by using a single D-flipflop whose output is fed back to its input after passing through an inverter. Cascading 3 such flops can give you 8x divider. This simple circuit can be drawn as:
FD_circuit

Writing this circuit as a spice file:
FD_spice

Pre-layout Simulation
The pre-layout simulation of spice model can be done using the command:

                          ngspice <spice_file_name>

FD_prelay_sim FD Prelayout Simulation Result

PFD Circuit

The PFD circuit is designed such that, square(digital) signals with pulse width proportional to phase difference are produced at output. Also two different outputs are used to distinguish between cases when output is leading reference signal and lagging behind reference signal.

Given below are the PFD circuit..
PFD_circuit

and the spice file.
PFD_spice

Pre-layout Simulation

PD_prelay_sim PFD_prelay_graph

PFD Prelayout Simulation Results

Charge Pump Circuit

The charge pump circuit with modification considering the leakage current is
CP_circuit
and the spice file is
CP_spice

Pre-layout Simulation

CP_prelay_sim CP Prelayout Simulation Result

VCO Circuit

The VCO circuit is realised with a current starved 3 inverter circuit. Using this method, the delay of inverter can be controlled and thereby the frequency of output clock. frequency of clock = 1/(2 * delay of inverter * no: of inverters)

The circuit is:
VCO_circuit

and the spice model is
VCO_spice

Pre-layout Simulation

VCO_prelay_sim
VCO Prelayout Simulation Result

PLL Circuit

The final PLL circuit is the joining of all the other blocks. However in addition to individual simulations, the PLL as a whole also need to be simulated. For this we create the spice file by calling the individual circuits as subcircuits.
PLL_spice

Pre-layout Simulation
PLL_prelay_sim PLL_prelay_graph
PLL simulation results


Layout Design

Layout Design is the part in which the circuit is converted to polygons which can be made into GDSII format. Here layout design is done using the Magic tool. The layouts are saved with ".mag" extensions. These files can be opened with command:

                                      magic -T <technology_file_name> <layout_file_name>

Shown below are examples of terminal commands:
Magic_commands

The layouts for each circuits are given below:

FD_layout
FD Layout

PFD_layout
PFD Layout

CP_layout
CP Layout

VCO_layout
VCO Layout

After making each layout, these layouts can be instantiated to make the final PLL layout. This is done using File > Place Instance option.
PLL_layout
PLL Layout


Parasitic Extraction and PLS

Parasitic extraction is the process of extracting the capacitance effects(parasitics) of the circuit realised in the layout. This can be done using the magic tool. The magic tool can do this using extract all command. This can further be converted to a spice file using command ext2spice.

Given below is an example spice file of PFD generated in such a way.
Spice_generated _by_magic
For this example around 43 capacitance have been extracted, the largest capacitance between Vcc and GND.

This spice file is used to perform the post-layout simulation.

Postlay_sim
The above picture shows post-layout simulation results of PFD spice after parasitic extraction.

The parasitic extraction and post-layout simulation are steps for ensuring fuctionality. The GDS file generation can however be done after creating the layout with magic tool.


Tapeout

GDS file can be created using the option File > Write GDS. Although the GDSII file is considered the final format which is sent for fabrication, the IC designed cannot be send as such. The design need to be "prepared" for fabrication process. This preparation is called the tapeout. Any addition which helps connect the wafer to outside world would come under this preparation. This may include adding I-O ports, UART and other peripherals. Efabless, provides a free "shuttle" which will carry our design . This is the Caravel SoC.

Caravel_soc
Caravel SoC Structure(as provided in efabless.com)

Within the design for caravel, the IP can be added using Place Instance option within the magic tool. After placing, the inputs and outputs need to be connected to the carvel template.

PLL_in_caravel
Adding PLL to caravel


Acknowledgement

phase-locked-loop-ic-design's People

Contributors

gklkrshna avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.