22scheme - VLSI Lab Manual
22scheme - VLSI Lab Manual
LABORATORY MANUAL
2023-2024
Semester VII
PSO1: To conceptualise, model, design, simulate, analyse, develop, test electronic and
communication systems and solve technical problems arising in the field of Electronics and
Communication Engineering.
Course objectives:
This laboratory course enables students to:
• Design, model, simulate and verify digital circuits.
• Perform ASIC design flow and understand the process of synthesis, synthesis constraints and
evaluating the synthesis reports to obtain optimum gate level netlist.
• Perform RTL-GDSII flow and understand the ASIC Design flow.
Course Outcomes
At the end of this course, students should be able to:
CO1 Design and simulate combinational and sequential digital circuits using
Verilog HDL
CO2 Understand the synthesis process of digital circuits using EDA tool.
CO3 Perform ASIC design flow and understand the process of synthesis,
synthesis constraints and evaluating the synthesis reports to obtain optimum
gate level netlist.
CO4 Design and simulate basic CMOS circuits like inverter, NOR gate and any
Boolean expression .
CO5 Perform RTL_GDSII flow and understand the stages in ASIC design
VLSI Design and Testing LAB
Effective from Academic year
SEMESTER-VI
Subject Code BECL606 CIE Marks 50
Credits – 1
Course Learning Objectives :
Syllabus:
Experiments
Use any VLSI design tools to carry out the experiments, use library files and
technology files below 180 nm.
12 De Design and characterize 6T binary SRAM cell and measure the following:
• Read Time, Write Time, SNM, Power
• Draw Layout of 6T SRAM, use optimum layout methods.
Verify for DRC & LVS, extract parasitic and perform post layout simulations,
compare the results with pre-layout simulations. Record the observations
Course Outcomes:
On the completion of this laboratory course, the students will be able to:
Design and Simulate combinational and sequential digital circuits using
Verilog HDL.
Perform ASIC Design flow and understand the process of Synthesis, Synthesis
constraints and evaluating the synthesis reports to obtain optimum gate level
netlist.
Design and simulate basic CMOS circuits like Inverter, Common Source Amplifier
and Differential Amplifiers.
Viva Questions
VLSI LABORATORY Manual BECL606
Programs-Part A
1
Dept of ECE
VLSI LABORATORY Manual BECL606
A full adder is a combinational circuit that performs the arithmetic sum of three input bits Ai, addend
Bi and carry in Cin from the previous adder. Its results contain the sum Si and the carry out, Cout 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.
2
Dept of ECE
VLSI LABORATORY Manual BECL606
3
Dept of ECE
VLSI LABORATORY Manual BECL606
Functional Simulation:
→ Invoke the cadence environment by type the below commands
✔ csh (Invokes C-Shell)
✔ source /home/install/cshrc (mention the path of the tools)
✔ (The path of cshrc could vary depending on the installation destination as
/home/install/ or /home etc.)
⮚ After this you can see the window like below
⮚Select Multiple Step and then select “Create cds.lib File” as shown in below figure
4
Dept of ECE
VLSI LABORATORY Manual BECL606
⮚ Click the cds.lib file and save the file by clicking on Save option
5
Dept of ECE
VLSI LABORATORY Manual BECL606
⮚ 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
6
Dept of ECE
VLSI LABORATORY Manual BECL606
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
Inputs: Supplied are Verilog design and test bench codes
Outputs: Compiled database created in mapped library if successful, generates report else error
reported in log file
7
Dept of ECE
VLSI LABORATORY Manual BECL606
Steps for compilation:
1. Create work/library directory (most of the latest simulation tools creates automatically)
2. Map the work to library created (most of the latest simulation tools creates automatically)
3. Run the compile command with compile options
i.e Cadence IES command for compile: ncverilog +access+rwc -compile fa.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
the output of elaboration which in turn goes for simulation.
⮚
After compilation it will come under the 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.
8
Dept of ECE
VLSI LABORATORY Manual BECL606
9
Dept of ECE
VLSI LABORATORY Manual BECL606
Step 3: Simulation: – Simulate with the given test vectors over a period of time to observe
the output behaviour.
Inputs: Compiled and Elaborated top level module name
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 option
10
Dept of ECE
VLSI LABORATORY Manual BECL606
b) Synthesize the design using Constraints and analyse reports, critical path
and Max Operating Frequency.
11
Dept of ECE
VLSI LABORATORY Manual BECL606
12
Dept of ECE
VLSI LABORATORY Manual BECL606
13
Dept of ECE
VLSI LABORATORY Manual BECL606
Aim: To write a verilog code for 4-Bit Shift and Add Multiplier 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.
Tool Required:
⮚ Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
⮚ Synthesis: Genus
Design Information and Flow Chart:
Binary multipliers are used for multiplication of 2 binary numbers and are used mainly in signal
processing and also in other computationally intensive applications. Shift and add binary multiplier
is a type of sequential multiplier. Sequential multipliers generate the partial products sequentially
and add each newly generated partial product to the previously accumulated sum. Shift and add
binary multiplier is a type of sequential multiplier.
14
Dept of ECE
VLSI LABORATORY Manual BECL606
Shift and add multiplier is similar to multiplication done by paper and pencil. This method adds
the multiplicand X to itself Y times, where Y denotes the multiplier In the case of binary
multiplication, since the digits are 0 and 1, if the multiplier digit is 1, a copy of the multiplicand is
placed in the proper positions; if the multiplier digit is 0, a number of 0 digits are placed. The 2n-
bit product register (A) is initialized to 0. A 2n-bit multiplicand register with the multiplicand
placed in the right half of the register and with 0 in the left half is used. The algorithm starts by
loading the multiplicand into the B register, loading the multiplier into the Q register, and
initializing the A register to 0. The counter N is initialized to n. The least significant bit of the
multiplier register (Q0) determines whether the multiplicand is added to the product register. The
left shift of the multiplicand has the effect of shifting the intermediate products to the left and right
shift prepares the next bit of the multiplier to examine in the following iteration.
15
Dept of ECE
VLSI LABORATORY Manual BECL606
16
Dept of ECE
VLSI LABORATORY Manual BECL606
17
Dept of ECE
VLSI LABORATORY Manual BECL606
19
Dept of ECE
VLSI LABORATORY Manual BECL606
20
Dept of ECE
VLSI LABORATORY Manual BECL606
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
Design Information and Bock Diagram:
The ALU will take in two 32-bit values, and control line. An Arithmetic unit does the
following task like addition subtraction, multi-fiction and logical operations. As the input is
given in 32 bit we get 32 bit output. The arithmetic will show only one output at a time so a
selector is necessary to select one of the operator.
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;
22
Dept of ECE
VLSI LABORATORY Manual BECL606
b=32'hFFFFFFFF;
#10 f=3'b000;
#10 f=3'b001;
#10 f=3'b010;
#10 f=3'b100;
end
initial
#50 $finish;
endmodule
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
//Creates readable Netlist File
15. write_sdc > uart_sdc.sdc
//Creates Block Level SDC
23
Dept of ECE
VLSI LABORATORY Manual BECL606
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.
24
Dept of ECE
VLSI LABORATORY Manual BECL606
Aim: Write a verilog code for Flip-flops (D, SR, JK), Synthesize the design and compare the
synthesis report.
Tool Required:
● Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
● Synthesis: Genus
Design Information and Bock Diagram:
Latches and flip-flops are the basic elements for storing information. One latch or flip-
flop can store one bit of information. The main difference between latches and flip-flops is that
for latches, their outputs are constantly affected by their inputs as long as the enable signal is
asserted.
In other words, when they are enabled, their content changes immediately when their
inputs change. Flip-flops, on the other hand, have their content change only either at the rising or
falling edge of the enable signal. This enable signal is usually the controlling clock signal. After
the rising or falling edge of the clock, the flip-flop content remains constant even if the input
changes.
There are basically four main types of latches and flip-flops: SR, D, and JK. The major
differences in these flip-flop types are the number of inputs they have and how they change state.
For each type, there are also different variations that enhance their operations.
25
Dept of ECE
VLSI LABORATORY Manual BECL606
26
Dept of ECE
VLSI LABORATORY Manual BECL606
27
Dept of ECE
VLSI LABORATORY Manual BECL606
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.
Aim: Write a verilog code for 4-bit Synchronous MOD-N counter with Asynchrounous reset,
verify the functionality using Test bench and Synthesize the design and compare the synthesis
report.
Tool Required:
● Functional Simulation: Incisive Simulator (ncvlog, ncelab, ncsim)
● Synthesis: Genus
MOD-N Counter
Counters are sequential logic devices that follow a predetermined sequence of counting states
triggered by an external clock (CLK) signal. The number of states or counting sequences through
which a particular counter advances before returning to its original first state is called the modulus
(MOD). In other words, the modulus (or modulo) is the number of states the counter counts and is
the dividing number of the counter.
Modulus Counters, or MOD counters, are defined based on the number of states that the counter
will sequence before returning to its original value.
For example, a 2-bit counter that counts from 002 to 112 in binary, 0 to 3 in decimal, has a
modulus value of 4 ( 00 → 1 → 10 → 11, and return to 00 ); therefore, be called a modulo-4, or
mod-4, counter. Note also that it has taken four clock pulses to get from 00 to 11.
In this example, there are only two bits ( n = 2 ) then the maximum number of possible output
states (maximum modulus) for the counter is 2n = 22 or 4. However, counters can be designed to
count to any 2n states in their sequence by cascading together multiple counting stages to produce
a single modulus or MOD-N counter.
Therefore, a "Mod-N" counter will require the "N" number of flip-flops connected to count a single
data bit while providing 2n different output states (n is the number of bits). Note that N is always
a whole integer value. Then we can see that MOD counters have a modulus value that is an integral
power of 2, that is, 2, 4, 8, 16 and so on to produce an n-bit counter depending on the number of
flip-flops used, and how they are connected, determining the type and modulus of the counter.
28
Dept of ECE
VLSI LABORATORY Manual BECL606
29
Dept of ECE
VLSI LABORATORY Manual BECL606
B) Synthesis and Report/Output Analysis
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)
10. syn_map
11. syn_opt//Performing Synthesis Mapping and Optimisation
12. report_timing -unconstrained > mod_n_counter_timing.rep
//Generates Timing report for worst datapath and dumps into file
//-unconstrained is to be given as no timing constraints are given
13. report_area > mod_n_counter_area.rep
//Generates Synthesis Area report and dumps into a file
14. report_power > mod_n_counter_power.rep
//Generates Power Report [Pre-Layout]
15. write_hdl >mod_n_counter_netlist.v //Creates readable Netlist File
16. write_sdc > mod_n_counter_output.sdc //Creates Block Level SDC
17. report_qor > mod_n_counter_qor.rpt // Critical slack path
Commands 1-11 are intended for Synthesis process while 12-17 for Generating reports
and Outputs.
30
Dept of ECE
VLSI LABORATORY Manual BECL606
Note 1:-
1. The Cells given in the netlist can be checked in the .lib files for their properties.
2. The Max Operating Frequency does not apply for Purely Combinational Circuit.
Note 2:-
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.
31
Dept of ECE
VLSI LABORATORY Manual BECL606
ANALOG EXPERIMENTS:
GENERAL NOTES
32
Dept of ECE
VLSI LABORATORY Manual BECL606
Type the command “csh” to initialize shell and source the “cshrc” file with the
command “source /home/install/cshrc”. “cshrc” file will provide the details of the
installation directory of the Cadence Tools.
33
Dept of ECE
VLSI LABORATORY Manual BECL606
INVOKING VIRTUOSO:
After sourcing the “cshrc” file, click on “Enter” on the keyboard. The welcome
screen with the text “Welcome to Cadence Tools Suite” can be seen as shown in
Figure - 5.
Invoke virtuoso using the command “virtuoso &” or “virtuoso” as shown in Figure
– 7 and click on “Enter” in the keyboard.
34
Dept of ECE
VLSI LABORATORY Manual BECL606
LAB – 01: CMOS INVERTER
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
CREATE A LIBRARY:
To create a New Library, select “Tools 🡪 Library Manager” from the top menu as
shown in Figure – 1.1.
35
Dept of ECE
VLSI LABORATORY Manual BECL606
36
Dept of ECE
VLSI LABORATORY Manual BECL606
A “New Library” window will show up as in Figure – 1.4. Name the Library (for eg:
VTU_LAB_MANUAL_180nm) and click on “OK”.
37
Dept of ECE
VLSI LABORATORY Manual BECL606
Select “Technology File..” tab that keeps blinking at the bottom of the screen as
shown in Figure – 1.5 to map the New Library to a technology node based on the
specification.
From the list of available Technology Libraries, select the respective Technology
Node as shown in Figure – 1.7 (for example: gpdk180) and click on “OK”.
38
Dept of ECE
VLSI LABORATORY Manual BECL606
The New Library can be verified from the Library Manager under “Library” column
as shown in Figure – 1.8.
39
Dept of ECE
VLSI LABORATORY Manual BECL606
40
Dept of ECE
VLSI LABORATORY Manual BECL606
Name the Cell and click on “OK”. A blank “Virtuoso Schematic Editor L Editing”
window can be seen as shown in Figure – 1.12.
41
Dept of ECE
VLSI LABORATORY Manual BECL606
Click on the drop down close to the Browse option as shown in Figure – 1.14. Select
the Technology Node from the list of libraries. Similarly, click on the drop down next
to Cell and select the required device from the list. For the CMOS Inverter circuit,
PMOS and NMOS transistors are required. The parameters for the devices as given
in the requirement are considered as in Table – 1, Table – 2 and Table – 3.
42
Dept of ECE
VLSI LABORATORY Manual BECL606
Make a left mouse click to place it on the Schematic Editor. The device after
placement on the Schematic Editor can be seen as shown in Figure – 1.16. Similarly,
other components can be instantiated.
43
Dept of ECE
VLSI LABORATORY Manual BECL606
44
Dept of ECE
VLSI LABORATORY Manual BECL606
Name the pins by separating them with “space”, choose its direction and click on
“Hide” as shown in Figure – 1.19(a) and Figure – 1.19(b).
Figure – 1.19(a): Naming the Input Pins Figure – 1.19(b): Naming the Output
Pins
45
Dept of ECE
VLSI LABORATORY Manual BECL606
Place the pins on the Schematic Editor using a left mouse click and the pins after
placement can be visualized as shown in Figure – 1.21.
Use the bind key “R” to rotate the pins and it can be done either before or after Pin
Placement. The direction of the pins before and after rotation are shown in Figure –
1.22.
46
Dept of ECE
VLSI LABORATORY Manual BECL606
Use the left mouse click to start / complete the wire from one terminal / pin to another.
The complete Schematic after connecting the pins and terminals for all the three
conditions WN = WP, WN = 2 * WP, WN = WP / 2 is shown in Figure – 1.25(a), 1.25(b)
and 1.25(c) respectively.
47
Dept of ECE
VLSI LABORATORY Manual BECL606
48
Dept of ECE
VLSI LABORATORY Manual BECL606
“Save” option saves the design as it is and “Check and Save” option checks for
discontinuities like floating net or terminal and provides the “error” or “warning”
messages accordingly and then saves the design. Sample message can be seen in the
“Command Interpreter Window” as shown in Figure – 1.27.
49
Dept of ECE
VLSI LABORATORY Manual BECL606
50
Dept of ECE
VLSI LABORATORY Manual BECL606
51
Dept of ECE
VLSI LABORATORY Manual BECL606
SYMBOL MODIFICATION:
The symbol can be modified using the drawing tools from the top menu as shown in
Figure – 1.32.
To modify the symbol, remove the inner rectangle (green), highlighted in Figure –
1.33(a). To remove the inner rectangle (green), place the mouse pointer within and
make a left mouse click to select the entire rectangle as shown in Figure – 1.33(b).
Click on ‘Delete’ in the keyboard to remove the rectangle as shown in Figure –
1.33(c).
52
Dept of ECE
VLSI LABORATORY Manual BECL606
Since the focus is to design an Inverter, to create a triangle, use the “Create Line”
option as shown in Figure – 1.32. Use the same procedure as “wiring the schematic”
to create the triangle.
To create a bubble, use “Create Circle” option as shown in Figure – 1.32, place the
mouse pointer
at the center between the ‘Triangle’ and the ‘Output Pin’, make a left mouse click and
expand the circle and make a left mouse click to fix its size as shown in Figure – 1.35.
Click on “Check and Save” option to ‘Save’ the symbol.
53
Dept of ECE
VLSI LABORATORY Manual BECL606
54
Dept of ECE
VLSI LABORATORY Manual BECL606
The remaining devices to be included on the Schematic and its properties are given
below in Table - 4.
The screenshot of the device properties for the instances vdc, vpulse, cap and gnd are
shown in Figure – 1.38, Figure – 1.39, Figure – 1.40 and Figure – 1.41. The complete
Test Schematic after wiring is shown in Figure – 1.42.
55
Dept of ECE
VLSI LABORATORY Manual BECL606
56
Dept of ECE
VLSI LABORATORY Manual BECL606
The complete circuit after instantiating all the devices and interconnections is shown
in Figure – 1.42.
57
Dept of ECE
VLSI LABORATORY Manual BECL606
To Label the nets, click on “L” in the keyboard. The “Create Wire Name” window
pops up as shown in Figure – 1.43. Name the nets, different net names can be
mentioned at the same instance of time by separating them with “Spaces”, same net
names can also be repeated as per the requirement and click on “Hide” as shown in
Figure – 1.44.
The “Wire Name before placement” can be seen in Figure – 1.45. The “Dot” just
under the wire name has to be placed over the “wire” and make a left mouse click to
fix it. The “Placed Wire Name” can be seen in Figure – 1.45.
The complete schematic after placing all the wire names is shown in Figure – 1.46.
“Check and Save” the Test Schematic.
58
Dept of ECE
VLSI LABORATORY Manual BECL606
59
Dept of ECE
VLSI LABORATORY Manual BECL606
Before running the simulation, check for the Simulator and Model Libraries.
SELECTING THE SIMULATOR:
To select the Simulator, click on “Setup 🡪 Simulator/Directory/Host” as shown in
Figure – 1.49.
60
Dept of ECE
VLSI LABORATORY Manual BECL606
61
Dept of ECE
VLSI LABORATORY Manual BECL606
Select the respective “.scs” file and make a double click under “Section” to select the
processing corner of interest using a Left Mouse Click on the drop down and click on
“OK” as shown in Figure – 1.53.
62
Dept of ECE
VLSI LABORATORY Manual BECL606
TRANSIENT ANALYSIS:
To set up a “Transient Analysis”, select “tran”, mention the “Stop Time” (for
example: 100n), select “Accuracy Defaults” (for example: moderate), click on
“Apply” and click on “OK” as shown in Figure – 1.56.
63
Dept of ECE
VLSI LABORATORY Manual BECL606
The selected analysis and the arguments can be seen under the “Analyses” tab in the
ADE L window as shown in Figure – 1.57.
DC ANALYSIS:
To set up a “DC Analysis”, select “dc” and enable “Save DC Operating Point” as
shown in Figure – 1.58.
64
Dept of ECE
VLSI LABORATORY Manual BECL606
65
Dept of ECE
VLSI LABORATORY Manual BECL606
Select “DC Voltage” from the list of parameters as shown in the “Select Component
Parameter” window and click on “OK” as shown in Figure – 1.61.
From the “Sweep Range” option, select “Start-Stop” and mention the “Start” value
as “0” and “Stop” value as “1.8”, click on “Apply” and click on “OK” as shown in
the Figure – 1.62.
66
Dept of ECE
VLSI LABORATORY Manual BECL606
67
Dept of ECE
VLSI LABORATORY Manual BECL606
The “Outputs” column in the “ADE L” window will be updated as shown in Figure
– 1.68.
68
Dept of ECE
VLSI LABORATORY Manual BECL606
69
Dept of ECE
VLSI LABORATORY Manual BECL606
70
Dept of ECE
VLSI LABORATORY Manual BECL606
The “Saving State – ADE L” window pops up. Select the “Save State Option 🡪
Cellview” and click on “OK” as shown in Figure – 1.73.
71
Dept of ECE
VLSI LABORATORY Manual BECL606
72
Dept of ECE
VLSI LABORATORY Manual BECL606
The “Loading State – ADE L” window pops up. Select the “Load State Option 🡪
Cellview” and click on “OK” as shown in Figure – 1.76.
73
Dept of ECE
VLSI LABORATORY Manual BECL606
74
Dept of ECE
VLSI LABORATORY Manual BECL606
Place the cursor in “Signal 1”, select the signal “IN” from the waveform window as
shown in Figure – 1.82.
75
Dept of ECE
VLSI LABORATORY Manual BECL606
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.
How to obtain the value of Switching Potential?
To obtain the Switching Potential, use the “intersect” option from the
Function Panel, select the “Signal 1” and “Signal 2” from the DC Analysis
waveform window, click on “Apply”, click on “OK” and click on “Evaluate
the buffer and display the results in a table” icon as shown in Figure – 1.83
to obtain the value.
Select “Edge Number 1” and “Edge Number 2” as “2” (for example). Select “Edge
Type 1 🡪 falling” and “Edge Type 2 🡪 rising” to obtain the value of “tpLH” and
“Edge Type 1 🡪 rising” and “Edge Type 2 🡪 falling” to obtain the value of “tpHL”.
After the above mentioned selections, click on “Apply” and click on “OK” to see the
“Buffer” window in the calculator getting updated as shown in Figure – 1.84.
76
Dept of ECE
VLSI LABORATORY Manual BECL606
77
Dept of ECE
VLSI LABORATORY Manual BECL606
• 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
78
Dept of ECE
VLSI LABORATORY Manual BECL606
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.
79
Dept of ECE
VLSI LABORATORY Manual BECL606
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
80
Dept of ECE
VLSI LABORATORY Manual BECL606
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 :
81
Dept of ECE
VLSI LABORATORY Manual BECL606
82
Dept of ECE
VLSI LABORATORY Manual BECL606
83
Dept of ECE
VLSI LABORATORY Manual BECL606
84
Dept of ECE
VLSI LABORATORY Manual BECL606
Additional Experiments -1
DIFFERENTIAL AMPLIFIER
Objective: To design a single stage Differential Amplifier with given specifications and
verifying the following
1. Schematic:
i) DC Analysis ii) AC Analysis iii) Transient Analysis
2. Layout:
i) DRC ii) LVS iii) RCX
Design:
Specification:
85
Dept of ECE
VLSI LABORATORY Manual BECL606
Analysis Values
Transient Stop time = 5ms
DC Start time = -5, stop time = 5.
AC Start time= 100,stop time=
100M,points per decade = 20
86
Dept of ECE
VLSI LABORATORY Manual BECL606
87
Dept of ECE
VLSI LABORATORY Manual BECL606
Additional Experiment 2
Aim: To compile and to simulate the Verilog code for the successive approximation register.
Design Files:
I Main Design Module: sar.v
module sar (digitalout,done,comp,start,reset,clk);
output [3:0] digitalout;
output done;
input clk, start, reset, comp;
reg [3:0]ring_count;
reg [3:0]digital;
wire D4,set0,set1,set2,set3;
assign D4 = ring_count[0];
assign done = !D4;
always @(posedge clk or negedge reset)
begin
if (~reset)
ring_count <= 4'b1000;
else
begin
if (start)
ring_count <= 4'b1000;
else
ring_count <= (ring_count>>1);
end
end
assign set3 = ring_count[3];
assign set2 = ring_count[2];
assign set1 = ring_count[1];
assign set0 = ring_count[0];
always @(posedge clk or negedge reset)
88
Dept of ECE
VLSI LABORATORY Manual BECL606
begin
if(~reset)
digital[3] <= 1'b1;
else
if(start)
digital[3] <= 1'b1;
else if(set3)
digital[3] <= comp;
end
always @(posedge clk or negedge reset)
begin
if(~reset)
digital[2] <=
1'b1; else
if(start)
digital[2] <= 1'b1;
else if(set2)
digital[2] <= comp;
end
always @(posedge clk or negedge reset)
begin
if(~reset)
digital[1] <=
1'b1; else
if(start)
digital[1] <= 1'b1;
else if(set1)
digital[1] <= comp;
end
always @(posedge clk or negedge reset)
89
Dept of ECE
VLSI LABORATORY Manual BECL606
begin
if(~reset)
digital[0] <= 1'b1;
else
if(start)
digital[0] <= 1'b1;
else if(set0)
digital[0] <= comp;
end
assign digitalout = (digital) | (ring_count);
endmodule
II Sub Design Module: dac.v
module dac (comp,sar_out,vref_d,vin_d,clk,start);
output comp;
input clk,start;
input [3:0]sar_out;
input [63:0]vref_d;
input [63:0]vin_d;
reg comp;
real v_dac,vref,vin;
always @ (vin_d or start)
begin
vref = $bitstoreal(vref_d);
vin = $bitstoreal(vin_d);
end
always @*
begin
if(start)
comp = 1'b0;
else
90
Dept of ECE
VLSI LABORATORY Manual BECL606
begin
v_dac = (vref/15)*(sar_out);
if (vin<v_dac)
comp = 1'b0;
else
comp = 1'b1;
end
end
endmodule
III Test Bench Module: sar_tb.v
module sar_tb;
reg clk,reset,start;
reg [63:0] vref_d,vin_d;
wire done, comp;
wire [3:0] digitalout;
real vref_real = 7.5;
sar s1 (digitalout,done,comp,start,reset,clk);
dac d1
(comp,digitalout,vref_d,vin_d,clk,start); initial
begin
clk = 1'b1;
start = 1'b1;
#4000 $finish;
end
always #10 clk = ~clk;
initial
begin
#1;reset = 1'b1;
#10; reset = 1'b0;
#1; reset = 1'b1;
91
Dept of ECE
VLSI LABORATORY Manual BECL606
end
initial
begin
#10 ;
stimulus (0.0,0.5,vref_real,8'd5);
end
task stimulus (input analog, input step, input reference, input [7:0]delay);
real analog,step;
real reference;
begin
while(analog <= reference)
begin
repeat(delay)
@(posedge clk);
start <= 1'b0;
vref_d = $realtobits (reference);
vin_d = $realtobits (analog);
@(posedge done)
analog = analog + step;
@(posedge clk);
start <= 1'b1;
end
end
endtask
endmodule
92
Dept of ECE
VLSI LABORATORY Manual BECL606
VIVA Questions:
1. Why don’t we use just one NMOS or PMOS transistor as a transmission gate?
2. What are set up time & hold time constraints? What do they signify?
3. Explain Clock Skew?
4. Why is NAND gate preferred over NOR gate for fabrication?
5. What is Body Effect?
6. Why is the substrate in NMOS connected to Ground and in PMOS to VDD?
7. What is the fundamental difference between a MOSFET and BJT?
8. Why PMOS and NMOS are sized equally in a Transmission Gates?
9. What happens when the PMOS and NMOS are interchanged with one another in an
inverter?
10. Why are pMOS transistor networks generally used to produce high signals, while nMOS
networks are used to product low signals?
11. What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you
avoid Latch Up?
93
Dept of ECE