-
Notifications
You must be signed in to change notification settings - Fork 0
/
MUX_2to1.v
44 lines (37 loc) · 1.06 KB
/
MUX_2to1.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
// Alden Rivera 0416329
// Jorge Pineda 0416330
//Subject: CO project 2 - MUX 221
//--------------------------------------------------------------------------------
//Version: 1
//--------------------------------------------------------------------------------
//Writer:
//----------------------------------------------
//Date:
//----------------------------------------------
//Description:
//--------------------------------------------------------------------------------
module MUX_2to1(
data0_i,
data1_i,
select_i,
data_o
);
parameter size = 0;
//I/O ports
input [size-1:0] data0_i;
input [size-1:0] data1_i;
input select_i;
output [size-1:0] data_o;
//Internal Signals
reg [size-1:0] data_o;
//Main function
always@(*)
begin
case(select_i)
1'b0:
data_o = data0_i;
1'b1:
data_o = data1_i;
endcase
end
endmodule