Bist Report
Bist Report
COLLEGE OF ENGINEERING®,
BENGALURU
(AUTONOMOUS INSTITUTION AFFILIATED TO VTU, BELAGAVI)
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
1
Index
Sl.No Title Page No.
1 Introduc on 3
2 Problem Statement and specifica ons 4
3 Circuit Under Test (Code+TB+Result) 4
4 Test Pa ern Generator (Code+TB+Result) 6
5 Output Response Analyzer (Code+TB+Result) 9
6 BIST Controller Design (Code+TB+Analysis) 12
7 Conclusion 18
2
Introduc on
The basic idea of BIST, in its most simple form, is to design a circuit so that
the circuit can test itself and determine whether it is “good” or “bad”
(fault-free or faulty, respec vely). This typically requires that addi onal circuitry
and func onality be incorporated into the design of the circuit to facilitate the
self-tes ng feature. This addi onal func onality must be capable of genera ng
test pa erns as well as providing a mechanism to determine if the output
responses of the circuit under test (CUT - in our case a 1-bit full adder) to the
test pa erns correspond to that of a fault-free circuit.
3
PROBLEM STATEMENT
Design and simula on of 1 bit Full Adder with complete BIST func onality.
Specifica ons :
4bit MISR for Output Response Analyzer (ORA).
3bit LFSR for Test Pa ern Genera on.
1 bit Full Adder CUT
Design of BIST controller
CODE:
module full_adder(
input a,
input b,
input cin,
output[1:0] dataIn );
parameter f_1 = 1'b0; // a stuck at 0
parameter f_2 = 1'b0; // r stuck at 0
4
parameter f_3 = 1'b0; // sum stuck at 1
wire p,q,r,a11,r1,sum1,sum,cout;
and f1(a11,~f_1,a);
xor x1(p,a11,b);
and a1(r,a11,b);
xor x2(sum1,p,cin);
or f3(sum,sum1,f_3);
and a2(q,p,cin);
and f2(r1,r,~f_2);
or o1(cout,q,r1);
assign dataIn = {sum,cout};
endmodule
TEST BENCH:
module CUT_tb;
reg a,b,cin;
wire sum,cout;
full_adder dut(a,b,cin,sum,cout);
ini al begin
a=1'b0;b=1'b0;cin=1'b0;
#10 a=1'b0;b=1'b0;cin=1'b1;
#10 a=1'b0;b=1'b1;cin=1'b0;
#10 a=1'b0;b=1'b1;cin=1'b1;
#10 a=1'b1;b=1'b0;cin=1'b0;
#10 a=1'b1;b=1'b0;cin=1'b1;
#10 a=1'b1;b=1'b1;cin=1'b0;
#10 a=1'b1;b=1'b1;cin=1'b1;
end
ini al begin #80 $finish; end
endmodule
5
SIMULATION RESULTS:
The LFSR has been seeded to 001. The LFSR has period of 7 (= 23 -1)
Next State Equa ons:
Q0* = Q2
Q1* = Q0 + Q2
Q2* = Q1
6
Test Pa erns generated
Q0 Q1 Q2
0 0 1
1 1 0
0 1 1
1 1 1
1 0 1
1 0 0
0 1 0
VERILOG CODE:
module ML_lfsr(data_out, complete, reset, clock);
input reset;
input clock;
begin
if(reset == 1)
begin
end
else
begin
7
lfsr_reg[0] <= lfsr_reg[2];
counter = counter + 1;
complete = 0;
else
complete = 1;
end
end
endmodule
TEST BENCH:
module tb_ML_lfsr;
reg clock,reset;
ini al
begin
clock = 1'b0;
end
always
#5 clock = ~clock;
ini al
begin
reset = 1'b1;
end
8
always #100 $finish;
endmodule
SIMULATION RESULTS:
9
VERILOG CODE:
module MISR_4bit(dataIn,reset,clock,dataOut);
input reset,clock;
begin
if(reset == 1)
else
begin
end
end
endmodule
TEST BENCH:
module MISR_4bit_tb;
reg clock,reset;
MISR_4bit dut(.dataIn(dataIn),.reset(reset),.clock(clock),.dataOut(dataOut));
ini al
begin
clock = 1'b0;
end
always
10
#5 clock = ~clock;
ini al
begin
reset = 1'b1;
dataIn = 2'b10;
#20 $finish;
end
endmodule
SIMULATION RESULTS:
11
BIST CONTROLLER DESIGN
VERILOG CODE:
module controller_new(clock,reset,w,x,y,data_out,dataIn ,dataOut,testmode, fault_detected);
input clock,reset,testmode;
wire a,b,cin;
wire finish;
begin
fault_detected = 0;
else
begin
if(finish == 1)
begin
if(golden_signature == dataOut)
fault_detected = 0;
else
12
fault_detected = 1;
end
end
end
endmodule
TEST BENCH:
module tb_controller_new;
// Inputs
reg clock;
reg reset;
reg w,x,y;
reg testmode;
// Outputs
controller_new uut (
ini al begin
clock = 0;
reset = 1;
w = 1; x=1; y=1;
testmode = 0;
end
ini al begin
13
#10 reset =1'b0;
testmode =1'b1;
end
endmodule
Sum Cout Q0 Q1 Q2 Q3
1 0 0 0 0 0
0 1 1 0 0 0
0 1 0 1 0 0
1 1 0 0 1 0
0 1 1 1 0 1
1 0 1 1 1 0
1 0 1 1 1 1
Golden Signature 0 0 1 1
14
OUTPUT WAVEFORM FOR FAULT a@0:
Sum Cout Q0 Q1 Q2 Q3
1 0 0 0 0 0
0 1 1 0 0 0
0 1 1 0 0 0
1 1 0 1 0 0
0 1 0 0 1 0
1 0 1 0 0 1
1 0 1 1 0 0
The faulty signature 1110 is different from the golden signature 0011 and
hence the fault a@0 is ge ng detected.
15
OUTPUT WAVEFORM FOR FAULT r@0:
Sum Cout Q0 Q1 Q2 Q3
1 0 0 0 0 0
0 1 1 0 0 0
0 1 0 0 0 0
1 1 0 1 0 0
0 1 1 1 1 0
1 0 0 0 1 1
1 0 0 1 0 1
The faulty signature 0010 is different from the golden signature 0011 and
hence the fault r@0 is ge ng detected.
16
OUTPUT WAVEFORM FOR FAULT sum@1:
Sum Cout Q0 Q1 Q2 Q3
1 0 0 0 0 0
1 1 1 0 0 0
1 1 1 1 0 0
1 1 1 0 1 0
1 1 1 1 0 1
1 0 0 1 1 0
1 0 1 1 1 1
The faulty signature is matching with the golden signature 0011 and hence
the fault sum@1 is undetected.
17
CONCLUSION
BIST verifies all or a por on of the internal func onality of the IC. It is
becoming an integral part of many me cri cal circuits recently. In this
experien al learning assignment, a complete BIST design was implemented for
full adder which included Output Response Analyzer (ORA) , Test Pa ern
Generator.
The faults were injected in the Circuit Under Test and analysis was done
whether the BIST is able to detect the faults.
The simula on results obtained were verified with hand calcula ons.
18