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