-
Notifications
You must be signed in to change notification settings - Fork 0
/
column_reg_gen.v
47 lines (41 loc) · 1.02 KB
/
column_reg_gen.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
module column_reg_gen#(
parameter COL = 3
)(
input i_clk,
input i_data,
output [COL-1:0] o_data
);
genvar i;
generate
for(i = 0; i < COL; i = i + 1) begin : O_WREN_COL_FIFO_GEN
wire data_out;
if(i == 0) begin
wren_register
wren_reg (
.i_clk (i_clk),
.i_data (i_data),
.o_data (data_out),
.o_wren (o_data[i])
);
end
else if(i < COL-1)begin
wren_register
wren_reg (
.i_clk (i_clk),
.i_data (O_WREN_COL_FIFO_GEN[i-1].data_out),
.o_data (data_out),
.o_wren (o_data[i])
);
end
else begin
wren_register
wren_reg (
.i_clk (i_clk),
.i_data (O_WREN_COL_FIFO_GEN[i-1].data_out),
.o_data (data_out),
.o_wren (o_data[i])
);
end
end
endgenerate
endmodule