Revision 2,
423 bytes
checked in by ttvmrc00, 14 years ago
(diff) |
|
Line | |
---|
1 | module MajorityVoter (A, B, C, out ,fault1, fault0); |
---|
2 | input A,B,C; |
---|
3 | input fault1, fault0; |
---|
4 | output out; |
---|
5 | wor wi1, wi2, wi3; |
---|
6 | wor out; |
---|
7 | // fault1=0 fault0=0 output fault free |
---|
8 | // fault1=1 fault0=0 output S a B |
---|
9 | // fault1=0(1) fault0=1 output Maj(A',B,C') |
---|
10 | assign wi1 = (A & B) | (B & C) | (A & C); |
---|
11 | assign wi3 = (~A & B) | (B & ~C) | (~A & ~C); |
---|
12 | assign wi2 = (fault1) ? B : wi1; |
---|
13 | assign out = (fault0) ? wi3: wi2; |
---|
14 | endmodule |
---|
Note: See
TracBrowser
for help on using the repository browser.