1 -------------------------------------------------------------------------------
2 -- Title : vga_control architecture
3 -- Project : LU Digital Design
4 -------------------------------------------------------------------------------
5 -- File : vga_control.vhd
6 -- Author : Thomas Handl
8 -- Created : 2004-12-15
9 -- Last update: 2006-02-24
10 -------------------------------------------------------------------------------
11 -- Description: generation of colors (RGB)
12 -------------------------------------------------------------------------------
13 -- Copyright (c) 2004 TU Wien
14 -------------------------------------------------------------------------------
16 -- Date Version Author Description
17 -- 2004-12-15 1.0 handl Created
18 -- 2006-02-24 2.0 ST revised
19 -------------------------------------------------------------------------------
21 -------------------------------------------------------------------------------
23 -------------------------------------------------------------------------------
26 use IEEE.std_logic_1164.all;
27 use IEEE.std_logic_unsigned.all;
28 use IEEE.std_logic_arith.all;
32 -------------------------------------------------------------------------------
34 -------------------------------------------------------------------------------
36 architecture behav of vga_control is
39 attribute syn_preserve : boolean;
40 attribute syn_preserve of behav : architecture is true;
43 DRAW_SQUARE_syn: process(clk, reset)
45 if (reset = RES_ACT) then -- draw black screen upon reset
49 elsif (clk'event and clk = '1') then -- synchronous capture
57 DRAW_SQUARE_next: process (column_counter, v_enable, h_enable)
59 if v_enable = ENABLE and h_enable = ENABLE then
60 if (column_counter >= X_MIN and column_counter < X2_MIN) -- if pixel within the rectangle borders
64 elsif (column_counter >= X2_MIN and column_counter < X3_MIN) -- if pixel within the rectangle borders
68 elsif (column_counter >= X3_MIN and column_counter < X_MAX) -- if pixel within the rectangle borders
72 else -- if somewhere else on screen...
74 g_next <= COLR_OFF; -- ... draw background color
77 else -- if out of screen...
79 g_next <= COLR_OFF; -- ... do not activate any color
80 b_next <= COLR_OFF; -- (black screen)
86 -------------------------------------------------------------------------------
88 -------------------------------------------------------------------------------