diff --git a/demo/fpga/Artix-7-HDMI-processing.xpr b/demo/fpga/Artix-7-HDMI-processing.xpr
index c880b4f..1ce0331 100644
--- a/demo/fpga/Artix-7-HDMI-processing.xpr
+++ b/demo/fpga/Artix-7-HDMI-processing.xpr
@@ -42,7 +42,7 @@
-
+
diff --git a/demo/fpga/src/window_matcher.v b/demo/fpga/src/window_matcher.v
index 389485e..95abe44 100644
--- a/demo/fpga/src/window_matcher.v
+++ b/demo/fpga/src/window_matcher.v
@@ -307,6 +307,8 @@ module window_matcher(
/* Border match locking process */
reg [11:0] border_w;
reg [11:0] border_h;
+ reg [11:0] border_right_reg;
+ reg [11:0] border_bottom_reg;
reg border_matched;
always @(posedge clk) begin
@@ -314,6 +316,8 @@ module window_matcher(
border_matched <= 0;
border_w <= 0;
border_h <= 0;
+ border_right_reg <= 0;
+ border_bottom_reg <= 0;
end else begin
if (in_vsync_reg == 0 && in_vsync == 1) begin
@@ -321,11 +325,15 @@ module window_matcher(
border_matched <= 1;
border_w <= border_right - win_x - 1;
border_h <= border_bottom - win_y;
+ border_right_reg <= border_right;
+ border_bottom_reg <= border_bottom;
end else begin
border_matched <= 0;
border_w <= 0;
border_h <= 0;
+ border_right_reg <= 0;
+ border_bottom_reg <= 0;
end
end
end
@@ -378,13 +386,13 @@ module window_matcher(
win_hactive <= 0;
end else begin
- if (win_locked) begin
+ if (border_matched) begin
/* hsync */
- if (scan_x == win_x && win_hactive) begin
+ if (scan_x == win_x + 1 && win_hactive) begin
win_blank <= 0;
end
- if (scan_x == win_right || in_blank) begin
+ if (scan_x == border_right_reg || in_blank) begin
win_blank <= 1;
end
@@ -392,7 +400,7 @@ module window_matcher(
win_hactive <= 1;
end
- if (scan_y == win_bottom && !in_blank_reg && in_blank) begin
+ if (scan_y + 1 == border_bottom_reg && !in_blank_reg && in_blank) begin
win_hactive <= 0;
end
diff --git a/demo/fpga/test_bench/test_data/.gitignore b/demo/fpga/test_bench/test_data/.gitignore
new file mode 100644
index 0000000..363fc92
--- /dev/null
+++ b/demo/fpga/test_bench/test_data/.gitignore
@@ -0,0 +1,2 @@
+*.v
+*.hex