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

Subversion Repositories wb_vga

[/] [wb_vga/] [web_uploads/] [vga_core.shtml] - Blame information for rev 10

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 10 root
<!--# include virtual="/ssi/ssi_start.shtml" -->
2
<link REL="stylesheet" TYPE="text/css" HREF="/people/tantos/styles.css">
3
 
4
<h1>Wishbone Monitor Controller Central Core</h1>
5
<h2>Description</h2>
6
<strong>Wishbone Monitor Controller</strong> is a set of freely available VHDL cores. It contains
7
a central building block containing the basic functionality. This core comprises of a
8
sync generator, a pixel data generator, a memory interface and a CPU interface. These functions
9
of course implemented in separate entities but this is the smallest fully functional building-block
10
of the Wishbone Monitor Controller project. The functionality of this module can then be expanded
11
by adding external modules.
12
<p>
13
The Wishbone Monitor Cotroller Central Core is 100% Wishbone compatible with the
14
<a href="/cores/wb_tk/wb_extensions.shtml">WishboneTK extensions</a>. It incorporates 3
15
Wishbone interfaces. One salve interface for register accesses another slave interface for
16
pixel memory accesses and one master interface for the pixel memory. Arbitation between
17
the core and the external master accessing the pixel memory handled by the core internally.
18
 
19
<h2>Features</h2>
20
<ul>
21
        <li>Highly customizable sync generation with polarity control</li>
22
        <li>Capable of driving EGA/VGA/Hercules/CGA monitors</li>
23
        <li>Multi-scan support for low resolution modes</li>
24
        <li>Internal memory for multi-scan, for even less memory accesses</li>
25
        <li>FIFO de-coupled memory interface and pixel output circuit</li>
26
        <li>Wisbone pixel memory interface</li>
27
        <li>16-bit pixel memory support (later parametrizable)</li>
28
        <li>Programmable color depth (1,2,4,8 bits per pixel)</li>
29
        <li>~80Mhz pixel clock (wish)</li>
30
        <li>Standard parametrizable Wishbone CPU bus interface</li>
31
        <li>Syncron internal structure</li>
32
        <li>Fully synthesizable (using Leonardo Spectrum)</li>
33
</ul>
34
 
35
<h3>Wishbone datasheet</h3>
36
<table border>
37
<tr><th>Description</th><th>Specification</th></tr>
38
<tr><td>General Description             </td><td>Monitor controller central core.</td></tr>
39
<tr><td>Supported cycles                </td><td>Slave read/write<br>Slave block read/write<br>Slave rmw<br>
40
                                                                                                 Master read/write<br>Master block read/write<br>Master rmw<br></td></tr>
41
<tr><td>Data port size                  </td><td>Configurable on slave side, 16-bits on the master side</td></tr>
42
<tr><td>Data port granularity           </td><td>8-bit</td></tr>
43
<tr><td>Data port maximum operand size  </td><td>Bus size</td></tr>
44
<tr><td>Data transfer ordering          </td><td>Little endien</td></tr>
45
<tr><td>Data transfer sequencing        </td><td>n/a</td></tr>
46
<tr><td>Supported signal list and cross reference to equivalent Wishbone signals</td><td>
47
        <table>
48
        <tr><th>Signal name</th><th>Wishbone equiv.</th></tr>
49
        <tr><th colspan="2">Common signals for all ports</th></tr>
50
        <tr><td>CLK_I       </td><td>CLK_I</td></tr>
51
        <tr><td>RST_I       </td><td>RST_I</td></tr>
52
        <tr><th colspan="2">Signals for pixel memory master</th></tr>
53
        <tr><td>VMEM_CYC_I       </td><td>CYC_I</td></tr>
54
        <tr><td>VMEM_STB_I       </td><td>STB_I</td></tr>
55
        <tr><td>VMEM_WE_I        </td><td>WE_I </td></tr>
56
        <tr><td>VMEM_ACK_O       </td><td>ACK_O</td></tr>
57
        <tr><td>VMEM_SEL_I(..)   </td><td>SEL_I()</td></tr>
58
        <tr><td>VMEM_ADR_I(..)   </td><td>ADR_I()</td></tr>
59
        <tr><td>VMEM_DAT_I(..)   </td><td>DAT_I()</td></tr>
60
        <tr><td>VMEM_DAT_O(..)   </td><td>DAT_O()</td></tr>
61
        <tr><th colspan="2">Signals for register master</th></tr>
62
        <tr><td>REG_CYC_I       </td><td>CYC_I</td></tr>
63
        <tr><td>REG_STB_I       </td><td>STB_I</td></tr>
64
        <tr><td>REG_WE_I        </td><td>WE_I </td></tr>
65
        <tr><td>REG_ACK_O       </td><td>ACK_O</td></tr>
66
        <tr><td>REG_SEL_I(..)   </td><td>SEL_I()</td></tr>
67
        <tr><td>REG_ADR_I(..)   </td><td>ADR_I()</td></tr>
68
        <tr><td>REG_DAT_I(..)   </td><td>DAT_I()</td></tr>
69
        <tr><td>REG_DAT_O(..)   </td><td>DAT_O()</td></tr>
70
        <tr><th colspan="2">Signals to connect to the pixel memory</th></tr>
71
        <tr><td>V_CYC_O       </td><td>CYC_O</td></tr>
72
        <tr><td>V_STB_O       </td><td>STB_O</td></tr>
73
        <tr><td>V_WE_O        </td><td>WE_O </td></tr>
74
        <tr><td>V_ACK_I       </td><td>ACK_I</td></tr>
75
        <tr><td>V_SEL_O(..)   </td><td>SEL_O()</td></tr>
76
        <tr><td>V_ADR_O(..)   </td><td>ADR_O()</td></tr>
77
        <tr><td>V_DAT_I(..)   </td><td>DAT_I()</td></tr>
78
        <tr><td>V_DAT_O(..)   </td><td>DAT_O()</td></tr>
79
        </table>
80
</table>
81
<h3>Parameter description</h3>
82
<table border>
83
<tr><td>Parameter name</th><th>Description</th></tr>
84
<tr><td>v_dat_width   </td><td>Pixel memory data width</td></tr>
85
<tr><td>v_adr_width   </td><td>Pixel memory address width</td></tr>
86
<tr><td>cpu_dat_width </td><td>CPU data width</td></tr>
87
<tr><td>cpu_adr_width </td><td>Pixel memory access interface address width</td></tr>
88
<tr><td>reg_adr_width </td><td>Register access interface address width</td></tr>
89
<tr><td>fifo_size     </td><td>Size of the internal FIFO buffers in <code>v_dat_width</code> bits</td></tr>
90
</table>
91
<h3>Signal description</h3>
92
<table border>
93
<tr><th>Signal name</th><th>Description</th></tr>
94
<tr><th colspan="2">Signals to connect to the pixel memory master</th></tr>
95
<tr><td>VMEM_CYC_I       </td><td>Wishbone cycle signal. High value frames blocks of access</td></tr>
96
<tr><td>VMEM_STB_I       </td><td>Wishbone strobe signal. High value indicates cycle to this particular device</td></tr>
97
<tr><td>VMEM_WE_I        </td><td>Wishbone write enable signal. High indicates data flowing from master to slave</td></tr>
98
<tr><td>VMEM_ACK_O       </td><td>Wishbone acknowledge signal. High indicates that slave finished operation sucessfully</td></tr>
99
<tr><td>VMEM_ACK_OI      </td><td>WhisboneTK acknowledge chain input signal</td></tr>
100
<tr><td>VMEM_ADR_I(cpu_adr_width-1..0)  </td><td>Wishbone address bus signals</td></tr>
101
<tr><td>VMEM_SEL_I(cpu_dat_width/8-1..0) </td><td>Wishbone byte-selection signals</td></tr>
102
<tr><td>VMEM_DAT_I(cpu_dat_width-1..0)   </td><td>Wishbone data bus input (to slave direction) signals</td></tr>
103
<tr><td>VMEM_DAT_O(cpu_dat_width-1..0)   </td><td>Wishbone data bus output (to master direction) signals</td></tr>
104
<tr><td>VMEM_DAT_OI(cpu_dat_width-1..0)  </td><td>WhisboneTK data bus chain input signal</td></tr>
105
<tr><th colspan="2">Signals to connect to the register master</th></tr>
106
<tr><td>REG_CYC_I       </td><td>Wishbone cycle signal. High value frames blocks of access</td></tr>
107
<tr><td>REG_STB_I       </td><td>Wishbone strobe signal. High value indicates cycle to this particular device</td></tr>
108
<tr><td>REG_WE_I        </td><td>Wishbone write enable signal. High indicates data flowing from master to slave</td></tr>
109
<tr><td>REG_ACK_O       </td><td>Wishbone acknowledge signal. High indicates that slave finished operation sucessfully</td></tr>
110
<tr><td>REG_ACK_OI      </td><td>WhisboneTK acknowledge chain input signal</td></tr>
111
<tr><td>REG_ADR_I(reg_adr_width-1..0)  </td><td>Wishbone address bus signals</td></tr>
112
<tr><td>REG_SEL_I(cpu_dat_width/8-1..0) </td><td>Wishbone byte-selection signals</td></tr>
113
<tr><td>REG_DAT_I(cpu_dat_width-1..0)   </td><td>Wishbone data bus input (to slave direction) signals</td></tr>
114
<tr><td>REG_DAT_O(cpu_dat_width-1..0)   </td><td>Wishbone data bus output (to master direction) signals</td></tr>
115
<tr><td>REG_DAT_OI(cpu_dat_width-1..0)  </td><td>WhisboneTK data bus chain input signal</td></tr>
116
<tr><th colspan="2">Signals to connect to the pixel memory</th></tr>
117
<tr><td>V_CYC_O       </td><td>Wishbone cycle signal. High value frames blocks of access</td></tr>
118
<tr><td>V_STB_O       </td><td>Wishbone strobe signal. High value indicates cycle to this particular device</td></tr>
119
<tr><td>V_WE_O        </td><td>Wishbone write enable signal. High indicates data flowing from master to slave</td></tr>
120
<tr><td>V_ACK_I       </td><td>Wishbone acknowledge signal. High indicates that slave finished operation sucessfully</td></tr>
121
<tr><td>V_ADR_O(m_addr_width-2..0)  </td><td>Wishbone address bus signals</td></tr>
122
<tr><td>V_SEL_O(s_bus_width/8-1..0) </td><td>Wishbone byte-selection signals</td></tr>
123
<tr><td>V_DAT_I(s_bus_width-1..0)   </td><td>Wishbone data bus input (to slave direction) signals</td></tr>
124
<tr><td>V_DAT_O(s_bus_width-1..0)   </td><td>Wishbone data bus output (to master direction) signals</td></tr>
125
<tr><th colspan="2">Non Wishbone signals</th></tr>
126
<tr><td>H_SYNC    </td><td>Horizontal sync pulse. Active level programmable.</td></tr>
127
<tr><td>H_BLANK   </td><td>Horizontal blank pulse. Active level programmable.</td></tr>
128
<tr><td>V_SYNC    </td><td>Vertical sync pulse. Active level programmable.</td></tr>
129
<tr><td>V_BLANK   </td><td>Vertical blank pulse. Active level programmable.</td></tr>
130
<tr><td>H_TC      </td><td>Horizontal terminal count. Active high signal, active for one clock cycle/line</td></tr>
131
<tr><td>V_TC      </td><td>Vertical terminal count. Active high signal, active for one clock cycle/refresh</td></tr>
132
<tr><td>BLANK     </td><td>Blank signal. Active high signal.</td></tr>
133
<tr><td>VIDEO_OUT(7 downto 0) </td><td>8-bit video output. If bit-depth is less than 8, value is right alligned and padded with 0s.</td></tr>
134
</table>
135
 
136
<h2>Register description</h2>
137
<p>
138
The core has several programmable registers which control its behaviour. All registers can be written and checked. All registers reset to 0.
139
It is recomended that the enable bit turned off prior any write to any of the registers and than enable bit turned off after all registers
140
are programmed to their new values. Registers are shown in 8-bit layout however the actual grouping of registers into access units depending
141
on the bus-width of the CPU interface. Address-decoding is allways little-endien.
142
 
143
<table border>
144
 
145
<tr><th>Offset</th><th colspan="8">Bit number</th><th>Description</th></tr>
146
<tr><th></th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th><th>0</th><th></th></tr>
147
<tr><th>0</th><td colspan="8" rowspan="4">V_MEM_END</td><td rowspan="4">Last location in the memory being part of the frame buffer. Counted in <code>v_dat_width</code> units.</th></tr>
148
<tr><th>1</th></tr>
149
<tr><th>2</th></tr>
150
<tr><th>3</th></tr>
151
<tr><th>4</th><td colspan="8" rowspan="4">V_MEM_START</td><td rowspan="4">First location in the memory being part of the frame buffer. Counted in <code>v_dat_width</code> units.</th></tr>
152
<tr><th>5</th></tr>
153
<tr><th>6</th></tr>
154
<tr><th>7</th></tr>
155
<tr><th></th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th><th>0</th><th></th></tr>
156
<tr><th>8</th><td colspan="8" rowspan="8"><i>reserved</i></td></tr>
157
<tr><th>9</th></tr>
158
<tr><th>10</th></tr>
159
<tr><th>11</th></tr>
160
<tr><th>12</th></tr>
161
<tr><th>13</th></tr>
162
<tr><th>14</th></tr>
163
<tr><th>15</th></tr>
164
<tr><th></th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th><th>0</th><th></th></tr>
165
<tr><th>16</th><td colspan="8">FIFO_TRESHOLD</td><td>Number of words in the internal pixel FIFO after pixel memory access priority changes.</tr>
166
<tr><th>17</th><td colspan="2"><i>res.</i></td><td colspan="2">MSS</td><td colspan="2"><i>res.</i></td><td colspan="2">BPP</td><td>MSS: Multi-scan-select. If 0 multi-scan feature is disabled.<br>
167
                                                                                                                                   BSS: Bits per pixel. 00 - 1 bpp, 01 - 2 bpp, 10 - 4 bpp, 11 - 8 bpp</tr>
168
<tr><th>18</th><td colspan="8">HBS</td><td>Horizontal blank start in 8 pixels. (Horizontal resolution)</td></tr>
169
<tr><th>19</th><td colspan="8">HSS</td><td>Horizontal sync pulse start in 8 pixels.</td></tr>
170
<tr><th>20</th><td colspan="8">HSE</td><td>Horizontal sync pulse end in 8 pixels.</td></tr>
171
<tr><th>21</th><td colspan="8">HTOTAL</td><td>Horizontal line total length in 8 pixels.</td></tr>
172
<tr><th>22</th><td colspan="8">VBS</td><td>Vertical blank start in 8 lines. (Vertical resolution)</td></tr>
173
<tr><th>23</th><td colspan="8">VSS</td><td>Vertical sync pulse start in 8 lines.</td></tr>
174
<tr><th></th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th><th>0</th><th></th></tr>
175
<tr><th>24</th><td colspan="8">VSE</td><td>Vertical sync pulse end in 8 lines.</td></tr>
176
<tr><th>25</th><td colspan="8">VTOTAL</td><td>Vertical total screen size in 8 lines.</td></tr>
177
<tr><th>26</th><td colspan="8">PSS</td><td>Pixel pre-scaler: Pixel-clock := System-clock/(PSS+1).</tr>
178
<tr><th>27</th><td>EN</td><td colspan="3"><i>res.</i></td><td>VBP</td><td>HBP</td><td>VSP</td><td>HSP</td>
179
                        <td>EN: 1 - normal operation, 0 - core is in reset state<br>
180
                            HSP: 0 - positive h sync, 1 - negative h sync<br>
181
                                        VSP: 0 - positive v sync, 1 - negative v sync<br>
182
                                        HBP: 0 - positive h blank, 1 - negative h blank<br>
183
                                        VBP: 0 - positive v blank, 1 - negative v blank</td></tr>
184
<tr><th>28</th><td colspan="8" rowspan="4"><i>reserved</i></td></tr>
185
<tr><th>29</th></tr>
186
<tr><th>30</th></tr>
187
<tr><th>31</th></tr>
188
<tr><th></th><th>7</th><th>6</th><th>5</th><th>4</th><th>3</th><th>2</th><th>1</th><th>0</th><th></th></tr>
189
</table>
190
 
191
<h2>Features explained</h2>
192
<h3>Capable of driving EGA/VGA/Hercules/CGA monitors</h3>
193
<p>
194
Of course the FPGA cannot provide the correct signal levels not to mention the analog output
195
required by VGA monitors. This statement means that all the necessary sync signals can be
196
generated.
197
<h3>Multi-scan support for low resolution modes</h3>
198
<p>
199
On VGA monitors low resolution modes (320x200, 320x240) are generated with this feature. Each
200
video memory line scanned twice, so the physical screen will contain 400/480 scan-lines.
201
<h3>FIFO de-coupled memory interface and pixel output circuit</h3>
202
<p>
203
The use of FIFO buffer allows long bursts from the CPU without being interrupted by the pixel
204
generation engine. It also somewhat relaxes memory speed requirements as FIFO-fill cycles can
205
continue through blanking periods.
206
<h3>16-bit pixel memory support</h3>
207
<p>
208
This device is designed to be simple and easy to use. It's not about using many megs of
209
frame-buffer. The optimal size of the frame-buffer would be around 64kWords. Such a size
210
of memory can most easily be constructed from SRAM chips. They are also faster and easier
211
to interface to than DRAM let alone SDRAM devices. An external Wishbone bus interface should
212
be used to interface the core to the pixel memory so any memory type that has such an interface
213
can be used. For SRAM devices the WisboneTK
214
<a href="/cores/wb_tk/wb_async_slave.shtml">Asyncronous slave interface</a> in a practical choice.
215
<h3>~80Mhz pixel clock</h3>
216
<p>
217
Depends of course on technology but this is the minimum to support reasonable resolutions with
218
usable refresh-rates.
219
 
220
<h2>Author & Maintainer</h2>
221
<p>
222
<a href="/people/tantos">Andras Tantos</a>
223
<!--# include virtual="/ssi/ssi_end.shtml" -->

powered by: WebSVN 2.1.0

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