Vlsi Lab Manual
Vlsi Lab Manual
Bengaluru–560107
Department of
Electronics and Communication E ngineering
LAB MANUAL
Prepared By
Mrs.Veena Sanath Kumar
Reviewed By
Dr. Jayalaxmi H
Asso. Prof., Department of ECE, AIT
Approved By:
Dr.Rajeswari
Prof. & Head, Department of ECE, AIT
Course Details
Course Objectives
1. Understand the flow of the Full Custom IC design cycle.
2. Simulate the various CMOS digital circuits.
3. Learn DRC, LVS and Parasitic Extraction of the various designs.
Course Outcomes
Upon successful completion of this course, students should be able to:
CO1 : Write a Verilog code / draw schematic of Analog circuits / Digital circuits. L3
PO 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
CO1 3 3 3 3 3 3 1 1 3
CO2 3 3 3 3 3 3 1 3
CO3 3 3 3 3 3 3 1 3
CO4 3 3 3 3 3 3 1 1 3
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
VISION STATEMENT
“To be a premier engineering department with excellence in teaching, research and innovation, to
meet the global industrial standards and to have significant impact on the wellbeing of the society”.
MISSION STATEMENT
1. To provide student centric learning environment, inculcate profound knowledge in both
fundamental and applied areas of science and technology.
2. To train and mentor the students in developing leadership qualities and team building
skills.
2. Problem analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities
with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to
the professional engineering practice.
7. Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
10. Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend and write
effective reports and design documentation, make effective presentations, and give and receive
clear instructions.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.
Program Specific Outcomes (PSOs)
PSO1: Analog / Digital Circuit Design: Apply the conceptual knowledge in the analysis and/or
design, evaluate analog/digital circuits and systems.
PSO2: VLSI, Signal Processing and Embedded Systems: Demonstrate technical competency
in the analysis, design, and validation of components in VLSI, Signal Processing, and Embedded
Systems.
PSO3: Communication and Networking: Apply the domain knowledge in the implementation
and performance analysis of Communication Systems and Computer Networks.
PEO1: Students shall have a successful professional career in industry, academia, R & D
organization or entrepreneur in specialized field of Electronics & Communication engineering
and allied disciplines.
PEO2: Students shall be competent, creative and valued professional in the chosen field.
PEO3: Engage in life-long learning and professional development.
PEO4: Become effective global collaborators, leading or participating to address technical,
business, environmental and societal challenges.
VLSI Design and Testing Lab BECL606
VTU Syllabus
Digital Design
1. 4-bit adder
3. 32-bit ALU
Analog Design
5. Schematic and Layout of Inverter
Introduction
VLSI is the current trend of manufacturing electronic integrated circuits. As we know that there
are two divisions of electronic circuits (analog and digital) VLSI also have this division. An IC
(Integrated Circuit) consisting of a large number of transistors, usually in the range of around 10
K to 1 Billion is called a VLSI circuit. The invention of Planar Technology for fabrication of
transistors on a silicon wafer made VLSI circuits possible today. The fabrication techniques are
improving every year minimizing process steps, leakage and shrinking transistor size even further.
All these help in building power efficient, fast and reliable electronic circuits
Digital VLSI
Design aspects:
Mostly the design is automated and HDLs are used to describe the design.
Transistors are much smaller and operate at lower supply levels than analog circuits.
Regeneration of signal is easy so long wires is not a big problem for digital circuits.
Design is mostly CMOS which have less power dissipation, high density, low
cost and easily fabricated.
Testing aspects:
Circuit can be tested exhaustively giving all possible inputs increasing reliability.
The delays have to be analyzed correctly so that the setup and hold time violations do not
happen.
Application aspects:
Majority of the system is digital.
Analog VLSI
Design aspects:
It is comparatively difficult to design an analog VLSI circuit than a Digital VLSI circuit.
Analog modules are separated from the entire design because they need separate ground.
Transistors used are a bit larger than that used for digital circuits and run at a higher supply
voltage.
Testing aspects:
It is difficult to test the circuit because in real system noise affects more and you cannot inject
noise directly while testing the circuit.
Application aspects:
Only a small portion of an electronic circuit will be analog as their operation is highly affected
by noise.
• In Desktop Create a folder to do the digital design flow. Right click in the Desktop and select
New Folder as shown in Figure1.2
• It will create a folder like below and name it as Cadence_Digital_Labs
• Create a new sub-Directory for the Design and open a terminal from the Sub-Directory.
A Blank Document opens up into which the following source code can be typed down.
Creating Test bench: Similarly, create your test bench using gedit <filename_tb>.v or
<filename_tb>.vhdl to open a new blank document (4bup_down_count_tb.v).
Click on the Save option and it will look like the below window and then close the file
Figure No.1.5: Verilog and Test bench file for 4bit updown counter
Step-3:Functional Simulation
◦ (The path of cshrc could vary depending on the installation destination as /home/install/
or /home etc.)
◦ linux:/> nclaunch -new& // ―-new‖ option is used for invoking NCVERILOG for the first time
for any design
It will invoke the nclaunch window for functional simulation we can compile, elaborate
and simulate it using Multistep
Select Multiple Step and then select ―Create cds.lib File‖ as shown in below figure
Click the cds.lib file and save the file by clicking on Save option
Save cds.lib file and select the correct option for cds.lib file format based on the HDL
Language and Libraries used.
Select ―Don‘t include any libraries (verilog design)‖ from ―New cds.lib file‖ and click
on―OK‖ as in below figure
◦ We are simulating verilog design without using any libraries
A Click ―OK‖ in the ―nclaunch: Open Design Directory window as shown in below
figure
To perform the function simulation, the following three steps are involved Compilation,
Elaboration and Simulation.
Step 1: Compilation:– Process to check the correct Verilog language syntax and usage
Outputs: Compiled database created in mapped library if successful, generates report else error
reported in log file
i.e Cadence IES command for compile: ncverilog +access+rwc -compile design.v
Left side select the file and in Tools : launch verilog compiler with current selection will
get enable. Click it to compile the code
Worklib is the directory where all the compiled codes are stored while Snapshot will have
output of elaboration which in turn goes for simulation
compilation it will come under worklib you can see in right side window.
Select the test bench and compile it. It will come under worklib. Under Worklib you can see the
module and test bench.
The cds.lib file is an ASCII text file. It defines which libraries are accessible and where they are
located. It contains statements that map logical library names to their physical directory paths.
For this Design, you will define a library called ―worklib‖
Outputs: Elaborate database updated in mapped library if successful, generates report else error
reported in log file
Steps for elaboration – Run the elaboration command with elaborate options
1. It builds the module hierarchy
2. Binds modules to module instances
3. Computes parameter values
4. Checks for hierarchical names conflicts
5. It also establishes net connectivity and prepares all of this for simulation
Step 3: Simulation: – Simulate with the given test vectors over a period of time to observe the
output behaviour
Outputs: Simulation log file, waveforms for debugging Simulation allow to dump design and
test bench signals into a waveform
Steps for simulation – Run the simulation command with simulator options
b) Synthesize the design using Constraints and analyse reports, critical path and Max
Operating Frequency.
Step 1: Getting Started
• Make sure you close out all the Incisive tool windows first.
• Synthesis requires three files as follows,
◦ Liberty Files (.lib)
◦ Verilog/VHDL Files (.v or .vhdl or .vhd)
◦ SDC (Synopsis Design Constraint) File (.sdc)
◦ Step 2 : Creating an SDC File
• In your terminal type ―gedit counter_top.sdc‖ to create an SDC File if you do not have one.
• The SDC File must contain the following commands;
i. create_clock -name clk -period 2 -waveform {0 1} [get_ports "clk"]
_uncertainty 0.01 [get_ports "clk"]
v. set_input_delay ii. set_clock_transition -rise 0.1 [get_clocks "clk"]
iii. set_clock_transition -fall 0.1 [get_clocks "clk"]
iv. set_clock
-max 0.8 [get_ports "rst"] -clock [get_clocks "clk"]
vi. set_output_delay -max 0.8 [get_ports "count"] -clock [get_clocks "clk"]
vii. set_input_transition 0.12 [all_inputs]
Dept of ECE, AIT 16
VLSI Design and Testing Lab BECL606
Commands 1-5 are intended for Synthesis process while 11-15 for Generating reports and
Outputs.
Note :-
1) report_timing gives you the path with highest failing slack where
Setup Slack = Required Time – Arrival Time.
2) Worst Setup Slack ==> Highest Arrival time ==> Highest Propagation Delay.
3) Maximum Clock Frequency = 1/ (Max Data Path Delay – Min Clock Path Delay + Tsetup)
All the Information can be gathered from report_timing.
4) The Cells given in the netlist can be checked in the .lib files for their properties.
c) Compilation, Simulation and Synthesis of 32-bit Up/Down Counter.
Source Code
`timescale 1ns/1ps //Defining a Timescale for Precision
module counter(clk,rst,m,count); //Defining Module and Port List
input clk,rst,m; //Defining Inputs
output reg [31:0]count; //Defining 4-bit Output as Reg type
always@(posedge clk or negedge rst) //The Block is executed when
begin //EITHER of positive edge of clock
if(!rst) //or Neg Edge of Rst arrives
count=0; // Both are independent events
if(m)
count=count+1;
else
count=count-1;
end
endmodule
Test Bench
`timescale 1ns/1ps //Creating Time Scale as in Source Code
module counter_test; //Defining Module Name without Port List
reg clk, rst,m; //Defining I/P as Registers [to Hold Values]
wire [31:0] count; //Defining O/P as Wires [To Probe Waveforms]
initial
begin
clk=0; //Initializing Clock and Reset
rst=0;#25; //All O/P is 4‘b0000 from t=0 to t=25ns.
rst=1; //Up-Down counting is allowed at posedge clk
end
initial
begin
m=1; //Condition for Up-Count
#600 m=0; //Condition for Down-Count
rst=0;#25;
rst=1;
#500 m=0;
end
counter counter1(clk,m,rst, count); //Instantiation of Source Code
always #5 clk=~clk; //Inverting Clk every 5ns
initial
#1400 $finish; //Finishing Simulation at t=1400ns
Endmodule
The procedure for Simulation and Synthesis remains same as mentioned earlier.
EXPERIMENT-1:-4-Bit Adder
1. To write a verilog code for 4bit adder and verify the functionality using Test bench.
• Synthesize, Analyse Reports and Netlist, Critical Path and Max Operating Frequency.
• From the report generated find the total number of cells, power requirement and
total area requirement.
Aim: To write a verilog code for 4-bit adder and verify the functionality using Test bench.
• Synthesize, Analyze Reports and Netlist, Critical Path and Max Operating Frequency.
• From the report generated find the total number of cells, power requirement and total area
requirement.
Tool Required:
• Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
• Synthesis: Genus
Design Information and Bock Diagram:
A full adder is a combinational circuit that performs the arithmetic sum of three input bits Ai,
addend Bi and carry in C in from the previous adder. Its results contain the sum Si and the carry
out, C out to the next stage. So to design a 4-bit adder circuit we start by designing the 1 –bit full
adder then connecting the four 1-bit full adders to get the 4-bit adder as shown in the diagram
below. For the 1-bit full adder, the design begins by drawing the Truth Table for the three input
and the corresponding output SUM and CARRY.
#50 $finish;
endmodule
Aim: To write a verilog code for 4 bit Shift and Add Multiplier and verify the functionality using
Test bench.
a. Synthesize, Analyse Reports and Netlist, Critical Path and Max Operating Frequency.
b. From the report generated find the total number of cells, power requirement and total area
requirement.
Tools Required:
Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
Synthesis: Genus
read_libs { /home/install/FOUNDRY/digital/180nm/dig/lib/slow.lib}
set DESIGN sftadd
read_hdl "shiftadd.v"
elaborate $DESIGN
set_input_delay -max 0.5 [all_inputs]
set_output_delay -max 0.5 [all_outputs]
set_input_transition 0.1 [all_inputs]
set_max_capacitance 20 [get_ports]
set_load 0.10 [all_outputs]
set_max_fanout 20.00 [current_design]
set_db syn_generic_effort medium
set_db syn_map_effort medium
set_db syn_opt_effort medium
syn_generic
Dept of ECE, AIT 28
VLSI Design and Testing Lab BECL606
gui_show
syn_map
gui_show
syn_opt
gui_show
report_power
report_power >sftaddmul_power.rpt
report_area
report_area > sftaddmul _area.rpt
report_timing -unconstrained
report_timing -unconstrained > sftaddmul _timing.rpt
write_hdl
write_sdc
write_hdl sftaddmul_netlist.v
gui_show
3.Write a Verilog code for 32-bit ALU supporting four logical and four arithmetic operations, use
case statement and if statement for ALU behavioral modeling.
Compare the synthesis results of ALU modeled using IF and CASE statements.
Aim: Write a Verilog code for 32 bit ALU supporting four logical and four arithmetic operations,
use case statement and if statement for ALU behavioral modeling.
To Verify the Functionality using Test Bench
Synthesize and compare the results using if and case statements
Identify Critical Path and constraints
Tool Required:
Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
Synthesis: Genus
module alu_32bit_tb_case;
reg [31:0]a;
reg [31:0]b;
reg [2:0]f;
wire [31:0]y;
alu_32bit_case test2(.y(y),.a(a),.b(b),.f(f));
initial
begin
a=32'h00000000;
b=32'hFFFFFFFF;
#10 f=3'b000;
#10 f=3'b001;
#10 f=3'b010;
#10 f=3'b100;
end
initial
#50 $finish;
endmodule
Source Code - Using If Statement :
module alu_32bit_if(y,a,b,f);
input [31:0]a;
input [31:0]b;
input [2:0]f;
output reg [31:0]y;
always@(*)
begin
if(f==3'b000)
y=a&b; //AND Operation
else if (f==3'b001)
y=a|b; //OR Operation
else if (f==3'b010)
y=a+b; //Addition
else if (f==3'b011)
y=a-b; //Subtraction
else if (f==3'b100)
y=a*b; //Multiply
else
y=32'bx; end
endmodule
Test bench :
module alu_32bit_tb_if;
reg [31:0]a;
reg [31:0]b;
reg [2:0]f;
wire [31:0]y;
alu_32bit_if test(.y(y),.a(a),.b(b),.f(f));
initial
begin
a=32'h00000000;
b=32'hFFFFFFFF;
#10 f=3'b000;
#10 f=3'b001;
#10 f=3'b010;
#10 f=3'b100;
end initial #50
$finish; endmodule
Wave Forms :
b) Synthesize Design
• Run the synthesis Process one time for each code and make sure the output File names are
changed accordingly.
Synthesis Process :
1. read_libs /home/install/FOUNDRY/digital/90nm/dig/lib/slow.lib
2. read_hdl {alu_32bit_if.v (OR) alu_32bit_case.v} //Choose any one
3. elaborate
4. read_sdc constraints_top.sdc //Optional-Reading Top Level SDC
5. set_db syn_generic_effort medium //Setting effort medium
6. set_db syn_map_effort medium
7. set_db syn_opt_effort medium
8. syn_generic
9. syn_map
10. syn_opt
//Performing Synthesis Mapping and Optimisation
11. report_timing > alu_timing.rep
//Generates Timing report for worst datapath and dumps into file
12. report_area > alu_area.rep
//Generates Synthesis Area report and dumps into a file
13. report_power > uart_power.rep
//Generates Power Report [Pre-Layout]
14. write_hdl > uart_netlist.v
Note :-
1. You can tabulate Area, Power and Timing Constraints using any of the SDC Constraints as
instructed.
2. Make sure, during synthesis the Report File Names are changed so that the latest reports do not
overwrite the earlier ones.
Tool Required:
Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
Synthesis: Genus
Verilog Codes for D-Flip Flop, JK-Flip Flop and SR-Flip Flop.
Source code for D-Flip Flop :
module DFF( Q,Qbar,D,Clk,Reset);
output reg Q;
output Qbar;
input D,Clk,Reset;
always @(posedge Clk)
begin
if (Reset == 1'b1) //If at reset
Q <= 1'b0;
else
Q <= D;
end
assign Qbar = ~Q;
endmodule
Source code for D-Latch :
module DFF( Q,Qbar,D,en,Reset);
output reg Q;
output Qbar;
input D,en,Reset;
assign Reset = ~D;
always @(en)
begin
if (Reset == 1'b1) //If at reset
Q <= 1'b0;
else
Q <= D;
end
assign Qbar = ~Q;
endmodule
Source code for SR Flip Flop :
module Main(S,R,clk,Q,Qbar);
input S,R,clk;
output Q,Qbar;
reg M,N;
always @(posedge clk)
begin
M = !(S & clk);
N = !(R & clk);
end
assign Q = !(M & Qbar);
assign Qbar = !(N & Q);
endmodule
Experiment – 5
5.Four-bit (MOD 10) counter with Asynchronous reset, Verify the functionality, synthesize the
design and compare the synthesis report.
Aim : Write a verilog code for 4-bit (MOD 10) counter with asynchronous reset, Synthesize
the design and compare the synthesis report.
Tools Required:
Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
Synthesis: Genus
Design Information :
A Mod-N counter is a type of digital counter that counts up to a specific number (N) and then wraps
back to zero. It's a sequential logic circuit that changes state on each clock pulse, counting through a
predetermined sequence of states. The number of states the counter cycles through before repeating is
called its modulus, and a Mod-N counter has a modulus of N.The counter sequence is the one in which,
the counter increments its value (from 0 to N-1) with each clock pulse. When the counter reaches N-
1, it resets back to 0, completing one count cycle. The modulus of a counter is the number of states it
cycles through before repeating, which is N for a Mod-N counter. For example, a 2-bit counter (with
states 00, 01, 10, 11) has a modulus of 4, making it a Mod-4 counter.
Verilog Codes for a Mod 10 counter with Asynchronous reset
a) Source code for Mod 10 counter with Asynchronous reset
3. For the synthesized netlist carry out the following for any two above experiments.
Aim: For the synthesized netlist carry out the following any two above experiments:
1. For Synthesis, slow.lib was read as input. Each liberty file contains a pre-defined Process,
Voltage and Temperature (PVT) values which impact the ease of charge movement.
2. Process, Voltage and Temperature individually affect the ease of currents as depicted below.
3. Hence, slow.lib contains PVT combination (corner) with slow charge movement => Maximum
Delay => Worst Performance
4. Similarly, fast.lib contains PVT Combination applicable across its designs to give Fast charge
movement => Minimum Delay => Best Performance.
5. When these corners are collaborated with the sdc, they can be used to analyse timing for setup
in the worst case and hold in the best case.
6. All these analysis views are to be manually created either in the form of script or using the
GUI.
Once both the Netlist and LEF Files are loaded, your import design window is as follows.
In order to load the Liberty File and SDC, create delay corners and analysis view, select the ―Create
Analysis Configuration‖ option at the bottom.
Similarly, add fast.lib with a label Fast or any identifier of your own.
Adding RC Corners can also be done in a similar process. The temperature value can be
found under the corresponding liberty file. Also, cap table and RC Tech files can be added
from Foundry where available.
Analysis Views are formed from combinations of SDC and Delay Corner.
Once ―Best‖ and ―Worst‖ Analysis views are created, assign them to Setup and Hold.
Once all the process is done, Click on ―Save & Close‖ and save the script generated with
any name of your choice.
Make sure the file extension remains .view or .tcl
After saving the script, go back to Import Design window and Click ―OK‖ to load your
design
rectangular or square box appears in your GUI if and only if all the inputs are read
properly.
If the box does not appear, check for errors in your log (Either on terminal or log file from
pwd)
The Yellow patch on the Left Bottom are the group of ―Unassigned pins‖ which are to be
placed along the IO Boundary along with the Standard Cells [Gates].
→ Power Planning
Steps under Power Planning :
1. Connect Global Net Connects
2. Adding Power Rings
1. Select Power → Connect Global Nets.. to create ―Pin‖ and ―Connect to Global Net‖ as shown and
use ―Add to list‖.
2. Click on ―Apply‖ to direct the tool in enforcing the Pins and Net connects to Design and then
Close the window.
In order to Tap in Power from a distant Power supply, Wider Nets and Parallel connections
improve efficiency. Moreover, the cells that would be placed inside the core area are expected to
have shorter Nets for lower resistance.
• Hence Power Rings [Around Core Boundary] and Power Stripes [Across Core Boundary] are
added which satisfies the above conditions.
• Select Power → Power Planning → Add Rings to add Power rings ‗around Core Boundary‘.
Select the Nets from Browse option OR Directly type in the Global Net Names separated by a
space being Case and Spelling Sensitive.
• Select the Highest Metals marked ‗H‘ [Horizontal] for Top and Bottom and Metals marked ‗V‘
[Vertical] for Right and Bottom. This is because Highest metals have Highest Widths and thus
Lowest Resistance.
• Click on Update after the selection and ―Set Offset : Centre in Channel‖ in order to get the
Minimum Width and Minimum Spacing of the corresponding Metals and then Click ―OK‖.
• Similarly, Power Stripes are added using similar content to that of Power Rings.
On adding Power Stripes, The Power mesh setup is complete as shown. However, There are no
Vias that could connect Metal 9 or Metal 8 directly with Metal 1 [VDD or VSS of Standard Cells
are generally made up of Metal 1].
• The connection between the Highest and Lowest Metals is done through Stacking of Vias done
using ―Special Route‖.
• To perform Special Route, Select Route → Special Route → Add Nets → OK.
• After the Special Route is complete, all the Standard Cell Rows turn to the Color coded for Metal
1 as shown below.
The complete Power Planning process makes sure Every Standard Cell receives enough power to
operate smoothly.
→ Pre – Placement :
After Power Planning, a few Physical Cells are added namely, End Caps and Well Taps.
• End Caps : They are Physical Cells which are added to the Left and Right Core Boundaries acting
as blockages to avoid Standard Cells from moving out of boundary.
• Well Taps : They act like Shunt Resistance to avoid Latch Up effects.
To add End Caps, Select Place → Physical Cell → Add End Caps and ―Select‖ the FILL‘s from
the available list.
• Higher Fills have Higher Widths. As shown Below, The End Caps are added below your Power
Mesh.
To add Well Taps, Select Place → Physical Cell → Add Well Tap → Select →FillX [X → Strength
of Fill = 1,2,4 etc] → Distance Interval [Could be given in range of 30-45u] → OK
Placement
1. The Placement stage deals with Placing of Standard Cells as well as Pins.
2. Select Place → Place Standard Cell → Run Full Placement → Mode → Enable ‗Place I/O
Pins‘ → OK → OK .
All the Standard Cells and Pins are placed as per the communication between them, i.e., Two
communicating Cells are placed as close as possible so that shorter Net lengths can be used for
connections as Shorter Net Lengths enable Better Timing Results.
You can toggle the Layer Visibility from the list on the Right. The List of Layers available are
shown on the right under ―Layer‖ tab with colour coding.
Report Generation and Optimization :
1. Timing Report :
1. To generate Timing Report, Timing → Report Timing → Design Stage – PreCTS
2. Analysis Type – Setup → OK
3. The Timing report Summary can be seen on the Terminal.
2. Area Report :
1. cmd : report_area
3. Power Report :
1. cmd : report_power
In case of any Violating paths, the design could be optimized in the following way.
To optimize the Design, Select ECO → Optimize Design → Design Stage [PreCTS] →
Optimization Type – Setup → OK
After you run the optimization, the terminal displays the latest Timing report and updated area and
power reports can be checked.
• This step Optimizes your design in terms of Timing, Area and Power. You can Generate Timing,
Area, Power in similar way as above report Post – Optimization to compare the Reports.
Clock Tree Synthesis
• The CTS Stage is meant to build a Clock Distribution Network such that every Register (Flip
Flop) acquires Clock at the same time (Atleast Approximately) to keep them in proper
communication.
• A Script can be used to Build the Clock Tree as follows :
Routing :
1. All the net connections shown in the GUI till CTS are only based on the Logical connectivity.
2. These connections are to be replaced with real Metals avoiding Opens, Shorts, Signal Integrity
[Cross Talks], Antenna Violations etc.
3. To run Routing, Select Route → Nano Route → Route and enable Timing Driven and SI Driven
for Design Physical Efficiency and Reliability.
As an alternate to the setAnalysisMode command, you can use the GUI at Tools → Set Mode →
Set Analysis Mode → Select On-Chip-Variation and CPPR.
• The Report generation is same as shown prior to Design Optimization.
• The Technology Library is specific for PVS Tool and technology node on which the design is
created.
• On reading the tech lib, the rule set is loaded and the corresponding fabrication rules are read in
to be checked against the design.
• For example, in the above shown snapshot, the errors associated with N-Implant can be seen.
(Select a error occurrence and click on the right arrow below to highlight/zoom in the location.)
• You can save the DRC Run as a ―Preset‖ file to rerun the DRC if required at a later point of time.
• Saving/loading the Preset File is shown below.
• From the Innovus GUI, Select PVS → Run LVS to open the LVS run submission form.
Analog Design
Objective:
(a) Capture the Schematic of a CMOS Inverter with Load Capacitance of 0.1 pF and set the Widths
of Inverter with
(i) WN = WP
(ii) WN = 2 WP
(iii) WN = WP / 2
and Length at selected Technology. Carry out the following:
1. Set the Input Signal to a pulse with Rise Time, Fall Time of 1 ps and Pulse Width of 10 ns, Time
Period of 20 ns and plot the input voltage and output voltage of the designed Inverter
2. From the Simulation Results, compute tpHL, tpLH and tPD for all the three geometrical
settings of Width
3. Tabulate the results of delay and find the best geometry for minimum delay for CMOS Inverter
Solution:
(a) Schematic Capture of CMOS Inverter
Table – 1: Length and Width of NMOS and PMOS Transistors for the condition WN = WP
Table – 2: Length and Width of NMOS and PMOS Transistors for the condition WN = 2 * WP
Library Name Cell Name Comments / Properties
gpdk180 Nmos Width, WN = 850 n
Length, L = 180 n
gpdk180 Pmos Width, WP = 1.7 u
Length, L = 180 n
Table – 3: Length and Width of NMOS and PMOS Transistors for the condition WN = WP / 2
SYMBOL:
Test Circuit:
Library Name Cell Name Comments / Properties
analogLib Gnd
where, 𝑡𝑡𝑡𝑡
Delay. To → Low𝑡𝑡
calculate – 𝑡𝑡
High
and Propagation
𝑡𝑡𝑡𝑡, Delay and 𝑡𝑡𝑡𝑡 → High – Low Propagation
The value of ―Switching Potential‖ should be mentioned under ―Threshold Value 1‖ and
―Threshold Value 2‖.
Note:
What is Switching Potential?
Switching Potential is defined as the value of Input Voltage for which the Output
Voltage is equal to the Input Voltage.
The results of 𝑡𝑡𝑡𝑡, 𝑡𝑡𝑡𝑡 and 𝑡𝑡𝑡 for all the required geometrical settings are tabulated below
Width setting MOSFET Width tpHL tpLH tpd
PMOS 850n
Wn=Wp 3.233E-10 7.049E-10 5.141E-10
NMOS 850n
PMOS 850n
Wn=2Wp 3.337E-10 4.700E-10 4.019E-10
NMOS 1.7u
PMOS 425n
Wn=Wp/2 1.141E-9 3.154E-10 7.282E-10
NMOS 850n
Objective:
To draw the Layout of CMOS Inverter with 𝑡𝑡 = 40
using optimum Layout Methods. Verify for
𝑡𝑡 20
DRC and LVS, extract the Parasitics and perform the Post-Layout Simulations, compare the results
with Pre-Layout Simulations and record the observations.
Table - 4: Parameters for NMOS and PMOS Transistors
Library Name Cell Name Comments / Properties
Width, WN = 20u
gpdk180 Nmos
Length, L = 180 n
Width, WP = 40u
gpdk180 Pmos
Length, L = 180 n
Schematic:
Symbol:
Test Circuit:
Waveform:
MOSFETOF 𝑡𝑡𝑡𝑡Length
VALUES , 𝑡𝑡𝑡𝑡 AND 𝑡𝑡𝑡:Width tpHL tpLH tpd
PMOS 180n 40u
1.228E-10 3.550E-11 7.920E-11
NMOS 180n 20u
𝑡𝑡 𝑡𝑡
SCHEMATIC CAPTURE:
Table- 5: Width and Length of NMOS and PMOS Transistors for CMOS NOR Gate
Table-6 : Width and Length of NMOS and PMOS Transistors for CMOS NOR Gate with
Drive Strength “2”
Table-7: Width and Length of NMOS and PMOS Transistors for CMOS NOR Gate with
Drive Strength “4”
Schematic:
Symbol:
Test Schematic:
Launch ADE L, select ―Setup → Stimuli‖ as shown in Figure 2.6 to give the required sequence
of inputs to pins A and B.
Select ―Stimulus Type → Inputs‖ and the input pins A and B get listed out. Select any one of the
Inputs, click on ―Enabled‖ and select ―Function → bit‖. Mention the value of voltages for ―Logic 0‖ and
―Logic 1‖ in ―One value → 1.8‖ and ―Zero value → 0‖.
The “Setup Analog Stimuli” window pops up as shown in Figure – 2.7. Select “Stimulus Type
Inputs” and the input pins A and B get listed out as shown in Figure – 2.7. Select any one of
the Inputs, click on “Enabled” and select “Function bit”.
Mention the value of voltages for “Logic 0” and “Logic 1” in “One value as 1.8” and
“Zero value as 0”. Consider the values of Rise time, Fall time and Period similar to that
considered in Lab – 01.
Select “Source type = bit”, “Pattern Parameter data = 11001001”, “Pattern Parameter rptstart
= 1”, “Pattern Parameter rpttimes = 0” and “Trigger=Internal”, click on “Apply” to “Turn ON”
the input and click on “OK”. Select the type of Analysis to be performed on the 2 – input
CMOS NOR Gate. Select the Input and Output Signals to be plotted. Run the Simulation to
check for the functionality of the NOR Gate.
Table -8: Values of Delay for 2 – input CMOS NOR2X1, NOR2X2 and NOR 2X4
Objective:
Construct the schematic of the Boolean Expression Y= AB+CD+E using CMOS Logic.
Verify the functionality of the expression. Find out the delay td for some combination of input vectors.
Tabulate the results.
FUNCTIONAL SIMULATION:
The pull up and pull-down network consist of combination of transistor, where two or more
transistors in series are ON only if all of the series transistors are ON. Two or more transistors in
parallel are ON if any of the parallel transistors are ON. This is illustrated in Figure 2 for nMOS and
pMOS transistor pairs. By using combinations of these constructions, CMOS combinational gates can
be constructed. In general, when we join a pull-up network to a pull-down network to form a logic gate
as shown in Figure 1, they both will attempt to exert a logic level at the output. When both pull-up
and pull-down are OFF, the high impedance or floating Z output state results. This is of importance in
multiplexers, memory elements, and tristate bus drivers. The crowbarred (or contention) X level exists
when both pull-up and pull-down are simultaneously turned ON. Contention between the two networks
results in an indeterminate output level and dissipates static power. It is usually an unwanted condition.
Figure – 4.1: Schematic of Common Source Amplifier with PMOS Current Mirror Load
The symbol for the Common Source Amplifier with PMOS Current Mirror Load is shown in
Figure.4.2
Figure – 4.2: Symbol of Common Source Amplifier with PMOS Current Mirror Load
FUNCTIONAL SIMULATION:
Using the symbol created, build the Test Schematic. Create a New Cell View, instantiate the
symbol of Common Source Amplifier with PMOS Current Mirror Load, DC Voltage Source,
Current Source, AC Voltage Source, Capacitance, Resistance and Ground, connect the using
wires
Launch ADE L, import the design variables, mention the values and select the Transient
Analysis, DC Analysis and AC Analysis, mention the parameters and choose the signals to be
plotted as shown in Figure.
To measure the Gain and Unity Gain Bandwidth, go back to the ADE L window, select
―Results → Direct Plot → AC Magnitude & Phase‖ as shown in Figure – 4.7. The Test
Schematic window pops up, select the output net as shown in Figure – 3.8 and click
on ―Esc‖ key on the keyboard. The waveform can be seen as shown in Figure – 4.9. The marker
placed on the low frequency part of the response gives the DC Gain, use the bind key ―M‖ to place
the marker. Place a horizontal cursor at ―0 dB‖ and the crossing frequency gives the Unity Gain
Bandwidth (UGB) as shown in Figure.
Solution – (b):
LAYOUT:
Follow the techniques demonstrated in Lab – 01 to open the Layout Editor, import the devices
from the Schematic, place the devices as per the requirement and complete the routing. The
completed layout can be seen as shown in Figure 4.10
Figure – 4.10: Layout for Common Source Amplifier with PMOS Current Mirror Load
(b) Draw the layout of 2 – stage Operational Amplifier with the maximum transistor width set to 300
(in 180 / 90/ 45n m Technology), choose appropriate transistor geometries as per the results obtained
in 4(a). Use optimum layout methods. Verify DRC and LVS, extract the parasitics and perform the
post layout simulation, compare the results with pre layout simulations. Record the observations.
Figure 5.1 “Sideways option to flip the transistors Figure 5.1 (a) before and Figure 5.1(b) after
selecting sideways
The Transistors before and after flipping are shown in Figure – 5.1(a) and Figure – 5.1(b). The dimensions of
all the devices are given in Table – 11 as shown below.
The completed Schematic as per the dimensions mentioned in Table – 18 is shown in Figure –5.2.
The Symbol created according to the Techniques demonstrated in Lab – 01 is shown in Figure–
5.3.
analogLib Gnd
The Test Schematic after completion of all the interconnections can be seen as shown
in Figure – 5.4
Figure – 5.4: Test Schematic for 2 – Stage Operational Amplifier Schematic for 2
The ―Virtuoso ADE Explorer Editing‖ window pops up as shown in Figure – 5.8
The ―spectre1: Model Library Setup‖ Select the respective ―.scs‖ file and the process corner as
―tt‖. Click on ―OK‖.
Figure 5.10
To analyze the circuit through Transient Analysis and AC Analysis, select “Click to addanalysis” just below
the “Analyses” option in the “Setup” window as shown in Figure
Figure 5.11
The “Choosing Analyses – ADE Explorer” window pops up as shown in Figure – 5.12.
Select the “tran” for the “Transient Analysis” and “dc” for the “DC Analysis”.
The ADE Explorer window gets updated as shown in Figure – 5.13.
Mention the values for the Design Variables defined in the Schematic of the 2 – Stage Operational
Amplifier The defined values for the respective Design Variables are given in Table – 20. The Design
Variables along with the values in ADE Explorer window is shown in Figure – 5.13.
Figure 5.12
Figure 5.12
The ―Virtuoso Visualization & Analysis XL calculator‖ window pops up as shown in Figure – 5.15.
Select ―vt‖ as shown in Figure – 5.15. The Test Schematic pops up as shown in Figure – 5.16.
Select the output net ―OUT‖ from the Schematic and the Buffer window in the Calculator gets
updated as shown in Figure – 5.17.
Click on ―Send buffer expression to ADE Outputs‖ option to get the expression from the Buffer
Click on the ―Upward Arrow‖ just before the Test Circuit name in the Setup tab to invoke the
ADE Assembler as shown in Figure – 5.20. The ADE Assembler allows multiple tests to be
simulated on the same environment.
To verify the selected design for ―ac‖ test, right mouse click on the test and select ―Design‖ as shown
in Figure 5.24.
The ―Choose Design – ADE Assembler‖ window pops up as shown in Figure – 5.25.
Select the Library, Cell Name, ―View Name → Schematic‖ and click on ―OK‖.
Select all the tests related to ―ac‖ from the ―Outputs Setup‖ and delete them.
Select the ―ac‖ test from the ―Data View‖ window, expand, select ―Analyses‖ and remove
the―tran‖ and ―dc‖ analysis that were copied.The updated ADE Assembler window is shown in
Figure – 5.26.
Select ―Click to add analysis‖ option from the Analyses option to select the ―ac‖ analysis for the Test
Schematic. The parameters are shown in Figure – 5.27.Figure – 5.27: “ac” analysis Click on
―Apply‖, click on ―OK‖ to see the ADE Assembler updated as shown in Figure –4.28.
Figure 5.28
Expand the ―Design Variables‖, add ―vac‖ as the variable and ―100m‖ as its value by selecting the
―Click to add variable‖ option. The updated Design Variables are shown in Figure – 4.28.
Select ―vf‖ which accesses voltage over frequency and select the output net from the Test
Schematic. The updated Buffer can be seen in Figure – 4.30.
Figure 5.29
Figure 5.30
Figure – 5.30: Updated Buffer after “vf” and output net selection
Similarly, select the input net from the Test Schematic. The buffer and stack gets updated as
shown in Figure – 4.31.
Select ―dB20‖ from the Function Panel, the expression in buffer gets updated as shown in
Figure – 5.33.
This expression calculates the Gain in dB for the Amplifier. Click on ―Send buffer expression to
ADE Outputs‖. Rename the expression and the updated ADE Assembler can be seen as shown in
Figure – 5.34.
1%) of its final value in comparison with the initial value. This is calculated as follows:
Lower Bound = 99 % * (1.3 V – 0.7 V) + 0.7 V = 1.294 V
Upper Bound = 101 % * (1.3 V – 0.7 V) + 0.7 V = 1.306 V
Right Mouse click on X-axis properties, ―Independent Axis Properties for time‖ window
pops up as shown in Figure – 5.42.
Select the ―Scale‖ tab, select ―Mode → Manual‖, mention Axis Limits ―Minimum → 4.98us‖,
―Maximum → 5.04u s‖ and Divisions ―Minor → 10‖, ―Major → 30‖, click on ―OK‖ as shown in
Figure – 5.42. This will isolate the edges that are to be analyzed as shown in Figure– 5.43
Use left mouse click and drag and drop to combine the waveforms as shown in Figure – 5.45
Use the bind key ―M‖ to setup a Marker at the required time instance as shown in Figure –
5.45.
Figure – 5.45
Use the bind key ―H‖ to setup horizontal cursors at 1.294 V and 1.306 V as shown in Figure –
5.46.
Use the zooming options to zoom-in and zoom-out as and when required. Setup a marker on
the lower horizontal cursor as shown in Figure – 5.47.
After defining all the expressions, the ADE Assembler gets updated as shown in Figure – 5.62.
Figure – 5.62: Updated ADE Assembler with expressions
Go back to the ―Results‖ tab in the ―maestro‖ and click on ―Re-evaluates results using current
settings from the outputs setup table or with partial simulation data‖ option as shown in
Figure – 5.63 to re-simulate the expressions and evaluate the data.
Figure – 5.67: Sche7matic for Gain Margin and Phase Margin measurement
Dept of ECE, AIT 132
VLSI Design and Testing Lab BECL606
The ―iprobe‖ (available in ―analogLib‖) acts as a signal source for the stability analysis.
Create a Test Copy for the Stability Analysis as shown in Figure – 5.68.
Click on the ―downward arrow‖ just before the test name as shown in Figure 5.71 to go back to
the ADE Explorer.
134
Dept of ECE, AIT
VLSI Design and Testing Lab BECL606
135
Dept of ECE, AIT
VLSI Design and Testing Lab BECL606
Figure – 5.74: Direct Plot Form and Stability Summary with Gain Margin and Phase
Margin
LAYOUT:
Follow the techniques demonstrated in Lab – 01 to open the Layout Editor, import the devices
from the Schematic, place the devices as per the requirement and complete the routing. The
completed layout can be seen as shown in Figure 5.75.
LVS:
To check for the LVS violations, select ―Assura → Run LVS‖, verify the Schematic Design
Source and the Layout Design Source, mention a ―Run Name‖, select ―Technology → gpdk045‖
and click on ―OK‖ as demonstrated in EXP – 01.
QRC:
To extract the Parasitics, select ―Assura → Quantus‖, select ―Technology → gpdk180‖,
―Output → Extracted View‖ from the ―Setup‖ option, select ―Extraction Type → RC‖ and
―Ref Node → VSS‖ from the ―Extraction‖ and click on ―OK‖ as demonstrated in EXP – 01. The
result can be checked from the Library Manager.
BACKANNOTATION:
Import the parasitics into the Test Schematic and re-run the simulation to check their impact
by calculating the delay elements as demonstrated in EXP – 01.
136
Dept of ECE, AIT
VLSI Design and Testing Lab BECL606
3. In terminal type virtuoso to invoke Cadence tool. This opens a Cadence Design System
(CDS) window. This is also called a Log window.
4. Create a library:
In the next ―Technology File for New library‖ form, select option Attach to an existing
technology library and click OK.
In the ―Attach Design Library to Technology File‖ form, select gpdk180 from the
cyclic field and click OK.
137
Dept of ECE, AIT
VLSI Design and Testing Lab BECL606
138
VLSI Design and Testing Lab
BECL606
3. Click OK when done the above settings. A blank schematic window for the Inverter design
appears.
Note: If you place a component with the wrong parameter values, use the Edit— Properties— Objects
( or press q) command to change the parameters. Use the Edit— Move ( or press m) command if you
place components in the wrong location.
1. Click the Pin fixed menu icon in the schematic window. You can also execute Create — Pin
or press p. The Add pin form appears.
2. Type the following in the Add pin form in the exact order leaving space between the pin names.
3. Click OK in the Cellview From Cellview form. The Symbol Generation Form appears.
VLSI Design and Testing Lab
BECL606
7. Editing a Symbol
Move the cursor over the automatically generated symbol, until the green rectangle is
highlighted, click left to select it.
Click Delete icon in the symbol window, similarly select the red rectangle and delete that.
Execute Create – Shape – polygon, and draw a shape similar to triangle.
After creating the triangle press ESC key.
Execute Create – Shape – Circle to make a circle at the end of triangle.
VLSI Design and Testing Lab
BECL606
3. Click OK when done. A blank schematic window for the Inverter_Test design appears.
4. In schematic window, Create — Instance or by pressing Iadd the following components
Note: To rotate components press r. None of the components should be place inside the selection box.
VLSI Design and Testing Lab
BECL606
5. Click the Wire (narrow) icon or press w and wire your schematic.
6. Add output pin by pressing p and name it vout.
7. Click on the Check and Save icon to save the design.
8. The schematic should look like this.
9. Leave your Inverter_Test schematic window open for the next section
4. To complete the Model Library Setup, move the cursor and click OK.
d. For tpdr (rising edge delay) set edge type for signal1 as falling and for signal2 as rising.
Click on apply ok. Press on execute buffer. Note down delay value.
VLSI Design and Testing Lab
BECL606
Aim: Write a verilog code for UART and carry out the following:
• To Verify the Functionality using test Bench
• Synthesize Design using constraints
• Tabulate Reports using various Constraints
• Identify Critical Path and calculate Max Operating Frequency
Tool Required:
• Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
• Synthesis: Genus
Design Information and Bock Diagram:
The UART is ―Universal Asynchronous Receiver/Transmitter‖, and it is an inbuilt IC within a
micro-controller but not like a communication protocol (I2C & SPI). The main function of UART
is to serial data communication. In UART, the communication between two devices can be done
in two ways namely serial data communication and parallel data communication. The transmitter
section includes three blocks namely transmit hold register, shift register and also control logic.
Likewise, the receiver section includes a receive hold register, shift register, and control logic.
These two sections are commonly provided by a baud-rate-generator. This generator is used for
generating the speed when the transmitter section & receiver section has to transmit or receive the
data.
VLSI Design and Testing Lab
BECL606
module UART_TX
#(parameter CLKS_PER_BIT = 217)
(
input i_Clock,
input i_TX_DV,
input [7:0] i_TX_Byte,
output o_TX_Active,
output reg o_TX_Serial,
output o_TX_Done
);
parameter IDLE = 3'b000;
parameter TX_START_BIT = 3'b001;
parameter TX_DATA_BITS = 3'b010;
parameter TX_STOP_BIT = 3'b011;
parameter CLEANUP = 3'b100;
reg [2:0] r_SM_Main = 0;
reg [7:0] r_Clock_Count = 0;
reg [2:0] r_Bit_Index = 0;
reg [7:0] r_TX_Data = 0;
reg r_TX_Done = 0;
reg r_TX_Active = 0;
always @(posedge i_Clock)
begin
case (r_SM_Main)
IDLE :
begin
o_TX_Serial <= 1'b1; // Drive Line High for Idle
r_TX_Done <= 1'b0;
r_Clock_Count <= 0;
r_Bit_Index <= 0;
if (i_TX_DV == 1'b1)
begin
r_TX_Active <= 1'b1;
r_TX_Data <= i_TX_Byte;
r_SM_Main <= TX_START_BIT;
end
else
VLSI Design and Testing Lab
BECL606
endmodule // UART_RX
Test bench
// Main Testing:
initial
begin
// Tell UART to send a command (exercise TX)
@(posedge r_Clock);
VLSI Design and Testing Lab
BECL606
@(posedge r_Clock);
r_TX_DV <= 1'b1;
r_TX_Byte <= 8'h3F;
@(posedge r_Clock);
r_TX_DV <= 1'b0;
end endmodule