Create mux.v (multiplexer gate)
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
module mux(y, a, b, sel);
|
||||
input a, b, sel;
|
||||
inout y;
|
||||
wire notSel, andA, andB;
|
||||
|
||||
not(notSel, sel);
|
||||
and(andA, a, sel);
|
||||
and(andB, b, notSel);
|
||||
or(y, andA, andB);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user