The PNX2000 is a companion IC device for the Nexperia DVP SOC PNX8550, to be
used in combination with the PNX3000.
It is aimed at mid and high-end analogue and hybrid TV sets, focusing on input
decoding of a single stream of analogue audio and a single stream of analogue video
signals. In addition, the PNX2000 is used for decoding and the presentation of all
audio output streams in the system.
1.2 PNX2000 Feature Summary
1.2.1 Video Features
• Automatic Gain Control (AGC) to correct amplitude errors at input source.
• Synchronization identification (used for channel search).
• Sync processing for 1FH and 2FH video input source.
• Standard detection of PAL, NTSC or SECAM and various 1FH/2FH component
video input sources.
1.2.1.1 1FH Video
• Color decoding (ITU-601) for PAL, NTSC or SECAM input sources.
• 2D comb filter.
• Supports component video sources with sync on CVBS or green.
• Fastblank insertion of RGB signals onto CVBS input.
1.2.1.2 2FH Video
• Supports various progressive and interlaced component video sources.
• Synchronization of video sources with sync on Y or external H/V inputs.
The following table illustrates how the major functions are mapped to hardware
blocks.
Table 1: Major Functions
FunctionBlockDescription
High speed data-linkI2DReceives data in 3 streams from PNX3000
Video Decoder Processor VIDDECDecodes and processes CVBS, YUV or Y/C in YUV
2
Serial InterfaceI
Global Task UnitGTUGenerates all the internal clocks, Reset and Power
TV Sound DecoderDEMDEC
Audio ProcessorAUDIO
Data Capture UnitDCUAcquires VBI data (Teletext, CC, VPS) and formats
Formatter UnitITU-656Formats YUV, VBI data and CVBS data in ITU-656
Bus Control UnitBCUBus arbitration among all the internal blocks
CTo access all the internal registers
DSP
DSP
PNX2000
Functional Specification
stream
management
Demodulation, decoding of terrestrial TV audio
standards
Processing analogue and digital audio sources
in a stream
Table 2: Interfaces
Interface Description
2
I
CThe PNX2000 IC is controlled using an I2C bus. It performs like an I2C-bus to PI-
bus bridge, i.e. translates I
commands.
I2DReceives data in three streams from PNX3000.
2
I
SSerial digital audio interface (6 stereo inputs and 6 stereo outputs) for connection
to other devices that support the I
sound from a multi-channel digital audio decoder, provide additional ADCs and
DACs, or loop audio signals through an external processor or delay line.
ITU656Mainly intended to transfer output data stream externally to the PNX8550 but the
output data stream could also be readable by other ITU 656 input devices that
implement data valid signalling
DACSDigital-analogue converters used to generate analogue outputs from Sound Core
The PNX2000 device is controlled via an I2C interface. Internally, an I2C-to-PI Bus
bridge converts I
2
C accesses into read and write transactions on the internal PI-Bus.
This PI-Bus provides access to the control and status registers for all the modules in
the PNX2000 design. The operation of the internal PI bus is controlled by the BCU
block.
BCU
ITU656
Registers
I2D
Registers
I2C-Bus
I2C/PI Bus
Bridge
2
C Slave
I
PI Bus
Maste
PI Bus
I2S
Registers
IDDEC
Registers
GTU
Registers
DEMDEC
Registers
udio DSP
Registers
DCU
Registers
PI Bus
Figure 1: Control Interface
Page 20
Philips Semiconductors
2.2 I2C Bus Interface
2.2.1 I2C Bus Features
The I2C module has the following features:
PNX2000
Control Interface
• 7-bit I
• LSB of I
2
C slave address.
2
C address selectable from external pin, to allow two PNX2000 devices
to coexist on a shared I
• Auto increment addressing to allow sequential (burst) register accesses with no
address transmission overhead.
• PI Bus data width 32 bits.
• PI bus address width 32 bits.
2
• I
C data transmitted in big endian format (MSB transmitted first).
• Up to 400 kHz I2C bus speed.
2.2.2 Allocated I2C Address
2
The 7-bit I
A6A5A4A3A2A1A0RW
100010XX
C address of the PNX2000 device is:
2
C bus.
Bit A0 can be selected via the external pin I2CADR. This pin defaults to pull-down (A0
= 0) if left unconnected.
2.2.3 I2C Register Access Protocol
The following diagrams illustrate the procedure used to access register locations over
…(as
many 4 - byte data
words as desired).
The PNX2000 will
internally increment
the PI - Bus address
for each data word.
I2C Stop Condition
Figure 5: Burst Read
2.2.4 I2C Interface Block
The I2C interface module contains no software-accessible status or configuration
registers.
If the internal PI-Bus locks up, the I
holding the SCL signal low. The only way to break the lockup is to reset the entire
PNX2000 device. In order to avoid this condition, the BCU timeout register should be
configured by software early in the PNX2000 initialization process.
The PNX2000 I2C module will not respond to a ‘general call’ on the I2C-bus, i.e. when
a slave address of 0000000 is sent by a master. In case of any illegal address,
transmission of the data that follows is not acknowledged, and the transmission is
aborted.
The I
400 kbits/s in accordance with the I
2.3 BCU Module
2.3.1 BCU Features
The BCU module performs the following functions:
PNX2000
Control Interface
2
C-bus slave devices are capable of operating at a maximum speed of
• Address space mapping and slave selection
• Bus error notification and logging
• Bus timeout monitoring, with software programmable timeout threshold
2
C fast-mode specification.
• Interrupt generation on bus error and timeout
2.3.2 Registers
The BCU contains eight software accessible registers which are listed in
the following table. Note that the base address of the BCU is 0x07fe8000.
The “reset” values given in the tables in the following subsections correspond to the
state of a variable after PI-Bus reset.
2.3.2.1 BCU Interrupt Status Register (BCU_INT_STATUS)
This register contains the BCU interrupt status variables. It is read-only. The register
also controls the bus fault logging process.
Table 2: BCU_INT_STATUS register
BitsVariableResetR/W
31:2RSD--
1BCU_TO0R
0BCU_BE0R
RSDReserved bits, will produce zero on a read action and ignored on write
BCU_TO Time-out error:
PNX2000
Control Interface
action
0: no time-out error has occurred. Fault logging enabled if BCU_BE=0
and BCU_TO=0.
1: time-out error has occurred. Fault logging stopped. Registers
BCU_FAULT_STATUS and BCU_FAULT_ADDRESS contain valid
information. Depending on the state of the BCU_INT_EN flag in the
BCU_INT_ENABLE register, an interrupt request may be generated.
BCU_BE Bus error:
0: no bus error has occurred. Fault logging enabled if BCU_TO=0 and
BCU_BE=0.
1: bus error has occurred. Fault logging stopped. Registers
BCU_FAULT_STATUS and BCU_FAULT_ADDRESS contain valid
information. Depending on the state of the BCU_INT_EN flag in the
BCU_INT_ENABLE register, an interrupt request may be generated.
This register contains a variable to enable/disable BCU interrupt request generation.
It is read/writable. Note that this register does not have two enable bits (i.e.
corresponding to the two status bits in the BCU_INT_STATUS, BCU_INT_SET, and
BCU_INT_CLEAR registers). One enable bit controls the generation of both bus error
and timeout interrupts.
Table 3: BCU_INT_ENABLE register
BitsVariableResetR/W
31: 1RSD-R
0BCU_INT_EN0R/W
RSDReserved bits, produce zero on read action and ignored on
2.3.2.3 BCU Interrupt Status Set Command (BCU_INT_SET)
A write action to this address location allows to set variables in the
BCU_INT_STATUS register. A read action returns 0. The BCU_INT_SET command
is provided for diagnostic purposes only.
Table 4: BCU_INT_SET command
BitsVariableResetR/W
31:2RSD-R
1BCU_TO_SET-W
0BCU_BE_SET-W
RSD Reserved bits, produce zero on read action and ignored on a write.
BCU_TO_SET Time-out interrupt set:
PNX2000
Control Interface
1: enable BCU interrupt request. An interrupt request is
generated when the BCU_TO and/or BCU_BE flags in the
BCU_INT_STATUS register are set.
0: no effect
1: set BCU_TO variables
BCU_BE_SET Bus error interrupt set:
0: no effect
1: set BCU_BE variables
2.3.2.4 BCU Interrupt Status Clear Command (BCU_INT_CLEAR)
A write action to this address location allows to clear variables in the
BCU_INT_STATUS register. A read action returns 0.
Table 5: BCU_INT_CLEAR command
BitsVariableResetR/W
31:2RSD-R
1BCU_TO_CLEAR-W
0BCU_BE_CLEAR-W
RSDReserved bits, produce zero on read action and ignored on a write.
2.3.2.5 BCU Bus Fault Status Register (BCU_FAULT_STATUS)
This register captures status information on the PI-Bus operation that incurred a bus
error or time-out. The register content is valid only when the BCU_TO and/or
BCU_BE flags in BCU_INT_STATUS are set. The register is read-only. Note that the
PNX2000 design has only one bus master - the I
Table 6: BCU_FAULT_STATUS Register
BitsVariableResetR/W
31:8RSD--
7BCU_MASTER*XR
6BCU_LOCKXR
5BCU_READX R
4:0BCU_OPCXR
[6-1]* BCU_MASTER is not relevant for PNX2000
[6-2]X undefined
RSD (Reserved bits) will produce zero on a read action and will be ignored on a write
action.
2
C interface.
PNX2000
Control Interface
BCU_LOCK LOCK status of failed bus operation:
0: LOCK = 0
1: LOCK = 1
BCU_READ Data direction of failed bus operation:
0: write operation
1: read operation
BCU_OPC Opcode of failed bus operation:
refer to PI-Bus specification [2] for opcode definition.
2.3.2.6 BCU Bus Fault Address Register (BCU_FAULT_ADDR)
This register captures the address in a PI-Bus operation that incurred a bus error or
time-out. The register content is valid only when the BCU_TO and/or BCU_BE flags
in BCU_INT_STATUS are set. The register is read-only.
Table 7: BCU_FAULT_ADDR Register
BitsVar iableResetR/W
31:2BCU_ADDRXR
1:0RSD0R
[7-1]X undefined
BCU_ADDR failed bus operation address
RSD reserved bits, produce zero on a read action ignored on a write
This register defines the PI-Bus time-out threshold. It is read/writable. Although this
register has a default value of 0, it should be written with the value 0x800 soon after
reset, to prevent potential PI-Bus and I
Table 8: BCU_TOUT Register
BitsVariableResetR/W
31: 0BCU_TO_THRESHOLD0R/W
BCU_TO_THRESHOLDTime-out threshold:
2.3.2.8 BCU Memory Coherency Register (BCU_SNOOP)
PNX2000
Control Interface
2
C bus lockups.
0: never time-out
st
1: time-out after 1
4294967295: time-out after 4294967295th data cycle in bus
operation
data cycle in bus operation
This register enables/disables the start of the memory coherency protocol. This
register should be left at the default value, as the PNX2000 device does not support
cache-coherent memory access.
Table 9: BCU_SNOOP Register
BitsVariableResetR/W
31:3RSDXR
2BCU_SNOOP_MASTERS0R/W
1 BCU_SNOOP_WRITE0R/W
0BCU_SNOOP_READ0R/W
[9-1]X undefined
RSD Reserved bits, produce zero on a read action ignored on a
write
BCU_SNOOP_MASTERS Bit not relevant for PNX2000. To be left at default value.
BCU_SNOOP_WRITEBit not relevant for PNX2000. To be left at default value.
BCU_SNOOP_READ Bit not relevant for PNX2000. To be left at default value.
The PNX2000 memory map is given in the following table. Note that the address
ranges allocated to each block are not fully occupied by addressable register
locations.
This section provides an overview of the I2D link and how it may be applied. It gives
the user a guide to use the datalink and its functions. The purpose of the link is
transmitting data in three streams from the PNX3000 to the PNX2000. The use of
serial data connections results in a considerable reduction in pin count and the
number of connection wires that are needed between both IC’s.
The communication between one datalink transmitter and one datalink receiver
consists of two signals, a data signal and a strobe signal. The strobe signal contains
the data, bit-sync and word-sync information. For optimal EMC performance both
data and strobe are low voltage differential signals. The voltage swing on the wires is
about 300mV.
In the PNX3000 the video and audio data to be transmitted is multiplexed in an output
register of 42 bits. The content of that 42-bit register is serial transmitted on one of the
three datalinks. In the PNX2000 the serial data is demultiplexed into parallel streams.
With a software selection in the PNX3000 you can choose which data you want to set
in the output register for the datalink and in the PNX2000 you have to make a
selection which data from the datalink you want to use. The data on the datalink is
divided in several groups of signals (video, audio and strobe_signals). It is important
that the transmitter and receiver are in the same transmitting mode.
Page 32
Philips Semiconductors
d
U
Data Link
r
r
A
PNX2000
I2D
CVBS/Y-prim
CVBS/Y-prim
ICLP
2nd SIF/ 2
CVBS_sec
ICLP
Yyu
ICL
L1/AMint
R1/AMext
MIC/L2/PipM
n
SIF
Clk
54M
Clk
54MH
Clk
27/54M
Clk
27/54M
Clk
6.75MH
54MHz
Data Link
54MHz
Data Link 2
54MHz
DataLink
DataLi
DataLink
DataLink
PNX2000
I2D
Receive
4
D
I2D
Receiver
I2D
Receive
4
4
Clock
Domain
Separators
D
D
Xtal Clk
54MHz
Conf.
Registers
D
4
D
4
D
4
DTL
Controller
Demux_mode
VAL
Demux and
Formatter
PI toDTL
dapter
10
10
10
10
1+
1+
1+
1+
10
1+
1+
CVBS/
Yyuv/C
UV
CVBSs
L1
L2
R2
L2
SIF
HV
HV sec
MIC/R2
Figure 1: Overview - I2D Transmitter/Receiver
3.2 Functional Capabilities of the Links
The I2D link has the following characteristics.
• The datalink runs at 297MHz / 594 Mbs.
• The driver rise/fall time is around 200 pS.
• The datalink uses differential signals.
The receiver has an internal termination resistor of 100Ω differential connected.
• The differential threshold is 50 mV.
• The signalling voltages are between 200 – 500 mV.
• The datalink traces, both pairs should be of equally length and are internally
terminated with 100Ω (The PCB-lines also characteristic).
In the PNX3000 the data coming from the A/D converters (digital video and audio) is
multiplexed and put in data words. Each data word on the data links consists of 44
bits (4 video samples of 10 bits each, 2 audio samples of 2 bits and 2 word-sync bits).
The word clock is 13.5MHz. The data rate on each of the three data links is 44 bits/
cycle*13.5*106 Cycle/s=594Mbit/s. Figure 2
these can be sent to the digital video processor by the datalink. Mode 0 is the 1fh
mode and mode 1 is the 2fh mode (for datalink 1 and 2). Both modes can transferred
up to three video channels plus one sound IF signal and two L+R audio signals over
the data links simultaneously. For detailed transmission information see Table 2
PNX2000
I2D
• The max length of the datalink tracks is 20 cm (equal length), normal advice is 5
cm maximal.
• The maximal capacitance on the line is around 15 pF.
shows which signals are digitized and
.
ModApplication
0 TCVBS/Yp Cpri L
1 YUV 2 L R U V LRSI X X
n
Yyuv
Figure 2: Overview - Datalink Modes, Transmitter Side PNX3000
The I2D datalink is intended for the communication between the PNX3000 and the
PNX2000.
2
The I
D receiver module consists of three datalink receivers, and three Data Strobe
receivers. The data receiver regenerates the serial data bit-streams, and converts
them to parallel words of 42 bits (picture 4x10 bits and 2 bits of audio). When the data
is ready for output a valid Word Sync pulse is generated in the I
The Word Sync pulses are used by the clock domain separator to take over the 42
bits wide data from the I
The clock domain separator module converts the data from the transmitter clock
(13.5 or 27 MHz) domain (PNX3000) to the PNX2000 clock (13.5 / 54 MHz) domain.
There is a clock domain separator necessary because the signals in the PNX3000
are processed via different paths and then multiplexed on a serial data line with a
Data Strobe (and Word Sync). This leads to a static but unknown phase difference
between the PNX2000 and PNX3000 clock. In addition, the duration of the serial data
differs according the link length and group of data on the link and the different
processing in the PNX3000. That is why a clock domain separator is necessary.
The data from the clock domain separator module is passed to the de-multiplexer
module. This module formats the data into several audio and video streams (parallel
data) together with accompanying VALid pulses derived from the clock domain
separator (ready for takeover) to the Viddec and Demdec modules.
PNX2000
I2D
When the expected Word Sync pulse is not detected in the I
2
D receiver, the clock
domain separator still generates a DV pulse. The previous data is still on the parallel
output lines of the I
2
D receiver. When the Word Sync pulse is not detected, the
counter counts the missing DataValids. This internal counting continues until it
reaches the DV_MISS_MAX value (Table 8
reached, an interrupt DVx_MISS_STAT is generated, ref to Ta bl e 11
). When the limit of DV_MISS_MAX is
for more details,
and a synchronization action must follow. When the limit is reached the internal
counter is frozen.
When the max value of DV_MISS_MAX is not reached and a Word Sync pulse
arrives in the receiver window, the counter DV_MISS_MAX is reset.
When there is a situation in which the expected Word Sync pulse is detected in the
2
I
D receiver, but not within the data valid window (receiver window) of the Clock
domain Separator, the pulse is Out Of Window (OOW). The clock domain separator
generates a Data Valid (DV) pulse on the time that the clock domain separator
expects to receive a Word Sync pulse from the receiver. The data can still be valid if
the pulse comes to early, but if the pulse comes to late, the previous data can be on
the output when the clock domain separator takes the data over. When the Word
Sync pulse is out of his window detected, it generates an Out Of Window (OOW)
pulse (referring to I2D _REC_SYNC_LOST). This Out Of Window pulse increments
the counter (it counts the OOW pulses), the counter value itself cannot be read. This
counting continues till it reaches the OOW_MAX value (register I2D
_REC_SYNC_LOST). When the limit of OOW_MAX is reached, an interrupt
SYNCx_LOST_STAT is generated, ref to I2D _INT_STATUS for more details, and a
synchronization action must follow. When the max value of OOW_MAX is not
reached and a Word Sync pulse arrives in the receiver window, the counter
OOW_MAX is reset.
At the end of the receiver is a de-multiplexer, the de-multiplexer reformats the data
into several audio and video streams (parallel data) to the Viddec and Demdec.The
functional block diagram of the receiver is shown in Figure 4
The data from the PNX3000 can be sent in two modes (0, 1) to the receiver in the
PNX2000. Ta ble 1
transmitter in the PNX3000 has to be set by the external I
microprocessor in the PNX2000 transmits the mode settings and other multiplexer
settings by the I
configured in the same mode by the PI bus in the PNX2000. In Ta bl e 1
the dataflow and possible modes on each link. The software for the receiver runs in
the MIPS processor in the PNX2000. The software takes care of the boot sequences,
interrupts and the use of the data on the datalink.
When the transmitter is in mode 0 (all three transmitters are in mode 0), the receiver
has the possibility to extract data in mode 0a en 0b (for all three links together). This
is possible due to the group of 42 bits send together, see Figure 1
describes the data that can be extracted from the datalink. The
2
C communication link. The
2
C bus to the PNX3000. The receiver in the PNX2000 has to be
is described
and Table 2.
Rev. 1.0 — 28 November 2003 3-6
Page 37
Philips Semiconductors
When Viddec uses Y and C from mode 0 datalink 1, it can’t use YUV from datalink 2
(no sync available, they use the same bus in the demultiplexer output). If the Viddec
use YUV from datalink 2 (input from RGB in PNX3000) it use the CVBS datalink 1 for
sync.
Table 1: Content of Data Links
Datalink 1Bits
mode settingmode reg
value
mode 0a0x0R1L1C
mode 0b0x1R1L1-CVBS or Y
mode 10x2R1L1Yyuv
Datalink 2Bits
mode settingmode reg
value414039:3029:2019:109:0
mode 0a0x0R2L2----
mode 0b0x1R2L2V
mode 10x2R2L2V
414039:3029:2019:109:0
n+2
n+1
n+1
n+1
n
C
-CVBS or Y
n+1
Yyuv
n
U
n
V
n+1
n
n+2
n+3
CVBS or Y
Yyuv
Yyuv
n+2
U
PNX2000
CVBS or Y
Yyuv
Yyuv
n
U
n
n
n
n
I2D
Datalink 3Bits
mode settingmode reg
value
414039:3029:2019:109:0
mode 0a0x0HV
mode 0b0x1HV
mode 10x2HV
A CVBS or Y signal may be connected to the inputs of the PNX3000. The type of
signal on Datalink 1, in Mode 0 (a or b) is not known, but the preferred is shown bold underlined.
If from datalink 1 (mode 0b) the CVBS is used, via fast insertion the Viddec can use
the YUV (1fH-mode) signals from datalink2 if the signal contains a sync signal.
Figure 5
output of the multiplexer.
HVSIF
sec
HVSIF
sec
HVSIF
sec
n+1
n+1
n+1
CVBSsec
CVBSsec
CVBSsec
n+1
n+1
n+1
SIF
SIF
SIF
n
n
n
CVBSsec
CVBSsec
CVBSsec
, Figure 6 and Figure 7 show the use modes (video) in the receiver at the
Figure 7: Mode 1 Transmission (2fh on Main Channel, on sub is 1fh)
The control software has to set the right settings in the MPIF and AVIP.
3.4.2 Data Rate and Timing Output Signals
The output rate of the data from the datalink receiver is shown in Table 2 .
The HV_PRIM and HV_SEC are for the horizontal and vertical sync for the primary
and secondary channel (timing pulses in IF part). These are clamping signals, which
are coming from the VIDDEC. The frequency of the signals is dependent of the select-
The I2D configuration register block contains the control registers which are used to
configure the I
2
D receiver block, address decoder and two state machines. One to
synchronise the write request and the register write enable, and the other one to
synchronise the read request and read enable.
3.5.1 I2D Register Map
This section provides information on the I2D configuration. Each of the registers
within the receiver block is described separately below. The base address for the I
is set to 0x07FF8000 (32 bits), the last 3 digits (12 bits) are for the I
register.
Table 3: I2D Register Summary
NameAccess TypeWidthAddressReset Value
I2D _RX_CTRLRead/Write320x0000x1
I2D _RX_STATUSRead320x0040x1
I2D _MOD_IDRead320xFFC0x01410000
I2D _INT_SETWrite320xFEC0x00000000
I2D _INT_CLEARWrite320xFE80x00000000
I2D _INT_ENABLERead/Write320xFE40x00000000
I2D _INT_STATUSRead320xFE00x0000002a
I2D _REC_DEMUX_MODERead/Write320x0180x0001fff9
I2D _PRBS_CTRLRead/Write320x0240x00000000
I2D _PRBS_STATRead/Write320x0200x00000078
I2D _REC_SYNC_LOSTRead/Write320x01C0x000003e8
2
D control
2
D
3.5.1.1 I2D_RX_CTRL
Table 4: I2D_RX_CTRL
BitsNameAccess TypeReset ValueDescription
31..01RSD_31 To 1Reserved0x0 Reserved
0 RX_APPL_PDRead/Write 0x1Power down for analogue receiver in application mode.
'0' : The analogue receiver is active (normal mode)
'1' : The analogue receiver is in power down mode (For
0 PD_STAT_RXRead0x1Power down status of analogue datalink receiver.
'0' : The receiver is active (normal mode)
'1' : The receiver is in power down mode
This is a status bit to verify if the datalink receiver is really activated or if it was still in
power down mode. When the I2D_RX_CTRL bit 0 differs from the I2D_RX_STATUS
bit 0, there is a hardware problem, probably due to an internal test mode.
3.5.1.3 I2D_REC_DEMUX_MODE
Table 6: I2D _REC_DEMUX_MODE
BitsNameAccess Type Reset Value Description
31..18 RSD_31 To 18Reserved0x0Reserved
17SOFT_RESETWrite Only0x0Soft_reset of the clock domain separator
16DATA_VALID_MASK Read/Write0x1Mask the overall data valid flag (to enable data output to the
cores). '1' Enable '0' Hide
11..3VALID_MASKRead/Write0x1ffMask data valid of several type of data busses. Each bit: '0' to
hide. Bit no: [11]= SIF ; [10] =Right 2; [9]= Left 2;; [8]= Right 1;
[7] =Left 1 ;[6] =CVBS sec; [5]= U ;[4] =Y ; [3] =CVBS.
2:0DEMUX_MODERead/Write0x1Select the I2D content format to output mode '000' mode 0a
'001' mode 0b '010' mode 1
I2D
• Soft_reset is not latched, it resets (unlock) the clock domain separator. Read first
the I2D _REC_DEMUX reg. Then OR with bit 17 and then write back the register.
• Data_valid_mask is connected to clock domain separator to control (enable 1 /
disable 0) data_valid signal. Default (hard reset) value is enabling (1), with this bit
you enable or disable all data Valid signals. It is recommended that this bit is not
used.
• Valid_mask (bit 3 - 11) is connected to the demultiplexer block to control (enable
1/disable 0) the demultiplexer valid output signals for the desired buses. Default
(hard reset) is 0x1FF hex (enable all). When the Valid signal comes from the
Clock domain separator, the output data from the multiplexer is ready and has to
be read. When the Valid signal is a (0), the data is invalid. Every parallel signal
coming from the demultiplexer can be accompanied with the appropriate data
valid pulse derived from the Clock domain separator. This pulse can be enabled
by setting a value ‘1’ to its respective bit shown in the table below to the item
VALID_MASK of the register REC_DEMUX_MODE. To prevent crosstalk, it is
recommended to enable the data valid signals for the ones in use.
Demux_Mode (bit 0 – 2) is connected to the demultiplexer block to select the data
mode on the demultiplexer output. Default value is 0x01 bin. (Mode 0B, seeFigure 6
3.5.1.4 I2D _REC_SYNC_LOST
Sync lost timer before generating an interrupt.
Table 8: I2D_REC_SYNC_LOST
BitsNameAccess TypeReset ValueDescription
31..16DV_MISS_MAXRead/Write0x3e8Number of consecutive valid pulses missing before
generating an dv error interrupt '0' disables detection
and resets the counter
15..0OOW_MAXRead/Write0x3e8Number of consecutive valid pulses out of the catching
window before generating an 'out of sync' (sync lost)
interrupt' 0' disables detection and resets the counter
)
DV_MISS_MAX[31..16] (16 bits) is connected to the clock domain separator to set
the maximum value of consecutive missing data valid pulses. The default (Hard
reset) value is 0x3E8 (1000 dec). When the maximum value is reached an interrupt
'DVx_MISS_STAT’ is generated for the appropriate link (see register INT_STATUS).
OOW_MAX[15:0] (16 bits) is connected to the clock domain separator to set the
maximum value of consecutive out of window data valid pulses. The default (Hard
reset) value is 0x3E8 (1000 dec). When the maximum value is reached an interrupt
'SYNCx_LOST_STAT’ is generated for the appropriate link, (see register
INT_STATUS).
Remark: To ensure proper counting during lowering this value, first write a value of 0
into the DV_MISS_MAX or OOW_MAX value. Otherwise, the counter marker may be
shifted over the max_count, which will result in a 16 bit overcount (afterwards it will
continue at 0).
If an interrupt is to be cleared, the following procedure must be followed:
1. Write a 0x0 into OOW_MAX and DV_MISS_MAX register to disable detection
and reset the counter.
2. Clear the appropriate link in the <XREF>12D_INT_CLEAR register (for all write
3F).
3. Write the requested value to the OOW_MAX and DV_MISS_MAX register, then
write a 0 in the 12D_INT_CLEAR register.
Pseudo Random Bit Sequence checksum status. In this PRBS mode there is a biterror check on the content of the datalink, not on the datalink itself. The PRBS mode
can be used for bit-error rate analysis. The functions of OOW and DV_MISS are still
working.
Table 9: I2D_PRBS_STAT
BitsNameAccess TypeReset ValueDescription
31..7RSD_31 To 7Read Only0x0Reserved
6DV_UNDETRead Only0x1Global data valid undetected
'1' DV undetected yet
'0' DV has been detected
5DV3_UNDETRead Only0x1 Data valid of datalink 3 undetected
'1' DV undetected yet
'0' DV has been detected
4DV2_UNDETRead Only0x1 Data valid of datalink 2 undetected
'1' DV undetected yet
'0' DV has been detected
3DV1_UNDETRead Only0x1 Data valid of datalink 1 undetected
'1' DV undetected yet
'0' DV has been detected
2DLINK3_ERRORRead Only0x0Error on datalink 3
1DLINK2_ERRORRead Only0x0Error on datalink 2
0DLINK1_ERRORRead Only0x0Error on datalink 1
I2D
This mode is only useful for debug/test mode and for testing of the datalinks. This
mode is not necessary for application. It can be used to check the datalink channels
on data transfer.
3.5.1.6 I2D _PRBS_CTRL
Pseudo Random Bit Sequence checksum settings.
Table 10: I2D_PRBS_CTRL
BitsNameAccess TypeReset ValueDescription
31..8RSD_31 To 8Reserved0x0Reserved
7PRBS_ENABLERead/Write0x0(1) Enable check on Pseudo Random Bit
Sequence, (0) is normal mode and no check on
PRBS.
6DV_UNDET_SETWrite Only0x0Set data valid detection status to undetected for
global dv
5DV3_UNDET_SETWrite Only0x0Set data valid detection status to undetected for
datalink 3
4DV2_UNDET_SETWrite Only0x0Set data valid detection status to undetected for
datalink 2
3DV1_UNDET_SETWrite Only0x0Set data valid detection status to undetected for
2DL3_ERR_RSTWrite Only0x0Clear error status bit of datalink 3
1DL2_ERR_RSTWrite Only0x0Clear error status bit of datalink 2
0DL1_ERR_RSTWrite Only0x0Clear error status bit of datalink 1
[10-1]The DLx_ERR_RST registers don’t always work well. To clear the DLINKx_ERROR status in the I2D_PRBS_STATUS register,
the PRBS_ENABLE (bit 7) should be toggled off and on again.
PNX2000
[10-1]
[10-1]
[10-1]
This mode is only useful for debug mode, and for application not necessary. The
testing of datalinks is not necessary in normal mode, but can be usefull to check the
data transfer over the datalink.
3.5.1.7 I2D _INT_STATUS
The status of (possible) DVP interrupt requests.
Table 11: I2D _INT_STATUS
BitsNameAccess TypeReset Value Description
31..6RSD_31 To 6Reserved0x0Reserved
5DV3_MISS_STATRead Only0x0Data valids are missing for datalink 3. The max value
dv_miss_max has been reached.
4SYNC3_LOST_STATRead Only0x0Data valid out of sync indication for datalink 3. The max
value oow_max for out of window dv pulses has been
reached.
3DV2_MISS_STATRead Only0x0Data valids are missing for datalink 2. The max value
dv_miss_max has been reached.
2SYNC2_LOST_STATRead Only0x0Data valid out of sync indication for datalink2. The max
value oow_max for out of window dv pulses has been
reached.
1DV1_MISS_STATRead Only0x0Data valids are missing for datalink1. The max value
dv_miss_max has been reached.
0SYNC1_LOST_STATRead Only0x0Data valid out of sync indication for datalink1. The max
value oow_max for out of window dv pulses has been
reached.
I2D
In this register you can read the status of the link if there are missing data valid errors,
and if there has been loss of sync on one of the datalinks.
3.5.1.8 I2D _INT_ENABLE
Enable the DVP (Digital Video Platform) interrupt for request to the system IRQ
controller.
Table 12: I2D _INT_ENABLE
BitsNameAccess Type Reset ValueDescription
31..6RSD_31 To 6Reserved0x0Reserved
5DV3_MISS_ENARead/Write0x0Enable interrupt for missing data valid of datalink 3
4SYNC3_LOST_ENARead/Write0x0Enable interrupt for lost of sync of datalink 3
3DV2_MISS_ENARead/Write0x0Enable interrupt for missing data valid of datalink 2
2SYNC2_LOST_ENARead/Write0x0Enable interrupt for lost of sync of datalink 2
1DV1_MISS_ENARead/Write0x0Enable interrupt for missing data valid of datalink 1
0SYNC1_LOST_ENARead/Write0x0Enable interrupt for lost of sync of datalink 1
PNX2000
With this register you can enable or disable interrupts.
3.5.1.9 I2D _INT_CLEAR
Clear DVP interrupts. The I2D _INT_CLEAR is not a register, but a trigger
mechanism.
Table 13: I2D_INT_CLEAR
BitsNameAccess Type Reset Value Description
31..6RSD_31 To 6Reserved0x0Reserved
5DV3_MISS_CLRWrite Only0x0Clear indication for missing data valid of datalink 3
4SYNC3_LOST_CLRWrite Only0x0Clear indication for lost of sync of datalink 3
3DV2_MISS_CLRWrite Only0x0Clear indication for missing data valid of datalink 2
2SYNC2_LOST_CLRWrite Only0x0Clear indication for lost of sync of datalink 2
1DV1_MISS_CLRWrite Only0x0Clear indication for missing data valid of datalink 1
0SYNC1_LOST_CLRWrite Only0x0Clear indication for lost of sync of datalink 1
I2D
To clear the interrupts, write a 0 into OOW_MAX and DV_MISS_STAT registers. Then
clear the INT_CLEAR register (write 3F, for reset all) and write the OOW_MAX and
DV_MISS_STAT value (recommended is 0x50).
3.5.1.10 I2D _INT_SET
Set a DVP interrupt.
Table 14: I2D _INT_SET
BitsNameAccess Type Reset Value Description
31..6RSD_31 To 6Reserved0x0Reserved
5DV3_MISS_SETWrite Only0x0Simulate data valids are missing for datalink3. The max
value DV_MISS_MAX has been reached.
4SYNC3_LOST_SETWrite Only0x0Simulate data valid out of sync indication for datalink3. The
max value OOW_MAX for out of window DV pulses has
been reached.
3DV2_MISS_SETWrite Only0x0Simulate data valids are missing for datalink2. The max
value DV_MISS_MAX has been reached.
2SYNC2_LOST_SETWrite Only0x0Simulate data valid out of sync indication for datalink2. The
max value OOW_MAX for out of window DV pulses has
been reached.
1DV1_MISS_SETWrite Only0x0Simulate data valids are missing for datalink1. The max
value DV_MISS_MAX has been reached.
0SYNC1_LOST_SETWrite Only0x0Simulate data valid out of sync indication for datalink1. The
max value OOW_MAX for out of window DV pulses has
been reached.
This register allows the software to simulate a missing data valid, or loss of sync on
one or more links.
3.5.1.11 I2D _MOD_ID
Table 15: I2D _MOD_ID Block information
BitsNameAccess Type Reset Value Description
31..16MODULE_IDRead Only0x141Module identifier
15..12MAJOR_REV Read Only0x0Major Revision. Any revision that may break SW compatibility.
11..8MINOR_REVRead Only0x0Minor Revision. Any revision that still keep SW compatibility.
7..0APERTURERead Only0x0Aperture Size.
In this register you can read the hardware version. With the software version
identified you have a better overview of the hardware/software capabilities. Also, the
software can have better control over the modules if hardware version is known.
PNX2000
3.6 Interrupt Procedure
I2D
When the I2D core detects an interrupt condition, i.e. a situation that requires
software interaction, it sets the corresponding Internal Interrupt Status bit in the
Interrupt Status register. Then the I
enabled by inspecting the corresponding bit in the Interrupt Enable register. If this bit
is ‘1’, a system interrupt request will be generated.
The software should remove the cause of the interrupt condition by taking the
appropriate action. As soon as the cause is removed, the Internal Interrupt Status bit
in the Interrupt Status register must be cleared by writing a ‘1’ to the corresponding bit
of the Interrupt Clear register.
For debugging purposes the software can also generate ‘fake’ interrupt conditions by
writing a ‘1’ into bit i of the Interrupt Set register. The result is that the Interrupt Status
bit i will go high.
3.6.1 Interrupt Behaviour
The I2D interrupt architecture contains 4 registers: status, enable, set and clear.
Activation of an interrupt request starts as soon as the interrupt condition becomes
true. The interrupt condition can be read from the status register, its name indicates
the interrupt generated. Every interrupt condition (set interrupt or write action) can set
bits in the status register. The status register indicates one or more pending interrupt
conditions.
To disable interrupts:
2
D checks whether this interrupt condition is
• via register INT_ENABLE to enable/disable interrupts on a line
• via setting OOW_MAX and DV_MISS_MAX to 0x0.
To c l e a r interr u p t s :
• write 0x0 in DV_MISS_MAX and OOW_MAX register
• clear the interrupts via register INT_CLEAR (write 0x3F to it)
When an interrupt occurs, the reaction of the system is set maker dependent. It is
recommended to execute the soft-reset procedure. A software loop should check
whether the fault situation won’t occur again (polling or via interrupts). There are
several operating situations that can occur:
1. Start up
2. Normal operation
3. Soft_reset
4. Change of source selection
5. Sync lost on a datalink
6. Missing of data valid pulses
7. Test mode: pseudo random mode, set interrupt status bit for lost data and/or sync
PNX2000
I2D
• set default value 0x50 in DV_MISS_MAX and OOW_MAX register
3.6.2.1 Start Up
During startup, registers will have a default value after releasing the reset to the I2D
receiver registers.
The bit 0 in I2D_RX_CTRL has to activate the receiver. A 0 has to be written to it, by
startup the bit is: 1 (power down), needed to power down the HF datalink receiver in
sleep and coma modes. Enabling is needed for normal operations.
During startup the clock domain separator has to lock on the Data Valid signals. After
power up all the I2D interrupt sources are disabled. The clock domain separator block
is waiting for Data Valids (validity the data of the corresponding datalink) coming from
the three analog datalinks. If there are Data Valids on at least two data_links, which
are in the same clock period, the clock domain separator is locked on these pulse
rates.
Procedure at start up:
• Activate the receiver in reg: I2D _RX_CTRL, bit 0 (RX_APPL_PD) write 0.
• Disable the DV_MISS_MAX and OOW_MAX counter, by writing a 0, (disable int)
• Give a Soft_Reset, in I2D _REC_DEMUX_MODE write bit 17.
• Write 3F to the INT_CLEAR,
• Enable the DV_MISS_MAX and OOW_MAX counter and write defaut 0x50, the
minimum value is 2.
After this soft-reset the clock domain receiver locks again and the Data and Strobe
Signals should be stable. The receiver should now enter Normal operation, if not refer
to conditions 5 and 6 below.
During normal operation PNX2000 sends an operating status signal to the PNX3000
receiver (1 per second). When the receiver is in lock, the clock domain separator
continues to check that the Data Valid pulses are coming in the right window from the
datalinks. If the clock domain separator does not get Data Valid pulses within the
desired window, the number of MISsing Data Valid, or Out Of Window pulses, from
the corresponding link is incremented. If the number missing Data valid pulses to the
de-multiplexer is larger than OOW_MAX, or DV_MISS_MAX, the interrupt status is
set and an interrupt can be generated. When this happens, operating condition 5 or 6
occur.
Remark: If the clock domain separator does not get Data Valid signal within the
desired window, the data can still be valid.
3.6.2.3 Soft_reset
When a fault condition appears the clock domain separator gets out of lock (no data
pulses are detected within the window), when the limit of OOW_MAX or
DV_MISS_MAX is reached. However, the software resets the Rec_Demux_mode
register 07FF8018 and bit 17 from this register resets the clock domain separator and
the receiver can again lock on the data-stream.
PNX2000
I2D
Such a fault condition appears during start-up, for this reason the receiver is powered
down during switch on.
A temperature change, or start-up transient can cause fast phase shift of the datalink
and the clock domain receiver does not receive DV pulses within the catching or
locking window.
3.6.2.4 Change of Source Selection
When there is a request to change the video source, the AVIP sends a command via
the I2C bus telling the MPIF that it has to change the source. When the MPIF
changes the source, the Data Valids generated in the receiver are still right, but the
content from a packet is not right (due to the asynchronous switch over). The
MIPS_software itself has to find out where the MPIF has changed over. The change
over is in one packet.
3.6.2.5 Sync lost on a datalink (Out Of Sync)
When the counter OOW_MAX counts too many word sync out of the locked window
(meaning a number of such words, counted by a counter, exceeds the value set via
OOW_MAX item), the output data is not stable anymore. A sync_lost indicator is
raised, meaning SYNC3_LOST_STATSYNC2_LOST_STATSYNC2_LOST_STAT is
set to '1'. Change in value of a sync_lost indicator from '0' to '1' should be a trigger for
software to perform a soft_reset action to calibrate the clock domain again in order to
guarantee a good picture and sound quality.
The following steps can be executed in this situation:
1. Set a soft_reset item from the I2D_REC_DEMUX_MODE register to '1' in order to
calibrate the clock domain.
2. Write '0' into OOW_MAX item and afterwards write back again the chosen value
3. Clear the interrupts by writing 0x3F into I2D_INT_CLEAR register.
This calibration loop is needed to ensure a proper picture on the output. Otherwise
there can appear speckles on the screen and sound can be disturbed. Software can
decide whether they regular poll the status register or enable the interrupt.
In normal circumstances this interrupt should not appear. But when it does, software
should act as described in this section to ensure good picture and sound quality.
3.6.2.6 Missing data_valid pulses
When the clock domain separator doesn't receive word sync pulses, the
DV_MISS_MAX counter for a respective link is incremented. However each
consecutive time a word sync (or data valid) is received, the DV_MISS_MAX counter
of the appropriated datalink is reset. When the counter reaches the programmed
value, defined in DV_MISS_MAX register, the corresponding bit of the INT_STATUS
register (DV3_MISS_STAT or DV2_MISS_STAT or DV1_MISS_STAT) is set to 1 and
the datalink receiver generates an interrupt flag.
PNX2000
I2D
(recommended is 0x50). This action is necessary to clear the internal Out Of
Window counters.
If there is an indicator of data valid missing raised, meaning DV3_MISS_STAT
DV2_MISS_STAT DV1_MISS_STAT is set to '1', it is likely that the output data is
invalid. Change in value of a data valid missing indicator from '0' to '1' should be a
trigger for software to perform a recovery in order to guarantee a good picture and
sound quality.
The following steps can be executed in this situation:
1. Check the status of the datalink receivers. The RX_APPL_PD of the
I2D_RX_CTRL register should be set 0 and the PD_STAT_RX (bit 0) of
I2D_RX_STATUS should be equal. If this status bit is 1, there is an internal
hardware problem and should be stored in the Error register.
2. Set a soft_reset item from the I2D_REC_DEMUX_MODE register to '1' in order to
calibrate the clock domain again.
3. Write '0' into DV_MISS_MAX and afterwards write back again the chosen value
(recommended is 0x50). This action is necessary to clear the internal DV_MISS
counter.
4. Clear the interrupts by writing 0x3F into I2D_INT_CLEAR.
5. Put PPRS_ENABLE to '1' to start measurements on the I2D Receiver.
6. If the DV_UNDET bit remains high in 100ms, the I2D can not lock anymore to the
input. If the DVx_UNDET bits remain high in 100 ms, the corresponding data
valid did not arrive at all. In this situation, there is an external (hardware) problem
and should be logged into the Error register.
7. If the interrupt returns within 1 second, there is an external (hardware) problem of
bad reception and should be logged into the Error register.
Software can decide whether they regular poll the status register or enable the
interrupt. In normal circumstances this interrupt will never appear. But when it does
(due to a hardware defect or external factors), software should act as proposed in this
section. It is up to the custumer whether this software loop is implemented and if the
errors are logged in the Error register.
It is advised to blank the picture output when this condition appears, since the data is
corrupted. Most likely Viddec won't be able to lock and sound is disturbed. Check
whether the MPIF is booted up and functioning properly.
3.6.2.7 Test mode
It is not possible to do a boundary scan of the datalink transmitters in the MPIF and it
is not possible to do a boundary scan of the inputs of the AVIP receiver. So it is very
difficult to test the ICs on those points. Therefore it is possible to bring the MPIF in
pseudo-random mode (from version MPIF N1D). In this mode the manufacturer can
evaluate the transmitter-receiver link on various data profiles and analyze the link
behavior.
This test mode can be used to evaluate the data transfer from MPIF to AVIP.
PNX2000
I2D
The procedure is described below.
1. Blank the picture on the screen and switch off the sound output, to avoid noise on
the screen and noise out of the speakers.
2. Set the MPIF in pseudo-random mode via the PRND bit from the MPIF
Datalink_mode register. See user manual MPIF.
3. Write a '1' to Soft_reset from the I2D_REC_DEMUX_MODE register to calibrate
the clock domain again.
4. Set the OOW_MAX and DV_MISS_MAX counter in register: REC_SYNC_LOST
to 0x0. (Disables counter and interrupts generation) and write back again the
chosen value (recommended is 0x50).
5. Clear the I2D_INT_CLEAR register by writing 0x3F.
6. Activate the Pseudo-Random Bit Sequence check. Write 1 to PRBS_ENABLE
(bit 8) of the I2D_PRBS_CTRL register.
7. When the PRBS mode is activated, the circuit checks the data coming from the
MPIF. Afterwards poll the Pseudo Random Bit Sequence status (PRBS_STAT)
register regular. The value of this register should be 0x0.
– When the DVx_UNDET did not become '0', the datalink did not receive any
datavalid from the HF datalink receivers.
– When the DLINKx_ERROR is '1', it means the pseudo-random data was not
right on the line the corresponding error bit. This bit stays high until it is cleared
by toggling PRBS_ENABLE.
– When Interrupt DVx_MISS_STAT is high, the data valid does not appear
regular.
– When Interrupt SYNCx_LOST_STAT is high, the datalink is not calibrated well.
A soft_reset could be executed to calibrate again.
The working of PRBS registers is independent of the OOW and DV_MISS counters.
The data speed on the line is very high, so you know immediately if the line is good.
If no errors are observed during execution of the test, software can again switch off
the PRBS mode of MPIF and the I2D receiver and release the system (i.e. enable
sound and picture output).
If there are errors it means that:
PNX2000
I2D
• The transmitter in the MPIF is not functioning,
• The receiver in the AVIP is not functioning,
• The wire connection is not good (with one open wire it was found that the
transmission was still good. (The wire connection can be checked with the DCF
status bit of MPIF).
• There are outside disturbances (e.g. EMC, power stability).
• AGC on all inputs to ensure optimum use of the bit range
• CVBS and Y/C input
• Multi-standard Color decoder including PAL M and PAL N
• 2D Comb Filter
• YPrPb / RGB processing, both 1Fh and 2Fh
• Sync on CVBS, Y or external (external 2Fh only)
• Fast blanking for RGB on SCART (1Fh only)
The input can handle CVBS, Y/C and YUV signals.
Remark: The system can handle also RGB signals because the PNX3000 converts
RGB signals to YUV. The Y from YUV and C from Y/C share the same channel. In
practice, Y/C and YUV are not present at the same time, so this is no limitation.
The signals from the I
block. All incoming data streams are 10 bits wide and have the same sample
frequency. U and V, which are sampled at half the sample frequency of CVBS, C and
Y, are combined in one data stream.
The U and V stream is demultiplexed in separate U,V streams for further processing.
In the sample rate converter the data streams are transferred from the free running
sample clock to a line locked clock domain. At the same time the data sample size is
increased to 13 bit.
2
D receiver block are fed to the input of a data synchronizer
Page 53
Philips Semiconductors
PNX2000
Video Processing
Figure 1: Block Diagram VIDeo DECoder
The 13 bit wide data streams enter the AGC block. This block takes care to fit the
incoming signals optimally in the available 9 bit space for further processing in the
chain. Level deviations at the PNX3000 inputs from +3 dB to – 3dB are corrected. In
this way no excessive headroom needs to be reserved which improves the signal to
noise in the chain. The sync signal has a separate AGC block. The input for the Sync
AGC can be taken from the CVBS/Y channel or from the Y channel from YUV.
The CVBS and Y/C data are fed to a multi-standard color decoder. This decoder can
handle all world standards of PAL, SECAM and NTSC including Latin America. All
necessary filtering and traps are included. The input of the color demodulator can be
switched between the CVBS signal and the C signal to enable Y/C processing. The
decoder also incorporates a 2D combfilter for PAL (4 lines) and NTSC (2 lines) for
improved luminance and chrominance separation.
The YUV at the output of the color decoder connect to an YUV switch. At the other
input of this switch the YUV signals from the YUV input are connected. The switch
can be controlled by an external voltage (Fast Blanking on insertion pin) or forced by
software. A formatter combines the U and V stream again to one data stream with the
same sample frequency as the Y stream The sync output from the AGC goes to the
synchronization block. This block generates the Horizontal and Vertical pulses for
further processing (HVsync), as well as timing information for the PNX3000 for
correct black level clamping (HVinfo).
The YUV path and the synchronization can handle both 1Fh signals as 2Fh signals.
For 2 Fh signals, the sampling frequency for YUV is doubled and also the
synchronization uses a special 2 Fh part for sync processing.
The sync can be derived from the Y signals or from external H and V pulses. Also
ATSC YUV signals (tri level sync and Fh = 33.75 kHz) can be handled in 2 Fh mode.
To process 2Fh signals, the VIDDEC must be set in 2Fh mode by doubling one of its
clock frequencies coming from another block in PNX2000.
4.2 Data input, Sample Rate Converter and timing
Figure 2 shows typical input and sample rate conversion.
PNX2000
Video Processing
Figure 2: Input and Sample Rate Conversion
4.2.1 Short Description
The input can handle CVBS, Y/C and YUV. To distinguish the Y from Y/C and from
YUV the first is called Yyc and the second Yyuv. Cyc and Yyuv share the same data
path. The selection which signal is routed to the input is made by the I
block.
Figure 3 shows the data streams from I2D to VIDDEC for different modes.
PNX2000
Video Processing
Figure 3: Selection Input Data Streams for VIDDEC in I2D
For 1 Fh, all input data streams are 10 bit, sampled with 27 MHz derived from a free
running system clock. For 2 Fh, the Y and multiplexed UV data stream have a sample
rate of 54 MHz.
In the first block the data is converted from unsigned to signed and the UV data
stream is demultiplexed in separate U and V streams. The data streams are then fed
to a sample rate converter. The samples are converted from the free running system
clock domain to a (gated) line locked clock domain. (see PNX8550 for more
information)
The number of bits per sample is increased to 13 bits at the output to enable optimal
processing in the next AGC block.
The up converted 13 bit wide signals, coming from the sample rate converter, are
passed through an AGC stage to utilise the full 9 bits resolution of the color decoder.
The CVBS/Y, U and V signal path have their own AGC circuit, the Cyc and Yyuv
share the AGC circuit because these signals are not available at the same time.
Selection between Cyc and Yyuv is done in the I
At the input of the Sync AGC circuit, it is possible to select between the CVBS/Yyc
signal or the Yyuv signal for sync processing.
The AGC stage consists of a general programmable gain stage and a control circuit.
The gain stage is identical for all input signals. It features:
• Programmable black level for the input stage
• Programmable black level for the output stage
• Programmable gain range
For gain stages, which only carry one type of signal (CVBS/Yyc, U, V, Sync), the
settings are fixed.
For gain stages carrying different signals (Cyc or Yyuv) the settings must be adapted
for the selected signal. There are 3 control circuits, one for CVBS/Yyc, one for Cyc or
Yyuv, one for Sync signal, each adapted for the specific signal properties. The control
options are:
PNX2000
Video Processing
• Control on Sync amplitude
• Setting target sync amplitude
• Control on Peak White (Only CVBS/Yyc, Cyc or Yyuv)
• Setting target Peak White amplitude (Only CVBS/Yyc, Cyc or Yyuv)
• Minimal gain
• Maximal gain
• Fixed gain (No AGC)
• Hold momentary gain
In addition, the CVBS/Yyc control circuit can also use the (external) Peak White
Limiter of the Color Decoder to adapt the gain. The U and V gain stages are slaved to
the Cyc/Yyuv gain stage and the Cyc/Yyuv control circuit. At the output the streams
are 9 bits wide. The signals are routed to the Color decoder (CVBS/Yyc and Cyc), to
the YUV switch (Yyuv, U, V) and to the Sync circuit (CVBS/Yyc or Yyuv).
The 10 bits wide data, coming from the I2D receiver, are up converted to 13 bits by
the sample rate converter before entering the AGC gain stage. This implies that the
incoming data is multiplied with a factor of 8.
The gain stage is made universal for all channels, and to adapt the stage to the
specific input/output requirements, the black level at the input
(ctrl_blanking_offset_in), the gain (ctrl_divider) and the black level at the output
(ctrl_blanking_offset_out) are programmable.
After the gain stage, the data width is brought back to 9 bits wide to fit the data width
of the processing by the color decoder. Beside the data width, also the black level and
signal format (signed or unsigned) is adapted for the next stage. Below, a survey is
given from the input data versus output data of the AGC stage. In the picture, the
maximum data value, the minimum data value and the blanking level is indicated.
PNX2000
Video Processing
Figure 6: Input Format vs. Output Format of AGC
As indicated, different signals need different conversion. Especially the AGC gain
stage in the Cyc / Yyuv path needs attention, because it has to be configured
differently depending on the selected signal path.
Table 1: Bit Description - AGC Gain Stages - Address 0X7FF9xxx
add
xxxBitsNameFunctionR/DR/W
0402dmsd_sync_sel_ySelects sync input 2 Sync from CVBS/Yyc
path (1Fh) 3 Sync from Yyuv path (1Fh or
2Fh)
08431..29agc_cvbs_yyc_dividerSets amplification range of the AGC block3 R/W
Remark: In all Bit Description tables the R/D column indicates Reset/Default. If
default value is not given it is the same as the reset.
dmsd_sync_sel_y
The sync for the synchronization block can be taken from the CVBS/Yyc path or the
Cyc/Yyuv path. The Cyc/Yyuv path can also be used for 2Fh signals with sync on
Yyuv.
Remark: For 1Fh RGB signals, the sync is often taken from the (accompanying)
CVBS signal.
agc_xxx_divider
The divider sets the maximum gain of the stage. The first part of the stage is a preamplifier, whose gain can range between a minimum of 0 and a maximum of 1023.
The gain can be controlled by the AGC loop or programmed for a fixed gain
(see Section 4.3.3
Figure 7: AGC Universal Programmable Gain Stage
)
The programmable part of the gain stage consists of 3 parallel branches (dividers),
which can be selected individually or in combination. The amplification of the 3
branches at maximum pre-amplifier gain (1023) is 0.2500, 0.1250 and 0.0625
respectively and are controlled by agc_xxx_divider bits 2..0 in the same order.
So the gain range from the 13 bits input to the 9 bits output of the summation block
can be set between:
Remark: At least one branch has to be enabled.
This gain is finally multiplied by the fixed gain of the following block. This fixed gain is
not equal for all AGC gain stages.
In formula:
gain = pre-amp gain (dec) * ((div(2)*0.25 + div(1)*0.125 + div(0)*0.0625) / 1023) *
fixed gain
Programming
For the AGC divider stages of CVBS/Yyc, CrCb (Uyuv/VYuv) and Sync, the reset
value is the required value. No need to program these values.
PNX2000
Video Processing
• Minimal gain, agc_xxx_divider = 0 0 1 [binary] is 0.0625
• Maximum gain, agc_xxx_divider = 1 1 1 [binary] is 0.4375
Only for the Cyc/Yyuv stage, programming is needed, depending on the selected
signal path:
• Yyuv signal (YPrPb or RGB): agc_y_cyc_divider = 3 hex (bit 011)
• Cyc signal: agc_y_cyc_divider = 4 hex (bit 100)
agc_xxx_blanking_offset_in
Looking at the input format, we have two standard blanking levels at the input, 0 (0
hex) and –2176 (1780 hex two's complement). The selection between these two
levels is made by the most significant bit of AGC_xxx_blanking_offset_in (bit 7):
The bits agc_xxx_blanking_offset_in (6..0) control the offset in two's complement
mode. Resolution per step is 4 hex on the 13 bit wide input data, i.e. one step
increases the 13 bit data by 4 hex. Calculating back the resolution to the 10 bits data
at the output of the I
is ½ LSB on the 10 bits data, which is fine enough for this purpose.
The offset control is mainly to correct problems of black level offsets in previous
stages like the AD conversion. For PNX2000, no black level offset correction is
needed. So only the most significant bit 7 is used to select between the two standard
blanking levels at the input.
2
D receiver (or input of the sample rate converter), the resolution
Programming
For the AGC stages of CVBS/Yyc, CrCb (Uyuv/VYuv) and Sync, the reset value is the
required value. No need to program these values. Only for the Cyc/Yyuv stage,
programming is needed, depending on the selected signal path:
At the output, we have more difference in required format. The signals fed to the color
decoder are formatted in two's complement, while signals following the YUV path, are
unsigned. The blanking level has now to be programmed correctly for each signal
path. The offset value is 9 bits wide and has a resolution of 1 LSB/step related to the
9 bits wide output. The range is (in two's complement) –256 to 255. To have enough
range for the offset programming, an offset of 64 dec (40 hex) is added. This shifts
the range to – 192 to 319 The formula to calculate the needed offset value is:
For the required blanking level the value is given in Figure 7 Input format vs. output
format of AGC. Except for agc_y_cyc_blanking_offset_out, the needed value
equals the reset value:
The gain stage for the (combined) Cyc / Yyuv path contains an extra formatter stage
which contains a fixed gain and transforms the output levels of Yyuv to the levels,
suited to feed to the YUV switch. For the calculation of the
agc_y_cyc_blanking_level_offset_out for use with Yyuv we have to use the levels
before the formatter.
So the blanking level for Yyuv out is –136 dec (178 hex two's complement).
Using the formula the value for Yyuv becomes –200 dec (138 hex).
The blanking level for Cyc is 256.
The value for use with Cyc becomes 192 dec (C0 hex)
The range of the agc_xxx_blanking_offset_out is larger than needed for the
application in PNX2000.
It is possible to program the offset so high that the value of the output is higher than
the output range of 9 bits. In that case, the value is not clipped but folds over.
Because these high settings are not practical for PNX2000 other than for testing, this
is no limitation. In practice, the described values should be used, which have no
problems.
For the AGC stages of CVBS/Yyc, CrCb (Uyuv/VYuv) and Sync, the reset value is the
required value. No need to program these values.
Only for the Cyc/Yyuv stage, programming is needed, depending on the selected
signal path:
4.3.3 AGC Control Circuit
PNX2000
Video Processing
• Yyuv signal: agc_y_cyc_blanking_offset_out = -200 dec (138 hex, two's
complement)
• Cyc signal: agc_y_cyc_blanking_offset_out = 256 dec (C0 hex)
Figure 8: AGC Control Circuit CVBS/Yyc and Yyuv/Cyc
4.3.3.1 AGC Control Circuit for CVBS / Yyc path
The control circuit for the CVBS / Yyc path has a very flexible set-up. It is designed to
work in an automatic mode. In this case, the sync amplitude is used to determine the
needed gain factor for amplification of the total signal to the nominal level. To cope
with signals having compressed sync, a peak white limiter will take care that no
clipping occurs. In the CVBS / Yyc control circuit it is possible to use the AGC internal
peak white limiter or the "external" peak white limiter of the color decoder.
To improve the behavior for non-standard conditions, the maximum and minimum
gain can be programmed to prevent excessive adaptation. It is also possible to set a
fixed gain for test purposes. Also the gain of an active loop can be frozen for
measuring or testing.
The time constant of the AGC loop can be programmed differently for the situation
when there is horizontal lock (usually a fast time constant required) or when there is
no horizontal lock (usually slower time constant to prevent pumping). For this
purpose, the horizontal lock of the sync circuit is used. For monitoring, an interrupt
can be programmed to signal when the programmed gain limits are exceeded.
Table 2: Bit Description - AGC Gain Control - Address 0X7FF9xxx
add
BitsNameFunctionR/DR/W
xxx
0949.0agc_cvbs_yc_ctrl_gainvalue_piGain value when forcegain_pi = 11CDR/W
10agc_cvbs_yc_ctrlagc_cvbs_yc_ct
rl_forcegain_pi
11agc_cvbs_yc_ctrl_holdgain_pi0 Normal AGC loop operation1 Freezes the momentary
18..16 agc_cvbs_yc_ctrl_tau_catch_piAGC loop time constant when there is no H-lock
22..20 agc_cvbs_yc_ctrl_tau_inlock_piAGC loop time constant when there is H-lock000 Fast
23agc_cvbs_yc_ctrl_pw_ext_piEnables the "external" (= outside AGC block) peak white
24agc_cvbs_yc_ctrl_pw_int_piEnables the internal peak white limiter of the AGC block to
25agc_cvbs_yc_ctrl_sync_int_piEnables the sync AGC loop to apply the same
26agc_cvbs_yc_ctrl_copy_prot_piCorrects the nominal sync amplitude to 80% for
0A019..10 agc_cvbs_yyc_ctrl_low_gain_lim
_pi
0A419..10 agc_cvbs_yyc_ctrl_up_gain_lim_piSets maximum possible gain for the AGC loop39AR/W
0 Gain controlled by AGC loop. 1 Fixed gain, determined
by gainvalue_pi
gain of the loop
000 Fast AGC time constant. 111 Slow AGC time constant
AGC time constant111 Slow AGC time constant
limiter of the multi-standard color decoder to influence the
AGC loop. 0 External pk wh lim not enabled
1 External pk wh lim enabled
influence the AGC loop0 Internal pk wh lim not enabled1
Internal pk wh lim enabled
multiplication to the CVBS / YYC amplifier as needed to
bring the sync amplitude to nominal level 0 Control by
sync AGC loop not enabled1 Control by sync AGC loop
enabled
macrovision signals. Must be used when macrovision is
detected (dmsd_copro = 1) 0 Normal operation1 Use
reduced sync amplitude(80%)
Sets lowest possible gain for the AGC loop142R/W
0R/W
0R/W
1R/W
6R/W
1R/W
1R/W
1R/W
0R/W
0819..10 agc_cvbs_yc_monitor_hwgainReadout of the momentary gain value of the AGC loopR
FE013ics_agc_cvbs_yc_gain_limitInterrupt flag set to 1 when upper or lower gain limit is
When agc_cvbs_yc_ctrl_forcegain_pi is set to 1, the gain of the AGC stage is
determined by the setting of register agc_cvbs_yc_ctrl_gainvalue_pi. The 10 bits of
this register determine the amplification of the pre-amplifier, discussed in AGC Gain
Stages bit agc_xxx_divider.
The gain can be set from 0 to 1023.
The total amplification from input (13 bits) to output (9 bits) can be calculated using
the formula, given in the description of the agc_xxx_divider bit:
gain = pre-amp gain (dec) * ((div(2)*0.25 + div(1)*0.125 + div(0)*0.0625) / 1023) *
fixed gain. Taking into account that the fixed gain in the sync path is 1:
div(w) = agc_xxx_divider(w) where w is the bit number.
PNX2000
Video Processing
To scale the gain from 13 bit to the 10 bits wide output of the I
2
D receiver (or input of
the sample rate converter), the found gain value has to be multiplied by 8.
agc_cvbs_yc_ctrl_holdgain_pi
Implemented for test purposes to freeze the momentary gain.
agc_cvbs_yc_ctrl_ctrl_tau_catch_pi / _inlock_pi
While catching signals, the AGC time constant has to be fast to adapt quickly to
varying signals conditions during e.g. search tuning. When in lock, the AGC time
constant can better be chosen larger to prevent unstable behavior like pumping on
video content. Because it is possible to program different time constants when not in
lock (fast) and when in lock (less fast) the loop values do not need reprogramming
depending on the signal condition. The values for these registers after a reset should
perform ok.
When the amplitude of the total signal is attenuated proportionally but the relative
amplitude ratios are kept correct, the sync amplitude is the most ideal signal part to
determine the needed amplification to bring the signal back to nominal level.
Only for compressed sync, the amplification would become too large. The external
peak white limiter (present in the color decoder / Y processing part) can be used to
reduce the gain below peak white level. Also the internal peak white limiter in the
AGC can perform this task, but this peak white limiter clips immediately signals when
coming above peak white level, while the external peak white limiter is more
sophisticated in behaviour. It is advised to enable all three control circuits for the best
performance. This is also the status after a reset.
When macrovision is present in the signal, the sync amplitude is reduced to 80% of
the nominal sync level. Writing this bit to '1' adapts the sync target value to prevent
that the CVBS signal is amplified too much (to 125% in stead of 100%) in case of
signals containing macrovision on sync. The sync processing contains a bit,
dmsd_copro, which becomes 1 when macrovision in sync is detected.
This bit has to be monitored on a regular basis and
agc_cvbs_yc_ctrl_copy_prot_pi has to follow the value as indicated by
dmsd_copro for correct behaviour.
Limits the minimum and maximum gain of the AGC loop to prevent strange behavior
under abnormal signal conditions. Fair reset values have been implemented and we
do not expect that these values have to be adapted after a reset.
agc_cvbs_yc_monitor_hwgain
Reads out the momentary gain when the control loop is active. For test purposes.
PNX2000
Video Processing
ics_agc_cvbs_yyc_limit / _enab / _clr / _set
It is possible to enable an interrupt when the programmed lowest gain or upper gain
is reached. See Section 8.10
Programming
All registers have a proper value after reset and need no programming except for the
following one.
agc_cvbs_yc_ctrl_copy_prot_pi
Software has to monitor regularly (or can enable an interrupt to be signalled) the bit
dmsd_copro, which indicates whether macrovision is detected in the sync. The value
of agc_cvbs_yc_ctrl_copy_prot_pi has to follow the value of dmsd_copro.
4.3.3.2 AGC Control Circuit for Yyuv / Cyc Path
The basic control mechanisms for this path are identical as for the CVBS / Yyc path.
Only here we have to adapt the settings depending on the type of signal:
Remark: When YUV processing is selected, the gain of the AGC amplifiers in the UV
path is slaved to the amplification of the Yyuv AGC stage.
Differences with the CVBS / Yyc path:
Missing control option
There is no option to use an external peak white limiter, because the Yyuv is not
routed through the color decoder part. So for peak white control, only the internal
peak white clipper can be used.
Because the Yyuv / Cyc path can handle a variety of signals, the peak white level and
the top sync level can be programmed. These values are used when the
agc_y_cyc_ctrl_enable_pw_int_pi / _sync_int_pi enable AGC control by the
(internal) peak white limiter or sync amplitude.
When the gain of the Yyuv / Cyc stage is forced to manual
(agc_y_cyc_ctrl_forcegain_pi = 1) and the setting of the gain value
(agc_y_cyc_ctrl_gainvalue_pi) is set too high (3FF), fold over may occur. Because
this is not a practical situation and it is advised to use automatic settings, this is not a
problem in practice.
PNX2000
Video Processing
Settings for different signal streams
The subsequent paragraphs describe the control register settings for the three
possible input signals:
• YPrPb
• RGB with sync on CVBS
• Cyc
To start with the first two, the levels are given of a Y signal before and after the AGC
stage.
Figure 9: Levels Before and After the AGC in the Yyuv Path
These levels are needed to calculate amplification factors.
YPrPb
The setting for YPrPb are comparable with the settings for CVBS/Yyc. The signal
contains a nominal sync which can be used for gain control and the peak white limiter
can be enabled to limit the gain for compressed sync. The top sync target should be
set for a nominal sync, which is –256d (100 hex two's complement)
(These levels are explained in the next chapter about the sync AGC path.) The peak
target can be set for the maximum level at the 9 bits output, which is 511d (1FF hex).
Table 4: AGC Yyuv / Cyc for YPrPb Signals
NameSetting for YPrPbReset/Default
Agc_y_cyc_ctrl_gainvalue_pi 15D 0E8/
Agc_y_cyc_ctrl_forcegain_pi00
Agc_y_cyc_ctrl_holdgain_pi00
Agc_y_cyc_ctrl_tau_catch_pi11
Agc_y_cyc_ctrl_tau_inlock_pi 66
agc_y_cyc_ctrl_enable_pw_int_pi 11
agc_y_cyc_ctrl_enable_sync_int_pi 11
Agc_y_cyc_ctrl_peak_target_pi 13B 1FF/13B
Agc_y_cyc_ctrl_top_sync_target_pi100/118100/
Agc_y_cyc_ctrl_low_gain_lim_pi0F511F/0F5
Agc_y_cyc_ctrl_up_gain_lim_pi2BA332/2BA
Agc_y_cyc_divider34
PNX2000
Video Processing
[4-1]
[4-2]
[4-1]15D (YPrPb), 100 (Y/C)
[4-2]100 or 118 when Macrovision present
As can be seen, the reset values are not correct for a number of control bits for
processing of YPrPb signals. This is related to an adaptation of the AGC block design
without adapting the reset values. The bits, needing another default value, are:
agc_y_cyc_ctrl_peak_target_pi = 13B (Reset: 1FF)
agc_y_cyc_ctrl_top_sync_target_pi = 100 / 118 (See Macrovision in Sync of
YPrPb Signals)
agc_y_cyc_ctrl_low_gain_lim_pi = 0F5 (Reset: 11F)
agc_y_cyc_ctrl_up_gain_lim_pi = 2BA (Reset: 332)
The value of the bits below are different for YPrPb / RGB processing and Cyc
processing. For YPrPb / RGB the value becomes:
Also YPrPb signals can contain macrovision in the sync. The presence of
macrovision in sync can be read out by the detection bit dmsd_copro for 1Fh signals
and copro_2fh for 2Fh signals, just like with CVBS / Yyc, provided that for the sync
processing the Yyuv signal path is selected by setting dmsd-sync_sel_y to 1.
Only the Yyuv / Cyc control block does not contain a special bit like in the CVBS / Yyc
control block (agc_cvbs_yc_ctrl_copy_prot_pi) which compensates for the 80%
sync levels.
However, we can use the agc_y_cyc_ctrl_top_sync_target_pi to adapt the target
level to compensate for the 80% sync levels with macrovision. For calculation of the
value, see Figure 10
PNX2000
Video Processing
.
Figure 10: Levels Before and After the AGC in the Sync Path
A nominal sync at the AGC output has an amplitude of 120d, while the blanking level
is at –136d. The value for agc_y_cyc_ctrl_top_sync_target_pi is the level of the
sync bottom. So for a nominal sync this is –256 (100 hex two's complement) For 80%
sync level, the amplitude becomes 0.8 * 120 = 96. Taking the blanking level as
reference, the sync bottom becomes –232d, which is 118 in hex two's complement.
So also for the Yyuv path it is important to check for macrovision and adapt the
setting of agc_y_cyc_ctrl_top_sync_target_pi accordingly.
Programming
Ensure that the following registers are programmed with another value after reset:
agc_y_cyc_ctrl_peak_target_pi = 13B (Reset: 1FF)
agc_y_cyc_ctrl_top_sync_target_pi = 100 / 118 (See Macrovision in Sync of
The signal levels for RGB input signals are the same as for Yyuv, because the RGB
signals are converted to YUV format in the PNX3000 before further processing. Only
the RGB signals do not contain sync, which excludes the possibility to use the sync
for AGC control.
The proposal is to optimize the performance for nominal signals. By setting the
maximum gain (agc_y_cyc_ctrl_up_gain) such, that nominal signals are remaining
just below the peak white target, nominal signals will be linear processed. Too small
signals will lead to smaller levels at the RGB outputs, but for most scenes this will be
compensated by the beam current limiter. For too large signals, the peak white limiter
is enabled to reduce the gain when needed. The minimum gain can be set to
accommodate signals up to +3 dB.
PNX2000
Video Processing
Describing the gain stages, for the bits agc_xxx_divider a formula is given which can
be used to calculate the gain in the Yyuv stage:
gain = pre-amp gain (dec) * ((div(2)*0.25 + div(1)*0.125 + div(0)*0.0625) /
1023)*fixed gain
For the Yyuv /Cyc stage in Yyuv mode, div(1) and div(0) are programmed and the
fixed gain is 1.5625, so the formula becomes:
gain Yyuv / Cyc = pre-amp gain (dec) * ((0.125 + 0.0625) / 1023) * 1.5625
For nominal signal, the gain is (see Figure 10
) the black to white pk-pk level at the
output divided by the black to white pk-pk level at the input.
Gain = (470 – 32) / (2208 + 2176) = 0.1 -> The pre-amp gain becomes 349.
So the setting of agc_y_cyc_ctrl_up_gain becomes 349 dec (15D hex).
The setting for agc_y_cyc_ctrl_low_gain must be 3dB lower, 247 dec (F7 hex). This
last value is almost identical to the default value (not the reset value!!!) of
agc_y_cyc_ctrl_low_gain (F5 hex) and needs no change.
The table with all settings for RGB with sync on CVBS is given below:
Table 5: AGC Yyuv / Cyc for RGB Signals with Sync on CVBS
Processing of Cyc is different from the other discussed signals. The color decoder
has its own AGC to adapt the gain of the color carrier, using the burst as reference.
So for the Cyc signal, we can set a fixed gain. The gain should be chosen such that
for nominal Cyc levels the input at the color decoder is the same as when nominal
CVBS signals are fed to the color decoder. Taking into account the whole path from
PNX3000 to input of AGC, we need an attenuation from input to output of the AGC
block from 0.0625 (1/16). Using the formula for the gain of the Yyuv / Cyc stage we
can calculate the required pre-amp gain value:
gain = pre-amp gain (dec) * ((div(2)*0.25 + div(1)*0.125 + div(0)*0.0625) /
1023)*fixed gain
For the Yyuv / Cyc stage in Cyc mode, only div(2) must be programmed 1. In Cyc
mode, the fixed gain is also 1. The formula becomes:
gain Yyuv / Cyc = pre-amp gain (dec) * 0.25 / 1023.
The pre-amp gain has to be set to 256 dec (100 hex).
The table with settings for Cyc becomes:
Table 6: AGC Yyuv / Cyc for Cyc Signals
NameSetting for YPrPbReset/Default
Agc_y_cyc_ctrl_gainvalue_pi 100 0E8/*
Agc_y_cyc_ctrl_forcegain_pi10
Agc_y_cyc_ctrl_holdgain_pi00
Agc_y_cyc_ctrl_tau_catch_pi11
Agc_y_cyc_ctrl_tau_inlock_pi 66
agc_y_cyc_ctrl_enable_pw_int_pi 11
agc_y_cyc_ctrl_enable_sync_int_pi 11
Agc_y_cyc_ctrl_peak_target_pi 13B 1FF/13B
Agc_y_cyc_ctrl_top_sync_target_pi100100/
Agc_y_cyc_ctrl_low_gain_lim_pi0F511F/0F5
Agc_y_cyc_ctrl_up_gain_lim_pi2BA332/2BA
Agc_y_cyc_divider44
PNX2000
Video Processing
1)
By forcing the gain (programming agc_y_cyc_ctrl_gainvalue_pi and forcing fixed
gain setting with agc_y_cyc_ctrl_forcegain_pi all other settings can remain as the
default settings for the YPrPb and RGB mode. In fact, they are ‘don't cares’ in this
mode.
Programming
Only registers to be set different from default value for YPrPb and RGB:
The AGC for the sync amplifies the sync portion of the CVBS / Yyc or Yyuv signal to
a level, suitable for the sync slicer of the synchronization block. Because the
amplitude is less critical (as long as it is large enough, the sync circuit will work ok),
the control options are limited.
Table 7: Bit Description - AGC Control Circuit for the Sync Path - Address 0X7FF9xxx
add
xxxBitsNameFunctionR/DR/W
0909..0agc_sync_ctrl_gainvalue_piGain value when forcegain_pi = 10E8R/W
10agc_sync_ctrl_forcegain_pi0 Gain controlled by AGC loop 1 Fixed gain,
determined by gainvalue_pi
11agc_sync_ctrl_holdgain_pi0 Normal AGC loop operation 1 Freezes the
momentary gain of the loop
18..16agc_sync_ctrl_tau_catch_piAGC loop time constant when there is no Hlock 000 Fast AGC time constant 111 Slow
AGC time constant
22..20agc_sync_ctrl_tau_inlock_piAGC loop time constant when there is no Hlock
000 Fast AGC time constant 111 Slow AGC
time constant
0A09..0agc_sync_ctrl_low_gain_lim_piSets lowest possible gain for the AGC loopABR/W
0A49..0agc_sync_ctrl_up_gain_lim_piSets maximum possible gain for the AGC
loop
0089..0agc_sync_monitor_hwgainReadout of the momentary gain value of the
AGC loop
0E012ics_agc_sync_gain_limitInterrupt flag set to 1 when upper or lower
gain limit is exceeded
0R/W
0R/W
1R/W
6R/W
2DBR/W
R
R
The working of all bits has been explained already in the CVBS / Yyc path, and will
not be described again here. The sync AGC loop is always put in automatic mode,
there is no need to change the settings for different input signals. The reset values
are correct and do not need to be changed.
For understanding and to enable calculation of the top sync target value in the Yyuv /
Cyc path, below the levels are given before and after the sync AGC.
Figure 12: Levels Before and After Sync AGC
PNX2000
Video Processing
For the sync AGC, the part below blanking level of CVBS / Yyc or Yyuv is used.
At the input, the blanking level is –2176 dec, at the output the level is –136 dec. (see
also Section 4.3.2
A nominal sync at the input has a pk-pk amplitude of 120d. The sync input has its
own gain stage and can handle levels from 60d to 120d. The settings in the AGC
block are chosen such, that for each sync input including compressed sync these pkpk levels are reached.
When in the Yyuv / Cyc AGC stage the value agc_y_cyc_ctrl_top_sync_target_pi
is programmed, the value should be set between –256d (100 hex two's complement)
to –196d (13C hex two's complement).to guarantee a pk-pk sync amplitude between
60d and 120d. For calculations, the knowledge that a nominal sync has just a pk-pk
amplitude of 120d can be used.
Programming
As indicated, The sync AGC loop is always put in automatic mode, there is no need to
change the settings for different input signals. The reset values are correct and need
not to be changed.
).
4.4 Digital Multi Standard Decoder (DMSD)
The CVBS or Yyc signal first enters an adjustable line delay stage. This stage
compensates for the line delay when the combfilter is used. Next, the color
information is removed from the CVBS signal by subtracting the remodulated color
carrier from the U,V demodulation. The Y delay compensates for time differences of
the Y signal and the demodulated U and V signals.
Figure 13: Block Diagram Digital Multi Standard Decoder (DMSD)
The (de)peaking circuit not only controls the (de)peaking of the Y signal but also
contains some traps for filtering unwanted residual components from Y. The color
decoder input can select either the CVBS signal or the C signal as input. The color
carrier is demodulated and the U, V signals are low pass filtered and down sampled
to match the U, V needed bandwidth.
For better luminance and chrominance separation a 2D combfilter can be used for
PAL (4 lines) and NTSC (2 lines). It can also be bypassed. After the combfilter
selection switch the U and V signals split. One branch passes the programmable Low
Pass Filter 3. After the filter the U and V signals are remodulated on the regenerated
color carrier. This color carrier is then subtracted from the CVBS signal to obtain the
luminance information (Y).
The other branch passes another programmable Low Pass Filter. In case of SECAM,
the signals pass a SECAM decoder block. The U and V signals split again. One
stream goes to the control block, which contains the color phase detector, the loop
filter and auxiliary functions like Hue, Automatic Gain control (Color AGC) and
Automatic Color Control (ACC). The loop filter output controls the Chroma Discrete
Time Oscillator (DTO) which controls two Sub carrier generators, one for
demodulation of the incoming color carrier, one (including a delay compensation for
exact matching) for the remodulation of U and V to remove the color carrier
information from the CVBS.
The other stream passes an adjustable gain amplifier, which is controlled by the AGC
and ACC from the above described control block. A delay line section, needed for
PAL and SECAM completes the U, V processing. The delay line can be bypassed, in
which case 6 dB gain is added to the U,V to match the output levels of the delay line
section.
The processed Y, U and V then enter the control stage in which brightness, contrast
and saturation can be adjusted. For the PNX2000, these controls have a fixed
setting, because these items are controlled in other processing blocks. Further some
compensation in gain and offset can be made to compensate for errors in the
processing. These need not to be used in PNX2000.
A color system manager block, Macrovision detection block and a Debug and control
block complete the DMSD.
4.4.1 Y processing
The CVBS / Yyc signal first passes a line delay compensation (dmsd_ldel). This
compensates for the two (PAL) or one (NTSC) line delay in U and V when the comb
filter is used for chrominance and luminance. An identical delay compensation is
used for the Sub carrier generator. The color information is removed from the CVBS
by subtracting the remodulated U and V from the decoder from the CVBS. The Y
signal at the output passes a delay section, which can be used when the transitions in
Y and U / V are not coinciding. The (de)peaking section not only adapts the peaking
in the Y channel but also controls a number of traps to remove unwanted residual
components.
Table 8: Bit Description - Y Processing - Address 0X7FF9xxx
add
xxxBitsNameFunctionR/DR/W
[8-1]
19014dmsd_ldelExtra number of lines delay after vertical sync in NON-combfilter mode
0 No lines delay (recommended)
1 SECAM: No lines delay, NTSC: 1 line delay, PAL: 2 lines delay
13..11 dmsd_ydel Luminance delay with respect to chroma0R/W
10..7dmsd_lufi Luminance peaking
0000 Flat (recommended)
0001 Peaking 8.0 dB at 4.1 MHz
0010 Peaking 6.8 dB at 4.1 MHz
0011 Peaking 5.1 dB at 4.1 MHz
0100 Peaking 4.1 dB at 4.1 MHz
0101 Peaking 3.0 dB at 4.1 MHz
0110 Peaking 2.3 dB at 4.1 MHz
0111 Peaking 1.6 dB at 4.1 MHz
1000 LPF -2 dB at 4.1 MHz
1001 LPF -3 dB at 4.1 MHz
1010 LPF -3 dB at 3.3 MHz, -4 dB at 4.1 MHz
1011 LPF -3 dB at 2.6 MHz, -8 dB at 4.1 MHz
1100 LPF -3 dB at 2.4 MHz, -14 dB at 4.1 MHz
1101 LPF -3 dB at 2.2 MHz, notch at 3.4 MHz
1110 LPF -3 dB at 1.9 MHz, notch at 3.0 MHz
1101 LPF -3 dB at 1.7 MHz, notch at 2.5 MHz
0/
0
R/W
[8-1]For value see text
dmsd_ldel
The bit controls the number of lines delay when the combfilter is switched off.
In combfilter mode, the signals of PAL are 2 lines delayed and the signals for NTSC 1
line. To have the same delay when combfilter is switched on or off, for PAL and NTSC
this bit should be set to 1. For SECAM it is required that this bit is set to 0.
Remark: For SECAM no comb filtering is possible. So advised setting is:
• Set 1 when PAL or NTSC color system is detected
• Set 0 when SECAM is detected (for SECAM this bit has to be 0, it is not allowed
to be 1)
dmsd_ydel
Controls the delay of Y with respect to chroma (U and V). When transitions of
luminance (Y) and Chrominance (U and V) are not at the same horizontal position,
this register can delay the Y until the transitions fit. Depending on the color system
and the combfilter setting, the delay has to be adapted.
Because peaking is done in another block, no peaking should be applied here.
However, the peaking is also used to compensate for the Y trap when no combfilter is
used. Therefore peaking has to be applied when no combfilter is used. The advised
settings are pending on the combfilter setting and the color system:
Programming
dmsd_ldel needs to be set according to the found colour system:
PNX2000
Video Processing
• 3 when the combfilter is switched off and PAL is detected0 when the combfilter is
active (Only possible for PAL and NTSC)
• 6 when the combfilter is switched off and NTSC is detected.
• 11 when SECAM is detected. (No combfilter possible and no Y/C available for
SECAM)
• 1 when PAL or NTSC is detected
• 0 when SECAM is detected
dmsd_ydel has to be set according to the found colour system or is fixed.
dmsd_lufi has to be set according to the activation of the combfilter and the colour
system
• 0 when the combfilter is active (only possible for PAL and NTSC)
• 3 when the combfilter is switched off and PAL is detected
• 6 when the combfilter is switched off and NTSC is detected.
• 11 when SECAM is detected.
4.4.2 Demodulator, Filtering (Combfilter) and SECAM Decoder
A switch selects between the incoming CVBS signal or Cyc signal (chr_inp_del).
The selected signal is then demodulated. The sub carrier generator for demodulation
is controlled by the colour PLL, which will be discussed in another
chapter.chr_inp_del
Table 9: Bit Description - Demodulator - Address 0X7FF9xxx
add xxx Bits NameFunctionR/DR/W
0403chr_inp_del Selects CVBS or C input for the colour
Programming
CVBS/YC detection
0/xR/W
decoder 0 CVBS 1 Cyc
Detection whether a CVBS signal or Y/C signal is connected, when the CVBS path
and Y/C path are shared, can be done in three ways:
1. Use two menu items for the combined CVBS/YC connector, one configured for
CVBS and one configured for YC. The customer can decide himself by watching
whether the picture has colour or is Black and White which is the right selection.
2. Use a mechanical switch to indicate whether a cable is connected to the CVBS
3. Automatic detection via software. An algorithm is described in Section 4.4.9.1
Though reliable detection is possible in this way, the time needed to guarantee a
reliable detection can run up to 2 seconds after selecting the input.
4.4.2.2 Filtering
The demodulated U and V pass through a programmable Low Pass Filter 1. The
selected bandwidth of this filter determines the bandwidth of the U and V signals. A
high U,V bandwidth will result after remodulation and subtraction of the chroma from
the CVBS signal in a lower Luminance bandwidth. The U,V signals are then down
sampled to bring the sampling rate in line with the U,V bandwidth.
The down sampled U and V signals can go through a combfilter section or bypass the
combfilter. The 2D combfilter contains a number of registers to control the
performance. After the combfilter a switch section selects whether the non- combed
or combed U and V signals are used for further processing. Note that for Luma
processing and Chroma processing the selection can be made independently. In
practice the selection should be synchronised for Chroma and Luma of course.
PNX2000
Video Processing
input or Y/C input (only possible when connectors are cinch for CVBS and 4-pin
mini-din for Y/C). Software can readout the pin status via an I/O port and
configure the correct settings.
For Y/C signals it is possible to bypass the filtering completely. The U,V signals after
the combfilter selection switch for the Chroma path pass the programmable Low Pass
Filter 2. The selected bandwidth determines the final U,V bandwidth for further
processing.
The U,V signals after the combfilter selection switch for the Luma path are fed to the
programmable Low Pass Filter 3. The selected bandwidth determines the resulting
notch width in the Luma path after the remodulation and subtraction of the Colour
information from the CVBS.
17..16 dmsd_medgComb median filter gain
00 Highest Luma bandwidth at high colour saturation
10 Recommended setting
11 Lowest Luma bandwidth at high colour saturation
19..18 dmsd_vedgComb vertical difference gain
00 Highest Luma bandwidth at vertical transients
10 Recommended setting
11 Lowest Luma bandwidth at vertical transients
21..20 dmsd_hodgComb horizontal difference gain
00 Highest Luma bandwidth at horizontal transients
10 Recommended setting
11 Lowest Luma bandwidth at horizontal transients
23..22 dmsd_cmbt Comb amplitude threshold to adjust the comb strength for signals with
small chroma content
Table 10: Bit Description - Filters - Address 0X7FF9xxx
add
xxxBitsNameFunctionR/DR/W
19820dmsd_set_vbiBypass Luma and Chroma filtering during Vertical Blanking Interval
(VBI). Only intended for test purposes
0 No bypass during VBI (recommended)
1 Bypass during VBI
1903dmsd_chbwSelect Chroma bandwidth
0 Small, related to setting of dmsd_lcbw
1 Wide, related to setting of dmsd_lcbw
4dmsd_lubwSelect Luminance bandwidth
0 Narrow Chroma notch -> Maximum Luma bandw
1 Wide Chroma notch -> Less Luma bandw
[10-1]Should be set to 1 for Y/C mode, set to 0 for all other modes.
…Continued
0R/W
0/xR/W
0/xR/W
dmsd_lcbw
Determines the balance between Luma and Chroma bandwidth. A high U, V
(Chroma) bandwidth will result in a lower Luma bandwidth after subtraction of the
remodulated colour carrier of the CVBS signal. Recommended setting is 6, which is
also the reset value.
2D combfilter settings
The reset value of the combfilter settings is equal to the most optimal settings from
design point of view. Depending on the customer preference, it is possible to select
another balance, improving one parameter at the cost of another. The bits to control
the performance are:
gives a short description as to which parameter the bits control.
dmsd_ccomb, dmsd_ycomb
Enables the combfilter function in the Chroma and/or Luma path. Though the
combfilter function can be selected independently for the Chroma and Luma path, in
practice both selections must be synchronised for correct result.
dmsd_byps
Bypasses the combfilter and normal filters in both Chroma and Luma path. Must be
set to 1 when an Y/C input signal is selected and no filtering in Chroma or Luma path
is needed.
dmsd_set_vbi
Only intended for test purposes. Leave at default value.
dmsd_chbw
Selects the bandwidth in the Chroma path by selecting the bandwidth of Low Pass
Filter 2. Leave at default value.
Selects the bandwidth of U and V for filtering in the Luma path by selecting the
bandwidth of Low Pass Filter 3. A high bandwidth of U and V means a wide trap in the
Luma path after remodulation of U and V and subtraction from CVBS and vice versa.
Leave at default value.
Programming
In principle, only the registers dmsd_ccomb, dmsd_ycomb and dmsd_byps have
to be set according to the selection for combfilter on/off and Y/C signal processing.
The value for dmsd_lcbw, dmsd_chbw and dmsd_lubw are OK and can be left at
their default value which equals the reset value. No changes for these register
settings are expected.
The design and the register settings for the 2D combfilter are new. Though from
design the most optimal values are selected for the reset values, it is possible that in
practice or due to different taste from the customer other values are needed. We do
not expect these values to be dynamic.
PNX2000
Video Processing
4.4.2.3 SECAM decoder
The SECAM decoder only has a few control settings (dmsd_sthr and dmsd_fctc),
which are discussed in the Color PLL section below. When SECAM is detected, the
combfilter is automatically switched off
The filtered U and V signals enter the phase detector of the Color PLL. In this block,
the following functions are implemented:
PNX2000
Video Processing
• Adjustable demodulation phase to be used as HUE for NTSC (dmsd_huec)
• AGC which adapts the gain for the incoming color carrier to bring the burst
amplitude to nominal level. Compensates for overall amplitude variation at the
Color Carrier frequency. For test purposes the AGC can be switched off
(dmsd_acgc), in which case the gain is set by dmsd_cgain. The momentary
value of the amplifier in the AGC path can be read from register dmsd_acgain.
This works regardless the AGC is enabled or not.
• Selectable fast color PLL time constant for special signal conditions (dmsd_fctc).
• ACL, Automatic Color Limiting. Prevents over saturation when the ratio between
chroma and burst is disturbed and due to a too small burst the saturation would
increase too much. Can be switched on or off using dmds_acl_on.
• Horizontal Incremental delay setting to match the phase detector output signal
with the timing of the incoming CVBS / C samples. Is controlled by dmsd_idel.
Value is determined by design and fixed.
• Color killing. The killer levels can be adapted for special signal conditions using
dmsd_qthr for PAL and NTSC and dmsd_sthr for SECAM. Note that changing
these registers from the reset value (= default value) increases the chance of
misidentification.
• Selectable fast PAL/SECAM flip flop phase correction (dmsd_fscq).
• Option to switch off the color killer. (dmsd_colo).
The output of the phase detector is fed into a Discrete Time Oscillator (DTO) which
controls the color sub carrier generators, one for demodulation of the incoming color
signals (from CVBS or C), one for remodulation of the demodulated U, V signals for
subtraction of CVBS to obtain the Y (Luma) signal. To ensure the correct phase of the
DTO, the bit dmsd_cdto has to be toggled (from 0 ->1 and back from 1 > 0) each
time after regaining horizontal sync lock after loss of sync and when another setting is
selected for dmsd_auto, dmsd_auto_short or dmsd_cstd. This ensures a reset of
the DTO and correct behaviour.
17.. 11 dmsd_cgainChroma Gain Value range 0.5...7.5 Not required if dmsd_acgc=00R/W
18dmsd_fctc Fast Chroma PLL Time Constant
0 normal mode, recommended
1 fast phase error correction (lower damping factor)
19dmsd_acl_on Automatic Color Limiter
0 no limiting
1 limiting enabled, recommended to prevent over-saturation
23..20 dmsd_idelHorizontal Incremental Delay
0111 Value determined by design
0R/W
1R/W
0111R/W
dmsd_heuc
Controls the HUE for NTSC. The range is 0 degrees (0x0) to 359 degrees (0xFF).
The range is too large for practical use. We propose to use the range:
Table 12: Range - dmsd_heuc
Range (Hex)Range (Dec)Range (degrees)
0E-FF224-255-44 to -1
00-1F00-310 to 44
Remark: Note that the HUE control also works for PAL. This means the HUE control
should be set to 0 when a PAL color system is detected. At the same time, the HUE
setting for NTSC should be remembered in case later a NTSC color system is
(re)selected.
dmsd_acgc
Disables the Chroma AGC. The chroma AGC should always be left on. This is also
the reset value.
dmsd_cgain
Not used in PNX2000. Leave at reset value.
dmsd_fctc
The reset value, which selects the normal time constant for the color PLL, is correct.
The fast filter time constant could be a solution for special signal conditions (e.g. VCR
trick modes), but should never be selected as alternative setting for normal use.
dmsd_acl_on
The Automatic Color Limiting prevents over saturation (too large amplitude of U and
V signals) when the burst is too small in relation to the color carrier during the active
video.
It is recommended that the ACL is always left on (which is also the reset value), it
also prevents clipping of U and V signals under these conditions.
Adjusts the phase of the phase detector output (and the color carrier generator) with
respect to the incoming CVBS / C samples. Value determined by design and fixed.
Fixed value is equal to the reset value.
dmsd_qthr, dmsd_sthr
These bits control the threshold level of the color killer for PAL/NTSC (dmsd_qthr)
and SECAM (dmsd_sthr). Several tests have lead to an optimal value which
balances color sensitivity and reliable system recognition. This value (9) is also the
register value after reset. For special signal conditions, it is possible to change the
threshold value. Be very careful doing this, because it has a negative influence on the
overall detection performance.
Lowering the threshold value of one of the color killers increases the chance to get
under very weak signal conditions a colored picture from the color systems,
belonging to that threshold. However, the possibility for wrong color system detection
increases. At the same time the sensitivity of the color system with the unchanged
killer level decreases. This leads to an unbalance in system recognition performance.
Lowering both thresholds increases the chance of misidentification. Increasing both
threshold levels just decreases the color sensitivity
PNX2000
Video Processing
dmsd_fscq
Determines the speed of correction of the PAL / SECAM Flip-Flop when a wrong
phase is detected. It is recommend to correct the Flip_Flop once per field, which
setting (1) is also the register content after reset. A fast correction can be useful for
VCR trick modes, where at Fast Forward or Fast Reverse after each noise bar part of
another field is displayed with different PAL / SECAM phase. To react on this trick
mode is possible in TV/VCR combi's, where you know the mode it the VCR is in, but
is it is hardly possible to detect this in a reliable way from a connected VCR.
dmsd_colo
Disables the color killers. For test purposes.
dmsd_cdto
This bit resets the Color DTO and ensures the correct phase relations between all
signals. It is advisable to use dmsd_cdto as follows (see also Section 4.4.4
First, the sequence for a Multi-System set is given:
).
• After start-up, put the set in automatic mode (dmsd_auto = 2, is reset value)
• Select at preference the short auto loop (dmsd_auto_short)
• Select the preferred system to start the search (dmsd_cstd)
• Tog gl e dmsd_cdto from 0 -> 1 and back from 1-> 0.
Each time after regaining horizontal sync lock after sync loss and after changing the
setting of dmsd_auto dmsd_auto_short and/or the color standard selection
(dmsd_cstd), dmsd should be set to 1 and back to 0. When a color system has to be
forced the procedure is:
Also in this condition, each time after regaining horizontal sync lock after sync loss,
dmsd_cdto had to be set to 1 and back to 0. When going back to automatic mode,
the first sequence can be used again. When a set is built for markets with one color
system only, the procedure to force a color system should be used.
dmsd_acgain
Returns the value of the momentary gain of the color AGC amplifier. This can be used
for an automatic software Y/C detection (see Section 4.4.9.1
register only returns a valid value when the color system is PAL or NTSC and the
color system manager has recognized the system. For SECAM the value always
reads maximum (8F hex or 143 dec) Also when no color carrier is present, the value
reeds maximum. Because first the color system has to be detected, a reliable CVBS/
YC detection algorithm may take up to 2 seconds.
PNX2000
Video Processing
• Put the automatic mode off (dmsd_auto = 0)
• Force the required color system using dmsd_cstd
• Set dmsd_cdto to 1 and back to 0.
) The dmsd_acgain
Programming
dmsd_huec should be limited in range and set to 0 for other systems than NTSC.
dmsd_cdto has to be set to 1 and back to 0 after regaining horizontal sync lock after sync loss and after each change of registers dmsd_auto, dmsd-auto_short and
dmsd_cstd
dmsd_acgain can be used in an algorithm for automatic CVBS/YC detection.
The bits dmsd_fctc, dmsd_qthr, dmsd_sthr and dmsd_fscq could be needed
under bad signal conditions.
The bits dmsd_acgc, dmsd_cgain, dmsd_idel and dmsd_colo can be left at their
reset value.
Delay Line
Figure 21: Delay Line
The amplitude of U and V is controlled by the Color AGC and ACL circuits
The delay line is used for PAL and SECAM color systems.
For NTSC, the delay line can be bypassed. The 6 dB amplification in the U,V path
due to the addition at the output of the delay line, is compensated in the bypass path.
Table 13: Bit Description - Delay Line - Address 0X7FF9xxx
add
xxxBitsNameFunctionR/D R/W
dmsd_dccf
When the 2D combfilter is enabled, the delay line should be switched off for NTSC.
Programming
9dmsd_dccf
Video Processing
Disable PAL delay line. Is controlled automatically
in auto modes.
0 Enable PAL delay line
1 Disable PAL delay line
PNX2000
0/xR/W
As stated, the combfilter must be enabled for PAL and NTSC color systems. For
SECAM it has to be switched off when the 2D combfilter is enabled. To leave the
Delay Line for NTSC as simple combfilter when the 2D combfilter is off or not present,
is a matter of set maker’s taste. In Auto Search mode (see Color System Manager)
it is possible to select settings where the switching of the Delay Line is done
automatically according to the found color system.
4.4.4 Color System Manager
Figure 22: Color System Manager
The Color System Manager offers various possibilities to control the color search:
• Full search: Searches for all possible systems including Latin America systems
like PAL M and PAL N. It is possible to define the preferred color system to start
the search.
In the automatic search mode, it is possible to define different levels of automatic
setting of the filters, combfilter and traps optimized for the found color system. It is
also possible to set the search time per color system. A bit indicates when a Color
System is found, this can also be signalled via an interrupt. It is also possible to read
the found color system (PAL, SECAM or NTSC)
In view of the amount of information, the bit description is split in two parts:
PNX2000
Video Processing
• Short search: Only searches for the most common systems (PAL 4.43, SECAM,
NTSC 3.58 and NTSC 4.43). Shortens the color system recognition time. Also in
this loop it is possible to define the preferred color system to start search.
• Forced mode: Possibility to force one color system only, suitable for market
area's like USA and Philippines (NTSC 3.58)
• Control bits, which control the Color System Manager
Table 14: Bit Description, Color System Manager - Control Bits - Address 0X7FF9xxx
add xxx Bits NameFunctionR/DR/W
1881..0 dmsd_autoAutomatic TV system detection mode
00 Level 0, disabled
01 Level 3, Active, all filters adapting automatically
10 Level 2, Active, some filters adapting automatically
11 Level 1, Active, all filters to be set by software
See separate table for automatic filter settings
2dmsd_auto_shortSelects between all color system search loop and a limited color
system search loop (for faster detection)
0 All color system search loop (LATAM)
1 Limited color system search loop (Europe, ROW) for faster detection.
Only searches:
PAL 4.43, SECAM, NTSC M, NTSC 4.43
5..3 dmsd_cstdColor standard selection. When dmsd_auto = 0, forces the color
system according to the following table:
Fv = 50 Hz Fv = 60 Hz
000 PAL 4.43 NTSC M
001 NTSC 4.43 PAL 4.43
010 PAL N NTSC 4.43
011 --------- PAL M
100 PAL 4.43 NTSC J
101 SECAM --------Other --------- --------Note that the forced standard depends on the vertical frequency, either
automatic detected, either forced When auto detection is enabled
(dmsd_auto 01,10,11) then selects the first color system to start the
search, in 50 Hz also the 2nd system to search for is selected
Fv = 50 Hz Fv = 60 Hz
1st 2nd
000 PAL 4.43 SECAM NTSC M
100 PAL 4.43 SECAM NTSC J
101 SECAM PAL 4.43 NTSC M
Other PAL 4.43 SECAM NTSC M
8..6 dmsd_latencyNumber of fields before stepping to the next color standard in auto
mode
[14-1]
[14-1]
[14-1]
[14-1]
[14-1]
[14-1]
2/xR/W
0/xR/W
0/xR/W
11
[14-1]NTSC M mode removes the pedestal of 7 ire from the Y signal, while NTSC J mode leaves the pedestal unchanged.
Before discussing the bits in more detail, a note about NTSC M and NTSC J. Both
systems refer to NTSC with a color carrier frequency of 3.58 MHz. The difference
between these two color decoder modes is the processing of the pedestal. The NTSC
3.58 standard has a pedestal of 7 ire. When for the color decoding NTSC J is
selected, the pedestal will not be removed from the Y signal. When NTSC M is
selected, the pedestal will be removed from the Y signal. The presence or removal
from the pedestal has influence on the behavior of Black Stretch. When the pedestal
is removed, the Black Stretch will not react on the signal (or when black stretch is
made over aggressive to have also an effect on PAL, be equal to PAL signals).
When the pedestal is present, black stretch will pull the 7 ire level to black according
a non-linear transfer curve. Depending on the taste, NTSC J or NTSC M can be
selected for NTSC only countries. For multi-system applications, NTSC M is probably
the best choice, because then features like black stretch can be made equal for all
color systems.
dmsd_auto, dmsd_cstd
Two operating modes are distinguished:
1. Disabled, force the color system (dmsd_auto = 0 0)
When disabled, the color system has to be forced using dmsd_cstd. The systems,
which can be selected are given in the bit table. Because the forced system is also
depending on the vertical frequency (50 or 60 Hz), also this setting has to be forced.
This is possible in the Vertical Synchronization part. The procedure to force the field
frequency is:
PNX2000
Video Processing
• Set dmsd_aufd = 0 (non-automatic field detection, 1 = automatic field detection)
• Select the vertical frequency using dmsd_fsel (0 = 50 Hz, 1 = 60 Hz).
See for details Vertical Sync Processing 1 Fh.
In forced mode, all settings of delay line and filters (dmsd_dccf, dmsd_chbw, dmsd_lcbw, dmsd_lubw and dmsd_lufi) need to be set by the software. The
setting of the combfilter (dmsd_ycomb, dmsd_ccomb) and bypass mode
(dmsd_byps for Y/C mode) have to be taken into account for the correct filter
settings.
The table for dmsd_auto mode "3" can serve as input for the settings to be selected.
After forcing the system, it is needed to set dmsd_cdto to 1 and back to 0. This
guarantees the correct phase relationship between all samples.
Note that dmsd_cdto has to be toggled whenever dmsd_auto, dmsd_auto_short,
or dmsd_cstd is changed (see also 2.3.3 Color PLL and Delay Line).
2. Automatic (dmsd_auto = 0 1, 1 0 or 1 1)
When automatic Color System search is enabled (don't forget to toggle dmsd_cdto
after selecting this mode) several modes can be selected. It is possible to control all
settings of the delay line and filters by software, but to ease programming, a number
of settings or even all settings can be done automatically, based upon the found color
system and the user selection of the comb filter (dmsd_ycomb, dmsd_ccomb) and
bypass mode (dmsd_byps for Y/C mode) The table below indicates which settings
are controlled automatically and what value is set, depending on the selected
automation level.
Signal
Pathbypsycomb ccombdccf lcbwlubwycombccomblufichbw
PALComb01101100UsSel
PALNotch0000000UsSel
PALFlat
1
[15-1]
001100000000 1
(for YC)
[15-2]
[15-2]
UsSel
UsSel
PNX2000
Video Processing
[15-2]
0000 0
[15-2]
0110 0
NTSCComb01111100UsSel
NTSCNotch00000000UsSel
NTSCFlat
1
[15-1]
011100000000 1
(for YC)
SECAMNotch0
SECAMFlat
1
[15-1][15-1]
[15-1][15-1]
000010
0000
[15-1]
0
(for YC)
Bk/White -1
[15-1][15-1]
[15-1]value has no influence
[15-2]UsSel - User Selection. Chosen in ycomb and ccomb, under User Selection is taken over.
ycomb=0
[15-1] [15-1][15-1]
0
Level 1 (dmsd_auto = 1 1)
Automatic Color system detection, all filters / delay line have to be programmed. One
exception: when no color system is found (Black & White), ycomb is forced to 0.
Level 2 (dmsd_auto = 1 0)
Automatic Color system detection, some filters and delay line are programmed
according the table. dmsd_ccomb, dmsd_lufi and dmsd_chbw still have to be
programmed.
[15-2]
[15-2]
UsSel
UsSel
[15-1]
[15-1]
[15-1]
[15-2]
[15-2]
0000 0
0110 0
1011 0
0000 0
0000
[15-1]
Level 3 (dmsd_auto = 0 1)
Search loop in Automatic ModeAutomatic Colour system detection, all filters adapt
automatically We advise to set in automatic mode dmsd_auto = 2. The automatic
filter setting of dmsd_lufi and dmsd_chbw are not optimal, we advise to control
these settings by software.
In automatic mode, dmsd_cstd determines the first (and in 50 Hz also the second)
colour system that will be searched for. In the table below, the search order is given.
Note that for a successful search, first the correct field frequency has to be detected
(dmsd_fidt, 0 = 50 Hz, 1 = 60 Hz, see also Vertical Sync Processing 1 Fh)
Once programmed, the value of dmsd_cstd is valid for both 50 and 60 Hz.
Table 16: Full Search Loop
Order50Hz (fidt=0)60Hz (fidt=1)
1PAL 4.43PAL 4.43SECAMNTSC MNTSC JNTSC M
2SECAMSECAMPAL 4.43NTSC 4.43
3PAL NPAL M
4NTSC 4.43PAL 4.43
dmsd_auto_short
The search loop can be shortened when the Latin America colour systems like PAL M
and PAL N are not needed.
When dmsd_auto_short = 0, the full loop in the table above is executed.
When dmsd_auto_short = 1, the loop is shortened to the first two systems, see
Table 17
PNX2000
Video Processing
cstd=000cstd=100cstd=101cstd=000cstd=100cstd=101
.
Table 17: Short Search Loop
Order50Hz (fidt=0)60Hz (fidt=1)
cstd=000cstd=100cstd=101cstd=000cstd=100cstd=101
1PAL 4.43PAL 4.43SECAMNTSC MNTSC JNTSC M
2SECAMSECAMPAL 4.43NTSC 4.43
As can be seen, the settings of dmsd_cstd determine in the same way the search
order preference as in the full search loop.
dmsd_latency
Determines the number of fields before the Colour System manager steps to the next
colour system in the loop. The standard setting is 3 (fields/colour system).
Timing before a colour system is recognised
The following items determine the time, before the colour system is found.
1. The locking of the incoming samples to the new line phase and frequency
2. The recognition of the field frequency (50 or 60 Hz) When after channel change
or input change the field frequency is identical to the previous signal, the settle
time is short (< 100 msec, depending on the phase difference of the vertical
retrace).
3. The search loop itself, which takes 60 msec / Colour system (50 Hz,
dmsd_latency = 3)
The most dominant one is the 50 / 60 Hz detection. The switch-over from 50 to 60 Hz
or vice versa can take up to 600 msec. Due to all these variables, the time before a
colour system is recognised varies quite a lot. Worst case (switching from 50 to 60
Hz source or vice versa) and changing colour standard the recognition time may run
up to 800 msec. Best case (no change in vertical frequency, same colour system as
previous source) the time can be as short as 30 msec.
Table 18: Bit Descrition - Status Bits - Address 0X7FF9xxx
add xxx BitsNameFunctionR/D R/W
0044dmsd_codeColor detected
0 No color detected
1 Color system detected according dmsd_ftvs
FE0ics_dmsd_codeInterrupt flag set to 1 when the status of the color detection bit dmsd_code
changes
See AGC part for explanation of the related interrupt control bits _enab, _clr
and _set
0047..6dmsd_ftvsFound TV System, indicates the detected color standard
00 Black & White (no color system detected)
01 NTSC
10 PAL
11 SECAM
FE06ics_dmsd_ftvs Interrupt flag set to 1 when value of dmsd_ftvs is changed
See AGC part for explanation of the related interrupt control bits _enab, _clr
and _set
R
R
R
R
dmsd_code
Indicates whether a color system is found. Can be used as a first indication to check
whether the automatic search loop has recognized a color system or when a single
color system is forced whether the forced system is found. A status change of this bit
can also trigger an interrupt.
dmsd_ftvs
Indicates which color system is found. Note that "Black and White" and no color
system found yet give the same reading. The three color systems, which can be
indicated are PAL, SECAM and NTSC. Note that no information is available about the
color carrier frequency. If needed, the color carrier frequency can be derived from the
FM mono sound carrier, which frequency can be determined by the sound core. This
of course only works for off-air signals. It is possible to generate an interrupt when the
value of dmsd_ftvs changes.
Warning: Latency of the read-out bits
After changing channel or signal source, it can take up to 50 msec. before the bits
dmsd_code and dmsd_ftvs change status. So if one immediately after channel or
input change reads out the status bits, one might conclude a color system is found
while the bits indicate the status from the previous signal. We have observed when
switching from PAL to PAL, the bits do not even change status! When switching to
another color system, it takes 30 to 50 msec. max before the bits indicate color loss
and the new color search starts. Take this behavior into account when designing the
source switching and channel changing algorithms.
The processed Y and demodulated U and V pass the control block before being sent
to the fast YUV switch. The control block contains the video controls contrast,
brightness and saturation. Because these items are controlled at another place in
system (see PNX8550) these controls are set to a fixed level. A noise shaping
function minimizes quantization at the output. A dither function enables to go from 10
bits to 9 bits at the output, while maintaining the 9 bits resolution for low frequency
signals like ramps. This function is not used in PNX2000. Finally, a small offset
alignment is possible for the U and V signals to correct small design errors.
Table 19: Bit Description - Signal Control - Address 0X7FF9xxx
add xxx BitsNameFunctionR/DR/W
19411..4ddmsd_cont Brightness control, not used in PNX2000. Set to 44 hex.44R/W
19..12 dmsd_brigContrast control, not used in PNX2000, set to 80 hex80R/W
27..20 dmsd_satnSaturation control, not used in PNX2000, set to 40 hex40R/W
28dmsd_ofts3Selects output formatter mode and noise shaper mode 0 Linear mode,
no noise shaping 1 Noise shaping activated (recommended)
29dmsd_dither Dithers 10 bit output to 9 bits. Not used in PNX2000
0 No dithering (Recommended value) 1 Dithering enabled
1..0dmsd_uoffU offset to correct for rounding errors 00 No offset 01 + 1 LSB 10 + 2 LSB
11 + 3 LSB
3..2dmsd_voff V offset to correct for rounding errors 00 No offset 01 + 1 LSB 10 + 2 LSB
11 + 3 LSB
1R/W
0R/W
0R/W
0R/W
dmsd_cont, dmsd_brig
Contrast and Brightness are controlled outside of the PNX2000.
Remark: If it is necessary (depending on success of removing PNX3000 peaking
around 4.5 MHz) to set in the AGC block agc_cvbs_yyc_ctrl_copy_prot_pi to 1 to
ensure sufficient headroom, the amplitude decrease should be compensated by
contrast and brightness setting of the VIDDEC. The behavior of contrast (increasing
both black and white centred around the middle) should be explained here. Drawing is
ready.
dmsd_satn
Saturation is controlled outside of the PNX2000.
dmsd_ofts3
These bits enables dithering form internally used 11 bits to 10 bits at the decoder
output. Set to 1 to minimize quantization and noise.
dmsd_dither
Dithers from 10 bits to 9 bits. This function is not used.
dmsd_uoff, dmsd_voff
PNX2000
Video Processing
Intended to correct for rounding errors in the processing. Not needed in PNX2000.
4.4.5.2 Macrovision
Figure 24: Macrovision Detection
The 1 Fh macrovision block can detect the macrovision in sync/white level during
vertical retrace and two color stripe methods, which are defined for NTSC with DVD.
Table 20: Bit Description - Macrovision Detection - Address 0X7FF9xxx
add
xxx
Bits NameFunctionR/D R/W
0045dmsd_coproDetects whether the input signal is Macrovision encoded
0 No macrovision
1 Macrovision detected
FE05ics_dmsd_coproInterrupt flag set to 1 when dmsd_copro changes
See AGC part for explanation of the related interrupt control bits _enab, _clr
and _set
0008dmsd_colstrDetects Macrovision Color Stripe encoding
0 No Color Stripe
1 Color Stripe encoding detected
0009dmsd_type3Detects Macrovision Color Stripe type 3 encoding
0 No Color Stripe type 3
1 Color Stripe type 3 encoding detected
dmsd_copro
PNX2000
Video Processing
R
R
R
R
Detects the macrovision during vertical retrace in sync (reduced sync amplitude and
false sync pulses). Because the sync amplitude changes, the AGC settings have to
be adapted when macrovision in sync is detected:
For CVBS / Yyc:
Normal — agc_cvbs_yyc_ctrl_copy_prot_pi = 0
Copro = 1 — agc_cvbs_yyc_ctrl_copy_prot_pi = 1
For YUV:
Normal — agc_y_cyc_ctrl_top_sync_pi = 100 hex
Copro = 1 — agc_y_cyc_ctrl_top_sync_pi = 118 hex
Also, see Section 4.3.3
It is possible to generate an interrupt when dmsd_copro changes.
dmsd_colstr, dmsd_type3
At this moment, we do not foresee any action related to the recognition of these
macrovision standards for NTSC on DVD.