-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMUX4.v
52 lines (49 loc) · 1.05 KB
/
MUX4.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 2023/05/06 19:53:22
// Design Name:
// Module Name: MUX4
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module MUX4(
input clk,
inout ena,
input [31:0]in1,
input [31:0]in2,
input [31:0]in3,
input [31:0]in4,
input [2:0]choice,
output reg [31:0]out
);
always @(*)begin
if(ena)begin
case(choice)
3'd1:begin
out<=in1;
end
3'd2:begin
out<=in2;
end
3'd3:begin
out<=in3;
end
3'd4:begin
out<=in4;
end
endcase
end
end
endmodule