summaryrefslogtreecommitdiff
path: root/verilog/mux_2to1.v
diff options
context:
space:
mode:
Diffstat (limited to 'verilog/mux_2to1.v')
-rwxr-xr-xverilog/mux_2to1.v34
1 files changed, 34 insertions, 0 deletions
diff --git a/verilog/mux_2to1.v b/verilog/mux_2to1.v
new file mode 100755
index 0000000..48ad684
--- /dev/null
+++ b/verilog/mux_2to1.v
@@ -0,0 +1,34 @@
+`timescale 1ns / 1ps
+//////////////////////////////////////////////////////////////////////////////////
+// Company:
+// Engineer:
+//
+// Create Date: 13:02:11 10/05/2012
+// Design Name:
+// Module Name: mux_2to1
+// Project Name:
+// Target Devices:
+// Tool versions:
+// Description:
+//
+// Dependencies:
+//
+// Revision:
+// Revision 0.01 - File Created
+// Additional Comments:
+//
+//////////////////////////////////////////////////////////////////////////////////
+module mux_2to1(
+ output out,
+ input sel,
+ input o0,
+ input o1
+ );
+
+wire a1, a2, n;
+not n1(n, sel);
+and ag1(a1, o0, n);
+and ag2(a2, o1, sel);
+or og1(out, a1, a2);
+
+endmodule