ST.ANNE’S COLLEGE OF ENGINEERING AND TECHNOLOGY
Transcript of ST.ANNE’S COLLEGE OF ENGINEERING AND TECHNOLOGY
Dept. of Electronics and Communication Engg. VLSI Design lab 1
ST.ANNE’S COLLEGE OF ENGINEERING AND TECHNOLOGY
ANGUCHETTYPALAYAM, PANRUTI – 607 110
EC2357 – VLSI DESIGN LAB
LAB MANUAL
(FOR III B.E ELECTRONICS AND COMMUNICATION ENGINEERING)
AS PER ANNA UNIVERSITY (CHENNAI) SYLLABUS
2008 REGULATION
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
PREPARED BY,
Ms. B. ABINAYA AP/ECE
Dept. of Electronics and Communication Engg. VLSI Design lab 2
EXP NO: 01
VERIFICATION OF LOGIC GATES
AIM: To develop the source code for logic gates by using VERILOG and obtains the
simulation, synthesis and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
LOGIC DIAGRAM:
AND GATE: OR GATE:
LOGIC DIAGRAM: TRUTH TABLE: LOGICDIAGRAM TRUTH TABLE:
NOT GATE: NAND GATE:
LOGIC DIAGRAM: TRUTH TABLE: LOGICDIAGRAM TRUTH TABLE
NOR GATE: XOR GATE:
LOGIC DIAGRAM: TRUTH TABLE: LOGICDIAGRAM TRUTH TABLE
A B Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
A B Y=AB
0 0 0
0 1 0
1 0 0
1 1 1
A B Y=(AB)’
0 0 1
0 1 1
1 0 1
1 1 0
A Y=A’
0 1
1 0
A B Y=(A+B)’
0 0 1
0 1 0
1 0 0
1 1 0
A B
0 0 0
0 1 1
1 0 1
1 1 0
Dept. of Electronics and Communication Engg. VLSI Design lab 3
XNOR GATE:
LOGIC DIAGRAM: TRUTH TABLE:
PROGRAM:
module logic_gates(a, b, c, d, e, f, g, h);
input a;
input b;
output c;
output d;
output e;
output f;
output g;
output h;
or r1(c,a,b);
and a1(d,a,b);
not n1(e,a);
xor x1(f,a,b);
nor n2(g,a,b);
nand n3(h,a,b);
endmodule
Result:
Thus the outputs of Basic Logic Gates are verified by simulating and synthesizing the VERILOG
code.
A B
0 0 1
0 1 0
1 0 0
1 1 1
Dept. of Electronics and Communication Engg. VLSI Design lab 4
EXP NO: 02
ADDERS AND SUBTRACTORS
AIM: To develop the source code for adders and subtractors by using VERILOG and obtain the
simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
BASIC ADDERS & SUBTRACTORS:
HALF ADDER:
LOGIC DIAGRAM: TRUTH TABLE:
HALF SUBSTRACTOR:
LOGIC DIAGRAM: TRUTH TABLE
A B SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
A B DIFFERENCE BORROW
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Dept. of Electronics and Communication Engg. VLSI Design lab 5
PROGRAM:
HALF ADDER
module half_adder( sum, carry,a,b);
input a;
input b;
output sum;
output carry;
xor x1(sum,a,b);
and a1(carry,a,b);
endmodule
WAVEFORM
HALF SUBTRACTOR
module halfsubtracter(diff, borrow,a,b);
input a;
input b;
output diff;
output borrow;
wire d;
xor x1(diff,a,b);
not n1(d,a);
and a1(borrow,b,d);
endmodule
Dept. of Electronics and Communication Engg. VLSI Design lab 6
WAVEFORM
FULL ADDER:
LOGIC DIAGRAM: TRUTH TABLE:
FULL SUBSTRACTOR:
LOGIC DIAGRAM: TRUTH TABLE:
A B C SUM CARRY
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
A B C DIFFERENCE BORROW
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Dept. of Electronics and Communication Engg. VLSI Design lab 7
FULLADDER
module full_adder(sum, carry, a,b,c);
input a;
input b;
input c;
output sum;
output carry;
wire d;
wire e;
wire f;
xor x1(sum,a,b,c);
and a1(d,b,c);
and a2(e,c,a);
and a3(f,a,b);
or r1(carry,d,e,f);
endmodule
WAVEFORM
FULL SUBTRACTOR
module fullsubtracter(a, b, c, diff, borrow);
input a;
input b;
input c;
output diff;
output borrow;
wire g,h,d,e,f;
xor x1(diff,a,b,c);
and a1(d,g,b);
and a2(e,b,c);
and a3(f,h,c);
not n1(g,a);
not n2(h,a);
or r1(borrow,d,e,f);
endmodule
Dept. of Electronics and Communication Engg. VLSI Design lab 8
WAVEFORM
FULL ADDER USING TWO HALF ADDERS:
LOGIC DIAGRAM: TRUTH TABLE:
FULL SUBTRACTOR USING TWO HALF
SUBTRACTORS:
LOGIC DIAGRAM: TRUTH TABLE:
A B C SUM CARRY
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
A B C DIFFERENCE BORROW
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Dept. of Electronics and Communication Engg. VLSI Design lab 9
FULL ADDER USING TWO HALF ADDER
module full_adder(a, b, c, sum, carry);
input a;
input b;
input c;
output sum;
output carry;
wire d
wire e;
wire f;
half_adder ha1(d,e,a,b);
half_adder ha2(sum,f,c,d);
or r1(carry,f,e);
endmodule
SUBPROGRAM
module half_adder( sum, carry,a,b);
input a;
input b;
output sum;
output carry;
xor x1(sum,a,b);
and a1(carry,a,b);
endmodule
WAVEFORM:
FULL SUBTRACTOR USING TWO HALF SUBTRACTOR
module full2halfsub(a,b,c,diff,borrow);
input a;
input b;
input c;
output diff;
output borrow;
wire e,f,g;
halfsubtracter hs1(e,f,a,b);
halfsubtracter hs2(diff,g,c,e);
or r1(borrow,g,f);
endmodule
SUBPROGRAM
module halfsubtracter(diff, borrow,a,b);
input a;
input b;
output diff;
output borrow;
wire d;
xor x1(diff,a,b);
not n1(d,a);
and a1(borrow,b,d);
endmodule
Dept. of Electronics and Communication Engg. VLSI Design lab 10
WAVEFORM
FULL ADDER SYNTHESIS
Final Report
Final Results
RTL Top Level Output File Name : fullorder0.ngr
Top Level Output File Name : fullorder0
Output Format : NGC
Optimization Goal : Speed
Keep Hierarchy : NO
Design Statistics
# IOs : 5
Cell Usage :
# BELS : 2
# LUT3 : 2
# IO Buffers : 5
# IBUF : 3
# OBUF : 2
Device utilization summary:
Selected Device : 3s100etq144-5
Number of Slices: 1 out of 960 0%
Number of 4 input LUTs: 2 out of 1920 0%
Number of IOs: 5
Number of bonded IOBs: 5 out of 108 4%
Partition Resource Summary:
No Partitions were found in this design.
TIMING REPORT
Clock Information:
No clock signals found in this design
Asynchronous Control Signals Information:
No asynchronous control signals found in this design
Timing Summary:
Speed Grade: -5
Minimum period: No path found
Minimum input arrival time before clock: No path found
Maximum output required time after clock: No path found
Maximum combinational path delay: 5.776ns
Timing Detail:
All values displayed in nanoseconds (ns)
Timing constraint: Default path analysis
Dept. of Electronics and Communication Engg. VLSI Design lab 11
Total number of paths / destination ports: 6 / 2
Delay: 5.776ns (Levels of Logic = 3)
Source: b (PAD)
Destination: carry (PAD)
Data Path: b to carry
Cell:in->out fanout Delay Delay Logical Name (Net Name)
IBUF:I->O 2 1.106 0.532 b_IBUF (b_IBUF)
LUT3:I0->O 1 0.612 0.357 carry1 (carry_OBUF)
OBUF:I->O 3.169 carry_OBUF (carry)
Total 5.776ns (4.887ns logic, 0.889ns route)
(84.6% logic, 15.4% route)
Dept. of Electronics and Communication Engg. VLSI Design lab 12
LUT 3_E8
Result:
Thus the outputs of full adder and full subtractor are verified by simulating and synthesizing the
VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 13
EXP NO: 03
4 BIT RIPPLE CARRY ADDER
AIM: To develop the source code for 4 bit ripple carry adder by using VERILOG and obtain
the simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
BLOCK DIAGRAM:
Cin Cout
S0 S1 S2 S3
FA1….FA8 = Full adders
TRUTH TABLE:
PROGRAM:
module ripple_carry(a, b, cin, sum, cout);
input [3:0] a;
input [3:0] b;
input cin;
output [3:0] sum;
output cout;
wire e;
wire f;
wire g;
full FA1(sum[0],e,cin,a[0],b[0]);
full FA2(sum[1],f,e,a[1],b[1]);
full FA3(sum[2],g,f,a[2],b[2]);
full FA4(sum[3],cout,g,a[3],b[3]);
endmodule
SUBPROGRAM
module full(sum, carry, a, b, c);
A B C SUM CARRY
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
FA1
FA2
FA3
FA4
Dept. of Electronics and Communication Engg. VLSI Design lab 14
input a;
input b;
input c;
output sum;
output carry;
wire d;
wire e;
wire f;
xor x1(sum,a,b,c);
and a1(d,b,c);
and a2(e,c,a);
and a3(f,a,b);
or r1(carry,d,e,f);
endmodule
WAVEFORM
8 BIT RIPPLE CARRY ADDER
module ripple(a, b, cin, s, cout);
input [07:0] a;
input [07:0] b;
input cin;
output [07:0] s;
output cout;
fulladder fa1(s[0],e,a[0],b[0],cin);
fulladder fa2(s[1],f,a[1],b[1],e);
fulladder fa3(s[2],g,a[2],b[2],f);
fulladder fa4(s[3],h,a[3],b[3],g);
fulladder fa5(s[4],i,a[4],b[4],h);
fulladder fa6(s[5],j,a[5],b[5],i);
fulladder fa7(s[6],k,a[6],b[6],j);
fulladder fa8(s[7],cout,a[7],b[7],k);
endmodule
SUBPROGRAM
module fulladder(sum, carry,a,b,c);
input a;
input b;
input c;
Dept. of Electronics and Communication Engg. VLSI Design lab 15
output sum;
output carry;
wire d,e,f;
xor x1(sum,a,b,c);
and a1(d,a,b);
and a2(e,b,c);
and a3(f,a,c);
or r1(carry,d,e,f);
endmodule
WAVEFORM
Result:
Thus the outputs of 4 bit & 8 bit ripple carry adder are verified by simulating and synthesizing
the VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 16
EXP NO: 04
PRIORITY ENCODER & DECODER
AIM: To develop the source code for priority encoder and decoder by using VERILOG and
obtain the simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
LOGIC DIAGRAM: TRUTH TABLE:
PRIORITY ENCODER
DECODER: TRUTH TABLE:
D0 D1 D2 D3 D4 D5 D6 D7 X Y Z
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
A B C Z(0) Z(1) Z(2) Z(3)
0 0 1 0 1 1 1
0 1 1 1 0 1 1
1 0 1 1 1 0 1
1 1 1 1 1 1 0
Dept. of Electronics and Communication Engg. VLSI Design lab 17
PROGRAMS:
ENCODER
module encoder(a, b, c, d, x, y, z);
input a;
input b;
input c;
input d;
output x;
output y;
output z;
wire e;
wire f;
wire g;
wire h;
not n1(e,c);
or r1(x,c,d);
and a1(f,b,e);
or r2(y,f,d);
or r3(g,a,b);
or r4(h,c,d);
or r5(z,g,h);
endmodule
WAVEFORM
Dept. of Electronics and Communication Engg. VLSI Design lab 18
DECODER
module decoder(a, b, c, y1, y2, y3, y4, y5, y6, y7, y8);
input a;
input b;
input c;
output y1;
output y2;
output y3;
output y4;
output y5;
output y6;
output y7;
output y8;
wire d;
wire e;
wire f;
not n1(d,a);
not n2(e,b);
not n3(f,c);
and a1(y1,d,e,f);
and a2(y2,d,e,c);
and a3(y3,d,b,f);
and a4(y4,d,b,c);
and a5(y5,a,e,f);
and a6(y6,a,e,c);
and a7(y7,a,b,f);
and a8(y8,a,b,c);
endmodule
Dept. of Electronics and Communication Engg. VLSI Design lab 19
WAVEFORM
Result:
Thus the outputs of priority encoder & decoder are verified by simulating and synthesizing the
VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 20
EXP NO: 05
MULTIPLEXER & DEMULTIPLEXER
AIM: To develop the source code for multiplexer & demultiplexer by using VERILOG and
obtain the simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
LOGIC DIAGRAM:
MULTIPLEXER: 128
9
128
9
Y
D0
D1
12
D2
D3
S0
128
9
S1
12
128
9
23
45
1
TRUTH TABLE:
DEMULTIPLEXER:
SELECT INPUT OUTPUT
S1 S0 Y
0 0 D0
0 1 D1
1 0 D2
1 1 D3
Dept. of Electronics and Communication Engg. VLSI Design lab 21
Y0
S1 S0
Din
Enable
23
45
1
23
45
1
23
45
1
12
Y1
23
45
1
Y2
12
Y3
TRUTH TABLE:
PROGRAMS:
MULTIPLEXER
module mul(a, b, c, d, s0, s1, y);
input a;
INPUT OUTPUT
D S0 S1 Y0 Y1 Y2 Y3
1 0 0 1 0 0 0
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
Dept. of Electronics and Communication Engg. VLSI Design lab 22
input b;
input c;
input d;
input s0;
input s1;
output y;
wire e;
wire f;
wire g;
wire h;
wire i;
wire j;
not n1(e,s1);
not n2(f,s0);
and a1(g,a,e,f);
and a2(h,b,f,s1);
and a3(i,c,s0,e);
and a4(j,d,s0,s1);
or r1(y,g,h,i,j);
endmodule
WAVEFORM
DEMULTIPLEXER
module demux(d, s1, s0, y);
input d;
input s1;
input s0;
output [3:0] y;
wire m,n;
not n1(m,s1);
not n2(n,s0);
Dept. of Electronics and Communication Engg. VLSI Design lab 23
and a1(y[0],d,m,n);
and a2(y[1],d,m,s0);
and a3(y[2],d,s1,n);
and a4(y[3],d,s1,s0);
endmodule
WAVEFORM
Result:
Thus the outputs of Multiplexer & demultiplexer are verified by simulating and synthesizing the
VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 24
EXP NO: 06
D FLIP FLOP & T FLIP FLOP
AIM: To develop the source code for D-flip-flop & T-flip-flop by using VERILOG and obtain
the simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
LOGIC DIAGRAM:
D FLIP FLOP
1
23
CP
Q
1 23
1
231
23
1
23D
Q
TRUTH TABLE:
Q(t) D Q(t+1)
0 0 0
0 1 1
1 0 0
1 1 1
Dept. of Electronics and Communication Engg. VLSI Design lab 25
T FLIP FLOP:
TRUTH TABLE:
D-FLIP FLOP Program in structural modeling:
module dff(d, clk, q, qbar);
input d;
input clk;
output q;
output qbar;
wire e,f,g;
nand n1(g,d,d);
nand n2(e,clk,d);
nand n3(f,clk,g);
nand n4(q,e,qbar);
nand n5(qbar,f,q);
endmodule
Program in behavioral modeling:
module dff(q, qbar,clk,rst,d);
input d;
input clk;
input rst;
output q;
output qbar;
reg q,qbar;
Q(t) T Q(t+1)
0 0 0
0 1 1
1 0 1
1 1 0
1
231
28
9
1
23
128
9
CP
Q
T
Q
Dept. of Electronics and Communication Engg. VLSI Design lab 26
always@(negedge(clk),negedge(rst))
begin
if(rst==0)
begin
q=1'b0;
qbar=1'b1;
end
else if(d==0)
begin
q=1'b0;
qbar=1'b1;
end
else
begin
q=1'b1;
qbar=1'b0;
end
end
endmodule
WAVEFORM
Dept. of Electronics and Communication Engg. VLSI Design lab 27
T-FLIP FLOP
module ttff(q, qbar, t, clk, rst);
output q;
output qbar;
input t;
input clk;
input rst;
reg q;
reg qbar;
always @(negedge(clk),negedge(rst))
begin
if(rst==1'b0)
begin
q=1'b0;
qbar=1'b1;
end
else if(t==1'b0)
begin
q=q;
qbar=qbar;
end
else
begin
q=~q;
qbar=~qbar;
end
end
endmodule
WAVEFORM
Result:
Thus the outputs of D flip flop & T flip flop are verified by simulating and synthesizing the
VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 28
EXP NO: 07
COUNTERS
AIM: To develop the source code for Up counter & Down counter by using VERILOG and obtain the
simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
LOGIC DIAGRAM:
DOWNCOUNTER:
Dept. of Electronics and Communication Engg. VLSI Design lab 29
PROGRAM:
UP COUNTER module upcounter(clk, rst, t, q, qbar);
input clk;
input rst;
input t;
output [3:0]q;
output [3:0]qbar;
ttff tt1(q[0],qbar[0],t,clk,rst);
ttff tt2(q[1],qbar[1],t,q[0],rst);
ttff tt3(q[2],qbar[2],t,q[1],rst);
ttff tt4(q[3],qbar[3],t,q[2],rst);
endmodule
SUBPROGRAM
module ttff(q, qbar, t, clk, rst);
output q;
output qbar;
input t;
input clk;
input rst;
reg q;
reg qbar;
always @(negedge(clk),negedge(rst))
begin
if(rst==1'b0)
begin
q=1'b0;
qbar=1'b1;
end
else if(t==1'b0)
begin
q=q;
qbar=qbar;
end
else
begin
q=~q;
qbar=~qbar;
end
end
endmodule
Dept. of Electronics and Communication Engg. VLSI Design lab 30
WAVEFORM
DOWN COUNTER
module down(clk, rst, t, q, qbar);
input clk;
input rst;
input t;
output [3:0]q;
output [3:0]qbar;
ttff tt1(q[0],qbar[0],t,clk,rst);
ttff tt2(q[1],qbar[1],t,qbar[0],rst);
ttff tt3(q[2],qbar[2],t,qbar[1],rst);
ttff tt4(q[3],qbar[3],t,qbar[2],rst);
endmodule SUBPROGRAM
module ttff(q, qbar, t, clk, rst);
output q;
output qbar;
input t;
input clk;
input rst;
reg q;
reg qbar;
always @(negedge(clk),negedge(rst))
begin
if(rst==1'b0)
begin
q=1'b0;
qbar=1'b1;
end
else if(t==1'b0)
begin
q=q;
qbar=qbar;
end
else
begin
q=~q;
qbar=~qbar;
end
end
endmodule
Dept. of Electronics and Communication Engg. VLSI Design lab 31
WAVEFORM
Result:
Thus the outputs of up counter & down counter are verified by simulating and synthesizing the
VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 32
EXP NO: 08
SHIFT REGISTERS
AIM: To develop the source code for shift registers by using VERILOG and obtain the
simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
LOGIC DIAGRAM:
SERIAL-IN SERIAL-OUT SHIFT REGISTER:
SERIAL-IN PARALLEL-OUT SHIFT REGISTER:
Dept. of Electronics and Communication Engg. VLSI Design lab 33
PARALLEL-IN PARALLEL-OUT SHIFT REGISTER:
PROGRAM:
SERIAL IN SERIAL OUT:
module sinsout(d, clk, rst, q, qbar);
input d;
input clk;
input rst;
inout [3:0] q;
output [3:0] qbar;
dflipflop ff1(q[0],qbar[0],d,clk,rst);
dflipflop ff2(q[1],qbar[1],q[0],clk,rst);
dflipflop ff3(q[2],qbar[2],q[1],clk,rst);
dflipflop ff4(q[3],qbar[3],q[2],clk,rst);
endmodule
SERIAL IN PARALLEL OUT:
module sinpout(d, clk, rst, q, qbar);
input d;
input clk;
input rst;
inout [3:0] q;
output [3:0] qbar;
dflipflop ff1(q[0],qbar[0],d,clk,rst);
dflipflop ff2(q[1],qbar[1],q[0],clk,rst);
dflipflop ff3(q[2],qbar[2],q[1],clk,rst);
dflipflop ff4(q[3],qbar[3],q[2],clk,rst);
endmodule
PARALLEL IN PARALLEL OUT:
module pinpout(d, clk, rst, q, qbar);
input [3:0] d;
input clk;
input rst;
Dept. of Electronics and Communication Engg. VLSI Design lab 34
inout [3:0] q;
output [3:0] qbar;
dflipflop ff1(q[0],qbar[0],d[0],clk,rst);
dflipflop ff2(q[1],qbar[1],d[1],clk,rst);
dflipflop ff3(q[2],qbar[2],d[2],clk,rst);
dflipflop ff4(q[3],qbar[3],d[3],clk,rst);
endmodule
SUBPROGRAM:
module dff(q, qbar,clk,rst,d);
input d;
input clk;
input rst;
output q;
output qbar;
reg q,qbar;
always@(negedge(clk),negedge(rst))
begin
if(rst==0)
begin
q=1'b0;
qbar=1'b1;
end
else if(d==0)
begin
q=1'b0;
qbar=1'b1;
end
else
begin
q=1'b1;
qbar=1'b0;
end
end
endmodule
Dept. of Electronics and Communication Engg. VLSI Design lab 35
WAVEFORM
SERIAL IN SERIAL OUT:
SERIAL IN PARALLEL OUT:
PARALLEL IN PARALLEL OUT:
Result:
Thus the outputs of shift registers are verified by simulating and synthesizing the VERILOG
code.
Dept. of Electronics and Communication Engg. VLSI Design lab 36
EXP NO: 09
PSEUDO RANDOM BINARY SEQUENCE GENERATOR
(PRBS)
AIM: To develop the source code for Pseudo random binary sequence by using VERILOG and
obtain the simulation, synthesis, and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
PROGRAM:
module PRBS(clk, rst, q, qbar);
input clk;
input rst;
inout [2:0] q;
output [2:0] qbar;
wire d,e;
nor n1(e,q[0],q[1]);
xor x1(d,q[0],q[2],e);
dff d1(q[0],qbar[0],clk,rst,d);
dff d2(q[1],qbar[1],clk,rst,q[0]);
dff d3(q[2],qbar[2],clk,rst,q[1]);
endmodule
SUBPROGRAM
module dff(q, qbar,clk,rst,d);
input d;
input clk;
input rst;
output q;
output qbar;
reg q,qbar;
always@(negedge(clk),negedge(rst))
begin
if(rst==0)
begin
q=1'b0;
qbar=1'b1;
Dept. of Electronics and Communication Engg. VLSI Design lab 37
end
else if(d==0)
begin
q=1'b0;
qbar=1'b1;
end
else
begin
q=1'b1;
qbar=1'b0;
end
end
endmodule
WAVEFORM
Result:
Thus the outputs of Pseudo random binary sequence are verified by simulating and synthesizing
the VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 38
EXP NO: 10
MULTIPLIER
AIM: To develop the source code for multiplier by using VERILOG and obtain the simulation,
synthesis and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
PROGRAM:
module multiplier(x, y, p);
input [3:0] x;
input [3:0] y;
output [7:0] p;
wire zero=1'b0;
wire a11,a12,a13,a14,a21,a22,a23,a24,a31,a32,a33,a34,a41,a42,a43,a44;
wire c11,c12,c13,c14,c21,c22,c23,c24,c31,c32,c33,c34,c41,c42,c43,c44;
wire s12,s13,s14,s22,s23,s24,s32,s33,s34;
and g11(a11,y[0],x[0]);
and g12(a12,y[0],x[1]);
and g13(a13,y[0],x[2]);
and g14(a14,y[0],x[3]);
and g21(a21,y[1],x[0]);
and g22(a22,y[1],x[1]);
and g23(a23,y[1],x[2]);
and g24(a24,y[1],x[3]);
and g31(a31,y[2],x[0]);
and g32(a32,y[2],x[1]);
and g33(a33,y[2],x[2]);
and g34(a34,y[2],x[3]);
and g41(a41,y[3],x[0]);
and g42(a42,y[3],x[1]);
and g43(a43,y[3],x[2]);
and g44(a44,y[3],x[3]);
full_adder1 fa11(p[0],c11,a11,zero,zero);
full_adder1 fa12(s12,c12,a12,zero,c11);
full_adder1 fa13(s13,c13,a13,zero,c12);
full_adder1 fa14(s14,c14,a14,zero,c13);
full_adder1 fa21(p[1],c21,a21,zero,s12);
full_adder1 fa22(s22,c22,a22,s13,c21);
full_adder1 fa23(s23,c23,a23,s14,c22);
full_adder1 fa24(s24,c24,a24,c14,c23);
full_adder1 fa31(p[2],c31,a31,s22,zero);
Dept. of Electronics and Communication Engg. VLSI Design lab 39
full_adder1 fa32(s32,c32,a32,c31,s23);
full_adder1 fa33(s33,c33,a33,c32,s24);
full_adder1 fa34(s34,c34,a34,c33,c24);
full_adder1 fa41(p[3],c41,a41,zero,s32);
full_adder1 fa42(p[4],c42,a42,s33,c41);
full_adder1 fa43(p[5],c43,a43,c42,s34);
full_adder1 fa44(p[6],p[7],a44,c34,c43);
endmodule
Subprogram:
module full_adder1(s,ca,a,b,c);
input a;
input b;
input c;
output s;
output ca;
wire d;
wire e;
wire f;
xor x1(s,a,b,c);
and d1(d,b,c);
and d2(e,a,c);
and d3(f,a,b);
or r1(ca,d,e,f);
endmodule
WAVEFORM
Result:
Thus the outputs of multiplier are verified by simulating and synthesizing the VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 40
EXP NO: 11
ACCUMULATOR
AIM: To develop the source code for accumulator by using VERILOG and obtain the
simulation, synthesis and implement into FPGA.
ALGORITM: Step1: Define the specifications and initialize the design.
Step2: Write the source code in VERILOG.
Step3: Check the syntax and debug the errors if found, obtain the synthesis report.
Step4: Verify the output by simulating the source code.
Step5: Write all possible combinations of input using the test bench.
PROGRAM:
module san(a, cin, clk, rst, cout, q, qbar);
input [3:0] a;
input cin;
input clk;
input rst;
output cout;
output [3:0] q;
output [3:0] qbar;
wire e,f,g;
bit_acc a1(q[0],qbar[0],e,a[0],cin,clk,rst);
bit_acc a2(q[1],qbar[1],f,a[1],e,clk,rst);
bit_acc a3(q[2],qbar[2],g,a[2],f,clk,rst);
bit_acc a4(q[3],qbar[3],cout,a[3],g,clk,rst);
endmodule
subprogram module bit_acc(q, qbar, cout, a, cin, clk, rst);
output q;
output qbar;
output cout;
input a;
input cin;
input clk;
input rst;
reg q,qbar,cout;
always @(negedge(clk),negedge(rst))
begin
if(rst==1'b0)
begin
q=1'b0;
qbar=1'b1;
cout=1'b0;
end
else
Dept. of Electronics and Communication Engg. VLSI Design lab 41
begin
q=a^cin;
qbar=~q;
cout=a&cin;
end
end
endmodule
WAVEFORM
Result:
Thus the outputs of accumulator are verified by simulating and synthesizing the VERILOG code.
Dept. of Electronics and Communication Engg. VLSI Design lab 42
EXP. NO.12
CMOS INVERTER AIM:
To create a library and build a schematic of an inverter, extract the layout and simulate
the output using cadence tool.
INVERTER
Schematic Capture
Schematic Entry
Creating a New library
1. In the Library Manager, execute File - New – Library. The new library form appears.
2. In the ―New Library‖ form, type ―myDesignLib‖ in the Name section.
3. In the field of Directory section, verify that the path to the library is set
to ~/Database/cadence_analog_labs_613 and click OK.
4. In the next ―Technology File for New library‖ form, select option Attach to an existing
techfile and click OK.
5. In the ―Attach Design Library to Technology File‖ form, select gpdk180 from the cyclic
field and click OK.
6. After creating a new library you can verify it from the library manager.
7. If you right click on the ―myDesignLib‖ and select properties, you will find that gpdk180
library is attached as techlib to ―myDesignLib‖.
Creating a Schematic Cellview
Dept. of Electronics and Communication Engg. VLSI Design lab 43
1. In the CIW or Library manager, execute File – New – Cellview.
2. Set up the New file form as follows:
3. Click OK when done the above settings. A blank schematic window for the Inverter design
appears.
Adding Components to schematic
1. In the Inverter schematic window, click the Instance fixed menu
icon to display the Add Instance form.
2. Click on the Browse button. This opens up a Library browser from which you
can select components and the symbol view .
3. After you complete the Add Instance form, move your cursor to the
schematic window and click left to place a component.
This is a table of components for building the Inverter schematic.
If you place a component with the wrong parameter values, use the
Edit— Properties— Objects command to change the parameters.
Use the Edit— Move command if you place components in the
wrong location.
You can rotate components at the time you place them, or use the
Edit— Rotate command after they are placed.
4. After entering components, click Cancel in the Add Instance form
or press Esc with your cursor in the schematic window.
Adding pins to Schematic
1. Click the Pin fixed menu icon in the schematic window.
Library name Cell Name Properties/Comments
gpdk180 pmos For M0: Model name = pmos1, W= wp,
L=180n
gpdk180 nmos For M1: Model name = nmos1, W= 2u,
L=180n
Dept. of Electronics and Communication Engg. VLSI Design lab 44
You can also execute Create — Pin or press p.
The Add pin form appears.
2. Type the following in the Add pin form in the exact order leaving space
between the pin names.
Pin Names Direction
vin Input
vout Output
Make sure that the direction field is set to input/output/inputOutput when placing the
input/output/inout pins respectively and the Usage field is set to schematic.
3. Select Cancel from the Add – pin form after placing the pins.
In the schematic window, execute Window— Fit or press the f bindkey.
Adding Wires to a Schematic
Add wires to connect components and pins in the design.
1. Click the Wire (narrow) icon in the schematic window.
You can also press the w key, or execute Create — Wire (narrow).
2. In the schematic window, click on a pin of one of your components as the first
point for your wiring. A diamond shape appears over the starting point of this wire.
3. Follow the prompts at the bottom of the design window and click left on the
destination point for your wire. A wire is routed between the source and destination points.
4. Complete the wiring as shown in figure and when done wiring press ESC key in the schematic
window to cancel wiring.
Saving the Design
1. Click the Check and Save icon in the schematic editor window.
2. Observe the CIW output area for any errors.
Symbol Creation
1. In the Inverter schematic window, execute
Dept. of Electronics and Communication Engg. VLSI Design lab 45
Create — Cellview— From Cellview.
2. Verify that the From View Name field is set to schematic, and the
To View Name field is set to symbol, with the Tool/Data Type set
as SchematicSymbol.
3. Click OK in the Cellview From Cellview form.
4. Modify the Pin Specifications as follows:
5. Click OK in the Symbol Generation Options form.
6. A new window displays an automatically created Inverter symbol
as shown here.
Editing a Symbol
In this section we will modify the inverter symbol to look like a Inverter gate symbol.
1. Move the cursor over the automatically generated symbol, until the green rectangle
is highlighted, click left to select it.
2. Click Delete icon in the symbol window, similarly select the red rectangle and
delete that.
3. Execute Create – Shape – polygon, and draw a shape similar to triangle.
4. After creating the triangle press ESC key.
5. Execute Create – Shape – Circle to make a circle at the end of triangle.
6. You can move the pin names according to the location.
7. Execute Create — Selection Box. In the Add Selection Box form, click Automatic.
Dept. of Electronics and Communication Engg. VLSI Design lab 46
A new red selection box is automatically added.
8. After creating symbol, click on the save icon in the symbol editor window to save the symbol.
In the symbol editor, execute File — Close to close the symbol view window.
Building the Inverter_Test Design
1. In the CIW or Library Manager, execute File— New— Cellview.
2. Set up the New File form.
3. Click OK when done. A blank schematic window for the Inverter_Test design appears.
Building the Inverter_Test Circuit 1. Using the component list and Properties/Comments in this table,
build the Inverter_Test schematic.
Note: Remember to set the values for VDD and VSS. Otherwise, your circuit will have no
power.
2. Add the above components using Create — Instance or by pressing I.
3. Click the Wire (narrow) icon and wire your schematic.
4. Click Create — Wire Name or press L to name the input (Vin) and output (Vout) wires as
in the below schematic.
4. Click on the Check and Save icon to save the design.
5. The schematic should look like this.
Library name Cellview name Properties/Comments
myDesignLib Inverter Symbol
analogLib vpulse v1=0, v2=1.8,td=0 tr=tf=1ns,
ton=10n, T=20n
analogLib vdc, gnd vdc=1.8
Dept. of Electronics and Communication Engg. VLSI Design lab 47
6. Leave your Inverter_Test schematic window open for the next section.
Analog Simulation with Spectre
Starting the Simulation Environment
Start the Simulation Environment to run a simulation.
1. In the Inverter_Test schematic window, execute
Launch – ADE L
The Virtuoso Analog Design Environment (ADE) simulation window appears.
Choosing a Simulator
Set the environment to use the Spectre® tool, a high speed, highly accurate
analog simulator. Use this simulator with the Inverter_Test design, which is made-up of analog
components.
1. In the simulation window (ADE), execute
Setup— Simulator/Directory/Host.
2. In the Choosing Simulator form, set the Simulator field to spectre
(Not spectreS) and click OK.
Setting the Model Libraries
The Model Library file contains the model files that describe the nmos and pmos devices
during simulation.
1. In the simulation window (ADE),
Execute Setup - Model Libraries.
Dept. of Electronics and Communication Engg. VLSI Design lab 48
The Model Library Setup form appears. Click the browse button to add gpdk.scs if not
added by default as shown in the Model Library Setup form.
Remember to select the section type as stat in front of the gpdk.scs file.
2. To complete the Model Library Setup, move the cursor and click OK.
Choosing Analyses
This section demonstrates how to view and select the different types of analyses to
complete the circuit when running the simulation.
1. In the Simulation window (ADE), click the Choose - Analyses icon.
You can also execute Analyses - Choose.
The Choosing Analysis form appears. This is a dynamic form, the bottom of the form
changes based on the selection above.
2. To setup for transient analysis
a. In the Analysis section select tran
b. Set the stop time as 200n
c. Click at the moderate or Enabled button at the bottom, and then click Apply.
3. To set up for DC Analyses:
a. In the Analyses section, select dc.
b. In the DC Analyses section, turn on Save DC Operating Point.
c. Turn on the Component Parameter.
d. Double click the Select Component, Which takes you to the schematic window.
e. Select input signal vpulse source in the test schematic window.
f. Select ―DC Voltage‖ in the Select Component Parameter form and click OK.
f. In the analysis form type start and stop voltages as 0 to 1.8 respectively.
g. Check the enable button and then click Apply.
4. Click OK in the Choosing Analyses Form.
Setting Design Variables
Set the values of any design variables in the circuit before simulating.
Otherwise, the simulation will not run.
1. In the Simulation window, click the Edit Variables icon.
The Editing Design Variables form appears.
2. Click Copy From at the bottom of the form.
The design is scanned and all variables found in the design are listed.
In a few moments, the wp variable appears in the Table of Design variables section.
Dept. of Electronics and Communication Engg. VLSI Design lab 49
3. Set the value of the wp variable:
With the wp variable highlighted in the Table of Design Variables,
click on the variable name wp and enter the following:
Value(Expr) 2u
Click Change and notice the update in the Table of Design Variables.
3. Click OK or Cancel in the Editing Design Variables window.
Selecting Outputs for Plotting
1. Execute Outputs – To be plotted – Select on Schematic in the simulation window.
2. Follow the prompt at the bottom of the schematic window, Click on output
net Vout, input net Vin of the Inverter. Press ESC with the cursor in the schematic after
selecting it.
Running the Simulation
1. Execute Simulation – Netlist and Run in the simulation window to start the
Simulation or the icon, this will create the netlist as well as run the simulation.
2. When simulation finishes, the Transient, DC plots automatically will be popped up along with
log file.
Dept. of Electronics and Communication Engg. VLSI Design lab 50
Saving the Simulator State
1. In the Simulation window, execute Session – Save State.
The Saving State form appears.
2. Set the Save as field to state1_inv and make sure all options are selected under
what to save field.
3. Click OK in the saving state form. The Simulator state is saved.
Loading the Simulator State
1. From the ADE window execute Session – Load State.
2. In the Loading State window, set the State name to state1_inv as shown
3. Click OK in the Loading State window.
Parametric Analysis
Starting the Parametric Analysis Tool
1. In the Simulation window, execute Tools—Parametric Analysis.
The Parametric Analysis form appears.
2. In the Parametric Analysis form, execute
Setup—Pick Name For Variable—Sweep 1.
3. In the selection window, double click left on wp.
The Variable Name field for Sweep 1 in the Parametric Analysis
form is set to wp.
4. Change the Range Type and Step Control fields in the Parametric
Analysis form as shown below:
Range Type From/To From 1u To 10u
Step Control Auto Total Steps 10
These numbers vary the value of the wp of the pmos between 1um and 10um at ten evenly
spaced intervals.
5. Execute Analysis—Start.
Dept. of Electronics and Communication Engg. VLSI Design lab 51
Creating Layout View of Inverter
1. From the Inverter schematic window menu execute
Launch – Layout XL. A Startup Option form appears.
2. Select Create New option. This gives a New Cell View Form
3. Check the Cellname (Inverter), Viewname (layout).
4. Click OK from the New Cellview form.
LSW and a blank layout window appear along with schematic window.
Adding Components to Layout
1. Execute Connectivity – Generate – All from Source or click the icon in the layout
editor window, Generate Layout form appears. Click OK which imports the schematic
components in to the Layout window automatically.
2. Re arrange the components with in PR-Boundary as shown in the next page.
3. To rotate a component, Select the component and execute Edit –Properties. Now select the
degree of rotation from the property edit form.
4. To Move a component, Select the component and execute Edit -Move command.
Dept. of Electronics and Communication Engg. VLSI Design lab 52
Making interconnection
1. Execute Connectivity –Nets – Show/Hide selected Incomplete Nets or click the
icon in the Layout Menu.
2. Move the mouse pointer over the device and click LMB to get the connectivity information,
which shows the guide lines (or flight lines) for the inter connections of the components.
3. From the layout window execute Create – Shape – Path/ Create wire or Create – Shape –
Rectangle (for vdd and gnd bar) and select the appropriate Layers from the LSW window and
Vias for making the inter connections
Creating Contacts/Vias
You will use the contacts or vias to make connections between two different layers.
1. Execute Create — Via or select command to place different Contacts, as given in
below table
Connection Contact Type
For Metal1- Poly
Connection
Metal1-Poly
For Metal1- Psubstrate
Connection
Metal1-Psub
For Metal1- Nwell
Connection
Metal1-Nwell
Saving the design
1. Save your design by selecting File — Save or click to save the layout, and layout
should appear as below.
Dept. of Electronics and Communication Engg. VLSI Design lab 53
Physical Verification
Assura DRC
Running a DRC
1. Open the Inverter layout form the CIW or library manger if you have closed that.
Press shift – f in the layout window to display all the levels.
2. Select Assura - Run DRC from layout window.
The DRC form appears. The Library and Cellname are taken from the current
design window, but rule file may be missing. Select the Technology as gpdk180. This
automatically loads the rule file.
3. Click OK to start DRC.
4. A Progress form will appears. You can click on the watch log file to see the log
file.
5. When DRC finishes, a dialog box appears asking you if you want to view your
DRC results, and then click Yes to view the results of this run.
6. If there any DRC error exists in the design View Layer Window (VLW) and Error
Layer Window (ELW) appears. Also the errors highlight in the design itself.
7. Click View – Summary in the ELW to find the details of errors.
8. You can refer to rule file also for more information, correct all the DRC errors and
Re – run the DRC.
9. If there are no errors in the layout then a dialog box appears with No DRC errors
found written in it, click on close to terminate the DRC run.
ASSURA LVS
In this section we will perform the LVS check that will compare the schematic netlist and
the layout netlist.
Running LVS
1. Select Assura – Run LVS from the layout window.
The Assura Run LVS form appears. It will automatically load both the schematic and layout
view of the cell.
2. Change the following in the form and click OK.
3. The LVS begins and a Progress form appears.
4. If the schematic and layout matches completely, you will get the form displaying Schematic
and Layout Match.
Dept. of Electronics and Communication Engg. VLSI Design lab 54
5. If the schematic and layout do not matches, a form informs that the LVS completed
successfully and asks if you want to see the results of this run.
6. Click Yes in the form.
LVS debug form appears, and you are directed into LVS debug environment.
7. In the LVS debug form you can find the details of mismatches and you need to
correct all those mismatches and Re – run the LVS till you will be able to match the
schematic with layout.
Assura RCX
In this section we will extract the RC values from the layout and perform analog circuit
simulation on the designs extracted with RCX.
Before using RCX to extract parasitic devices for simulation, the layout should
match with schematic completely to ensure that all parasites will be backannoted to the
correct schematic nets.
Running RCX
1. From the layout window execute Assura – Run RCX.
2. Change the following in the Assura parasitic extraction form. Select output type under Setup
tab of the form.
3. In the Extraction tab of the form, choose Extraction type, Cap Coupling Mode and specify the
Reference node for extraction.
4. In the Filtering tab of the form, Enter Power Nets as vdd!, vss! and Enter Ground Nets as
gnd!
5. Click OK in the Assura parasitic extraction form when done.
The RCX progress form appears, in the progress form click Watch log file to see
the output log file.
5. When RCX completes, a dialog box appears, informs you that Assura RCX run
Completed successfully.
6. You can open the av_extracted view from the library manager and view the parasitic.
Dept. of Electronics and Communication Engg. VLSI Design lab 55
Creating the Configuration View
In this section we will create a config view and with this config view we will run the
simulation with and without parasitic.
1. In the CIW or Library Manager, execute File – New – Cellview
2. In the Create New file form, set the following:
3. Click OK in create New File form.
The Hierarchy Editor form opens and a New Configuration form opens in front of it.
4. Click Use template at the bottom of the New Configuration form and select
Spectre in the cyclic field and click OK.
The Global Bindings lists are loaded from the template.
5. Change the Top Cell View to schematic and remove the default entry from the
Library List field.
6. Click OK in the New Configuration form.
The hierarchy editor displays the hierarchy for this design using table format.
7. Click the Tree View tab. The design hierarchy changes to tree format.
8. Save the current configuration.
9. Close the Hierarchy Editor window. Execute File – Close Window.
To run the Circuit without Parasites
1. From the Library Manager open Inverter_Test Config view.
Open Configuration or Top cellview form appears.
2. In the form, turn on the both cyclic buttons to Yes and click OK.
The Inverter_Test schematic and Inverter_Test config window appears. Notice the
window banner of schematic also states Config: myDesignLib Inverter_Test config.
3. Execute Launch – ADE L from the schematic window.
Dept. of Electronics and Communication Engg. VLSI Design lab 56
4. Now you need to follow the same procedure for running the simulation. Executing Session–
Load state, the Analog Design Environment window loads the previous state.
5. Click Netlist and Run icon to start the simulation.
The simulation takes a few seconds and then waveform window appears.
6. In the CIW, note the netlisting statistics in the Circuit inventory section. This
list includes all nets, designed devices, source and loads. There are no
parasitic components. Also note down the circuit inventory section.
Measuring the Propagation Delay
1. In the waveform window execute Tools – Calculator.
The calculator window appears.
2. From the functions select delay, this will open the delay data panel.
3. Place the cursor in the text box for Signal1, select the wave button and select
the input waveform from the waveform window.
4. Repeat the same for Signal2, and select the output waveform.
5. Set the Threshold value 1 and Threshold value 2 to 0.9, this directs the
calculator to calculate delay at 50% i.e. at 0.9 volts.
6. Execute OK and observe the expression created in the calculator buffer.
7. Click on Evaluate the buffer icon to perform the calculation, note down the value returned
after execution.
8. Close the calculator window.
To run the Circuit with Parasites
In this exercise, we will change the configuration to direct simulation of the av_extracted view
which contains the parasites.
1. Open the same Hierarchy Editor form, which is already set for Inverter_Test config.
2. Select the Tree View icon: this will show the design hierarchy in the tree format.
3. Click right mouse on the Inverter schematic.
A pull down menu appears. Select av_extracted view from the Set Instance view menu, the
View to use column now shows av_extracted view.
4. Click on the Recompute the hierarchy icon, the configuration is now updated from
schematic to av_extracted view.
6. From the Analog Design Environment window click Netlist and Run to
start the simulation again.
7. When simulation completes, note the Circuit inventory conditions, this time the list shows
all nets, designed devices, sources and parasitic devices as well.
Dept. of Electronics and Communication Engg. VLSI Design lab 57
8. Calculate the delay again and match with the previous one. Now you can conclude how much
delay is introduced by these parasites, now our main aim should to minimize the delay due to
these parasites so number of iteration takes place for making an optimize layout.
Generating Stream Data
Streaming Out the Design
1. Select File – Export – Stream from the CIW menu and Virtuoso Xstream out form appears
change the following in the form.
2. Click on the Options button.
3. In the StreamOut-Options form select under Layers tab and click OK.
4. In the Virtuoso XStream Out form, click Translate button to start the stream translator.
5. The stream file Inverter.gds is stored in the specified location.
Streaming In the Design
1. Select File – Import – Stream from the CIW menu and change the following
in the form.
You need to specify the gpdk180_oa22.tf file. This is the entire technology file that
has been dumped from the design library.
2. Click on the Options button.
3. In the StreamOut-Options form select under Layers tab and click OK.
4. In the Virtuoso XStream Out form, click Translate button to start the stream translator.
5. From the Library Manager open the Inverter cellview from the GDS_LIB
library and notice the design.
6. Close all the windows except CIW window, which is needed for the next lab.
Result:
Thus the schematic of CMOS Inverter has been created and output has been simulated.
EXP. NO.13
DIFFERENTIAL AMPLIFIER
AIM:
To create a library and build a schematic of Differential amplifier and simulate the output
using cadence tool, calculate gain, bandwidth and CMRR.
Schematic Capture
Dept. of Electronics and Communication Engg. VLSI Design lab 58
Creating a Schematic cellview
Open a new schematic window in the myDesignLib library and build the
Differntial_Amplifier design.
1. In the CIW or Library manager, execute File – New – Cellview. Set up the Create New file
form as follows:
3. Click OK when done. A blank schematic window for the design appears.
Adding Components to schematic
1. In the Differential Amplifier schematic window, execute Create— Instance to display the
Add Instance form.
2. Click on the Browse button. This opens up a Library browser from which you
can select components and the Symbol view .
You will update the Library Name, Cell Name, and the property values
given in the table on the next page as you place each component.
3. After you complete the Add Instance form, move your cursor to the
Dept. of Electronics and Communication Engg. VLSI Design lab 59
schematic window and click left to place a component.
4. After entering components, click Cancel in the Add Instance form
or press Esc with your cursor in the schematic window
Adding pins to Schematic
Use Create – Pin or the menu icon to place the pins on the schematic window.
1. Click the Pin fixed menu icon in the schematic window.
You can also execute Create – Pin or press p. The Add pin form appears.
2. Type the following in the Add pin form in the exact order leaving space
between the pin names.
Pin Names Direction
Idc,V1,V2 Input
Vout Output
vdd, vss, InputOutput
Make sure that the direction field is set to input/ouput/inputoutput when placing the
input/output/inout pins respectively and the Usage field is set to schematic.
3. Select Cancel from the Add pin form after placing the pins.
In the schematic window, execute View— Fit or press the f bindkey.
Adding Wires to a Schematic
Add wires to connect components and pins in the design.
1. Click the Wire (narrow) icon in the schematic window.
You can also press the w key, or execute Create - Wire (narrow).
2. Complete the wiring as shown in figure and when done wiring press ESC key in the schematic
window to cancel wiring.
Library name Cell Name Properties/Comments
gpdk180 nmos Model Name = nmos1 (NM0, NM1) ;
W= 3u ; L= 1u
gpdk180 nmos Model Name =nmos1 (NM2, NM3) ;
W= 4.5u ; L= 1u
gpdk180 pmos Model Name =pmos1 (PM0, PM1);
W= 15u ; L= 1u
Dept. of Electronics and Communication Engg. VLSI Design lab 60
Saving the Design
1. Click the Check and Save icon in the schematic editor window.
2. Observe the CIW output area for any errors.
Symbol Creation
1. In the Differential Amplifier schematic window, execute
Create — Cellview— From Cellview.
The Cellview from Cellview form appears. With the Edit Options function active, you can
control the appearance of the symbol to generate.
2. Verify that the From View Name field is set to schematic, and the To View Name field is set
to symbol, with the Tool/Data Type set as SchematicSymbol.
3. Click OK in the Cellview from Cellview form. The Symbol Generation Form appears.
4. Modify the Pin Specifications as in the below symbol.
5. Click OK in the Symbol Generation Options form.
6. A new window displays an automatically created Differential Amplifier symbol.
7. Modifying automatically generated symbol so that it looks like below Differential Amplifier
symbol.
8. Execute Create— Selection Box. In the Add Selection Box form, click Automatic. A new
red selection box is automatically added.
9. After creating symbol, click on the save icon in the symbol editor window to save the symbol.
In the symbol editor, execute File— Close to close the symbol view window.
Building the Diff_amplifier_test Design
Creating the Differential Amplifier Test Cellview
1. In the CIW or Library Manager, execute File— New— Cellview.
2. Set up the Create New File form as follows:
Dept. of Electronics and Communication Engg. VLSI Design lab 61
3. Click OK when done. A blank schematic window for the Diff_ amplifier_test design appears.
Building the Diff_amplifier_test Circuit
1. Using the component list and Properties/Comments in this table,
build the Diff_amplifier_test schematic.
Library name Cellview name Properties/Comments
myDesignLib Diff_amplifier Symbol
analogLib
vsin
Define specification as
AC Magnitude= 1; Amplitude= 5m;
Frequency= 1K
analogLib vdd, vss, gnd Vdd=2.5 ; Vss= -2.5
analogLib Idc Dc current = 30u
Note: Remember to set the values for VDD and VSS. Otherwise your circuit will have no power.
3. Click the Wire (narrow) icon and wire your schematic.
Tip: You can also press the w key, or execute Create— Wire (narrow).
4. Click on the Check and save icon to save the design.
5. The schematic should look like this.
Dept. of Electronics and Communication Engg. VLSI Design lab 62
6. Leave your Diff_amplifier_test schematic window open for the next section.
Analog Simulation with Spectre
Starting the Simulation Environment
1. In the Diff_amplifier_test schematic window, execute Launch – ADE L. The Analog Design
Environment simulation window appears.
Choosing a Simulator
1. In the simulation window or ADE, execute
Setup— Simulator/Directory/Host.
2. In the Choosing Simulator form, set the Simulator field to spectre
(Not spectreS) and click OK.
Setting the Model Libraries
1. Click Setup - Model Libraries.
Note: Step 2 should be executed only if the model file not loaded by default.
2. In the Model Library Setup form, click Browse and find the gpdk180.scs file
in the ./models/spectre directory.
Select stat in Section field, click Add and click OK.
Dept. of Electronics and Communication Engg. VLSI Design lab 63
Choosing Analyses
1. In the Simulation window, click the Choose - Analyses icon.
You can also execute Analyses - Choose.
The Choosing Analysis form appears. This is a dynamic form, the bottom of the form
changes based on the selection above.
2. To setup for transient analysis
a. In the Analysis section select tran
b. Set the stop time as 5m
c. Click at the moderate or Enabled button at the bottom, and then click Apply.
3. To set up for DC Analyses:
a. In the Analyses section, select dc.
b. In the DC Analyses section, turn on Save DC Operating Point.
c. Turn on the Component Parameter
d. Double click the Select Component, Which takes you to the schematic window.
e. Select input signal Vsin for dc analysis.
f. In the analysis form, select start and stop voltages as -5 to 5 respectively.
g. Check the enable button and then click Apply.
4. To set up for AC Analyses form is shown in the previous page.
a. In the Analyses section, select ac.
b. In the AC Analyses section, turn on Frequency.
c. In the Sweep Range section select start and stop frequencies as 150 to 100M
d. Select Points per Decade as 20.
e. Check the enable button and then click Apply.
5. Click OK in the Choosing Analyses Form.
Selecting Outputs for Plotting
Select the nodes to plot when simulation is finished.
1. Execute Outputs – To be plotted – Select on Schematic in the simulation window.
2. Follow the prompt at the bottom of the schematic window, Click on output
net Vo, input net Vin of the Diff_amplifier. Press ESC with the cursor in the schematic after
selecting node.
Does the simulation window look like this?
Dept. of Electronics and Communication Engg. VLSI Design lab 64
Running the Simulation
1. Execute Simulation – Netlist and Run in the simulation window to start the
simulation, this will create the netlist as well as run the simulation.
2. When simulation finishes, the Transient, DC and AC plots automatically will be popped up
along with netlist.
To Calculate the gain of Differential pair:
Configure the Differential pair schematic as shown below –
Dept. of Electronics and Communication Engg. VLSI Design lab 65
p
Now, open the ADE L, from LAUNCH ADE L , choose the analysis set the ac response and
run the simulation, from Simulation Run. Next go to ResultsDirect plot select AC dB20
and output from the schematic and press escape. The following waveform appears as shown
below –
To Calculate the BW of the Differential pair :
Open the calculator and select the bandwidth option, select the waveform of the gain in dB and
press Evaluate the buffer -
Dept. of Electronics and Communication Engg. VLSI Design lab 66
To Calculate the CMRR of the Differential pair :
Configure the Differential pair schematic to calculate the differential gain as shown below –
In the ADE L, plot the ac response with gain in dB. Measure the gain at 100hz and at
100Mhz,note down the value of the gain in dB, as shown below –
Configure the Differential pair schematic to calculate the common-mode gain as shown below –
Dept. of Electronics and Communication Engg. VLSI Design lab 67
In the ADE L, plot the ac response with gain in dB. Measure the gain at 100hz and at 100Mhz,
note down the value of the gain in dB, as shown below –
Dept. of Electronics and Communication Engg. VLSI Design lab 68
Calculate the CMRR = | | , add the gains in dB i.e., Ad – (-Ac). For the output impedance note
down the output resistance of the pmos and nmos transistors at the ouput side, and use the
necessary equation like r01|| r02 .
Saving the Simulator State
We can save the simulator state, which stores information such as model library file,
outputs, analysis, variable etc. This information restores the simulation environment
without having to type in all of setting again.
1. In the Simulation window, execute Session – Save State.
The Saving State form appears.
2. Set the Save as field to state1_diff_amp and make sure all options are selected under
what to save field. Click OK in the saving state form. The Simulator state is saved.
Creating a Layout View of Diff_ Amplifier
1. From the Diff_amplifier schematic window menu execute
Launch – Layout XL. A Startup Option form appears.
2. Select Create New option. This gives a New Cell View Form
3. Check the Cellname (Diff_amplifier), Viewname (layout).
4. Click OK from the New Cellview form.
LSW and a blank layout window appear along with schematic window.
Adding Components to Layout
1. Execute Connectivity – Generate – All from Source or click the icon in the layout
editor window, Generate Layout form appears. Click OK which imports the schematic
components in to the Layout window automatically.
2. Re arrange the components with in PR-Boundary as shown in the next page.
3. To rotate a component, Select the component and execute Edit –Properties. Now select the
degree of rotation from the property edit form.
4. To Move a component, Select the component and execute Edit -Move command.
Dept. of Electronics and Communication Engg. VLSI Design lab 69
Making interconnection
1. Execute Connectivity –Nets – Show/Hide selected Incomplete Nets or click the
icon in the Layout Menu.
2. Move the mouse pointer over the device and click LMB to get the connectivity information,
which shows the guide lines (or flight lines) for the inter connections of the components.
3. From the layout window execute Create – Shape – Path or Create – Shape – Rectangle (for
vdd and gnd bar) and select the appropriate Layers from the LSW window and Vias for making
the inter connections
Creating Contacts/Vias
You will use the contacts or vias to make connections between two different layers.
1. Execute Create — Via or select command to place different Contacts, as given in
below table
Connection Contact Type
For Metal1- Poly
Connection
Metal1-Poly
For Metal1- Psubstrate
Connection
Metal1-Psub
For Metal1- Nwell
Connection
Metal1-Nwell
Saving the design
1. Save your design by selecting File — Save or click to save the layout and layout
should appear as below.
Dept. of Electronics and Communication Engg. VLSI Design lab 70
Physical Verification
Assura DRC
Running a DRC
1. Open the Differential_Amplifier layout form the CIW or library manger if you have closed
that.Press shift – f in the layout window to display all the levels.
2. Select Assura - Run DRC from layout window.
The DRC form appears. The Library and Cellname are taken from the current
design window, but rule file may be missing. Select the Technology as gpdk180. This
automatically loads the rule file.
3. Click OK to start DRC.
4. A Progress form will appears. You can click on the watch log file to see the log file.
5. When DRC finishes, a dialog box appears asking you if you want to view your
DRC results, and then click Yes to view the results of this run.
6. If there any DRC error exists in the design View Layer Window (VLW) and Error
Layer Window (ELW) appears. Also the errors highlight in the design itself.
7. Click View – Summary in the ELW to find the details of errors.
8. You can refer to rule file also for more information, correct all the DRC errors and
Dept. of Electronics and Communication Engg. VLSI Design lab 71
Re – run the DRC.
9. If there are no errors in the layout then a dialog box appears with No DRC errors
found written in it, click on close to terminate the DRC run.
ASSURA LVS
Running LVS
1. Select Assura – Run LVS from the layout window.
The Assura Run LVS form appears. The layout name is already in the form. Assura
fills in the layout name from the cellview in the layout window.
2. Verify the following in the Run Assura LVS form.
3. The LVS begins and a Progress form appears.
4. If the schematic and layout matches completely, you will get the form displaying Schematic
and Layout Match.
5. If the schematic and layout do not matches, a form informs that the LVS completed
successfully and asks if you want to see the results of this run.
6. Click Yes in the form.LVS debug form appears, and you are directed into LVS debug
environment.
7. In the LVS debug form you can find the details of mismatches and you need to
correct all those mismatches and Re – run the LVS till you will be able to match the
schematic with layout.
Assura RCX Running RCX
1. From the layout window execute Assura – Run RCX.
2. Change the following in the Assura parasitic extraction form. Select output type under Setup
tab of the form.
3. In the Extraction tab of the form, choose Extraction type, Cap Coupling Mode and specify the
Reference node for extraction.
4. In the Filtering tab of the form, Enter Power Nets as vdd!, vss! and Enter Ground Nets as
gnd! 5. Click OK in the Assura parasitic extraction form when done.
The RCX progress form appears, in the progress form click Watch log file to see
the output log file.
5. When RCX completes, a dialog box appears, informs you that Assura RCX run
completed successfully. 6. You can open the av_extracted view from the library manager and view the parasitic.
Result:
Thus the schematic of Differential Amplifier has been created and output has been
simulated.
Dept. of Electronics and Communication Engg. VLSI Design lab 72
EXP. NO.14
10 BIT NUMBER CONTROLLED OSCILLATOR (NCO) AIM:
To design a 10 bit number controlled oscillator and simulate the output using cadence
tool.
10 Bit number controlled oscillator
The NCO directory contains rclabs folder. Inside rclabs folder you will see many other
directories but for IUS, change the directory to Simulation and for Synthesis and P&R select
work directory
Lab directory details:
Simulation Contains the lab experiments including
Testbences for simulating the codes.
work It‘s a place to run Synthesis and P&R for NCO.
File(s) Description:
mem.v mux_2to1.v phase_inc.v testbench.v top.v
Compile , Elaborate and Simulate using Irun Utility:
Run the below command
irun mem.v mux_2to1.v phase_inc.v testbench.v top.v –access +rwc –mess –gui
1. Now the Console & Design Browser window opens
2. Before proceeding to the next step analyze the messages in the terminal window
The -gui option opens the Console and Design Browser windows.
Tour the Graphical Interface
1. Examine the Console window.
a. You can use the Menu Bar to run or step the simulation, set scopes and stops, show
the value of objects, and start other graphical tools.
b. You can use the Tool Bar to run, interrupt, reset, step, or next the simulation, and
shut down the interface or the simulation, or disconnect the simulation.
c. You can use the command line interface to the simulation in the I/O Region.
Dept. of Electronics and Communication Engg. VLSI Design lab 73
2. Examine the Design Browser window.
Open an existing Design Browser window or select the Windows— new — Design
Browser menu item or the Design Browser button.
a. Display the objects of a scope and their value in the Objects List pane (Select any
displayed scope in the Scope Tree pane).
b. Display the component instances of the scope (double-click the scope in the Scope
Tree pane).
3. Tour the Waveform window.
Open an existing Waveform window or select the Windows - New - Waveform
menu item or the Waveform button.The simulator creates a default SHM
database and sets a probe onany selected signals and opens a Waveform window
displaying the selected signals.
a. In the Design Browser window select all signals at the testbench scope.
b. Add the selected signal(s) to the Waveform window (select the Waveform button
or the Add Selected button or drag and drop the signals into the Waveform
window).Note: To add additional signals simply select them in any window and
click the Waveform button again.
Examine the Design and Testbench Hierarchy
In this section of the lab you visit the Source Browser, Schematic Tracer and
Waveform window.
1. In the Design Browser window select the top-level (mem_test) scope and select the Source
Browser button to send it to the target Source Browser window. As no such window yet
exists, this opens a Source Browser window displaying the source of the
Top-level unit, and makes it the default Source Browser target window.
2. In the Source Browser window ensure that just the top-level scope is selected (navigate up as
needed and Select—This Scope) and send it to the target Schematic Tracer window. As no
such window yet exists, this opens a Schematic Tracer window displaying the top-level unit, and
makes it the default Schematic Tracer target window, in which you:
a. Ensure that the top-level scope is still selected, and select the fill Module button,
to display the testbench content.
b. Select the Edit - Select - All menus item, and again select the fill Module button, to
Expand the second level content.
c. Select the Zoom Full button to fit all displayed elements.
3. In the Source Browser window ensure that just the top-level scope is selected and send it
tothe target Waveform window. As no such window yet exists, this opens a Waveform window
displaying the signals of the top-level unit, and makes it the default Waveform target window.
Dept. of Electronics and Communication Engg. VLSI Design lab 74
a. In the left sidebar, select the Design Browser tab toexpand the sidebar area and
display the embedded Design Browser.
--- Run the simulation until the next breakpoint, or for the
Duration entered in the time field (i.e 40ns).
--- Current Time range.
--- Move primary cursor to previous edge of select signal.
--- Reset the simulation back to time ― 0 ―.
Once the simulation is done you can see the following waveform window and console
window with the outputs.
Dept. of Electronics and Communication Engg. VLSI Design lab 75
Further follow the following steps:
1. Highlight the output pin(data_out[5:0]) and right click on it
2. Click on Trace and select Analog/Sample+Hold
Dept. of Electronics and Communication Engg. VLSI Design lab 76
3. Now select the symbol which is highlighted by red circle
3 . Now we can see based on the numerical value (hexadecimal) corresponding output
wave form can be seen.
1. Drag and observe the waveform for different numerical values
Result:
Thus the 10 bit number controlled oscillator has been designed and output has been
simulated using cadence tool.
Dept. of Electronics and Communication Engg. VLSI Design lab 77
EXP. NO.15
Automatic layout generation of NCO AIM:
To generate a layout automatically followed by post layout extraction and simulation of
the NCO.
Go to directory /NCO/rclabs/work.
Lets do the Synthesis first.
1. Invoke RTL Compiler by typing ―rc -gui‖ on your terminal window.
2. Give the path of the library w.r.t to the directory you are in using the command:
―set_attribute lib_search_path ../library‖
3 Give the path of the RTL files with respect to the directory you are in using the below
command:
―set_attribute hdl_search_path ../rtl‖
4 Read the library from the directory specified in giving the path for the library files in step 2
using the command:
―set_attribute library slow_normal.lib‖
―slow_normal.lib‖ is the name of the library file in the directory ―library‖. There is another
library there in that directory with name ―slow_highvt.lib‖. Any one of these two libraries
could be used at a time.
5 Read the RTL files from the directory specified in the path in step 3. The RTL files are in the
directory name ―rtl‖:
―read_hdl {mem.v mux_2to1.v phase_inc.v top.v}.
6 Now Elaborate the design using ―elaborate‖command.
7 Give the command to see the circuit in Tool window:
8. Give the standard delay constraints using:
―read_sdc ./constraints_top.g‖.
9. Synthesize the circuit using the command:
―synthesize -to_mapped -effort medium‖.
10. Write the hdl code in terms of library components for the synthesized circuit using the
command:
―write_hdl > nco.hdl‖
―nco.hdl‖ is the name of file in which the code gets write.
11. Similarly write the constraint file using
―write_sdc > nco.sdc‖.
12. Timing could be check using ―report timing‖.
13. Similarly for Gates ―report gates‖.
14. Check area using ―report area‖.
15. Check Power dissipation using ―report power‖.
After the Synthesis Physical Design can be done by invoking the tool ―Encounter Digital
Dept. of Electronics and Communication Engg. VLSI Design lab 78
implementation‖.
16. Go to Directory /NCO/rclabs/work.
17. Invoke the tool using ―encounter‖ or ―velocity‖.
8. Go the Tool window and click on the File and select Import Design. A new window will open.
19. Select the verilog files using browse button. A new window ―Netlist files‖ will open.
20. Click on the arrow button and select the verilog File ―NCO_gatelevel_uniq.v‖ and click the
Add button and then click the close button.
21. Click on Auto assign after top cell.
22. Similarly select the lef file by clicking the browse button and then add the lef file with name
―all.lef‖ in the lef directory.
23. Select the timing libraries. For maximum timing libraries select all libraries with ―slow‖ in
their name and for minimum timing libraries select all libraries with fast in their names.
Alternatively, instead of selecting all the libraries for Maximum timing libraries, type
―../lib/*slow*.lib‖ in space in front of Maximum Timing Libraries. This will select all the
slow libraries. Similarly in front of Minimum Timing Libraries write ―../lib/*fast*.lib‖.
24. Similarly select ―NCO.sdc‖ for timing constraint file.
25. In the Design Import window click on Advanced Tab. Select Power out of the list on the left
side of window. Enter the power nets as VDD and Ground nets as VSS.
26. Sele
ct
OK.
Clic
k on
Flo
orpl
an
and
sele
ct
―Sp
ecif
y
Flo
orpl
an‖.
Select
the
Aspect Ratio as per the requirement. Give some dimension in ―Core to left‖, ―Core to right‖,
―Core to top‖,―Core to bottom‖. e.g. give 30 to each. This is to create the space for Power rings
which will be created in power planning. Click OK and the Tool window will be look like as
below.
Dept. of Electronics and Communication Engg. VLSI Design lab 79
The core dimensions are changed.
28. Click on Floorplan and select Automatic Floorplan and select Plan Design. Click Ok. This
will automatically put the Macros if there are any in the design.
29. Next step is to do power planning. Click on power, select power planning and click on Add
Rings.
30. Select the top and bottom layer as Metal5, Left and Right as Metal6. Set the width as per the
requirement and taking the space between core boundary and I/O pad considerations. Select
the option for offset as ―center in channel‖ and click OK.
The power ring will get created in between the channel. The image on the next page is
showing the power ring created.
31. The next
step in
power
planning is to create power strips. Select Power, click Power Planning and click Add Stripe.
32. For adding the stripes, select metal layer as Metal 6 and chose direction as vertical(if
direction chosen is horizontal, chose metal layer as Metal 5). Click OK and the design will
Dept. of Electronics and Communication Engg. VLSI Design lab 80
get the vertical thin strips of type Metal 6.
33. After the power planning, go to Route and click Special Route. A new Window Sroute will
appear.
34. Click OK with all default settings. This is done to provide power to standard cells. The
horizontal blue coloured metal1 stripes created as a result of Special Route.
35. For
placement,
click on
place and
select
place and
click on Place Standard Cell.
Dept. of Electronics and Communication Engg. VLSI Design lab 81
36. Click OK on Place window and in physical view the blue coloured standard cells can be
seen as a result of placement of standard cells.
37. Before CTS, timing analysis has to be done for any setup violations. Click on Timing, and
select Report Timing. A Timing analysis window will get open. In the window select the
―Pre-CTS‖ as Design Stage and select the ―Setup‖ as Analysis Type.
Dept. of Electronics and Communication Engg. VLSI Design lab 82
38. Click OK to complet the Timing analysis. The timing information will get display on
terminal in tabular form. In the table displayed on the terminal under ―timeDesign
Summary‖, check for any negative value under WNS(Worst Negative Slack) and TNS(Total
Negative Slack). The terminal will look as the image below and Tool window as on next
page.
The multi-coloured lines visible in the tool window are the connections between standard cells
using metal layers. If any part of this design is Zoom-in, metal layers can be viewed easily.
Different colours show different metal .
Dept. of Electronics and Communication Engg. VLSI Design lab 83
39. If there is any of the negative slack value under WNS or TNS, click Optimize in Tool
window and Select Optimize Design. A new window ―Optimization‖ will get open. Select
―Pre-CTS‖ as Design Stage and ―Setup‖ as optimization type and click OK. The tool will
optimize the design and the optimized timing results will be displayed over terminal again.
Dept. of Electronics and Communication Engg. VLSI Design lab 84
In this case we did not get any negative slack, so this step is skipped here.
40. Go to Clock, click ―Synthesize Clock Tree‖, a new window ―Synthesize Clock Tree‖ will get
open.
41. Click on
Gen Spec
and a new
window
―Generate
Clock Spec‖ will open.
Dept. of Electronics and Communication Engg. VLSI Design lab 85
42. From Cells List, Select all clocks starting with ―CLK‖ and click on Add button to add them
to the Selected Cells. Select a name for Output specification.
43. Click OK. Then specify a name for Results Directory. and click OK. The tool window looks
like the image below.
44. Aga
Dept. of Electronics and Communication Engg. VLSI Design lab 86
in Perform the Timing by clicking on Timing and selecting Report Timing. Select ―Post-
CTS‖ under Design Stage and do the select ―Set-up‖ as Analysis Type.
45. Click Ok to perform the timing. The timing information will be displayed over the terminal
window. Again check for any negative slacks under WNS or TNS.
46. If
Dept. of Electronics and Communication Engg. VLSI Design lab 87
there is any negative value found for either of WNS or TNS then perform the Optimization
Technique to reduce the negative slack. No negative slack is found in the terminal image on
previous page so this step is skipped here.
47. Timing Analysis for ―Setup‖ as Analysis Type is done. Repeat Step 27 for performing timing
for ―Post CTS‖ as Design Stage and ―Hold‖ as Analysis Type. The tool will show the timing
results in the terminal window.
48. After Timing Analysis is performed, the time Design Summary is showing the negative slack
values for both TNS and WNS. Perform the Optimization. Go to Optimize and click on
Optimize Design. Select ―Post-CTS‖ as an ―HOLD‖ as the Optimization Type
Dept. of Electronics and Communication Engg. VLSI Design lab 88
49. Click OK to perform the Optimization and Tool will perform the optimization and displays
the optimized results in the terminal window under timeDesign Summary. The results of
Optimization can be seen on the next page in tabular form for both Setup and Hold mode. As
compare to the Timng Results performed for Hold mode in Step 30, the design has been
optimized and tabular results shows that all slack values are now positive values and no more
negative values for slack.
50. Perform Routing by clicking Route, and select NanoRoute and then click Route. A window
NaoRoute will open.
Dept. of Electronics and Communication Engg. VLSI Design lab 89
51. Click Ok to Perform Routing. The tool will Perform the Routing and the Routing statistics
can be seen on terminal window including DRC violations.
52. After routing tool window looks like the below image.
53. Perform the timing again. Go to Timing, seelct Report Timing and a Timing Analysis
window will get open. Select ―Post-Route‖ as the Design Stage and ―Setup‖ as Analysis
Type. Click Ok. The timing results will be displayed in terminal window for Set up mode.
Since there is no negative value of slack so design does not require optimization for Set-up mode
in Post-Route stage.
54. Repeat Step 36 for ―Post-Route‖ as Design Stage and ―Hold‖ as the Analysis Type. Click
OK. The timing results can be seen in the terminal window for hold mode.
As there is no negative value of slack, the optimization is not require to perform. The final view
of the circuit is as below:
Result:
Thus the automatic generation of NCO followed by post layout extraction and simulation
has been done using cadence tool.
Dept. of Electronics and Communication Engg. VLSI Design lab 90
Procedure to work in Xilinx software:
1. Open Xilinx 9.2i project navigator
2. Select file ‗new project‘
3. Give your project name and select the location to store the project
4. In the top level module select HDL and click Next
5. In the Device and Design flow for the project, select
Product category ----- All
Family -----------------Spartan 3E
Device ----------------- XC3S500E (or) XC3S100E
Package --------------- FT256 (or) TQ144
Speed grade ---------- -4
Top-Level module type ---- HDL
Synthesis tool --------------- XST (VHDL / Verilog)
Simulator -------------------- ISE Simulator (VHDL /Verilog)
Then click ‗Next‘ and ‗Finish‘