diff options
author | Michael Abed <michaelabed@gmail.com> | 2012-12-02 12:11:54 -0500 |
---|---|---|
committer | Michael Abed <michaelabed@gmail.com> | 2012-12-02 12:11:54 -0500 |
commit | a93f8d8f6331f28b8862258db95cea3ac14f7787 (patch) | |
tree | f624b9f481b06157c7d1041300703130546ea8cb /mux2_1bit.v | |
download | ec413-lab3-a93f8d8f6331f28b8862258db95cea3ac14f7787.tar.gz ec413-lab3-a93f8d8f6331f28b8862258db95cea3ac14f7787.tar.bz2 ec413-lab3-a93f8d8f6331f28b8862258db95cea3ac14f7787.zip |
Diffstat (limited to 'mux2_1bit.v')
-rwxr-xr-x | mux2_1bit.v | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/mux2_1bit.v b/mux2_1bit.v new file mode 100755 index 0000000..3a5e225 --- /dev/null +++ b/mux2_1bit.v @@ -0,0 +1,37 @@ +`timescale 1ns / 1ps +////////////////////////////////////////////////////////////////////////////////// +// Company: +// Engineer: +// +// Create Date: 11:34:03 09/27/2012 +// Design Name: +// Module Name: mux2_1bit +// Project Name: +// Target Devices: +// Tool versions: +// Description: +// +// Dependencies: +// +// Revision: +// Revision 0.01 - File Created +// Additional Comments: +// +////////////////////////////////////////////////////////////////////////////////// +module mux2_1bit( + input a, + input b, + input sel, + output o + ); + +wire i1; // inverted sel +wire a1, a2; // ands +not n1(i1, sel); + +and and1(a1, a, sel); +and and2(a2, b, i1); + +or or1(o, a1, a2); + +endmodule |