OpenCores
URL https://opencores.org/ocsvn/yavga/yavga/trunk

Subversion Repositories yavga

[/] [yavga/] [trunk/] [vhdl/] [yavga_pkg.vhd] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 sandroamt
--------------------------------------------------------------------------------
2
----                                                                        ----
3
---- This file is part of the yaVGA project                                 ----
4
---- http://www.opencores.org/?do=project&who=yavga                         ----
5
----                                                                        ----
6
---- Description                                                            ----
7
---- Implementation of yaVGA IP core                                        ----
8
----                                                                        ----
9
---- To Do:                                                                 ----
10
----                                                                        ----
11
----                                                                        ----
12
---- Author(s):                                                             ----
13
---- Sandro Amato, sdroamt@netscape.net                                     ----
14
----                                                                        ----
15
--------------------------------------------------------------------------------
16
----                                                                        ----
17
---- Copyright (c) 2009, Sandro Amato                                       ----
18
---- All rights reserved.                                                   ----
19
----                                                                        ----
20
---- Redistribution  and  use in  source  and binary forms, with or without ----
21
---- modification,  are  permitted  provided that  the following conditions ----
22
---- are met:                                                               ----
23
----                                                                        ----
24
----     * Redistributions  of  source  code  must  retain the above        ----
25
----       copyright   notice,  this  list  of  conditions  and  the        ----
26
----       following disclaimer.                                            ----
27
----     * Redistributions  in  binary form must reproduce the above        ----
28
----       copyright   notice,  this  list  of  conditions  and  the        ----
29
----       following  disclaimer in  the documentation and/or  other        ----
30
----       materials provided with the distribution.                        ----
31
----     * Neither  the  name  of  SANDRO AMATO nor the names of its        ----
32
----       contributors may be used to  endorse or  promote products        ----
33
----       derived from this software without specific prior written        ----
34
----       permission.                                                      ----
35
----                                                                        ----
36
---- THIS SOFTWARE IS PROVIDED  BY THE COPYRIGHT  HOLDERS AND  CONTRIBUTORS ----
37
---- "AS IS"  AND  ANY EXPRESS OR  IMPLIED  WARRANTIES, INCLUDING,  BUT NOT ----
38
---- LIMITED  TO, THE  IMPLIED  WARRANTIES  OF MERCHANTABILITY  AND FITNESS ----
39
---- FOR  A PARTICULAR  PURPOSE  ARE  DISCLAIMED. IN  NO  EVENT  SHALL  THE ----
40
---- COPYRIGHT  OWNER  OR CONTRIBUTORS  BE LIABLE FOR ANY DIRECT, INDIRECT, ----
41
---- INCIDENTAL,  SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, ----
42
---- BUT  NOT LIMITED  TO,  PROCUREMENT OF  SUBSTITUTE  GOODS  OR SERVICES; ----
43
---- LOSS  OF  USE,  DATA,  OR PROFITS;  OR  BUSINESS INTERRUPTION) HOWEVER ----
44
---- CAUSED  AND  ON  ANY THEORY  OF LIABILITY, WHETHER IN CONTRACT, STRICT ----
45
---- LIABILITY,  OR  TORT  (INCLUDING  NEGLIGENCE  OR OTHERWISE) ARISING IN ----
46
---- ANY  WAY OUT  OF THE  USE  OF  THIS  SOFTWARE,  EVEN IF ADVISED OF THE ----
47
---- POSSIBILITY OF SUCH DAMAGE.                                            ----
48
--------------------------------------------------------------------------------
49 24 sandroamt
 
50
library IEEE;
51
use IEEE.STD_LOGIC_1164.all;
52
 
53
package yavga_pkg is
54
 
55
-- Declare constants
56
 
57
  -- chars address and data bus size
58
  constant c_CHR_ADDR_BUS_W : integer := 11;
59
  constant c_CHR_DATA_BUS_W : integer := 32;
60 28 sandroamt
  constant c_CHR_WE_BUS_W   : integer := 4;
61 24 sandroamt
 
62
  -- internal used chars address and data bus size 
63
  constant c_INTCHR_ADDR_BUS_W : integer := 13;
64
  constant c_INTCHR_DATA_BUS_W : integer := 8;
65
 
66
  -- internal ROM chmaps address and data bus
67
  constant c_INTCHMAP_ADDR_BUS_W : integer := 11;
68
  constant c_INTCHMAP_DATA_BUS_W : integer := 8;
69
 
70
  -- waveform address and data bus size
71
  constant c_WAVFRM_ADDR_BUS_W : integer := 10;
72
  constant c_WAVFRM_DATA_BUS_W : integer := 16;
73
 
74
  constant c_GRID_SIZE : std_logic_vector(6 downto 0) := "1111111";
75
  constant c_GRID_BIT  : integer                      := 6;
76
 
77
  --
78
  -- horizontal timing signals (in pixels count )
79
  constant c_H_DISPLAYpx    : integer := 800;
80
  constant c_H_BACKPORCHpx  : integer := 63;  -- also 60;
81
  constant c_H_SYNCTIMEpx   : integer := 120;
82
  constant c_H_FRONTPORCHpx : integer := 56;  --also 60;
83
  constant c_H_PERIODpx     : integer := c_H_DISPLAYpx +
84
                                         c_H_BACKPORCHpx +
85
                                         c_H_SYNCTIMEpx +
86
                                         c_H_FRONTPORCHpx;
87 28 sandroamt
  constant c_H_COUNT_W : integer := 11;       -- = ceil(ln2(c_H_PERIODpx))
88 24 sandroamt
 
89
  --
90
  -- vertical timing signals (in lines count)
91
  constant c_V_DISPLAYln    : integer := 600;
92
  constant c_V_BACKPORCHln  : integer := 23;
93
  constant c_V_SYNCTIMEln   : integer := 6;
94
  constant c_V_FRONTPORCHln : integer := 37;
95
  constant c_V_PERIODln     : integer := c_V_DISPLAYln +
96
                                         c_V_BACKPORCHln +
97
                                         c_V_SYNCTIMEln +
98
                                         c_V_FRONTPORCHln;
99 28 sandroamt
  constant c_V_COUNT_W : integer := 10;  -- = ceil(ln2(c_V_PERIODln))
100 24 sandroamt
 
101 28 sandroamt
  constant c_X_W : integer := c_H_COUNT_W;
102
  constant c_Y_W : integer := c_V_COUNT_W;
103 24 sandroamt
 
104
--  constant c_CHARS_WIDTH: std_logic_vector(2 downto 0) := "111";
105
--  constant c_CHARS_HEIGHT: std_logic_vector(3 downto 0) := "1111";
106
--  constant c_CHARS_COLS: std_logic_vector(6 downto 0) := "1100011";
107
--  constant c_CHARS_ROWS: std_logic_vector(5 downto 0) := "100100";
108
 
109
  -- to manage the background and cursor colors
110 28 sandroamt
  constant c_CFG_BG_CUR_COLOR_ADDR : std_logic_vector(12 downto 0) := "0000001101100";  -- 108 BG:5..3 CUR:2..0
111 24 sandroamt
 
112
  -- to manage the cursor position  
113 28 sandroamt
  constant c_CFG_CURS_XY1 : std_logic_vector(12 downto 0) := "0000001101101";  -- 109
114
  constant c_CFG_CURS_XY2 : std_logic_vector(12 downto 0) := "0000001101110";  -- 110
115
  constant c_CFG_CURS_XY3 : std_logic_vector(12 downto 0) := "0000001101111";  -- 111
116 24 sandroamt
 
117
end yavga_pkg;
118
 
119
 
120
package body yavga_pkg is
121
 
122
end yavga_pkg;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.