VLSI Lab Manual: Digital Design Guide
VLSI Lab Manual: Digital Design Guide
of ECE
(a) Simulation:
2. Open the folder and create two files by clicking on applications on Desktop --> accessories -->
text editor
5. OpenTest_name file, type the test bench program and save it andclose the folder.
KSSEM Page 1
21ECL66 - VLSI Lab Manual Dept. of ECE
7. In NC Launch window select both design and test bench file and click on “Launch Verilog
Compiler with current selection” icon and check for any syntax errors.
8. Expand Worklib, select only test bench and click “launch elaborator with current
selection” ICON.
9. Expand snapshots, select only test bench and click “launch simulator with current
selection” icon
KSSEM Page 2
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 3
21ECL66 - VLSI Lab Manual Dept. of ECE
10. Sim vision window opens. In Design Browser select test bench-> right click -
>send to waveform window -> click run icon. Verify the waveforms.
Performing Synthesis:
KSSEM Page 4
21ECL66 - VLSI Lab Manual Dept. of ECE
save the tcl file, close Terminal and open once again follow regular steps to invoke cadence tool
by givingcommands.
csh
source /home/install/cshrc
cadence tool appears. type "genus" and enter. It will invoke genus platform. Type following
source [Link] & press enter
GUI window opens and click on + symbol of layout tab. Select schematic and view the RTL
schematic
Verify Power, Area and Timing Reports which are automatically generated and stored in your
current working directory
KSSEM Page 5
21ECL66 - VLSI Lab Manual Dept. of ECE
PART A
ASIC DIGITAL DESIGN
KSSEM Page 6
21ECL66 - VLSI Lab Manual Dept. of ECE
`resetall
`timescale 1ns/1ns
module adder_4bit(a,b,c,sum,carry);
output [3:0]sum;
output carry;
input[3:0]a,b;
input c;
wire s1,s2,s3;
full_adder fa0 (a[0],b[0],c,sum[0], s1);
full_adder fa1 (a[1],b[1],s1,sum[1], s2);
full_adder fa2 (a[2],b[2],s2,sum[2], s3);
full_adder fa3 (a[3],b[3],s3,sum[3],carry);
endmodule
module full_adder(a,b,c,sum,carry);
input a,b,c;
output sum,carry;
assign sum = a^b^c;
assign carry = ((a&b)| (b&c)|(c&a));
endmodule
Adder-testbench Program:
`resetall
`timescale 1ns/1ns
module test_4_bit;
reg [3:0] a;
reg [3:0] b;
reg c;
wire [3:0] sum;
wire carry;
adder_4bit dut(a,b,c,sum,carry);
initial
begin
a = 4'b0011;b=4'b0011;c = 1'b0;
#10 a = 4'b1011;b=4'b0011;c = 1'b1;
KSSEM Page 7
21ECL66 - VLSI Lab Manual Dept. of ECE
Simulation Waveform:
KSSEM Page 8
21ECL66 - VLSI Lab Manual Dept. of ECE
Aim: To write a verilog code for 4bit Booth 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.
• In the above flowchart, initially, AC and Qn + 1 bits are set to 0, and the SC is a
sequence counter that represents the total bits set n, which is equal to the number of bits
KSSEM Page 9
21ECL66 - VLSI Lab Manual Dept. of ECE
in the multiplier. There are BR that represent the multiplicand bits, and QR represents
the multiplier bits.
• After that, we encountered two bits of the multiplier as Qn and Qn + 1, where Qn
represents the last bit of QR, and Qn + 1 represents the incremented bit of Qn by 1.
Suppose two bits of the multiplier is equal to 10; it means that we have to subtract the
multiplier from the partial product in the accumulator AC and then perform the arithmetic
shift operation (ashr).
• If the two of the multipliers equal to 01, it means we need to perform the addition of the
multiplicand to the partial product in accumulator AC and then perform the arithmetic
shift operation (ashr), including Qn + 1. The arithmetic shift operation is used in Booth's
algorithm to shift AC and QR bits to the right by one and remains the sign bit in AC
unchanged. And the sequence counter is continuously decremented till the computational
loop is repeated, equal to the number of bits (n).
Example: Multiply the two numbers 7 and 3 by using the Booth's multiplication
algorithm.
Ans. Here we have two numbers, 7 and 3. First of all, we need to convert 7 and 3 into binary
numbers like 7 = (0111) and 3 = (0011). Now set 7 (in binary 0111) as multiplicand (M) and 3
(in binary 0011) as a multiplier (Q). And SC (Sequence Count) represents the number of bits,
and here we have 4 bits, so set the SC = 4. Also, it shows the number of iteration cycles of the
booth's algorithms and then cycles run SC = SC - 1 time
The numerical example of the Booth's Multiplication Algorithm is 7 x 3 = 21 and the binary
representation of 21 is 10101. Here, we get the resultant in binary 00010101. Now we convert
it into decimal, as (000010101)10 = 2*4 + 2*3 + 2*2 + 2*1 + 2*0 => 21.
KSSEM Page 10
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 11
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 12
21ECL66 - VLSI Lab Manual Dept. of ECE
Waveform:
KSSEM Page 13
21ECL66 - VLSI Lab Manual Dept. of ECE
Aim: 32-Bit ALU Supporting 4-Logical and 4-Arithmetic operations, using case and if
statement for ALU Behavioral Modeling.
• Write Verilog Code
• Verify functionality using Test-bench
• Synthesize the design targeting suitable library and by setting area and timing
constraints
• Tabulate the Area, Power and Delay for the Synthesized netlist
• Identify Critical path
`resetall
`timescale 1ns/1ns
module alu_32bit1(y,a,b,f);
input [31:0]a;
input [31:0]b;
input [2:0]f;
output reg [31:0]y;
always@(*)
begin
case(f)
KSSEM Page 14
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 15
21ECL66 - VLSI Lab Manual Dept. of ECE
Simulation Waveform:
Aim: Write a Verilog code for Latch and Flip-flops (D, SR, JK), Synthesize the design
andcompare the synthesis report.
Theory: 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 if the
enable signal is asserted. In other words, when they are enabled, their content changes
KSSEM Page 16
21ECL66 - VLSI Lab Manual Dept. of ECE
`resetall
`timescale 1ns/1ns
module dlatch_test;
wire q;
reg e,d;
dlatch d1(e,d,q);
initial
begin
d=1’b0; e=1’b0;
#20 e=1’b1; d=1’b0;
#20 e=1’b1; d=1’b1;
KSSEM Page 17
21ECL66 - VLSI Lab Manual Dept. of ECE
Simulation Waveform:
KSSEM Page 18
21ECL66 - VLSI Lab Manual Dept. of ECE
else if(d == 0)
Q = 0;
end
endmodule
`resetall
`timescale 1ns/1ns
module test_dff;
reg d ,clk;
wire Q;
dff dut(d, clk, Q);
always
#10 clk = ~clk;
initial
begin
clk=1'b0;
#40 d=1'b1;
#40 d=1'b0;
#40 $finish;
end
endmodule
KSSEM Page 19
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 20
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 21
21ECL66 - VLSI Lab Manual Dept. of ECE
Simulation Waveform:
Synthesis Report:
@genus:root: 16> report_area
============================================================
Generated by: Genus(TM) Synthesis Solution 17.22-s017_1
Generated on: Nov 02 2021 [Link] pm
Module: srlatch
Operating conditions: slow (balanced_tree)
Wireload mode: enclosed
Area mode: timing library
============================================================
Instance Module Cell Count Cell Area Net Area Total Area Wireload
---------------------------------------------------------------------
srlatch 9 77.204 0.000 77.204 <none> (D)
KSSEM Page 22
21ECL66 - VLSI Lab Manual Dept. of ECE
(
d
)
S
R
F
l
i
p
-
F
l
o
p
D
e
sign:
`resetall
`timescale 1ns/1ns
module srff(S, R, clk, Q);
input S, R, clk;
output reg Q;
KSSEM Page 23
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 24
21ECL66 - VLSI Lab Manual Dept. of ECE
JK Latch Design:
`resetall
`timescale 1ns/1ns
module jkl(j, k, en, Q);
input j, k, en;
output reg Q;
always @(j or k or en)
begin
if(!en)
begin
Q = 1'bz;
end
else
begin
if(j == 1 && k == 0)
Q = 1;
else if(j == 0 && k == 1)
Q = 0;
else if(j == 1 && k == 1)
Q = ~Q;
else if(j== 0 && k == 0)
Q = Q;
end
end
KSSEM Page 25
21ECL66 - VLSI Lab Manual Dept. of ECE
endmodule
JK Latch testbench:
`resetall
`timescale 1ns/1ns
module test_jkl;
reg j, k , en;
wire Q;
jkl dut(j, k, en, Q);
initial
begin
en=1'b0; j=1'b1; k = 1'b0;
#40 en=1'b1; j=1'b1; k = 1'b0;
#40 en=1'b1; j=1'b0; k = 1'b0;
#40 en=1'b1; j=1'b0; k = 1'b1;
#40 en=1'b1; j=1'b1; k = 1'b1;
#40 en=1'b1; j=1'b1; k = 1'b1;
#40 $finish;
end
endmodule
KSSEM Page 26
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 27
21ECL66 - VLSI Lab Manual Dept. of ECE
JK Flip-Flop Design:
`resetall
`timescale 1ns/1ns
module jkff(j, k, clk, Q);
input j, k, clk;
output reg Q;
always @(posedge clk)
begin
if(j == 1 && k== 0)
Q = 1;
else if(j == 0 && k == 1)
Q = 0;
else if(j == 1 && k == 1)
Q = ~Q;
else if(j== 0 && k == 0)
Q = Q;
end
endmodule
JK flip-flop testbench:
`resetall
`timescale 1ns/1ns
module test_jkff;
reg j, k ,clk;
wire Q;
jkff dut(j, k, clk, Q);
always
#10 clk = ~clk;
initial
begi
n
clk=
1'b0;
#40 j=1'b1; k = 1'b0;
#40 j=1'b0; k = 1'b0;
#40 j=1'b0; k = 1'b1;
#40 j=1'b1; k = 1'b1;
#40 j=1'b1; k = 1'b1;
#40
KSSEM Page 28
21ECL66 - VLSI Lab Manual Dept. of ECE
$finish;
end
endmodule
Capture Launch
Clock Edge:+ 2000 0
Src Latency:+ 0 0
Net Latency:+ 0 (I) 0 (I)
Arrival:= 2000 0
Output Delay:- 1000
Uncertainty:- 10
Launch Clock:- 0
Data Path:- 537
Slack:= 453
Exceptions/Constraints:
output_delay 1000 constraints_jkff.sdc_line_9
# Timing Point Flags Arc Edge Cell Fanout Load Trans Delay ArrivalInstance
# (fF) (ps) (ps) (ps)
Location#
KSSEM Page 30
21ECL66 - VLSI Lab Manual Dept. of ECE
PART B
ANALOG DESIGN
A blank Schematic Editor window opens. In this window schematic has to be drawn using following
steps
KSSEM Page 31
21ECL66 - VLSI Lab Manual Dept. of ECE
c) After you complete the Add Instance form, move your cursor to schematic window and
left click to place a component.
d) After entering the components, click cancel in the Add Instance or press ESC.
e) Adding PINS to Schematic
f) Create pin or press “p”
g) The add pin form appears.
h) Type all the required pins along with input/output and place it on schematic window.
KSSEM Page 32
21ECL66 - VLSI Lab Manual Dept. of ECE
In the above form for library select your library created by you.
c) Click ok; a blank schematic window for test design appears.
Building the Test circuit
a) Draw the design test circuits according to the specification by adding symbol from your
library and Vpulse, Vdc , gnd from analog library.
b) Once design is completed click check and save icon.
To simulate the test design
a) Launch -->ADE L
b) Virtuoso ADE(Analog Design Environment) simulating window appears. Setup→Model
libraries → 180nm technology file should be ticked. Other files should be unticked.
Choosing Analyses
Transient Analysis:
a) Select Analyses --> choose
b) To setup the transient analysis, select tran.
c) Click at the moderate button and press apply.
d) Enter all the required specification and press ok.
DC analysis:
a) Select Analyses--> choose
b) To setup dc analysis, select dc.
c) In the DC analysis window, select save DC operating point.
d) Turn on the Component Parameter.
e) Click on the select component, which takes you to test schematic window.
f) Select input signal (ex: vpulse source in inverter_test).
g) Select DC from the appeared window
AC analysis:
a) Select Analyses-->choose
b) To setup ac analysis, select ac
c) Enter all the required specification and press ok.
Selecting outputs for plotting
a) Outputs --> To be plotted --> select on Schematic or click on setup output icon.
b) In the Select the required inputs and outputs from schematic.
KSSEM Page 33
21ECL66 - VLSI Lab Manual Dept. of ECE
1. Open schematic editor window and draw the schematic circuit of the specified experiment.
Save the circuit and select check and save icon.
2. If no errors in the circuit then select Launch -> Layout XL -> select create new and Automatic
in start up option window. In new file window set cell name as eg: inverter, View as Layout
and type should be Layout. Then select ok.
3. In Layout editor window select connectivity -> Generate -> All from sourceok.
4. Extend the PR boundary area by using stretch icon.
5. Place NMOS and PMOS transistor inside PR boundary and press shift f.
6. Select the NMOS/PMOS, Right click and select properties. In properties window select
parameter -> Body type -> Integrated/Detachable as per requirement.
7. Select place icon -> pin placement and select input parameters one by one eg (Vss, then Vdd,
then Vin etc ). Select attribute and select edge as a bottom for VSS and top for Vddand then
select apply. Later select HR rails. Whereas for other inputs select only the attributes as left
and outputs as right. No HR rails are selected for these parameters.
8. Select create -> Via, Via define and select -> M1-poly to connect metal to polysilicon for
inputs.
9. For Vdd and Vss connection select “p” from keyboard and select metal1 from the layer
window and connect. ( When narrow wire is required use “p” form keyboard else select create
-> wiring -> wire and then select required layer in layer window.
10. Design the layout of specified circuit and save the design.
11. For Simulation
a) Assura -> Technology->home/install/Foundary/Analog/180nm/assura_tech.lib
b) Select Assura ->Run DRC -> type file name as abc and select technology asgpdk180->ok.
c) If no errors then select Assura->Run LVS->type file name abcd and select technology as
KSSEM Page 34
21ECL66 - VLSI Lab Manual Dept. of ECE
KSSEM Page 35
21ECL66 - VLSI Lab Manual Dept. of ECE
1. CMOS INVERTER
Aim: 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 forCMOS Inverter
(i) Wn = Wp
KSSEM Page 36
21ECL66 - VLSI Lab Manual Dept. of ECE
(ii)Wn=2Wp:
(iii) Repeat the schematic, symbol, and test circuit for case Wn=Wp/2, by choosingWp=2µm
KSSEM Page 37
21ECL66 - VLSI Lab Manual
Dept. of ECE
Inverter_test Circuit:
Simulation settings:
set up for transient analysis:
KSSEM Page 38
21ECL66 - VLSI Lab Manual Dept. of ECE
• In the waveform window right click on input signal, send to calculator, in calculator window
copy the function of input signal and paste it in function panelusing delay function. Repeat the
same for output signal.
• Initialize the threshold of (VDC/2= 0.9)
• Edge no.1= 1 for signal1 and edge no. 1=2 for signal 2
• Edge type = rising for signal 1 and edge type =falling for signal 2
• Click ok --> click on Evaluate the Buffer and Display the results in a Table
• Note down 𝒕𝒑𝑯𝑳. Repeat the same for Edge type falling to raising and note down 𝒕𝒑𝑳𝑯.
KSSEM Page 39
21ECL66 - VLSI Lab Manual Dept. of ECE
INVERTER LAYOUT:
KSSEM Page 40
21ECL66 - VLSI Lab Manual Dept. of ECE
2. CMOS NAND
Aim: Capture the Schematic of 2-input CMOS NAND gate having similar delay as that of
CMOSinverter computed in experiment 1. Verify the functionality of NAND gate and find out
the delaytd for all four possible combinations of input vectors.
KSSEM Page 41
21ECL66 - VLSI Lab Manual Dept. of ECE
Fig: NAND_test
Simulation settings:
Forcing inputs:
Setup → stimuli → tick A and B inputs and give parameters such as one value as 1, zero value as
0, rise time 1ns, fall time 1ns, time period 20ns, delay as 0.
set up for transient analysis: Stop time = 200n
Output waveform:
KSSEM Page 42
21ECL66 - VLSI Lab Manual Dept. of ECE
NAND Layout:
KSSEM Page 43
21ECL66 - VLSI Lab Manual Dept. of ECE
Aim: Capture the Schematic of a Common Source Amplifier with PMOS Current Mirror Load and
find its Transient Response and AC Response. Measure the UGB and Amplification Factor by
varying transistor geometries, study the impact of variation in width to UGB.
• Draw the layout of Common Source Amplifier, 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.
SCHEMATIC CAPTURE:
• Following the techniques demonstrated in Lab – 01, Create a New Library using the
option “File → New → Library”, create a New Cell View upon selecting the newly created
library using the option “File → New → Cell View” and instantiate the required devices
using the “Create → Instance” option.
KSSEM Page 44
21ECL66 - VLSI Lab Manual Dept. of ECE
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.
Test Schematic for Common Source Amplifier with PMOS Current Mirror Load
KSSEM Page 45
21ECL66 - VLSI Lab Manual Dept. of ECE
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 below Figure.
KSSEM Page 46
21ECL66 - VLSI Lab Manual Dept. of ECE
Transient Analysis
AC Analysis
KSSEM Page 47
21ECL66 - VLSI Lab Manual Dept. of ECE
Layout:
KSSEM Page 48
21ECL66 - VLSI Lab Manual Dept. of
ECE
KSSEM Page 49