rids1
Newbie level 4
module full_sub(a,a1,c,d,b,e);
input a,a1,c;
output reg d,b,e;
always@(a1 or a or c)
begin
e={a,b,c};
case(e)
000:
begin
d=0;
b=0;
end
001:
begin
d=1;
b=1;
end
010:
begin
d=1;
b=1;
end
011:
begin
d=0;
b=0;
end
100:
begin
d=1;
b=0;
end
101:
begin
d=0;
b=0;
end
110:
begin
d=0;
b=0;
end
111:
begin
d=1;
b=1;
end
endcase
end
endmodule
input a,a1,c;
output reg d,b,e;
always@(a1 or a or c)
begin
e={a,b,c};
case(e)
000:
begin
d=0;
b=0;
end
001:
begin
d=1;
b=1;
end
010:
begin
d=1;
b=1;
end
011:
begin
d=0;
b=0;
end
100:
begin
d=1;
b=0;
end
101:
begin
d=0;
b=0;
end
110:
begin
d=0;
b=0;
end
111:
begin
d=1;
b=1;
end
endcase
end
endmodule