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

Subversion Repositories mpeg2fpga

[/] [mpeg2fpga/] [trunk/] [rtl/] [mpeg2/] [modeline.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 kdv
/*
2
 * modeline.v
3
 *
4
 * Copyright (c) 2007 Koen De Vleeschauwer.
5
 *
6
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
7
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9
 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
13
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
16
 * SUCH DAMAGE.
17
 */
18
 
19
/*
20
 * modeline - Hardcode initial modeline
21
 */
22
 
23
`ifndef MODELINE_SIF
24
`ifndef MODELINE_SIF_INTERL
25
`ifndef MODELINE_PAL_INTERL
26
`ifndef MODELINE_PAL_PROGR
27
`ifndef MODELINE_HDTV_INTERL
28
`ifndef MODELINE_VGA
29
`define MODELINE_SVGA 1
30
`endif
31
`endif
32
`endif
33
`endif
34
`endif
35
`endif
36
 
37
// XXX check values
38
 
39
`ifdef MODELINE_SVGA
40
 
41
  /*
42
   * modeline: SVGA (synthesis default)
43
   * The default dot clock of 40.0 Mhz is set in dotclock.v
44
   */
45
 
46
  parameter [11:0]
47
    HORZ_RES       = 799,
48
    HORZ_SYNC_STRT = 839,
49
    HORZ_SYNC_END  = 967,
50
    HORZ_LEN       = 1055,
51
    VERT_RES       = 599,
52
    VERT_SYNC_STRT = 600,
53
    VERT_SYNC_END  = 604,
54
    VERT_LEN       = 627,
55
    HALFLINE       = 528;
56
 
57
  parameter [2:0]
58
    VID_MODE       = 3'b000;
59
`endif
60
 
61
`ifdef MODELINE_VGA
62
 
63
  /*
64
   * modeline: VGA
65
   * ModeLine "640x480"    25.2  640  656  752  800    480  490  492  525 -hsync -vsync # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz dotclock: 25.2 MHz
66
   */
67
 
68
  parameter [11:0]
69
    HORZ_RES       = 639,
70
    HORZ_SYNC_STRT = 655,
71
    HORZ_SYNC_END  = 751,
72
    HORZ_LEN       = 799,
73
    VERT_RES       = 479,
74
    VERT_SYNC_STRT = 489,
75
    VERT_SYNC_END  = 491,
76
    VERT_LEN       = 524,
77
    HALFLINE       = 0;
78
 
79
  parameter [2:0]
80
    VID_MODE       = 3'b000; // = {clip_display_size, pixel_repetition, interlaced}
81
`endif
82
 
83
`ifdef MODELINE_SIF
84
  // test
85
  parameter [11:0]
86
    HORZ_RES       = 352,
87
    HORZ_SYNC_STRT = 381,
88
    HORZ_SYNC_END  = 388,
89
    HORZ_LEN       = 458,
90
    VERT_RES       = 288,
91
    VERT_SYNC_STRT = 295,
92
    VERT_SYNC_END  = 298,
93
    VERT_LEN       = 315,
94
    HALFLINE       = 0;
95
 
96
  parameter [2:0]
97
    VID_MODE       = 3'b000;
98
`endif
99
 
100
`ifdef MODELINE_SIF_INTERL
101
  // test
102
  parameter [11:0]
103
    HORZ_RES       = 352,
104
    HORZ_SYNC_STRT = 381,
105
    HORZ_SYNC_END  = 388,
106
    HORZ_LEN       = 458,
107
    VERT_RES       = 144,
108
    VERT_SYNC_STRT = 147,
109
    VERT_SYNC_END  = 149,
110
    VERT_LEN       = 157,
111
    HALFLINE       = 175;
112
 
113
  parameter [2:0]
114
    VID_MODE       = 3'b001;
115
`endif
116
 
117
`ifdef MODELINE_PAL_PROGR
118
  // PAL 768x576 progressive
119
  parameter [11:0]
120
    HORZ_RES       = 768,
121
    HORZ_SYNC_STRT = 789,
122
    HORZ_SYNC_END  = 858,
123
    HORZ_LEN       = 944,
124
    VERT_RES       = 576,
125
    VERT_SYNC_STRT = 581,
126
    VERT_SYNC_END  = 586,
127
    VERT_LEN       = 625,
128
    HALFLINE       = 383;
129
 
130
  parameter [2:0]
131
    VID_MODE       = 3'b000;
132
`endif
133
 
134
`ifdef MODELINE_PAL_INTERL
135
  // PAL 768x576 interlaced
136
  parameter [11:0]
137
    HORZ_RES       = 768,
138
    HORZ_SYNC_STRT = 789,
139
    HORZ_SYNC_END  = 858,
140
    HORZ_LEN       = 944,
141
    VERT_RES       = 288,
142
    VERT_SYNC_STRT = 291,
143
    VERT_SYNC_END  = 293,
144
    VERT_LEN       = 313,
145
    HALFLINE       = 383;
146
 
147
  parameter [2:0]
148
//    VID_MODE       = 3'b011;
149
    VID_MODE       = 3'b001;
150
`endif
151
 
152
`ifdef MODELINE_HDTV_INTERL
153
  // 1920x1080 interlaced
154
  parameter [11:0]
155
    HORZ_RES       = 1919,
156
    HORZ_SYNC_STRT = 1960,
157
    HORZ_SYNC_END  = 2016,
158
    HORZ_LEN       = 2199,
159
    VERT_RES       = 539,
160
    VERT_SYNC_STRT = 541,
161
    VERT_SYNC_END  = 544,
162
    VERT_LEN       = 562,
163
    HALFLINE       = 959;
164
 
165
  parameter [2:0]
166
    VID_MODE       = 3'b001;
167
`endif
168
 
169
/* not truncated */

powered by: WebSVN 2.1.0

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