fix some errors

This commit is contained in:
SikongJueluo
2024-05-16 17:33:39 +08:00
parent 74425d1c28
commit 5eebe6e922
4 changed files with 8 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
module crop #(
parameter IN_WIDTH = 1936,
parameter IN_HEIGHT = 1088,
parameter OFFSET_X = 8,
parameter OFFSET_Y = 4,
parameter OUT_WIDTH = 640,
@@ -64,9 +66,9 @@ module crop #(
end
end
if (cnt_x >= (OFFSET_X + OUT_WIDTH)) begin
if (cnt_x >= IN_WIDTH) begin
cnt_x <= 0;
if (cnt_y >= (OFFSET_Y + OUT_HEIGHT)) begin
if (cnt_y >= IN_HEIGHT) begin
cnt_y <= 0;
end
else begin