From b414b53571754104b3c3bc7f0db4dc135a376b52 Mon Sep 17 00:00:00 2001 From: Luca Date: Sun, 29 Dec 2024 01:59:55 +0100 Subject: [PATCH] fix: shifted fetch --- dvi.v | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dvi.v b/dvi.v index afbb0a4..808865b 100644 --- a/dvi.v +++ b/dvi.v @@ -100,10 +100,12 @@ module dvi #( if (y == V_DATA_START && (~ck && x == H_DATA_START-3 || x >= H_DATA_START-2) && x < H_DATA_START) fetch_en <= 1; - if (y >= V_DATA_START && y < V_DATA_END && x >= H_DATA_START && x < H_DATA_END) begin - d <= data[active_data][11:0]; + if (y >= V_DATA_START && y < V_DATA_END) begin + if ((~ck && x == H_DATA_START-1 || x >= H_DATA_START) && (x <= H_DATA_END-2 || ck && x == H_DATA_END-1)) begin + d <= data[active_data][11:0]; - fetch_en <= 1; + fetch_en <= 1; + end end if (x == H_BLANK_START-1) begin