Created
April 14, 2012 11:08
-
-
Save cs8425/2383619 to your computer and use it in GitHub Desktop.
mux4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module mux4( d, s, y ); | |
input [3:0]d; | |
input [1:0]s; | |
output y; | |
wire [3:0]d; | |
wire [1:0]s; | |
wire y; | |
assign y= (s == 2'b00)? d[0]: (s == 2'b01)? d[1]: (s == 2'b10)? d[2] : d[3]; | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment