From a39888845aefa0edc0b3f259679a516cb28da8b5 Mon Sep 17 00:00:00 2001 From: paulb-nl Date: Sat, 20 Jan 2018 22:08:10 +0100 Subject: [PATCH] Add 32 step grayramp to test pattern --- rtl/videogen.v | 9 +++++++-- sys.sopcinfo | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/rtl/videogen.v b/rtl/videogen.v index e5e21d5..1673164 100644 --- a/rtl/videogen.v +++ b/rtl/videogen.v @@ -50,8 +50,11 @@ parameter H_OVERSCAN = 40; //at both sides parameter V_OVERSCAN = 16; //top and bottom parameter H_AREA = 640; parameter V_AREA = 448; -parameter H_BORDER = (H_AREA-512)/2; -parameter V_BORDER = (V_AREA-256)/2; +parameter H_GRADIENT = 512; +parameter V_GRADIENT = 256; +parameter V_GRAYRAMP = 84; +parameter H_BORDER = (H_AREA-H_GRADIENT)/2; +parameter V_BORDER = (V_AREA-V_GRADIENT)/2; parameter X_START = H_SYNCLEN + H_BACKPORCH; parameter Y_START = V_SYNCLEN + V_BACKPORCH; @@ -138,6 +141,8 @@ begin V_gen <= (h_cnt[0] ^ v_cnt[0]) ? 8'hff : 8'h00; else if ((h_cnt < X_START+H_OVERSCAN+H_BORDER) || (h_cnt >= X_START+H_OVERSCAN+H_AREA-H_BORDER) || (v_cnt < Y_START+V_OVERSCAN+V_BORDER) || (v_cnt >= Y_START+V_OVERSCAN+V_AREA-V_BORDER)) V_gen <= 8'h50; + else if (v_cnt >= Y_START+V_OVERSCAN+V_BORDER+V_GRADIENT-V_GRAYRAMP) + V_gen <= (((h_cnt - (X_START+H_OVERSCAN+H_BORDER)) >> 4) << 3) + (h_cnt - (X_START+H_OVERSCAN+H_BORDER) >> 6); else V_gen <= (h_cnt - (X_START+H_OVERSCAN+H_BORDER)) >> 1; end diff --git a/sys.sopcinfo b/sys.sopcinfo index 785e970..8d9e0cd 100644 --- a/sys.sopcinfo +++ b/sys.sopcinfo @@ -1,11 +1,11 @@ - + java.lang.Integer - 1512674917 + 1516481684 false true false