Added 8:1 MUX

This commit is contained in:
WilliamMiceli
2019-02-15 17:02:11 -05:00
parent d1aa8e4ffb
commit 582c80998e

View File

@@ -184,6 +184,27 @@ module mux_4_1(input wire [1:0] switch,
endmodule
module mux_8_1(
input wire [2:0] switch,
input wire [8:0] A,B,C,D,E,F,G,H,
output reg [8:0] out);
always @(A,B,C,D,E,F,G,H,switch) begin
case (switch)
3'b000 : out = A;
3'b001 : out = B;
3'b010 : out = C;
3'b011 : out = D;
3'b100 : out = E;
3'b101 : out = F;
3'b110 : out = G;
3'b111 : out = H;
default : out = 9'bxxxxxxxxx;
endcase
end
endmodule
module mux_16_1(
input wire [3:0] switch,
input wire [8:0] A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,