-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmux_row.v
64 lines (53 loc) · 1.24 KB
/
mux_row.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
53
54
55
56
57
58
59
60
61
62
63
64
module mux_row #(
parameter ROW = 9
) ( input [ROW-1:0] i_data1,
input [ROW-1:0] i_data2,
input [ROW-1:0] i_data3,
input [ROW-1:0] i_data4,
input [ROW-1:0] i_data5,
input [ROW-1:0] i_data6,
input [ROW-1:0] i_data7,
input [ROW-1:0] i_data8,
input [ROW-1:0] i_data9,
input [ROW-1:0] i_data10,
input [3:0] i_sel,
output reg [ROW -1 : 0] o_data = 0
);
always @(*)begin
case(i_sel)
0: begin
o_data <= i_data1;
end
1: begin
o_data <= i_data2;
end
2: begin
o_data <= i_data3;
end
3: begin
o_data <= i_data4;
end
4: begin
o_data <= i_data5;
end
5: begin
o_data <= i_data6;
end
6: begin
o_data <= i_data7;
end
7: begin
o_data <= i_data8;
end
8: begin
o_data <= i_data9;
end
9: begin
o_data <= i_data10;
end
default: begin
o_data <= 0;
end
endcase
end
endmodule