Vlsi Lab Manual
Vlsi Lab Manual
Session
Sl. No. Description of experiments
Software’s: Synthesis tool: Xilinx ISE; Simulation tool: Modelsim Simulator /HSPICE
1 Lab 0: Verilog Operators 1
2 Lab 1: Realization of Combinational and Sequential Circuits 2
3 Lab 2: (a) Realization of digital circuits using behavioral modeling 3
(b) Realization of MOS Circuit using Switch level Modeling
4 Lab 3: Design using FSM and ASM charts 4
5 Lab 4: Realization of VLSI Adders-I 5
6 Lab 5: Realization of VLSI Adders-II 6
7 Lab 6: Realization of VLSI Multiplier-I 7
8 Lab 7: Realization of VLSI Multiplier-II 8
9 Lab 8: Realization of RAM and ROM 9
10 Lab 9: Design and Analysis of CMOS inverter using HSPICE 10
11 Lab 10: (a) Design and Analysis of Complex CMOS gate using HSPICE 11
(b) Design and Analysis of Pseudo NMOS gate using HSPICE
12 Lab 11: (a) Design and Analysis of AND/NAND gate in DCVSL using SPICE 12
(b) Design and Analysis of Pass transistor gate and CPL gates using HSPICE
13 Lab 12: Design and analysis of 4- input Dynamic NAND gate using HSPICE 13
14 Lab 13: Model Practical Examination 14
15 Lab 14: End Semester Practical Examination 15
1.Evaluation Scheme
Soft copy of manual (student’s Copy) will be posted in the Google classroom.
Lab report format should follow the following details
Aim
Software required
Pre-Lab answers
Circuit Diagram, Truth table, Boolean Expression for each problem statement
Program code
Test bench code
Simulated output
Post-Lab answers
Results
Lab report has to be uploaded in the Google classroom with in immediate next week.
Design of Microprocessor components has been suggested for Mini Project Assessment.
Laboratory Report Cover Sheet
Name:
Register No.:
Title of Experiment:
Date of Conduction:
Date of Submission:
REPORT VERIFICATION
Staff Name :
Signature:
Lab Experiment #1
1.List the types of design methodologies for digital design with an example?
2.Give the difference between module and module instance.
3.What are built in gate primitives?
4.Give the use of net, reg. and wire data types.
5.Declare the following variables in Verilog:
Full adder:
Ripple Carry Adder
// TEST BENCH
module half_adder_tb_v;
// Inputs
reg x;
// reg y;
//Outputs
wire s; wire cout;
// Instantiate the Unit Under Test (UUT)
Half_adder uut (.s(s), .cout(cout), .x(x), .y(y) );
initial begin
// Initialize Inputs
x = 0; y = 0;
Wait 100 ns for global reset to finish #100; x=0; y=1;
#100; x=1; y=0; #100; x=1; y=1;
Add stimulus here
end
endmodule
1.(b) FULL ADDER USING STRUCTURAL MODEL
// TEST BENCH
module full_adder_tb_v;
// Inputs
reg x; reg y; reg cin;
// Outputs
wire sum; wire carry;
// Instantiate the Unit Under Test (UUT)
Full_adder uut (.sum(sum), .carry(carry), .x(x), .y(y), .cin(cin)); initial begin
//Initialize Inputs x = 0; y = 0; cin = 0; Wait 100 ns for global reset to finish #100; x=0;
y=0; cin=1;
//#100; x=0; y=1; cin=0; #100; x=0; y=1; cin=1; #100; x=1; y=0; cin=0; #100; x=1; y=0;
cin=1; #100; x=1; y=1; cin=0; #100; x=1; y=1; cin=1;
//Add stimulus here
end
endmodule
wire c1,c2,c3;
full_adder f1(S[0],c1,A[0],B[0],cin);
full_adder f2(S[1],c2,A[1],B[1],c1);
full_adder f3(S[2],c3,A[2],B[2],c2);
full_adder f4(S[3],cout,A[3],B[3],c3);
endmodule
// TEST BENCH
module ripple_carry_adder_tb_v;
// Inputs
reg [3:0] A; reg [3:0] B; reg cin;
// Outputs
wire [3:0] S; wire cout;
// Instantiate the Unit Under Test (UUT)
ripple_carry_adder uut (.S(S), .cout(cout), .A(A), .B(B), .cin(cin)); initial begin
//Initialize Inputs A = 0; B = 0; cin = 0;
//Wait 100 ns for global reset to finish #100; A=0; B=0; cin=1;
#100; A=0; B=1; cin=0; #100; A=0; B=1; cin=1; #100; A=1; B=0; cin=0; #100; A=1;
B=0; cin=1; #100; A=1; B=1; cin=0; #100; A=1; B=1; cin=1;
//Add stimulus here
End
endmodule
Waveforms – Problem 1
4 x 1 Multiplexer
8 x 1 Multiplexer
Verilog Code - Problem 2
// TEST BENCH
module mux2_1_tb_v;
// Inputs
reg A; reg B; reg s;
//Outputs wire out;
//Instantiate the Unit Under Test (UUT)
mux2_1 uut (.out(out), .A(A), .B(B), .s(s));
initial begin
//Initialize Inputs A = 0; B = 0; s = 0;
//Wait 100 ns for global reset to finish #100; A=1; B=1; s=0;
#100; A=1; B=1; s=1;
//Add stimulus here
end
endmodule
// TEST BENCH
module mux4_1_tb_v;
// Inputs
reg [3:0] i; reg [1:0] s;
// Output wire out;
// Instantiate the Unit Under Test (UUT) mux4_1 uut (.out(out), .I(I), .s(s)); initial begin
// Initialize Inputs
// Wait 100 ns for global reset to finish #100; I=4'b1101; s=2'b01;
#100; I=4'b0100; s=2'b10; #100; I=4'b0111; s=2'b11;
// Add stimulus here
end
endmodule
// TEST BENCH
module mux8_1_tb_v;
// Inputs
reg [2:0] s; reg [7:0] i;
//Outputs
wire out;
//Instantiate the Unit Under Test (UUT) mux8_1 uut (.out(out), .s(s), .i(i)); initial begin
//Initialize Inputs s = 0; i = 0;
//Wait 100 ns for global reset to finish #100; s=3'b000; i=8'b00000001; #100; s=3'b001;
i=8'b00000010; #100; s=3'b010; i=8'b00000100; #100; s=3'b011; i=8'b00001000; #100;
s=3'b100; i=8'b00010000;
#100; s=3'b101; i=8'b00100000;
#100; s=3'b110; i=8'b01000000;
#100; s=3'b111; i=8'b10000000;
end
endmodule
Waveforms – Problem 2
// TEST BENCH
module srff_tb_v;
// Inputs
reg s;
reg r;
reg clk;
// Outputs
wire q;
wire qbar;
// Instantiate the Unit Under Test (UUT)
srff uut (
.q(q),
.qbar(qbar),
.s(s),
.r(r),
.clk(clk)
);
initial begin
// Initialize Inputs
s = 0;r = 1;clk = 1;
// Wait 100 ns for global reset to finish
#100 s = 1;r = 0; clk = 1;
#100 s = 0;r = 0; clk = 1;
#100 s = 1;r = 1; clk = 1;
// Add stimulus here
end
endmodule
TEST BENCH
module jk_tb_v;
// Inputs
reg clk;
reg clr;
reg j;
reg k;
// Outputs
wire q;
wire qb;
initial begin
// Initialize Inputs
clk = 1;clr = 1;j = 0;k = 0;
// Wait 100 ns for global reset to finish
#100 clr = 0;j = 0;k = 0;
#100 clr = 0;j = 0;k = 1;
#100 clr = 0;j = 1;k = 0;
#100 clr = 0;j = 1;k = 1;
#100 clr = 0;j = 0;k = 0;
// Add stimulus here
end
always #50 clk=~clk;
endmodule
Waveforms – Problem 3
SR Flip-flop using Gate level model
1.6 Result:
Thus, the design of combinational and Sequential logic circuits was simulated in Verilog and
synthesized using EDA tools.
Lab Experiment #2
Realization of Digital Circuits Using Behavioral and Switch Level
Modeling
2.1 Objective: To realize the design of digital circuits in Verilog using behavioral and switch
level modelling then simulating and synthesizing using EDA tools.
Logic Diagram
D flip flop
T flip flop
Verilog
Code - Problem 1
// TEST BENCH
module dff_tb_v;
// Inputs
reg d;
reg clk;
reg clear;
// Outputs
wire q;
wire qbar;
// Instantiate the Unit Under Test (UUT)
dff uut (
.q(q),
.qbar(qbar),
.d(d),
.clk(clk),
.clear(clear)
);
initial begin
// Initialize Inputs
d = 0;clk = 0;clear = 1;
// Wait 100 ns for global reset to finish
#100 d = 0;clear = 0;
#100 d = 1;clear = 0;
#100 d = 1;clear = 1;
// Add stimulus here
end
always #50 clk=~clk;
endmodule
// TEST BENCH
module tffcase_tb_v;
// Inputs
reg clk; reg clr; reg t;
//Outputs wire q;
//Instantiate the Unit Under Test (UUT) tffcase uut (.q(q),.clk(clk),.clr(clr),.t(t)); initial begin
//Initialize Inputs clk = 0; clr = 1; t = 0;
//Wait 100 ns for global reset to finish #100; clr=0;
#100; clr=0; t=1;
//Add stimulus here
end
always
#50 clk=~clk;
endmodule
Waveforms – Problem 1
Mod-N Counter:
SISO Register:
// TEST BENCH
module updowncntr_tb_v;
// Inputs
reg clr; reg clk; reg mod;
//Outputs wire [3:0]q;
//Instantiate the Unit Under Test (UUT) updowncntr uut (.q(q),.clr(clr),.clk(clk),.mod(mod));
initial begin
// Initialize Inputs
clr = 1; clk = 0; mod = 1;
//Wait 100 ns for global reset to finish #100; clr=0;
#1000; mod=0;
//Add stimulus here
end
always
#50 clk=~clk;
endmodule
2.(2) Mod N-COUNTER USING BEHAVIOURAL MODEL
module modN_ctr
# (parameter N = 10,
parameter WIDTH = 4)
( input clk,
input rstn,
output reg[WIDTH-1:0] out);
always @ (posedge clk) begin
if (rstn) begin
out <= 0;
end else begin
if (out == N-1)
out <= 0;
else
out <= out + 1;
end
end
endmodule
// TEST BENCH
module modncounter_tb_v;
// Inputs
reg clk;
reg rstn;
// Outputs
wire [3:0] out;
// Instantiate the Unit Under Test (UUT)
modN_ctr uut (
.clk(clk),
.rstn(rstn),
.out(out)
);
initial begin
// Initialize Inputs
clk = 1;rstn = 1;
// Wait 100 ns for global reset to finish
#100 rstn=0;
// Add stimulus here
end
lways #50 clk=~clk;
endmodule
// TEST BENCH
module siso_tb_v;
// Inputs
reg shift_in;
reg clk;
// Outputs
wire shift_out;
// Instantiate the Unit Under Test (UUT)
siso_register uut (
.shift_out(shift_out),
.shift_in(shift_in),
.clk(clk)
);
initial begin
// Initialize Inputs
shift_in = 1;
clk = 1;
// Wait 100 ns for global reset to finish
#100 shift_in = 0;
#100 shift_in = 1;
#100 shift_in = 0;
// Add stimulus here
end
always #50 clk=~clk;
endmodule
Waveforms – Problem 2
Problem 2.4.3:
1.Design inverter logic using Verilog switch level modeling and verify the simulation result
using test bench.
2.Design two inputs CMOS NAND logic using Verilog switch level modeling and verify
the simulation result using test bench.
3.Design 2:1 Mux using CMOS switches and write Verilog coding using switch level
modeling and verify the simulation result.
Logic Diagram-Problem 1
CMOS Inverter_TB
module inverter_tb_v;
reg data;
inverter uut (.out(out), .data(data));
initial begin
data = 0;
#100 data = 1;
end
endmodule
Logic Diagram-Problem 2
Logic Diagram-Problem 3
2:1 Mux using CMOS
2.6 Result:
Thus, the design of Digital circuits using behavioral and Switch level modelling is simulated in
Verilog and synthesized using EDA tools.
Lab Experiment #3
Design of Finite State Machine (FSM) and Algorithmic State
3.1 Objective:
To learn the design of Finite State Machine (FSM) and Algorithmic State Machine
(ASM) for any application in Verilog, the simulating and synthesizing using EDA tools.
3.2 Tools Required:
1. Synthesis tool: Xilinx ISE
2. Simulation tool: Modelsim simulator
3.3 Pre Lab Questions:
1. Draw the simple model of FSM.
2. What is the basic Algorithm of Sequence Detector?
3. List the difference between Mealy and Moore Model.
4. What is ASM Chart and what are its main components?
3.4.1 Problem:
1. Implement Sequence recognizer for detecting three successive 1’s using Mealy Model
(Behavioural Modelling).
Mealy model for 111 Detector (FSM):
module fsm_mealy_111_tb_v;
// Inputs
reg reset;
reg a;
reg clk;
// Outputs
wire o;
// Instantiate the Unit Under Test (UUT)
fsm_mealy_111 uut (
.o(o),
.reset(reset),
.a(a),
.clk(clk)
);
initial begin
// Initialize Inputs
reset = 1;
a = 1;
clk = 1;
// Wait 100 ns for global reset to finish
#100;
reset = 0;
a = 1;
#100;
reset = 0;
a = 1;
#100;
reset = 0;
a = 1;
#100;
reset = 0;
a = 0;
#100;
reset = 0;
a = 1;
#100;
// Add stimulus here
end
always #50 clk=~clk;
endmodule
Simulation Result:
3.4.2 Consider the following state graph of a sequential network which has both Mealy
and Moore outputs. The outputs Y1 and Y2 are the Mealy outputs and so should be
conditional outputs. The Ya, Yb, and Yc are the Moore outputs so they should be part
of state box. Input X can either be “0” or “1” and hence it should be part of the decision
box.
Draw the ASM Chart for the above state graph and implement using Verilog.
ASM Chart:
Verilog Program:
module asm (input clk, input x, output reg ya, output reg yb, output reg yc, output reg
y1,
output reg y2);
reg [1:0] state, nextstate;
parameter [1:0] S0=0, S1=1, S2=2;
always @(posedge clk)// always block to update state
state <= nextstate;
always @(state or x) // always block to compute both Mealy output & next state
begin
y1 = 1'b0; y2 = 1'b0;
case (state)
S0: if(x)
nextstate = S1;
else
nextstate = S0;
S1: if(x)
nextstate = S2;
else
nextstate = S0;
S2: if(x)
begin
y2 = 1'b1;
nextstate = S1;
end
else
begin
y1 = 1'b1;
nextstate = S0;
end
default:nextstate = S0;
endcase
end
always @(state) // always block to compute Moore output
begin
ya = 1'b0; yb = 1'b0; yc = 1'b0;
case(state)
//begin
S0: ya = 1'b1;
S1: yb = 1'b1;
S2: yc = 1'b1;
//end
default: begin
ya = 1'b0;
yb = 1'b0;
yc = 1'b0;
end
endcase
end
endmodule
Test Bench:
module asm_tb_v;
// Inputs
reg clk;
reg x;
// Outputs
wire ya;
wire yb;
wire yc;
wire y1;
wire y2;
// Instantiate the Unit Under Test (UUT)
asm uut (
.clk(clk),
.x(x),
.ya(ya),
.yb(yb),
.yc(yc),
.y1(y1),
.y2(y2) );
initial begin
// Initialize Inputs
x = 1;
clk = 1;
// Wait 100 ns for global reset to finish
#100;
x = 1;
#100;
x = 1;
#100;
x = 1;
#100;
x = 0;
#100;
// Add stimulus here
end
always #50 clk=~clk;
// Add stimulus here
endmodule
Output:
4.4 Problem: Write a Verilog code to implement the 4-bit Carry Look-ahead adder using
structural model.
Logic Diagram:
initial
begin
#10;
r_ADD_1 = 3'b000;
r_ADD_2 = 3'b001;
#10;
r_ADD_1 = 3'b010;
r_ADD_2 = 3'b010;
#10;
r_ADD_1 = 3'b101;
r_ADD_2 = 3'b110;
#10;
r_ADD_1 = 3'b111;
_ADD_2 = 3'b111;
#10;
end
endmodule // carry_lookahead_adder_t
Simulation Waveform:
5.1 Objective: To design and simulate the carry skip adder (4-bit) in Verilog and synthesize using
EDA tools.
5.4 Problem: Write a Verilog code to implement the 4-bit Carry Look-ahead adder using
structural model.
Logic Diagram:
module propagate_p(a,b,p,bp);
input [3:0] a,b;
output [3:0] p;
output bp;
assign p= a^b;//get all propagate bits
assign bp= &p;// and p0p1p2p3 bits
endmodule
TEST BENCH:
module carry_skip_4bit_addertb;
wire [7:0]Y;
wire carryout;
reg [7:0]A,B;
reg carryin;
carry_skip_4bit csa1 (Y,carryout,A,B,carryin);
initial
begin
$display("RSLT\tA\tB\tCYIN\t\tCYOUT\tSUM");
//A = 4'b0101; B = 4'b1101; carryin = 0; #50; // Set inputs and add delay
A = 0; B = 0; carryin = 0; #50; // Set inputs and add delay
A = 3; B = 2; carryin = 1; #50; // Set inputs and add delay
A = 7; B = 10; carryin = 0; #50; // Set inputs and add delay
A = 15; B = 15; carryin = 1; #50; // Set inputs and add delay
A = 255; B = 55; carryin = 0; #50; // Set inputs and add delay
A = 255; B = 255; carryin = 1; #50; // Set inputs and add delay
/*
//if ( (carryout == 1 ) && (Y === 4'b0010) )
if ( (carryout == 1 ) && (Y === 2) )
$display("PASS\t%p\t%p\t%d\t=\t%d\p%p",A,B,carryin,carryout,Y);
else
$display("FAIL\t%p\t%p\t%d\t=\t%d\t%p",A,B,carryin,carryout,Y);
*/
end
//enabling the wave dump
initial begin
$dumpfile("dump.vcd"); $dumpvars;
end
endmodule
Simulation Waveform:
5.6 Result
Thus, the design of 4-bit carry look-ahead adder circuit was simulated in Verilog and
synthesized using EDA tools.
Lab Experiment #6
Realization of Multiplier-1
6.1 Objective: To design and simulate the Braun array multiplier in Verilog and synthesize
using EDA tools.
6.4 Problem: Write a Verilog code to implement the 4-bit Braun Array multipliers using
structural model.
Logic Diagram
// TEST BENCH
module braun_test_v;
// Inputs
reg [3:0] a;
reg [3:0] b;
// Outputs
wire [7:0]p;
// Instantiate the Unit Under Test (UUT) braun uut (
.a(a),
.b(b),
.p(p));
initial
begin
// Initialize Inputs
a = 0;
b = 0;
#100;a=1101; b=1001;
end
endmodule
Simulation waveforms:
6.6 Result
Thus, the design of 4-bit Braun array multiplier circuit was simulated in Verilog and
synthesized using EDA tools.
Lab Experiment #7
Realization of Multiplier-II
7.1 Objective: To design and simulate the Wallace tree multiplier in Verilog and synthesize
using EDA tools
7.4 Problem:
Write a Verilog code to implement the 4-bit Wallace tree multipliers using structural model.
Logic Diagram:
Thus, the design of 4-bit Wallace tree multiplier circuit was simulated in Verilog and
synthesized using EDA tools
Lab Experiment #8
Realization of Memory
8.1 Objective:
Design memory using Verilog and Simulate using Xilinx Tool.
Software’s:
Synthesis tool: Xilinx ISE.
Simulation tool: Modelsim Simulator.
8.3 Prelab:
1.What are the different types of memory? Compare its performance.
2.Write the difference between static and dynamic memory.
3.Define port for 32*64k RAM memory.
Logic Diagram:
Program:
TEST BENCH:
module RAM_Test_v;
// Inputs
reg [3:0] Data;reg RD;
reg WR;
reg [3:0] Address;
// Outputs
wire [3:0] Output;
// Instantiate the Unit Under Test (UUT)
emory_Design uut
(.Data(Data),.RD(RD),.WR(WR),.Address(Address),.Output(Output));
initial begin
Data = 4'b0000; RD = 0; WR = 1; Address = 4'b0000; #30;
Data = 4'b0001; RD = 0; WR = 1; Address = 4'b0001; #30;
Data = 4'b0010; RD = 0; WR = 1; Address = 4'b0010; #30;
Data = 4'b0011; RD = 0; WR = 1; Address = 4'b0011; #30;
Data = 4'b0100; RD = 0; WR = 1; Address = 4'b0100; #30;
Data = 4'b0101; RD = 0; WR = 1; Address = 4'b0101; #30;
Data = 4'b0110; RD = 0; WR = 1; Address = 4'b0110; #30;
Data = 4'b0111; RD = 0; WR = 1; Address = 4'b0111; #30;
Data = 4'b1000; RD = 0; WR = 1; Address = 4'b1000; #30;
Data = 4'b1001; RD = 0; WR = 1; Address = 4'b1001; #30;
Data = 4'b1010; RD = 0; WR = 1; Address = 4'b1010; #30;
Data = 4'b1011; RD = 0; WR = 1; Address = 4'b1011; #30;
Data = 4'b1100; RD = 0; WR = 1; Address = 4'b1100; #30;
#100;
End
endmodule
Simulation Output:
Statement 2:
Block Diagram:
Program:
Module ROM_16x4(Address, RD, Output); input[3:0] Address;
input RD;
output reg[3:0] Output;reg[3:0] ROM[15:0];
initial
begin
ROM[4'b0000]=4'b1111;ROM[4'b0001]=4'b1110;
ROM[4'b0010]=4'b1101; ROM[4'b0011]=4'b1100; ROM[4'b0100]=4'b1011;
ROM[4'b0101]=4'b1010; ROM[4'b0110]=4'b1001; ROM[4'b0111]=4'b1000;
ROM[4'b1000]=4'b0111; ROM[4'b1001]=4'b0110; ROM[4'b1010]=4'b0101;
ROM[4'b1011]=4'b0100; ROM[4'b1100]=4'b0011; ROM[4'b1101]=4'b0010;
ROM[4'b1110]=4'b0001; ROM[4'b1111]=4'b0000;
end
always@(RD , Address) begin
if(RD)
begin
Output=ROM[Address];
end
end
endmodule
Test Bench:
module ROM_Test_v;
// Inputs
reg [3:0] Address;reg RD;
// Outputs
wire [3:0] Output;
// Instantiate the Unit Under Test (UUT)
ROM_16x4 uut (.Address(Address),.RD(RD),.Output(Output)); initial begin
// Initialize Inputs
Address = 4'b0000; RD = 1; #50;
end
endmodule
Simulation:
8.5 Post Lab:
8.6 Result:
Design of a 16x4 ROM in Verilog is Performed and Verified using Xilinx Tool.
Lab Experiment #9
Design and Analysis of CMOS inverter using LTSPICE
9.1 Objective: To learn the design of CMOS inverter in circuit level and get the spice netlist using
LTSPICE tool.
9.4 Problem 1: Design and analyse the CMOS inverter in circuit level, verify the transfer
characteristics and infer the SPICE netlist using LTSPICE.
9.4.1 Logic Diagram
9.6 Result:
Thus, the design and analysis of CMOS Inverter has been performed, transfer characteristics have been
verified using LTSPICE tool.
Lab Experiment #10
Design and Analysis of Complex CMOS gates and Pseudo NMOS gates
using LTSPICE
10.1 Objective: To learn the design of Complex CMOS gates and Pseudo NMOS gates in circuit level
and get the spice netlist using LTSPICE tool.
10.4 Problem 1:
Design and analyse the Complex CMOS gate in circuit level, verify the transfer characteristics and
infer the SPICE netlist using LTSPICE.
10.4.1 Problems:
1. Design complex CMOS logic for OUT= ~(A+BC).
2. Design and analysis of Pseudo NMOS gate Inverter using LTSPICE.
10.6 Result:
Thus, the design and analyse of Complex CMOS gate and Pseudo NMOS gate have been performed
and its transfer characteristics is verified using LTSPICE tool.
Lab Experiment # 11
Design and Analysis of DCVSL, CPL and Pass Transistor Logic using
LTSPICE
11.1 Objective: To learn the design of DCVSL, CPL and Pass Transistor Logic in circuit level
and get the spice net list using LTSPICE tool.
11.4 Problem 1:
1a) Design and analyze Differential Cascode Voltage Switch Logic(DCVSL) using LTspice
1b) Design and analyze the complementary Pass transistor Logic for a 2 input AND/NAND in
circuit level, verify the characteristics and infer the SPICE netlist using LTSPICE.
Problem 2:
2a) Design and analyze the complementary Pass transistor Logic for a 2 input OR/NOR in circuit
level, verify the characteristics and infer the SPICE netlist using LTSPICE.
Problem 3:
3a) Design and analyze the Pass transistor Logic for a 2 input AND in circuit level, verify the
characteristics and infer the SPICE netlist using LTSPICE.
Problem 4:
4a) Design and analyze the Pass transistor Logic for a 2 input XOR in circuit level, verify the
characteristics and infer the SPICE netlist using LTSPICE.
11.4.1a)Spice Netlist:
* C:\Users\PRITHIVI\Documents\LTspiceXVII\DCVSL.asc
M2 VDD NAND OUT VDD PMOS l=2 w=80
M3 VDD OUT NAND VDD PMOS l=2 w=4
M1 NAND A N001 N001 NMOS l=2 w=20
M4 N001 B 0 0 NMOS l=2 w=20
M5 OUT BBAR 0 0 NMOS l=2 w=10
M6 OUT ABAR 0 0 NMOS l=2 w=10
V1 A 0 PULSE(0 5 0 0 0 5m 10m 100)
V2 VDD 0 5
V3 B 0 PULSE(0 5 0 0 0 7.5m 15m 100)
V4 ABAR 0 PULSE(5 5 0 0 0 5m 10m 100)
V5 BBAR 0 PULSE(5 5 0 0 0 7.5m 15m 100)
.model NMOS NMOS
.model PMOS PMOS
.lib C:\Users\PRITHIVI\Documents\LTspiceXVII\lib\cmp\standard.mos
.tran 1000m
.backanno
.end
11.4.1b)Output
SPICE NETLIST:
• * F:\AND.asc
• M1 Y1 VB VA 0 NMOS1 l=1u w=1u
• M2 Y1 VBbar VB 0 NMOS1 l=1u w=1u
• M3 Y2 VB VAbar 0 NMOS1 l=1u w=1u
• M4 Y2 VBbar VBbar 0 NMOS1 l=1u w=1u
• M5 VDD VA VAbar VDD PMOS1
• M6 VAbar VA 0 0 NMOS1 l=1u w=1u
• V1 VDD 0 5V
• VA1 VA 0 PULSE(0 5 5m 1p 1p 8m 12m 10)
• VB1 VB 0 PULSE(0 5 0m 1p 1p 8m 12m 10)
• M7 VDD VB VBbar VDD PMOS
• M8 VBbar VB 0 0 NMOS
• .model NMOS NMOS
• .model PMOS PMOS
• .lib C:\Users\AJAY GOVINDAN\Documents\LTspiceXVII\lib\cmp\standard.mos
• .model nmos1 nmos(W= 1u L=1u vto= 0.7 kp= 200u)
• .model pmos1 pmos( W= 2u L=1u vto =-0.7 kp= 40u)
• .tran 30m
• * 2 input AND/NAND gate using NMOS complementary pass transistor logic
• .backanno
• .end
11.4.2 OUTPUT:
11.4.2 Spice Netlist:
• * F:\OR.asc
• M1 Y1 Bbar A 0 NMOS1
• M2 Y1 B B 0 NMOS1
• M3 Y2 Bbar Abar 0 NMOS1
• M4 Y2 B Bbar 0 NMOS1
• M5 VDD A Abar VDD PMOS1
• M6 VDD B Bbar VDD PMOS1
• M7 Abar A 0 0 NMOS1
• M8 Bbar B 0 0 NMOS1
• V1 VDD 0 5V
• VA1 A 0 PULSE(5 0 5m 1p 1p 8m 12m 10)
• VB1 B 0 PULSE(5 0 0m 1p 1p 8m 10m 10)
• .model NMOS NMOS
• .model PMOS PMOS
• .lib C:\Users\AJAY GOVINDAN\Documents\LTspiceXVII\lib\cmp\standard.mos
• * 2 input OR/ NOR gate using NMOS complementary pass transistor logic
• model nmos1 nmos(W= 1u L=1u vto=0.7 kp=200u)
• model pmos1 pmos(W=2u L=1u vto=-0.7 kp=40u)
• tran 16MS
• backanno
• end
11.4.3 AND GATE USING PTL:
11.4.3 Output
11.4.3 SPICE NETLIST:
• * F:\ANDPTL.asc
• M1 Vout VB VA 0 NMOS1
• M2 Vout VBbar 0 0 NMOS1
• M3 VDD VB VBbar VDD PMOS1
• M4 VBbar VB 0 0 NMOS1
• V1 VDD 0 5V
• VB1 VB 0 PULSE(0 5 6m 1p 1p 8m 12m 10)
• VA1 VA 0 PULSE(0 5 5m 1p 1p 8m 12m 10)
• .model NMOS NMOS
• .model PMOS PMOS
• .lib C:\Users\AJAY GOVINDAN\Documents\LTspiceXVII\lib\cmp\standard.mos
• * 2 input AND gate using NMOS pass transistor logic
• .model pmos1 pmos(W=2u L=1u vto=-0.7 kp=40u)
• .model nmos1 nmos(W=1u L=1u vto=0.7 kp=200u)
• .tran 60m
• .backanno
• .end
11.4.4 OUTPUT :
11.6 Result:
Thus, the design and analysis of DCVSL, CPL and Pass transistor design have been performed and
its characteristics are verified using LTSpice tool.
LAB EXPERIMENT # 12
Circuit Diagram:
.option post
.include c:\synopsys\tsmc018.lib
vdd 1 0 dc 1.8v
vin1 4 0 pulse(-5 5 2ns 2ns 2ns 80us 160us) //(input A)
vin2 6 0 pulse(-5 5 2ns 2ns 2ns 50us 100us) //(input B)
vin3 2 0 pulse(-5 5 2ns 2ns 2ns 50us 100us) //(CLOCK)
vin4 8 0 pulse(-5 5 2ns 2ns 2ns 50us 100us) //(CLOCK)
m1 3 2 1 1 cmosp w=4u l=180nm
m2 3 4 5 5 cmosn w=2u l=180nm
m3 5 6 7 7 cmosn w=2u l=180nm
m4 7 8 0 0 cmosn w=2u l=180nm
c1 3 0 100p // (CAPACITOR Vary the capacitor value to see the dynamic performance)
.tran 100u 800u
.plot v(3) v(4) V(6)
.end
12.7 Netlist :
.option post
.include c:\synopsys\tsmc018.lib
* t58f spice bsim3 version 3.1 parameters
*
* spice 3f5 level 8, star-hspice level 49, utmost level 8
*
* temperature_parameters=default
*
vdd 1 0 dc 1.8v
vin1 4 0 pulse(-5 5 2ns 2ns 2ns 80us 160us)
vin2 6 0 pulse(-5 5 2ns 2ns 2ns 50us 100us)
vin3 2 0 pulse(-5 5 2ns 2ns 2ns 50us 100us)
vin4 8 0 pulse(-5 5 2ns 2ns 2ns 50us 100us)
m1 3 2 1 1 cmosp w=4u l=180nm
m2 3 4 5 5 cmosn w=2u l=180nm
m3 5 6 7 7 cmosn w=2u l=180nm
m4 7 8 0 0 cmosn w=2u l=180nm
c1 3 0 100p
.tran 100u 800u
.plot v(3) v(4) v(6)
.end
******
dynamic nand
****** mos model parameters tnom= 25.000 temp= 25.000
******
***************************************************************************
*** model parameters model name: 0:cmosn model type:nmos ***
***************************************************************************
Model: 0:cmosn
W = 1.99e-006, L = 1.8e-007
dynamic nand
****** operating point information tnom= 25.000 temp= 25.000
******
***** operating point status is voltage simulation time is 0.
node =voltage node =voltage node =voltage
******
dynamic nand
****** transient analysis tnom= 25.000 temp= 25.000
******
a
legend:
a: v(3)
b: v(4)
c: v(6)
time v(3)
(abc ) -10.0000 -5.0000 0. 5.0000 10.0000
+ + + + +
0. 1.800 -+------+------2------+------+----a-+------+------+------+-
100.0000u 1.800 + + 2 + + a + + + +
200.0000u 1.800 + + c + + a+ b + +
300.0000u 1.800 + + 2 + + a + + + +
400.0000u 1.800 + + c + + a+ b + +
500.0000u 1.800 + + c + + a+ b + +
600.0000u 1.800 + + 2 + + a + + + +
700.0000u 1.800 + + c + + a+ b + +
800.0000u 1.800 + + 2 + + a + + + +
+ + + + +
B
dynamic nand
****** job statistics summary tnom= 25.000 temp= 25.000
******
# nodes = 9 # elements= 10
# diodes= 0 # bjts = 0 # jfets = 0 # mosfets = 4
# va device = 0
op point 0.03 1 32
transient 0.05 9 2016 560 rev= 114
readin 0.01
errchk 0.00
setup 0.00
output 0.00
total cpu time 0.14 seconds
job started at 12:36:05 02/26/2020
job ended at 12:36:05 02/26/2020
12.6 Result:
Thus the design of two input dynamic NAND gate, MOS transistor level using HSPICE was studied
and simulated.