Professional Documents
Culture Documents
Specification
Specification
This document contains highly sensitive confidential information about ATI Technologies Inc. ("ATI") product development plans. No information in
this document should be shared with individuals outside of ATI unless the matter is provided for under an appropriate Non-Disclosure Agreement.
This document is an unpublished work owned by ATI, and is to be maintained as a trade secret. No part of this document may be reproduced,
transmitted, transcribed, stored in a retrieval system, or translated into any human or computer language, in any form or by any means, electronic,
mechanical, magnetic, optical, chemical, manual, or otherwise, without express written permission of ATI.
ATI may have patents or pending patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter embodied in
this document. The furnishing of this document does not give you any license to such patents, trademarks, copyrights, or other intellectual property
rights.
ATI does not make any representation or warranty regarding specifications in this document or any product or item based on these specifications. ATI
disclaims all express and implied warranties, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, and
non-infringement. Without limiting the foregoing, ATI does not make any warranty of any kind that any item based on these specifications, or any
portion of a specification, will not infringe any copyright, patent, trade secret or other intellectual property right of any person or entity in any country.
It is your responsibility to seek licenses for such intellectual property rights where appropriate. ATI shall not be liable for any damages, (direct,
indirect, or otherwise) arising out of or in connection with the use of these specifications, including liability for lost profit, business interruption, or any
other damages whatsoever. Some jurisdictions do not allow the exclusion or limitation of liability or consequential or incidental damage, therefore the
above limitation may not apply to you.
ATI and all ATI product names are trademarks and/or registered trademarks of ATI Technologies Inc. in the United States and other countries. Other
product and company names mentioned herein may be the trademarks and/or registered trademarks of their respective owners.
Revison History
1 VI Overview
VI (Video Interface) has the following functions:
Interfaces with the Rohm video encoder using a 10 pins (8 data + 1 clock + 1 phase) interface @ 27MHz.
Interfaces with external video connector @54Mhz to produce progressive 720x480 image.
Generates NTSC, PAL, or M-PAL timing.
Requests pixels from the external frame buffer for displaying.
Allows panning and windowing of a display region.
Video timing counter (resetable on field or frame basis)
Interrupts the CPU using four programmable timing registers.
Captures raster position using two lightgun latches.
Optionally, horizontaly scales frame buffer image
Interfaces to 3D LCD display.
2 VI Interfaces
The following diagram shows the interfaces of VI.
All interface control signals should be registered to avoid timing problem due to long wire. For example, VI
should register the PIreq signal before use, and the generated VIack signal should also be registered on both sides.
That’s why there is a minimum of one clock delay between PIreq and VIack, and between VIack and the next
PIreq.
32-bit read/write word ordering. The Gecko CPU can do 32-bit read and write operations to the VI through the
VI / PI interface. The PI will translate the 32-bit read/write operation into two separate 16-bit operations across
the PI/VI interface. The internal architecture of Flipper is uniformly big-endian, so the 32-bit data is transferred in
the order: hi-word (bits [31:16], address n) first, followed by lo-word (bits[15:0], address n+1).
2.2
vphase Video phase. This signal indicates YCb (low) or YCr (high) set. 1
vdata Video data. This bus contains YCrCb data during active display and video timing 8
signal during blanking.
Since Y is clamped to 0x10 during active display, Y is set to 0x00 during blanking interval. During that time, Cb and
Cr are used for outputting video timing signals:
U/V Data Flag Description
Bit 7 C Composite Sync Flag (active low). Refer to the timing diagrams.
Bit 6 F Field Flag. F = "0" for odd-number fields (Fields 1, 3, …), F = "1" for even-number
fields (Fields 2, 4, …).
Bit 3 B Burst Flag (active low). This signal indicates the location of the color burst. It is
Bit 2 K Burst Blank Flag (active low). When active, color burst of a line should be blanked
out.
Bit 1 N NTSC/PAL and M-PAL Mode Flag. N = "0" for NTSC mode, N = "1" for PAL or M-
PAL mode.
Bit 0 I Interlace/Non-Interface Mode Flag. I = "0" for interlace mode, I = "1" for non-
interlace mode.
It is important to note that since the timing signals are output in the Cb and Cr data only, they should be expanded
back to 13.5 MHz inside the video encoder. As a result, hsync and burst may be shifted by one pixel. A timing
diagram is shown below:
TEST MODE
A test mode is added to this interface for bring-up and debug purposes. During test mode, vclk and vdata behave as a
standard CCIR656 interface. This allows easy integration with off-the-shelf video encoders.
2.4
signal description
vi_mem_addr[25:5] Address of cache-line for read.
vi_mem_req Asserted for one cycle to issue a cache-line read request. Pi_mem_addr is valid
for that cycle..
mem_ vi_ack Asserted for one cycle to signal return of data from memory. Bytes 7 to 0 of the
cache-line are sent in that cycle. Bytes 15-8 , 23-16 and 31-24 are sent in the
following cycles on the mem_pi_data bus. All read requests are processed in-
order
mem_ vi _data[63:0] 8 byte bus to transfer data from memory. A cache-line is transferred on this bus in
4 back-to-back clocks.
This interface supports single outstanding read requests. A new read request can be issued After the acknowledge
for the last one is received
All interface control signals should be registered to avoid timing problem due to long wire. For example, memory
controller should register the vi_mem_req signal first, and the generated mem_vi_ack signal should also be
registered on both the memory controller side and the Module side
Byte ordering of data on the read and write buses is shown below
2.6
4 Theory of Operation
4.1 Video Timing
In order to simplify the design of the external encoder, VI generates most of the video timing required by the encoder.
It supports the timing of NTSC, PAL, and M-PAL. In addition, it displays the top-field only in non-interlace mode.
* During non-interlace mode, an equalization pulse is displayed only on the first half of a full line while a serration
pulse is displayed only on the second half of full line.
** With the exception of ACV, all the counts are in half lines. ACV is measured in full lines.
* During non-interlace mode, an equalization pulse is displayed only on the first half of a full line while a serration
pulse is displayed only on the second half of full line.
** With the exception of ACV, all the counts are in half lines. ACV is measured in full lines.
The above diagram only shows the first two fields of a 4-field NTSC signal. Since VI doesn’t distinguish burst phase,
the last two fields are the same as the first two fields.
In non-interlace mode, only the odd fields are displayed. The field rate is slightly lower than 60 fps as there are 263
lines per field instead of 262.5.
The above diagram only shows the first four fields of a 8-field PAL signal. Since VI doesn’t distinguish burst
phase, the last four fields are the same as the first four fields.
In non-interlace mode, only the odd fields are displayed. The field rate is slight lower than 50 fps as there are 313 lines
per field instead of 312.5 lines.
With the exception of the burst flag, MPAL has timing similar to NTSC. The above diagram shows the first four fields
of a 8-field M-PAL signal. Since VI doesn’t distinguish burst phase, the last four fields are similar to the first four
fields.
In non-interlace mode, only the odd fields are displayed. The field rate is slightly lower than 60 fps as there are 263
lines per field instead of 262.5.
The Y, Cr, and Cb components are buffered in three separate shift registers. Each register is responsible to replicate
the first and last pixels for filtering at the boundaries. To ease implementation, Cb and Cr pixels are averaged to 4:4:4
before filtering. This prevents chroma words from reading ahead of luma words. It also allows luma and chroma to
share the same control logic.
The new sampling position is controlled by an internal stepper. The stepper is incremented by a step size every output
pixel. The lowest eight bits of the stepper are rounded to three bits for determining the phase of the filter. Only one bit
to the left of the binary point is kept. If that bit is toggled, a new pixel is shifted into the pixel registers. The step size
of the stepper is determined by:
The following is a diagram showing the shifters and the filter datapath. As the video clock rate is twice the pixel rate
(27 vs 13.5), the datapath is time shared between the three components. The datapath consists of six multipliers, an
adder, and a set of lookup table.
The step size and the filter coefficients are set up through the VI’s register interface. The filter can be programmed to
have different cutoff frequency, pass band ripple, and stop band attenuation. As the filter is symmetrical, only half of it
is programmed. To conserve hardware in the filter, the filter coefficients are “enveloped”: The center 16 coefficients
are in the range [0, 2.0). The outter 32 coefficients are in the range [-0.125, 0.125). To achieve 8 times up sampling, it
is equivalent to design a 0.5Hz low pass filter at 8Hz sampling rate. A typical window sinc filter is shown in the
following diagrams.
The first gun trigger in a field latches the value of the display counters. Gun triggers occur in the remaining of the field
are ignored.
5 VI Registers
The following is a list of VI’s registers. Each register is 32bits. It is programmed by writing to the upper and lower 16-
bit words separately. The fourth column in each table shows the power-up reset values.
T3 9:0 Tap 3. -
T4 19:10 Tap 4. -
T5 29:20 Tap 5. -
* We have to make sure there is enough time to program all the double buffered registers after the active display and
before the beginning of a back porch. There is about six display lines worth of time (40 usec).
6 Test Plan
6.1 Environment
Dolphin’s DV test environment is used for testing VI. Simpler tests such as display timing can be tested by using stubs
of processor interface and memory controller. Complicated tests such as gun trigger control should use live blocks
instead. Output pixels are checked by comparing against a C model. Display timing such as sync and blanking are
verified by using a CCIR656 model or a Rohm encoder model. Before a real API is available, a tiny API similar to the
one used in ArtX1 DU (du_test) verification can be used to generate all the register setup.
6.2 Tests
6.2.1 Display Format Test
All the display standards supported by VI are tested. The aim is to verify the range of the registers and counters, and
the coverage of the state machines. Each format is tested twice: Once in the debug mode and another time in
Nintendo’s encoder mode. A debug mode trace file will be checked by our CCIR656 encoder model while a Nintendo
mode trace file will be sent to Nintendo for verification (we are unable to obtain Rohm’s encoder model).
PAL 60 288 I
M-PAL 50 240 I
(Load is 55pF.)
Symbol Parameter MIN MAX