Code covered by the BSD License  

Highlights from
Adaptive Fault Masking With Incoherence Scoring

image thumbnail
from Adaptive Fault Masking With Incoherence Scoring by Baykant ALAGOZ
Matlab simulation environment for testing various voting algorithms

[S,Co]=fullAdder(A,B,C,StuckFaultList,StuckFaultType)
function [S,Co]=fullAdder(A,B,C,StuckFaultList,StuckFaultType)
% One Bit Full Adder fuction
% StuckFaultList=[0 0 0 1 1] 0:Faultyfree 1:Faulty
% StuckFaultType=[0 0 0 1 1] 0:Stuck_0 1:Stuck_1
net1=exor(A,B);
if StuckFaultList(1)==1
    net1=StuckFaultType(1);
end
net2=exor(C,net1);
if StuckFaultList(2)==1
    net2=StuckFaultType(2);
end
net3=A&B;
if StuckFaultList(3)==1
    net3=StuckFaultType(3);
end
net4=C&B;
if StuckFaultList(4)==1
    net4=StuckFaultType(4);
end
net5=C&A;
if StuckFaultList(5)==1
    net5=StuckFaultType(5);
end
S=net2;
Co=net3|net4|net5;

Contact us at files@mathworks.com