-
Notifications
You must be signed in to change notification settings - Fork 1
/
padding.v
72 lines (57 loc) · 1.43 KB
/
padding.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
65
66
67
68
69
70
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 2024/08/26 22:15:04
// Design Name:
// Module Name: padding
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module padding (
input clk,
input reset,
input en,
input [8:0] count,
input [3327:0] R_input,
input [3327:0] G_input,
input [3327:0] B_input,
output reg [3343:0] R_padded,
output reg [3343:0] G_padded,
output reg [3343:0] B_padded
);
always @(posedge clk) begin // for reset
if(reset) begin
R_padded <= 0;
G_padded <= 0;
B_padded <= 0;
end
else begin
if(en)
begin
if(count==9'd0 || count==9'd415)
begin
R_padded <= 0;
G_padded <= 0;
B_padded <= 0;
end
else
begin
R_padded <= {8'b0, R_input, 8'b0};
G_padded <= {8'b0, G_input, 8'b0};
B_padded <= {8'b0, B_input, 8'b0};
end
end
end
end
endmodule