CMOS VLSI Lab Record 26082025
CMOS VLSI Lab Record 26082025
LABORATORY
Department
Of
Deemed to be university,
SEPTEMBER 2025
NATIONAL INSTITUTE OF TECHNICAL TEACHERS TRAINING
AND RESEARCH
Deemed to be university,
Taramani, Chennai.
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
Dr. P. Sivashankar Ph.D. Dr. P. Sivashankar Ph.D.
HEAD OF THE DEPARTMENT SUPERVISOR
Department of Electronics and Department of Electronics and
Communication Engineering, Communication Engineering,
National Institute of Technical National Institute of Technical
Teachers Training and Teachers Training and
Research (Ministry of Research (Ministry of
Education, Government of Education, Government of
India) India)
Taramani, Chennai. Taramani, Chennai
Expt. Page
Date Title of the Experiment Signature
No. No.
Part I: Module Design and Simulation using SPICE simulator
Design of Common Source
1. 11
Amplifier
Design of Cascade and Cascode
2. 15
amplifiers
3. Design of current Mirrors 23
Design of differential pair amplifier
4. 27
with active load
Design of telescopic amplifier
5. 31
circuit
Design of two-stage amplifier
6. 35
circuit
Part II: Module Design using FPGA Implementation (Verilog/VHDL)
1. Adders and Subtractors 43
2. Multiplier (8-bit) 49
3. ALU circuit 53
4. Flip-flops 59
5. Universal Shift Registers 69
Asynchronous and synchronous
6. 77
Counters
Finite State Machine
7. 87
(Moore/Mealy) and its applications
8. Memories1: Any microcontroller 93
5
6
Part I: Module Design and
Simulation using SPICE simulator
7
8
9
Experiment 1: Common Source Amplifier
Circuit Diagram
10
Date:
Common Source Amplifier
Exp No: 01
Aim:
Theory:
Circuit Used :
1. Supply: VCC = 30 V
2. JFET: 2N5458/2N3458
3. Drain Resistor: R1 = 2.2 kΩ
4. Source Resistor: R2 = 10 kΩ (bypassed by C3 = 10 µF)
5. Gate Bias Divider: R3 = 2 MΩ, R4 = 1 MΩ
6. Input Coupling Capacitor: C2 = 10 µF, Vin = 120 mVrms, 60 Hz
7. Output Coupling Capacitor: C1 = 10 µF
11
Output Waveform
12
Procedure:
1. Draw the circuit schematic in the SPICE simulator with the given
values.
2. Run DC operating point (.op) analysis to obtain ID, VD, VS, and VG.
3. Run transient simulation with sinusoidal input and observe the
outputwaveform.
4. Measure input and output amplitudes and calculate voltage gain.
5. Run AC sweep analysis to obtain frequency response and identify
midband gain, low-frequency cutoff (fL), and high-frequency roll-off.
6. Repeat the experiment with and without the bypass capacitor (C3) and
compare gains.
Result :
13
Experiment 2: Cascade Amplifier
Circuit Diagram
14
Date:
Cascade Amplifier
Exp No: 02(a)
Aim:
Theory:
Circuit Used:
1. Supply: VCC = 30 V
2. Transistors: 2N5458/2N3458 JFETs (Q1, Q2)
Stage 1:
- Drain Resistor R1 = 2.2 kΩ
- Source Resistor R4 = 10 kΩ (bypassed by C3 = 10 µF)
- Gate Bias: R5 = 100 kΩ, R6 = 10 kΩ
- Coupling Capacitors: C1 = 10 µF, C4 = 10 µF
15
Output Waveform
16
Stage 2:
- Drain Resistor R2 = 2.2 kΩ, Load Resistor R9 = 2.2 kΩ
- Source Resistor R3 = 10 kΩ (bypassed by C2 = 10 µF)
- Gate Bias: R7 = 100 kΩ, R8 = 10 kΩ
- Output Coupling Capacitor: C5 = 10 µF
3. Input: Vin = 5 mVrms, 60 Hz sinusoidal
Procedure:
1. Draw the cascade amplifier circuit in the SPICE simulator with given
component values.
2. Run DC operating point analysis to ensure both stages are properly
biased.
3. Apply a sinusoidal input (5 mVrms, 60 Hz) and perform transient
simulation.
4. Measure the input and final output waveforms using the oscilloscope.
5. Calculate the overall voltage gain (Av = Vout/Vin).
6. Run AC sweep analysis to plot frequency response and compare it with
single-stage amplifier.
7. Observe the phase shift: two stages result in ~360° (in-phase with
input).
8. Note the effect of bypass capacitors (C2, C3) on gain improvement.
Result:
The cascade amplifier was successfully simulated, and the output gain
was higher than a single stage, in-phase with the input.
17
Experiment 2: Cascode Amplifier
Circuit Diagram
18
Date:
Cascode Amplifier
Exp No: 02(b)
Aim:
Theory:
Advantages:
• High voltage gain (product of gm and high Rout).
• Higher bandwidth due to reduced Miller effect.
• Better input-output isolation.
Circuit Used:
1. Supply: VCC = 30 V
2. Transistors: BFW11 (Q3, Q4)
3. Drain Load: R2 = 3.9 kΩ
4. Source Resistor: R1 = 330 Ω (bypassed by C2 = 1 µF)
5. Bias Network: R3 = 30 kΩ, R4 = 10 kΩ, R5 = 10 MΩ
6. Coupling Capacitors: C1 = 1 µF, C2 = 1 µF
7. Input: Small AC signal source (few mV amplitude, sinusoidal)
8. Output: Taken at drain of Q3 through oscilloscope
19
Output Waveform
20
Procedure:
1. Draw the cascode amplifier circuit in the SPICE simulator using given
values.
2. Run DC operating point analysis to verify bias voltages of Q3 and Q4.
3. Apply a small sinusoidal input and run transient simulation.
4. Observe input and output waveforms using the oscilloscope.
5. Measure input and output amplitudes; calculate voltage gain Av =
Vout/Vin.
6. Perform AC sweep analysis to determine midband gain and bandwidth
improvement.
7. Compare results with single common-source amplifier to highlight
advantages of cascode configuration.
Result:
21
Experiment 3: Current Mirrors
Circuit Diagram
22
Date:
Current Mirrors
Exp No: 03
Aim:
Theory:
Working principle:
Key Features:
Circuit Used:
Supply: VCC = 12 V
Transistors: MOSFETs with W/L = 100 µm/100 µm (Q1, Q2, Q3)
Resistors: R1 = 2 kΩ (reference branch), R2 = 500 Ω (output branch), R3
= 1 kΩ (output branch)
23
Output Waveform
24
Connections:
• Q2 is diode-connected to generate reference current (Iref).
• Q1 and Q3 replicate the reference current to their drains.
Measurement: Multimeters connected to measure Iref and mirrored
currents.
Procedure:
Result:
The current mirror was successfully simulated, and the output currents
matched the reference current
25
Experiment 5: Differential Amplifier with Active Load
Circuit Diagram
26
Date:
Differential Amplifier with Active Load
Exp No: 04
Aim:
Theory:
Key Parameters:
Circuit Used:
Supply: VCC = +15 V, VSS = -15 V
Transistors:
• Input Pair: Q1 (2N3702), Q2 (2N2222A)
• Current Mirror Load: Q7, Q8 (2N3702, 2N2222A)
• Current Source: Q3, Q4, Q5, Q6 (MOSFETs, W/L = 100 µm/100 µm)
Inputs: V1 = 50 mVrms, 60 Hz; V2 = 50 mVrms, 180° phase shifted
Load Resistor: R1 = 500 Ω
Output: Taken at collector of Q2 through oscilloscope.
27
Output Waveform
28
Procedure:
Result:
Circuit Diagram
30
Date:
Telescopic Amplifier Circuit
Exp No: 05
Aim:
Theory:
Advantages:
• High DC gain due to large output resistance.
• Low noise compared to multi-stage op-amps.
• Better linearity and improved CMRR.
Limitations:
• Limited output voltage swing due to stacked transistors.
• Requires higher supply voltage for proper operation.
Circuit Used:
31
Output Waveform
32
Procedure:
Result:
33
Experiment 6: Two-Stage Amplifier
Circuit Diagram:
34
Date:
Two-Stage Amplifier Circuit
Exp No: 06
Aim:
To design and simulate a two-stage amplifier using SPICE and study its
overall gain, phase response, and frequency response compared to a
single-stage amplifier.
Theory:
Advantages:
• Higher overall gain than a single stage.
• Better signal amplification for low-level inputs.
Circuit Used:
Supply: VCC = 30 V
Transistors: Q1, Q2 = 2N3458 (JFET)
Stage 1:
- Drain Resistor: R1 = 2.2 kΩ
- Source Resistor: R4 = 10 kΩ (bypassed by C3 = 10 µF)
- Gate Bias: R5 = 100 kΩ, R6 = 10 kΩ
- Input Coupling Capacitor: C4 = 10 µF
35
Output Waveform:
36
Stage 2:
- Drain Resistor: R2 = 2.2 kΩ, Load Resistor R9 = 2.2 kΩ
- Source Resistor: R3 = 10 kΩ (bypassed by C2 = 10 µF)
- Gate Bias: R7 = 100 kΩ, R8 = 10 kΩ
- Interstage & Output Coupling Capacitors: C1 = 10 µF, C5 = 10 µF
Input: Vin = 5 mVrms, 60 Hz sinusoidal
Output: Taken across load resistor R9 through oscilloscope
Procedure:
Result:
39
40
41
Experiment 1:
module AdderSubtractor (
input [3:0] A, // First operand
input [3:0] B, // Second operand
input op, // Operation: 0 = Add, 1 = Subtract
output reg [4:0] Result // 5-bit result (to include carry/borrow)
);
endmodule
42
Date:
Adders and Subtractors
Exp No: 01
Aim:
Theory:
Procedure:
43
Verilog Testbench: Adder/Subtractor
module test_add_sub_v;
// Inputs
reg [3:0] A;
reg [3:0] B;
reg op;
// Outputs
wire [4:0] Result;
initial begin
// Initialize Inputs
A = 0; B = 0; op = 0;
endmodule
44
45
Simulation output: Adder/Subtractor
46
Result
47
Experiment 2:
module Multiplier8bit (
input [7:0] A, // First 8-bit operand
input [7:0] B, // Second 8-bit operand
output reg [15:0] OUT // 16-bit product
);
always @(*) begin
OUT = A * B; // Multiply A and B
end
endmodule
Verilog Testbench:
module test_multiplier_v;
// Inputs
reg [7:0] A;
reg [7:0] B;
// Outputs
wire [15:0] OUT;
// UUT
Multiplier8bit uut (
.A(A),
.B(B),
.OUT(OUT)
);
initial begin
// Initialize inputs
A = 0; B = 0;
48
Date:
Multiplier (8-bit)
Exp No: 02
Aim
Theory
Procedure
49
Simulation output: Multiplier
50
Result
51
Experiment 3:
module ALU8bit (
input [7:0] A, B, // 8-bit inputs
input [3:0] control, // 4-bit control signal
output reg [7:0] result, // 8-bit output
output reg ov // carry/borrow/overflow flag for ADD/SUB
);
always @(*) begin
// Safe defaults to avoid inferred latches
result = 8'b0;
ov = 1'b0;
case (control)
4'b0000: begin // ADD (unsigned)
{ov, result} = {1'b0, A} + {1'b0, B}; // ov = carry-out
end
4'b0001: begin // SUB (unsigned)
{ov, result} = {1'b0, A} - {1'b0, B}; // ov = borrow-out
end
4'b0010: result = A & B; // AND
4'b0011: result = A | B; // OR
4'b0100: result = A << 1; // Shift left A by 1
4'b0101: result = A >> 1; // Shift right A by 1
default: result = 8'b00000000;
endcase
end
endmodule
52
Date:
ALU circuit
Exp No: 03
Aim:
To design and simulate an 8-bit ALU using Verilog HDL and verify its
arithmetic, logic, and shift operations.
Theory:
Procedure:
53
Verilog Tesbench: ALU circuit
module tb_ALU8bit;
reg [7:0] A, B;
reg [3:0] control;
wire [7:0] result;
wire ov;
initial begin
$display("time A B ctrl result ov");
$monitor("%4t %3d %3d %b %3d %b",
$time, A, B, control, result, ov);
// Addition
A = 8'd10; B = 8'd5; control = 4'b0000; #10; // result=15, ov=0
A = 8'd250;B = 8'd10; control = 4'b0000; #10; // result=4, ov=1
(carry)
// Subtraction
A = 8'd10; B = 8'd5; control = 4'b0001; #10; // result=5, ov=0 (no
borrow)
A = 8'd5; B = 8'd10; control = 4'b0001; #10; // result=251, ov=1
(borrow)
// Logic ops
A = 8'b10101010; B = 8'b11001100; control = 4'b0010; #10; //
AND
control = 4'b0011; #10; // OR
// Shifts
A = 8'b00010110; control = 4'b0100; #10; // A<<1
control = 4'b0101; #10; // A>>1
$finish;
end
endmodule
54
55
Simulation output: ALU circuit
56
Result
The 8-bit ALU design was successfully simulated and verified using
Verilog HDL.
57
Experiment 4: Flip flops
i) JK Flip-Flop
Verilog Code:
module jk_ff (
input clk,
input reset,
input J,
input K,
output reg Q
);
always @(posedge clk or posedge reset) begin
if (reset)
Q <= 0;
else begin
case ({J, K})
2'b00: Q <= Q; // Hold
2'b01: Q <= 0; // Reset
2'b10: Q <= 1; // Set
2'b11: Q <= ~Q; // Toggle
endcase
end
end
endmodule
58
Date:
Flip-flops
Exp No: 04
Aim
To design and simulate JK, D, and T Flip-Flops using Verilog HDL and
verify their operation through simulation.
Theory
Procedure
59
i) JK Flip-Flop
Verilog Tesbench:
`timescale 1ns/1ps
module tb_jk_ff;
reg clk, reset, J, K;
wire Q;
// UUT
jk_ff uut (.clk(clk), .reset(reset), .J(J), .K(K), .Q(Q));
// Clock
initial begin clk = 0; forever #5 clk = ~clk; end
// Stimulus
initial begin
reset = 1; J = 0; K = 0; #12; reset = 0;
60
61
ii) D Flip-Flop
Verilog Code:
module d_ff (
input clk,
input reset,
input D,
output reg Q
);
always @(posedge clk or posedge reset) begin
if (reset)
Q <= 0;
else
Q <= D;
end
endmodule
Verilog Teshbench:
`timescale 1ns/1ps
module tb_d_ff;
reg clk, reset, D;
wire Q;
// UUT
d_ff uut (.clk(clk), .reset(reset), .D(D), .Q(Q));
// Clock
initial begin clk = 0; forever #5 clk = ~clk; end
// Stimulus
initial begin
reset = 1; D = 0; #12; reset = 0;
#10 D=0;
#10 D=1;
#10 D=0;
#10 D=1;
#10 D=1;
#10 D=0;
#10 $stop;
end
endmodule
62
63
iii) T Flip-Flop
Verilog Code:
module t_ff (
input clk,
input reset,
input T,
output reg Q
);
always @(posedge clk or posedge reset) begin
if (reset)
Q <= 0;
else if (T)
Q <= ~Q; // Toggle
else
Q <= Q; // Hold
end
endmodule
Verilog Testbench:
`timescale 1ns/1ps
module tb_t_ff;
reg clk, reset, T;
wire Q;
// UUT
t_ff uut (.clk(clk), .reset(reset), .T(T), .Q(Q));
// Clock
initial begin clk = 0; forever #5 clk = ~clk; end
// Stimulus
initial begin
reset = 1; T = 0; #12; reset = 0;
#10 T=0; // Hold
#10 T=1; // Toggle
#10 T=1; // Toggle
#10 T=0; // Hold
#10 T=1; // Toggle
#10 $stop;
end
endmodule
64
65
Simulated Output:
i) JK-Flipflop
ii) D Flip-Flop
iii) T-Flipflop:
66
Result
67
Experiment 5: Universal Shift Registers
Verilog Code:
module universal_shift_reg (
input wire clk, // Clock signal
input wire rst, // Active-high reset
input wire [1:0] sel, // 00-Hold, 01-Shift right, 10-Shift left, 11-
Parallel load
input wire [3:0] parallel_in, // Data for parallel load
input wire serial_in_left, // Serial data entering from left (for shift
right)
input wire serial_in_right, // Serial data entering from right (for
shift left)
output reg [3:0] q // Register value
);
endmodule
68
Date:
Universal Shift Registers
Exp No: 05
Aim
Xilinx ISE Project Navigator – for design entry, syntax check, and
simulation
ModelSim – for functional simulation and waveform verification
Theory
Procedure
1. Write the Verilog code for the 4-bit universal shift register.
2. Write a testbench to apply different sel values for Hold, Shift Right,
Shift Left, and Parallel Load.
3. Compile and simulate the design in Xilinx ISE or ModelSim.
4. Observe the waveform of output q under each mode of operation.
5. Verify correctness with expected results.
69
Verilog Testbench: Universal Shift Registers
`timescale 1ns/1ps
module tb_universal_shift_reg;
reg clk;
reg rst;
reg [1:0] sel;
reg [3:0] parallel_in;
reg serial_in_left;
reg serial_in_right;
wire [3:0] q;
// DUT
universal_shift_reg dut (
.clk(clk),
.rst(rst),
.sel(sel),
.parallel_in(parallel_in),
.serial_in_left(serial_in_left),
.serial_in_right(serial_in_right),
.q(q)
);
initial begin
// Initialize
clk = 0;
rst = 1; sel = 2'b00; parallel_in = 4'b0000;
serial_in_left = 0; serial_in_right = 0;
// Release reset
#10 rst = 0;
// Hold
sel = 2'b00; #10;
// End
$stop;
end
endmodule
72
73
Simulated Output: Universal Shift Registers
74
Result
75
Experiment: 6 Part A: 4-bit Synchronous Counter
Verilog Code:
Verilog Testbench:
module test_sync_v;
reg clk, rst;
wire [3:0] count;
// UUT
sync uut (.clk(clk), .rst(rst), .count(count));
initial begin
clk = 0; rst = 1; #80; rst = 0; // Reset release
#1000;
rst = 1; #80; rst = 0;
end
endmodule
76
Date:
Asynchronous & Synchronous Counters
Exp No: 06(A)
Part A: 4-bit Synchronous Counter
Aim
Theory
Procedure
77
Simulated Output: 4-bit Synchronous Counter
78
Result
79
Part B:
80
Date:
Asynchronous & Synchronous Counters
Exp No: 06(B)
Part B: 4-bit Asynchronous Counter
Aim
Theory
Procedure
81
Verilog Testbench: 4-bit Asynchronous Counter
module asynn_v;
reg clk, rst;
wire [3:0] count;
// UUT
asy uut (.clk(clk), .rst(rst), .count(count));
initial begin
clk = 0; rst = 1; #80; rst = 0;
#1000;
rst = 1; #80; rst = 0;
end
endmodule
82
83
Simulated Output: 4-bit Asynchronous Counter
84
Result
85
Experiment: 7
`timescale 1ns/1ps
module mealy_10_detector (
input clk,
input reset,
input in,
output reg out
);
// State register
always @(posedge clk or posedge reset) begin
if (reset)
state <= S0;
else
state <= next_state;
end
86
Date: Finite State Machine (Moore/Mealy)
Exp No: 07 and its applications
Aim
Theory
Procedure
87
Verilog Testbench: Finite State Machine (Moore/Mealy) and its
applications
`timescale 1ns/1ps
module mealy_10_detector_tb;
reg clk, reset, in;
wire out;
// UUT
mealy_10_detector uut (.clk(clk), .reset(reset), .in(in), .out(out));
// Clock generation
initial begin clk = 0; forever #5 clk = ~clk; end
// Test sequence
initial begin
$monitor("Time=%0d | in=%b | out=%b", $time, in, out);
// Reset
reset = 1; in = 0; #10; reset = 0;
// Input sequence
in = 1; #10; // got '1'
in = 0; #10; // detected "10"
in = 1; #10;
in = 0; #10; // detected "10"
in = 0; #10;
in = 1; #10;
in = 1; #10;
in = 0; #10; // detected "10"
$finish;
end
endmodule
88
89
Simulated Output: Finite State Machine (Moore/Mealy) and its
applications
90
Result:
91
Experiment: 8
module memory_8x64K (
input clk, // Clock
input we, // Write Enable (1 = write, 0 = read)
input [2:0] addr, // 3-bit address (0 to 7)
input [7:0] din, // Data input
output reg [7:0] dout // Data output
);
// Declare memory (8 locations x 8 bits)
reg [7:0] mem [0:7];
92
Date:
Memories1: Any microcontroller
Exp No: 08
Aim
Theory
Procedure
93
Verilog Testbench: Memories1: Any microcontroller
module test;
// Inputs
reg clk;
reg we;
reg [2:0] addr;
reg [7:0] din;
// Outputs
wire [7:0] dout;
// UUT
memory_8x64K uut (
.clk(clk),
.we(we),
.addr(addr),
.din(din),
.dout(dout)
);
// Clock generation
always #5 clk = ~clk;
initial begin
// Initialize
clk = 0; we = 0; addr = 0; din = 0;
// End simulation
#20 $stop;
end
endmodule
94
Simulated Output: Memories1: Any microcontroller
95
Result:
96