-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMUX3.v
45 lines (41 loc) · 884 Bytes
/
MUX3.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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 2023/05/06 17:16:30
// Design Name:
// Module Name: MUX3
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module MUX3(
input clk,
inout ena,
input [31:0]in1,
input [31:0]in2,
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
endcase
end
end
endmodule