Uploaded by Abishek Ghalley

DDassignment file

advertisement
Assignment no. 1
Name: Arslan Turak
Roll No. 2K20/EC/050
1.
Code:
module assgn(a,b,c,d, s0,s1, z); input a,b,c,d;
input s0,s1;
output z;
assign z=(~s0&~s1&a)|(s0&~s1&b)|(~s0&s1&c)|(s0&s1&d);
endmodule
module eight_1(i0,i1,i2,i3,i4,i5,i6,i7, a0,a1,a2, out);
input i0,i1,i2,i3,i4,i5,i6,i7;
input a0,a1,a2;
output out;
wire na2,z1,z0,w0,w1;
not(na2,a2);
assgn mux0(i0,i1,i2,i3,a0,a1,z0); assgn mux1(i4,i5,i6,i7,a0,a1,z1);
and(w0,z0,na2); and(w1,z1,a2); or(out,w0,w1);
3.
Download