Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module mux3 #(parameter WIDTH=8) (a, b, c, select, out);
- // select | out
- // 00 | a
- // 01 | b
- // 02 | c
- input [1:0] select;
- input[WIDTH-1:0] a,b,c;
- output [WIDTH-1:0]out;
- reg out;
- always @(select or a or b or c)
- if (select ==2'b00) out = a;
- else if (select == 2'b01) out = b;
- else if (select == 2'b10) out = c;
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement