1.什么是SOP和PS
A | B | Y |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 1 |
SOP:找出所有当输出为1(最小项)的输入组合(乘积和)即:Y=(~A&B)|(A&B);
POS:找出所有当输出为0(最大项)的输入组合(和乘积)即:Y=(A+B)&(~A+B);
2.根据题目画出卡诺图
3.答案
module top_module (
input a,
input b,
input c,
input d,
output out_sop,
output out_pos
);
assign out_sop = ( c & d )|( c & ~a & ~b );
assign out_pos = ~(( ~c ) | ( b & ~d ) | (a & ~ d));
endmodule