Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*============================
- 8 to 3 Multiplexer using case
- ============================*/
- module mux8to1case (
- input [7:0]I,
- input [2:0]S,
- output reg Y );
- always@(*)
- begin
- case(S)
- 0 : Y = I[0];
- 1 : Y = I[1];
- 2 : Y = I[2];
- 3 : Y = I[3];
- 4 : Y = I[4];
- 5 : Y = I[5];
- 6 : Y = I[6];
- 7 : Y = I[7];
- endcase
- end
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment