7100 DS Aug 2005
7100 DS Aug 2005
7100 DS Aug 2005
10-ch
DDR PCM out S/PDIF
SDRAM AudioL Peripheral I/O
2-ch SD and external interrupts
PCM in AudioR video in
32 32 Audio
ST40 core 266 MHz Serial
DACs
Video ATA 2x I/F IR MAFE
H-UDI 16 K Icache LMI Audio decoder interface PWM
SmCard Tx/Rx interface
and interfaces
Int. control
USB 4x 3x
MMU System ST231 Digital 6x GPIO
core 2.0 ILC
32 K Dcache LMI UARTs SSCs
video input
STBus
Contents
Part 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 3 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
3.2 Omega2 (STBus) interconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
3.3 Processor cores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
3.4 Dual local memory interface (LMI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
3.5 External memory interface (EMI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
Confidential
Chapter 4 CPUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.1 ST40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
4.2 ST231 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Part 2 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Chapter 7 Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Confidential
Chapter 9 Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
9.1 Power supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
9.2 System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
9.3 JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
9.4 Transport, NRSS-A and D1 input interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
9.5 Display digital output interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
9.6 Display analog output interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
9.7 HDMI interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
9.8 Audio digital interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
9.9 Audio analog interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
9.10 Programmable inputs/outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
9.11 External memory interface (EMI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
9.12 System local memory interface (LMISYS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
9.13 Video local memory interface (LMIVID) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
9.14 USB 2.0 interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
9.15 SATA-I interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Part 1
Overview
Confidential
1 Applications overview
The STx7100 is a new generation, high-definition set-top box decoder chip, and provides very high
performance for low-cost HD systems. With enhanced performances over the STi7710, it includes
an H.264/AVC decoder for new low-bitrate applications, as well as dual-decode MPEG-2 capability.
Based on the Omega2 (STBus) architecture, this system on chip is a full back-end processing
solution for digital terrestrial, satellite and cable high-definition set-top boxes compliant with ATSC,
DVB, DIRECTV, DCII, OpenCable and ARIB BS4 specifications.
The STx7100 demultiplexes, decrypts and decodes a single HD or SD video stream with associated
multichannel audio. Video is output to two independently formatted displays: a full resolution display
intended for a TV monitor, and a downsampled display intended for a VCR, or alternatively a
second SD TV. Connection to a TV or display panel can be via an analog component interface or a
copy protected DVI/HDMI interface. Composite outputs are provided for connection to the VCR with
Macrovision protection. Audio is output with optional PCM mixing to an S/PDIF interface, PCM
interface or via integrated stereo audio DACs.
Digitized analog programs can also be input to the STx7100 for reformatting and display.
The STx7100 includes a graphics rendering and display capability with a 2D graphics accelerator,
two graphics planes and a cursor plane. A dual display compositor provides mixing of graphics and
video with independent composition for each of the TV and VCR outputs.
The STx7100 includes a stream merger to allow three different transport streams from different
Confidential
sources to be merged and processed concurrently. Applications include DVR time shifted viewing of
a terrestrial program while acquiring an EPG/data stream from a satellite or cable front end.
The flexible descrambling engine is compatible with required standards including DVB, DES, AES
and Multi2.
The STx7100 embeds a 266 MHz ST40 CPU for applications and device control. A dual DDR1
SDRAM memory interface is used for higher performance, to allow the video decoder the required
memory bandwidth for HD H.264 decoding and sufficient bandwidth for the CPU and the rest of the
system. A second memory bus is also provided for flash memory storing resident software and for
connection of peripherals.
A hard-disk drive (HDD) can be connected either to the serial ATA interface or as an expansion
drive via the USB 2.0 port. The USB port can also be used to connect to a DOCSIS 2.0 CM gateway
for interactive cable applications.
The STx7100 is supported by STMicroelectronics’ STAPI software, and is compatible with several
other related devices such as the STi7109.
Transport
STV0299 stream in
RGB/YPbPr/
+STB6000 STx7100 HDMI
QPSK Rx
CVBS/YC
VCR
PTSN MAFE I/F
Smart Flash
cards
CableCARD™
interface Flash
2 x 128 Mbit 2 x 128 Mbit
DDR1 DDR1
Tuner and
Broadcast
SAW filter
EMI
STV0294B
IB data/ Tuner and
OOB SAW filter
Cable
front end
QAM/QPSK
transceiver STx7100
RGB/YPbPr/
Diplex IR HDMI
filter
Tx/Rx
PGA
Upstream
CVBS/YC
RS232 VCR
Smart
cards
Figure 3: Low-cost dual satellite and terrestrial HD set-top box with HDD
IR
Tx/Rx
Flash
2xDDR1
HDD
EMI SATA
STV0299
+STB6000
QPSK Rx STx7100
DVB-CI RGB/YPbPr/
HDMI
Tuner STV0370
RS232
8VSB Rx
USB 2.0
Smart HDD
cards
(expansion)
PSTN MAFE I/F
Confidential
IR
Tx/Rx
Flash
2xDDR1
HDD
EMI SATA
RGB/YPbPr/
HDMI
RS232
USB 2.0
Smart HDD
cards
(expansion)
2 Device variants
Table 1:
Macro- AC3/
Type SATA V22 DES ICAM USB2 Market
vision Prologic
7100ZWB ✔ ✔ ✔ ✔ ✔ ✔ ✔ Development version,
security disabled
7100JWB ✔ Nagra C+
Leaded or unleaded (Eco) packaging is also available; see Chapter 7: Package on page 73 for
details.
For STi7100 and STm7100, the leaded version of the package is marked by the suffix P on the
sales type.
Confidential
3 Architecture
3.1 Overview
The STx7100 is designed around the well-proven Omega2 (STBus) interconnect and presents a
new generation of video decoder for MPEG-4 AVC as well as MPEG-2 decoding.
Transport streams are received and processed by the TS subsystem. The resulting PES streams
and section data are stored in memory buffers in DDR SDRAM attached to the local memory
interfaces (system and video LMI).
A flexible DMA controller (FDMA) performs PES parsing and start code detection and routes
elementary streams to audio and video bit buffers in DDR SDRAM. An MP@HL/H.264 video
decoder decodes HD or SD video streams. Audio decoding and PCM mixing is performed by the
audio decoder and output via S/PDIF and PCM interfaces. Audio can also be output via an
integrated 24-bit stereo DACs system.
After video decoding, two independently formatted video displays (main and auxiliary) can be
generated, and each mixed independently with graphics to create main and auxiliary display
compositions. The main display composition (HD or SD) can be output as RGB or YPbPr analog
component video and digitally via a copy-protected DVI/HDMI interface. The auxiliary display
composition (SD only) can be output as Y/C analog component or composite video CVBS on a
separate interface for connection to a VCR or a second TV.
Confidential
A digital video input interface allows the STx7100 to receive noncompressed SD digital video,
and to output this via the main and auxiliary displays in place of decoded video. A separate PCM
input allows any associated audio to be received, mixed and output in place of decoded audio.
The graphics subsystem comprises a separate 2D blitter, two graphics planes, a cursor plane
and dual display compositor. Graphics buffers are created, stored in and displayed from buffers
in DDR SDRAM.
The STx7100 embeds an ST40 CPU core for applications and data processing and device
control. The CPU boots from flash/SFlash™ on the external memory interface (EMI) and can
execute in place or transfer the main executable to the DDR SDRAM and execute from there.
CPU data is held in DDR SDRAM where cacheable and noncacheable regions can be
programmed. The 16-bit EMI is also used for connecting to external peripherals.
System performance is enhanced with the multichannel FDMA which can be used for 2D block
and stream data transfers with minimal CPU intervention.
DVR applications are supported using a hard-disk drive (HDD) connected either to the serial ATA
or USB 2.0 interface.
The STx7100 also integrates a range of peripherals, system services and a clock generator
module with embedded VCXO to significantly reduce external component cost.
and to take advantage of pages that are already open, and to open pages in advance.
Optimizations also include opcode merging.
Table 2 shows the memory requirements for each type of application.
STBus
TSIN1
parallel or serial
PTI
TSIN2
parallel or serial
TS merger Alt out
TS I/O
serial/parallel in
Confidential
A five-input, two-output transport stream merger/router allows any of the three external inputs to
be routed to the PTI. A fourth input is provided for routing internal transport streams stored in
memory to the PTI. A fifth input receives a full/partial transport stream created by the PTI and
can output it from the STx7100 via the bidirectional interface when configured as an output. This
allows TS streams to be sent to a D-VCR via an IEEE1394 link layer controller. Routing to the
two outputs can be concurrent.
An NRSS-A interface is available for routing serial TS streams to and from an NRSS-A
compatible CA module.
The stream merger/router is also capable of merging any three of the input streams into one TS
stream and forwarding this to the PTI allowing it to process three independently sourced
transport streams at the same time.
● DES-OFB,
● Multi2-OFB,
● DVB-CSA,
● NDS specific streams can also be supported by the integration of ICAM functionality.
The PTI has a 48 x 16 byte section filter core.Three filtering modes are available:
● wide match mode: 48 x 16-byte filters,
● positive/negative mode: 48 x 8-byte filters with positive/negative filtering at the bit level.
Cursor BCK
Cursor
DVI-HDCP
Graphics 1 HDMI
GDP1 Main
display
Main composition Main
video display VID1 Mixer 1 output stage Main analog
processor
outputs
GDP2
Graphics 2 YPbPr or RGB
GDP2 can be assigned to Mixer 1 or Mixer 2
Auxiliary
Graphics 2
display Auxiliary analog
GDP2
composition Auxiliary outputs
Mixer 2 output stage
Auxiliary
Confidential
YPbPr or YC,
video display VID2 CVBS
processor
STBus
The video may have been decoded and reconstructed by the H.264/MPEG2 decoder or acquired
via the digital video interface.
The same video or two different videos are displayed via the main and auxiliary displays, but
each may be set up to format the video differently, and display with different timing. Separate
video timing generators (VTGs) are provided to support this.
The display processors are used to present the video from the display buffers and adapt the
decoded video format to a format suitable for display taking into account differences in scanning
method, resolution, aspect ratio and scanning frequency.
The main-display processor receives decoded or acquired video from memory and performs
block-to-line conversion, pan and scan, and vertical and horizontal format conversion. There is
also a linear median upconverter (LMU) to perform interlace-to-progressive conversion on
standard definition (SD) pictures using motion estimation.
The auxiliary-display processor receives decoded or acquired (and possibly decimated) video
and performs pan and scan, vertical format conversion, horizontal format conversion. The output
size is limited to an SD format on the auxiliary-display processor, and is intended to output video
for VCR recording.
● 5-tap horizontal sample rate converter, for horizontal upsampling. The resolution is 1/8th
pixel (polyphase filter with 8 subpositions),
● color keying capability.
The cursor is defined as a 128 x 128 pixel area held in local memory, in ACLUT8 format. Each
cursor entry is a 16-bit ARGB4444 color + alpha value. The alpha factor of 4 bits handles an
antialiased cursor pattern on top of the composed output picture. The cursor-plane features are
as follows:
● ACLUT8 format, with ARGB4444 CLUT entries. 256 colors can be simultaneously displayed
for the cursor pattern, among 4096 colors associated with a 16-level translucency channel.
● Size is programmable up to 128 x 128.
● Hardware rectangular clipping window, out of which the cursor is never displayed (per-pixel
clipping, so only part of the cursor can be out of this window, and consequently transparent).
● Current bitmap is specified using a pointer register to an external memory location, making
cursor animation very easy.
● Programmable pitch, so that all cursor patterns can be stored in a single global bitmap.
GDP2 graphics
cursor
75:45
75:45
Confidential
Auxiliary video
75:45
GDP2 graphics
The main analog output interface supports YPbPr or RGB analog output with or without
embedded syncs. High current HD DACs are used to minimize external component count.
Programming flexibility is provided to support different display timings and resolutions. These
include support for SMPTE and ARIB SD and HD formats (480i, 480p, 720p, 1080i) and panel
displays with a pixel clock up to 74.25 MHz. Timings and levels can be programmed to comply
with EIA770.x (x = 1, 2, 3) requirements.
The main analog output can also have Macrovision™ encoding for 480i/480p and 576i/576p and
CGMS encoding.
The HDMI output provides DVI-HDCP or HDMI compliant copy protected digital output of the
main display composition.
● one source copy, with one or several operators enabled (color format conversion, 2D-
scaling),
● two-source copy with alpha blending or logical operation between them,
Audio decoding
The STx7100 audio subsystem integrates a 400 MHz ST231 CPU core to decode multi-channel
compressed audio streams which have been stored in a memory buffer. Once decoded, the
audio decoded stream is stored in a separate memory buffer. The audio subsystem also
integrates two PCM players and one S/PDIF player which read the decoded data from memory
and outputs them to a stereo DAC, a multi-channel PCM output (10 channels) and an S/PDIF
output.
The audio stream (encoded or decoded) can be received either from an external source via the
PCM input interface or by an internal source such as the transport subsystem via the memory.
The audio decoder may have to decode simultaneously two different encoded audio streams
when an audio description channel is provided or when a dual MPEG decode is performed.
PCM mixing
The decoded audio stream can be mixed with a PCM file stored in memory following an optional
sample rate conversion to adapt the sampling rate. The PCM mixing is fully implemented in the
firmware running on the ST231 CPU core integrated in the audio subsystem.
PCM output
A multi-channel decoded PCM stream can be downmixed to generate a 2-channels PCM stream
and optionally mixed with a PCM file. The downmixed stream can be then played through a
stereo 24-bits DAC. A multi-channel (10 channels) digital PCM output and a digital S/PDIF output
are available and can be used independently. The audio DAC, PCM and S/PDIF outputs are
independent and have their own audio clock generator.
S/PDIF output
Compressed audio data can also be delivered on the S/PDIF output to be decoded by an
external decoder/amplifier.
PCM input
The STx7100 audio subsystem provides a PCM reader to capture an external PCM stream. The
stream is then stored in memory.
Features
The audio decoder features are as follows:
● compatible with all popular audio standards,
● PCM mixing with internal or external source with sample rate conversion,
● encoded (IEC 61937) or decoded (IEC 60958) digital audio on S/PDIF output,
players. It is also required to transfer the data from the PCM reader to the memory.
System interconnect
64 Audio
freq
Audio synth 2
processor
64
IRQ
ST231 IRQ
S/PDIF
FIFO
32 S/PDIF to pad
Memory player output
DMA req
Mailbox
ES audio data
IRQ
FIFO
32 PCM
IRQ
ST40 player 1
PCM audio data
DMA req
Audio
Confidential
32 Stereo Analog
SPDIF audio data
config DAC to pad
LMI registers left/right
output
Audio
DMA freq
circular
reqs synth 1
or linear
bit-buffer
DMA req
FDMA FIFO
PCM output to pad
PCM
32 player 0 (SCLK, LRCLK,
IRQ SDATA)
256xFs
Audio (oversampling
freq clock)
synth 0
3.17 Interfaces
3.17.1 USB
The STx7100 has an integrated USB host controller with one host port. The USB host interface
is compliant with USB rev 2.0 and OHCI/EHCI rev 1.0. This allows the STx7100 to be connected
to peripherals such as a hard-disk drive, printer, keyboard, or digital camera. All speeds up to
480 Mbit/s are supported.
3.17.2 Modem
Standard solutions are available for V22bis software modems and V34/V90 controllerless
modems ported to the STx7100 architecture.
An interface to the SiLabs DAA is integrated, allowing a 2-wire capacitively coupled connection to
Confidential
● four ASCs (UARTs), two of which are generally used by the smartcard controllers,
● a four channel PWM module with two PWM outputs, two capture inputs and two compare
inputs,
● a multi-channel, infrared blaster/decoder interface module,
● an interrupt level controller with four external interrupt inputs (3.3 V tolerant),
1. These channels are suitable for transfers with internal or external peripherals and for
audio and video stream transfers within the STx7100.
● low-power control with wake up from internal timer or external interrupt or IR receiver,
● real-time clock,
Confidential
● diagnostic control and support for the ST40 and ST231 toolsets.
4 CPUs
4.1 ST40
The STx7100 uses a 400 MHz ST40 as host CPU. This controls the rest of the chip, including the
two ST231 CPUs.
The ST40 core and its instruction set are documented in the document SH-4 [ST40] Core
Architecture (ADCS 7182230).
5 Memory map
● The LMI_SYS memory space starts at base address 0x0400 0000 (64 Mbytes) and
occupies 176 Mbytes. The LMI_SYS configuration registers are located at address
0x0F00 0000 and occupy 16 Mbytes.
● The LMI_VID memory space starts at base address 0x1000 0000 (256 Mbytes) and
occupies 112 Mbytes. The LMI_SYS configuration registers are located at address
0x1700 0000 and occupy 16 Mbytes.
64 M EMI EMI
0x0400 0000 64 Mb 64 Mb
112 M
VIDEO LMI VIDEO LMI
Reserved
4 Gb
in Figure 11. These regions principally differ in whether accesses made to them are cacheable or
not. The P4 region is exclusively used to access the ST40 core internal devices.
512 Mb
Cacheable Area 3 64 Mb each
U0
2 Gb Area 4 2 Gb
Area 5 Cacheable
Area 6
Address translation
Area 7
addr[29-31]=0xx
0x8000 0000 0x8000 0000
P1
512 Mb Cacheable
addr[29-31]=100
0xA000 0000
P2
Address error
512 Mb Non-Cacheable
addr[29-31]=101
0xC000 0000
P3
512 Mb
Cacheable
Confidential
addr[29-31]=110
0xE000 0000 Store queue 0xE000 0000
P4 0xE400 0000
512 Mb
Non-Cacheable
Address error
0xFFFF FFFF addr[29-31]=111 0xFFFF FFFF
The ST40 includes two 32-byte store queues to perform high-speed writes to external memory.
P0, P1, P3, U0 Regions: The P0, P1, P3 and U0 regions can be accessed using the cache when it
is enabled. Zeroing the top three bits of an address in these regions gives the corresponding
external memory space address.
P2 Region: The P2 region cannot be accessed using the cache. In the P2 region, zeroing the upper
3 bits of an address gives the corresponding external memory space address.
P4 Region: The P4 region is mapped onto ST40 core I/O channels. This region cannot be
accessed using the cache.
P1
Cacheable
No address translation
P2
NonCacheable Address error
No address translation
P3
Cacheable
Address translation
store queue
Confidential
P4
Noncacheable Address error
No address translation
0x0400 0000 64 Mb
Reserved
176 M LMI_SYS
0x1BFF FFFF 448 Mb
112 M
LMI_VID
64 M Area 6 Reserved
0x0000 0000 0 Mb
64 M EMI
0x0400 0000 64 Mb
176 M LMI_SYS
112 M
LMI_VID
Confidential
64 M On-chip
Peripherals
Instruction buffer
The instruction buffer attempts to fetch ahead in the instruction stream to keep its buffer full. When
a branch is taken the instruction buffer is invalidated.
Instruction cache
Instructions are always cached. There is no support for uncached instruction fetching. The cache
receives fetch requests from the instruction buffer and returns a group of up to four 32-bit
instructions.
The instruction cache is a 32 Kbytes direct-mapped cache with 512 x 64-byte lines.
The virtual address bits [14-6] are used to index the instruction cache RAMs.
The virtual address bits [31-13] are sent to the ITLB for translation. The translated physical address
bits [31-13] from the ITLB is then compared with the instruction cache tag.
The virtual address bits [5-0] are used to select the correct bytes from the cache line.
Data cache
The data cache sends write miss and dirty lines to the write buffer.
The data cache is a 32 Kbytes four-way set associative cache built around a 4 x 256 x 32-byte line.
The virtual address bits [12-5] are used to index the data cache RAMs.
The virtual address bits [31-13] are sent to the DTLB for translation. The translated physical
address bits [31-13] from the DTLB is then compared with the data cache tag.
The virtual address bits [4-0] are used to select the correct bytes from the cache line.
The data cache can be partitioned into:
● a 24 Kbytes three-way cache plus an 8 Kbytes data RAM,
Write buffer
Confidential
The write buffer combines write transactions and sends them out to memory.
LMI video high-priority port ST40 All CPUs have access to the LMI high priority
Audio-ST231 port.
Delta-ST231
LMI system high-priority port ST40 All CPUs have access to the LMI high priority
Audio-ST231 port.
Delta-ST231
LMI system low-priority port All All initiators have accessed to this port
EMI port All but the SD Display All initiators have accessed to this port except
the SD Display.
6.1 Overview
The system configuration unit includes a number of configuration and status registers.
The status registers report the state of the following blocks:
● device identifier,
● NRSSA,
● USB,
● EMI bridge,
● TMC,
● SATA,
● comms,
Confidential
● ST40 boot,
● reset generator,
6.2 Summary
Register addresses are provided as SysConfigBaseAddress + offset.
The SysConfigBaseAddress is:
0x1900 1000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CHIP_ID
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TDO_EN_SATA
TDO_EN_USB
TDO_SATA
TDO_USB
BIST_OK
RB_1440
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MODE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMIPL_SYS_IOREF_COMPOK
LMIPL_SYS_IOREF_NASRC
LMI_SYS_PWRD_ACK
DLL2_CMD
DLL1_CMD
DLL2_LCK
DLL1_LCK
Reserved
[20] LMIPL_SYS_IOREF_COMPOK
High only in normal mode when a new measured code is available on the ASRC lines.
[19] DLL2_LCK: DLL2 lock value
[18:10] DLL2_CMD: DLL2 command
Reports the command currently being generated by DLL2.
[9] DLL1_LCK: DLL1 lock value
[8:0] DLL1_CMD: DLL1 command
Reports the command currently being generated by DLL1.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMIPL_VID_IOREF_COMPOK
LMIPL_VID_IOREF_NASRC
LMI_VID_PWRD_ACK
DLL2_CMD
DLL1_CMD
DLL2_LCK
DLL1_LCK
Reserved
[20] LMIPL_VID_IOREF_COMPOK
High only in normal mode when a new measured code is available on the ASRC lines.
[19] DLL2_LCK: DLL2 lock value
[18:10] DLL2_CMD: DLL2 command
Reports the command currently being generated by DLL2.
[9] DLL1_LCK: DLL1 lock value
[8:0] DLL1_CMD: DLL1 command
Reports the command currently being generated by DLL1.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CFG_TS0_TS1_SEL
INPUT_SEL_MUX
BYPASS_TS
Reserved
CFG_TS0_TS1_SEL
TSMerger
IN_SEL_MUX
TS_IN0
(or NRSS-A input)
NRSS-A
parallel / serial interface IN0
1
TS_IN1
(or D1 input) IN1
parallel / serial
1
IN2
0
TS_IN2
or TSOUT1394
(1394 interface)
1
0 1394
Transport
BYPASS_TS Subsystem
Note: See Chapter 38: Transport stream merger and router on page 343.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NRSSA_TS_IN_SP
NRSSA_EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BYPASS_LFSONLY
SOFT_JTAG_EN
MSEL_24_30
START_BIST
SEND_IDLE
LOOP_EN
Reserved
USB_AT
RX_EN
TX_EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TST_DAC_HD_CMDR
TST_DAC_HD_CMDS
TST_DAC_SD_CMDR
TST_DAC_SD_CMDS
PLL_S_HDMI_PDIV
PLL_S_HDMI_EN
S_HDMI_RST_N
DAC_HD_HZW
DAC_SD_HZW
DAC_HD_HZU
DAC_HD_HZV
DAC_SD_HZU
DAC_SD_HZV
Reserved
PLL_S_HDMI_MDIV PLL_S_HDMI_NDIV
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EMI4_MASTER_BOOTED
LATENCY_RX_OUT
LATENCY_TX_OUT
SW_RST_OUT
LATENCY_RX
LATENCY_TX
MODE_OUT
Reserved
Reserved
SW_RST
STROBE
MODE
Address: SysConfigBaseAddress + 0x110
Type: Mixed
Reset: 0x0127 0027
Description: Configures the EMI asynchronous bridge.
A rising edge on the strobe signal validates a new bridge configuration. To write a new
configuration, the software must write the new configuration (MODE/LATENCY/
SW_RST) while keeping the strobe bit at 0. Setting the strobe bit to 1 creates a rising
edge which validates the new setting.
The status of the control bits returned by the bridge can also be read back from this
register.
Confidential
[31:25] - Reserved
[24] RO SW_RST_OUT: Software reset - active low
[23:21] RO LATENCY_TX_OUT: Transmit latency
[20:18] RO LATENCY_RX_OUT: Receive latency
[17:16] RO MODE_OUT: Mode
[15:11] - Reserved
[10] R/W EMI4_MASTER_BOOTED
Bit used to gate the request from external slave until the master has completed its boot.
[9] R/W STROBE: Strobe to validate a new configuration
[8] R/W SW_RST: Software reset - active high
[7:5] R/W LATENCY_TX: Transmit latency value
[4:2] R/W LATENCY_RX: Receive latency value
[1:0] R/W MODE: Mode pins of memory bridge
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PIO0_SCCLK_NOT_CLK_DSS
PIO1_SCCLK_NOT_CLKDSS
IRB_DATA_OUT_POL_OD
SC_COND_VCC_EN
SCIF_PIO_OUT_EN
SC_DETECT_POL
SSC2_MUX_SEL
SSC1_MUX_SEL
SSC0_MUX_SEL
AUX_NOT_MAIN
DVO_OUT_ON
DAA_SER_EN
Reserved
Reserved
[1] SSC0_MUX_SEL: SSC0 muxing selection; see Section 8.2: Alternative functions on page 78.
0: Default assignment
1: SSC0_MRST replaces SSC0_MTSR on the corresponding PIO alternate function.
[0] SCIF_PIO_OUT_EN
0: Regular PIO 1: Select the SCIF output
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RTC_CLK_SRC
ST40_BOOT
Reserved
0: The ST40 RTC sources its clock from the input pin RTCCLKIN
1: The ST40 RTC sources its clock from clock generator B (fixed frequency 32.768 kHz)
[0] ST40_BOOT: Controls whether the ST40 is allowed to boot or not after a reset. Its value depends on
the mode pin [12] captured during the reset phase.
0: Boot halted 1: Boot enabled
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CPU_RST_OUT_BYPASS1
CPU_RST_OUT_BYPASS0
Reserved
Reserved
RST_OUT_LEN
0: The reset signal is propagated through the ST231s and the ST40
1: Bypass the ST40, Audio ST231 and Delta ST231 reset out signals.
Reset: from mode pin [4].
[26] Reserved
[25:0] RST_OUT_LEN: Length of WDGRTS_OUT in 27 MHz cycles
In long reset out mode, the reset value guarantees a 200 ms WDGRTS_OUT signal.
In short reset out mode, the WDGRTS_OUT signal lasts 100 µs.
This register allows for a max reset out of 2.48 sec.
Reset: 0x52 65C0 in long reset out modea, 0x00 0A8C in short reset out mode
a. Long reset out mode is selected when MODE_PIN[13] is set to ‘1’.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SYS_IRQ3_DIR
SYS_IRQ2_DIR
SYS_IRQ1_DIR
SYS_IRQ0_DIR
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMI_SYS_SWAP_ADD_13_11
LMI_SYS_SWAP_ADD_13_10
LMI_VID_SWAP_ADD_13_11
LMI_VID_SWAP_ADD_13_10
LMI_VID_PWR_DN_REQ
LMI_SYS_PWRD_REQ
LMI_SYS_PL_RETIME
LMI_SYS_CKG_RSTN
LMI_VID_PL_RETIME
LMI_SYS_HP_AP_EN
LMI_VID_CKG_RSTN
LMI_SYS_LP_AP_EN
LMI_VID_HP_AP_EN
LMI_VID_LP_AP_EN
BYPASS_DQS_EN
LMI_SYS_PBS_IN
LMI_SYS_RST_N
LMI_VID_PBS_IN
LMI_VID_RST_N
Reserved
Reserved
Reserved
[27] BYPASS_DQS_EN
Bypass gating logic for DQS strobe during postamble. Must be set to 1.
[26] LMI_VID_SWAP_ADD_13_11
Video LMI - Enable swapping between bit 13 and bit 11 of STBus address.
[25] LMI_VID_SWAP_ADD_13_10
Video LMI - Enable swapping between bit 13 and bit 10 of STBus address.
[24] LMI_SYS_SWAP_ADD_13_11
System LMI - Enable swapping between bit 13 and bit 11 of STBus address.
[23] LMI_SYS_SWAP_ADD_13_10
System LMI - Enable swapping between bit 13 and bit 10 of STBus address.
[22] LMI_VID_HP_AP_EN
Video LMI - Enable read with autoprecharge on high priority port.
[21] LMI_VID_LP_AP_EN
Video LMI - Enable read with autoprecharge on low priority port.
[20] LMI_SYS_HP_AP_EN
System LMI - Enable read with autoprecharge on high priority port.
[19] LMI_SYS_LP_AP_EN
System LMI - Enable read with autoprecharge on low priority port.
[18] LMI_VID_PL_RETIME
Video LMI - retiming stage enable. Active high
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMI_SYS_DLL2_LCK_CTRL
LMI_SYS_DLL1_LCK_CTRL
LMI_SYS_IOREF_COMPTQ
LMI_SYS_IOREF_RASRC
LMI_SYS_IOREF_COMP
LMI_SYS_IOREF_ACC
LMI_SYS_IOREF_FRZ
LMI_SYS_DDR_CTRL
LMI_SYS_IOREF_TQ
Reserved
Address: SysConfigBaseAddress + 0x130
Type: R/W
Reset: 0x4000 0XXD
Description: Control the system LMI DDR padlogic. The drive of the SSTL2 pads, the padlogic DLLs
(DLL1 and DLL2) and the compensation cell parameters can be controlled.
[31] LMI_SYS_IOREF_TQ: Compensation cell IDDQ mode select
Must be 0 in normal mode
1: puts all IOs and reference generators in IDDQ mode
[30] LMI_SYS_IOREF_ACC
Compensation cell accurate mode select (use an external resistor to provide an accurate compensation
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMI_VID_DLL2_LCK_CTRL
LMI_VID_DLL1_LCK_CTRL
LMI_VID_IOREF_COMPTQ
LMI_VID_IOREF_RASRC
LMI_VID_IOREF_COMP
LMI_VID_IOREF_ACC
LMI_VID_IOREF_FRZ
LMI_VID_DDR_CTRL
LMI_VID_IOREF_TQ
Reserved
Address: SysConfigBaseAddress + 0x134
Type: R/W
Reset: 0x4000 0XXD
Description: Control the video LMI DDR padlogic. The drive of the SSTL2 pads, the padlogic DLLs
(DLL1 and DLL2) and the compensation cell parameters can be controlled.
[31] LMI_VID_IOREF_TQ: Compensation cell IDDQ mode select
Must be 0 in normal mode.
[30] LMI_VID_IOREF_ACC: Compensation cell accurate mode select
Must be 1 in normal mode.
[29] LMI_VID_IOREF_FRZ: Compensation cell code freeze
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMIPL_SYS_DLL1_INT_CMD
Reserved
Reserved
LMIPL_SYS_DLL1_USER_CMD LMIPL_SYS_DLL1_OFF_CMD LMIPL_SYS_DLL1_RST_CMD
[19] Reserved
[18] LMIPL_SYS_DLL1_INT_CMD: Controls which internal delay command is used by DLL1
0: FSM-generated command
1: user command
[17:9] LMIPL_SYS_DLL1_OFF_CMD
DLL1 offset value added to the FSM generated delay command. Can be negative and must be coded in
twos complement.
[8:0] LMIPL_SYS_DLL1_RST_CMD
DLL1 command from which the FSM start to count-up after reset.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMIPL_SYS_DLL2_EXT_CMD
LMIPL_SYS_DLL2_INT_CMD
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMIPL_VID_DLL1_INT_CMD
Reserved
Reserved
LMIPL_VID_DLL1_USER_CMD LMIPL_VID_DLL1_OFF_CMD LMIPL_VID_DLL1_RST_CMD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMIPL_VID_DLL2_EXT_CMD
LMIPL_VID_DLL2_INT_CMD
Reserved
[19] LMIPL_VID_DLL2_EXT_CMD
Controls which external delay command is used for DLL2.
0: FSM-generated delay command
1: user external delay command
[18] LMIPL_VID_DLL2_INT_CMD
Controls which internal delay command is used for DLL2.
0: FSM-generated delay command
1: user internal delay command
[17:9] LMIPL_VID_DLL2_OFF_CMD
DLL2 offset value added to the FSM generated delay command. Can be negative and must be coded in
2’s complement.
[8:0] LMIPL_VID_DLL2_RST_CMD
DLL2 command from which the FSM start to count-up after reset.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ST231_AUD_BOOT
ST231_AUD_BOOT_ADDR[29:6] Reserved
Address: SysConfigBaseAddress + 0x
Type: R/W
Reset: 0
Description: Allows the audio ST231 to boot and to define its boot address.
[31:8] ST231_AUD_BOOT_ADDR[29:6]: Audio ST231 boot address
[7:1] Reserved
[0] ST231_AUD_BOOT: Audio ST231 boot enable
0: boot halted
1: boot enabled
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ST231_AUD_RSTP
Reserved ST231_AUD_PERIPH_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ST231_DELTA_BOOT_EN
ST231_DELTA_BOOT_ADDR[29:6] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ST231_DELTA_RSTP
Reserved ST231_DELTA_PERIPH_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TRSTN_SATA
TRSTN_USB
Reserved
Reserved
Part 2
Hardware
Confidential
7 Package
Package type: PGBA 580 + 100 balls (plastic ball grid array).
Body: 35 x 35 mm.
Seating plane C
34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2
33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1
A1
A
B
C
D
E
F
G
H
J
K
L
M
N
P
R
T
U
E E1 V
W
Y
AA
AB
Confidential
AC
AD
AE
AF
AG
AH
AJ
AK
AL
AM
AN
AP
A2 e
A D1 F
C B
A
D
ddd C
Detail D
eee C A B
fff C b A1 corner index area
Detail D
Millimeters Inches
Dimension Element
Min Typ Max Min Typ Max
A 2.500 0.098 Overall thickness
A1 0.300 0.012 Ball height
A2 1.900 0.075 Body thickness
b 0.500 0.600 0.700 0.020 0.024 0.028 Ball diameter
D 34.800 35.000 35.200 1.370 1.378 1.386 Body size
D1 33.000 1.299 Ball footprint
E 34.800 35.000 35.200 1.370 1.378 1.386 Body size
E1 33.000 1.299 Ball footprint
e 1.000 0.039 Ball pitch
F 1.000 0.039
ddd 0.200 0.008 Coplanarity
eee 0.250 0.010
fff 0.100 0.004
interconnect. The category of second level interconnect is marked on the package and on the
inner box label, in compliance with JEDEC Standard JESD97. The maximum ratings related to
soldering conditions are also marked on the inner box label. ECOPACK is an ST trademark.
ECOPACK specifications are available at: www.st.com.
The Ecopack version can be identified by the letter ‘E’ beside the ST logo. Both types are
compatible with ROHS.
Ecopack
Leaded
(lead-free)
Lead free termination surface material (with %) Sn/Ag/Cu: Sn/Pb:
Ag 3.3 - 4.3%, Sn 63%,
Cu 0.4 - 1.1%, Pb 37% eutectic
Sn balance
Is the substitution component totally (=100%) without Yes 100% No 37%
lead? (Yes/No, % of Pb)
Reflow zone: 235/260 215/240
Peak temperature min/max (°C)
Reflow zone: 60 to 90 s above 217°C 60 to 120 s above 183°C
Time above liquidus or above 220 °C (seconds)
Compatibility with actual SnPb 63/37 solder paste No Yes
Compatibility with SnAgCu solder paste with a solder peak Yes Yes
of 250 °C
MSL impact 3 3
8.1 Pin-out
Signal names are prefixed by NOT if they are active low; otherwise they are active high.
On the pin-out diagram, black indicates that the pin is reserved and must not be used.
The following pages give the allocation of pins to the package, shown from the top looking down
using the PCB footprint.
PIO/peripheral SIG
EMI SIG
LMISYS SIG
LMIVID SIG
USB SIG
SATA SIG
Analog 1.0 V powers/grounds VDD/GND
Analog 2.5 V powers/grounds VDD/GND
Analog 3.3 V powers/grounds VDD/GND
Digital 1.0 V powers/grounds VDD/GND
Digital 2.5 V powers/grounds VDD/GND
Digital 3.3 V powers/grounds VDD/GND
Not connected - do not connect NC
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
LMIVID LMIVID
LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID
A DATA[8] DATA[10] DATA[12] DATA[14]
DATASTRO DATA
DATA[24] DATA[26] DATA[28] DATA[30] DATA[31] DLL_VDD CLK DATA[0] DATA[2] DATA[4] DATA[6]
BE[1] MASK[3]
CKGA_PLL LMIVID LMIVID
LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVIDGN LMI NOTLMI LMIVID LMIVID LMIVID LMIVID
B 1_AVDD
DATA[9] DATA[11] DATA[13] DATA[15]
DATA DATASTRO
DATA[25] DATA[27] DATA[29] DBGCOMP VIDREF VIDCLK DATA[1] DATA[3] DATA[5] DATA[7]
PLL2V5 MASK[1] BE[3]
CKGA_PLL
SYSA CKGA_PLL LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID
C CLKIN
2_AVDD
_VDDE2V5 VDDE2V5 VDDE2V5 VDDE2V5 VDDE2V5 VDDE2V5 VDDE2V5 VDDE2V5 VREF DLL_VSS VDDE2V5
GNDE GNDE GNDE GNDE
PLL2V5
CKGA_PLLCKGA_PLLCKGA_PLL
LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID NOTLMI LMIVID LMIVID LMIVID NOTLMI TRIGGER
D 1_AGND 2_AGND 1_DGND
ADD[8] ADD[6] ADD[4] ADD[12] ADD[10] ADD[3] ADD[1] VIDCS[0] VDDE2V5 CLKEN BKSEL[0] VIDCAS
RTCCLKIN
IN
PLL2V5 PLL2V5 PLL1V0
CKGA_PLLCKGA_PLL
LMISYS LMISYS LMIVID LMIVID LMIVID LMIVID LMIVID LMIVID NOTLMI LMIVID LMIVID NOTLMI NOTLMI SYSCLK
E DATA[9] DATA[8]
2_DGND 2_DVDD
ADD[7] ADD[5] ADD[9] ADD[11] ADD[2] ADD[0] VIDCS[1] VDDE2V5 BKSEL[1] VIDRAS VIDWE
NMI
OUT
PLL1V0 PLL1V0
CKGA_PLL
LMISYS LMISYS
F DATA[11] DATA[10]
1_DVDD VDD VDD
PLL1V0
LMISYS LMISYS
NOTLMI NOTLMI
J DATA DATASTRO GNDE
SYSCAS SYSWE
MASK[1] BE[1]
LMISYS LMISYS
LMISYSBK NOTLMI
K DATASTRO DATA GNDE
SEL[0] SYSRAS
BE[3] MASK[3]
LMISYS LMISYSGN
R REF DBGCOMP
GNDE GNDE GNDE VDD GND GND GND VDD
LMISYS LMISYS
LMISYS TSIN1 TSIN1
AB DATASTRO DATA
VDDE2V5 DATA[5] DATA[6]
GND GND GND VDD VDD
BE[0] MASK[0]
LMISYS LMISYS
LMISYS TSIN1 TSIN1
AC DATA DATASTRO
VDDE2V5 DATA[3] DATA[4]
MASK[2] BE[2]
TSIN1 TSIN1
LMISYS LMISYS
AF DATA[20] DATA[21]
GNDE PACKET BYTECLK
CLK VALID
TSIN0 TSIN0
TSIN0 TSIN0
AJ DATA[4] DATA[5]
GNDE PACKET BYTECLK
CLK VALID
TSIN0 TSIN0 VDDE TSIN0 VDDE NOT NOT EMI EMI EMI EMI EMI EMI EMI
AK DATA[2] DATA[3] 2V5
GNDE GNDE
BYTECLK 2V5 EMICSE EMICSA ADDR[2] ADDR[4] ADDR[6] ADDR[8] ADDR[10] ADDR[12]
VDD
ADDR[14]
TSIN2 TSIN2 TSIN2 VDDE NOT EMI EMI EMI EMI EMI EMI EMI EMI
AL DATA[6] DATA[5] DATA[7]
GNDE GNDE NC
2V5 EMICSB ADDR[1] ADDR[3] ADDR[5] ADDR[7] ADDR[9] ADDR[11] ADDR[13]
VDD
ADDR[15]
TSIN2 TSIN2 TSIN2 VDDE NOT VDDE VDDE VDDE VDDE VDDE VDDE VDDE
AM DATA[4] DATA[3] BYTECLK
GNDE NC GNDE
2V5 EMICSC 3V3 3V3 3V3 3V3 3V3 3V3 3V3
VDD VDD
TSIN2 EMI
TSIN2 TSIN2 VDDE VDDE NOT EMI EMI EMI EMI EMI
AN DATA[2] DATA[1]
BYTECLK GNDE DAA_C1A GNDE
2V5 3V3
NC RDNOT
EMIBE[1] DATA[15] DATA[14] DATA[13] DATA[12]
VDD
DATA[11]
VALID WR
TSIN2
TSIN2 TSIN2 VDDE NOT NOT NOT EMI EMI EMI EMI EMI
AP DATA[0] ERROR
PACKET GNDE DAA_C2A GNDE
3V3 EMICSD
NC
EMIOE EMIBE[0] DATA[7] DATA[6] DATA[5] DATA[4]
VDD
DATA[3]
CLK
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
LMIVID LMIVID AUDANAP
LMIVID LMIVID LMIVID LMIVID AUDPCM VDDE AUDANAP AUD_ VIDANA VIDANA VIDAN VIDAN
A DATASTRO DATA
DATA[16] DATA[18] DATA[20] DATA[22]
GNDE
OUT0 3V3 LEFTOUT
RIGHT NC
GNDA REXT[0] REXT[1] AIDUMPC1 AC1OUT
BE[0] MASK[2] OUT
LMIVID LMIVID AUDANAM VIDANA VIDANA
LMIVID LMIVID LMIVID LMIVID AUDPCM VDDE AUDANAM AUD_ AUD_ VIDANA VIDAN
B DATA DATASTRO
DATA[17] DATA[19] DATA[21] DATA[23]
GNDE
OUT1 3V3 LEFTOUT
RIGHT
VCCA GNDAS
GNDA GNDA
IDUMPY1 AY1OUT
MASK[0] BE[2] OUT REXT[0] REXT[1]
TRIGGER NOT AUDSPDIF AUDPCM AUDPCM AUDDIG AUDDIG DA_HD_0_ VDDE2V5_ AGNDPLL VIDANAID VIDAN
D OUT RESETIN
NOTTRST TCK TDI GNDE
OUT OUT3 CLKOUT
GND_ANA
STRBIN DATAIN VCCA AUD_ANA 80V0 UMPR0 AR0OUT
VDDE2V5_
WDOG NOT AUDS AUDPCM AUDLR SYSBCLK AUDDIGLR DA_SD_0_ VDDE2V5_ GNDE_ VIDANAID VIDAN
E TMUCLK
RSTOUT ASEBRK
TMS TDO GNDE
CLKOUT OUT4 CLKOUT INALT CLKIN
PLL80_
VCCA FS0_ANA AUD_ANA UMPB0 AB0OUT
ANA
GNDE_
DVDD DGND VIDDIG VIDDIG
K PLL80V0 PLL80V0
PLL80_
OUTYC[3] OUTYC[2]
ANA
VIDDIG VIDDIG
CKGB_4F CKGB_4F
M S0_VCCA S0_GNDA
GND_ANA OUT OUT
HSYNC VSYNC
TMDS
Y VDD GND GND GND VDD PIO5[6] PIO5[7]
VDDC1
PIO5[4] PIO5[3]
TMDS
AA VDD GND GND GND GND PIO4[7] PIO5[5]
VDDSL
PIO5[2] PIO5[1]
TMDS
AB VDD VDD GND GND GND PIO4[5] PIO4[6]
VDDD
PIO5[0] PIO3[7]
TMDS
AC PIO4[3] PIO4[4]
VDDP
PIO3[6] PIO3[5]
GNDE
AH PIO2[2] PIO2[3]
3V3
PIO1[7] PIO1[6]
GNDE
AJ PIO2[0] PIO2[1]
3V3
PIO1[5] PIO1[4]
EMIT
EMIA EMI EMI EMI SYS SYS SYS SYS GNDE
AK DDR[16] ADDR[18] ADDR[20] ADDR[22]
READYOR VDDE3V3 VDDE3V3
ITRQ[0] ITRQ[1] ITRQ[2] ITRQ[3]
GND GND GND
3V3
PIO1[3] PIO1[2]
WAIT
EMI EMI EMI EMI EMIDMA USB USB USB SATA SATA SATA SATA SATA
AL ADDR[17] ADDR[19] ADDR[21] ADDR[23] REQ[1] VSSBS VDDB3V3 VDDBS VDDOSC VSSOSC VDDR[1] VDDDLL VDDREF
GND PIO0[7] PIO1[1] PIO1[0]
USB USB
EMI EMI SATAVDD SATA SATA SATA SATA
AM VDD VDD
BUSREQ BUSGNT
GND VSSP VDDBC USBREF
OSC2V5 VSSREF VSSDLL VDDR[0] REF
NC PIO0[0] PIO0[5] PIO0[6]
2V5 2V5
USB USB
EMI EMI EMI EMI EMIDMA SYSB SATA SATA SATA SATA
AN DATA[10] DATA[9] DATA[8] FLASHCLK REQ[0]
VSSC VDDP USBDP GND
CLKOSC VSSR VDDT[0] TXP RXP
GND PIO0[2] PIO0[4]
2V5 2V5
EMI EMI EMI NOT NOT USB USB SYSB SATA SATA SATA SATA
AP DATA[2] DATA[1] DATA[0] EMIBAA EMILBA VSSP VDDP
USBDM GND
CLKIN VSST VDDT[1] TXN RXN
GND PIO0[1] PIO0[3]
Pin
Push-pull
tri-state
open drain
weak pull-up
Alternative function
1 0
a. The smartcard clock can be derived from the smartcard clock generator or
directly from clockgen B depending on the value of register SYS_CFG7[4].
a. the smartcard clock can be derived from the smartcard clock generator or
directly from clockgen B depending on the value of SYS_CFG7[5].
Confidential
4 IRB_UHF_IN -
5 - IRB_IR_DATAOUT
6 - IRB_IR_DATAOUT_OD
7 DENC_CFC - -
9 Connections
This chapter contains detail of pins, alternative functions and connection diagrams, listed in the
following functional groups:
● power supplies (analog and digital) on page 84,
● peripherals:
Volt
Pin Assignment I/O Description Decoupling
age
USB2
AL24 USBVDDB3V3 P 3.3 USB1.1 mode buffer power TBD
AM24 USBVDDBC2V5 P 2.5 USB2 2.5 V buffer power TBD
AN23 USBVSSC2V5 G 0 USB2 2.5 V buffer ground
AL25 USBVDDBS P 1.0 USB2 buffer/serdes power TBD
AL23 USBVSSBS G 0 USB2 buffer/serdes ground
AN24 USBVDDP2V5 P 2.5 USB2 2.5 V PLL power TBD
AM23 USBVSSP2V5 G 0 USB2 2.5 V PLL ground
AP24 USBVDDP P 1.0 USB2 PLL power TBD
AP23 USBVSSP G 0 USB2 PLL ground
SATA-I
AN29 SATAVDDT[0] P 1.0 SATA transmitter power 10 nF + 100 pF
AP29 SATAVDDT[1] P 1.0 SATA transmitter power 10 nF + 100 pF
AP28 SATAVSST G 0 SATA transmitter ground -
Confidential
Volt
Pin Assignment I/O Description Decoupling
age
AB32 TMDSVDDD P 1.0 TMDS DLL2 power TBD
N32 TMDSVSSD G 0 TMDS DLL2 ground
W30 TMDSVDDE3V3 P 3.3 TMDS 3.3 V power TBD
R32 TMDSGNDE G 0 TMDS 3.3 V ground
V31 TMDSVDD P 1.0 TMDS 1.0 V power TBD
VDAC
D30 DA_HD_0_VCCA P 2.5 VDAC0 power TBD
C32 DA_HD_0_GNDA G 0 VDAC0 ground
E30 DA_SD_0_VCCA P 2.5 VDAC1 power TBD
F30 DA_SD_0_GNDA G 0 VDAC1 ground
H32 VDDE2V5_VID_ANA P 2.5 VDAC ring power TBD
J32 GNDE_VID_ANA G 0 VDAC ring ground
ADAC
B29 AUD_VCCA P 2.5 ADAC power TBD
A30 AUD_GNDA G 0 ADAC ground
B30 AUD_GNDAS G 0 ADAC substrate ground
Confidential
Volt
Pin Assignment I/O Description Decoupling
age
K30 DVDDPLL80v0 P 1.0 PLL3 digital power TBD
K31 DGNDPLL80v0 G 0 PLL3 digital ground
E29 VDDE2V5_PLL80_ANA P 2.5 PLL3 ring power TBD
K32 GNDE_PLL80_ANA G 0 PLL3 ring ground
CLOCKGENC
C29 FS0_VCCA P 2.5 CKGC FS0 analog power TBD
C31 FS0_GNDA G 0 CKGC FS0 analog ground
G30 FS0_VDDD P 1.0 CKGC FS0 digital power TBD
G31 FS0_GNDD G 0 CKGC FS0 digital ground
E31 VDDE2V5_FS0_ANA P 2.5 CKGC ring power TBD
F32 GNDE_FS0_ANA G 0 CKGC ring ground
LMI
T1 LMISYSVDDE2V5 P 2.5 LMISYS powera TBD
T2
U3
V3
Confidential
W3
Y3
Y4
AA3
AA5
AB3
AC3
H4 LMISYSDLL_VDD P 1.0 LMISYS DLL power TBD
G3 LMISYSDLL_VSS G 0 LMISYS DLL ground
C4 LMIVIDVDDE2V5 P 2.5 LMISYS powerb TBD
C5
C6
C7
C8
C9
C10
C13
D12
E12
A12 LMIVIDDLL_VDD P 1.0 LMIVID DLL power TBD
C12 LMIVIDDLL_VSS G 0 LMIVID DLL ground
Analog
D27 GND_ANA G 0 Analog ring ground
M32
Volt
Pin Assignment I/O Description Decoupling
age
Digital 1.0 V
F4 VDD P 1.0 Digital 1.0 V ring power TBD
F5
G4
N16
N17
N18
N19
P17
P18
R13
R17
R18
R22
T13
T14
Confidential
T21
T22
U13
U14
U21
U22
V13
V14
V21
V22
W13
W14
W21
W22
Y13
Y17
Y18
Y22
AA17
AA18
AB16
AB17
Volt
Pin Assignment I/O Description Decoupling
age
AB18 VDD P 1.0 Digital 1.0 V ring power TBD
AB19
AF30
AK16
AL16
AM16
AM17
AM18
AM19
AN16
AP16
H3 GND G 0 Digital ring ground TBD
N13
N14
N15
N20
Confidential
N21
N22
P13
P14
P15
P16
P19
P20
P21
P22
R14
R15
R16
R19
R20
R21
T15
T16
T17
T18
T19
T20
U15 GND G 0 Digital ring ground TBD
U16
U17
Volt
Pin Assignment I/O Description Decoupling
age
U18 GND G 0 Digital ring ground TBD
U19
U20
V15
V16
V17
V18
V19
V20
W15
W16
W17
W18
W19
W20
Y14
Confidential
Y15
Y16
Y19
Y20
Y21
AA13
AA14
AA15
AA16
AA19
AA20
AA21
AA22
AB13
AB14
AB15
AB20
AB21
AB22
AK29
AK30
AK31
AL31
AM22
AN26
Volt
Pin Assignment I/O Description Decoupling
age
AN32 GND G 0 Digital ring ground TBD
AP26
AP32
Digital 2.5 V/3.3 V
AK3 VDDE2V5 P 2.5 Digital 2.5 V ring power TBD
AK7
AL7
AM7
AN7
A26 VDDE3V3 P 3.3 Digital 3.3 V ring power TBD
B26
C26
G33
G34
AF31
AF32
Confidential
AF33
AF34
AK23
AK24
AM9
AM10
AM11
AM12
AM13
AM14
AM15
AN8
AP7
A24 GNDE G 0 Digital ring ground (common to 2.5 V TBD
and 3.5 V rings)
B24
C14
C15
C16
C17
C18
C19
C20
C21
C22
C23
Volt
Pin Assignment I/O Description Decoupling
age
C24 GNDE G 0 Digital ring ground (common to 2.5 V TBD
and 3.5 V rings)
D23
E23
J3
K3
L3
M3
N3
P3
R3
R4
R5
T3
V30
U31
AD3
Confidential
AE3
AF3
AG3
AG32
AG33
AG34
AH3
AH32
AJ3
AJ32
AK4
AK5
AK32
AL4
AL5
AM4
AM6
AN4
AN6
AP4
AP6
a. LMISYS_VDDE may require a 2.6 V +/- 0.1 V supply depending on the DDR part.
b. LMISYS_VDDE may require a 2.6 V +/- 0.1 V supply depending on the DDR part.
9.2 System
Table 17: System pins
Volt
Pin Assignment I/O Description Decoupling
age
C1 SYSACLKIN I 2.5 First system clock (27 MHz) system clocks
AP27 SYSBCLKIN I 2.5 Second system clock (30 MHz) oscillator
AN27 SYSBCLKOSC O 2.5
E27 SYSBCLKINALT I 3.3 Second system alternate clock (30 MHz)
E17 SYSCLKOUT O 3.3 Programmable output clock for debug
D16 RTCCLKIN I 3.3 Real time clock
E18 TMUCLK I/O 3.3 ST40 timer clock
D19 NOTRESETIN I 3.3 System reset system reset
E19 WDOGRSTOUT O 3.3 Internal watchdog timer reset
E20 NOTASEBRK I/O 3.3 ST40 debugger breakpoint CPUs debug
D17 TRIGGERIN I 3.3 ST231 debugger controller in
D18 TRIGGEROUT O 3.3 ST231 debugger controller out
AK25 SYSITRQ[0] I/O 3.3 Interrupt line Interrupts
AK26 SYSITRQ[1]
Confidential
AK27 SYSITRQ[2]
AK28 SYSITRQ[3]
E16 NMI I 3.3 Nonmaskable interrupt
Volt PIO
Pin Assignment I/O Description
age assignment
AH34 LONG_TIME_RST_OUT I 3.3 Long time reset out PIO1[6]
AA33 SYSCLKOUT0 O 3.3 First system clock PIO5[2]
9.3 JTAG
Table 19: JTAG pins
Volt
Pin Assignment I/O Description Comments
age
D22 TDI I 3.3 CPUs debug port and TAP data input no internal pull-
up or pull-down
E21 TMS I 3.3 CPUs debug port and TAP mode select
resistors
D21 TCK I 3.3 CPUs debug port and TAP clock
D20 NOTTRST I 3.3 CPUs debug port and TAP logic reset
E22 TDO O 3.3 CPUs debug port and TAP data output
Volt
Pin Assignment I/O Description Comments
age
AK6 TSIN0BYTECLK I 3.3 TSIN0 control signals TSIN 0 parallel
stream
AJ5 TSIN0BYTECLKVALID
AH4 TSIN0ERROR
AJ4 TSIN0PACKETCLK
AH5 TSIN0DATA[0] I 3.3 TSIN0 parallel bit 0 or serial data in
AG4 TSIN0DATA[1] I 3.3 TSIN0 parallel data in
AK1 TSIN0DATA[2]
AK2 TSIN0DATA[3]
AJ1 TSIN0DATA[4]
AJ2 TSIN0DATA[5]
AH1 TSIN0DATA[6]
AH2 TSIN0DATA[7]
AG5 TSIN1BYTECLK I 3.3 TSIN1 control signals TSIN 1 parallel
stream
AF5 TSIN1BYTECLKVALID
or
Confidential
Volt
Pin Assignment I/O Description Comments
age
AF5 VIDINCLKIN I 3.3 27 or 54 MHz pixel clock input TSIN1BYTECLKVALID
AG5 VIDINHSYNCIN I 3.3 Horizontal synchro input TSIN1BYTECLK
AF4 VIDINVSYNCIN I 3.3 Vertical synchro input TSIN1PACKETCLK
AA4 VIDINDATAIN[7] I 3.3 Single CCIR656 video or muxed TSIN1DATA[7]
YCbCr SD pixel data in
AB5 VIDINDATAIN[6] TSIN1DATA[6]
AB4 VIDINDATAIN[5] TSIN1DATA[5]
AC5 VIDINDATAIN[4] TSIN1DATA[4]
AC4 VIDINDATAIN[3] TSIN1DATA[3]
AD5 VIDINDATAIN[2] TSIN1DATA[2]
AD4 VIDINDATAIN[1] TSIN1DATA[1]
AE5 VIDINDATAIN[0] TSIN1DATA[0]
Volt PIO
Pin Assignment I/O Description
age assignment
AJ33 NRSSA_DATAIN I 3.3 NRSS-A interface input PIO1[5]
Confidential
Volt
Pin Assignment I/O Description Comments
age
M33 VIDDIGOUTHSYNC O 3.3 Horizontal display reference
M34 VIDDIGOUTVSYNC O 3.3 Vertical display reference
L34 VIDDIGOUTYC[0] O 3.3 Digital display output
L33 VIDDIGOUTYC[1]
K34 VIDDIGOUTYC[2]
K33 VIDDIGOUTYC[3]
J34 VIDDIGOUTYC[4]
J33 VIDDIGOUTYC[5]
H34 VIDDIGOUTYC[6]
H33 VIDDIGOUTYC[7]
U30 VIDDIGOUTYC[8]
T31 VIDDIGOUTYC[9]
T30 VIDDIGOUTYC[10]
R31 VIDDIGOUTYC[11]
Confidential
R30 VIDDIGOUTYC[12]
P31 VIDDIGOUTYC[13]
P30 VIDDIGOUTYC[14]
N31 VIDDIGOUTYC[15]
Volt PIO
Pin Assignment I/O Description
age assignment
AE33 VTG_MAIN_NTOP_BOT O 3.3 Video timing generator output PIO3[2]
AE34 VTG_MAIN_VREF O 3.3 PIO3[1]
AE32 VTG_MAIN_HREF O 3.3 PIO3[0]
AE33 VTG_AUX_NTOP_BOT O 3.3 PIO3[2]
AE34 VTG_AUX_VREF O 3.3 PIO3[1]
AE32 VTG_AUX_HREF O 3.3 PIO3[0]
AJ30 DVO_BLANK O 3.3 DVO output PIO2[0]
Volt
Pin Assignment I/O Description Comments
age
D34 VIDANAR0OUT O 2.5 Analog display0 red output Connect an external
140 Ω 1% resistor to
F34 VIDANAG0OUT O 2.5 Analog display0 green output
analog ground
E34 VIDANAB0OUT O 2.5 Analog display0 blue output
D33 VIDANAIDUMPR0 O 2.5 Analog display0 current return red Connect to analog
output ground
F33 VIDANAIDUMPG0 O 2.5 Analog display0 current return green
output
E33 VIDANAIDUMPB0 O 2.5 Analog display0 current return blue
output
A34 VIDANAC1OUT O 2.5 Analog display1 chrominance output Connect an external
140 Ω 1% resistor to
C34 VIDANACV1OUT O 2.5 Analog display1 CVBS output
analog ground
B34 VIDANAY1OUT O 2.5 Analog display1 luminance output
A33 VIDANAIDUMPC1 O 2.5 Analog display0 current return Connect to analog
chrominance output ground
C33 VIDANAIDUMPCV1 O 2.5 Analog display0 current return CVBS
output
Confidential
Volt
Pin Assignment I/O Description Comments
age
U33 TMDSTXCP O TMDS TMDS Control plus
U34 TMDSTXCN O TMDS TMDS Control minus
T33 TMDSTX0P O TMDS TMDS Data0 plus
T34 TMDSTX0N O TMDS TMDS Data0l minus
R33 TMDSTX1P O TMDS TMDS Data1 plus
R34 TMDSTX1N O TMDS TMDS Data1 minus
P33 TMDSTX2P O TMDS TMDS Data2 plus
P34 TMDSTX2N O TMDS TMDS Data2 minus
T32 TMDSREF A - TMDS voltage reference
Volt
Pin Assignment I/O Description Comments
age
D29 AUDDIGDATAIN I 3.3 Serial audio input PCM input
D28 AUDDIGDSTRBIN I 3.3 Strobe for serial audio input
E28 AUDDIGDLRCLKIN I 3.3 Left/right channel select input
A25 AUDPCMOUT0 O 3.3 PCM data0a Audio digital output
Volt
Pin Assignment I/O Description Comments
age
A27 AUDANAPLEFTOUT O 2.5 DAC left channel positive differential
output
B27 AUDANAMLEFTOUT O 2.5 DAC left channel negative differential
out
A28 AUDANAPRIGHTOUT O 2.5 DAC right channel positive differential
out
B28 AUDANAMRIGHTOUT O 2.5 DAC right channel negative
differential out
C27 AUDANAIREF A - DAC output reference current Connect an external
575 Ω 1% resistor to
AUD_GNDA
C28 AUDANAVBGFIL A - DAC filtered input reference voltage Connect an external 10
µF capacitance to
AUD_GNDA
Volt
Pin Assignment I/O Description Comments
age
AM32 PIO0[0] I/O 3.3 Programmable input/output
AP33 PIO0[1]
AN33 PIO0[2]
AP34 PIO0[3]
AN34 PIO0[4]
AM33 PIO0[5]
AM34 PIO0[6]
AL32 PIO0[7]
AL34 PIO1[0] I/O 3.3 Programmable input/output
AL33 PIO1[1]
AK34 PIO1[2]
AK33 PIO1[3]
AJ34 PIO1[4]
AJ33 PIO1[5]
Confidential
AH34 PIO1[6]
AH33 PIO1[7]
AJ30 PIO2[0] I/O 3.3 Programmable input/output
AJ31 PIO2[1]
AH30 PIO2[2]
AH31 PIO2[3]
AG30 PIO2[4]
AG31 PIO2[5]
AE31 PIO2[6]
AE30 PIO2[7]
AE32 PIO3[0] I/O 3.3 Programmable input/output
AE34 PIO3[1]
AE33 PIO3[2]
AD34 PIO3[3]
AD33 PIO3[4]
AC34 PIO3[5]
AC33 PIO3[6]
AB34 PIO3[7]
Volt
Pin Assignment I/O Description Comments
age
AD32 PIO4[0] I/O 3.3 Programmable input/output
AD30 PIO4[1]
AD31 PIO4[2]
AC30 PIO4[3]
AC31 PIO4[4]
AB30 PIO4[5]
AB31 PIO4[6]
AA30 PIO4[7]
AB33 PIO5[0] I/O 3.3 Programmable input/output
AA34 PIO5[1]
AA33 PIO5[2]
Y34 PIO5[3]
Y33 PIO5[4]
AA31 PIO5[5]
Y30 PIO5[6]
Y31 PIO5[7]
Confidential
Volt
Pin Assignment I/O Description Comments
age
AK9 NOTEMICSA O 3.3 Peripheral chip select A
AL8 NOTEMICSB O 3.3 Peripheral chip select B
AM8 NOTEMICSC O 3.3 Peripheral chip select C
AP8 NOTEMICSD O 3.3 Peripheral chip select D
AK8 NOTEMICSE O 3.3 Peripheral chip select E
AP11 NOTEMIBE[0] O 3.3 External device databus byte enable
AN11 NOTEMIBE[1]
AP10 NOTEMIOE O 3.3 External device output enable
AP22 NOTEMILBA O 3.3 Flash device load burst address
AP21 NOTEMIBAA O 3.3 Flash burst address advanced
AK22 EMITREADYORWAIT I 3.3 External memory device target ready
indicator
AN10 EMIRDNOTWR O 3.3 External read/write access indicator.
Common to all devices
Volt
Pin Assignment I/O Description Comments
age
AP20 EMIDATA[0] I/O 3.3 External common data bus
AP19 EMIDATA[1]
AP18 EMIDATA[2]
AP17 EMIDATA[3]
AP15 EMIDATA[4]
AP14 EMIDATA[5]
AP13 EMIDATA[6]
AP12 EMIDATA[7]
AN20 EMIDATA[8]
AN19 EMIDATA[9]
AN18 EMIDATA[10]
AN17 EMIDATA[11]
AN15 EMIDATA[12]
AN14 EMIDATA[13
AN13 EMIDATA[14]
AN12 EMIDATA[15]
Confidential
Volt
Pin Assignment I/O Description Comments
age
AK20 EMIADDR[20] O 3.3 External common address bus 23-bit addressa
AL20 EMIADDR[21]
AK21 EMIADDR[22]
AL21 EMIADDR[23]
AN21 EMIFLASHCLK O 3.3 Flash clock
AN22 EMIDMAREQ[0] I 3.3 DMA request
AL22 EMIDMAREQ[1]
AM20 EMIBUSREQ I/O 3.3 Bus access request for master/
slave
AM21 EMIBUSGNT I/O 3.3 Bus access grant
configuration
Volt
Pin Assignment I/O Description Comments
age
U1 LMISYSCLK O 2.5 Clock to DDR
U2 NOTLMISYSCLK O 2.5 Inverted clock to DDR
L4 NOTLMISYSCS[0] O 2.5 Chip select
M5 NOTLMISYSCS[1]
K5 NOTLMISYSRAS O 2.5 Row address strobe
J4 NOTLMISYSCAS O 2.5 Column address strobe
J5 NOTLMISYSWE O 2.5 Write enable
M4 LMISYSADD[0] O 2.5 Address
N5 LMISYSADD[1]
N4 LMISYSADD[2]
P5 LMISYSADD[3]
U4 LMISYSADD[4]
V5 LMISYSADD[5]
V4 LMISYSADD[6]
Confidential
W5 LMISYSADD[7]
W4 LMISYSADD[8]
U5 LMISYSADD[9]
P4 LMISYSADD[10]
T5 LMISYSADD[11]
T4 LMISYSADD[12]
K4 LMISYSBKSEL[0] O 2.5 Bank select
L5 LMISYSBKSEL[1]
V1 LMISYSDATA[0] I/O 2.5 Bidirectional data bus
V2 LMISYSDATA[1]
W1 LMISYSDATA[2]
W2 LMISYSDATA[3]
Y1 LMISYSDATA[4]
Y2 LMISYSDATA[5]
AA1 LMISYSDATA[6]
AA2 LMISYSDATA[7]
E2 LMISYSDATA[8]
E1 LMISYSDATA[9]
F2 LMISYSDATA[10]
F1 LMISYSDATA[11]
G2 LMISYSDATA[12]
G1 LMISYSDATA[13]
H2 LMISYSDATA[14]
H1 LMISYSDATA[15]
AD1 LMISYSDATA[16]
AD2 LMISYSDATA[17]
Volt
Pin Assignment I/O Description Comments
age
AE1 LMISYSDATA[18] I/O 2.5 Bidirectional data bus
AE2 LMISYSDATA[19]
AF1 LMISYSDATA[20]
AF2 LMISYSDATA[21]
AG1 LMISYSDATA[22]
AG2 LMISYSDATA[23]
L2 LMISYSDATA[24]
L1 LMISYSDATA[25]
M2 LMISYSDATA[26]
M1 LMISYSDATA[27]
N2 LMISYSDATA[28]
N1 LMISYSDATA[29]
P2 LMISYSDATA[30]
P1 LMISYSDATA[31]
AB2 LMISYSDATAMASK[0] O 2.5 Data write mask
J1 LMISYSDATAMASK[1] O 2.5 Data write mask
Confidential
Volt
Pin Assignment I/O Description Comments
age
A13 LMIVIDCLK O 2.5 Clock to DDR
B13 NOTLMIVIDCLK O 2.5 Inverted clock to DDR
D11 NOTLMIVIDCS[0] O 2.5 Chip select
E11 NOTLMIVIDCS[1]
E14 NOTLMIVIDRAS O 2.5 Row address strobe
D15 NOTLMIVIDCAS O 2.5 Column address strobe
E15 NOTLMIVIDWE O 2.5 Write enable
E10 LMIVIDADD[0] O 2.5 Address
D10 LMIVIDADD[1]
E9 LMIVIDADD[2]
D9 LMIVIDADD[3]
D6 LMIVIDADD[4]
E6 LMIVIDADD[5]
D5 LMIVIDADD[6]
Confidential
E5 LMIVIDADD[7]
D4 LMIVIDADD[8]
E7 LMIVIDADD[9]
D8 LMIVIDADD[10]
E8 LMIVIDADD[11]
D7 LMIVIDADD[12]
D14 LMIVIDBKSEL[0] O 2.5 Bank select
E13 LMIVIDBKSEL[1]
A14 LMIVIDDATA[0] I/O 2.5 Bidirectional data bus
B14 LMIVIDDATA[1]
A15 LMIVIDDATA[2]
B15 LMIVIDDATA[3]
A16 LMIVIDDATA[4]
B16 LMIVIDDATA[5]
A17 LMIVIDDATA[6]
B17 LMIVIDDATA[7]
A1 LMIVIDDATA[8]
B2 LMIVIDDATA[9]
A2 LMIVIDDATA[10]
B3 LMIVIDDATA[11]
A3 LMIVIDDATA[12]
B4 LMIVIDDATA[13]
A4 LMIVIDDATA[14]
B5 LMIVIDDATA[15]
A20 LMIVIDDATA[16]
B20 LMIVIDDATA[17]
Volt
Pin Assignment I/O Description Comments
age
A21 LMIVIDDATA[18] I/O 2.5 Bidirectional data bus
B21 LMIVIDDATA[19]
A22 LMIVIDDATA[20]
B22 LMIVIDDATA[21]
A23 LMIVIDDATA[22]
B23 LMIVIDDATA[23]
A7 LMIVIDDATA[24]
B8 LMIVIDDATA[25]
A8 LMIVIDDATA[26]
B9 LMIVIDDATA[27]
A9 LMIVIDDATA[28]
B10 LMIVIDDATA[29]
A10 LMIVIDDATA[30]
A11 LMIVIDDATA[31]
B18 LMIVIDDATAMASK[0] O 2.5 Data write mask
B6 LMIVIDDATAMASK[1]
Confidential
A19 LMIVIDDATAMASK[2]
A6 LMIVIDDATAMASK[3]
A18 LMIVIDDATASTROBE[0] I/O 2.5 Write/read data strobe
A5 LMIVIDDATASTROBE[1]
B19 LMIVIDDATASTROBE[2]
B7 LMIVIDDATASTROBE[3]
C11 LMIVIDVREF I 2.5 SSTL reference voltage
D13 LMIVIDCLKEN O 2.5 Memory clock enable
B12 LMIVIDREF A - LMIVID ring compensation a
Volt
Pin Assignment I/O Description Comments
age
AN25 USBDP I/O 2.5 USB receive plus
AP25 USBDM I/O 2.5 USB receive minus
AM25 USBREF I 2.5 USB voltage reference a
Volt PIO
Pin Assignment I/O Description
age assignment
Y30 USB2_PRT_OVRCUR I 3.3 USB 2.0 interface PIO5[6]
Y31 USB2_PRT_PWR O 3.3 PIO5[7]
+5 V
Power switch
Input OUT1
STx7100
EN1 NOC1
USB_PWRCTRL EN2 OUT2
4.7 kΩ GND NOC2
+5 V
USB_OVERCURRENT
USB
VBUS
400 mV (High speed), 3.3 V (Low speed and full speed)
USBDM DM
400 mV (High speed), 3.3 V (Low speed and full speed)
USBDP DP
USBRREF GND
12 kΩ SHIELD
SHIELD
Shield
Volt
Pin Assignment I/O Description Comments
age
AN30 SATATXP O 2.5 SATA transmit plus
AP30 SATATXN O 2.5 SATA transmit minus
AN31 SATARXP I 2.5 SATA receive plus
AP31 SATARXN I 2.5 SATA receive minus
AM30 SATAREF I 2.5 SATA voltage reference a
● There must be a specific linear regulator for the SATA power supply (no DC/DC).
9.16 Peripherals
9.16.1 DAA
Table 36: DAA pins
Volt
Pin Assignment I/O Description Comments
age
AN5 DAA_C1A I/O 3.3 DAA differential dataa
AP5 DAA_C2A I/O 3.3 DAA differential datab
a. ISO-Link capacitors C1 and C2, (33 pF) should be as close to the line-side device as possible.
b. After satisfying the above, C1 and C2 should be as close to the embedded system-side DAA
module as possible and no further than 6 inches away.
R3 R11 R5
R1
R2 Q4 Q2
Si307x Q5 C10
C4 QE DCT2 R4
DCT IGND
STx7100 RX DCT3 R10 R6
R12 C1
IB QB
DAAC1A C1B QE2 Q3
DAAC2A C2B SC
VREG VREG2
R13 C2
RNG1 RNG2
R9 R14
C7
C6
C5
C3
R8
Ring
FB1 C9
D2
C8 RV1
D1 FB2
R7
Tip
Volt PIO
Pin Assignment I/O Description
age assignment
ASC 0
AH34 UART1_NOTOE O 3.3 ASC 0 PIO1[6]
ASC 1
AL34 UART1_TXD O 3.3 ASC 1 transmit signal PIO1[0]
AL33 UART1_RXD I 3.3 ASC 1 receive signal PIO1[1]
ASC 2
AD31 UART2_RXD I 3.3 ASC 2 receive signal PIO4[2]
AD34 UART2_TXD O 3.3 ASC 2 transmit signal PIO4[3]
AD33 UART2_CTS I 3.3 ASC 2 clear to send signal PIO4[4]
AC34 UART2_RTS O 3.3 ASC 2 request to send signal PIO4[5]
ASC 3
AB33 UART3_TXD O 3.3 ASC 3 transmit signal PIO5[0]
AA34 UART3_RXD I 3.3 ASC 3 receive signal PIO5[1]
AA33 UART3_CTS I 3.3 ASC 3 clear to send signal PIO5[2]
Confidential
Volt PIO
Pin Assignment I/O Description
age assignment
AD34 IRB_IR_IN I 3.3 IR data input PIO3[3]
AD33 IRB_UHF_IN I 3.3 UHF data input PIO3[4]
AC34 IRB_IR_DATAOUT O 3.3 IR data output PIO3[5]
AC33 IRB_IR_DATAOUT_OD O 3.3 PIO3[6]
Volt PIO
Pin Assignment I/O Description
age assignment
AH31 MAFE_HC1 O 3.3 Indicates a control/status exchange PIO2[3]
AG30 MAFE_DOUT O 3.3 Line for serially transmitting samples PIO2[4]
AG31 MAFE_DIN I 3.3 Line for serially receiving samples PIO2[5]
AE31 MAFE_FS I 3.3 Start of a sampling period latched on falling PIO2[6]
edges of SCLK
AE30 MAFE_SCLK I 3.3 Modem system clock PIO2[7]
Volt PIO
Pin Assignment I/O Description
age assignment
PWM 0
AC33 PWM_OUT0 O 3.3 PWM 0 PIO4[6]
AD33 PWM_COMPAREOUT0 O 3.3 PIO5[4]
Confidential
9.16.6 Smartcard
Table 41: Smartcard pins
Volt PIO
Pin Assignment I/O Description
age assignment
Smartcard 0
AM33 SC0_SETVCC O 3.3 Smartcard set voltage level PIO0[5]
AM32 SC0_DIR O 3.3 PIO0[6]
AL32 SC0_DETECT I 3.3 Smartcard detection PIO0[7]
AM32 SC0_DATAOUT O 3.3 Serial data output PIO0[0]
AN33 SC0_EXTCLKIN I 3.3 External clock PIO0[2]
AP33 SC0_DATAIN I 3.3 Serial data input PIO0[1]
AP34 SC0CG_CLK O 3.3 Clock for smartcard from system clock PIO0[3]
AP34 DSSMCD_CLK O 3.3 Clock for smartcard from smartcard FS PIO0[3]
Smartcard 1
AH34 SC1_DIR O 3.3 PIO1[6]
AK33 SC1CG_CLK O 3.3 Clock for smartcard from system clock PIO1[3]
AK33 DSSMCD_CLK O 3.3 Clock for smartcard from smartcard FS PIO1[3]
AK34 SC1_EXTCLKIN I 3.3 External clock PIO1[2]
Confidential
Volt PIO
Pin Assignment I/O Description
age assignment
SSC 0
AJ30 SSC0_SCL I/O 3.3 Serial clock PIO2[0]
AJ31 SSC0_MTSR I/O 3.3 Serial data for SSC 0: master transmit, PIO2[1]
slave receive
AH30 SSC0_MRST I/O 3.3 Serial data for SSC 0: master receive, slave PIO2[2]
transmit
SSC 1
AE32 SSC1_SCL I/O 3.3 Serial clock PIO3[0]
AE34 SSC1_MTSR I/O 3.3 Serial data for SSC 1: master transmit, PIO3[1]
slave receive
AE33 SSC1_MRST I/O 3.3 Serial data for SSC 1: master receive, slave PIO3[2]
transmit
SSC 2
AD32 SSC2_SCL I/O 3.3 Serial clock PIO4[0]
AD30 SSC2_MTSR I/O 3.3 Serial data for SSC 2: master transmit, PIO4[1]
slave receive
Volt PIO
Pin Assignment I/O Description
age assignment
Y33 DISEQC_RX_DATAIN I 3.3 DiSEqC interface input PIO5[4]
AA31 DISEQC_TX_DATAOUT O 3.3 DiSEqC interface output PIO5[5]
Confidential
The STx7100 has static configuration pins (called mode pins). These pins are shared with EMI
address pins and are only valid during the power-on-reset sequence.
External pull-up or pull-down resistors must be applied to setup the desired configuration.
The mode pins are strobe (captured) during the reset phase and are made available to the
system to define operating modes (clockgen startup configuration for example).
The captured values are then recorded in the system configuration register SYS_STA4. Table 44
shows the mapping of the mode pins.
MODE[1:0] EMIADDR[2:1] PLL0 startup configuration Clockgen A See Section 17.2.3: Startup
configuration on page 151
MODE[3:2] EMIADDR[4:3] PLL1 startup configuration
MODE[9:8] EMIADDR[10:9] EMI banks port size at boot EMI subsystem 11: 8 bits
10: 16 bits
Others: Reserved
Confidential
See also Section 17.2.3: Startup configuration on page 151, which shows default clock
frequencies.
11 Electrical specifications
12 Timing specifications
AUDDIGSTRBIN
tDTSSTR
AUDDIGDATAIN
tDTHSTR
tLRSSTR
AUDDIGLRCLKIN
Confidential
tLRHSTR
tPCMCLK
AUDPCMCLKOUT
tPCMSCLK
Outputs
tTVIDOUTCLK
VIDDIGOUTCLK
tHSSCLK
VIDDIGOUTHSYNC
VIDDIGOUTVSYNC
tYCSCLK
VIDDIGOUTYCn
tTSIN*BYTECLK
TSIN*BYTECLK
tTSSCLK
Inputs
tTSHCLK
tTSIN2BYTECLK
TSIN2BYTECLK
tTSBYTECLK
Outputs
tTAPCLK
TCK
tTAPHCLK
Inputs
tTAPSCLK
tPTAPCLK
TDO
Confidential
tEMI-clock
EMI-clock
Confidential
tECHEOV
EMI-outputs
tEIVECH
tECHEIX
EMI-inputs
tECHEOZ
EMI-tristate
outputs
tECHEON
These values are static offsets within a bus cycle, they should be read in conjunction with the
waveforms in External memory interface (EMI), which are cycle accurate only.
Actual Programmed
latch point latch point
EMIADDR
tAVSV tAVSV
EMISTROBE
tRDVSV tSVRDX
EMIDATA
EMIADDR
tAVSV tAVSV
EMISTROBE
tAVWDON tAVWDOZ
EMIDATA
tAVWDV
EMIDATA
Confidential
tSVRDX Read data hold time after strobe valid (read hold time) 0 ns c
tAVWDOZ Address valid to write data valid (before tristate output) -4.5 ns
tAVWDV Address valid to write data valid -2 2 ns
a. Skew plus nominal N programmed EMI subsystem clock cycles of strobe delay.
b. Skew from nominal programmed read latch point.
c. Minimum values are guaranteed by design.
d. Skew from nominal programmed phases of data drive delay.
tLCHLCH
NOTLMInCLK
LMInCLK
tLCHLCL tLCLLCH
tLCLLAV
LMInADD/LMInCONTROLS
tDQSHR tDQSLR
Confidential
tLCHDQSR tLCHDQSR
LMInDQSREAD
Inputs
tDQSRH tDQSRH
tDQSRS tDQSRS
LMInDATAREAD
LMInDQSWRITE
Outputs
LMInDATAWRITE
tPCHPOV
PIOOUT
tPCHWDZ
PIOOUT
Confidential
MAFE_SCLK
tMAFOV
Outputs
tMAFE_SCLK
MAFE_SCLK
tMAFHCLK
Outputs
tMAFSCLK
13.1 Description
There are two identical sets of video DACs for HD and SD output. Both are triple high-performance
10-bit digital to analog converters, and consist of three 10-bit DAC modules joined together. The full-
scale output for each DAC set is controlled by an external resistor.
Each DAC is able to drive 10 mA.
The blocks are powered by 2.5 V analog and 1.0 V digital supplies, with separate analog and digital
grounds.
The blocks require a external precision resistor (RREF) to provide a bandgap reference. The
optimum RREF value is 7.72 kΩ +/- 1%.
The blocks’ analog current sources provide an voltage output range of 1.4 V, with an optimum
linearity through an external precision resistor (RLOAD). The RLOAD optimum value is 140 Ω +/- 1%.
The exact calculation for the voltage output range is:
VOUT = 77.31 * (RREF/RLOAD)
with:
RREF = reference resistor; maximum value is 7.72 kΩ
RLOAD = load resistor
Confidential
128/935
To repeat for R, G and B outputs
5
VIDANAROUT0 DoNotFit L1
VIDANAGOUT0 1 2 3 + 75 R2 470nH L2
VIDANABOUT0 1 1 2 1 2
1
1
1
To HD connector
1
1
4 -
R3 C1 C2 R4 R5
TSH110
1
1
2
DoNotFit DoNotFit DoNotFit DoNotFit 140_1% C3 C4
2
2
2
2
2
68pF 68pF
2
2
680 R6 NegVid_5V
1 2 1 2 R7
680
2.2pF 1 2 C5
13 HD and SD triple video DACs
V_GND V_GND
STMicroelectronics Confidential
Figure 34: Output stage schematic
C C
Close to Vid_5V
C6 DONOTFIT
1 2
STb7100
TSH73
4
VIDANACOUT1 U2A
VIDANACVOUT1 2 1 5 +
VIDANAYOUT1 7 1 2
10UH L3 To SD connector
1
1
6 - 75
R8
280-1% 280-1%
11
1
Vid_5V
7801572A
R9 R10
1
1
C7 C8 0 R11
2
2
47pF 47pF 2 1
2
2
V_GND
C9 475-1% R12 475-1% R13
2 1 2 1 1 2
Output-stage adaptation and amplification
B B
DONOTFIT
V_GND
To repeat for C, CV and Y outputs
VIDANADUMPR0
VIDANADUMPG0
VIDANADUMPB0
VIDANADUMPY1
VIDANADUMPCV1
VIDANADUMPC1
5 4 3 2 1
STx7100
An example recommended video output stage with the external connections is shown in Figure 34.
STx7100 14 Audio DAC
14 Audio DAC
14.1 Description
The audio digital-to-analog converter (DAC) is a high performance stereo audio converter which
accepts a 24-bit serial data stream from the audio decoder and converts it into a current source
analog output signal. This signal is then filtered and transformed into a voltage output signal by
an external analog filter.
The data converter uses a sigma-delta architecture which includes a second order noise shaper.
The sigma delta modulator is followed by a 5-bit DAC to achieve at least 18-bit resolution.
This DAC can operate at sampling frequencies of 32, 44.1 and 48 kHz, or indeed any audio
frequency up to 48 kHz.
OUTP
SDIN
FIR1 FIR2 MUTE SINC NSH2 RND
OUTM
The input stream SDIN derived from the audio decoder, sampled at FS, is first interpolated by two
and then filtered by a 75th order FIR filter, FIR1. This signal, at 2FS, is interpolated by two and
filtered by a 20th order FIR filter, FIR2. The signal, at 4 FS, can be soft muted by the MUTE block,
and enters the SINC filter which interpolates by 32. The noise shaper then transforms this signal
to five bits. A randomizer then expands the data to a thermometer code and permutes the
sources to avoid mismatch between the 32 current sources.
The audio frequency synthesizer, within the clock generator, provides a system clock at 256 x FS
which is divided down internally to produce all other clocks.
The audio DAC group delay is 23 periods of the sampling frequency.
14.2.1 Reset
The audio DAC is reset by the chip global reset. The audio DAC can also be reset via the
configuration register bit ADAC_CFG.NRST.
At reset, the audio DAC is disabled.
SOFTMUTE
OUTM OUTP
Imax
Icom
Imin
100 Ω
1k
2 VRMS
3.3 nF
OUTPR
OUTPR IREF
Confidential
3.3 nF 575 Ω
1k GNDA
1uF
100 Ω
4.5 V VBG
100 Ω
1k 100 nF
5.1 k
3.3 nF
2.05 k
OUTML
OUTPL
3.3 nF
2 VRMS
1k
100 Ω
15.1 SATA
To meet SATA specifications, some rules must be followed when designing the PCB.
Recommendations include power supply quality requirements and routing requirements for
signal integrity.
The MDLL does not tolerate more than 50 mV of noise, specially below 10 MHz.
VDDE2V5
10 nf
x6
NFE31
GNDE
SATAVDDOSC2V5
10 nF 100 pF
SATAVSSOSC
VDD (1V0)
10 nf
x3
NFE31 GND
SATAVDDREF
10 nF 100 pF
NFE31
SATAVSSREF
SATAVDDR
10 nF 100 pF
Confidential
NFE31 SATAVSSR
SATAVDDT
10 nF 100 pF
NFE31
SATAVSST
SATAVDDA
10 nF 100 pF
NFE31 SATAVSSREF
SATAVDDDLL
10 nF 100 pF
NFE31 SATAVSSDLL
SATAVDDOSC
10 nF 100 pF
SATAVSSOSC
● When routing a differential pair, the complementary signals must be matched in length.
(<0.5 mm)
● No right angle allowed
● If a signal has to change layers, attention must be paid when adding a via about the return
current: use a stretching ground via.
● Both traces of a differential pair must have a 50 Ω impedance to ground, without any
impedance discontinuity from the chip to the SATA connector. This actually makes a
differential impedance of 100 Ω and a common mode impedance of 25 Ω.
● Vias act as strong impedance discontinuities: avoid them in the differential traces.
Figure 39 below describes a PCB stack, with differential signals. The differential pair is preferably
routed on the top layer. It is also possible but less recommended to route the differential signals
on the bottom layer.
150 µm
Layer 1 (top) Signal 1
Layer 2 GND layer 1.2 mm 1.6 mm
Layer 3 Power supplies
Layer 4 (bottom) Signal 2 150 µm
35 µm
The two traces of a differential pair must be loosely coupled, that is, their impedance to ground
must be controlled and equals to 50 Ω. The traces must be far enough from each other to ensure
a low direct coupling between themselves.
15.1.6.3 AC coupling
The SATA PHY works in AC coupled configuration.
The AC capacitance has to be put on RX on the connector side (capacitance value = 10 nF,
12 nF max in the SATA specification).
● Layer 4: Signal 2.
RT 100 Ω
STx7100
22 Ω DDR
VREF
0.5 x VDDQ
It is necessary to keep VREF isolated from induced noise as possible. VREF should be routed
over a reference plane, and preferably shielded. Layer 2 is preferable.
● the data bus and its associated strobes DQM and DQS,
● the address bus and associated control signals RAS, CAS and Write,
Each group requires specific attention described in details in the next paragraphs, but some
general layout rules apply:
● Maintain the ground layer as a reference plane for all memory signals, that is, do not allow
splits in the plane underneath both memory and STx7100 LMI.
● Series resistors should be placed as near to the close to the driver pin as possible. For the
data bus, resistors should be placed at mid point because of bidirect transmission.
● As much as possible all signals should be routed without any via between the STx7100 and
the memories. In all cases, minimize the usage of vias.
● All DDR traces should be as short as possible (not longer than 3 inches), and traces within
a group should have close length in order to reduce the skew between different lines.
● All signal traces except clocks are routed using 5/5 rules. (5 mils traces and 5 mils minimum
spacing between adjacent traces).
● Clocks are routed using 5 mils traces and 5 mils space to the 5 mils ground trace.
15.3 USB2.0
Other low-speed net DM1 DP1 DM2 DP2 Other high-speed net
Figure 43: Recommended trace spacings (mils) for the above stackups
3. Follow Figure 43 for spacing other high- and low-speed nets; see rules 17 and 18. This
diagram shows the trace geometry for a four-layer PCB. It can change with the number of
layers present in the PCB.
9. For the value of load cap, refer to the datasheet of crystal manufacturer. It should be a value
below 33 pF.
30 MHz crystal
SYSBCLKIN SYSBCLKOSC
STx7100
15.4.7 Other
27. External components quartz (24 or 30 MHz), 1.5 KΩ±1%, filters, decoupling capacitors
needed.
28. No other external components required (like suppressor capacitors of 50 µF) for ESD
protection of data lines. DN, DP pads have built in ESD protection.
29. Do not place any common mode chokes for controlling EMI. This would degrade the signal
quality and cause eye diagrams to fail.
where:
y = 50 for f ( ripple frequency in MHz ) >= 1
x = 50/sin(pi*f) for f ( ripple frequency in MHz ) < 1
According to this, a suitable filter has to be chosen.
Ferrite inductor 2200 pF Type NFM60R, 25 V, 6 A component from Murata must be used.
15.5.4 Power distribution scheme and on-board filtering of individual power supplies
Filters and decoupling capacitors must be used to limit the noise environment for each and every
power supply. Place all decoupling capacitors very close to the balls. RREF should also be placed
as close as possible to the ball of ASIC and connected to USBVSSC2V5.
34. The grounds of the decoupling capacitors are connected to their respective VSS. A value of
10 nF is recommended for decoupling capacitors.
2.5 V
L2
USBVDDBC2V5
10 nF
Confidential
USBVDDP2V5
10 nF
USBVSSP2V5
1.0 V
L3
USBVDDP
10 nF
USBVSSP
USBVDDBS
10 nF
USBVSSBS
USBREF
1.5 kΩ 1%
USBVSSC2V5
15.6 HDMI
When designing the HDMI interface, the signal traces should have the same length and must be
kept as much as possible on the same layer. No additional external components are required.
Part 3
System infrastructure
Confidential
16 Reset
16.1 Overview
The different reset sources are:
● The power-on reset signal applied to the NOTRESETIN pad
● The watchdog reset signal generated by the ST40 internal watchdog-timer (WDT)
● The UDI reset command received via the ST40 debug port
● The software reset applied to the ST231 CPUs via the SYS_CFG27 and SYS_CFG29
configuration registers.
A reset output pin WDOGRSTOUT is provided to control the reset of external devices. The
length of this reset signal can be controlled with the mode pin EMIADDR[14].
For information on registers connected with system start-up state, see Chapter 6: System
configuration registers on page 46. See also Chapter 21: Boot modes on page 193.
In this sequence, everything is reset including the clock generators and the values captured on
the mode pins during the reset phase.
stretcher RST
(20 µs) Antifuses
NOTRSTIN RSTOUT_FROM_ANTIFUSE
Stretcher
(10 µs) ST40
RST_TO_ST40
WDT
Stretcher ST40_RST_OUT
System reset (5 µs) Watchdog reset
section SYS_CFG27[0]
AND ST231
audio
ST231
Confidential
SYS_CFG9[28]
System
Stretcher configuration
(5 µs) registers
RST On-chip
peripherals
SYS_CFG9[27]
Stretcher
(T µs)
EMIADDR[14] mode pin RST
WDOGRSTOUT
17 Clocks
17.1 Overview
The STx7100 includes three clock generator (clockgen) subsystems:
● Clock generator A generates clocks for the CPUs, memories and STBus. It comprises two
PLLs (PLL0 and PLL1) and programmable dividers to generate the group A clocks.
● Clock generator B generates clocks for the video, displays, transport and peripherals. It
comprises two frequency synthesizers banks (FS0 and FS1), programmable dividers and a
clock recovery module.
● Clock generator C generates the audio clocks. It comprises three independent audio
frequency synthesizers (described in Chapter 59: Audio subsystem on page 726).
group C clocks.
The SYSBCLKINALT input provides an alternate reference clock for the group B and group C
clocks instead of using the oscillator clock inside the SATA Phy. The default state is to use the
30 MHz SATA clock, but the alternate reference clock can be selected via registers
CKGB_REF_CLK_SEL and AUD_FSYN_CFG. This input pin can be connected to the same
reference clock that is input on the SYSACLKIN pin. The SYSBCLKINALT input can range from
27 MHz to 30 MHz. The programming of the frequency synthesizers must take into account the
reference clock frequency.
The internal clocks can be observed or used as an auxiliary clock via the SYS_CLK_OUT pin,
which gives access to the clocks of clockgen A. The clocks from clockgen B can be observed via
an alternate PIO pad (PIO5 bit 2).
Clockgen
B
PWM
Internal
30 MHz clock
USB Osc
SATA 30 MHz
SYSBCLKOSC SYSBCLKIN
30 MHz crystal
(optional)
Clockgen
B
internal
30 MHz clock
USB Osc
SATA 30 MHz
SYSBCLKOSC SYSBCLKIN
30 MHz crystal
27 MHz
Div by 2 CLK_IC (200 MHz typ)
Typical
Clock name frequency Description
(MHz)
CLK_ST40 266 ST40 core clock
CLK_ST40_IC 133 ST40 bus clock
CLK_ST40_PER 66 ST40 peripheral clock
CLK_FDMA 266 FDMA processing clock
CLK_MPEG2 266 MPEG2 decoder clock
CLK_SYS_LMI_2X 400 2x DDR clock for SYS LMI interface
CLK_VID_LMI_2X 400 2x DDR clock for VID LMI interface
CLK_ST231_AUD 400 Audio decoder ST231 core clock
CLK_ST231_DELTA 400 MPEG4 decoder ST231 core clock
CLK_IC 200 High-speed interconnect clock
CLK_IC_DIV2 100 Low-speed interconnect clock
Confidential
MHz
EMI_
PLL0 PLL0
ADDR
mode state PLL0 CLK_ST40
[2:1] CLK_ST40 CLK_ST40_IC CLK_FDMA
output _PER
MHz
EMI_
PLL1 PLL1 CLK_SYS/VID_LMI_2X
ADDR CLK_IC_DIV2
mode state PLL1
[4:3] CLK_ST231_AUD CLK_IC
output CLK_EMI
CLK_ST231_DELTA
CKGA_CLK_OUT_SEL[3:0]
CLK_ST40 0
CLK_ST40_IC 1
CLK_ST40_PER 2
CLK_FDMA 3
CLK_MPEG 4
CLK_ST231_AUD 5
SYS_CLK_OUT
CLK_ST231_DELTA 6
CLK_SYS_LMI_2X 7
CLK_VID_LMI_2X 8
CLK_IC 9
CLK_IC_DIV2 10
CLK_EMI 11
● compositor,
In addition, clockgen B also generates some processing clocks for the following units:
● MPEG2 video decoder,
● comms,
● Delta pre-processor,
Clockgen B comprises two digitally-controlled frequency synthesizers (FS0 and FS1). The
reference clock can be either an internal 30 MHz clock signal or a clock connected to the
SYSBCLKINALT pin. The selection is done with the configuration register
CKGB_REF_CLK_SEL.
Clockgen B also includes a digital clock recovery module to recover the encoder clock.
Confidential
CLK_GDP2
Ref clock from (74.25 MHz max)
SYSBCLKINALT ref CLK_PP
ref
Rejection
Div by:
2,PLL
1024 CLK_DISP_ID
(13.5 MHz max)
30 MHz ref clock Rejection
Div by:
from SATA Phy
ref
1,PLL
1024 CLK_PIX_SD
(27 MHz max)
Freq.
synth 1 Rejection
Div by: CLK_PP
1,PLL
1024 CLK_IC_150
CLK_PIPE CLK_DVP
(SD) CLK_RTC
Rejection
Div by:
ref 1,PLL
1024 CLK_LPC
pixel clock
(46.875 KHz)
from DVP
Maximum
Clock name frequency Description
(MHz)
CLK_PIX_HD 148.5 HD pixel clock
CLK_PIX_SD 27 SD pixel clock
CLK_DISP_HD 74.25 HD display clock
CLK_DISP_ID 13.5 SD display clock
CLK_GDP2 74.25 GDP2 pixel clock (HD or SD)
CLK_656 54 DVO pixel clock
CLK_PIPE 150 Video pipeline processing clock
CLK_PP 150 Delta (H.264) pre-processor clock
CLK_IC_150 150 Interconnect clock 150 MHz
CLK_DAA 32.768 DAA clock
CLK_DSS 36.864 DSS clock
CLK_LPC Low power controller (LPC) clock
Confidential
The frequency of all clocks is programmable. The video clocks are particularly critical, since they
must be setup with respect to the display standard in use.
Table 69 gives some programming examples with respect to the targeted application.
SD progressive SD progressive
HD on main, HD on main, on main, on main,
SD on aux SD on aux SD interleaved SD interleaved SD
Clock signal on aux on aux interleaved
(GDP2 on (GDP2 on on main only
main) aux) (GDP2 on (GDP2 on
main) aux)
CLK_PIX_HD 148.5 148.5 108 108 108
CLK_DISP_HD 74.25 74.25 27 27 13.5
CLK_GDP2 74.25 13.5 27 13.5 13.5
CLK_PIX_SD 27 27 27 27 27 (from HD)
CLK_DISP_ID 13.5 13.5 13.5 13.5 Not used
CLK_656 Not used Not used 54 54 27
CLK_DISP_HDMI 74.25 74.25 27 27 13.5
CLK_TMDS_HDMI 74.25 74.25 27 27 27
CLK_BCH_HDMI 148.5 148.5 108 108 108
CLK_DLL_HDMI 148.5 148.5 108 108 108
Frequency
Clock name Description
(MHz)
CLK_PIX_HD 108 HD pixel clock
CLK_PIX_SD 27 SD pixel clock
CLK_DISP_HD 13.5 HD display clock
CLK_DISP_ID 13.5 SD display clock
CLK_GDP2 13.5 GDP2 pixel clock (HD or SD)
CLK_656 27 DVO pixel clock
CLK_PIPE 150 Video pipeline processing clock
CLK_PP 150 Delta (H.264) pre-processor clock
CLK_IC_150 150 Interconnect clock 150 MHz
CLK_DAA 32.768 DAA clock
CLK_DSS 36.864 DSS clock
CLK_LPC Low power controller clock
Confidential
15
2 ⋅ F PLL
F out = ---------------------------------------------------------------------------------------------------------------------------------------------
-
⎛ ⎛ md ⎞ ⎞ ⎛ 15 ⎛ md + 1⎞ ⎞
sdiv × pe ⋅ 1 + ------- – ( pe – 2 ) ⋅ 1 + -----------------
⎝ ⎝ 32 ⎠ ⎠ ⎝ ⎝ 32 ⎠ ⎠
with FPLL = 216 MHz if the reference clock is 27 MHz or FPLL = 240 MHz if the reference clock is
30 MHz.
The MD, PE and PRG_EN parameters can be changed without creating glitches at the frequency
synthesizer output. Changing other parameters may cause glitches.
Most group B clocks can be divided to reduce power consumption with the register
CKGB_CLK_DIV without stopping the clocks.
CKGB_CLK_OUT_SEL[3:0]
CLK_BCH_HDMI 0
CLK_TMDS_HDMI 1
CLK_PIX_HDMI 2
CLK_PIX_HD 3
CLK_DISP_HD 4
CLK_656 5
SYS_CLK_OUT
CLK_GDP2 6
CLK_DISP_ID 7
CLK_PIX_SD 8
CLK_DSS 9
CLK_DAA 10
CLK_PIPE 11
CLK_TTXT 12
CLK_LPC 13
CLK_DVP 14
Confidential
● a reference counter clocked by the SD video frequency synthesizer FS0. The maximum
value of this counter is programmable defining the time interval between two consecutive
resets. This counter is used as a time-base.
When the reference counter resets, the values of the free-running counter clocked by CLK_PCM
is captured into a readable register. This event generates an interrupt to the CPU (CRU_IRQ).
The CPU reads the value and compares it with the previously captured value. The difference
between two adjacent values gives an indication of the correction to apply to the PCM audio
frequency synthesizer FS2.
The decision to correct the frequency synthesizers setup is under the control of the software.
The same principle applies for the recovery of the CLK_PIX_HD. A free-running counter is
clocked from the HD video frequency synthesizer FS1. The same reference counter is used.
When this counter resets, then the output of the free-running counter clocked by CLK_PIX_HD is
captured into a readable register.
Block diagram
The clock recovery unit (CRU) block diagram is described in Figure 56.
SD Video DIN
CLK_PIX_SD IRQ
reference Zero
Frequency counter detect
synthesizer RST / LD
STBus interface
Command
register
FS2
RST LD
PCM Audio
CLK_PCM free-running PCM capture
PCM register
Frequency
counter
synthesizer
FS1
RST LD
HD Video CLK_PIX_HD free-running STBus
HD capture
HD register
Frequency counter
synthesizer
18 Clock registers
18.1 Summary
Register addresses are provided as:
ClkABaseAddress + offset or ClkBBaseAddress + offset.
The ClkABaseAddress is:
0x1921 3000
The ClkBBaseAddress is:
0x1900 0000.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved LCK
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MD
Description: Reports the status of the mode pins captured during the power-on-reset.
[31:4] Reserved
[3:2] MD[3:2]: PLL1 startup configuration
[1:0] MD[1:0]: PLL0 startup configuration
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PLL0_BYPASS
PLL0_PDIV
PLL0_EN
Reserved PLL0_NDIV PLL0_MDIV
PLL0 PLL0
MD[1:0] bit 21 Description
bypass enable
00 0 0 1 PLL0_CLKOUT selected - PLL0 on
01 0 0 1 PLL0_CLKOUT selected - PLL0 on
10 0 1 0 SYSA_CLK_IN selected - PLL0 off
11 0 0 1 PLL0_CLKOUT selected - PLL0 on
2 × N × F sysaclkin
F PLL0 = ----------------------------------------------
-
P
M× 2
with:
N in the interval [3, 255],
M in the interval [1, 255],
P in the interval [1, 32].
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LCK
Reserved
0: PLL0 is unlocked
1: PLL0 is locked
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RATIO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RATIO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
Reserved RATIO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RATIO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PLL1_MDIV
PLL1_NDIV
PLL1_PDIV
PLL1_EN
Reserved
The reset values of PLL1_CFG fields depends on MD[2:0] as described in Table 75.
Confidential
2 × N × F sysaclkin
F PLL1 = ----------------------------------------------
-
M× P
with:
N in the interval [3, 255],
M in the interval [1, 255],
P in the interval [1, 32].
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LCK
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLK_ST231_DELTA_DIV
CLK_ST231_AUD_DIV
CLK_SYS_LMI2X_DIV
CLK_VID_LMI2X_DIV
Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLK_ST231_DELTA_EN
CLK_ST231_AUD_EN
CLK_LMI2X_SYS_EN
CLK_LMI2X_VID_EN
CLK_ST40_IC_EN
CLK_ST40_EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CLKOUT_SEL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FDMA_CLK_SRC
PLL1_BYPASS
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REF_MAX
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved INT LD
Description: Holds the load command that can be applied to the clock recovery unit.
When the load command is set to ‘1’ the reference counter is loaded with REF_MAX,
PCM and HD counters are reset to zero.
When the load command is reset to ‘0’, this starts the count.
This register also holds the interrupt status. When written to, the interrupt is cleared.
The counters and interrupt generation can be stopped by setting LD to ‘1’ after a clear
interrupt has occurred.
[31:2] Reserved
[1] INT
Read: get the interrupt status
1: interrupt has occurred and the counters can be read
0: no interrupt
Write:
1: clear the current interrupt
0: allows the next interrupt to occur
[0] LD
0: start the counters
1: reset the counters and load the REF_MAX value
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CPT_PCM
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CPT_HD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved LCK
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS0_SELBW
FS0_NPDA
FS0_NRST
FS0_NDIV
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_MD1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_PE1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS0_PRG_EN1
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_SDIV1
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_MD2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_PE2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS0_PRG_EN2
Reserved
Reset: 0x01
Description: Defines the PRG_EN parameter (programming enable) for the frequency synthesizer
FS0 channel 2. This parameter must be set to 1 to take into account a new
configuration.
0: PE2 and MD2 parameters are ignored
1: PE2 and MD2 parameters are taken into account
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_SDIV2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_MD3
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_PE3
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS0_PRG_EN3
Reserved
Reset: 0x01
Description: Defines the PRG_EN parameter (programming enable) for the frequency synthesizer
FS0 channel 3. This parameter must be set to 1 to take into account a new
configuration.
0: PE3 and MD3 parameters are ignored
1: PE3 and MD3 parameters are taken into account
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_SDIV3
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS0_SEL_CLK_OUT
FS0_NSB
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS1_SELBW
FS1_NPDA
FS1_NRST
FS1_NDIV
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_MD1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS0_PE1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS1_PRG_EN1
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_SDIV1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_MD2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_PE2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS1_PRG_EN2
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_SDIV2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_MD3
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_PE3
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS1_PRG_EN3
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_SDIV3
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_MD4
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_PE4
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FS1_PRG_EN3
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_SDIV4
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FS1_NSB
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLK_DISP_HD_SEL
CLK_DISP_ID_SEL
CLK_PIX_SD_SEL
CLK_TMDS_HDMI
CLK_PIX_HDMI
CLK_656_SEL
Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLK_PIX_SD_SRC
CLK_GDP2_SRC
CLK_DVP_SRC
CLK_DVP_CPT
Reserved
[1] CLK_PIX_SD_SRC
0: CLK_PIX_SD sourced from FS0
1: CLK_PIX_SD sourced from FS1
[0] CLK_GDP2_SRC
0: CLK_GDP2 sourced from FS0
1: CLK_GDP2 sourced from FS1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLK_TMDS_HDMI_DIV
CLK_BCH_HDMI_DIV
CLK_PIX_HDMI_DIV
CLK_DISP_HD_DIV
CLK_DISP_ID_DIV
CLK_PIX_HD_DIV
CLK_PIX_SD_DIV
CLK_PIPE_DIV
CLK_LPC_DIV
CLK_656_DIV
Reserved
[7] CLK_PIX_SD_DIV
[6] CLK_DISP_ID_DIV
[5] CLK_656_DIV
[4] CLK_DISP_HD_DIV
[3] CLK_PIX_HD_DIV
[2] CLK_PIX_HDMI_DIV
[1] CLK_TMDS_HDMI_DIV
[0] CLK_BCH_HDMI_DIV
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLK_TMDS_HDMI_EN
CLK_BCH_HDMI_EN
CLK_PIX_HDMI_EN
CLK_DISP_HD_EN
CLK_DISP_ID_EN
CLK_PIX_HD_EN
CLK_PIX_SD_EN
CLK_GDP2_EN
CLK_TTXT_EN
CLK_PIPE_EN
CLK_DSS_EN
CLK_DAA_EN
CLK_LPC_EN
CLK_656_EN
Reserved
[11] CLK_PIPE_EN
[10] CLK_PIX_HDMI_EN
[9] CLK_PIX_SD_EN
[8] CLK_DISP_ID_EN
[7] CLK_GDP2_EN
[6] CLK_656_EN
[5] CLK_TMDS_HDMI_EN
[4] CLK_DISP_HD_EN
[3] CLK_PIX_HD_EN
[2] CLK_BCH_HDMI_EN
[1] CLK_DSS_EN
[0] CLK_DAA_EN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CLKOUT_SEL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REFCLK_SEL
Reserved
19 Low-power modes
19.1 Overview
Power saving can be achieved by halting the ST40 CPU and stopping or reducing the clock
frequencies. The ST231 CPU clocks can either be stopped or kept running at a low frequency. In
addition, a number of functional blocks can be disabled.
Reducing the clocks’ frequency dramatically reduces the power consumption, and still enables
the execution of some software.
When the ST40 is in one of the low-power modes (“sleep” or “standby”), it can be woken up
either by a reset, an NMI interrupt, an ST40 peripheral interrupt or an external interrupt.
Before entering the low-power modes, the DDRs can be set in self-refresh mode via a special
sequence of the memory controller.
The code to be executed by the CPU when it is awoken must reside in EMI if the DDRs are in
self-refresh mode. In that case, the EMI clock must be kept running at a low frequency.
The different functional units involved in the low-power feature are:
● the ST40, which can be halted by executing the SLEEP instruction,
● the clock generators A, B and C, which can be configured by software to generate low-
frequency clocks. They can also automatically enter the low-power mode when they detect
an event from the low-power controller (LPC) and automatically exit from low-power mode
Confidential
when a wake-up interrupt is detected by the ILC. In low-power mode, the clocks are
automatically divided by 1024. The unnecessary clocks can be stopped by configuration
registers,
● the IRB/UHF Rx processor, which can detect an activity on the IRB/UHF inputs (PIO3[3]
and PIO3[4]) and can generate a wake-up interrupt to the ST40 and exit the clock
generators from their low-power mode,
● the ILC, which must be configured to map the ST40 interrupts IRL(3-0) to 4 of the following
external interrupts: SYSITRQ(3-0), UHF_WAKEUP (PIO3[4]), IRDA_WAKEUP (PIO3[3]).
These signals are connected to the ILC (EXT_INT[5-0] input pins in Figure 57 below) and
can be used as a wake-up interrupt for the ST40 (see Table 78 below).
● the low-power controller (LPC), which includes a 40-bit low-power alarm counter (LPA). The
LPC is used to put the clock generators in low-power mode. The LPA timer is used to exit
from low-power after a user-defined delay. The LPA timer is clocked by the CLK_LPC clock
defined in clock generator B.
The ILC wake-up interrupt sources are described in Table 78 below.
ILC external
Interrupt
interrupt Description
source
input
EXT_INT(0) SYSITRQ(0) External interrupt input
EXT_INT(1) SYSITRQ(1) External interrupt input
EXT_INT(2) SYSITRQ(2) External interrupt input
EXT_INT(3) SYSITRQ(3) External interrupt input
EXT_INT(4) IRB wake-up Wake-up interrupt from the IRB Rx
EXT_INT(5) NMI Non-maskable interrupt
IRL[3:0]
NMI
NMI ST40
Internal
interrupt INTC
sources ST40 clocks
ST231
video clocks NMI
Clockgen B
STBus
low power
mode
LPC low-power wake-up
LPA
ILC
ILC_IRB_WAKEUP
UHF data 5 ILC_EXT_OUT[7:4]
Confidential
output
enable SYS_CFG10[3:0]
● standby.
When it is in sleep mode, the ST40 is halted, its registers are held, but the ST40 peripherals
continue to operate.
When it is in standby mode, the ST40 is halted, its registers are held, but the ST40 peripherals
are stopped.
● FDMA clock,
Before entering a low-power mode, these clocks can be redefined with a lower frequency or
stopped.
To exit from low-power mode, the clock generator configuration registers must be reprogrammed.
Confidential
Programming the minimum frequency for the ST40, EMI and interconnect clocks
To minimize power consumption, the ST40, interconnect and EMI clocks can be programmed to
their smallest value.
This value is obtained when clockgen A PLL0 and PLL1 are set up for 6.25 MHz (MDIV=27,
NDIV=100, PDIV=32). Hence, the ST40 clocks become 3.125 MHz, 1.5625 MHz and 781 kHz.
The interconnect clocks become 3.125 MHz and 1.5625 MHz and the EMI clock becomes
781 kHz.
After exiting a low-power mode, the nominal clock frequencies are restored. The clocks that were
stopped can be restarted.
If the DDRs are in self-refresh mode then a software reset to the DDR padlogic and memory
controller must be applied.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LPA_TMR[31:0]
Type: R/W
Reset: 0
Description: Defines the four least significant bytes of the low power alarm counter.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved LPA_TMR[39:32]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
START
Reserved
21 Boot modes
The boot system is closely connected with reset; see Chapter 16: Reset on page 144.
The STx7100 has three boot modes, controllable by two external pins: BOOTMODE[1:0]. These
pins are strobed at the end of the reset period (power-on or watch-dog resets). The boot code
must be stored in flash memory attached to the EMI bus.
● ST40 mode (Default): This is the standard mode, in which the ST40 boots first from EMI.
The Delta and audio ST231 boot requests are both halted by the interconnect. It is up to the
ST40 software to control the boot sequence of the two ST231. The boot address of the
ST231s must be defined in the system configuration registers before the boot request is
released by the ST40.
● Delta (H.264) ST231 mode: The ST40 boot request is halted by the interconnect, but the
boot request from the Delta ST231 is released, allowing the Delta ST231 to boot from EMI.
In this mode, the Delta ST231 uses the default boot address (0x0 0000). This mode may be
useful for low-level software debugging; in this mode, the ST40 is not expected to boot.
● Audio ST231 mode: The ST40 boot request is halted by the interconnect, but the boot
request from the audio ST231 is released, allowing the audio ST231 to boot from EMI. In
this mode, the audio ST231 uses the default boot address (0x0 0000). This mode may be
useful for low-level software debugging; in this mode the ST40 is not expected to boot.
For security purpose, an antifuse can be set to disable the Delta and audio ST231 modes.
Confidential
00 Default: ST40 boots first. Delta and audio ST231 boot sequences are controlled by the ST40.
01 Delta ST231: ST40 boot is halted. Delta ST231 boots first and controls the ST40 and audio
ST231 boot sequences.
10 Audio ST231: ST40 boot is halted. Audio ST231 boots first and controls the ST40 and Delta
ST231 boot sequences.
BOOTMODE
BOOT_CTRL_CFG
register
ST40
REQ Request REQ
filter
global
reset
LMI
Delta
RST
RST_CFG
register
A ST231
Interconnect
REQ REQ
Delta Delta Request
filter
BOOT_ADDR_CFG
register
global
reset
Audio EMI
RST
RST_CFG A
register ST231
Audio audio REQ REQ
Request
BOOT_ADDR_CFG filter
register
Confidential
22 Interrupt system
The STx7100 has two interrupt networks. One is associated with the ST40 CPU and the other is
associated with the Delta (H.264) ST231 CPU when it used as an application processor. The
interrupt lines are routed to both the ST40 and the Delta ST231. For both processors, it is up to
software to handle the interrupts.
External Interrupts
● NMI (Non-Maskable Interrupt): External interrupt source.
Figure 59 shows the ST40 interrupt network, and Table 82: ST40 on-chip peripheral interrupts
on page 200 lists the internal interrupts with their INTEVT code.
ST40
ST40 IRQ
CPU core
ST40-P130
INTC
16 groups
of 4 interrupts
on-chip
peripherals
The ILC can map any of the synchronous internal interrupts and asynchronous interrupts onto a
group of 8 internal interrupts ILC_EXT_OUT(7-0).
The interrupts ILC_EXT_OUT(3-0) can be used as external interrupt outputs through the
SYSITRQ(3-0) pins.
The interrupts ILC_EXT_OUT(7-4) are routed to the ST40 interrupts IRL(3-0).
The ILC mapping is described in Table 85: ILC interrupt mapping on page 205.
Wake up by Interrupt
The ILC has also an interrupt output dedicated to the wake-up process that is used by the low
power controller. A pulse stretcher receives a transition from the UHF and IR input pins and
generates an interrupt that can be routed through the ILC to one of the ILC_EXT_OUT(7-4)
interrupt lines and used as a wake-up interrupt to the ST40 (for details, see Chapter 19: Low-
power modes on page 188).
IRL[3:0]
NMI
NMI
INTC ST40
Internal
interrupt
sources INTC2
(63-0)
to
Mailbox 1
Confidential
ST231 audio
Mailbox 0
ST231
IRQ
(63-3) Delta (H.264)
NMI
LPC
Internal
interrupts (63-0) ILC wakeup interrupt
UHF data IRB INT to LPC
wakeup IRB WAKEUP INT
IR data
NMI ILC ILC_EXT_OUT[7:4]
EXT_INT(3 - 0) EXT
ILC_EXT_OUT[3:0]
SYSITRQ(3:0)
output
enable SYS_CFG10[3:0]
23 Interrupt map
● INTC2
● STx7100 ILC.
INTREQ/
INTEVT IPR (Bit
Group Interrupt source INTMSK
code Numbers)
(bit number)
- Reserved 0xA00 INTPRI00[3:0] INTREQ00[0]
0xA20 INTPRI00[7:4] INTREQ00[1]
0xA40 INTREQ00[2]
0xA60 INTREQ00[3]
0xA80 INTREQ00[4]
0xB00 INTPRI00[11:8] INTREQ00[5]
0xB20 INTREQ00[6]
0xB40 INTREQ00[7]
0xB60 INTREQ00[8]
0xB80 INTREQ00[9]
0xBA0 INTREQ00[10]
0xBC0 INTREQ00[11]
- COMMs/PIO PIO0_INT 0xC00 INTPRI00[15:12] INTREQ00[12]
PIO1_INT 0xC80 INTPRI00[19:16] INTREQ00[13]
PIO2_INT 0xD00 INTPRI00[23:20] INTREQ00[14]
Confidential
INTREQ/
INTEVT IPR (Bit
Group Interrupt source INTMSK
code Numbers)
(bit number)
6 CLOCKGEN Reserved 0x1360 INTPRI04[27:24] -
DCXO_INT 0x1340 INTREQ04[26]
MAILBOXes ST231_AUD_INT 0x1320 INTREQ04[25]
ST231_DELTA_INT 0x1300 INTREQ04[24]
7 AUDIO CPXM_INT 0x13E0 INTPRI04[31:28] INTREQ04[31]
I2S2SPDIF_INT 0x13C0 INTREQ04[30]
FDMA FDMA_GP0_INT 0x13A0 INTREQ04[29]
FDMA_MBOX_INT 0x1380 INTREQ04[28]
8 AUDIO SPDIFPLYR_INT 0x1460 INTPRI08[3:0] INTREQ08[3]
PCMRDR_INT 0x1440 INTREQ08[2]
PCMPLYR1_INT 0x1420 INTREQ08[1]
PCMPLYR0_INT 0x1400 INTREQ08[0]
9 VIDEO DELTA_MBE_INT 0x14E0 INTPRI08[7:4] INTREQ08[7]
DELTA_PRE1_INT 0x14C0 INTREQ08[6]
DELTA_PRE0_INT 0x14A0 INTREQ08[5]
Confidential
1 INTxxx04[3:0]
2 INTxxx04[7:4]
3 INTxxx04[11:8]
4 INTxxx04[15:12]
5 INTxxx04[19:16]
6 INTxxx04[23:20]
7 INTxxx04[27:24]
Confidential
8 INTxxx04[31:28]
9 INTxxx08[3:0]
10 INTxxx08[7:4]
11 INTxxx08[11:8]
12 INTxxx08[15:12]
13 INTxxx08[19:16]
14 INTxxx08[23:20]
15 INTxxx08[27:24]
16 INTxxx08[31:28]
UART1_INT 15
UART2_INT 16
UART3_INT 17
COMMs/MAFE MAFE_INT 18
COMMs/PWM PWM_INT 19
COMMs/IRB IRB_INT 20
IRB_WAKEUP_INT 21
COMMs/TTXT TTXT_INT 22
COMMS/DAA DAA_INT 23
COMMS/DISEQc DISEQC_INT 24
TSMERGER SBATM_INT 25
Reserved 26
TSMRGR_RAMOVF_INT 27
(version 2)
CLOCKGEN DCXO_INT 28
MAILBOX ST40_DELTA_INT 29
Reserved 30
AUDIO CPXM_INT 31
I2S2SPDIF_INT 32
FDMA FDMA_GP0_INT 33
FDMA_MBOX_INT 34
AUDIO SPDIFPLYR_INT 35
PCMRDR_INT 36
PCMPLYR1_INT 37
PCMPLYR0_INT 38
VIDEO GLH_INT 39
OHCI_INT 57
PADS NMI_INT 58
Reserved 59
External interrupts EXT_INT[0] 60
EXT_INT[1] 61
EXT_INT[2] 62
EXT_INT[3] 63
COMMs/PWM PWM_INT 15
COMMs/IRB IRB_INT 16
COMMs/TTXT TTXT_INT 17
COMMS/DAA DAA_INT 18
COMMS/DISEQc DISEQC_INT 19
INTERCO/Sbag SBATM_INT 20
Clockgen DCXO_INT 21
Reserved 22
Mailbox ST40_DELPHI_INT 23
DELPHI_ST40_INT 24
ST40_AUDIO_INT 25
AUDIO_ST40_INT 26
Audio CPXM_INT 27
I2S2SPDIF_INT 28
FDMA FDMA_GP0_INT 29
FDMA_MBOX_INT 30
Audio SPDIFPLYR_INT 31
PCMRDR_INT 32
PCMPLYR1_INT 33
PCMPLYR0_INT 34
Video GLH_INT 35
VTGs VTG2_INT 36
VTG1_INT 37
Display/LMU LMU_INT 38
Reserved 39
57
58
59
TSMGR_RAMOVF (cut 2) 60
- Reserved 61
62
63
External EXT_INT[0] 0
Interrupts from external devices EXT_INT[1] 1
EXT_INT[2] 2
EXT_INT[3] 3
From pins via pulse stretcher IRB_WAKEUP_INT 4
NMI pin NMI_INT 5
- Reserved 6
Low power alarm LPA_INT (cut 2) 7
24 Interrupt registers
0x08C Reserved
0x080
ILC_STA Status
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
0x20C Reserved
0x200
0x28C Reserved
0x280
ILC_EN Enable
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x40C Reserved
0x404
0x400
0x48C Reserved
0x480
0x50C Reserved
Confidential
0x500
EXT5
EXT4
EXT3
EXT2
EXT1
EXT0
Reserved
RSVD
EXT7
EXT5
EXT4
EXT3
EXT2
EXT1
EXT0
Reserved
ILC_PRIORITYn Priority
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PRIORITY
Reset: 0
Description: The PRIORITYn register does the mapping of the ILC internal interrupt input n to one of
the output interrupts ILC_EXT_OUT[7-0] connected to the ST40 or SYSITRQ[3-0]. The
assignment is done by writing appropriate word into the priority register.
In the STx7100, the valid values are between 0x8000 and 0X8007.
Values between 0x8000 and 0x8003 correspond to ILC_EXT_OUT[3-0], connected to
pins SYSITRQ[3-0].
Values between 0x8004 and 0x8007 correspond to ILC_EXT_OUT[7-4], connected to
ST40 interrupts IRL[3-0].
Example:
To map internal interrupt 10 onto SYSITRQ0, 0x8000 must be written into
ILC_PRIORITY10.
ILC_EXT_PRIORITYn Priority
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PRIORITY
ILC_MODEn Mode
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MODE2
MODE1
MODE0
Reserved
The mode register is set to 0x00 on reset. The address of mode register corresponding
to interrupt number n is at 0x800 + (n x 0x008) + 0x004.
There are 48 bits of programmable I/O configured in six ports. Each bit is programmable as
output or input. The output can be configured as a totem-pole or open-drain driver. The input
compare logic can generate an interrupt on any change of any input bit. Many programmable I/O
have alternate functions and can be connected to an internal peripheral signal such as a UART
or SSC.
The PIO ports can be controlled by registers, mapped into the device address space. The
registers for each port are grouped in a 4 Kbyte block, with the base of the block for port n at the
address PIOnBaseAddress. At reset, all of the registers are reset to zero and all PIO pads put in
input mode with internal pull-up.
Each 8-bit PIO port has a set of eight-bit registers. Each of the eight bits of each register refers
to the corresponding pin in the corresponding port. These registers hold:
● the output data for the port (PIO_PnOUT),
Each of the registers, except PIO_PnIN, is mapped on to two additional addresses so that bits
can be set or cleared individually.
Confidential
● The PIO_SET_x registers set bits individually. Writing 1 in these registers sets a
corresponding bit in the associated register x; 0 leaves the bit unchanged.
● The PIO_CLR_x registers clear bits individually. Writing 1 in these registers resets a
corresponding bit in the associated register x; 0 leaves the bit unchanged.
Each 8-bit PIO port has a set of eight-bit registers. Each of the eight bits of each register refers
to the corresponding pin in the corresponding port.
Register addresses are provided as PIOnBaseAddress + offset.
The PIO0BaseAddresses are:
PIO0: 0x1802 0000,
PIO1: 0x1802 1000,
PIO2: 0x1802 2000,
PIO3: 0x1802 3000,
PIO4: 0x1802 4000,
PIO5: 0x1802 5000.
7 6 5 4 3 2 1 0
0x28 CLR_PC0[7:0]
0x38 CLR_PC1[7:0]
0x48 CLR_PC2[7:0]
7 6 5 4 3 2 1 0
CLR_PCOMP[7:0]
7 6 5 4 3 2 1 0
CLR_PMASK[7:0]
7 6 5 4 3 2 1 0
CLR_POUT[7:0]
7 6 5 4 3 2 1 0
0x20 CONFIGDATA0[7:0]
0x30 CONFIGDATA1[7:0]
0x40 CONFIGDATA2[7:0]
7 6 5 4 3 2 1 0
PCOMP[7:0]
7 6 5 4 3 2 1 0
PIN[7:0]
7 6 5 4 3 2 1 0
PMASK[7:0]
7 6 5 4 3 2 1 0
POUT[7:0]
7 6 5 4 3 2 1 0
0x24 SET_PC0[7:0]
0x34 SET_PC1[7:0]
0x44 SET_PC2[7:0]
0x44 (PIO_SET_PnC2)
Type: WO
Description: PIO_SET_PnC[2:0] allow the bits of registers PIO_PnC[2:0] to be set individually.
Writing 1 in one of these registers sets the corresponding bit in the corresponding
PIO_PnC[2:0] register, while 0 leaves the bit unchanged.
7 6 5 4 3 2 1 0
SET_PCOMP[7:0]
7 6 5 4 3 2 1 0
SET_PMASK[7:0]
7 6 5 4 3 2 1 0
SET_POUT[7:0]
27 Mailboxes
The main data transfer between the STx7100 memory and processors is through the STBus.
However, software controls the processing of these data structures, fills and empties buffers via
various DMAs. These transfers and processing require signaling after completion to indicate
events or that a structure is available.
There are two mailboxes, which coordinate communication between the ST40 and two ST231
processors using the STBus. They allow interrupts to be raised by any processor in software to
provide the necessary signalling.
● Mailbox 0 links the ST40 and the Delta (H.264) ST231.
The CPUs can read and write to the mailbox configuration registers with standard memory
accesses.
IRQ_... 62
IRQ_ST40 IRQ_ST40
Mailbox 0 INTC2 Mailbox 1
Confidential
IRQ
IRQ_DELTA IRQ_AUDIO
ST40
Host
ST231 ST231
Delta audio
STBus
Each processor runs on its own clock, and may be running more than one software process.
Information is exchanged by writing into a common area (accessible to both linked processors)
and generating a hardware interrupt. For example: if the ST40 writes information into the
mailbox 0 common area, an interrupt is generated for the Delta ST231, and vice-versa.
On receiving an interrupt, the interrupt service routine (ISR) infers the destination process for
which the information is to be routed by reading the mailbox interrupt status registers. The ISR
then routes the information to the destination process. The interrupt is then cleared by executing
a clear-bit operation.
The interrupt sources can be enabled or disabled by setting or resetting the contents of the
corresponding interrupt enable register.
Set-bit operation
Any bit in the status registers can be set by performing the set-bit operation at location
MBXn_(ST40/ST231)_INT_STAn_SET. This operation is as follows.
Confidential
To set one or more bits of the register, a value with the corresponding bits set to 1 is written.
All other bits should be set to 0.
For example: to set bits 0 and 4, the register is written with the value 0x0000 0011. The bit
locations corresponding to bit 0 and bit 4 of the register are set, leaving the other bit
locations unaltered.
If any of the other bits are already set to 1, the same state is maintained. For example, if
bit 6 is already set to 1, the bit location 6 continues to hold logic 1 even after the above write
operation.
Clear-bit operation
Any bit in the registers can be cleared by performing the clear-bit operation at location
MBXn_(ST40/ST231)_INT_STAn_CLR. This operation is as follows.
To clear one or more bits of the register, a value with the corresponding bits set to 1 is
written. All other bits should be set to 0.
For example: to clear bits 0 and 4, the value 0x0000 0011 is written to the register. This
clears only bits 0 and 4. The status of other bits is not affected.
28 Mailbox registers
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID_VER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_STA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_STA_SET
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_STA_CLR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_EN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_EN_SET
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_CLR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_STA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_STA_SET
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_STA_CLR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_EN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_EN_SET
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INT_EN_CLR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MBX_LCK
Part 4
Memory
Confidential
29.1 Introduction
The local memory interface (LMI) consists of dual blocks providing an interface for both system
(SYS) and video (VID) main-memory subsystems.
See also Chapter 5: Memory map on page 37 for tables showing LMI arrangement within the
STx7100 as a whole.
The LMI’s two blocks are shown in Figure 62. They are clocked by the 400 MHz CLK_LMI_SYS/
VID_2X signals, which are divided by internal DLLs to provide 200 MHz clocks (CLK_LMI_SYS/
VID) for the SDRAM controllers.
High-priority port
LMI
SDRAM DDR
PADs
padlogic SDRAM
controller
Low-priority port
Confidential
DLLs
SYS
High-priority port
DLLs
DDR
SDRAM
PADs
LMI SDRAM
controller
Low-priority port padlogic
VID
STBus
Main-memory organization
● The array is organized as rows.
● Each row consists of one or more discrete devices or DIMM (single or double sided)
modules arranged in sockets on a PCB.
● Memory modules supported: 2 rows of discrete SDRAM, single and double density DIMMs.
SDRAM devices on the same row must be the same kind (for example, 4 M x 16, 2-bank).
Note: The term row is used in two ways: an SDRAM device’s internal row address and main memory
subsystem’s row array. In this chapter, row indicates subsystem’s row, while (internal) row means
SDRAM’s row address.
The upper boundary address of each row is defined in LMI_SDRA[0:1].UBA. The request
address [31:21] is compared to UBA[31:21] to determine which NOTLMICS (chip selection)
signal is to be asserted. A NOTLMICS signal is applied to all SDRAM devices on the same row.
Memory locations in these two rows must be contiguous in physical address space.
LMI_SDRA1.UBA must be larger or equal to LMI_SDRA0.UBA. If the system consists of only
one row (or DIMM), then it needs to be placed in the area corresponding to NOTLMICS0 and
LMI_SDRA0.UBA must be programmed = LMI_SDRA1.UBA. NOTLMICS0 is asserted if the
STBus request access to the LMI data block and the request address [31:21] is less than
LMI_SDRA0.UBA (exclusive).
LMI_SDRA0.UBA has priority over LMI_SDRA1.UBA if they are equal. If the physical address is
less than LMI_SDRA0.UBA, notLMICS0 is asserted. If it is not less than LMI_SDRA0.UBA but is
less than LMI_SDRA1.UBA, notLMICS1 is asserted. Other cases are errors and are recorded in
LMI_VCR’s error flag.
Figure 63 depicts a 32-bit wide, 32 Mbyte main memory subsystem. It is assumed
LMI_VCR.BOT_MB = 0x04.
Memory configuration can be little endian or big endian. The LMI is independent of endianness
when the external bus width is 32 bits. When the external bus width is 32-bit, memory interface
bit LMI_MIM.ENDIAN (read only) indicates the endianness of the system.
Size
Name I/O Description
(pins)
LMI_CLK Output 1 SDRAM clock output: 66, 100, 133, 166 or 200 MHz
NOT_LMI_CLK Output 1 LMICLK and NOTLMICLK are differential clock outputs to DDR
SDRAM
LMI_CLK_EN Output 1 Clock enable. Activates the clock signal when high and deactivates
when low. By deactivating the clock, LMICLKEN low initiates the
power-down mode, self-refresh mode or suspend mode.
NOT_LMI_CS[1:0] Output 2 Chip select. Selects particular SDRAM components during the active
state.
Confidential
Note: The mapping of LMIBKSEL[1:0] (bank select address bits) described in Table 92 and Table 93
can be bypassed enabling the bank remapping feature (see fields LMI_COC.BA_EN[1:0]).
Using the second entry as an example, 2 of 16 Mbit (2 M x 8 type, 2 banks) SDRAMs are used
to construct a row of main memory. The SDRAMs’ internal row and column address bits are 11
and 9, respectively. The page size is 1 Kbyte. Total memory on this row is 4 Mbytes. The CPU’s
physical address PA[11] is output to pin LMIBKSEL[0] in both RAS and CAS phases.
LMIADD[10] is driven with PA[12] in RAS phase. The AP (auto precharge) option is output to
LMIADD[10] in CAS phase, although the STx7100 LMI does not issue either read-with auto-
precharge or write-with auto-precharge commands.
Table 92: Row and column addressing for memory size and number of banks (16-bit interface)
SDRAM Address Page Row RAS LMIBKSEL LMIADD
type split size size CAS
1 0 12 11 10/ 9 8 [7:0]
a Mbit x b Mbyte AP
16 Mbit 2 bank
1 x 16 11 x 8 512 byte 2 RAS 11 12 10 9 [20:13]
CAS 11 AP [8:1]
2x8 11 x 9 1 Kbyte 4 RAS 11 12 10 21 [20:13]
CAS 11 AP 9 [8:1]
4x4 11 x 10 2 Kbyte 8 RAS 11 12 22 21 [20:13]
Confidential
CAS 11 AP 10 9 [8:1]
64 Mbit 2 bank
4 x 16 13 x 8 512 byte 8 RAS 11 12 10 9 22 21 [20:13]
CAS 11 AP [8:1]
8x8 13 x 9 1 Kbyte 16 RAS 11 12 10 23 22 21 [20:13]
CAS 11 AP 9 [8:1]
16 x 4 13 x 10 2 Kbyte 32 RAS 11 12 24 23 22 21 [20:13]
CAS 11 AP 10 9 [8:1]
64 Mbit 4 bank
4 x 16 12 x 8 512 byte 8 RAS 12 11 10 9 22 21 [20:13]
CAS 12 11 AP [8:1]
8x8 12 x 9 1 Kbyte 16 RAS 12 11 10 23 22 21 [20:13]
CAS 12 11 AP 9 [8:1]
16 x 4 12 x 10 2 Kbyte 32 RAS 12 11 24 23 22 21 [20:13]
CAS 12 11 AP 10 9 [8:1]
128 Mbit 4 bank
8 x 16 12 x 9 1 Kbyte 16 RAS 12 11 10 23 22 21 [20:13]
CAS 12 11 AP 9 [8:1]
16 x 8 12 x 10 2 Kbyte 32 RAS 12 11 24 23 22 21 [20:13]
CAS 12 11 AP 10 9 [8:1]
32 x 4 12 x 11 4 Kbyte 64 RAS 12 25 24 23 22 21 [20:13]
CAS 12 25 11 AP 10 9 [8:1]
256 Mbit 4 bank
16 x 16 13 x 9 1 Kbyte 32 RAS 12 11 10 24 23 22 21 [20:13]
CAS 12 11 AP 9 [8:1]
32 x 8 13 x 10 2 Kbyte 64 RAS 12 11 25 24 23 22 21 [20:13]
CAS 12 11 AP 10 9 [8:1]
64 x 4 13 x 11 4 Kbyte 128 RAS 12 26 25 24 23 22 21 [20:13]
CAS 12 26 11 AP 10 9 [8:1]
Table 93: Row and column addressing for memory size and number of banks (32-bit interface)
SDRAM Address Page Row RAS LMIBKSEL LMIADD
type split size size CAS
1 0 12 11 10/ 9 8 [7:0]
a Mbit x b Kbyte Mbyte AP
16 Mbit 2 bank
1 x 16 11 x 8 1 4 RAS 13 12 11 10 [21:14]
CAS 13 AP [9:2]
2x8 11 x 9 2 8 RAS 13 12 11 22 [21:14]
CAS 13 AP 10 [9:2]
4x4 11 x 10 4 16 RAS 13 12 23 22 [21:14]
CAS 13 AP 11 10 [9:2]
64 Mbit 2 bank
4 x 16 13 x 8 1 16 RAS 13 12 11 10 23 22 [21:14]
CAS 13 AP [9:2]
8x8 13 x 9 2 32 RAS 13 12 11 24 23 22 [21:14]
CAS 13 AP 10 [9:2]
16 x 4 13 x 10 4 64 RAS 13 12 25 24 23 22 [21:14]
CAS 13 AP 11 10 [9:2]
64 Mbit 4 bank
Confidential
2 x 32 11 x 8 1 8 RAS 12 13 10 11 22 [21:14]
CAS 12 13 AP AP* [9:2]
4 x 16 12 x 8 1 16 RAS 12 13 11 10 23 22 [21:14]
CAS 12 13 AP [9:2]
8x8 12 x 9 2 32 RAS 12 13 11 24 23 22 [21:14]
CAS 12 13 AP 10 [9:2]
16 x 4 12 x 10 4 64 RAS 12 13 25 24 23 22 [21:14]
CAS 12 13 AP 11 10 [9:2]
128 Mbit 4 bank
4 x 32 12 x 8 1 16 RAS 12 13 11 10 23 22 [21:14]
CAS 12 13 AP AP* [9:2]
8 x 16 12 x 9 2 32 RAS 12 13 11 24 23 22 [21:14]
CAS 12 13 AP 10 [9:2]
16 x 8 12 x 10 4 64 RAS 12 13 25 24 23 22 [21:14]
CAS 12 13 AP 11 10 [9:2]
32 x 4 12 x 11 8 128 RAS 26 13 25 24 23 22 [21:14]
CAS 26 13 12 AP 11 10 [9:2]
256 Mbit 4 bank
16 x 16 13 x 9 2 64 RAS 12 13 11 25 24 23 22 [21:14]
CAS 12 13 AP 10 [9:2]
32 x 8 13 x 10 4 128 RAS 12 13 26 25 24 23 22 [21:14]
CAS 12 13 AP 11 10 [9:2]
64 x 4 13 x 11 8 256 RAS 27 13 26 25 24 23 22 [21:14]
CAS 27 13 12 AP 11 10 [9:2]
Note: AP pin: the LMI uses bit LMI_MIM.BY32AP to determine if bit LMIADD8 is used to indicate the
PRE and PALL commands.
programing parameters should be the same as in previous programing. For some memory
vendors, this step can be skipped because they support auto clearing of the DLL
initialization bit.
9. After 200 cycles from DLL reset, external memory becomes accessible.
The LMI SDRAM controller provides two mechanisms to accomplish the initialization sequence.
1. NOP, PALL, CKEH and CBR:
Field LMI_SCR.SMS (SDRAM mode select) is written with appropriate values to prompt the
SDRAM controller to start issuing one of these commands. For instance, SMS = 100 results
in a single CBR cycle on the SDRAM interface. When SMS = 011, the LMICLKEN signal
goes high. See LMI_SCR for details.
2. Setting the SDRAM device’s mode register:
The SDRAM’s mode register must be initialized before actual operation. The software (boot
code) initiates a write cycle to LMI_MIM, and then a write, to register LMI_SDMR[0:1] in the
control block. The SDRAM controller then issues an MRS command to all SDRAM devices
on row n.
Example: issuing MRS command to row 0
Software does a dummy write to LMI_SDMR0; the physical address must be arranged in the
following way:
● A[31:20] = 0000 1111 1000r,
29.2.5 Operations
The SDRAM controller supports most DDR SDRAM commands. The following truth table lists all
commands supported.
from idle
Self refresh exit SLFRSHX L H H X X X X X X X
Power-down PWRDN H L X X X X X X X X
entry from idle
Power-down exit PWRDNX L H H X X X X X X X
Mode register set MRS H X L L L L V V V V
a. AP pin: the LMI uses LMI_MIM.BY32AP to determine if LMIADD8 pin is used to indicate PRE and PALL
commands.
Note: The LMI does not support full-page burst operation. The LMI issues a BST command to
terminate the burst read-only in DDR SDRAM mode.
The timing for issuing these commands is governed by the SDRAM timing register (see
LMI_STR for details). The LMI SDRAM controller can open up to four pages for each SDRAM
row and fully exploit the multi-bank architecture of modern SDRAM devices by tightly pipelining
SDRAM commands. The LMI is capable of detecting multiple consecutive requests to the same
SDRAM page. The SDRAM controller may combine same-page requests into a single same-
page access, providing that the timing of the requests is suitable.
29.2.6 Refresh
When DRAM refresh enable is 1 (LMI_MIM.DRE = 1). The LMI can automatically generate
refresh cycles. A 12-bit quantity (LMI_MIM.DRI, DRAM refresh interval) specifies the number of
memory clock cycles between refreshes. Software should program DRI in the inclusive range
[128:4095]. The behavior of the DRAM controller is undefined if the LMI is enabled and if DRI is
less than 128.
At the start of a refresh interval, the SDRAM controller loads the DRI 12-bit value into an internal
counter. This counter is decremented by 1 in each memory clock cycle. When the counter
reaches 0, the DRI value is reloaded into the counter and the next refresh interval is started.
All banks must be closed before a refresh operation can be performed. The SDRAM controller
issues a precharge all (PALL) command if there are any open pages. It then issues an auto
refresh command (CBR) after the Trp parameter is satisfied. The next row ACT command can be
issued one Trfc clock period (LMI_STR.SRFC) later.
The SDRAM controller performs exactly one refresh operation for each refresh interval. It
attempts to perform CBR as soon as possible within the refresh interval. When the counter ≤128
and CBR is not issued in the current refresh interval, the SDRAM controller causes any current
SDRAM access to complete in a timely manner by ensuring that the detection of same-page
SDRAM access is prevented. Subsequently it performs PALL and CBR commands.
The maximum refresh rate that the LMI can support is one row every 128 clock cycles. At this
rate, however, the detection of same-page SDRAM accesses is permanently disabled.
As an example, the hard reset value of DRI is 1562. For 100 MHz LMICLK, this allows 1024
refreshes in less than 16 ms.
Note: On average, the interval between two refreshes is determined by the DRI setting. However the
interval between any two successive refreshes could be larger or smaller than DRI by (a page
miss 32-byte transfer) clocks.
Entering standby
1. First, no initiators should be issuing transaction requests to the LMI.
2. The standby management program issues CBR command as the last command to the LMI.
3. The standby management program asserts STBY_REQ to the LMI.
4. All outstanding transaction requests are serviced.
5. The SDRAM controller issues a self-refresh command and lowers LMICLKEN to both
SDRAM rows. The SDRAM autonomously refreshes itself for the duration of the power-
down mode.
6. The LMI asserts STBY_ACK to the PMU. The memory clock (LMICLK) can now be stopped.
The clock controlling the padlogic flip-flops can be switched off when STBY_REQ (provided
by the PMU) and STBY_ACK (provided by the LMI core) are both asserted (these have to
be combined to act as the enable signal of a gated clock cell outside the LMI core).
The LMI core switches off its clock under these conditions (STBY_REQ and STBY_ACK both high).
When using registered DIMM, bit LMI_MIM.DIMM needs to be set to 1, so that the LMI can:
● delay data output by one cycle to synchronize with the buffered (on DIMM card) command
signals before they reach the SDRAM devices during a write operation,
● add one LMICLK cycle to the setting of bit LMI_STR.SCL (CAS latency). SCL should be
programmed with the same CL latency as the CL setting in the SDRAM device’s mode
register.
29.2.10 Others
Memory access to the address range of the base address + (0x0400 0000 to 0xEFF FFFF), is
routed to the LMI. This address range may not be fully populated with SDRAMs. Data access
outside the populated addresses, as defined in LMI_SDRA1.UBA, does not result in an external
memory transaction. Software that dynamically sizes the amount of external memory must use
an algorithm that is aware of this property. In the case of DIMMs, software can use I/O pins to
implement a serial presence detect (SPD) mechanism for dynamic sizing of main memory.
30 LMI registers
There are two sets of LMI registers, for system and video LMI respectively.
Register addresses are provided as
LMIBaseAddress + offset or MicroSysGlueConfigBaseAddress + offset.
LMIBaseAddress is set to either LMISysBaseAddress or LMIVidBaseAddress depending on
which LMI is being addressed.
The LMISysBaseAddress is:
0x0F00 0000.
The LMIVidBaseAddress is:
0x1700 0000.
63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DRAM_INACTIVE
BAD_ADDR
BAD_ADDR
BAD_OPC
BAD_OPC
ERR_SNT
ERR_SNT
Reserved
Reserved
Reserved
Reserved
Reserved
MVERS
block is recorded in MERR field. The set of supported MERR flags is given below.
[15:14] Reserved: Reset: 0
[13] BAD_OPC: A request with an unsupported opcode has been received (read/write). This bit is set by the
LMI hardware if a request with an unsupported opcode is received by LMI from STBus. Reset: 0
[12:11] Reserved: Reset: 0
[10] BAD_ADDR: Request to an out-of-range or unpopulated address received (read/write). This bit is set by
the LMI hardware if a request directed to an out-of-range address or an unpopulated address in data
block is received. Reset: 0
[9] ERR_SNT: Error response sent (read/write). This bit is set by the LMI hardware if an error response is
sent by the LMI to STBus. It indicates that an earlier request to the LMI data block was invalid. Reset: 0
[8] DRAM_INACTIVE: Access to LMI data block (that is, external memory) when DRAM controller is
disabled (read/write). This bit is set by the LMI hardware if a request is made to access external memory
while DRAM controller is disabled. Reset: 0
[7:0] PERR: Port error flags. Indicates errors in the interface between LMI and the packet-router. The error
status due to access to the LMI control block is recorded in the PERR field. The set of supported PERR
flags is given below.
[7:6] Reserved: Reset: 0
[5] BAD_OPC: Unsupported opcode (read/write). This bit is set by the LMI hardware if a request with an
unsupported opcode is received by LMI from STBus. Reset: 0
[4:3] Reserved: Reset: 0
[2] BAD_ADDR: Undefined control register (read/write). This bit is set by the LMI hardware if the LMI
hardware receives a request for an undefined control register. Reset: 0
[1] ERR_SNT: Error response sent (read/write). This bit is set by the LMI hardware if an error response is
sent by the LMI to STBus. It indicates that an earlier request to the LMI was invalid. Reset: 0
[0] Reserved. Reset: 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BY32AP
ENDIAN
DIMM
DRE
DCE
Reserved DRI Reserved BW Reserved DT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDSE
Reserved CST Reserved BRFSH SMS
Allows the SDRAM controller to issue a power-down command to an idle SDRAM row. The SDRAM
controller issues a power down exit command when there is a request to access this idle row.
0: Disable 1: Enable
[2:0] SMS: SDRAM mode select
Enables the SDRAM controller to perform normal SDRAM operation and to issue NOP, PALL and CBR
which are required in the SDRAM device initialization sequence for power up or reset.
000: Normal SDRAM operation when LMI_MIM.DCE = 1.
001: NOP command enable. When SMS is written with this value and DCE = 1, the LMI issues 1 NOP
command to the SDRAM interface. To have n NOP commands, SMS must be written with 001, n times.
This command applies to all external SDRAM rows.
010: Precharge all banks. When SMS is written with this value and DCE = 1, the LMI issues 1 precharge
all command to the SDRAM interface. To have n PALL commands, SMS must be written with 010, n
times. This command applies to all external SDRAM rows.
011: Clock enable signals LCLKEN0 and LCKLKEN1 active. At reset the clocks are disabled.
100: CBR enable. When SMS is written with this value and DCE = 1, the LMI issues 1 CBR command to
the SDRAM interface. To have n CBR commands, SMS must be written with 011, n times. This command
applies to all external SDRAM rows.
101, 110, 111: Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DIS_TWTR
Reserved
Reserved
SCL[2:0]
SPDL[0]
SPDL[1]
SCL[3]
SWTR
SRRD
SXSR
SRFC
SRAS SRC SSRCD SRP
[3:2] SRCD: TRCD, RAS to CAS delay. Controls the number of LMICLKs from a row activate command to a
column command (for the same bank).
00: 2 clocks of RAS to CAS delay 01: 3 clocks of RAS to CAS delay
10: 4 clocks of RAS to CAS delay 11: 5 clocks of RAS to CAS delay
[1:0] SRP: TRP, RAS precharge to ACT command. Controls the number of LMICLKs for RAS precharge to
ACT command (for the same bank).
00: 2 clocks of RAS precharge 01: 3 clocks of RAS precharge
10: 4 clocks of RAS precharge 11: 5 clocks of RAS precharge
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DATA_BUF_STRENGTH
COM_BUF_STR
CLK_BUF_STR
Reserved
Reset: 0
Description: Sets the output buffer drive strength for the SSTL2 pads used in the DDR padlogic.
Each two-bit control field has the following encoding:
00: 5pf 01: 15pf
10: 25pf 11: 35pf
[3:2] DATA_BUF_STRENGTH: Data buffer strength
This field selects the drive strength for the DQ, DM, and DQS DDR pins.
[3:2] COM_BUF_STR: Command buffer strength
This field selects the drive strength for the CKE, CS, RAS, CAS, WE, A, and BA DDR pins.
[1:0] CLK_BUF_STR: Clock buffer strength
This field selects the drive strength for the CK and CK# DDR pins.
63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
RX_LATENCY
TX_LATENCY
Reserved
Reserved
STROBE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DAT_PU_PD_MODE
VREF_MODE_SEL
DLL2_LCK_CTRL
DLL1_LCK_CTRL
BY_32_MODE
DLL2_CTRL
PAD_MODE
DLL_MODE
USR_RGE
Reserved
[61:59] TX_LATENCY
000: Latency of 8 cycles 001: Latency of 7 cycles ...
[58:56] RX_LATENCY
000: Latency of 8 cycles 001: Latency of 7 cycles ...
[55] STROBE: Strobe signal to validate configuration data
[54:27] Reserved
[26:23] DLL2_LCK_CTRL: DLL2 lock control; See the DLL1 lock control field for a description
[22:16] DLL2_CTRL: DLL2 control; See the DLL1 control field for a description
[15:12] DLL1_LCK_CTRL: DLL1 lock control
Defines the number of consecutive up/down pulses trigger the lock status.
LOCK goes high when the following number of consecutive up or down pulses are detected. Lock
generation is very sensitive to jitter.
0000: 5 0110: 7
0001: 2 0111: 8
0010: 3 1000: 9
0011: 4 1001: 10
0100: 5 1010: 11
0101: 6 Others: 5
[11:5] DLL1 CONTROL
This field is divided into two subfields. For more details, refer to Pangea DLL specification.
[11:10] DLL_MODE
00: Standalone mode. The delay command is calculated by the DLL.
01: Delay command forced by the user. DLL_command = range[4:0] & “1000”.
10: Delay command adjusted by the user. DLL_command is created by adding range[4:0] to
DLL_command[8:4].
11: Test mode. Delay element command and DLL_command are forced to range[4:0] & “1000”.
[9:5] USR_RGE: User defined range[4:0]. Allowed values: 0 to 19.
Range[4:0] is used to set the upper part of the delay element command (bits 8 to 4) according to the
DLL_mode.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BA_EN[1:0]
BANK
UBA Reserved Reserved SPLIT Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DLL2_CMD
DLL1_CMD
DLL2_LCK
DLL1_LCK
Reserved
31.1 Overview
The EMI is a general purpose external memory interface which allows the system to support a
number of memory types, external process interfaces and devices. This includes glueless
support for up to five independent memories or devices.
31.2 Features
The main features include:
● 16-bit interface,
● optional PC Card support for PCMCIA and CableCARDTM (POD) modules in banks 3
and 4.
Confidential
The EMI memory map is divided into five regions (EMI banks) which may be independently
configured to accommodate one of SRAM, ROM, asynchronous or burst Flash.
Each bank can only accommodate one type of device, but different device types can be placed in
different banks to provide glueless support for mixed memory systems.
EMI endianness is fixed at system reset and cannot be changed dynamically. Bit positions are
numbered left to right from the most significant to the least significant. Thus in a 32-bit word, the
leftmost bit, 31, is the most significant bit and the rightmost bit, 0, is the least significant.
The external data bus can be configured to be 8 or 16 bits wide on a per-bank basis.
Note: The STx7100 does not support SDRAM on its EMI interface.
T
EMIRDNOTWR Output 1 All devices. Common read/write access indicator.
EMIDATA[15:0] I/O 16 All devices. Common data bus.
EMIADDR[23:1] Output 23 All devices. Common address bus.
EMIFLASHCLK Output 1 SFlash devices only. SFlash clock.
EMIPRTSIZE Output 1 Boot device port size (0 = 16 bits; 1 = 8 bits).
EMIBUSREQ Input 1 EMI Bus ownership request from external agent.
EMIBUSGNT Output 1 EMI Bus ownership grant to external agent.
Following reset, all banks start with the same configuration which allows the system to boot from
a large range of nonvolatile memory devices.
As part of the boot process, the user should program the EMI configuration registers to match
the memory supported in that system, defining the memory size, the location in the address and
the device type connected.
The remaining configuration parameters are not relevant for an asynchronous boot; that is the
aim of the default configuration.
EMIADDR
NOTEMICS
NOTEMIOE
4 cycles
EMIDATA
(read)
10 phases
EMIDATA
(write)
Read data
latch point
31.7.1 Overview
A generic peripheral (for example SRAM, EPROM, SFlash) access is provided which is suitable for
direct interfacing to a wide variety of SRAM, ROM, Flash, SFlash and other peripheral devices.
Note: Refer to Section 31.8 on page 256 for specific STx7100 settings.
Figure 65 shows a generic access cycle and the allowable values for each timing field.
ACCESSCYCLETIME
EMIADDR
Separate configuration parameters are available for reads and writes. In addition, each strobe can
be configured to be active on read, writes, neither or both.
● ST M58LW064A/B,
● and any new part in these families with identical access protocol.
Confidential
Table 100 provides a brief description and comparison of EMI-supported Flash memories.
Note: Not all memory features are supported. When a feature is not supported, this is highlighted.
The EMI implements a superset of operational modes so that it is compatible with most of the main
functions listed for the three Flash families. The following sections contain a brief description of the
EMI Flash interface functionality.
Burst stylec Linear burst -32 words Sequential burst Linear burst
Interleaved burst (Not Intel burst (Not supported)
supported)
Confidential
Burst Yes via burst address Yes via burst address advance No automatic advance
suspend/ advance (NOTEMIBAA) (NOTEMIBAA) input
resumeg input
a. The Flash operating frequency, clock divide ratios and system frequency should be consistent
with the maximum operating frequency.
b. A burst length of eight words is not available in the x32 data bus configuration.
c. Modulo burst is equivalent to linear burst and sequential burst. Interleaved burst is equivalent to
Intel burst. On AMD the burst is enabled by four async write operations. On ST and Intel the burst
is enabled synchronously via the burst configuration register.
d. X latency is the time elapsed from the beginning of the accesses (address put on the bus) to the
first valid data that is output during a burst. For ST, it is the time elapsed from the sample valid
of starting address to the data being output from memory for Intel and AMD.
e. 10 to 12 only for F = 50 MHz.
f. Y-latency is the time elapsed from the current valid data that is output to the next data valid in
output during a burst.
g. In AMD and ST devices, BAA (or B) can be tied active. This means that the address advance
during a burst is noninterruptable (Intel likewise). EMI assumes these pins are tied active and
does not generate a BAA signal.
h. When the pin is low, the device is busy with a program/erase operation. When high, the device
is ready for any read, write operation.
i. These signals are used to introduce wait states. For example, in the continuous burst mode the
memory may incur an output delay when the starting address is not aligned to a four word
boundary. In this case a wait is asserted to cope with the delay.
● synchronous burst mode (default four words length: configurable to 1, 2, 4 and 8 words)
using a specific lower frequency clock selected using register EMI_FLASH_CLK_SEL.
Note: 1 Continuous burst is not supported by the EMI.
2 32 words burst size is partially supported by the EMI; the burst is interrupted when the required
data has been read.
3 Asynchronous page mode read is not supported by the EMI.
4 Interleaved burst mode is not supported by the EMI due to the implementation of multiple reads
only using synchronous burst mode (feature provided by all three families of Flash chips
adopted).
The EMI supports a asynchronous single write.
The asynchronous single read/write uses the same protocol as that of the normal peripheral
interface.
Figure 66 shows a typical burst access with burst length of four words.
EMIFLASHCLK
EMIADDR
A A
NOTEMILBA
ACCESSTIMEREAD DATAHOLDDELAY
NOTEMICS
NOTEMIOE
NOTEMIBAA
The ACCESSTIMEREAD parameter is used to specify the time taken by the device to process
the burst request. The rate at which subsequent accesses can be made is then specified by the
DATAHOLDDELAY parameter, e1 and e2 delays can also be specified.
The EMI performs one burst access during which it gets the exact number of words as
requested (see example A on Figure 67 with n = m = 8). Depending on the starting address,
there is possibly a wrap that is automatically completed by the Flash device. The wrap
occurs when the starting address is not aligned on an n-byte word boundary.
0 1 2 3 4 5 6 7
A) n = m = 8 words
Single burst
0 1 2 3 4 5 6 7
B)
First burst
● n>m
If the starting address is aligned on an m-byte word boundary, the EMI gets m bytes from a
single burst sequence as explained in the previous paragraph. Then the transfer on Flash is
interrupted making the chip select inactive. This terminates the burst transfer and puts the
memory device in standby mode, waiting for a new request and starting address for a new
burst.
If the starting address is not aligned on an m-byte word boundary, a first burst on the Flash
executes until the m-byte word boundary is crossed. The burst on the Flash is interrupted
and there follows another burst with a starting address that wraps to an m-byte boundary
(directly given by STBus interface) to read the remaining data. After all the required bytes
have been read, the burst access on Flash can be interrupted.
● n<m
The EMI needs to perform more burst accesses until it gets the required m words.
If the starting address is aligned on an n-byte word boundary, there are a series of Flash
burst accesses until the exact number of bytes is met.
If the starting address is not aligned on an n-byte word boundary, there is a first access on
Flash to read data until the n-byte word boundary is met. This access is then interrupted
and new series of accesses are started on a new address provided by STBus (that
eventually wraps at the m-bytes boundary). This is repeated until the exact number of bytes
is reached. This happens in the middle of the last Flash burst that is interrupted in the usual
manner.
EMICLK
EMIFLASHCLK
EMIADDR
A
Confidential
NOTEMILBA
NOTEMICS ACCESSTIMEREAD
DATAHOLDDELAY
NOTEMIOE
NOTEMIBAA
31.7.8 Use of Flash memories in different banks with contiguous memory spaces
As shown in Table 100 on page 252, the maximum size of memory chip for SFlash is 64 Mbits.
This may not be enough for some of the variants that use the EMI.
It is however possible to place two Flash devices in different banks and have their memory space
located contiguously in the overall address space. With this arrangement, the two Flash devices
are seen the same way as a single, larger memory device from the software point of view.
This is done through the use of the bank reconfiguration capability, controlled through the EMI
Buffer Registers.
When using a 16-bit device, the low order address bit is on pin EMIADDR[1]. Pins
NOTEMIBE[1:0] are byte selectors: bit [0] enables the low order byte and bit [1] enables the high
order byte.
When using an 8-bit device, the low order address bit is on pin NOTEMIBE[1] (that is,
NOTEMIBE[1] is a virtual EMIADDR[0]). Pins NOTEMIBE[0] acts as byte enable.
● For common (or attribute memory) write access, PCCARD_WE# gets asserted.
Distinction between memory accesses and IO accesses to the PC Card are based on
subdecoding:
● If EMI address line A[15] is 1 then it is a memory access,
Glue logic internal to the STx7100 generates the specific PC Card signals and multiplex them
Confidential
32 EMI registers
32.1 Overview
Register addresses are provided as
EMIConfigBaseAddress + offset,
EMIBufferBaseAddress + offset, or
EMIBankBaseAddress + offset.
The EMIConfigBaseAddress is:
0x1A10 0000.
The EMIBufferBaseAddress is:
0x1A10 0800.
The EMIBankBaseAddress is:
EMIConfigBaseAddress + EMIBank(n) with n = {0,1,2,3,4}
where
EMIBank0 = 0x100,
EMIBank1 = 0x140,
EMIBank2 = 0x180,
EMIBank3 = 0x1C0,
Confidential
EMIBank4 = 0x200,
EMIBank5 = 0x240 (“virtual” bank: accessible, but no associated external Chip Select signal).
Offset from
Register Description Type
EMIConfigBaseAddress
Reserved - 0x058 -
Offset from
Register
EMIBankBaseAddress
EMI_CFG_DATA0 0x00
EMI_CFG_DATA1 0x08
EMI_CFG_DATA2 0x10
EMI_CFG_DATA3 0x18
● one related to the value of the total number of banks registers enabled at the same time
(composed of three bits).
Offset from
Register Description Type
EMIBufferBaseAddress
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CFG_UPDATED
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CFG_LCK
Description: If bit n is set, then all configuration registers associated with bank n are locked and
further write accesses are ignored.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PROTECT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MW_RETIME
PCCB4_EN
PCCB3_EN
Reserved
Reserved
0: 2
1: 1
The signal can be dynamically changed between a single retime input stage or a double retime input
stage. Both retime stages on the retimed input are synchronized to the current clock.
If EMITREADYORWAIT is set at the beginning of the access:
ACCESSTIMEREAD > LATCHPOINT + (2 + EWAIT_RETIME).
[1:0] Reserved
7 6 5 4 3 2 1 0
Reserved NOP_GEN
7 6 5 4 3 2 1 0
Reserved FLASH_CLK_SEL
7 6 5 4 3 2 1 0
Reserved CLK_EN
Reset: 0x00
Description: A write of 1 to this bit causes the Flash clocks to be updated.
This operation can only occur once, further writes to this register may lead to undefined
behavior.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BUSRELEASETIME
WE_USE_OE_CFG
WAITPOLARITY
DEVICETYPE
OEACTIVE
CSACTIVE
PORTSIZE
BEACTIVE
Reserved LATCHPOINT DATADRIVEDELAY
and OEE2TIMEWRITE
Otherwise (bit set to 0) the EMIRDNOTWR becomes low at the start of the access and is deactivated at
the end of the access
[25] WAITPOLARITY: Set the wait signal polarity:
0: Wait active high 1: Wait active low
[24:20] LATCHPOINT: Number of EMI subsystem clock cycles before end of access cycle.
0 0000: End of access cycle 0 0001: 1 cycle
0 0010: 2 cycles 0 0011: 3 cycles
0 0100: 4 cycles 0 0101: 5 cycles
0 0110: 6 cycles 0 0111: 7 cycles
0 1000: 8 cycles 0 1001: 9 cycles
0 1010: 10 cycles 0 1011: 11 cycles
0 1100: 12 cycles 0 1101: 13 cycles
0 1110: 14 cycles 0 1111: 15 cycles
1 0000: 16 cycles Other: Reserved
[19:15] DATADRIVEDELAY: 0 to 31 phases
[14:11] BUSRELEASETIME: 0 to15 cycles
[10:9] CSACTIVE: See Table 99 on page 251.
[8:7] OEACTIVE: See Table 99 on page 251.
[6:5] BEACTIVE: See Table 99 on page 251.
[4:3] PORTSIZE
00: Reserved 01: Reserved
10: 16-bit 11: 8-bit
[2:0] DEVICETYPE
001: Normal peripheral or 100: Burst Flash
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CYCLE
NOT ACCESSTIMEREAD CSE1TIMEREAD CSE2TIMEREAD
PHRD
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
[7:4] BEE1TIMEREAD: Falling edge of BE. 0 to 15 phases/cycles after start of access cycle.
[3:0] BEE2TIMEREAD: Rising edge of BE. 0 to 15 phases/cycles before end of access cycle.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
CYCLE
_NOT_ ACCESS_TIME_WRITE CSE1_TIME_WRITE CSE2_TIME_WRITE
PHWR
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STROBEONFALLING
DATAHOLDDELAY
BURSTMODE
BURST_SIZE
Reserved Reserved DATALATENCY
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BANK0_TOP_ADD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BANK1_TOP_ADD
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BANK2_TOP_ADD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BANK3_TOP_ADD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BANK4_TOP_ADD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BANK5_TOP_ADD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BANKS_EN
33 DMA network
Channel Request
Request source Request signal Description
ID rate
5 DISECQ_RX_HALF_FULL -
7 SCIF_TXBUF_READY -
The flexible DMA (FDMA) is a general-purpose direct memory access controller capable of
supporting 16 independent DMA channels. It is used to perform block moves thus reducing the
load on the CPU. Moves may be from memory-to-memory or between memory and paced
latency-critical real-time targets.
This chapter describes how the FDMA works, and how to program it. Chapter 33: DMA network
on page 271 explains how the FDMA is integrated within the STx7100.
The FDMA supports the following features:
● 16 independent DMA channels,
• a list of transfers,
• each transfer of a node in a list,
● little endian data organization,
• PES parsing/SCD
- H.264 and MPEG2 start code detect
- Dual stream on a single FDMA channel supported
• Memory-to-memory moves or free running transfers,
• Paced1 transfers,
• S/PDIF output.
1. A channel is paced if an external request causes a single data unit to be transferred per request.
The FDMA may require multiple requests to complete the operation.
● an S/PDIF channel.
All channels use linked lists of FDMA operations stored in memory. SCD/PES parsing channels
require additional control data which is written to FDMA data memory before the channel is
started.
Each linked list is composed of a series of nodes in main memory. Each node is a data structure
containing parameters that describe an FDMA transfer.
Typically a linked list of nodes is set up in main memory, the pointer to the first node is written to
the FDMA and the channel is started. This bootstraps the list, loading the first entry node and
continuing until completion of all the DMAs in the list.
On completion of a node the channel may generate an interrupt indicating completion and/or
trigger a channel update.
A channel update causes the next node in the list to be loaded from memory. The location of the
node structure in memory is given by a pointer.
This may be used to extend the channel’s operation to support features such as scatter gather
sequences, or building DMA sequences with only the final completion requiring CPU intervention
via an interrupt.
Confidential
Note: To emulate a ping-pong buffer using a two-node (looped) linked list it is possible to generate an
interrupt on completion of one node while moving directly to the next (interrupt but no pause). In
other words, the interrupt does not stall the channel.
34.1.2 Alignment
The node structures must be aligned to a 32 byte boundary.
The most efficient data transfers are aligned to a 128 byte boundary and the number of bytes
transferred should be a multiple of 32.
For paced channels, the paced-side data must be aligned to the paced opcode (OP32 must be
32-byte aligned, OP16 must be 16-byte aligned and so on). The memory side of a paced transfer
must be 32-byte aligned. There are no alignment restrictions for the memory side of S/PDIF
transfers.
For SCD/PES parsing, the PES buffer is treated as linear. A circular PES buffer can be described
using two linked nodes. The PES buffer is 128-byte aligned. The ES buffer and start codes list
buffers are 32-byte aligned.
34.2.1 Free-running
The FDMA is free-running. Once a channel is started, operations occur without requiring a
request to begin or control the timing of the transfer. It continues to operate without further
intervention until disabled, or the transfer is complete.
This is the model generally used for memory-to-memory moves.
A sleep mechanism can be used to slow down these accesses.
34.2.2 Paced
A channel is paced if a single data unit is transferred to or from a peripheral upon request. The
request may be associated with either the source or destination memory location.
The FDMA supports up to 30 physical request signals.
Only the DREQ request protocol is supported. The peripheral uses the STBus request to the
data FIFO to determine that a requested transfer has been acknowledged by the FDMA and it
clears the DREQ signal (when applicable).
The FDMA implements a hold off mechanism to ensure that it ignores the DREQ for a certain
period of time after having serviced a data request.
STx7100
PTI FMI
External peripheral
for example ethernet
Padlogic
DREQ[2] Buffer
DREQ[2]
Padlogic
FDMA
DREQn
Comms
and
peripherals
FDMA
Block Block port/signal name Description
requests
Reserved 0-2
Video_ HDMI HDMI_AVIBUFF_EMPTY 3
COMMS/DiSEqC DISEQC_RX_HALF_FULL 4
DISEQC_RX_HALF_EMPTY 5
ST40/SCIF SCIF_RXBUF_READY 6
SCIF_TXBUF_READY 7
Comms/SSC (x3) SSCn_RXBUFF_FULL 8 - 10
SSCn_TXBUFF_EMPTY 11 - 13
Comms/UART (x4) UARTn_RX_HALF_FULL 14 - 17
UARTn_TX_HALF_EMPTY 18 - 21
External DMAREQ[0:1] 22, 23
Audio AUD_PCM0 26 Mixed PCM player request
AUD_PCM1 27 Unmixed PCM player request
AUD_PCM_READER 28 PCM player reader
AUD_SPDIF 29 S/PDIF player
TSMerger SWTS SWTS_REQ 30 TS merger
Confidential
Reserved 31
● The interrupt mailbox sends interrupts from the FDMA to the CPU.
Two bits of each mailbox register are associated with each channel.
● The CPU sets bits in the command mailbox and clears bits in the interrupt mailbox.
● The FDMA clears bits in the command mailbox and sets bits in the interrupt mailbox.
Interrupts and flags are generated for each channel by setting mask bits in the mailbox register.
Any masked nonzero bits in the mailbox either raise an interrupt (interrupt mailbox) or generate a
flag in the FDMA (command mailbox).
There are three commands for each channel, set in the command mailbox:
● START: start and initialize channel n (no initialize if the channel is restarting after a PAUSE),
● Memory-to-memory moves use the remaining bandwidth and are arbitrated using a round-
robin scheme.
When more than one paced channel requests servicing, the channel with the highest external
request line has the highest priority.
34.3.6 Abort
Once a channel is paused, the host can start a new transfer simply by starting the channel with
a new linked list of nodes. This effectively aborts the previous transfer.
A node is complete when all NBYTES of the node have been transferred. At the end of each
node (specified in the FDMA_*NODE_NBYTES register) the FDMA may do one of the following:
● continue on to the next node without interrupting the host, or
● interrupt the host and pause the channel until the host tells the FDMA to continue, or
● interrupt the host and return the channel to the idle state if there are no more nodes to
process
Note: It is mandatory for the FDMA to interrupt the host on completion of the last node.
This channel type is described entirely by the generic node structure. Data is organized in a
number of different ways, including:
● single location (0D),
All possible combinations of source and destination data organization is possible for a transfer.
For example from 0D source to 2D destination or 1D source to 2D destination.
All data structures are specified with respect to an origin or initial byte address and the address
of subsequent transfers is calculated from the origin using information provided in the node.
Incrementing (1D)
A structure is 1D if NODE_NBYTES = NODE_LEN or if NODE_SSTRIDE = NODE_LEN.
For any 1D transfer the address is incremented by one byte until *NODE_NBYTES bytes are
transferred.
In the case of a incrementing transfer from address NODE_SADDR of NODE_NBYTES bytes,
the following bytes at the following addresses are transferred:
NODE_SADDR to NODE_SADDR + (NODE_NBYTES - 1)
SSTRIDE
0x0 0x1FF
0x200 Source window area
LENGTH The source window area is specified by
0x... NODE_SSTRIDE. If positive
the address increments every line.
SADDR
A D If negative the address decrements
Positive SSTRIDE every line.
B C
C B The source data block is specified by
SADDR NODE_[LENGTH,NBYTES,SADDR]
D A Number of lines = NBYTES / LENGTH
Negative SSTRIDE
DSTRIDE
0x0 0xFE
0xFF Destination window area LENGTH The destination window area is specified by
0x... NODE_DSTRIDE. If positive
Confidential
DADDR
the address increments every line.
A D If negative the address decrements
Positive DSTRIDE every line.
B C
C B The source data block is specified by
DADDR NODE_[LENGTH,NBYTES,DADDR]
D A
Negative DSTRIDE Number of lines = NBYTES / LENGTH
Table 106: Summary of node parameter settings for different combinations of data organization
Data is stored temporarily in a circular buffer in data memory before being transferred to the
destination.
Supported paced peripherals and corresponding channel IDs are shown in Table 104: FDMA
request summary on page 272.
NEXT
Start code
NBYTES
NEXT
PES BUFFER start code
Start code
Figure 72: Single and dual stream PES parsing/start code detect
Additional
data 1
Additional Additional
data 1 data 2
Stream 1 Stream 2
Single stream PES parsing/start code detect (SCD) is characterized by a linked list of nodes and
one additional data region. For dual stream PES/SCD, two additional data regions are used, one
for each stream, but a single FDMA channel is used. The transfers should be multiplexed on this
single channel (alternating nodes in the linked list). This is shown in Figure 72.
FDMA is able to support PES/SCD in two modes - MPEG2 and H.264.
PES Parsing
A channel configured as a PES Parsing/SCD channel fetches data from a 128 byte aligned
linear buffer in main memory (a circular buffer should be handled with a pair of nodes). If PES
parsing is enabled, the ES payload is extracted from the stream and dumped to the ES Buffer.
The PES startcode range is specified in the PES Control word in the additional data region. It is
also possible to enable PTS detection and extraction whereby the presence of a PTS in the PES
header is detected and the PTS is dumped to the start codes list. Transfers from the source
buffer must be 128 byte aligned and multiples of 128 bytes. If PES parsing is disabled, the
incoming stream is treated as ES and simply copied to the ES buffer.
Normal case (Start =< End) Detect start codes inside this range
IN_NOT_OUT = 0x1
Start’ = End + 1
End’ = Start - 1
IN_NOT_OUT = 0x0
Confidential
Overflow handling
There may be occasions when either the start codes list or the ES buffer overflows.
When the start codes list overflows the FDMA sets bit 0 in the SC_WRITE register for the
channel and continues parsing the PES data and outputting data to the ES buffer. However, no
start code is added to the list. If the incoming data is ES, it is simply copied to the ES buffer.
When the ES buffer overflows, the FDMA signals this by setting bit 0 in the ESBUF_WRITE
register for the channel. The FDMA ignores the overflow condition and continues processing
data thereby overwriting data already in the ES buffer.
Valid nodes
The S/PDIF channel nodes’ control word contains a node valid bit. This bit indicates whether the
node is valid. If a node is loaded by FDMA and the valid bit is not set, the FDMA completes the
current burst by sending stuffing data and then return the channel to idle. The CPU is interrupted.
This mechanism only works correctly if the words are read in order (from lowest address to
highest) when fetching the node from LMI. This is because the audio driver is expected to fill the
node structure and validate it once the node structure has been completed.
Confidential
End of burst
The BURST_END bit, part of the S/PDIF node’s CONTROL parameter is used to indicate that
the node describes the last node of an S/PDIF burst. The FDMA uses this to know when it should
start to output stuffing. The node following a node with BURST_END = 0x1 is considered the
start of a burst.
Output of stuffing
The FDMA needs to output stuffing to the S/PDIF player when the data for a burst is finished but
the end of the burst has not been reached. The FDMA keeps a count of the outstanding frames
to output for a burst. When an end of burst node is received and all the data associated with that
node is transferred or when an invalid node is received, the FDMA outputs stuffing until the
outstanding frames counter goes to zero.
FDMA_ID Hardware ID
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ID_NUM
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VER_NUM
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved EN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REV_NUM
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Channel
DATA ERR STA
running
Channel
idle or DATA CMD
paused
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NODE_PTRn Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
COUNT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRC_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DEST_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRC_DEST_NUM
INC_ADDR
NUM_OPS
HOLDOFF
OPCODE
Reserved
Reserved
Reserved
WNR
Address: FDMABaseAddress + 0x9780 + n x 4 (where n = 0 to 30)
Type: Write only
Reset: Undefined
Description:
[31:30] Reserved
[29] INC_ADDR: Increment address
0: No address increment between transfers
1: Increment address between transfers
[28:24] NUM_OPS: Number of operations per request serviced
0x0: 1 transfer 0x1: 2 transfers
0x2: 3 transfers 0x3: 4 transfers
Others: Reserved
[23:22] SRC_DEST_NUM: Source destination number
Confidential
1 2
intended as four LD/ST1 (4 bytes transferred) intended as two LD/ST 2 (4 bytes transferred)
[3:0] HOLDOFF: Holdoff value
DREQ is masked for:
0x0: 0: 0.5 µs 0x1: 0.5 - 1 µs
0x2: 1: 1.5 µs Others: Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH15 CH14 CH13 CH12 CH11 CH10 CH9 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1 CH0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ERR15
ERR14
ERR13
ERR12
ERR11
ERR10
ERR9
ERR8
ERR7
ERR6
ERR5
ERR4
ERR3
ERR2
ERR1
ERR0
CH15
CH14
CH13
CH12
CH11
CH10
CH9
CH8
CH7
CH6
CH5
CH4
CH3
CH2
CH1
CH0
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ERR15
ERR14
ERR13
ERR12
ERR11
ERR10
ERR9
ERR8
ERR7
ERR6
ERR5
ERR4
ERR3
ERR2
ERR1
ERR0
CH15
CH14
CH13
CH12
CH11
CH10
CH9
CH8
CH7
CH6
CH5
CH4
CH3
CH2
CH1
CH0
Address: FDMABaseAddress + 0xBFD4
Type: R/W (writable only on initialization)
Reset: Undefined
Description: These bits generate an interrupt for channel n.
[n x 2] CHn: Generate interrupt for channel n
[n x 2 + 1] ERRn: Generate interrupt for error on channel n
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ERR15
ERR14
ERR13
ERR12
ERR11
ERR10
ERR9
ERR8
ERR7
ERR6
ERR5
ERR4
ERR3
ERR2
ERR1
ERR0
CH15
CH14
CH13
CH12
CH11
CH10
CH9
CH8
CH7
CH6
CH5
CH4
CH3
CH2
CH1
CH0
Address: FDMABaseAddress + 0xBFD8
Type: Write only
Confidential
Reset: Undefined
Description: When set these bits acknowledge an interrupt for channel n by clearing the relevant
status bits.
[n x 2] CHn: Acknowledge message for channel n
[n x 2 + 1] ERRn: Acknowledge error for channel n
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ERR15
ERR14
ERR13
ERR12
ERR11
ERR10
ERR9
ERR8
ERR7
ERR6
ERR5
ERR4
ERR3
ERR2
ERR1
ERR0
CH15
CH14
CH13
CH12
CH11
CH10
CH9
CH8
CH7
CH6
CH5
CH4
CH3
CH2
CH1
CH0
Address: FDMABaseAddress + 0xBFDC
Type: Write only
Reset: Undefined
Description: When set these bits enable interrupt generation for channel n.
[n x 2] CHn: If bit n = 1, message pending for channel n
[n x 2 + 1] ERRn: If bit n = 1, there is an error for channel n
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NEXT_PTR 0 0 0 0 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REQ_MAP
SRC_INC
Reserved
DST_INC
PAU_EN
INT_EN
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NBYTES
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LENGTH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SSTRIDE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DSTRIDE
35.6 S/PDIF
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NEXT_PTR 0 0 0 0 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NODE_VALID
BURST_END
REQ_MAP
Reserved
PAU_EN
INT_EN
DREQ
TYPE
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NBYTES
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PA PB
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PC PD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BURST_PER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH_STA[31:0]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CH_STA[35:32]
USER_STA
VALID
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NEXT_PTR 0 0 0 0 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADD_DATA
REQ_MAP
Reserved
Reserved
PAU_EN
INT_EN
TYPE
TAG
Type: R/W
Reset: Undefined
Description:
[31] INT_EN: Interrupt at end of node
0: No interrupt at end of node 1: Interrupt host at end of node
[30] PAU_EN: Pause at end of node
0: Continue processing next node 1: Pause at end of this node
[29:24] Reserved
[23:16] TAG: Node tag. This tag is copied to the data structures put into the start codes list.
[15:12] Reserved
[11:8] ADD_DATA: Additional data associated with node
0x0: Additional data region 0 0x2: Additional data region 2
0x1: Additional data region 1 Others: Reserved
[7:5] TYPE: Node type
0x0 SCD/PES Parsing 0x2 - 0x7: Reserved
0x1 S/PDIF
[4:0] REQ_MAP: REQ_MAP/extended node type
0x1F: Extended node type
0x0 - 0x1E: Reserved (DREQ mapping for standard node)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NBYTES
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PES_BUFF_READ
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SC_WRITE
Reserved
SC_OVF
Address: FDMABaseAddress +
0x9580 (region 0), 0x9600 (region 1), 0x9680 (region 2), 0x9700 (region 3)
Type: R/W
Reset: 0
Description:
[31:4] SC_WRITE: Write pointer for start codes list (must be 4-word aligned)
[3:1] Reserved
[0] SC_OVF: SC list overflow flag
0: No overflow 1: Overflow
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SC_SIZE Res.
Address: FDMABaseAddress +
0x9584 (region 0), 0x9604 (region 1), 0x9684 (region 2), 0x9704 (region 3)
Type: R/W
Reset: 0
Description: Size of start codes list (in number of words).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ESBUF_TOP Reserved
Address: FDMABaseAddress +
0x9588 (region 0), 0x9608 (region 1), 0x9688 (region 2), 0x9708 (region 3)
Type: R/W
Reset: 0
Description: Address of top of elementary stream buffer (32-byte aligned)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ESBUF_READ
Address: FDMABaseAddress +
0x958C (region 0), 0x960C (region 1), 0x968C (region 2), 0x970C (region 3)
Type: R/W
Confidential
Reset: 0
Description:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ESBUF_WRITE
Address: FDMABaseAddress +
0x9590 (region 0), 0x9610 (region 1), 0x9690 (region 2), 0x9710 (region 3)
Type: R/W
Reset: 0
Description:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ESBUF_BOT Reserved
Address: FDMABaseAddress +
0x9594 (region 0), 0x9614 (region 1), 0x9694 (region 2), 0x9714 (region 3)
Type: R/W
Reset: 0
Description: ES buffer bottom pointer (32-byte aligned).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OUTPUT_PTS
IN_NOT_OUT
DETECT_EN
Address: FDMABaseAddress + 0x9598 (region 0), 0x9618 (region 1), 0x9698 (region 2)
Type: R/W
Reset: 0
Description:
[31] IN_NOT_OUT: Range mode
0: Detect start codes outside this range 1: Detect start codes within this range
[30] DETECT_EN: Enable start code detection for this range
0: No detection 1: Detect
[29] OUTPUT_PTS: Output PTS to start code list
0: Disable 1: Enable PTS output
[28:16] Reserved
[15:8] RANGE_END: End of PES start code rangea
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
ONESHOT_MODE 9 8 7 6 5 4 3 2 1 0
IN_NOT_OUT
DETECT_EN
H264_SCD
[27:16] Reserved
[15:8] RANGE_END: End of start code range (inclusive)a
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
ONESHOT_MODE 9 8 7 6 5 4 3 2 1 0
IN_NOT_OUT
DETECT_EN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SCD_STA
Address: 0x95A4 to 0x95BF (region 0), 0x9624 to 0x963F (region 1), 0x96A4 to 0x95BF (region 2)
Type: R/W
Reset: 0
Description: Must be set to 0 when a new stream is started on this additional data area.
Start code entries
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADDR
Mode 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NAL_UNIT_TYPE
NAL_REF_IDC
Reserved
H.264 Reserved SLICE_CNT
H.264 mode:
[31:25] Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PTS[32]
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PTS[31:0]
Part 5
Transport interface
Confidential
36.1 Overview
The PTI is a dedicated transport engine. It contains its own CPU and handles the transport
deMUX functionality of the set-top box.
The PTI maintains an internal system time clock timer (STC) which keeps track of the encoder
clock. The STC is clocked off PIX_CLK.PIX_CLK is controlled by clock recovery software
running on the ST40 processor such that it is locked on to the encoder’s clock.
The ST40 sets up the PTI and loads its program through the STBus interface. On reception of a
new transport packet, the PTI writes its content to the ST40 memory space through the interface.
The PTI module parses and demultiplexes the transport stream, using a mixture of hardware and
software running on an application-specific processor called the transport controller (TC). The
TC gives the PTI the level of flexibility normally associated with software based demultiplexing of
transport streams without the overhead of this processing being placed on the ST40 CPU.
The PTI is configured by registers and programmed by two blocks of static shared memory
contained within the PTI, one block containing instructions and the other data. The data block
contains structures shared with the ST40 CPU plus structures private to the TC. Code for the TC
is downloaded into the PTI instruction memory by a PTI software driver running on the ST40.
The functionality of the PTI is therefore defined by a combination of the PTI hardware, the
Confidential
software running on the TC, and the software driver running on the ST40. This arrangement
allows great flexibility by changing the code to be run. Many parameters of the code are modified
to change the behavior and features of the PTI. The TC code and PTI driver software are
provided by STMicroelectronics. Different versions of these software components are available,
with support for generic MPEG-2/DVB transport stream parsing, descrambling and
demultiplexing.
Specific details of the data structures and mechanisms used to communicate between the TC
and the PTI driver running on the ST40 are contained in the documentation for these software
components.
PTI operation is controlled by a software API supplied by STMicroelectronics.
The remainder of this chapter is a description of the hardware components of the PTI and the
features and operation implemented by ST software.
● special purpose section filters allowing total flexibility in processing transport streams,
In addition to these transport device functions, the interface copies the entire transport stream or
transport packets with selected PIDs from the transport stream through to the PTI output stream
interface.
Details of how to control these features are contained in the PTI application programming
interface (API) and the PTI software documentation for the particular version of the PTI code.
Data
Instruction Transport Section filter
SRAM
SRAM controller (SF)
core
TC toolbox
Confidential
Peripheral
interface
DMA
3 + 1 channels
Timer
● Automatic mode
The SF takes over the entire filtering process, reading data directly from the TC core input
register and writing directly to the output register. The TC merely reads the packet header,
sets up the SF with the appropriate configuration, and sets it going. Breakpoints are allowed
in the process to allow the TC to intervene and customize the filtering algorithm at specific
points, allowing maximum flexibility at top performance (sometimes called semiautomatic
mode).
● Manual mode
The TC core is in overall control of the process but uses the dedicated SF to perform
specific filtering tasks.
copied to an output port via TSMerger, for example, one supporting the IEEE 1394 protocol.
The IIF is responsible for inputting the synchronous data stream to the PTI and passing data to
the TC for processing. The start of a packet is detected either from the incoming packet clock or
by sync byte detection. Under the control of TC software, the IIF routes data to the TC input
register via the IIF’s H- or header FIFO.
The IIF, like other DMA modules, is controlled by registers. Parameters programmed in these
registers include:
● operating conditions for sync byte detection,
● data transfer parameters, for example, number of bytes to be passed to the TC or whether
descrambling is required,
● alternate output parameters.
36.3.4 DMA
The PTI's DMA block contains four DMA channels. Channel 0 is the PTI's main DMA write
channel used for transferring demultilpexed payloads to memory buffers under the control of the
TC.
Channels 1 to 3 are general purpose paced DMA channels used for memory to memory and
memory to device transfers. These DMA channels can be used in a circular buffer configuration
if required combined with DMA channel 0. (see Section 36.6: DMA operation). A programmable
delay (the holdoff time) is built into the data transfer to ensure all data has reached its target
before the request signal is read for the next transfer.Also, a programmable write length ensures
that all data has storage room in the target upon arrival.
Channel 0 outputs single words or 4-, 8- or 16-word bursts. It may also be configured to output
data directly to the decoders. Channels 1 to 3 are normally set to write whole words but are
configurable to write to byte-wide devices.
The DMA block is controlled by a number of registers which are programmed by the TC software.
Functions controlled by these registers include:
● setting up and manipulating the circular data buffers,
● channel 0 status,
These registers are loaded with the STC value according to the events shown in Table 111.
Event Action
Rising edge of packet clock (packet start) STC is loaded into the packet start time register
Beginning of audio frame output STC is loaded into the audio PTS register
VSYNC STC is loaded into the video PTS register
The packet start time register is read by the TC and used to determine the arrival time of a
program clock reference (PCR). The CPU cannot directly access this register. TC software
stores this arrival time together with the PCR in shared data SRAM so it can be read by the CPU.
The audio and video PTS registers are read directly by the CPU and used by driver software to
synchronize the audio and video. Each register consists of two words to accommodate 33-bit
time stamp values, one word holds the lower 32 bits and the other holds the most significant bit.
● control bits for each PID to set up DMA parameters, to mark the PCR PID, to control section
CRC checking, and to mark PIDs which need copying to the selective transport output
interface,
● PID state information such as a transport or PES level descrambling flag, partial sections for
filtering, partial section CRC values, and current continuity count values,
● descriptors and pointers to the circular buffers where the streams from each PID are sent,
● the last adaptation field and its time stamp from the local system clock.
Registers are provided to allow the ST40 CPU to initialize and control the block and to provide
interrupt status and control.
36.4.1 Initialization
After device reset, the TC in the PTI is halted and the PTI block remains idle. It stays in this state
Confidential
until:
● the TC code is loaded into the instruction SRAM by the ST40,
● the TC is enabled by setting the TC_EN bit of the PTI_TCMODE register high.
There are a number of initialization steps that must be performed before the TC is enabled.
1. The data SRAM must be initialized with any data structures required by the TC software.
2. The interrupt status registers must be cleared.
3. The IIFFIFO_EN register bit must be set high to enable the input FIFO.
● section filtering, with a set of filters and section CRC checking for streams containing
sections,
● directing the output stream either to a circular buffer in memory or to a compressed data
FIFO of an audio or video decoder,
● enabling or disabling a stream,
● appending or indexing extra information for further data processing by the ST40.
Having examined the PID data structures, the TC sets up the rest of the hardware in the PTI to
perform the required descrambling and DMA operations before starting to parse the rest of the
packet. Processing varies depending on the contents of the transport packet, which includes:
● PES data,
● section data,
● adaptation fields,
● time stamp.
Typical processing for different packet types and fields is described in the rest of this section.
PES data
Transport packets which contain PES data and are not rejected by PID filtering, are CRC
Confidential
checked and descrambled if required. The PES data is DMA transferred into a circular buffer.
The DMA features of the PTI buffer a PES stream in memory and then transfer the data to a
decoder without the CPU being involved. Optionally an interrupt is generated to the ST40 when
the buffer for a PES stream has data added to it and the state of the buffer changes from empty
to nonempty. An interrupt is raised and an error flag set in the data SRAM if the buffer overflows.
In such cases, the most recent data is lost.
Section data
Transport packets which contain section data and are not rejected by PID filtering, are subjected
to section filtering on each section or partial section in the packet.
The PTI contains a hardware section filter which implements two standard filter modes:
● short match mode (SMM): 96 filters of 8 bytes each,
Section filtering is implemented by a mixture of TC code with the hardware section filter.
Alternatively, it may be performed purely in TC code to implement a small number of longer or
special purpose filters. In this case there may be some restrictions on the minimum length of a
section or the number per transport packet, to ensure that the processing is performed within the
period of one transport packet interval.
Adaptation fields
Typically only the program counter reference (PCR) would be extracted from this field although
the TC software could extract other data.
If a PID is flagged as the source for PCR values then any adaptation field in a transport packet
with this PID containing a PCR has the PCR value extracted and stored in the data SRAM. The
value is stored with a time stamp, which is the time when the transport packet arrived, as given
by the system time clock (STC) counter value. An interrupt is raised to the ST40 and the interrupt
bit itself is used as a handshake for the processing of the PCR by the ST40. Until the bit is
cleared, no more PCRs are captured.
The STC counter is clocked by the 27 MHz input clock to the device and is initialized by the ST40
CPU.
Confidential
The detection of the empty condition on a buffer and the acknowledgement of an interrupt does
not lock out the TC from writing the write pointer after the ST40 has checked, and setting the
interrupt status bit before the ST40 has acknowledged. The buffer state must be reconfirmed
before waiting on a semaphore for that buffer. Rechecking the write pointer avoids data being left
in the buffer until the next data arrives and the TC sets the interrupt again. If the buffer is still
empty then the ST40 process enables the interrupt by setting the correct interrupt enable bit
before making the process wait on a semaphore.
Figure 75 shows the TC and the ST40 processes and mechanism described above.
Note: At any given time each process is at any point during the critical regions of code. There is no
implied timing for each step of a process only an ordering of steps.
After the buffer has been refilled the TC sets the interrupt status bit causing the PTI interrupt
handler to be run. When the interrupt handler finds the buffer process semaphore status bit is set
then the interrupt handler signals to the semaphore to restart the process and disable that
interrupt bit. Therefore, the process itself disables the interrupt at the PTI level, and only enables
it when it is about to sleep.
An error condition would be handled in a similar manner.
The association of interrupt bits with particular conditions and events is determined by the TC
code and the corresponding PTI driver running on the ST40 CPU.
Transport controller
signal. Each time the request signal is active (low) and there is data to be read from the buffer
(that is, the read pointer is not equal to the write pointer), a programmable number of bytes is
transferred. This is followed by a hold-off time during which the request is not sampled, allowing
the request signal time to become valid again. In the STx7100, the FDMA is typically instead
used for transferring A/V data to the decoder bit buffers performing PES parsing and start code
detection along the way (see section Section 34.4.3: SCD/PES parsing on page 282)
Block moves are supported on channels 1 to 3 using a special DMA mechanism which
increments the input address after each write.
During operation the read and write pointers are examined by the hardware to determine if there
is data in the buffers to be transferred. If there is data in the buffer and the request line for that
channel is active then the data is transferred and the read pointer updated. If channel 0 DMA is
writing into the buffer then the write pointer is updated by the TC; otherwise the ST40 CPU
updates the write pointer after adding data to a buffer.
Once each transport packet has been output on channel 0, the DMA write pointer of the
corresponding buffer data structure in the PTI data SRAM is updated. If the transport packet did
not contain the end of a complete data unit such as a section, a temporary write pointer variable
is used. This is done so that the ST40 process only sees a complete unit of data to be
processed. The temporary write pointer is available for reading by the TC software in a special
register. When the data unit is complete, the write pointer used by the ST40 process is updated
and an interrupt is set to signal to the ST40 process that data is in that buffer. This mechanism of
updating the write pointers and interrupting, is not used in the special case that the buffers are
being transferred by DMA to an audio, video or other decoder.
Channels 1 to 3 have the write pointers updated either by the TC software after data has been
placed in the corresponding buffer by DMA channel 0, or, by the ST40 CPU if this is writing data
into the buffer that DMA channels 1 to 3 are reading from.
MPEG decoders
PTI_DMAnTOP
PTI_DMAnWRITE
PTI_DMAnREAD
PTI_DMAnBASE
buffers for the four DMA channels. The base register points to the base word of the buffer, and
must be 16-byte aligned, so bits 0 to 3 must be zero. The top register points to the top byte of the
buffer. If a circular buffer is being used then this address must be one byte below a 16-byte
aligned address, so bits 0 to 3 must be 1. The buffer for channel 0 only is reduced to a single
address by setting the top register equal to the base register. In this case, the data is written to a
fixed address defined by the write pointer and the write pointer is not updated.
The read and write buffers point to the next word to be read or written respectively.
At initialization the read and write pointers are set to the same value, so that the buffers are
empty. The base and top pointers are initialized to point to the beginning and end of the buffers.
● it never performs read accesses, which are inherently slower because they cannot be
posted ahead.
36.6.4 Performance
Each DMA channel performs one read, write or burst access when it has been granted by the
memory arbiter. When more than one channel is active, one performs an access while another is
waiting for valid pulses to come back from the interconnect. So the accesses are interleaved,
guaranteeing a high performance.
Performance is enhanced by being able to post writes to the STBus that is, a read or write is
initiated without waiting for a valid signal on the previous access. Reads cannot be posted since
the next operation may be a write that depends on the result of the previous read.
Address Address
when when
Confidential
finished finished
Address
when
Address programmed
when
programmed
Example A Example B
Area to move (appropriate write and read pointer should be programmed)
● no sections,
● only those sections that have the section syntax indicator bit set via bits in the PID data
structure read by the TC code.
A 1-byte result report is output when sections are accepted.
A filter mask word in each PID data structure specifies which set of filters is applied to sections in
a transport packet with that PID.
Filter matching is programmed by writing a set of masks and filters in the CAM memory. The
CAM has two memory cores named CAMA and CAMB.
Each even four-byte word memory address of the CAMA or CAMB memory array is a set of filter
bytes, and each odd word address is either a set of filter bytes or mask bytes. A configuration bit
is used to enable the masks. With masks enabled the total number of filters and masks available
is 48 8-byte or 96 16-byte filter plus mask sets. If masks are not required each CAM has
48 8-byte or 96 16-byte filters.
The filters and masks are arranged in columns, interleaving one layer of filter data and, if masks
are enabled, its relevant mask. The first entry to CAMA is a 32-bit word formed by the first byte of
each of the first four filters. The first entry to CAMB is a 32-bit word formed by the first byte of
each of the fifth to eighth filters. The second entry to the CAMA, when masks are enabled, will be
a 32-bit word formed by the first byte of each of the masks of the first four filters and so on.
The position of the first filter in the memory is also programmable. Figure 78 illustrates different
Confidential
Figure 78: Memory organization when CAM_CFG NOT_MASK bit = 1 (masks disabled).
0x200 F00B00 F01B00 F02B00 F03B00 0x500 F04B00 F05B00 F06B00 F07B00
0x204 0x504
0x208 F00B01 F01B01 F02B01 F03B01 0x508 F04B01 F05B01 F06B01 F07B01
Figure 79: Memory organization with CAM_CFG NOT_MASK bit = 0 (masks enabled)
0x200 0x500
F00B00 F01B00 F02B00 F03B00 F04B00 F05B00 F06B00 F07B00
0x204 0x504
F00B01 F01B01 F02B01 F03B01 F04B01 F05B01 F06B01 F07B01
0x208 0x508
F00B02 F01B02 F02B02 F03B02 F04B02 F05B02 F06B02 F07B02
31 0 31 0
0x200 0x500
Confidential
0x240 0x540
31 0 31 0
F01 Filter 01
Note: It is assumed that 8 bytes filter
sizes and NOT_MASK should be set to 0. CAM Filter
CAM Mask
00-03 Filters and mask block 0x200 0x500 04-07 Filters and mask block
08-11 Filters and mask block 0x240 12-15 Filters and mask block
16-19 Filters and mask block 0x280 20-23 Filters and mask block
24-27 Filters and mask block 0x2C0 28-31 Filters and mask block
00-03 Filters block 0x300 0x600 04-07 Filters block
08-13 Filters block 0x320 12-15 Filters block
16-19 Filters block 0x340 20-23 Filters block
24-27 Filters block 0x360 28-31 Filters block
32-35 Filters block 0x380 36-39 Filters block
00-03 Filters and mask block 0x3A0 0x6A0 04-07 Filters and mask block
CAM_RANGE
Note: This example has filters for three different types of streams. The second (40 filters in yellow)
Confidential
without mask. It has been assumed (see the memory address) that the filter for all the cases are
8 bytes filters. To select between the different types, the CAM_RANGE register should be as shown
over these lines. It shows the expected programed values to use each of the sets in different
contexts.
Automatic mode
In automatic mode the entire filtering process is performed in the SF with no intervention by the
ST40. The ST40 processes the packet header, sets up the SF with the required configuration,
and starts the SF engine. The SF then reads data directly from the TC input register and parses
the entire payload, outputting section data to the TC output register.
To allow the TC to intervene and customize automatic filtering, breakpoints are set at the
following events:
● after filtering any section (wanted or unwanted),
This enables the TC to add extra filtering, recover unwanted sections, or intervene between
sections.
Breakpoints are enabled by setting the appropriate bits in the SF configuration register.
Manual mode
In manual mode the TC core controls the filtering process, writing section data in order to the SF
header registers and reading the results from the SF, effectively using the section filtering and
CRC modules as special purpose hardware engines.
● long match mode (LMM): matches on CAM A line n and CAM B line n,
● positive/negative matching mode: matches on CAM A line n and not CAM B line n,
Standard filtering is performed by means of two CAM 32-bit wide memory cores (A and B), the
outputs of which are ANDed to give the final result. CAM A has an additional register
(PTI_SFNOTMATCH) containing five bits of data and one bit to enable not matching. CAM lines
are enabled or disabled using mask registers. Almost any CAM-based filtering match over 18
bytes can be programmed. The mapping of data to CAM A and CAM B for a single filter on each
of these modes is shown in Table 112 to Table 114.
PTI_SFDATAn has to be arranged inside CAM memory space as in Section 36.7: Section filter
on page 322
Table 112: SMM mapping
0 PTI_SFDATAn[63:56] PTI_SFDATAn[63:56]
1 Not used
2
Confidential
3 PTI_SFDATAn[55:48] PTI_SFDATAn[55:48]
4 PTI_SFDATAn[47:40] PTI_SFDATAn[47:40]
5 PTI_SFDATAn[39:32] PTI_SFDATAn[39:32]
6 PTI_SFDATAn[31:24] PTI_SFDATAn[31:24]
7 PTI_SFDATAn[23:16] PTI_SFDATAn[23:16]
8 PTI_SFDATAn[15:8] PTI_SFDATAn[15:8]
9 PTI_SFDATAn[7:0] PTI_SFDATAn[7:0]
10 Not used
11
12
13
14
15
16
17
0 PTI_SFDATAn[63:56] PTI_SFDATAn[63:56]
1 Not used
2
3 PTI_SFDATAn[55:48] PTI_SFDATAn[55:48]
4 PTI_SFDATAn[47:40] PTI_SFDATAn[47:40]
5 PTI_SFDATAn[39:32] PTI_SFDATAn[39:32]
6 PTI_SFDATAn[31:24] PTI_SFDATAn[31:24]
7 PTI_SFDATAn[23:16] PTI_SFDATAn[23:16]
8 PTI_SFDATAn[15:8] PTI_SFDATAn[15:8]
9 PTI_SFDATAn[7:0] PTI_SFDATAn[7:0]
10 Not used
11
12
13
14
15
16
17
● section filter process data: section filter state, CRC state, DMA write address,
● CAM engine configuration: number of filters in memory, filter length, first filter in memory,
prefetch ability,
● CAM matching results,
DMA
PTI_DMA0_SETUP DMA channel 0 byte not word mode and block move 0x1010 R/W
PTI_DMAn_SETUP DMA channels 1 to 3 byte not word mode and block move 0x1030, 0x1050, R/W
0x1070
Input interface
PTI configuration
37.1 DMA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
3_EMP
2_EMP
1_EMP
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
3_IEN
2_IEN
1_IEN
Reserved
7 6 5 4 3 2 1 0
Type: R/W
Reset: 0
Description: The PTI_DMA0STATUS register shows whether DMA channel 0 has overflowed. This
is only used when debugging TC code. The TC code is normally designed to read the
DMA0OVERFLOW bit and signal this condition to the ST40 software via one of the
interrupt status bits. The interrupt bit is also used as a handshake that the ST40
software has acknowledged the condition. Data is discarded by DMA channel 0 if the
buffer it is writing overflows.
[7:3] Reserved
[2] FIFO_FULL
1: The input FIFO has reached a full condition and stalled the interface to the TC, preventing any data
loss.
Write 1 to reset.
[1] DMA0_OVF: DMA 0 overflow
1: The channel 0 circular buffer has overflowed. Reset by writing 1 to this bit.
[0] DMA0_DONE
Set to 1 after inserting the last byte of the stream. This tells the DMA to flush data from the FIFO into
memory.
Reset to 0 by the DMA on completion. This occurs even if no data has been put in the FIFO.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x1000/
DMA0BASE
0x1000
0x1004/
DMA1BASE
0x1020
0x1008/
DMA2BASE
0x1040
0x100C/
DMA3BASE
0x1060
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
0x1030
DMA0_READ
0x100C
0x1034
DMA1_READ
0x102C
0x1038
DMA2_READ
0x104C
0x103C
DMA3_READ
0x106C
PTI_DMA0_SETUP DMA channel 0 byte not word mode and block move
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA0_WD_N_BURST_MODE
DMA0_BSEL
Reserved
Reserved
Sets word burst mode in conjunction with DMA0_BSEL; see Table 116 below.
[3] [0]
Word burst mode
DMA0_BSEL DMA0_WD_N_BURST_MODE
0 0 4-word-bursts
0 1 Word-at-a-time
1 0 8-word-bursts
1 1 16-word-bursts
PTI_DMAn_SETUP DMA channels 1 to 3 byte not word mode and block move
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMAn_BYTE_N_WD_MODE
DMAN_BLOCK_MOVE
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x1010
DMA0_TOP
0x1004
0x1014
DMA1_TOP
0x1024
0x1018
DMA2_TOP
0x1044
0x101C
DMA3_TOP
0x1064
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x1020
DMA0_WRITE
0x1008
0x1024
DMA1_WRITE
0x1028
0x1028
DMA2_WRITE
0x1048
0x102C
DMA3_WRITE
0x1068
case of channel 0 the DMA hardware updates the write pointer, the TC copies this back
to the data SRAM at the end of a packet, and the CPU should read the pointer from the
SRAM. In the case of channels 1 to 3, the write pointer is updated by the TC if channel
0 is writing to the buffer for that channel or by the CPU in the case that the CPU is
writing the data into the buffer.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x1064
DMA1_CD_ADDR Res.
0x1038
0x1068
DMA2_CD_ADDR Res.
0x1058
0x106C
DMA3_CD_ADDR Res.
0x1078
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA3_EN
DMA2_EN
DMA1_EN
DMA0_EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA_FLUSH
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CNT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved LATENCY
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FULL
Reserved CNT
[31:8] Reserved
[7] FULL
A full flag which is set when the FIFO becomes full. It is reset when the ST40 reads this register.
[6:0] CNT: Number of bytes in the input FIFO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CNT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DROP_PKT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved LCK_PCKTS
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SYNC
[1:0] SYNC
00: Default, if SYNC is activated use the internal clock
01: Use SOP
10: Use incoming TS_PKT_CLK
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SYNC_PER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CNT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LOOPBACK_EN
Reserved
D1_SEL
Reserved Reserved
[9:0] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x0040 AUDPTS[31:0]
AUDPTS[32]
0x0044 Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0x0048 VIDPTS[31:0]
VIDPTS[32]
0x004C Reserved
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
0x0050 STCTIMER[31:0]
STCTIMER[32]
0x0054 Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TC_SINGLE_STEP
TC_RST_IPTR
PTI_SW_RST
TC_EN
Reserved
38.1 Overview
The STx7100 supports concurrent transport stream processing of up to three independent
transport streams, using an SRAM-based packet manager and a single PTI. The incoming
transport packets are tagged with source ID and 42-bit time stamp.
The transport stream merger (TSMerger) has the following functionality:
● a bidirectional half-duplex interface that supports 1394 out and transport stream in,
● 3:1 stream merger capability at the PTI target using interleaved transport stream packets
with added tagging bytes.
The merger can produce an output stream from the PTI alternate output or the SWTS interface.
The outgoing packets are buffered in the merger and are presented to the output pins using a
dejittering mechanism that compares each packet time stamp with a fixed programmable offset.
Multiplexing in front of the merger block provides a bypass route to allow for CableCARD and
Confidential
DVB-CI support.
The PTI alternate output allows the entire transport stream or selected packets to be output
using the merger to an external device such as a digital VCR or IEEE1394 link layer controller.
The output pins can be tri-stated under software control to support low cost DVB-CI
implementations and similar module interfaces.
Also under software control, the transport stream input on TS0IN can be output directly using the
TS2INOUT pins. This is again to support low cost DVB-CI implementations. The returned stream
from the CI module can be input on the TS2 pins (TS2IN).
With this arrangement it is possible to support CableCARD and DVB-CI configurations.
The SWTS interface allows the CPU or FDMA to send transport streams from memory to the
merger for routing to the PTI or to be output via TS2. The SWTS FIFO generates an active high
pacing (request) signal that is routed to the DMA source for flow control. SWTS supports a
throughput of 100 Mbits/s.
The merger block manages two asynchronous input clock domains (TSBYTECLOCK0 AND
TSBYTECLOCK1 from TS0 and TS1 respectively), and generates a local clock derived from the
system clock for the transport stream output TS2. All other interfaces are synchronous with the
system clock.
NRSSA module
STx7100
TS merger
TS_IN0
(or NRSS-A input)
NRSS-A
parallel / serial IN0
interface
OUT0 PTI
*
Alt out
TS_IN1
(or D1 input) IN1
parallel / serial
* IN3 SWTS
IN2
TS_IN2
or TSOUT1394
IN4
(1394 interface)
*
1394
Confidential
Figure 82 shows the three live input streams delivered using three sets of transport stream
interfaces from the pads. Another stream is delivered from the return channel on the PTI (PTI
alternative output). The TSMerger supports parallel or serial streams on the three live stream
interfaces.
On the STx7100, the input pins TS1 are shared pins. This interface can be used for inputting
transport streams for processing by the PTI or for inputting digitized video (D1) conforming to
ITU-R BT 656 for processing by the digital video port (DVP).
Multiplexing and formatting performed around the TSMerger itself are controlled by software via
the system configuration registers. For details, see Chapter 6: System configuration registers
on page 46.
TS merger
P or S
i1
DVB-CI 1
TSIN0 o2
P or S Packet
i2 buffer
DVB-CI 2 memory
i5
TSIN1 P or S
i3
P
o1 i4
TSINOUT2
BYPASS_TS SWTS0
Confidential
NRSS-A smartcard
NRSSA_EN
NRSS-A
NRSS-A
TSin0
P or S
P or S
ATSC receiver TS0
STx7100
P
NTSC decoder TS1
P or S
ATSC receiver TS0
Confidential
STx7100
P
NTSC decoder TS1
P or S
Primary TS2
satellite or
cable receiver
Figure 87: Multi-tuner DVR satellite/cable system with NTSC and ATSC receivers
P or S
ATSC receiver
TS0
STx7100
2nd sat/cab
receiver DVR P or S
TS1
P
NTSC decoder
Primary P or S
satellite or TS2
cable receiver
Primary P
BS4 receiver TS0
STx7100
P
BS4 receiver
for DVR TS1
P
1394 LLC
P
TS2
CableCARD
P
Cable receiver TS0
STx7100
P
NTSC decoder TS1
TS2
CableCARD
P
Cable receiver TS0
STx7100
P
NTSC decoder TS1
P
1394 LLC
P
TS2
38.5 Architecture
Figure 91: Block diagram
TS0IN
TSIS Output block
1394
1394 FIFO
TS1IN
TSIS
To PTI
TS2IN Input FSM
TSIS merge
SWTS
From PTI
Confidential
Input Output
control control
Free running Programmable
counter counters
STBus block
Config
SWTS FIFO SRAM
SWTS_REQ
SOP
TSIS_SYNC_NOT_ASYNC = 0 VALID
SOP DATA
F8
47
05
82
13
04
VALID TS merger
DATA SOP
F8
47
05
82
13
04
Confidential
VALID
TSIS_SYNC_NOT_ASYNC = 1 DATA
F8
05
82
13
04
● Byte-aligned: TSIS_ALIGN_BYTE_SOP is used with serial transport streams. When this
bit is set to 0 the TSIS continues to take in bytes irrespective of where the PACKETCLK
goes high. When this bit is set high then the PACKETCLK is examined and the first bit of the
serial packet is put in to the MSB position of the outgoing parallel transport stream. The
advantage of having this bit high is that the start-of-packet is detected and the stream
leaving the TSIS is byte-aligned, negating the use of sync lock and drop further down
stream.
SOP
TSIS_ALIGN_BYTE_SOP = 1
VALID
SOP DATA
47
VALID
1 1 0 1 0 0 0 1 1 1 DATA[7] TS merger
SOP
TSIS_ALIGN_BYTE_SOP = 0 VALID
TSIS_ALIGN_BYTE_SOP = 0 DATA
D1
TSIS_ALIGN_BYTE_SOP = 1
Byte boundaries
Half-full register thrown away
● Start-of-packet detection: Enables the sync lock and drop mechanism on this stream
when the stream is played back from HD.
Note: The SOP_TOKEN in TSM_STREAMn_SYNC is reset to 0x47, but can be changed. The value of
the start-of-packet token which is inserted into the stream is the value held within this register
field.
SOP
TSIS_ASYNC_SOP_TOKEN = 1
VALID
SOP DATA
F8
47
05
82
04
13
VALID TS merger
DATA
1D
F8
05
82
13
04
SOP
VALID
TSIS_ASYNC_SOP_TOKEN = 0
DATA
1D
F8
05
82
13
04
● BYTECLK inversion: When INV_BYTECLOCK is high, the BYTECLK goes through an
inverter cell.
38.6.2 SWTS
SWTS playback data is sent across the STBus and into the TS merger. The data contains no
other information about the stream. It is assumed that every byte arriving into the SWTS register
Confidential
is valid data and that there are no erroneous packets (there is no error signal to specify this). A
repeating start of packet token (for example 0x47) is expected in order to reproduce a start-of-
packet signal. The remaining role of the TS merger is to reproduce the transport packet at the
correct frequency so there is little jitter and the playback of the video is correct. There are two
mechanisms for doing this. One way is to use the counter value placed within the packet. The
TS merger holds a packet in the SRAM until a programmable counter reaches the value of the
three lower counter bytes held in the packet header. Once the value is reached by the
programmable counter the packet can be sent on to the destination. While the current packet is
held, the SWTS data continues to send data from the next packet and store it in the SRAM.
When the SRAM circular buffer is full data propagation stops and no more DMA requests are
made. This allows the SWTS pacing to be controlled by hardware instead of software.
Packets only leave the buffer once the destination has completed previously-scheduled packets
in a queue. This means that the buffer must be large enough to hold one packet plus any extra
transport data arriving while the packet is stored. The space required therefore increases as the
number of streams to a single destination increases, that is 3:1 rather than 2:1.
If the FIFO circular buffer is about to overflow the hardware takes action to delete the
uncompleted packet and begins to store again from the next packet start. In this instance, some
packets may be lost. This scenario should not occur in a well-configured system and the
described mechanism is the cleanest way of getting out of the overflow condition.
Confidential
Stream
Stream name I3 I2 I1 I0
number
0 TS0IN 0 0 0 0
1 TS1IN 0 0 0 1
2 TS2IN 0 0 1 0
3 SWTS0 0 0 1 1
4 PTI_ALT_OUT 0 1 0 0
The five following bytes contain a counter stamp reference which is used during autopaced
playback, explained in Section 38.9.2: Delaying outgoing packets on page 354.
SOP
ADD_TAG_BYTES = 1
VALID
SOP DATA
C1
C4
C2
C0
C3
F8
05
82
04
47
13
ID
VALID TS merger
DATA
F8
05
82
13
04
47
SOP
VALID
ADD_TAG_BYTES = 0
DATA
F8
47
05
82
04
13
Not all streams require the ADD_TAG_BYTES field to be set because streams coming back from
hard disk that have already been through the TS merger when they were live and already have
the ID and counter bytes inserted. Having ADD_TAG_BYTES set for this type of stream causes
an extra six bytes to be inserted.
Streams that have already been sent through the TS merger once, for example SWTSs, do not
require additional bytes to be placed in their headers, however the stream must be modified to
update the ID field.
Setting stream ID
REPLACE_ID_TAG in TSM_STREAMn_CFG replaces the second byte in the packet with the
stream ID. If the incoming stream had not had the six extra bytes inserted originally then the
substitution still goes ahead, corrupting the first or second byte of data.
device. An example use of the 1394 ports would be to connect to a chip which interfaces to a
digital video camera or to a chip which interfaces to an external hard disk.
The 1394 output stream can be configured in a number of ways. The data leaving the TS merger
can be setup on the falling edge of the 1394 input BYTECLK or an internal clock can be
generated using the 1394_PACE field in TS_1394_CFG. Outgoing 1394 packets can be stripped
of any tagging bytes by setting 1394_REM_TAG_BYTES to 1.
● Hardware can automatically start the counter at the correct point (for the first packet in a
stream, it sets the programmable counter to the header counter value and sends the packet
to the destination).
When using the software method TSM_PROG_CNTn.AUTO_CNT should be set to 0.
TSM_STREAMn_STA.CNT_VAL holds the currently waiting packet header counter value so that
the programmable counter can be set to this figure. When AUTO_CNT = 1 and CNT_INIT = 0
then the programmable counter is set to the value of the waiting packet header counter value.
Once set, CNT_INIT is set to 1. To reinitialize the counter at any point the CNT_INIT field can be
set to 0 to force hardware reinitialization. Software can change the programmable counter value
at will; this does not affect the behavior of CNT_INIT or AUTO_CNT.
The playback speed is set by the CNT_INC field, for example 1 for normal playback, when the
counter is incremented by 1 every 27 MHz, 2 for x 2 playback (twice every 27 MHz). If the
counters are not required (for example there is no counter value to match in the header) then the
CNT_INC value should be set to 0.
to the 1394. The result of this is one (or more depending upon the size of the circular buffer
assigned to stream 8 in SRAM) very delayed packet and a large number of missing packets.
This problem has two solutions.
● Reprogram programmable counter 2
After receiving the first packet from the PTI, wait an amount of time and reprogram
counter 1 to a smaller value. This allows larger amounts of latency to be absorbed by
transport stream merger as it appears to transport stream merger that the subsequent
packets are arriving earlier from the PTI.
● Edit the packet header counter values
The TC can reprogram the header counter values so that it appears to transport stream
merger that the packets are able to be sent on later.
TSMerger PTI
TS packet
TS0IN
Free running counter Latency
1394OUT TS packet
Programmable counter 2
0 µs 1 µs 2 µs 3 µs 4 µs 5 µs 6 µs 7 µs 8 µs 9 µs 10 µs 11 µs 12 µs 13 µs
Problem:
TSIN
FR counter 125 750 1375 2000 2625 3250
1394 out
Latency
Packets miss counter 2 slot and have to wait
for counter to roll over... Loss of data....
Solution1:
PTI ALT OUT
Confidential
Solution2:
PTI ALT OUT
Prog counter 1 125 750 1375 2000
Header counter value
1394 out Increased for all packets
except first
This field is the counter value held within the header of the packet that is next in the queue to be
delivered to its destination. The purpose of having this visibility is that the software can check the
header value and adjust the programmable counter accordingly if any misalignment occurred and
the packet is holding up the stream unnecessarily.
IN_FIFO_OVF indicates that bytes of data could not be loaded into the input FIFO because the
FIFO was already full. This results in shorter packets arriving at the destination or that sync lock
is lost. In order to combat this occurrence, the stream arbitrator which decides which stream to
process each cycle, looks at each FIFO level and the most full FIFO gets priority. If two FIFOs
are equally full then the PRIORITY field decides between the tied FIFO levels. For high data rate
streams, priority should be set to a high value (for example 1111) and low data rate streams
should be programmed with a low priority (for example 0000), as the lower data rate stream is
less likely to overflow than a high data rate stream.
Reserved - 0x0018 -
Reserved - 0x0038 -
Reserved - 0x0058 -
Reserved - 0x0078 -
See also Chapter 6: System configuration registers on page 46, registers SYS_CFG0 and
SYS_CFG1.
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TSIS_SYNC_NOT_ASYNC
TSIS_ALIGN_BYTE_SOP
TSIS_ASYNC_SOP_TOK
TSIS_SER_NOT_PAR
RAM_ALLOC_START
REPLACE_ID_TAG
ADD_TAG_BYTES
INV_BYTECLK
STREAM_ON
Reserved PRI Reserved
[12:8] RAM_ALLOC_START
The RAM is separated into 64-byte words; this field designates the lowest word that is allocated to stream x.
[7] STREAM_ON: Gate the transport stream
This register bit stops transport data propagating to the SRAM before the circular buffers are setup.
If the stream is from off-chip, the byte clocks are disabled when this bit is low. If the stream is from the PTI
alternate outputs or from SWTS, the FIFO enables are disabled when this bit is low.
[6] REPLACE_ID_TAG
Controls whether the packet second byte is replaced with a new ID field, for use with SWTS or PTI alternative
output streams where the original ID is pointing to the source live stream ID.
[5] ADD_TAG_BYTES: Controls whether the stream header includes 6 bytes of ID and counter value
[4] INV_BYTECLK: Sense of the incoming BYTECLKs
0: The live stream BYTECLK is not inverted 1: The live stream BYTECLK is inverted.
[3] TSIS_ASYNC_SOP_TOKEN: TSIS async SOP token
1: The TSIS replaces the first byte of each packet with the value held in the SOP_TOKEN register. This
function is included in order to make DSS and DVB streams appear similar for the PTI.
[2] TSIS_ALIGN_BYTE_SOP
This bit is only valid for live input streams in serial mode and is ignored for live parallel stream, SWTS and PTI
alternate outputs.
0: TSIS builds up bytes bit by bit, until 8 bits are collated and sends out a byte.
1: TSIS looks at start of packet signal and starts a new byte with the data associated with this flag. The
previous byte is aborted in this instance.
[1] TSIS_SYNC_NOT_ASYNC
This bit is only valid for live input streams and is ignored for SWTS and PTI alternate outputs.
0: TSIS is in asynchronous mode. Asynchronous mode assumes all bytes with either valid high or
PACKETCLK high are valid.
1: TSIS is in synchronous mode. Synchronous mode assumes all bytes with valid high are valid.
[0] TSIS_SER_NOT_PAR: TSIS serial not parallel
This bit is only valid for live input streams and is ignored for SWTS and PTI alternate outputs.
0: TSIS is in parallel mode. 1: TSIS is in serial mode.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STREAM_LCK
IN_FIFO_OVF
ERR_PKTS
RAM_OVF
CNT_VAL
1: Indicates that the RAM block has overflowed at some point and is sticky.
[1] IN_FIFO_OVF: Input FIFO overflow
0: Indicates that the input FIFO has not overflowed.
1: Indicates that the input FIFO has overflowed at some point and is sticky.
[0] STREAM_LCK
0: Indicates that a sync lock and drop stream is not locked.
1: Indicates that a stream is locked when using sync lock and drop or that the stream is using packet
clocks for start of packet detection.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STREAM_4
STREAM_3
STREAM_2
STREAM_1
STREAM_0
Reserved
[0] STREAM_0
0: Stream 0 (TS0IN) does not go to the PTI 1: Stream 0 (TS0IN) goes to the PTI.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STREAM_4
STREAM_3
STREAM_2
STREAM_1
STREAM_0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AUTO_CNT
CNT_INITI
CNT_INC
Reserved
CNT_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PACE_MODE_SEL
SWTS_REQ_TRIG
SWTS_REQ
Reserved
Reserved
PACE_CYCLES
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OUT_AUTO_PACE
Reserved PACE_CYCLES
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REM_TAG_BYTES
CLK_SEL
DIR
Reserved PACE
0: Selects the incoming I_1394_BYTECLK port as the clock with which to synchronize data output.
1: Selects an internally generated clock as a clock source for 1394 clock pad.
[15:0] PACE: 1394 Pace
Defines the divide ratio of CLK_SYS that the 1394 port produces to clock data out.
Only used if 1394_CLKSRC = 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SYS_HALT
BYPASS
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SW_RST_CODE
SW_RST_LCK
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Part 6
Video
Confidential
Video data enters the device through a standard-definition interface, the digital video port (DVP),
which is described in this chapter.
40.1 Features
The main DVP features are:
Confidential
● ITU-R BT.601 / 656 compliance, 525/60i 720x480, 625/50i 720x576 nominal formats.
● External sync support for video streams that do not provide embedded code words
(SAV/EAV protocol).
● Video data is captured into the system local memory, in YCbCr4:2:2 raster format
(compatible with 2D-blitter as well as with the GDP display).
● User-defined capture window to select a subregion within the active area of the incoming
video.
● Generic ancillary data capture processor (SMPTE291M, ITU-RBT-1364), in a paged circular
buffer, for post-processing by a host CPU.
Embedded H flag
EAV SAV
TF_VBLK
Top field blanking
HBLK
TF_VAV
HAV
BF_VBLK
Bottom field blanking
External VSI (optional)
Embedded V flag
Embedded F flag
BF_VAV
An SAV and EAV header is made of four consecutive codewords, FF-00-00-XY: a codeword of all
ones, two codewords of all zeros and a codeword including F (top field/bottom field), V (blanking/
active), H (horizontal) and P3, P2, P1, P0 which are parity bits. The fourth codeword (XY)
depends on the value of F, V and H; see Table 119
bit 3 = P3
bit 2 = P2
bit 1 = P1
bit 0 = P0
bit 4 = H
bit 5 = V
bit 6 = F
bit 7 = 1
SAV
EAV
XY
1 0 0 0 0 0 0 0 0x80 x
1 0 0 1 1 1 0 1 0x9D x
1 0 1 0 1 0 1 1 0xAB x
1 0 1 1 0 1 1 0 0xB6 x
1 1 0 0 0 1 1 1 0xC7 x
1 1 0 1 1 0 1 0 0xDA x
1 1 1 0 1 1 0 0 0xEC x
1 1 1 1 0 0 0 1 0xF1 x
Table 120: ITU-R BT656 parameters for 525/60i and 625/50i formats
There are no restriction on the values of the different parameters. The interface must support
customized 656-like format: for example, 525 lines with 511 active lines (256 top + 255 bottom),
or square pixel formats (640 x 480 active area or 768 x 576 active area), and so on.
The only limitation is the PixClock2X highest frequency: 29.5 MHz
The 8-bit multiplexed luma/chroma bus scheme is shown in Figure 100.
Blanking codewords
EAV
SAV
EAV
0x80/0x10/0x80/0x10.... Active video data
Cbn-2
Crn-2
0x10
0x80
0x10
Cb0
Cb2
Cb4
Yn-2
Yn-1
Cr0
Cr2
Cr4
XY
XY
FF
FF
00
00
Y0
Y1
Y2
Y3
Y4
00
00
Confidential
● The first active pixel (pix0) is always a complete YCbCr pixel. The last active pixel (pixn) is
nominally a Y-only pixel, but DVP must support external chroma decoders that generate a
variable number of pixels per line (with a very poor quality analog source for instance).
● More generally, even-indexed pixel are YCbCr pixel (24 bits), odd-indexed pixel are Y-only
pixel (8 bits). Average pixel size is 16-bit.
● Y nominal range is 16 .. 235 (black to white), 1 .. 254 is the valid range that can be
supported by the DVP module.
● The Cb and Cr nominal range is 16 .. 240. 1 .. 254 is the valid range that can be supported
by the DVP module.
● 0 and 255 are reserved words, forbidden as valid video data.
● XY parity errors are detected and corrected when possible.
The software handling is quite simple, but it cannot manage consecutive adjacent packets
(some data may be lost). It can address basic (more common) applications, with only one or
no packets per line. The page must be greater than the biggest expected packet (generally,
of teletext data).
Initially, the first byte location of each page in the buffer must be set to 0 by the CPU, and
sets a track pointer on the first page. Then, on each DVP Vsync interrupt, the CPU checks
whether a new data packet has been received, by checking the first location of the page
Confidential
currently pointed by the track pointer. If the byte value is 0, no new packet has been
captured. If the value is 0xFF (the first value captured is always the second 0xFF byte of the
header), then a new packet is there. The CPU must process this packet (it discards the
packet or posts a message to another driver depending on the identification code), and
reset the first byte location of the page. Then it jumps to the next page, repeats the
operation, and so on until a 0 value is found as a first byte. Once that occurred, the track
pointer is finally updated for the next Vsync interrupt.
● The current page size always reflects the exact size on the current packet.
The length of the packet is extracted from the header (in 32-bit word units, from the sixth
byte of the header {6 LSBs}), and the exact number of bytes is captured. Consecutive
packets can be supported. In that case, the first byte to be captured is always the second
0xFF of the header, and the last byte to be captured is the checksum value (this hardware
version does not control the checksum value).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VALID_ANC_PAGE_SIZE_EXT
VSYNC_BOT_HALF_LINE_EN
SYNCHRO_PHASE_NOTOK
ODDEVEN_NOT_VSYNC
ANCILLARY_DATA_EN
MIX_CAPT_PRE_REQ
MIX_CAPT_PHASE
EXTENDED-1_254
BIG_NOT_LITTLE
EXT_SYNC_POL
MIX_CAPT_EN
H_REF_POL
V_REF_POL
EXT_SYNC
DVP_RST
Reserved
Reserved
Reserved
Reserved
VID_EN
PHASE
Address: DVPBaseAddress + 0x00
Type: R/W
Buffer: Double-buffered: update on DVP V_INIT event, except if indicated by ** (immediate)
Reset: 0x8008 0000
Description: Provides the operating mode of the DVP pipe, for the current capture
If this register contents change, it must be loaded after all others registers have been
loaded. After a hard reset, all registers must be loaded before DVP_CTRL, then
DVP_RST must be cleared to be able to take into account synchronization inputs
(external and embedded).
Confidential
[31] DVP_RST
0: Synchro inputs enabled
1: Synchro input disabled (either external or embedded)
[30:24] Reserved
[23] BIG_NOT_LITTLE
0: Memory data in little endian format
1: Memory data in big endian format
[22:20] Reserved
[19] MIX_CAPT_PRE_REQa: Mix capture pre-request
0: No compositor capture
1: Compositor capture enabled
Note: This unbuffered signal allows VTG_HREF, VTG_VREF and VTG_PIX2_CK to be taken into
account as input signals.
[18] MIX_CAPT_EN
0: No compositor capture
1: Compositor capture enabled
Note: this double buffered signal allows starting compositor capture at the beginning of field.
[17] MIX_CAPT_PHASE
0: Compositor data resynchronized with positive edge of pixel clock
1: Compositor data resynchronized with negative edge of pixel clock
[16] EXTENDED-1_254a
0: Input clipping range: 16/235 for luma and 16/240 for chroma
1: Input clipping range: 1/254 for both luma and chroma
[15] SYNCHRO_PHASE_NOTOKa
0: External vertical and horizontal synchronization signals are presumed to be in phase to initialize a top
field
1: External vertical and horizontal synchronization signals may be out of phase, in this case the vertical
synchronization signal must be earlier or later than horizontal synchronization signal with a maximum of
1/4 of line length
[14] Reserved
[13] VALID_ANC_PAGE_SIZE_EXT
0: ANC_PAGE_SIZE extracted from ancillary data bit[5:0] from header sixth byte
1: ANC_PAGE_SIZE given by DVP_APS register
[12:10] Reserved
[9] ODDEVEN_NOT_VSYNCa
0: In external sync mode, vertical reference is a Vsync signal
1: In external sync mode, vertical reference is an odd/even signal
[8:7] PHASE: First pixel signification of capture window during 8-bit video data capture
phase[7] = 0 first pixel is complete (CB0_Y0_CR0)
phase[7] = 1 first pixel is not complete (Y1)
phase[8] = 0 number of pixel to capture is even
phase[8] = 1 number of pixel to capture is odd
[6] V_REF_POLa: Vref polarity
0: The negative edge of VREF (if bit[4]=1) is taken as reference for the vertical counter reset.
1: The positive edge of VREF (if bit[4]=1) is taken as reference for the vertical counter reset
Note: In EAV/SAV mode, (bit[4] = 0). the positive edge is always active but the normal rising edge of V is
phased with the next active edge of H to respect the top field configuration
[5] H_REF_POLa: Href polarity
0: The negative edge of HREF (defined by bit[4]) is taken as reference for the horizontal counter reset.
1: The positive edge of HREF (defined by bit[4]) is taken as reference for the horizontal counter reset
0: Extract the H/V/F reference sync flags from embedded EAV/SAV codes
(H becomes HREF, V becomes VREF)
1: Use external HSI/VSI signals as sync reference (HSI becomes HREF, VSI becomes VREF )
[3] VSYNC_BOT_HALF_LINE_EN
0: VSOUT starts at the beginning of the last top field line
1: VSOUT starts at the middle of the last top field line
[2] EXT_SYNC_POLa: External synchronization polarity
0: negative for both horizontal and vertical (no meaning if EXT_SYNC= 0)
1: positive for both horizontal and vertical
[1] ANCILLARY_DATA_EN
0: No ancillary data is captured
1: Ancillary data is captured into the device local memory
[0] VID_EN
0: No video data is captured
1: Video data is captured into the device local memory
a. Bits not double buffered (taken into account when loaded by CPU). Others bits are validated by
vertical synchronization signal.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
64MB_BANK ADDRESS
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
64MB_BANK ADDRESS
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RESERVED PITCH_VAL
Type: R/W
Buffer: Double-buffered, update on DVP V_INIT event
Reset: 0
Description: Contains the memory pitch for the captured video, as stored in the memory.
[31:13] Reserved
[12:0] PITCH_VAL: Memory pitch for the captured video.
Note: the pitch is the distance inside the memory, in bytes, between two vertically adjacent
pixels within a field
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BOT_SIZE_RELATION
Pixmap height, in lines, being defined as the number of lines that must be read from memory for the
current field in an interlaced display
[31:28] Reserved
[10:0] PIXMAP_WIDTH: Pixmap width in pixels
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
External synchronization or
(internal synchronization with VSYNC_BOT_HALF_LINE_EN = 0):
VSYNC_H_DLY is the delay of VSOUT in samples units from external vertical
synchronisation input.
VSYNC_V_BOT_DLY is the delay from line counter clear;
the total number of samples delay from vertical synchronization input is:
VSYNC_H_DLY + VSYNC_V_BOT_DLY * NUM_SAMPLES_PER_LINE
internal synchronization with VSYNC_BOT_HALF_LINE_EN = 1 this delay becomes:
VSYNC_H_DLY + VSYNC_V_BOT_DLY * NUM_SAMPLES_PER_LINE +
HALF_LINE_LEN
to provide VSOUT on bottom field at the middle of last line of top field
Note: 1 VSYNC_V_TOP_DLY and VSYNC_V_BOT_DLY values must be lower than the number of lines
per field
2 This register is not double buffered (VSYNC_V_TOP_DLY and VSYNC_V_BOT_DLY are taken
into account when loaded by the CPU)
[31:28] Reserved
[26:16] V_BOT_DLY: Vertical delay for bottom field, in lines
[15:11] Reserved
[10:0] V_TOP_DLY: Vertical delay for top field, in samples
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
[15:13] Reserved
[12:0] HSYNC_H_DLY: Horizontal delay of hsout, expressed as number of 27 MHz samples (see DVP_VSD)
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved HALF_LINE_LEN
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSB
VST
Reserved Reserved
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSB
VST
Reserved Reserved
Reset: 0
Description: When a bit in the DVP_STA register changes from 0 to 1, the corresponding bit in this
register is set, independent of the state of DVP_ITM. If any set bit is unmasked, the line
DVP_IRQ is asserted. The reading of DVP_ITS clears all bits in that register. When
DVP_ITS is zero, the DVP_IRQ line is deasserted.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSB
VST
Reserved Reserved
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved LINE_NUM_STA
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved HLFLN
Description: This register specifies the number of half lines per vertical period.
This value is used when the bit SYNCHRO_PHASE_NOT_OK is set, then the vertical
synchronization is forced to be in phase with the horizontal synchronization signal to
generate a top field, the external vertical signal is ignored.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PKT_SIZE
42.1 Overview
The STx7100 contains a real-time MPEG1 and MPEG2 video decoder. The decoder is compliant
with the main profile at high level specified in ISO/IEC 11172_2 and ISO/IEC 13818-2.
As a picture (frame or field) decoder, the MPEG2 video decoder needs CPU support for each
picture.
When a decoding task is launched by the CPU, the MPEG2 video decoder starts to read the
video elementary stream stored in an external memory through the interconnect. The area in
memory where the stream is stored is called the bit buffer. The decoded picture is reconstructed
(written in external memory) in macroblocks (MBs). Each area in memory where a decoded
picture is stored is called a frame buffer.
An interrupt informs the CPU when decode is completed or when a problem occurs. The decoder
stops automatically when:
● all macroblocks have been decoded and it has found a start code different from a slice start
code, or
● when it has reached a programmed read limit.
The MPEG2 video decoder supports three extra features which are not part of the MPEG2
standard:
Confidential
● overwrite mode, see Section 42.5.3: Picture decoding configuration on page 396,
● possible simplified B decoding, see Section 42.5.7: Simplified B decoding on page 403,
Transport
stream DDR
Blitter
PTI LMI
STBus
Clock
recovery HD DACs SD DACs HDMI
Figure 102 shows an example of dataflow around the MPEG2 video decoder at the system level.
IRQ
FDMA
CPU Video ES
IRQ ES video bit buffer
MPEG2
decoder
HD analog out
Confidential
SD analog out
● The PTI extracts the packet of elementary streams (PES) video from the input stream and
sends them into the external memory through the interconnect.
● The PES are read back by the FDMA to extract the video elementary stream (ES). Each
part of the stream corresponding to a picture is written into memory in video linear picture
bit buffers.
● The ES is read by the MPEG2 video decoder, decoded and reconstructed into frame
buffers.
● Frame buffers are accessed by display(s).
● frame buffer: area in external memory in which decoded pictures are stored.
VID_VLDPTR
SC (variable length decoder read pointer)
ES 0
Confidential
ES stream of picture 0
Picture
start codes SC ES stream of picture 1
ES 1 Fake start code to stop
SC variable length decoder read
VID_VLDRL
SC (variable length decoder read limit)
Wrapped ES Start of ES 2
stream of picture 2 VID_BBE (bit buffer end)
External memory
When a decode is launched, the variable length decoder reads data until it reaches a start code
different from a slice start code. It can be the picture start code of the subsequent picture, or a
fake start code added at the end of the picture to stop the variable length decoder. The variable
length decoder read process can also be stopped with VID_VLDRL (see Stream pointers for
variable length decoder read access on page 397).
Address increment
...
...
Confidential
5 6
6 Row 0 0 1 2 5
NU Row 1 3 4 5 NU
7 Row 2 6 7 8 7
8 Macroblock number NU
(frame picture) Unused
memory area
NU NU
Where there is an odd number of vertical or horizontal macroblocks, memory is wasted, and this
has to be taken into account when allocating memory space for frame buffers.
The formulas below give the size of frames buffers depending on macroblock width and height:
● LumaBufferSize = MBwidth x ((MBheight + 1) DIV 2) x 512
where DIV corresponds to the integer part of a division, so x DIV y = integer part of (x/y)
A luminance macroblock (Y) contains 16 words of 128 bits. Inside this macroblock, data is
grouped by field and stored in the order:
● left part of top field,
Chroma macroblock (Cb + Cr) data contains 8 words of 128 bits. The chroma macroblocks are
stored in the same order as luma data (as listed above) but a word of 128 bits contains 8 bytes of
Cr data and 8 bytes of Cb data. A description is given in Figure 106.
For chroma
If ((frame_width MOD 2) = 1) AND (((address DIV 512) MOD frame_width) = (frame_width DIV 2))
then
MB_row= (((address DIV 512) * 2) DIV frame_width) * 2 +
((address DIV 256) MOD 2) +
((address DIV 128) MOD 2) * 2
else
MB_row= (((address DIV 512) * 2) DIV frame_width) * 2 +
((address DIV 256) MOD 2)
end if
MBcol = (((address DIV 512) * 2) + ((address DIV 128) MOD 2)) MOD frame_width
Frame buffers
The maximum size of a frame buffer, for HD PAL pictures (1920 x 1152 pixels), is 26.55 Mbits
(17.7 Mbits for luma frame buffer and 8.85 Mbits for chroma frame buffer, see Section 42.3.2 for
details).
A minimum of three frame buffers is required to decode field pictures. A minimum of four is
needed for frame pictures. The overwrite feature allows only three frame buffers to be used even
with frame-encoded pictures.
For trick modes (slow, normal or fast, backward or forward play), the number of frame buffers is
much higher, depending on the speed of the decoder and the required quality of fluidity.
Bit buffer
The memory need in terms of bit buffer is application dependant. The constraint imposed by the
standard (ISO 13818-2 annex C), called video buffering verifier (VBV) can be applied on the ES
or on the PES buffer. If it is applied on the PES buffer, the application must take into account the
PES headers’ size.
STBus
DISP_GH2_ROW_NB
Bus interface
Motion
IRQ
Confidential
Variable compensation
unit Pipe Controller
NOT_RST length
end
decoder
Pipeline
42.4.1 Controller
The control of decoding tasks is managed by the controller block. The controller block:
● holds the VID_EXE register to execute a decoding task and manages its synchronization on
both clock domains,
● holds the VID_SRS register to do a soft reset,
● provides a set of interrupts which gives the status of the decoding process.
● decodes the motion vectors and delivers them to the motion compensation unit,
● detects bitstream errors and conceals corrupted and missing data (see Section
42.5.5: Error recovery on page 399),
● provides the number and the location of corrupted macroblocks in the picture (see Section
42.5.6: Error statistics on page 402).
The variable length decoder is launched by the VID_EXE register for each picture to be decoded:
When the variable length decoder is launched with a pointer defined in bytes, processing starts
at the exact byte location, but the data sent to the variable length decoder in its FIFO is aligned
on a 128 bytes burst, that is the eight LSBs of the pointer are ignored for memory access.
The variable length decoder may be launched with a pointer not aligned with a picture start code.
The internal state machine of the variable length decoder, when a decoding task is launched, is
to search only for slice start codes. When the first slice start code is detected, processing starts
(Figure 108).
During the decoding task the variable length decoder FIFO requests data when there is space for
one burst, that is when the FIFO is up to half full.
Figure 108: Variable length decoder processing possible pointer position for good behavior
Gop start code Picture start code Slice start codes Picture start code
bitstream
The variable length decoder enters in an idle state at the end of the decoding process when it
detects a start code different from a slice start code. If there is no start code at the end of the
picture in memory, the start code may be inserted by the application software at the very end of
the picture. If no start code has been found, then the variable length decoder automatically stops
on the read limit pointer (VID_VLDRL). Analyzing the bitstream after the end of a picture (when
no start code is present) is not recommended because the variable length decoder may find
other slice start codes and generate an overflow error (DOE interrupt).
R_OPC VLDRL
Normal
Software Software Other external sequence
dependant reset event
7 5
Abnormal cases
This covers decoding tasks that end by an interrupt different from DID or that is interrupted by a
Confidential
software reset. See below all the different cases and the possible software action.
● DOE interrupt
For overflow errors, the decoder can be programmed for the next decoding task, no reset or
specific action is needed. The software may decide whether to display the decoded picture.
● DUE interrupt
For underflow errors, the decoder can be programmed for the next decoding task, no reset
or specific action is needed. The software may read debug registers (6) to decide to display
or not the decoded picture.
● MSE interrupt
For syntax or semantic errors the decoder can be programmed for the next decoding task,
no reset or specific action is needed. The software may read the error statistic registers
(VID_MBEx) registers (6) to decide whether to display the decoded picture.
● VLDRL interrupt
The decoder has reached the read limit without having completed the decoding task and is
in an unknown state. A soft reset (5) must be performed before executing the next decoding
task.
● R_OPC interrupt
Software can decide to interrupt the decoding task at any time for several reasons: for
example a channel switch or the decoding task is too long (overtime or overrun). The
current decoding task can be interrupted at any time by a software reset (5).
Note: It is not recommended to write in VID_EXE during a decoding task, that is, when
VID_STA.DID = 0, because the current and the next decoding tasks may fail. To execute a
decoding task correctly while another one is still active, STMicroelectronics recommends
stopping the current one by writing to VID_SRS.
Before the decoding of each picture, the following frame buffer pointers must be set up:
● VID_RFP, VID_RCHP: reconstructed frame pointers for luminance and chrominance for
main reconstruction,
● VID_FFP, VID_FCHP: forward prediction frame pointers for luminance and chrominance,
● VID_BFP, VID_BCHP: backward prediction frame pointers for luminance and chrominance.
VID_FFP, VID_FCHP, VID_BFP and VID_BCHP define the areas in memory for the predictors.
How these four pointers are used depends on the prediction mode. The rules are given below.
Note: Pictures are always stored as frames, and to access a field (top or bottom), the starting address
of the frame must be defined.
● P-frame picture (frame, field or dual-prime prediction)
VID_FFP and VID_FCHP are set to the address of the predictor frame. VID_BFP and
VID_BCHP are not used.
● B-frame picture (frame or field prediction)
VID_FFP and VID_FCHP are set to the address of the forward predictor frame. VID_BFP
and VID_BCHP are set to the address of the backward predictor frame.
● P-field picture (field, 16 x 8 or dual-prime prediction)
When decoding either field, VID_FFP and VID_FCHP are set to the address of the previous
decoded I or P frame. VID_BFP and VID_BCHP are not used.
● B-field-picture (field or 16 x 8 prediction)
VID_FFP and VID_FCHP are set to the address of the frame in which the two forward
predictor fields lie. VID_BFP and VID_BCHP are set to the address of the frame in which
the two backward predictor fields lie.
For I-picture decoding, no predictors are necessary, but VID_FFP and VID_FCHP must be set to
the address of the last decoded I or P-picture for use by the automatic error concealment
function.
For the P-field picture, an on-chip mechanism selects the pointers which must be used for the
prediction between the forward frame and the reconstructed frame pointers. If the decoded field
is the first field, the prediction is done in the forward reference frame. If it is the second field, the
prediction is done using both forward and reconstructed frame pointers. The field number (first or
second) is computed by the MPEG2 video decoder. It may be overwritten by the application with
FFN (in VID_PPR). This may be useful for trick mode applications.
Picture parameters
These parameters are extracted from the bitstream. They have to be programmed in VID_PPR.
performed as described in Figure 110. When decimation is needed in both direction, the vertical
decimation is performed after the horizontal decimation.
If, due to decimation, the resulting picture is not a multiple of 16 pixels horizontally or vertically
(size of luma stored macroblock), the actual stored picture is rounded up to the closest multiple
of 16 pixels in the appropriate direction(s). Right side and/or bottom side of the stored picture is
the garbage and has to be removed within the display processor prior to display.
When the decoded picture belongs to a progressive sequence, vertical decimation is done in the
frame. Else, vertical decimation is done in the field.
Reconstructed frame pointers for luminance and chrominance for secondary reconstruction are
VID_SRFP and VID_SRCHP.
At any time, the CPU may read the position of the next macroblock to be decoded in the
reconstructed frame buffer in register VID_MBNM for the main reconstruction and VID_MBNS for
the secondary reconstruction.
X
X X O X
O
X X
O
X X O
X O
O
Confidential
X
X X O X
O
X X
O X
X X O
O
O
X X
X O
O
X X
X X
O
O
X X
X
O
X X O
O
O
X
X X O
O
X X X X X X X X
X X X X
X X X X X X X X
X X
The variable length decoder detects the syntax and semantic errors listed below. The way to
conceal errors is different depending on the detected errors. Table 122 describes errors that are
detected by the MPEG2 video decoder. Error concealment is described below the table.
next_dct_coef
Semantic error:
The way of encoding slices and macroblocks does not follow MPEG2 rules.
Slice Slice start code combined with See Procedure one on page 401 Yes
macroblock address increment gives
a macroblock number already
decoded.
Slice start code combined with
macroblock address increment gives
a macroblock number higher than the
macroblock number to be decoded.
Macroblock mb_addr_increment may result in a See Procedure two on page 402 Yes
macroblock address greater than the
picture size. The macroblock is
outside the picture.
The processing of the different If bit MVC in VID_TIS is one, the vector is No
parameters in motion_vectors(s) clipped to point in the picture area. Else, a
may result in a motion vector outside prediction out of the reference picture is
the reference picture. done.
QFS[0] may not lie in the range 0 to If negative value, the coefficient is set to 0 No
((2^(8+intra_dc_precision))-1). but the predictor remains negative
Block Too many coefficients may be found in See Procedure one on page 401 Yes
a block.
a. MBE: when yes, the error is taken into account in VID_MBEn registers. When no, the error is
not taken into account.
Procedure one
If the variable length decoder detects a syntax or semantic error in the bitstream, the pipeline
copies macroblocks from the previous picture. It uses the motion vectors reconstructed for the
previous row of macroblocks in the current picture, and scans the bitstream until a slice start
code is detected. At this point, normal decoding resumes.
If the error occurred in the last slice in the picture, concealment continues until the end of the
picture. The pipeline then stops normally, assuming that the following picture start code is intact.
Macroblocks are concealed using the vectors of the macroblock immediately above the lost
macroblock.
Concealment macroblocks are accessed using the forward and backward reference frames. Lost
macroblocks in the first row are copied directly from the previous pictures, that is as
P-macroblocks with zero motion vectors. If an intra macroblock is coded with concealment
motion vectors, the concealment motion vectors are used. If not, concealment is a simple copy
from the previous picture using zero vectors.
Table 123 shows the rules used to fetch concealment macroblocks. Skipped macroblocks are not
mentioned since they always refer to one of the prediction types listed below.
Procedure two
When the decoder detects that the input stream is not compliant with the restricted slice
structure, the decoder reconstructs missing macroblocks by copying macroblocks from the
forward reference picture with a null motion vector using frame prediction in a frame picture and
field prediction in a field picture.
The decoder detects a nonrestricted slice structure when the slice start code combined with the
first macroblock address increment gives an absolute address which is higher (+2 at least) than
the previous decoded macroblock number. The decision (restricted or nonrestricted slice
structure) is taken on the first macroblock following the slice start code.
An underflow occurs when the last slices are missing and a different start code to a slice start
code or an error start code is detected. Missing macroblocks are reconstructed if RMM in
VID_TIS = 1, and are not reconstructed if RMM = 0. For underflow errors, the underflow flag in
the status register is always set.
on a picture start code. Then, it returns in idle state. The underflow condition is flagged by the bit
DUE in VID_STA.
The number of macroblocks reconstructed in memory is equal to VID_DFS if RMM in
VID_TIS = 1 (missing macroblocks are concealed).
VID_DFWn
Secondary decoding requires an additional 50% of main picture bandwidth - 2108 Mbit/s (B) or
1356 Mbit/s (SB/P).
42.6 Resets
Reserved - 0x0010 -
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VID_EXE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
These data are stable at the end of the picture decoding task until the start of the next
picture decoding task (whether the video channel is 1 or 2).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RMM
OVW
MVC
SBD
Reserved
Reset: 0
This register contains the decoding task instruction.
[31:4] Reserved
[3] RMM: reconstruct missing macroblock.
1: In case of underflow, the missing macroblocks are reconstructed.
[2] MVC: motion vector check
1: Ensures that motion vectors used for prediction remain inside the picture (see Table 122: Error
detection on page 400).
[1] SBD: simplified B picture decoding
1: B picture decoding is simplified to save bandwidth: all bidirectional macro blocks are processed as
forward.
[0] OVW
1: Enable overwrite mechanism during decoding
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
CMV
FRM
QST
MP2
FFN
AZZ
TFF
IVF
PCT DCP PST BFV FFV BFH FFH
error occurs in the stream and a field is lost, this bit must be set at the proper value by the application. It
may be used also in still picture decoding.
[27] TFF: Top field first
Set equal to the TOP_FIELD_FIRST bit of the MPEG-2 picture coding extension.
[26] FRM
Set equal to the FRAME_PRED_FRAME_DCT bit of the picture coding extension.
[25] CMV: Set equal to the CONCEALMENT_MOTION_VECTORS bit of the MPEG-2 picture coding
extension. Indicates that motion vectors are coded for intra macroblocks.
[24] QST: Set equal to the Q_SCALE_TYPE bit of the picture coding extension.
[23] IVF: Set equal to the INTRA_VLC_FORMAT bit of the picture coding extension.
[22] AZZ
Set equal to the ALTERNATE_SCAN bit of the picture coding extension.
[21:20] PCT[1:0]: Set to equal to the two least significant bits of PICTURE_CODING_TYPE in the picture
header.
[19:18] DCP[1:0]: Set equal to INTRA_DC_PRECISION of the picture coding extension. The value 11, defining
a precision of 11 bits, is not allowed.
[17:16] PST[1:0]: Set equal to the PICTURE_STRUCTURE bits of the MPEG-2 picture coding extension.
Note: code 00 also indicates frame structure, even though this value is illegal in the MPEG-2 variable.
00: Frame picture 01: Top field
10: Bottom field 11: Frame picture
[15:12] BFV[3:0]: Set equal to BACKWARD_VERTICAL_F_CODE of the picture coding extension.
[11:8] FFV[3:0]: Set equal to FOWARD_VERTICAL_F_CODE of the picture coding extension.
[7:4] BFH[3:0]
In MPEG-1 mode BFH[3] is set equal to FULL_PEL_BACKWARD_VECTOR of the picture header, and
BFH[2:0] is set equal to BACKWARD_F_CODE of the picture header. In MPEG-2 mode BFH[3:0] is set
equal to BACKWARD_HORIZONTAL_F_CODE of the picture coding extension.
[3:0] FFH[3:0]
In MPEG-1 mode FFH[3] is set equal to FULL_PEL_FORWARD_VECTOR of the picture header, and
FFH[2:0] is set equal to FORWARD_F_CODE of the picture header. In MPEG-2 mode FFH[3:0] is set
equal to FORWARD_HORIZONTAL_F_CODE of the picture coding extension.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VID_SRS
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R_OPC
VLDRL
MSE
DOE
DUE
DSE
DID
Reserved
interrupt is generated when a bit in the VID_STA register changes from 0 to 1 and the
corresponding mask bit is set.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R_OPC
VLDRL
MSE
DOE
DUE
DSE
DID
Reserved
VID_STA Status
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R_OPC
VLDRL
MSE
DOE
DUE
DSE
DID
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DFH[6:0]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DFS
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DFW
picture. This is derived from the horizontal size value transmitted in the sequence
header.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VLDPTR[31:8] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VLDPTR[31:8] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VLDRL[31:8] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VLD_PTR[31:7] Reserved
where the variable length decoder should start decoding the task must be written here
before each decoding task.
This value is taken into account as soon as VID_EXE is accessed. It then holds the
current variable length decoder read pointer address given in 128-byte units.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BCHP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BFP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FCHP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FFP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RCHP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RFP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRCHP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRFP[31:9] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ENM
ENS
PS
Reserved VDEC HDEC
44.1 Introduction
This chapter describes the Delta decoder (decode engine for low-bit-rate TV applications) which
is the STx7100 H.264 high profile video decoder (also known as MPEG-4 part 10, MPEG-4/AVC
and H26L).
The Delta decoder accepts only H.264 byte stream NALs. It only processes slices; all other
information (like PTS-DTS, sequence, picture, SEI) are managed externally. The host processor
launches the picture decoding process interrupting the embedded processor (ST231).
• DMA management,
• UE/SE/iBin decoding for H.264 syntax elements (MB headers decoding),
• CABAC and CAVLC Residual entropy decoding,
• Inverse zig-zag, IQ, IT,
• Inter MB motion vectors computation,
• Temporal and spatial prediction,
• Deblocking filtering,
• Picture reconstruction in external memory,
● Embedded processor,
• ST231 with firmware, used for syntax parsing, error concealment, intraprediction, motion
vector processing,
• Hardwired functions control.
Confidential
STBus
Bitstream Parser
Reconstruction
ST231 handler
R/W W R
I bin CABAC / CAVLC
CABAC / CAVLC Deblocking
VLD
Pre-processor
ZZ / IQ / IT Spatial
prediction
Macro-block
Temporal
processor prediction
Memory
Circular PES
PTI
back-buffer
FDMA Memory
Memory Memory
Intermediate Decoded
Circular ES
Confidential
Pre-Processor
CABAC
Parser
CAVLC Macro-block
Processor
• sequence parameter set (SPS): the host CPU has to manage up to 32 sets,
• picture parameter set (PPS): the host CPU has to manage up to 256 sets,
• supplemental enhancement information messages (SEI): these messages assist in the
processes related to decoding or display of video but are not required for reconstructing
the luma or chroma samples,
● control of the decoder (pre-processor and core) on a picture basis,
● picture boundaries detection in the bit buffer using the slice start-code and the first field of
the slice header. The read stop-address passed to pre-processor is the address of the first
byte of next picture start code minus one.
● The ST40 and the Delta ST231 can each receive and generate interrupts with the dedicated
mail box (see Chapter 27: Mailboxes on page 220).
The commands or the status placed in memory by the ST40 or by the embedded processor form
the multimedia engine (MME) API.
44.4 Firmware
The H.264 firmware is the code executed by the Delta ST231 and is delivered with the software
driver.
While the pipeline is emptying the input FIFO, the firmware computes all the parameters needed
to control the prediction and the deblocking. If direct mode is used for this slice, the firmware read
the collocated MB context from PPB buffer (picture parameter buffer). It then sends another MB
command to configure the prediction and deblocking engines.
After this processing, the firmware reads the hardware status in order to determine if:
● all the residual have already been read,
Pre-processor reset
The preprocessor is reset by writing a value in the PRE_SW_RST register. An interrupt is
generated when the soft reset is completed.
45 Teletext DMA
● The data-field consists of three fields: framing code, magazine and packet address, and
data block fields. These three fields provide the block of teletext data.
The framing code is a single byte of hexadecimal value 0xE41. The data is transmitted in order,
Confidential
Teletext line
(45 bytes, 360 bits)
1. Specification for conveying ITU-R Systems B teletext in digital video broadcasting (DVB)
bitstreams.
TTXTCLK
27 MHz
TTXTREQ
The duration of the TTXS window is 1402 reference clock periods (51.926 µs), which
corresponds to the duration of 360 teletext bits.
The delay between signal TTXTREQ becoming high and the transfer of the first bit of the teletext
packet is between two and nine 27 MHz clock cycles. This delay is programmed by register bits
DEN_TTX1.TTXDEL[2:0]. The value written to this register is increased by two 27 MHz clock
cycles, so the value 0 corresponds to an overall delay of 2 x 27 MHz clock cycles, and the value
7 corresponds to a delay of 9 x 27 MHz clock cycles.
Confidential
The interrupt status is given by register TTXT_INT_STA and masked by TTXT_INT_EN. The
interrupt bits are reset when the CPU writes to the acknowledge register, or when a DMA
operation is completed.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA_ADDR
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DMA_CNT
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DELAY
7 6 5 4 3 2 1 0
INOUT_
Reserved EVEN ODD
COMPLETE
[31:3] Reserved
[2] EVEN: Current (video encoder) field is even.
[1] ODD: Current (video encoder) field is odd.
[0] INOUT_COMPLETE: Teletext input or output operation completed.
7 6 5 4 3 2 1 0
INOUT_
Reserved EVEN_EN ODD_EN
COMPLETE_EN
47.1 Overview
The 2D-graphics processor is a CPU accelerator for graphics picture handling. It is a dual-source
DMA, with a set of powerful operators. It receives data from the local memory through two input
sources, source 1 and source 2.
● Source 1 is used for frequent operations such as color-fill or simple source-copy; it has a
64-bit wide internal bus and performs according to the pixel format.
● All operators always apply to source 2. The processing pipeline bus is always a pixel bus
(ARGB8888 format), whatever the format of the source inputs.
● Sources 1 and 2 are used simultaneously for read/modify/write operations.
The 2D-graphics processor is software-controlled by a link-list mechanism. Each node of the link
list is an instruction that contains all the necessary information to proceed.
The 2D-graphics processor operates at a clock rate of up to 153 MHz. For each operation
involving source 2, the maximum output rate is 153 Mpixel/s, whatever the pixel depth. This rate
is constant except for 2D resizing for downsampling, where it is 100 x HSF x VSF (horizontal and
vertical scaling factors). When source 1 is used in direct-copy mode, the internal bus width is
64 bits and the maximum output rate is 800 Mbyte/s. These values are maximum performances
that the blitter can reach; they assume that no read/write memory word request has been
Confidential
Table 127: Performance for typical operations over a range of target pixel sizes (Mpix/s, at
output), for a 100 MHz clock
The 4:2:0 plane can be used as a source for the 2D-graphics engine. Because this plane uses
both the source 1 and source 2 buffers, special modes are required. These modes are described
in Section 47.6 on page 448.
47.2 Functions
● Solid color fill of rectangular window.
● Solid color shade (fill plus alpha blending).
● One source copy, with one or several operators enabled (color format conversion, 2D
scaling).
● Two-source copy with alpha blending or logical operations between them.
● 4:2:2 raster as source or destination format.
● 4:2:2 and 4:2:0 macroblock as a source format.
● Color space conversion RGB to or from YCbCr.
● Color expansion (CLUT to true color).
● Color correction (gamma, contrast, gain).
● Color reduction (true color to CLUT1, CLUT8 and CLUT4 or CLUT2) using an error diffusion
algorithm.
● 2D resize engine with high quality filtering.
● Adaptive flicker filter from memory to memory.
● Color keying capability.
● Rectangular clipping.
● Programmable source/target scanning direction, both horizontally and vertically, in order to
handle overlapping source and destination areas correctly.
Confidential
● 1-bit/8-bit clipmask bitmap so random shape clipping can be achieved in two passes.
● Plane mask feature available.
● Special XYL access mode, to speed random pixel access, or horizontal line drawing (such
as polygon filling or run-length decoder accelerator). See Section 47.7 on page 449.
Source and destination windows are all defined using an XY descriptor, with pixel accuracy from
1 to 32 bpp, whatever the format.
Most of these operators can be combined in a single blitter pass. For instance, a YCbCr 4:2:2
bitmap can be converted to 4:4:4 RGB, resized and finally blended on an RGB565 background
picture.
128 128
Source 1 Source 2
buffer buffer
Bus formatter
only 4:2:2 or 4:2:0 source 2 and
64 source 2 color-fill
Bus formatter
source 1 and
source 1 color-fill 4:2:2:4 to 4:4:4:4
conversion
Byte-shifter and
Source1 color-fill 32 YCbCr <> RGB
conversion
32
CLUT or
Confidential
color correction
64 Color reduction
engine
Resize engine
and flicker-filter
ALU
alpha blending Global_Alpha
or ROP-Register
boolean operator
Color-key
Rectangular
Write enable
clipping
64-bit bus
Target 4:4:4 to 4:2:2
32-bit pixel bus
buffer conversion
128
Bus formatter
Plane mask
Target (+ dither)
to local memory
The blitter works from memory to memory with a dual or single source and one target. The target
can be one of the sources. A set of overlaps between sources and target is supported, provided
that the pixmap horizontal and vertical scan ordering are correctly programmed for each source
and the target. Each source and target may be programmed independently.
Each source and the target is associated with a specific set of registers. Another register
(BLT_INS) is used to control the data flow with operator enables. Each time an operator is
enabled, the user has to specify its behavior with operator specific registers. If the blitter is not in
direct mode (64-bit internal bus), the ALU operator is always enabled and must be programmed.
3. Set the trigger start condition if needed (BLT_INS.TRIG_COND_CTRL) and start the blitter
by setting bit START (BLT_CTRL), and then setting it back to 0.
4. If trigger on a raster scan line has been selected, the user must program register BLT_RST
to set the line number.
Note: The blitter sees a 32-bit address space, but always writes inside a 64 Mbyte bank for a given
object (for example, source-target node).
The blitter can set three kinds of interrupt that may be masked by IRQ_MASK (BLT_INS):
● once a blitter pass is completed and before the next has been loaded,
● once the blitter has reached the idle state following the suspend command.
For each interrupt, the blitter stops and the user should restart it to continue.
User information
Confidential
Register BLT_USR is used as user information for the node for software purposes.
Note: As a result of the number of input formats, output formats, available operators and different
configurations, many register combinations have no meaning in terms of the graphics blitter.
Registers must be programmed with this in mind.
Figure 118: Endianness conversion for nodes, filter coefficients, CLUT, XYL parameters
MSB LSB
For a given node, the endianness may be defined for the source 1 bitmap, source 2 bitmap, and
target bitmap (BIGNOTLITTLE in BLT_S1TY, BLT_S2TY and BLT_TTY). Usually bitmap
endianness is in line with the host CPU endianness, and these bits are programmed in the same
way as BIGNOTLITTLE in BLT_PKZ. However, when importing a bitmap, for example, its
endianness can be converted. This corrects all potential endianness issues. The endianness
format conversion affects only the 16 bpp, 24 bpp and 32 bpp formats. For YCbCr422R format,
the pixels that only have 8 bit luminance remain unaffected, only the 24 bit pixels are swapped.
In direct copy mode, the endianness of the bitmap is not taken into account. This is a pure
memory to memory operation without any modification.
Color
YCbCr 4:2:2 data
Note: In this last mode, no alpha value is produced by the block, and the bus carries two pixels
simultaneously. The alpha channel (128 = opaque) is inserted by the 4:2:2 to 4:4:4 converter
(next block in the pipeline), that is automatically enabled in this configuration.
When the input picture has an 8-bit per pixel alpha component, this component can have a
0 to 128 or 0 to 255 range. The internal 8-bit alpha format being 0 to 128, a 0 to 255 alpha
component is converted using the following formula: A0 to 128 = (A0 to 255 + 1) x 2-1. The alpha
range formatter is present for source 1, source 2 and target.
scan order, sub-byte ordering (for sub-byte formats), color depth expansion mode.
BLT_S1XY is the coordinate that specifies the start of the source 1 input window with respect to
the base address.
BLT_S1SZ specifies the size of the source 1 window (equals the target size).
Alpha = 128
Cb (8 bits)
Missing chroma samples are recovered with a 2-tap interpolator. Possible side effects on the
edges are handled using sample duplication, if required, using the following schemes.
The input source line starts at address x0, and contains n pixels.
Convention: when x0 is even, the first pixel is a complete CbYCr pixel, when x0 is odd, the first
pixel is a Y-only pixel. Four cases must be taken into account:
Confidential
This block is automatically enabled by the hardware if the target output format is YCbCr 4:2:2
raster. In this case, neither vertical resize nor flicker filter can be used at the same time as
horizontal resize.
The sampling rate conversion for the chroma component uses a three-tap 1:2:2 digital filter, as
shown in the next tables.
The output target line starts at address x0, and contains n pixels.
Convention: when x0 is even, the first pixel is a complete CbYCr pixel, when x0 is odd, the first
pixel is a Y-only pixel. Four cases must be taken into account:
Y1 Y2 Y3 Y4 ........ Yn-1 Yn
(Cb1+2Cb2+Cb3) / 4 (Cb3+2Cb4+Cb5) / 4 (Cbn-2+2Cbn-1+Cbn) / 4
(Cr1+2Cr2+Cr3) / 4 (Cr3+2Cr4+Cr5) / 4 (Crn-2+2Crn-1+Crn) / 4
Graphics matrix
The following ranges are assumed:
0 ≤R, G, B ≤255
16 ≤Y ≤235
16 ≤Cb, Cr ≤240 in offset binary representation, -112 ≤Cb, Cr ≤+112 in two’s complement signed
representation
The next tables show the hardwired matrices used for the conversion (assuming offset binary
chroma):
Video matrix
In the case of video matrix, Y, Cb and Cr are not clipped as in the graphics matrix. The following
ranges are assumed:
0 ≤R, G, B ≤255
0 ≤Y ≤255
0 ≤Cb, Cr ≤255 in offset binary representation, -128 ≤Cb, Cr ≤+127 in two’s complement signed
representation.
Converting from YCbCr to RGB:
● The Y component is not clipped before applying the matrix.
The next tables show the hardwired matrices used for the conversion (assuming offset binary
chroma):
● The chroma range is -112 to +112, and can be optionally encoded in offset-binary format
(+128, 16/240 range).
In register BLT_CCO, CCO_INCOL sets the input color converter colorimetry (601 or 709), and
CCO_INSIGN sets the input color converter chroma color sign. CCO_INDIR sets the input color
converter direction (RGB to YCbCr or YCbCr to RGB), and the output color converter is
automatically programmed with the other direction.
CCO_OUTCOL sets the output color converter colorimetry (601 or 709), and CCO_OUTSIGN
sets the output color converter chroma color format: signed or unsigned.
CCO_INGFXnVID sets the input color converter to graphics or video matrix, and
CCO_OUTGFXnVID sets the output color converter to graphics or video matrix.
The next tables show the hardwired matrices used for the conversion (assuming offset binary
chroma):
Video matrix
Converting from RGB to YCbCr:
● The Y component is clipped between 1 and 254, after applying the matrix.
● The chroma range is -127 to +126, and can be optionally encoded in offset-binary format
(+128, 1/254 range).
The next tables show the hardwired matrices used for the conversion (assuming offset binary
chroma):
Configuration bit BLT_CWO.INTNL inverses the clipping window; the target area is updated
outside the clipping window and is protected inside the clipping window.
XDO and YDO (register BLT_CWO) define the window start with respect to the target base
address.
XDS and YDS (BLT_CWS) define the window stop with respect to the target base address.
Color expansion
During color expansion a CLUT-based bitmap is transformed into a true-color bitmap, using the
embedded look-up table (256x32 SRAM). The following two figures illustrate a CLUT-to-RGB
conversion and a CLUT88/44-to-RGB conversion.
Red LUT
256 x 8 SRAM R / 8 bits 0 to 255
CLUT-index, (2n used)
n = 1-2-4 or 8 bits
Green LUT
256 x 8 SRAM G / 8 bits 0 to 255
(2 n used)
Blue LUT
256 x 8 SRAM B / 8 bits 0 to 255
(2n used)
Confidential
● CLUT entries can be color-corrected if required (for example, gamma and contrast).
n
● With a CLUTn input, only the first 2 addresses need to be initialized.
● The CLUT always outputs an alpha channel, whatever the input format.
● If the CLUT module is enabled, the 2D graphics engine instruction contains a pointer to the CLUT local memory
location.
● In some specific applications, the CLUT entries can be YCbCr encoded. The memory/bus correspondence
between the two color spaces is R/Cr, G/Y, B/Cb.
Red LUT
256 x 8 SRAM R / 8 bits 0 to 255
(28 used)
Green LUT
CLUT-index - 4/8 bits 256 x 8 SRAM G / 8 bits 0 to 255
(28 used)
Blue LUT
256 x 8 SRAM B / 8 bits 0 to 255
(2 8 used)
● CLUT entries can be color-corrected if required (for example, gamma and contrast)
● The CLUT always outputs an alpha channel, whatever the input format.
● In some specific applications, the CLUT entries can be YCbCr encoded. The memory/bus correspondence
between the two color spaces is R/Cr, G/Y, B/Cb.
Color reduction
The color reduction engine performs the following tasks:
● Converts true-color RGB bitmaps into CLUTn bitmaps.
Mux
CLUT
4/8 -> 32
Best index
RGBA
(CLUT entry) register
Confidential
Resize
engine Distance/error
computation
[RA - RB]
RGBB + [GA - GB] Current shortest
+ + [BA - BB] distance register
Error
Update
Error Current signal
Standard modifiers minimum Comparator
SRCI (%, dither) errors
pipeline
(formatter)
Mux
ALU
(alpha blender/ROP)
Standard
output stage
The color reduction mechanism can be summarized as follows (see also Figure 124):
● Best match strategy: the whole CLUT is scanned for each new RGB pixel from source 2. A
distance is computed for each CLUT entry and the current source 2 pixel. The entry with the
shortest distance is considered as the best possible match, and its index is used to
represent the RGB pixel in the target CLUT-based format.
● Adaptive mode: a mono-dimensional error diffusion algorithm weighting can be added to the
best match. All or part of the error made can be diffused on the next pixel (X + 1, same Y),
depending on the LSBs of the address in the target bitmap (xLSB, yLSB). The distance is
evaluated using the sum of the absolute values of the differences on each component:
distance = abs[R(scr2) - R(CLUT)] + abs[G(scr2) - G(CLUT)] + abs[B(scr2) - B(CLUT)]
Note: The best match search can be made in the YCbCr domain: the input color space converter must
be used on source 2, and the target CLUT converted from RGB to YCbCr entries.
Color correction
The CLUT can be used as four independent 256 x 8 LUTs, applying any transformation on the
input components. This can be used for gamma correction, contrast adjustment, gain, offset.
Used in conjunction with the 2D-graphics engine color space converters (at the input and the
output), the correction can also be made in the YCbCr space (for example, color effect,
conversion to a gray-scale bitmap).
Red LUT
RIN / 8 bits 0 to 255 ROUT / 8 bits 0 to 255
256 x 8 SRAM
Green LUT
GIN / 8 bits 0 to 255 GOUT / 8 bits 0 to 255
256 x 8 SRAM
Blue LUT
BIN / 8 bits 0 to 255 BOUT / 8 bits 0 to 255
256 x 8 SRAM
Confidential
Filter selector
Line delay
Vertical
Line delay 5-tap
8-phase
SRC 3-tap
adaptive Horizontal 5-tap
Line delay FIFO
flicker 8-phase SRC
filter
Line delay FIFO
In a single pass, the 2D graphics engine can output a flicker-free downscaled/upscaled picture.
The operator is neither limited by source size nor destination size. It contains sufficient memory
to apply a 5 x 5 filter. The source is automatically split into vertical stripes, the maximum width of
which is 128 pixels.
Note: This is a parallel four-component operator: the alpha channel is processed in the same way as
the RGB components.
Typically, the 2D resize engine application is used to generate high-quality anti-aliased fonts:
a 1 bpp source 2 bitmap of any oversampled font character is first expanded with the CLUT
operator, then downsized with high-quality filtering.
There are two ways to resize CLUT-based bitmaps:
● Use a two-pass 2D graphics engine operation, as described in Color reduction on page 440.
● Use a single-pass resize engine and disable the filters. This uses a skip/repeat technique,
and can be used for data that represent indexes, not true-color pixels. This method usually
gives poor quality graphics.
OFFSET_HSRC (register BLT_RZC) sets the initial phase of the filter for the 1st pixel of the line.
HSRC_INC (BLT_RSF) sets the horizontal scaling factor. 2DHF_MODE (BLT_RZC) enables the
horizontal filter and sets the part of the ARGB bus where it is available. Register BLT_HFP is a
pointer to the filter coefficients in the local memory.
OFFSET_VSRC (BLT_RZC) sets the initial phase of the filter for the 1st pixel of the column.
VSRC_INC (BLT_RSF) sets the vertical scaling factor. 2DVF_MODE (BLT_RZC) enables the
vertical filter and sets the part of ARGB bus where it is available. Register BLT_VFP is a pointer
Confidential
In test mode, the pixel color information can be replaced by a value to identify the filter (for
example, filter 3 = white, filter 2 = green, filter 1 = red, filter 0 = black).
In a read/modify/write operation involving the alpha blender, the pixel alpha value can be divided
by two before being used for blending on the source 2 window borders. This removes flicker on
edge lines, as the three-tap vertical flicker-filter cannot operate correctly on edge lines.
Horizontally, a similar mechanism is provided for the first and last pixels of each line to smooth
vertical edges of the target window.
FF_MODE (BLT_RZC) selects:
● the filter 0 only mode,
● the adaptive mode, that follows an estimation of the luma difference,
Confidential
● the test mode to evaluate the threshold selected in the adaptive mode.
Registers BLT_FF0, BLT_FF1, BLT_FF2, BLT_FF3 define the four filters in terms of their (n - 1),
n, and (n + 1) coefficients, and the thresholds of the first three filters.
ALU_Global_Alpha
AlphaSRC2
AlphaSRC1
1-Alpha
operator
1-Alpha AlphaWR
operator
AlphaOUT
1-Alpha
operator
Each source may have its own per-pixel alpha component. Source 2 is always blended on top of
source 1; source 1 is usually the source for the background plane. Sources 1 and 2 are blended
using their own alpha, combined using GALPHA_ROPID (register BLT_ACK).
Source 2 supports alpha-premultiplied and non–alpha-premultiplied color formats (premultiplied
ARGB formats are in fact AR, AG and AB). The multiplexer is thus required to select between
AlphaWR and ALU_Global_Alpha.
The blending equations are given below:
If source 2 is not pre-multiplied:
RGBOUT = ASRC2 x ALU_Global_Alpha x RGBSRC2 + (1 - ASRC2 x ALU_Global_Alpha) x RGBSRC1
If source 2 is pre-multiplied:
RGBOUT = ALU_Global_Alpha x RGBSRC2 + (1 - ASRC2 x ALU_Global_Alpha) x RGBSRC1
In any case, the resulting translucency is:
(1 - AlphaOUT) = (1 - ASRC2 x ALU_Global_Alpha) x (1 - ASRC1)
This is equivalent to:
AlphaOUT = ASRC2 x ALU_Global_Alpha + ASRC1 x (1 - ASRC2 x ALU_Global_Alpha)
or AlphaOUT = ASRC1 + ASRC2 x ALU_Global_Alpha x (1 - ASRC1)
The AlphaOUT component is written into the target bitmap; only the target format includes a per-
pixel alpha component.
Note: When a target format has a per-pixel alpha component, the color components RGBout are
computed as pre-multiplied by this alpha value. The display pipeline (such as a GDP) should be
aware of this when blending such a 2D graphics layer with the video layer.
A third source can be blended with sources 1 and 2, to create a single output. The third source
must be a 1 bpp or 8 bpp bitmap mask. This three-source blending is implemented in two stages:
● The texture (or foreground picture) uses the source 1 pipeline, and the third source (bitmap
mask) uses the source 2 pipeline. They are combined into an intermediate bitmap that must
have a per-pixel alpha component, such as ARGB8888. In this case:
RGBOUT = RGBSRC1
AlphaOUT = ASRC1 - ASRC2 - ALU_Global_Alpha
● The intermediate bitmap uses the source 2 pipeline and the background picture uses the
source 1 pipeline. They are blended together.
Boolean operators
This is a 2 operand logical unit. The operator always applies to the whole pixel width, including
the alpha component if there is one.The boolean operator performs the following 16 operations.
In boolean operations, a third source can be blended with sources 1 and 2, to create a single
output. The third source must be a 1 bpp bitmap mask. Combining is performed on a pixel-by-
pixel basis. The raster operation is executed, depending on this 1-bit value.
Three-source boolean combining is implemented in two stages:
● The bitmap mask is combined with the texture, without destroying any existing texture per-
pixel alpha. The result is stored in an intermediate bitmap, with an 8-bit per pixel fourth
component (alpha or flag value).
The texture uses source 1 pipeline, and the bitmap mask uses source 2 pipeline. If the bit
value is 0, then the 8-bit fourth component is set to 255. If the bit value is 1, then the 8-bit
fourth component is set to the alpha value of source 1 (128 if source 1 has no alpha
channel). The color components remain unchanged.
● The intermediate bitmap uses the source 2 pipeline and the background picture uses the
source 1 pipeline. These are combined. If the fourth component is 255, then the logical
operation is ignored and the output directly corresponds to source 1. If the fourth
component is not 255, then a standard logical operator is applied.
Bypass and concatenation modes are available. In bypass mode, either source 1 or source 2
may be bypassed. Concatenation mode allows 4:2:0 source 1/source 2 YCbCr concatenation.
MODE (BLT_ACK) specifies 5 operation modes: single source bypass, logical operation,
blending operation, clipmask mode for three-source management in two passes (two sources
and one mask), and concatenation mode for macro-block formats.
● Single source bypass: bypass source 1 or source 2. For example, if source 2 is bypassed,
and source 1 is set, only source 2 affects the target and takes data from the local memory.
● Logical operation: this operates on a single source (1 or 2) and on dual sources.
GALPHA_ROPID (BLT_ACK) is used to program the logical operation code.
● Blending operation: this operates only on dual sources. GALPHA_ROPID (BLT_ACK) is
used to program the global alpha blending value. It is also possible to activate a horizontal
and/or vertical alpha border on 1 pixel width with bits AB_H and AB_V (BLT_RZC).
● Three-source clipmask management in blend or logical mode. This specific mode is used in
a two-pass blitter operation to blend two sources without a uniform global alpha value or
logical operator. The pixel accuracy is programmed inside a third source that plays the role
of the mask. In logical mode, only the A1 format is available for the mask plane; in blending
mode, A1 and A8 formats are available.
● The concatenation mode operates for YCbCr 4:2:0 macroblock formats for sources 1 and 2,
when the luma from source 1 is not merged with the chroma inside source 2 (so it is usable
only if LINE_RPT = 0 and COLOR_FORM = YCbCr420Mb in register BLT_S2TY).
The 2D graphics engine has two methods of color keying: source color key and destination color
key. These methods are exclusive and are both used for sprite-based animation.
● In source color keying, the source color or range of source colors is not written to the
destination area. It is provided by the source 2 pipeline, before or after the CLUT.
● In destination color keying, no color can be written onto the destination color or range of
destination colors. The destination color or range of colors is provided by the source 1
pipeline.
Color keying can operate on true-color bitmaps or CLUT-based bitmaps, as follows:
● For RGB true-color bitmaps:
• A range of colors can be specified for each component, with a minimum and a maximum
value.
• The current input color is compared to the range, on a component-by-component basis.
• Each color comparator can be enabled or disabled, and the color match result set inside
or outside the range.
• A YCbCr input can be used with the following color correspondence: G/Y, Cb/B, Cr/R.
• A CLUT-based bitmap can be used after it is expanded to true color (after the CLUT).
● For CLUT-based bitmaps:
Register BLT_KEY1 defines the minimum range for each component on 8 bits. BLT_KEY2
defines the maximum range for each component on 8 bits.
The color key match C-equation is as follows:
COLOR_KEY_MATCH =
[(Rin < Rmin) OR (Rin > Rmax)] AND (Routside = True) AND (EnableR = True)
OR (Rmin <= Rin <= Rmax) AND (Routside = False) AND (EnableR = True)
OR (EnableR = FALSE)
AND
[(Gin < Gmin) OR (Gin > Gmax)] AND (Goutside = True) AND (EnableG = True)
OR (Gmin <= Gin <= Gmax) AND (Goutside = False) AND (EnableG = True)
OR (EnableG = FALSE)
AND
[(Bin < Bmin) OR (Bin > Bmax)] AND (Boutside = True) AND (EnableB = True)
OR (Bmin <= Bin <= Bmax) AND (Boutside = False) AND (EnableB = True)
OR (EnableB = FALSE)
For example, in RGB565 mode, to write 0xABCD (R = 21, G = 30, B = 11), BLT_S2CF must be
programmed with 0x80A8 7858 (an opaque alpha channel added plus expansion to 8 bits per
component).
Table 157 shows the features available when working in XYL mode.
XYL mode
Blitter feature Comment
availability
Color fill Yes Source 2 color fill only, with XY and XYL subinstruction format
4:2:X to 4:4:4 No No meaning
4:4:4 to 4:2:X No No meaning
Programmable H/V scan No No meaning
Color space conversion Yes Output color space converter only
CLUT operator No
2D-resize No
Flicker reduction No
Color keying Yes
Rectangular clipping Yes
Plane-mask Yes
Clipmask Yes See description below
Confidential
● BLT_S2XY: clipmask positioning, that is, XY location of the (0,0) clipmask origin, with
respect to the target (0,0) origin.
● BLT_S2SZ: unused.
The ALU must be programmed for clipmask in XYL mode with either a logical operation, or
blending with source 2 not premultiplied, or blending with source 2 premultiplied (MODE in
register BLT_ACK).
In a MediaHighway drawing context, a clipmask validity window is defined, as well as a standard
rectangular clipping window. For the blitter XYL to be compliant, the hardware rectangular
clipping window must be programmed (BLT_CWO and BLT_CWS), with the intersection of the
two software drawing context windows. Outside this resulting window, no write is performed.
The following hardware sequence occurs:
● Read the current target pixel at the (X,Y) location, in the target color bitmap, using source 1
address generator.
● Read the corresponding clipmask data XCOORD and YCOORD (BLT_S2XY) in the
clipmask bitmap, using source 2 address generator.
● Combine the source 1 pixel with the BLT_S2CF color in the ALU, according to the ALU
operation code, and depending on the current clipmask data. See Section 47.5.12 on
page 444 for details about ALU behavior with respect to clipmask data (clipmask is
equivalent to bitmap mask).
● If this x, y location is valid (inside the clipping window), then write the resulting pixel at the
(X, Y) location, in the target color bitmap, using the target address generator.
Target bitmap
X from subinstruction (SRC1/TARGET)
BLT_S1BA = BLT_TBA
(pixel 0,0)
BLT_S2XY vector
Y from subinstruction
Target pitch
CLIPMASK_LINEAR_BASE_ADDRESS
BLT_S2BA
Confidential
clipmask pitch
BLT_S2TY.PITCH
XY format (BLT_XYL)
ALU
DES(Target bitmap)
Confidential
{0xFF,R,G,B}
ALU
DES(BLT_Txx)
GLOBALalpha
Clipmask alpha
ALU opcod 0 1
XY format
(1010 or 1011)
(BLT_XYL)
0 1 weighted
0 1 S2 weighted/unweighted
For any graphics format (except 4:2:0 planes), a bitmap can always be considered as a
rectangular area, with a width in pixel units, and a height in line units.
The (0, 0) origin is always the upper-left corner of the bitmap. Any pixel can be internally
addressed using an (x, y) model, with the (0, 0) reference pixel being the top-left location of the
rectangular area.
Confidential
0,1 line 1
pixel
x, y
height Byte address
h increases
(line unit)
When stored in the local memory, pixel (0,0) is stored at the lowest byte address. The scan order
is from left to right horizontally, and from top to bottom vertically. For each line (constant y
coordinate), the pixel address increases when the x coordinate increments.
The pitch is the distance in bytes between any pair of vertically adjacent pixels (same x
coordinate, y/y+1). The pitch is at least the width multiplied by the number of bytes per pixel, but
can be greater (for instance, byte stuffing for memory alignment considerations, or global
bitmaps containing elementary bitmaps, side-by-side).
The specific organization within a 128-bit word is described below for each format.
Note: 1 The memory address for pixel (0,0) must be aligned on a 32-bit word address boundary.
2 The pitch value must be a multiple of four bytes.
Note: 1 The memory address for pixel (0,0) must be aligned on a 32-bit word address boundary.
2 The pitch value must be a multiple of four bytes.
Pixel X+5 Pixel X+4 Pixel X+3 Pixel X+2 Pixel X+1 Pixel X
128-bit word
address ADDR + 1
Pixel X+10 Pixel X+9 Pixel X+8 Pixel X+7 Pixel X+6 Pixel X+5
128-bit word
address ADDR + 2
Pixel X+15 Pixel X+14 Pixel X+13 Pixel X+12 Pixel X+11 Pixel X+10
Note: 1 The memory address for pixel (0,0) must be aligned on a 32-bit word address boundary.
2 The pitch value must be a multiple of four bytes.
Confidential
Pixel X+5 Pixel X+4 Pixel X+3 Pixel X+2 Pixel X+1 Pixel X
128-bit word
address ADDR+1
Pixel X+10 Pixel X+9 Pixel X+8 Pixel X+7 Pixel X+6 Pixel X+5
128-bit word
address ADDR+2
Pixel X+15 Pixel X+14 Pixel X+13 Pixel X+12 Pixel X+11 Pixel X+10
Note: 1 The memory address for pixel (0,0) must be aligned on a 32-bit word address boundary.
2 The pitch value must be a multiple of four bytes.
23 16 15 11 10 5 4 0
Pixel X+5 Pixel X+4 Pixel X+3 Pixel X+2 Pixel X+1 Pixel X
address ADDR + 2
128-bit word
address ADDR + 1
Pixel X+10 Pixel X+9 Pixel X+8 Pixel X+7 Pixel X+6 Pixel X+5
128-bit word
Pixel X+15 Pixel X+14 Pixel X+13 Pixel X+12 Pixel X+11 Pixel X+10
Confidential
Note: 1 The memory address for pixel (0,0) must be aligned on a 32-bit word address boundary.
2 The pitch value must be a multiple of four bytes.
15 11 10 5 4 0
Note: 1 The memory address for pixel (0,0) must be aligned on a 16-bit word address boundary.
2 The pitch value must be a multiple of two bytes.
Note: 1 The memory address for pixel (0,0) must be aligned on a 32-bit word address boundary.
2 The pitch value must be a multiple of four bytes.
3 X is even on this diagram.
Figure 141: ARGB1555 alignment in a 128-bit word
15 14 10 9 5 4 0
Note: 1 The memory address for pixel (0,0) must be aligned on a 16-bit word address boundary.
2 The pitch value must be a multiple of two bytes.
Figure 142: ARGB4444 alignment in a 128-bit word
15 12 11 8 7 4 3 0
Note: 1 The memory address for pixel (0,0) must be aligned on a 16-bit word address boundary.
2 The pitch value must be a multiple of two bytes.
128-bit word Alpha Index Alpha Index Alpha Index Alpha Index Alpha Index Alpha Index Alpha Index Alpha Index
address ADDR 1 0
Note: 1 The memory address for pixel (0,0) must be aligned on a 16-bit word address boundary.
2 The pitch value must be a multiple of two bytes.
Pixel X+15
Pixel X
128-bit word
address ADDR
Pixel X+15
Pixel X
128-bit word
address ADDR
Pixel X+31
Pixel X
Bit 127
Bit 0
128-bit word
address ADDR
Pixel X+63
Pixel X
Bit 127
Bit 0
128-bit word
address ADDR
Pixel X+127
Pixel X
BLT_STA1 0x04 RO
BLT_STA2 0x08 RO
128-bit word 8
BLT_KEY2 0x88 RO/LLU
Memory node
XYL mode BLT_XYL 0x94 RO/LLU
128-bit word 9
BLT_XYP 0x98 RO/LLU
Reserved - 0x9C -
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUSP2
SUSP1
START
RST
Reserved
[1] START
Write 1 then 0 to start the blitter: The node at the address stored in BLT_NIP is fetched and executed
[0] RST: Soft reset: the blitter goes back to an idle state.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INSTR_PTR_MEM_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved TARGET_LINE_NUM
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUSP
IRQR
IRQC
RDY
Reserved
Note: Setting the appropriate bit in this register resets the interrupt request (for example, writing
0x2 in this register clears the CURRENT_BLIT_COMPLETED interrupt status bit, once
processed).
Status bits 1, 2 and 3 have no meaning if the corresponding interrupt is disabled (see
BLT_INS[20:18])
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NIP_BANK_NUM NIP_MEM_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GENERAL_PURPOSE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TRIG_COND_CTRL
PLANE_MASK
2DRESCALE
RECT_CLIP
FILCK_FILT
IRQ_MASK
Reserved
Reserved
Reserved
Reserved
Reserved
CLUTOP
OCSC
CKEY
SRC2
SRC1
ICSC
XYL
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VTG
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
S1BA_BANK_NUM S1BA_MEM_ADDR
Note: In XYL standard mode, this register must be programmed with the base address of the
target bitmap.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
YCOORD XCOORD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ALPHA_RANGE
PIXMAP_PITCH
BIGNOTLITTLE
COLOR_FORM
MB_FIELD
RGB_EXP
SUBBYTE
Reserved
Reserved
Reserved
HSO
VSO
Confidential
Note: In XYL standard mode, this register must be filled with the bitmap characteristics of the
target bitmap. Bits 24 and 25 have no meaning and should be set to 0.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRC1_COLOR_FILL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
S2BA_BANK_NUM S2BA_MEM_ADDR
Note: In XYL standard mode, this register must be programmed with the base address of the
clipmask bitmap, if any.
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CHROMA_LEFT
ALPHA_RANGE
PIXMAP_PITCH
BIGNOTLITTLE
COLOR_FORM
MB_FIELD
LINE_RPT
RGB_EXP
SUBBYTE
Reserved
Reserved
HSO
VSO
0: Screen most right pixel in most significant bits 1: Screen most right pixel in least significant bits
[27] LINE_RPT: Chroma line repeat mode if source is YCbCr420MB
0: No line repeat: the vertical chroma upsampling must be done using the 2D-resize
1: The vertical chroma upsampling uses a line repeat scheme
[26] CHROMA_LEFT: Chroma left extended
0: If the first chroma sample in a line is Y-only, its chroma is estimated from the following pixel only
1: If the first chroma sample in a line is Y-only, its chroma is estimated by averaging the following pixel
and the previous sample (out of the defined S2 window)
[25] VSO: Vertical scan order
0: Top to bottom) 1: Bottom to top
[24] HSO: Horizontal scan order
0: Left to right 1: Right to left
[23] MB_FIELD: Access mode in macro-block organized frame buffers (YCbCr420MB and YCbCr422MB)
0: Access in frame mode 1: Access in field mode (every other line)
[22] Reserved
[21] ALPHA_RANGE: 8-bit alpha range (for ARGB8565, ARGB8888, ACLUT88 and A8 formats only)
0: 0 to 128 (128 means opaque) 1: 0 to 255 (255 means opaque)
Note: In XYL standard mode, this register must be filled with the characteristics of the clipmask
bitmap, if any. Bits [24, 25, 26, 27, 29] have no meaning and should be set to 0.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
YCOORD XCOORD
Note: In XYL standard mode, this register contains the 2D-vector that gives the location of the
(0,0) clipmask value, with respect to the (0,0) pixel location of the target bitmap. XCOORD
provides the horizontal offset, YCOORD provides the vertical offset (both values are 16-bit
signed integers).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRC2_COLOR_FILL
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TBA_BANK_NUM TBA_MEM_ADDR
Note: In XYL standard mode, this register must be programmed with the base address of the
target bitmap.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
YCOORD XCOORD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ALPHA_RANGE
BIGNOTLITTLE
RGB_ROUND
SUBBYTE
Reserved
Reserved
Reserved
Reserved
HSO
VSO
COLOR_FORM PIXMAP_PITCH
[27] Reserved
[26] RGB_ROUND: Rounding mode
0: Normal rounding (+0.5 then truncation) 1: Enable 2x2 dither when rounding
[25] VSO: Vertical scan order
0: Top to bottom) 1: Bottom to top
[24] HSO: Horizontal scan order
0: Left to right 1: Right to left
[23:22] Reserved
[21] ALPHA_RANGE: 8-bit alpha range (for ARGB8565, ARGB8888, ACLUT88 and A8 formats only)
0: 0 to 128 (128 means opaque) 1: 0 to 255 (255 means opaque)
[20:16] COLOR_FORM: Pixmap color format
RGB types CLUT types
0 0000: RGB565 0 1000: CLUT1
0 0001: RGB888 0 1001: CLUT2
0 0100: ARGB8565 0 1010: CLUT4
0 0101: ARGB8888 0 1011: CLUT8
0 0110: ARGB1555 0 1100: ACLUT44
0 0111: ARGB4444 0 1101: ACLUT88
YCbCr types Misc types
1 0000: YCbCr888 1 1000: A1
1 0010: YCbCr422R 1 1001: A8
1 0011: YCbCr422MB 1 1111: BYTE
1 0100: YCbCr420MB
1 0101: AYCbCr8888
For modes YCbCr4;2;2MB and YCbCr4;2;0MB (macroblock based, dual buffer), source 1 and source 2
are both used, and must be programmed with the same color format
[15:0] PIXMAP_PITCH: Pixmap pitch in bytes
Note: In XYL standard mode, this register must be filled with the characteristics of the target
bitmap. Bits[24, 25, 27] have no meaning and should be set to 0.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
INTNL
YDO XDO
Note: In XYL standard mode, the rectangular clipping window can be used. In the MediaHighway
clipmask implementation, the clipping window must be programmed to the intersection of
the regular rectangular clipping and the rectangular clipmask window.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
Reserved
YDS XDS
Note: In XYL standard mode, the rectangular clipping window can be used. In the MediaHighway
clipmask implementation, the clipping window must be programmed to the intersection of
the regular rectangular clipping, and the rectangular clipmask window.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CCO_OUTVIDnGFX
CCO_INVIDnGFX
CLUT_ERRDIFF
CCO_OUTSIGN
CLUT_UPDATE
CCO_OUTCOL
CCO_INSIGN
CLUT_MODE
CCO_INCOL
CCO_INDIR
Reserved
Reserved
Reserved
Address: BlitterBaseAddress + BlitterRegsBaseAddress + 0x58
Type: Read/LLU
Buffer: Double-bank: automatic hardware toggle
Reset: 0x00
Description: This register controls the two color space converters and the CLUT operator.
CLUT operators
[31:23] Reserved
[22:19] CLUT_ERRDIFF: Error diffusion weight (if color reduction)
0000: 0% (disabled) 0001: 100%
0010: 75% 0011: 50%
0100: 25% 1000: Adaptive
[18] CLUT_UPDATE: Enable CLUT update
Confidential
Note: The CLUT and the input color space converter cannot be used in XYL mode. But the
output color space converter is available.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OFFSET_HSRC
OFFSET_VSRC
2DHF_MODE
2DVF_MODE
FF_MODE
Reserved
Reserved
Reserved
Reserved
Reserved
AB_H
AB_V
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HFP_BANK_NUM HFP_MEM_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VFP_BANK_NUM VFP_MEM_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSRC_INC HSRC_INC
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CKEY_
Reserved ACK_CKEY GALPHA_ROPID Reserved MODE
SEL
internally, the blue component and the index information are sharing the same data path.
[3:2] MODE[3:2]
x0: Green component ignored (disabled = always match)
01: Green enabled: match if (Gmin ≤G ≤Gmax)
11: Green enabled: match if ((G < Gmin) or (G > Gmax))
[1:0] MODE[1:0]
x0: Blue component ignored (disabled = always match)
01: Blue enabled: match if (Bmin ≤B ≤Bmax)
11: Blue enabled: match if ((B < Bmin) or (B > Bmax))
[15:8] GALPHA_ROPID
ALU global alpha (8 bits / 0 to 128), in blending mode, or ROP identifier (4 LSBs), in logical mode.
Raster operation table (GALPHA_ROPID[3:0]):
0000: CLEAR result = all 0 0001: AND result = S2 AND S1
0010: ANDrev result = S2 AND (NOT S1) 0011: COPY result = S2
0100: ANDinvert result = (NOT S2) AND S1 0101: NOOP result = S1
0110: XOR result = S2 XOR S1 0111: OR result = S2 OR S1
1000: NOR result = (NOT S2) AND (NOT S1) 1001: EQUIV result = (NOT S2) XOR S1
1010: INVERT result = (NOT S1) 1011: ORreverse result = S2 OR (NOT S1)
1100: COPYinv result = (NOT S2) 1101: ORinvert result = (NOT S2) OR S1
1110: NAND result = (NOT S2) OR (NOT S1) 1111: SET result = all 1
[7:4] Reserved
[3:0] MODE: ALU operation modes
0000: Bypass source 1 0001: Logical operation
0010: Blending mode, source 2 not premultiplied 0011: Blending mode, source 2 premultiplied
0100: Clipmask pass in logical mode / First pass 0101: Clipmask pass in blending mode
0110: 4:2:0 source 1 / 2 YCbCr concatenation 0111: Bypass source 2
1000: Clipmask pass in logical mode / 2nd pass 1001: Clipmask in XYL mode, logical operation
1010: Clipmask in XYL mode, blending operation, source 2 not premultiplied
1011: Clipmask in XYL mode, blending operation, source 2 premultiplied
Note: In XYL standard mode, only ALU operation modes 1, 2, 3, 7, 9, 10 and 11 are available.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Note: When the color key module is intended to work on CLUT type data, only the blue path is
used (green and red should be disabled). Thus, it is possible to track a single index, as well
as a range of indexes.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PLANE_MASK
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUBI_BANK_NUM SUBI_MEM_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BIGNOTLITTLE
Reserved
Reserved PKT_SIZE
Note: The reason for splitting a message transaction into a smaller entity called packet, is that a
CPU access can be inserted between two consecutive packets.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BW_CNT
HFilter
Reserved 0x28
0x2C
VFilter coefficients 0x30 BLT_HFC1 VFilter
Confidential
0x34 BLT_HFC2
128-bit word 3
0x38 BLT_HFC3
0x3C BLT_HFC4
0x40 BLT_HFC5 VFilter
0x44 BLT_HFC6
128-bit word 4
0x48 BLT_HFC7
0x4C BLT_HFC8
0x50 BLT_HFC9 VFilter
0x54 BLT_HFC10
128-bit word 5
VFilter
Reserved 0x58
0x5C
The filter coefficients are loaded from memory each time a 2D-resize operation with filtering is
programmed. The pointers, BLT_HFP and BLT_VFP must be aligned on a 128-bit word
boundary (but the coefficients for the horizontal and vertical filters are totally independent, they
can be stored anywhere in the blitter memory space, not necessarily at adjacent locations).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HFC1 K0.3 K0.2 K0.1 K0.0
HFC2 K1.2 K1.1 K1.0 K0.4
HFC3 K2.1 K2.0 K1.4 K1.3
HFC4 K3.0 K2.4 K2.3 K2.2
HFC5 K3.4 K3.3 K3.2 K3.1
HFC6 K4.3 K4.2 K4.1 K4.0
HFC7 K5.2 K5.1 K5.0 K4.4
HFC8 K6.1 K6.0 K5.4 K5.3
HFC9 K7.0 K6.4 K6.3 K6.2
HFC10 K7.4 K7.3 K7.2 K7.1
Reset: 0x00
Description: These registers store the horizontal sample rate converter (HSRC) coefficients. There
are eight subfilters for the HSRC; each subfilter has five 8-bit coefficients. Coefficient j of
subfilter i (subposition i) is designated Ki.j[7:0] and the format is S1.6 (1.0 is encoded as
0x40). The corresponding filter coefficient structure (40 bytes) must be aligned on a
128-bit word boundary when stored in the local memory.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VFC1 K0.3 K0.2 K0.1 K0.0
VFC2 K1.2 K1.1 K1.0 K0.4
VFC3 K2.1 K2.0 K1.4 K1.3
VFC4 K3.0 K2.4 K2.3 K2.2
VFC5 K3.4 K3.3 K3.2 K3.1
VFC6 K4.3 K4.2 K4.1 K4.0
VFC7 K5.2 K5.1 K5.0 K4.4
VFC8 K6.1 K6.0 K5.4 K5.3
VFC9 K7.0 K6.4 K6.3 K6.2
VFC10 K7.4 K7.3 K7.2 K7.1
eight subfilters for the VSRC; each subfilter has five 8-bit coefficients. Coefficient j of
subfilter i (subposition i) is designated Ki.j[7:0] and the format is S1.6 (1.0 is encoded as
0x40). The corresponding filter coefficients structure (40 bytes) must be aligned on a
128-bit word boundary when stored in the local memory.
49.1 Overview
The display processors form a high quality scaling engine to provide video display processing.
They take video lines in 4:2:2 raster (R) format (one buffer) or 4:2:0 macroblock (MB) format (two
buffers) from external memory. 4:2:2 MB input format is also supported. Images are read from
memory in either frame format or field format independently programmable for chroma and luma.
This allows frame or field based vertical filtering.
The display processors can perform zoom out up to a factor of four (horizontally and vertically)
and unlimited zoom in. They provide YCbCr digital output in 4:4:4 or 4:2:2 10-bit format.
Sub-pixel and sub-line resolution pan/scan components can be specified within the source
image to determine the start of the image to be displayed from the display buffer.
● 32 phases and 10 bit-coefficients (value -512 to 511) stored in RAM, that is,
Confidential
16 x 8 x 8 + 3 x 32 bits for luma (the same for chroma). See Chapter 50: Main and auxiliary
display registers on page 502 for details,
● horizontal linear resizing of video,
● linear resizing: continuous resizing of video horizontally, by a programmable factor from 1/4
up to x 8192 with 2^(-13) step,
● equidistant fractional pixel position down to 1/32 of pixel,
● linear resizing: continuous resizing of video vertically, by a programmable factor from 1/4
and up to x8192 with 2^(-13) step,
● 150 Mpixel/s maximum pixel generation rate.
External
Local memory interface SDRAM
32
64 5-taps 8-taps
Luma delay line Y
V-SRC H-SRC
(10 bits)
Compositor
VF HF
32
CrCb
Cr
FIFO CrCb (10 bits)
32 5-taps 8 taps
V-SRC Chroma delay line
H-SRC
Cb
VF HF
Confidential
(10 bits)
There are four parallel vertical filters and two 8-tap chroma filters after the chroma delay lines.
Figure 150 illustrates the vertical/temporal relationship of lines before and after the luma de-
interlacing process.
In the above example, the LMU block calculates extra luma lines to generate a progressive
480 line 60 frame/s display from an interlaced 480 line 30 frame/s input. For each incoming field,
lines corresponding to that field are passed right through the block. Lines corresponding to the
previous field must be estimated by the LMU algorithm. Four different algorithms can be
selected:
● Motion adaptive de-interlacing, used for video sources. Missing lines are interpolated based
Confidential
on the amount of motion estimated from the previous field and frame.
● Missing lines are obtained from the following field, used for film sources.
● Missing lines are obtained from the previous field, used for film sources.
The associated film-mode detector accumulates frame differences over an entire field and
passes to the micro two 8-bit values representing the frame difference of both the luma and
chroma components. For optimum motion sensitivity in small regions of the picture and noise
rejection, the data is collected as follows:
1. Pixels are partitioned in groups of 16.
2. The absolute value of the frame difference is accumulated for each 16 pixel group.
3. The largest accumulated value over all groups in the field is stored in a register and is
available to the host processor.
The LMU can be activated independently for luma and chroma.
DISP_SRC_SIZE
DISP_TARGET_SIZE
Height
Height
DISP_TARGET_SIZE
DISP_SRC_SIZE Width
Width
When the 4:2:2 R input format is used, the source picture position is defined by
DISP_LUMA_XY.X1 and .Y1, and size by DISP_LUMA_SIZE.WIDTH1 and .HEIGHT1. Both
position and size are given with pixel precision. This means that for odd values of X1 and/or
(X1+WIDTH1), pixels with only luma information are pointed (see Figure 152). In that case (an
odd number of pixels from (0,0) to top left corner of source) first existing chroma sample right to
border defined by X1 is taken as first horizontal chroma sample. In the example of Figure 152, for
both values of X1(1) and X1(2), chroma corresponding to pixel number n+2 is taken as first left
chroma sample of the source picture. In a similar manner, for last horizontal chroma sample
when X1 + WIDTH1 is odd, chroma from pixel left to one defined by X1+WIDTH1 is taken as the
last horizontal chroma sample in the source picture. In the example of Figure 152, for both values
X1+WIDTH1 (1) and X1+WIDTH1 (2), chroma from pixel number n+m-1 is taken as the last
horizontal chroma sample within the source.
X1 (1)
X1 (2) Y- CrCb -
4:2:2
X1 + WIDTH1 (1)
X1 + WIDTH1 (2)
When the 4:2:0 MB or 4:2:2 MB input format is used, first and last luma and chroma samples are
defined independently. Luma samples of source are defined by X1, Y1, WIDTH1 and HEIGHT1
(registers DISP_LUMA_XY and DISP_LUMA_SIZE) comparing to top-left luma sample of
complete picture defined by DISP_LUMA_BA. In the same manner, chroma samples of the
source picture are defined by X2, Y2, WIDTH2 and HEIGHT2 (registers DISP_CHR_XY and
DISP_CHR_SIZE) comparing to top left luma sample of complete picture defined by
DISP_CHR_BA. Figure 153 shows an example of this.
X1
X2
WIDTH1
Y- CrCb -
repeated in the horizontal/vertical source filter. Figure 154 shows an example of horizontal filter
initialization where the first sample is repeated two times.
Figure 154: Initiations of horizontal SRC pipeline example (first sample repeated twice)
The horizontal and vertical position of the source picture can be defined with an accuracy of 1/32
of pixel/sample. It is defined by initial phase of polyphase DTO, which is a 13-bit register
(DISP_LUMA/C_HSRC) giving 1/2^13 accuracy, but internally rounded to 1/32. Figure 155
shows an example of horizontal pan and scan, where Fl(c)pr bits defines 0 repeat of the first
sample and where initial phase (ph0) is different from 0. In Figure 155, the initial sample is
between samples (x+1) and (x+2).
If initial phase is 0 then the first sample is (x+3) in previous example and (x+1) in the Figure 155
example.
Vertical pan and scan is defined in a similar manner, taking into account that the number of taps
is five (an odd number). Where Fl(c)lr bits defines repeat of the first sample and where initial
phase is 2^12 (1/2 of sample), first sample is (y+2). For smaller values of initial phase it is
between half distance between y+1 and y+2 on one side and y+2 at the other side. For values
greater then 2^12 it is between sample y+2 on one side and the half distance between samples
y+2 and y+3 at the other side (see Figure 156):
y+1
First sample
position
y+3
y+4
Confidential
bandwidth
required = 4.FCLK if spare time is zero
(Z – 1) Þ N
-------------------------------------------------------
N
tline – ------------------------------------
( NVF Þ Fclk )
Fclk
time
t_line
N: number of pixels in the source video line (1920 max in HD, 960 max in ID)
NVF: number of vertical filters: 1 vertical filter
Zmax: maximum zoom out factor rounded to greater integer value (maximum number of
Confidential
Ym,4n
32 bits Luma VF delay lines Ym,4n+1
From STBus Ym,4n+2
(4 pixels)
interface Ym,4n+3
Ym-1,4n
Ym-1,4n+1
Ym-1,4n+2
line m-1 Ym-1 ,4n+3
LVF
Ym-2 ,4n
Ym-2,4n+1
line m-2 Ym-2,4n+2 Ym,4n-4 Ym-1,4n-4 Ym-2,4n-4 Ym-3,4n-4 Ym-4,4n-4
Ym-2,4n+3
Ym-3,4n
Ym-3,4n+1
line m-3 Ym-3,4n+2
Ym-3,4n+3
Cbm-1,4n
Crm-1,4n
Confidential
Cbm-1,4n+1
line m-1 Crm-1,4n+1
Cbm-2,4n CVF
Crm-2,4n
line m-2 Cbm-2,4n+1
Crm-2,4n+1
Cbm-3,4n
Crm-3,4n
line m-3 Cbm-3,4n+1
Crm-3,4n+1
Cbm-4,4n
Crm-4,4n Chroma delay line
line m-4 Cbm-4,4n+1
Crm-4,4n+1
Chroma samples are stored as they come: 1 sample of Cb, 1 sample of Cr,... (see Figure 158).
Between the delay lines for vertical filtering and VF itself, a small serializer reads the samples
four by four, and feeds the VF one sample at a time. This means that the RAMs are read one
cycle out of four for vertical filtering.
32 bits
Ym,4n To luma/chroma VF delay lines
Ym,4n+1
From potential block Ym,4n+2
(4 pixels)
inserted between VF line m Ym,4n+3
Delay line “Pixelizer” Sn-1 Sn-2 Sn-3 Sn-4 Sn-5 Sn-6 Sn-7
Filter pipeline HF
In the worst case (zoom out by four), in luma horizontal filter we should be able to shift the
samples in the filter pipeline by up to four and feed up to four new samples from the “pixelizer”.
Confidential
Every clock cycle, the pixelizer must be able to read 0 or 4 samples and output 0, 1, 2, 3 or 4
samples to the filter.
There are two horizontal chroma filters. If the output is 4:4:4, the maximum zoom out is two
(programmed zoom out by four, plus upsampling by two). In this case, at maximum, two Cr or Cb
samples are fed in the filters each PIX1X clock cycle. If 4:2:2 output format is programmed, zoom
out by 4 of chroma is possible. That means 4 new chroma samples have to be loaded in filter
pipeline in the worst case. In the same time the output of chroma HF has to be generated one
cycle out of two of PIX1X clock.
HF Video output
+
Increment
from user phase
register + DTO (16 bits) *c0 *c1 *c2 *c3 *c4 *c5 *c6 *c7
Video input
phase0 Sn-1 Sn-2 Sn-3 Sn-4 Sn-5 Sn-6 Sn-7
Filter pipeline
● 10-bit offset value, common to all 32 phases (in fact 64 because of symmetry), and
● 1-bit shift value, common to all 32 phases (64 because of symmetry) which means that an
8-bit value is multiplied by 2 or not to cover the dynamic of 32 phases (coef1 set of 32
phases in the above example).
Figure 162: Example: five tap polyphase filter (VSRC) set of coefficients
offset 1
32 phases of coef 0 32 phases of coef 4
(K0.0 to K0.31) (K4.0 to K4.31)
offset 0
Increment
incr_max (TW = Target Width)
= incr0+pdelta*(zone1-1)
horizontal position
zone 2 last pixel
of target pixel
0 zone 1
(TW-1)
incr0+
incr0+ (zone1-1)*pdelta- incr0+
incr0+ incr0+
Increment incr0 + incr0+ incr0+ incr0+ incr0+ incr0+ incr0+ (zone1-1)*pdelta (zone1-1)*pdelta (zone1-1)*pdelta- (TW-zone2-2)* (zone1-1)*pdelta
incr0 (TW-zone2-3)* pdelta -(TW-zone2-1)*pdelta
used pdelta 2pdelta 3pdelta (zone1-1)pdelta (zone1-1)*pdelta (zone1-1)*pdelta (zone1-1)*pdelta -pdelta
pdelta
Target
picture 0 3 TW-2
1 2 zone1 zone1+1 zone1+2 zone2-1 zone2 zone2+1 TW-3 TW-1
pixel XN
CLK_PIXEL (PIX1X)
COMP_DISP_PIX_REQ
Confidential
Luma Y0 Y1 Y2 Y3 Yn-1 Yn
All control registers are double buffered and are accessible through the STBus interface.
Registers containing the filter coefficients (DISP_L(C)H(V)F_COEF) are loaded directly from
memory and are not double buffered.
Register addresses are provided as either
MainDisplayBaseAddress + offset,
AuxDisplayBaseAddress + offset or
LMUBaseAddress + offset.
The MainDisplayBaseAddress is:
0x1900 2000.
The AuxDisplayBaseAddress is:
0x1900 3000.
The LMUBaseAddress is:
0x1900 4000.
Filter coefficients size: 476 bytes, others 84 bytes - total: 560 bytes.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HF_UPDATE_EN
VF_UPDATE_EN
BIGTNOTLITTLE
4:2:2_OUT
Reserved
DISP_EN
CHF_EN
YHF_EN Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
1. If 4:2:2 R input format is set, VSRC Increment, VSRC Initial Phase and FCPR must be
programmed as luma (DISP_CHR_VSRC and DISP_LUMA_VSRC must have the same value)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDELTA_LUMA PDELTA_CHROMA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MB_FIELDC
MB_FIELDY
Reserved MIN_SPC_BETWEEN_REQS PIX_LOAD_LINE COEF_LOAD_LINE IN_FORMAT
Defines how many lines STBus plug waits after vsync before sending the first request in the field to load
the display pipe. When changing the coefficient set in VSRC and HSRC the pixel request should be sent
after new coefficient set is loaded, that is, Pix load line > Coef load line (see above). If this is not the case,
then the display pipe will be loaded just after new coefficients load.
[10:6] COEF_LOAD_LINE
Video line number after VSYNC, during which the filter coefficients are loaded via the STBus interface
(buffer 1) when V/HFilter update enable is 1. This is a nonsigned value from 0 to 31. Loading of new
coefficients is done after Coef Load Line’s hsync active edge.
[5] MB_FIELDY
Luma access mode in macro-block organized frame buffers for (YCbCr420 MB and YCbCr422 MB
format)
0: Access in frame mode
1: Access in field mode (every other line)
[4:0] IN_FORMAT: Input format
10010: YCbCr4:2:2 R 0x12
10011: YCbCr4:2:2 MB (or 4:2:2 MB) 0x13
10100: YCbCr4:2:0 MB (or 4:2:0 MB) 0x14
a. For example, in the case of vertical zoom out, four video lines need to be loaded from time to time during
the display of one video line (64 µs) which means 4 x 45 requests of 128 bit words of luma (12 messages)
should be done and there is 64 µs/133 MHz = 8512 STBus cycles. So, these requests can be spaced by
8512/12 = 709 STBus clock cycles (by putting 709 value in register, the ‘peaks’ on the STBus can be
avoided). The counter used for this purpose is reset by the STBus request
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
64MB_BANK_NUM PIXMAP_MEM_PTR_(LUMA)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
64MB_BANK_NUM PIXMAP_MEM_PTR_(CHROMA)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PITCH_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved Y1 Reserved X1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved Y2 Reserved X2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MAX_PKT_SIZE
BIGNOTLITTLE
Reserved
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
K X.Y:
X: 0 - 7 is the coefficient’s order in the 8 tap polyphase filter
Y: 0 - 31 is the interphase order
Two’s complement form is used for K X.Y
Div Factor: Filter output division
000: Output of the filter is divided by 256
001: Output of the filter is divided by 512
010: Output of the filter is divided by 1024
011: Output of the filter is divided by 2048
100: Output of the filter is divided by 4096
others: reserved
Offset KX & KY:
DC value of the coefficient KX.N and KY.N, where N is 0 to 31 interphase value
Shift X & Y:
0: Coefficients KX.N and KY.N are directly read from register before adding DC value
1: Coefficients KX.N and KY.N are multiplied by 2 (shifted) before adding DC value
At the end, in order to have the sum of coefficients equal to 1 for each subposition (0 dB
attenuation at 0 Hz frequency), different values of scaling are programmable by the
‘Div factor’.
To summarize, the value of coefficients internally used by the filter is given by:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Div
0xDC Reserved K 0.0 K 1.0 K 2.16
factor
Shift 1 & 3
Shift 0 & 4
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
K X.Y
X: 0 - 7 is the coefficient’s order in the 8 tap polyphase filter
Y: 0 - 31 is the interphase order
Two’s complement form is used for K X.Y
Div Factor: Filter output division
000: Output of the filter is divided by 256
001: Output of the filter is divided by 512
010: Output of the filter is divided by 1024
011: Output of the filter is divided by 2048
100: Output of the filter is divided by 4096
others: reserved
Offset KX and KY
DC value of the coefficient KX.N and KY.N, where N is 0 to 31 interphase value
Shift X and Y
0: Coefficients KX.N and KY.N are directly read from register before adding DC value
1: Coefficients KX.N and KY.N are multiplied by 2 (shifted) before adding DC value
At the end, in order to have the sum of coefficients equal to 1 for each subposition (0 dB
attenuation at 0 Hz frequency), different values of scaling are programmable by ‘Div
Factor’.
To summarize, the value of coefficients internally used by the filter is given by:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Div
0xDC Reserved K 0.0 K 1.0 K 2.16
factor
Shift 1 & 3
Shift 0 & 4
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
Reserved
FMC_C
FMC_Y
FML_C
FML_Y
CLK_Y
DTI_C
DTI_Y
MC_C
MC_Y
C_EN
CK_C
Y_EN
[29] DTI_Y:
0: temporal interpolation operates as described in the LMU specification.
1: this bit disables temporal interpolation for the luma pixels.
[28] Y_EN:
When set to 1, the luma LMU is enabled; when set to 0, the luma LMU is disabled
[27:26] CLK_Y:
Depending on the size of the picture being processed by the LMU, it may not be necessary for the LMU
to operate at full speed. These bits allow the LMU operating speed to be controlled so that the STBus
bandwidth consumed by the luma LMU can be evenly distributed over picture time.
00: divide by 1, turbo mode (no clock throttling)
01: divide by 2
10: divide by 3
11: divide by 4
[25:24] FMC_Y: The film-mode control bits select the method for upsampling to create the interpolated luma
lines.
00: motion-adaptive de-interlacing, used for video sources
01: missing lines obtained from following field, used for film source
10: missing lines obtained from preceding field, used for film source
11: blank missing lines, simulates interlaced display
[23:16] FML_Y: The LMU’s film mode detection algorithm compares the current field to the same field in the
previous frame. The comparison starts with line 2 of the luma field and continues until the line number
programmed in FML_Y. A separate comparison is made for luma and chroma portions of the picture.
[15] Reserved
[14] MC_C:
0: the LMU checks for motion by comparing individual chroma pixels from the current top/bottom field
with the co-located chroma pixel in the previous top/bottom field.
1: the motion is calculated using a pair of horizontally adjacent chroma pixels.
The comparison is always between same type fields: top field compared to previous top field, and bottom
field compared to previous bottom field. When using a pixel pair, individual pixels are compared, but the
highest motion result is applied for both pixels. Applying the same motion value to both pixels in a pixel-
pair avoids the situation where motion is detected in the Cb pixel but not in the Cr pixel.
[13] DTI_C: When set to 1, this bit disables temporal interpolation for the chroma pixels. When set to 0,
temporal interpolation operates as described in the LMU specification.
[12] C_EN: Chroma LMU enable
0: Disabled 1: Enabled
[11:10] CK_C: Depending on the size of the picture being processed by the LMU, it may not be necessary for the
LMU to operate at full speed. The bits allow the LMU operating speed to be controlled so that the STBus
bandwidth consumed by the chroma LMU can be evenly distributed over picture time.
00: Divide by 1, turbo mode (no clock throttling) 10: Divide by 3
01: Divide by 2 11: Divide by 4
[9:8] FMC_C: The film-mode control bits select the method for upsampling to create the interpolated chroma
lines.
00: motion-adaptive de-interlacing, used for video sources
01: missing lines obtained from following field, used for film source
10: missing lines obtained from preceding field, used for film source
11: blank missing lines, simulates interlaced display
[7:0] FML_C: The LMU’s film-mode detection algorithm compares the current field to the same field in the
previous frame. The comparison starts with line 2 of the chroma field and continues until the line number
programmed in FML_C. A separate comparison is made for luma and chroma portions of the picture.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LMP Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BLK_PAIRS_PER_LINE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TOG
TNB
422
Reserved
Reset: 0
Description: This register configures the chroma input format and the type of the input field.
[31:3] Reserved
[2] TOG: toggle type of input field. When set the input field selection on the display automatically toggles on
each Vsync. This only allows the field to be set once at a sequence start up. When reset, the selected
field can be frozen or set every field by the application.
[1] TNB: top not bottom field. Indicates which field of the picture is read from memory by the display on the
next Vsync. When set, the top field is selected, when reset, the bottom field is selected. If TOG is set, the
selected field automatically toggles on each Vsync.
[0] 422:
0: 420 input field 1: 422 input field
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved VINL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MRS
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reset: 0
Description: This register configures the number of STBus transactions linked together using the
LCK bit. It indicates the number of packets in a message.
[31:8] Reserved
[7:6] RDY: Luma STBus read interface.
00: A message is 8 packets
01: A message is 1 packet
10: A message is 2 packets
11: A message is 4 packets
[5:4] RDC: Chroma STBus read interface.
00: A message is 8 packets
01: A message is 1 packet
10: A message is 2 packets
11: A message is 4 packets
[3:2] WRY: Luma STBus write interface.
00: A message is 8 packets
01: A message is 1 packet
10: A message is 2 packets
11: A message is 4 packets
[1:0] WRC: Chroma STBus write interface.
00: A message is 8 packets
01: A message is 1 packet
10: A message is 2 packets
11: A message is 4 packets
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CWE
YWE
CDN
CRE
YDN
YRE
CFF
YFF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CWE
YWE
CDN
YDN
CRE
YRE
CFF
YFF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CWE
YWE
CDN
YDN
CRE
YRE
CFF
YFF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
accumulated separately. At the end of the field (that is, during vertical reset), the
maximum difference register for luma is assigned to field DIFF_Y of LMU_AFD, while
the maximum difference register for chroma is assigned to field DIFF_C.
If LMU_CTRL.DTI_Y is set to 1, field LMU_AFD.DIFF_Y is invalid. Similarly, if bit
LMU_CTRL.DTI_C of is set to 1, then field LMU_AFD.DIFF_C is invalid.
51 Compositor
51.1 Overview
The compositor comprises two real-time, multiplane digital mixers. The main mixer (MIX1)
composes up to five layers: a background color, a video plane, two graphics planes, and a cursor
plane. The auxiliary mixer (MIX2) composes the video 2 plane with the graphics 2 plane.
The video planes are supplied from the main and auxiliary display processors. Pixel data for the
2D-graphics planes and cursor plane are read directly from memory.
After real time processing by the display plane pipelines, pixel data are mixed in mixer 1 or
mixer 2. The output of mixer 1 supports up to full HD resolutions and is intended as the main TV
display (Figure 165). The output of mixer 2 (Figure 166) supports up to full SD resolutions and is
intended as an auxiliary display for applications including connection to a VCR. The mixer
outputs are fed to the STx7100’s output stage.
Alpha plane
Background color
VID1
X
Confidential
GDP1
GDP2
cursor
08:23pm
Channel 5
Replay Score Stats
08:23pm
The compositor also comprises additional components that can be used to enhance the display
presentation of video and graphics. These include an alpha plane attachment and a cross-bar
router. Their functions are described below. A capture pipeline is also provided for capturing
main or auxiliary video streams or mixer 1 or 2 output streams and storing them in memory.
VID2
GDP2
Channel5
Figure 167 shows a block diagram of the compositor. It presents the dataflow and memory
access of all the compositor modules.
The graphics and cursor pipelines read pixel data and related control information directly from
memory. The video input pipelines accept data from the main and auxiliary video display
pipelines. Video and graphics data captured for the compositor data flow by the capture pipeline
is written back to memory with a resolution up to 32 bits/pixel. The real-time processing
performed by each pipeline is controlled by register programming.
Digital mixer 1 successively blends video layers VID1, both graphics layers (GDP1 and GDP2),
the cursor layer and a background color. A cross-bar router enables the hierarchy of the GDP1
and VID1 layers to be programmed. The resulting order is background color, GDP2, (VID1 and
GDP1 in programmed order) and cursor from background to foreground. Each layer can be
independently enabled or disabled. The blending operates in the RGB color domain, so each
layer supplies an RGB signal (3x12 bits), with transparency information that provides the
weighting coefficients for the mixing operation at a given depth.
Digital mixer 2 successively blends one video layer (VID2) with one graphics layer (GDP2). For
mixer 2, the priority is fixed with GDP2 in front of video.
All sub-blocks are controlled by hardware registers. All these registers can be read but not
necessarily written. The graphics planes are link-list based and have their register set written
through the memory (register download is controlled directly by the hardware after initialization).
All other registers can be written. The registers are listed in Chapter 52 on page 550. Each plane
block supports a specific set of bitmap formats. All bitmap formats are described in Section
47.8: Local memory storage of supported graphics formats on page 454. Each plane starts
reading data from memory when it is enabled in mixer 1 or mixer 2.
Compositor
System interconnect
ALP
BKC i0
video
display VID1 i1 o1 i1
GDP1
i3 o3 i3
Alpha attachment
GDP2
i4 o4 i4
Output stage
i6 o6 i6
i7 o7 i7
Cross-bar
i8
CUR
mixer 1- main
Confidential
digital blender
RGB to YCbCr
2-channel
auxiliary
video
display VID2
mixer 2- auxiliary
The computation unit outputs a 4:4:4 digital RGB signal. A global rectangular window for defining
the active video area is provided (GAM_MIX1_AVO and GAM_MIX1_AVS). Outside this window,
the mixer outputs a default blanking color (black R = G = B = 0). A window indicator signal is
provided, synchronously with the RGB data bus, for external use (such as a video blanking
signal).
Mixer 1 takes into account bits IGNOREONMIX1 and FORCEONMIX1 (GAM_GDPn_PPT),
provided by the GDP pipelines, on any enabled GDP layer. If bit IGNOREONMIX1 is set, the
current viewport is not displayed. If bit FORCEONMIX1 is set, then the GDP viewport color
information can be displayed outside the active video area window, instead of the blanking color.
Note: The window indicator flag is not affected.
From an application point of view, this last feature is useful when a VBI waveform has been
synthesized as a graphics object, and uses a GDP pipeline to be inserted in the analog output on
a VBI line.
Two configurable signals can indicate whether the current output contains a certain amount of
graphics information, or if it is composed of pure video content. In some systems, external
processing operations can be applied selectively, according to the pixel video or graphic content.
● 5-tap horizontal sample rate converter, for horizontal upsampling. This can be used to adapt
the pixel aspect ratio. The resolution is 1/8th pixel (polyphase filter with eight subpositions).
● Color keying capability.
The output format of GDP is RGB-12-12-12 that goes to the digital mixer along with the 8-bit
alpha and 8-bit (1-alpha) values. See full description of the supported graphics in Section
47.8: Local memory storage of supported graphics formats on page 454.
A GDP can handle a multiple-viewport display, using a display instruction list (link list) stored in
the external memory. (A viewport is a physical rectangular area on the screen. It is defined by
XDO / XDS / YDO / YDS with reference to the top-left corner of the screen.)
Screen
Viewport
Screen (0,0) Pitch
Window
YDO Bitmap (0,0)
Viewport
height
YDS
Viewport
width
XDO XDS
Stored bitmap
One or several viewports can be attached to the GDP layer, depending on its capabilities. When
several viewports are defined within a layer, only one viewport can be handled by each video
scan line. In a given layer, each screen location where no viewport is defined is automatically
transparent (the alpha channel to the mixer is forced to 0).
A bitmap stored in external memory must be attached to the viewport. All or part of this bitmap
can be visible in the viewport; this is the bitmap window. The window is defined by the bitmap
color format, bitmap pitch, linear start address, width and height. The linear start address is the
address of the bitmap pixel that is to be displayed in the top-left corner of the viewport, that is the
address of the window (0,0) pixel.
Most of the time, the window and the viewport have the same size. Their sizes are different each
time a resizing factor is applied to the window, so that the rescaled bitmap matches with the
viewport size.
When programmed sizes are not consistent, the display is locally undefined.
The screen is described by a display link-list that must be built in the external memory. For each
viewport, a node is defined that contains the viewport configuration, bitmap window settings,
display options (such as global transparency, filtering mode, gain/offset adjustment). The node
also contains a memory pointer to the node describing the next viewport to display.
The display link-list is generally circular. For an interlaced display, the link-list is field-based. A
node must be provided for the top and the bottom fields (they can be different, particularly the
start address).
(0,0)
GFX
data 1
viewport 1 (RGB565) Node 1
Confidential
GFX
viewport 2
Node 2 data 2
(YCbCr422R)
Node 3
viewport 3 (ARGB4444)
GFX
Nodes data 3
Screen
(0,0)
Node 1 GFX
Top
data 1
viewport 1 (RGB565)
Node 2
Top
GFX
viewport 2
Node 3 data 2
(YCbCr422R) Top
Node 1
Bottom
viewport 3 (ARGB4444)
GFX
screen
Node 2 data 3
Bottom
Node 3
Bottom
Graphics data
External memory Nodes
Confidential
YDO and YDS are specified with respect to a frame line-numbering, even in an interlaced
display.
The next figure specifies how the hardware must consider the register values, depending on the
top or bottom field, so that each viewport can be vertically positioned with a one-line accuracy.
1 - During the top field, the VTG counter must be compared to (YDO+1 >> 1) and (YDS >> 1) for detecting the
viewport active area.
2 - During the bottom field, the VTG counter must be compared to (YDO >> 1) and (YDS-1 >> 1) for detecting the
viewport active area.
3 - Whatever the field, top or bottom, the first bitmap line to read from memory is always at the memory
location specified by the GDP_PML register. It is the responsibility of the software to program this register
according to the field parity.
When the hardware is working from the current displayed link-list, the software is free to make
any modification in the other link-list, such as viewport parameters, viewport insertion/deletion.
Once the link-list has been updated, the software simply updates the GAM_GDPn_NVN register
field in the last node of the current link-list. This is a single memory write access, and thus cannot
conflict with a hardware access (no partially updated parameters). As this node has been
programmed not to anticipate the next node loading, the hardware waits until the next Vsync, and
then correctly switches to the new link-list.
If memory update for register GAM_GDPn_NVN is synchronized in the Vsync software handler,
the link-list switch occurs with a one field delay (or one frame if progressive).
For an interlaced display, this scheme can be simplified by using a single link-list and updating
the top parameters while the bottom field is displayed and vice-versa.
Bandwidth considerations
In terms of the bandwidth requirement (BR), the general formula to estimate the GDP weight on
a given system is the following:
BR (in Mbyte/s) = (pixel frequency in MHz) x (number of bytes per pixel) x (horizontal
resampling factor)
Examples:
● 601 rate / RGB565 / x1: BR = 13.5 x 2 x 1 = 27 Mbyte/s
ARGB8888 A8a R8 G8 B8
ARGB4444 0/A4/100 R4/4MSB or 0000 G4/4MSB or 0000 B4/4MSB or 0000
(but keep 0 and 128)
YCbCr888 128 Cr8 Y8 Cb8
YCbCr422R
a. The GDP supports either 0 to 128 or 0 to 255 8-bit alpha. When a 255 range is used, the input
alpha value is converted to a 0 to 128 component using the following formula:
A0..128 = (A0..255 + 1) x 2-1.
When there is no alpha channel in the input color format, a 128 alpha value is forced, except for
the ARGB1555 mode. In this case, the global alpha registers (0 and 1) are used in the input
formatter block. When bit 15 of the incoming pixel (A1) is 0, the alpha output is forced to the value
of GLOBAL_ALPHA_0. When bit 15 is 1, the alpha output is forced to the value of
GLOBAL_ALPHA_1.
Two possibilities are provided to extend the component depth (4/5/6 bits to 8 bits): either the
LSBs are filled with 0, or the MSBs are repeated, so that the full 8-bit color range can be used
(see LSB_STUFFING_MODE in register GAM_GDPn_CTRL). For 4:2:2 to 4:4:4 conversion, the
interpolation scheme is similar to the one used in the blitter (except for the chroma extended
mode that is not supported). This is described in Chapter 47: 2D graphics processor (blitter)
on page 424.
YCbCr to RGB
3x3
Input RGB
32 24 matrix 30
or bypass
Output
(to gain / offset block)
Alpha
8 8
Alpha component:
pipeline compensation
Color key
If the current pixel color is part of the key range, then the associated alpha component of this
pixel is forced to 0, making this pixel totally transparent when mixed with the background layers in
the digital mixer. The color components are forced to black.
Settings
Color key
processor
YCbCr YCbCr
or RGB Match or RGB
Input
38 30 black Output
30 38
Color components
8
0 8
Alpha
Alpha
Alpha component
Gain/offset adjustment
A dynamic range adjustment is provided. The three RGB components can be multiplied by a
fixed coefficient, before they are sent to the digital mixer. This is useful to avoid highly saturated
colors to be mixed with video. The black level can be adjusted as well. When used
Confidential
GAM_GDPn_AGC.CONSTANT
GAM_GDPn_AGC.GAIN
8, 0 to 128 8, 0 to 255
7 0 GAM_GDPn_AGC.CONSTANT
+ 11 8 7 0 Rg Gg Bg
-16 -1
RGBOUT = ((((RGBIN x GAM_GDPn_AGC.GAIN) x 2 ) + 1) x 2 ) + GAM_GDPn_AGC.CONSTANT
Naming conventions:
● AlphaPIXEL is the alpha component attached to the current pixel at the output of the color
● AlphaBKG is the weight provided to the mixer for the background color components
IF (InputFormat == ARGB1555)
GlobalAlpha = 128; // GLOBALALPHA0/1 registers used in input formatter block
ELSE
GlobalAlpha = GlobalAlpha0_register;
IF [(FirstPixel or LastPixel) AND ALPHA_HBORDER_EN]
OR ((FirstLine OR LastLine) AND ALPHA_VBORDER_EN))
GlobalAlpha = GlobalAlpha >> 1; // Alpha divided by 2 on viewport edges
IF (PREMULTIPLIED_FORMAT)
AlphaGDP = GlobalAlpha // AlphaPIXEL already applied on color components
ELSE
AlphaGDP = (((GlobalAlpha x AlphaPIXEL) >> 6) + 1) >> 1;
AlphaBKG = 128 - { [((GlobalAlpha x AlphaPIXEL) >> 6) + 1] >> 1 },
GLOBALALPHA0/1 registers refer to GAM_GDPn_AGC.GLOBAL_ALPHA_0 and
GLOBAL_ALPHA_1.
Confidential
● Hardware rectangular clipping window, out of which the cursor is never displayed (per-pixel
clipping, so only part of the cursor can be out of this window, and consequently transparent).
● Current bitmap is specified using a pointer register to an external memory location, making
cursor animation very easy.
● Programmable pitch, so that all cursor patterns can be stored in a single global bitmap.
Alpha
Formatter
Input
FIFO CLUT
8-bit RGB 3 x 4 bits
index
System Request
interconnect from mixer
ARGB4444 entries.
● The vertical size of the cursor pattern can range from 1 to 128 (register GAM_CUR_SIZE).
● The maximum horizontal size depends on the memory alignment of the cursor pixel data.
Assume that CUR_MEM_ADDR (GAM_CUR_PML) is the memory address for pixel (0,0),
with respect to a top-left origin. The maximum width is:
MAX_CURSOR_WIDTH = 128 - (CUR_MEM_ADDR mod 16)
When the cursor data are aligned on a 128-bit word memory, the maximum width is 128.
The worst case is when (CUR_MEM_ADDR mod 16) = 15 (example: 0xAAAF); the
maximum width becomes 113.
● The cursor pipeline is controlled through a register file directly accessible by the CPU. As
these registers are double-buffered with internal update on Vsync, any change is taken into
account during the next field to be displayed.
● The cursor pattern can be changed simply by modifying register GAM_CUR_PML (GUI
cursor change, cursor animation).
● The CLUT is loaded from memory during each vertical blanking interval, if this loading
process is enabled (see GAM_CUR_CTRL.REFRESH). A dedicated register provides the
memory address to retrieve the CLUT data (GAM_CUR_CML).
● The YDO value (in register GAM_CUR_VPO) is specified with respect to frame line-
numbering, even in an interlaced display.
The next figure specifies how the hardware uses these register values, depending on the
parity of the current field (top or bottom), so that each viewport can be vertically positioned
with a one-line accuracy. Thus these registers need not be programmed according to the
current displayed field. The pipeline automatically fetches the right data in memory.
Bandwidth considerations
In terms of bandwidth requirements, the cursor pipeline weight on a given system is as follows:
● During the active video scanning area, one or two requests that occur at the beginning of
the video line (total: 128 bytes or less, according to the cursor width). Normally, one burst is
OK, except if there is a memory page crossing (the page size is assumed to be 512 bytes).
● During the vertical blanking interval, four or five consecutive requests to refresh the CLUT,
that occur just after the Vsync event (five in the case of a memory page crossing).
AR GB AR0 GB0
Entry 0 0
GB0 AR0 1
ARGB4444
AR1 GB1 2
Entry 1
GB1 AR1
AR44 GB44 3
4
5
7
Two bytes swap
Clipping window
Confidential
A rectangular clipping window can be defined. Outside this window, the cursor pattern, even if
defined, is forced to be transparent (alpha = 0).
The clipping window is defined using two registers: GAM_CUR_AWS (active window start) and
GAM_CUR_AWE (active window end). This is specified with respect to the frame numbering
convention (such as a GDP or VID viewport).
Figure 178 illustrates the use of the hardware cursor clipping window. Bits XDO and YDO are
signed (register GAM_CUR_VPO), so that the top-left corner of the cursor pattern can be
positioned anywhere in the screen, even in horizontal and vertical blanking.
There is no enable bit for the hardware window: the feature is disabled by programming the
window to match the screen size.
Note: The same screen look can be obtained without using the hardware window. As the address
generator supports a pitch parameter (GAM_CUR_PMP) that is different from the cursor width, it
is possible to use the base address GAM_CUR_CML.CLUT_MEM_ADDR and the width
(GAM_CUR_SIZE.WIDTH) parameters in conjunction.
screen
active video
CUR_AWS clipping window
CUR_VPO
visible
hidden CUR_AWE
CUR_SIZE.WIDTH
● Global alpha blending (combined with the per pixel alpha channel, if any),
Local registers
STBus
controller
Color
key
STBus Color key
match
YCbCr
Confidential
36
YCbCr RGB
to
3 x 10 bits 30
RGB
data to
Global Alpha 0 8
Input A mixer
0 to 255 register Alpha
port Alpha
8 bits
to out 8
8 1-A
0 to 128
REQ
VALID Request from mixer
The matrices are providing 12 bit signed gamma-corrected RGB components, with a dynamic
range (-2048 to 2047).
The color key processor operates in the YCbCr color space, according to the following equation:
COLOR_KEY_MATCH =
((CRin < CRmin) OR (CRin > CRmax)) AND (CRoutside = True) AND (EnableCR = True)
OR (CRmin <= CRin <= CRmax) AND (CRoutside = False) AND (EnableCR = True)
OR (EnableCR = False)
AND
((Yin < Ymin) OR (Yin > Ymax)) AND (Youtside = True) AND (EnableY = True)
OR ( Ymin <= Yin <= Ymax) AND (Youtside = False) AND (EnableY = True)
OR (EnableY = False)
Confidential
AND
((CBin < CBmin) OR (CBin > CBmax)) AND (CBoutside = True) AND (EnableCB = True)
OR ( CBmin <= CBin <= CBmax) AND (CBoutside = False) AND (EnableCB = True)
OR (EnableCB = False)
Note: The min and max registers are 8-bit registers (GAM_VIDn_KEY1/2). Thus, the two LSBs of the
incoming components are ignored by the color key processor.
● 5-tap horizontal sample rate converter, for horizontal upsampling. This can be used to adapt
the pixel aspect ratio.
The resolution is 1/8th pixel (polyphase filter with 8 subpositions)
The ALP output format is an 8-bit alpha value, ranging from 0 to 128.
STBus
controller
(T1/2xT2) VF
2-tap V-SRC
5-tap Alpha
0:0:0:4 8-bit alpha
H-SRC out
Formatter to
Confidential
Input Delay HF
FIFO line
Bandwidth considerations
In terms of bandwidth requirement (BR), the general formula to estimate the ALP weight on a
given system is the following:
BR (in Mbyte/s) = (pixel frequency in MHz) x (number of bits per pixel) x (horizontal
resampling factor) / 8
Examples:
● 601 rate / A1 / x1: BR = 13.5 x 1 x 1 / 8 = 1.69 Mbyte/s
a. The ALP supports either 0 to 128 or 0 to 255 8-bit alpha. In case 255 range is used, the input
alpha value is converted in to a 0 to 128 component, using the following formula:
A0..128 = (A0..255 + 1) x 2-1
In A1 mode, when the bit is 0, then the alpha output is forced to the GLOBAL_ALPHA_0 value,
when the bit is 1, the alpha output is forced to the GLOBAL_ALPHA_1 value.
Confidential
The output of the formatter can be optionally complemented: (128 - Alpha) operator is applied
if GAM_ALP_CTRL.REV_ALPHA_EN is set to 1.
52 Compositor registers
52.1 Introduction
All the registers are seen from a start address. The registers of individual submodules of the
compositor, have addresses with respect to the corresponding base address (BaseAddress +
offset).
The relative register map is as given below. Each block occupies a 64x32-bit word address
range.
A complete register address is: CompositorBaseAddress + BlockOffset + register offset.
The CompositorBaseAddress is:
0x1920 A000.
A complete description of the compositor registers is given in the next sections. The complete
register name can be found applying the following rule: prefix GAM_ prefix ‘PIPE’_ register
designation.
Example: GAM_CUR_PML
128-bit word
Description Register Offset Type
alignment
Control register GAM_GDPn_CTRL 0x0000 RO/LLU Node
Blending and dynamic range control GAM_GDPn_AGC 0x0004 RO/LLU
128-bit word
Horizontal sample rate converter GAM_GDPn_HSRC 0x0008 RO/LLU 1
control
Viewport definition GAM_GDPn_VPO 0x000C RO/LLU
GAM_GDPn_VPS 0x0010 RO/LLU Node
Pixmap-related settings GAM_GDPn_PML 0x0014 RO/LLU
128-bit word
GAM_GDPn_PMP 0x0018 RO/LLU 2
GAM_GDPn_SIZE 0x001C RO/LLU
Reserved - 0x0020 - Node
Pointer to the next viewport node GAM_GDPn_NVN 0x0024 RO/LLU
128-bit word
Color key GAM_GDPn_KEY1 0x0028 RO/LLU 3
GAM_GDPn_KEY2 0x002C RO/LLU
Memory node
Pointer the horizontal filter coefficients GAM_GDPn_HFP 0x0030 RO/LLU Node
Viewport properties GAM_GDPn_PPT 0x0034 RO/LLU
128-bit word
Reserved 0x0038 - 4
Confidential
0x003C -
Horizontal filter coefficients GAM_GDPn_HFCn
GAM_GDPn_HFC0 0x0040 RO/LLU HF coefficient
GAM_GDPn_HFC1 0x0044 RO/LLU
128-bit word
GAM_GDPn_HFC2 0x0048 RO/LLU 1
GAM_GDPn_HFC3 0x004C RO/LLU
GAM_GDPn_HFC4 0x0050 RO/LLU HF coefficient
Filter coefficient structure
Reserved - 0x0068 - - 3
0x006C
STBus protocol/maximum packet size GAM_GDPn_PKZ 0x00FC R/W -
128-bit word
Description Register Offset Type
alignment
Control register GAM_ALP_CTRL 0x0000 RO/LLU Node
GAM_ALP_ALP 0x0004 RO/LLU
128-bit word
Horizontal sample rate converter control GAM_ALP_HSRC 0x0008 RO/LLU 1
Viewport definition GAM_ALP_VPO 0x000C RO/LLU
GAM_ALP_VPS 0x0010 RO/LLU Node
Pixmap-related settings GAM_ALP_PML 0x0014 RO/LLU
128-bit word
GAM_ALP_PMP 0x0018 RO/LLU 2
GAM_ALP_SIZE 0x001C RO/LLU
Reserved - 0x0020 - Node
Pointer to the next viewport node GAM_ALP_NVN 0x0024 R/W/LLU
128-bit word
Reserved - 0x0028 - 3
0x002C
Memory node
Pointer the horizontal filter coefficients GAM_ALP_HFP 0x0030 RO/LLU Node
Viewport properties GAM_ALP_PPT 0x0034 RO/LLU
128-bit word
Reserved - 0x0038 - 4
0x003C
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HFILTER_UPDATE_EN
WAIT_NEXT_VSYNC
A1_INBYTE_ORDER
A1_BYTE_START
ALPHA_FORMAT
REV_ALPHA_EN
ALPHA_RANGE
H_RESIZE_EN
Reserved
Reserved
Reserved
Address: CompositorBaseAddress + ALPOffset + 0x00
Type: Read/link list update
Buffer: Double-bank, automatic hardware toggle
Reset: 0
Description: This register provides the operating mode of the ALP pipe, for the current viewport.
[31] WAIT_NEXT_VSYNC
0: The next node (as specified by GAM_ALP_NVN) is immediately loaded
1: ALP pipeline waits for the next VSync event before it loads the next node
Confidential
[30] HFILTER_UPDATE_EN: This bit is taken into account for any viewport node within a frame (field).
0: The coefficients for the H filter are not loaded
1: The coefficients for the H filter are updated from memory (see GAM_ALP_HFP)
[29] REV_ALPHA_EN: In reverse mode, (128-alpha) operator is applied at the pipeline input.
0: Alpha mode 1: Reverse alpha mode
[28] Reserved
[27] A1_INBYTE_ORDER: A1 format only: specifies sample ordering inside a byte
0: Screen most right sample in the MSB 1: Screen most right sample in the LSB
[26:24] A1_BYTE_START: A1 format only: specifies the bit location of the first alpha sample, in the first byte
000: First 1-bit alpha sample is bit 0 001: First 1-bit alpha sample is bit 1
-------
111: First 1-bit alpha sample is bit 7
[23:11] Reserved: Set to 0
[10] H_RESIZE_EN: Horizontal resize enable
0: Disabled 1: Enabled
[9:6] Reserved
[5] ALPHA_RANGE: for A8 format, this bit specifies the alpha range.
0: 0 to 128 range (128 = opaque) 1: 0 to 255 range (255 = opaque)
[4:0] ALPHA_FORMAT: alpha format for the bitmap associated to the current viewport
11000: A1 (0x18) 11001: A8 (0x19)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HSRC_INIT_PHASE
Confidential
HF_FILTER_MODE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
64MB_BANK PIXMAP_ADDR
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PITCH_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
64MB_BANK NEXT_NODE_ADDR Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ALPHA_
Reserved Reserved
ATTACHMENT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BIGNOTLITTLE
PKT_SIZE
Reserved
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REFRESH
Reserved
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CUR_BANK_NUM CUR_MEM_ADDR
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PIX_MEM_PITCH
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLUT_BANK_NUM CLUT_MEM_ADDR
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BIGNOTLITTLE
PKT_SIZE
Reserved
Confidential
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R/CR_COLOR_KEY_CFG
B/CB_COLOR_KEY_CFG
G/Y_COLOR_KEY_CFG
LSB_STUFFING_MODE
ALPHA_HBORDER_EN
HFILTER_UPDATE_EN
WAIT_NEXT_VSYNC
PREMULT_FORMAT
CHROMA_FORMAT
ALPHA_VBORDER
COLOR_FORMAT
COLOR_KEY_EN
ALPHA_RANGE
BIGNOTLITTLE
H_RESIZE_EN
601/709_SEL
Reserved
Reserved
Reserved
Reserved
Reserved
Address: CompositorBaseAddress + GDPnOffset + 0x00
Type: Read/link list update
Buffer: Double-bank, automatic hardware toggle
Reset: 0
Description: This register provides the operating mode of the GDP pipe for the current viewport
display.
[31] WAIT_NEXT_VSYNC
0: The next node (as specified by GAM_GDPn_NVN) is immediately loaded
1: The GDP must wait for the next Vsync event before it loads the next node
[30] HFILTER_UPDATE_EN
Confidential
This bit is taken into account for any viewport node within a frame (field)
0: Coefficients for the H filter are not loaded
1: Coefficients for the H filter are updated from memory (see GAM_GDPn_HFP)
[29] LSB_STUFFING_MODE
This configuration bit is used by the input formatter, in order to build the 32-bit internal pixel bus, whatever
the input color format. When set, this bit preserves the full dynamic range 0.0 to 1.0, whatever the input
format.
Note: The color key is affected by this setting.
0: If the number of bits per component at the input is fewer than 8, missing LSBs are filled with 0.
1: If the number of bits per component at the input is fewer than 8, missing LSBs are filled by the
appropriate number of MSBs.
[28:27] Reserved
[26] CHROMA_FORMAT
0: The color space converter assumes Cb/Cr use offset binary representation
1: The color space converter assumes Cb/Cr use two’s complement signed representation
[25] 601/709_SEL
0: The color space conversion uses the 601 colorimetry
1: The color space conversion uses the 709 colorimetry
[24] PREMULT_FORMAT: Premultiplied format
0: RGB components are not premultiplied by the alpha component
1: RGB components are premultiplied by the per-pixel alpha component
Note: This is only meaningful for ARGB4444, ARGB8565 and ARGB8888 formats.
[23] BIGNOTLITTLE: 0: Little endian bitmap 1: Big endian bitmap
[23:22] Reserved
[21:20] R/CR_COLOR_KEY_CFG: R/CR color key configuration
x0: R/Cr component ignored (disabled = always match)
01: R/Cr enabled: match if (R/Crmin<= R/Cr <= R/Crmax)
11: R/Cr enabled: match if ((R/Cr < R/Cr min) or (R/Cr > R/Crmax))
[15] Reserved
[14] COLOR_KEY_EN
0: Color key feature is disabled 1: Color key feature is enabled
[13] ALPHA_VBORDER_EN: Provides soft horizontal edges for the viewport, with flicker reduction effect.
0: Feature disabled
1: Alpha component is divided by 2 on the first line and the last line of the viewport
[12] ALPHA_HBORDER_EN: Provides soft vertical edges for the viewport.
0: Feature disabled
1: Alpha component is divided by 2 on the first and last columns of the viewport
[11] Reserved: Set to 0
[10] H_RESIZE_EN
0: Horizontal resize block is disabled 1: Horizontal resize block is enabled
[9:6] Reserved
Confidential
[5] ALPHA_RANGE: for color format with an 8-bit alpha component (ARGB8888 / ARGB8565), this bit
specifies the alpha range.
0: 0 to 128 range (128 = opaque) 1: 0 to 255 range (255 = opaque)
[4:0] COLOR_FORMAT: color format for the bitmap associated to the current viewport
0 0000: RGB565 (0x0) 0 0001: RGB888 (0x1)
0 0100: ARGB8565 (0x4) 0 0101: ARGB8888 (0x5)
0 0110: ARGB1555 (0x6) 0 0111: ARGB4444 (0x7)
1 0000: YCbCr888 (0x10) 1 0010: YCbCr4:2:2R (0x12)
1 0101: AYCbCr8888 (0x15)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
For ARGB1555 color format, this is the pixel transparency that is applied to the current pixel if the alpha
bit within the pixel (bit 15) is 1.
The register range is 0 to 128. (0: fully transparent, 128: fully opaque)
[7:0] GLOBAL_ALPHA_0
For any color format except ARGB1555, Alpha 0 is the global transparency associated with the viewport,
that is combined with the per-pixel alpha component, if any.
For ARGB1555 color format, this is the pixel transparency that is applied to the current pixel if the alpha
bit within the pixel (bit 15) is 0.
The register range is 0 to 128. (0: fully transparent, 128: fully opaque)
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HSRC_INIT_PHASE
HF_FILTER_MODE
Reserved Reserved Reserved HSRC_INC
[15:10] Reserved
[9:0] HSRC_INC: Horizontal sample rate converter state-machine increment, in 2.8 format.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
64MB_bank PIXMAP_ADDR
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PITCH_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IGNOREON_MIX2
IGNOREON_MIX1
FORCEON_MIX2
FORCEON_MIX1
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BIGNOTLITTLE
PKT_SIZE
Reserved
Reserved
Type: R/W
Buffer: Immediate
Reset: 0x10
Description: This register is a 3-bit register for controlling the maximum size of a data packet during
an STBus transaction. These bits must be set to 0 in the STx7100 device.
[31:6] Reserved
[5] BIGNOTLITTLE: CPU endianness.
0: little endian CPU 1: big endian CPU
[4:3] Reserved
Must be set to 0.
[2:0] PKT_SIZE: Maximum packet size during an STBus transaction
000: message size 001: 16 STBus words
010: 8 STBus words 011: 4 STBus words
100: 2 STBus words 101: 1 STBus word
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GDP2_DISP_EN
GDP1_DISP_EN
VID1_DISP_EN
CUR_DISP_EN
BKC_DISP_EN
AP_DISP_EN
Reserved
Reserved Reserved Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GDP2_ONGFXACTIVE
GDP1_ONGFXACTIVE
GDP2_ONVIDACTIVE
GDP1_ONVIDACTIVE
VID1_ONGFXACTIVE
CUR_ONGFXACTIVE
BKC_ONGFXACTIVE
VID1_ONVIDACTIVE
CUR_ONVIDACTIVE
BKC_ONVIDACTIVE
Confidential
Reserved
Reserved
Reserved Reserved Reserved Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
GDP2_DISP_EN
VID2_DISP_EN
Reserved
Reserved
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
GDP2_ONGFX_ACTIVE
GDP2_ONVID_ACTIVE
VID2_ONGFX_ACTIVE
VID2_ONVID_ACTIVE
Reserved
Reserved
Reserved
Reserved
Reserved
Address: CompositorBaseAddress + MIX2Offset + 0x38
Type: R/W
Buffer: Double-buffered, update on VTG Vsync
Reset: 0
Description: Defines the layers that contribute to the construction of GFXActive2 and VideoActive2
flags. A layer is considered as active for a given pixel if its associated alpha component
is not zero.
XXX_ONVID_ACTIVE: If set to 1, the XXX layer is taken into account for the VideoActive flag
XXX_ONGFX_ACTIVE: If set to 1, the XXX layer is taken into account for the GFXActive flag
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IGNORE_MX2
IGNORE_MX1
709NOT601
CKEY_CFG
Reserved
Reserved
Reserved
Reserved
CFORM
CKEY
AB_H
AB_V
Address: CompositorBaseAddress + VIDnOffset + 0x00
Type: R/W
Buffer: Double-buffered, update on VTG Vsync
Reset: 0
Description: This register contains the values for controlling VID core. Color key and alpha border
features are not available for a video layer displayed via MIX2.
[31] IGNORE_MX2: When set, this bit indicates to MIX2 that the video data must be ignored when blending,
even if enabled in MIX2_CTRL. (But the mixer request is generated)
[30] IGNORE_MX1: When set, this bit indicates to MIX1 that the video data must be ignored when blending,
even if enabled in MIX1_CTRL. (But the mixer request is generated)
[29:27] Reserved
[26] CFORM: Chroma format (0=offset 128,1=signed)
[25] 709NOT601: Colorimetry selection (0=601, 1=709)
Confidential
[24:22] Reserved
[21:16] CKEY_CFG: Configuration of color key
[21:20] VID_CTRL[5:4]: Cr component
x0: Cr component ignored (disabled = always match)
01: Cr enabled: match if (Crmin <= Cr <= Crmax)
11: Cr enabled: match if ((Cr < Crmin) or (Cr > Crmax))
[15] Reserved
[14] CKEY: When this bit is set, the color key feature is enabled.
[13] AB_V: Enable AlphaVBorder: When this bit is set, the alpha component on the first and last lines of the
viewport is divided by 2 (edge smoothing)
[12] AB_H: Enable AlphaHBorder: When this bit is set, the alpha component on the first and last columns of
the viewport is divided by 2 (edge smoothing)
[11:0] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved GLOBAL_ALPHA_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
The VOS receives video data from the main (mixer 1) and auxiliary (mixer 2) compositor outputs.
This data is formatted and delivered to the DENC, HD and SD video DACs, HDMI formatter and
digital video output (DVO).
VOS
VTG1
Compositor HD Digital
YCbCr Digital out
HD YCbCr video output
video1
Colorimetry: Formatter
MIX1
Upsampler
Horiz SRC
main output
Confidential
770.x HD Main_R_Pr
Graphics syncs formatter 3xDAC Main_G_Y
STBus overlay RGB Main_B_Pb
HDMI HDMI
HDMI output
formatter PHY
Composition
YCbCr
Analog
auxiliary
YCbCr
video2
output
ID
Display AUX_Y_R
MIX2
SD
DENC AUX_C_G
YCbCr 3xDAC
AUX_CVBS_B
VTG2
encryption unit followed by a physical interface (HDMI PHY). In front of the analog output, a
programable formatter is provided allowing different output modes. The DACs are preceded by a
sample-rate-converter (SRC) which upsamples the video signal to adapt the pixel rate to the
video DAC sampling rate. This SRC has programmable coefficients. The video signal is
interpolated using programmable set of coefficients designed to keep the maximum signal
bandwidth. With a dedicated set of coefficients, a “constrained output” can be generated
whereby the video bandwidth is cut down. For example, the analog video resolution can be
degraded by 1/4, such that the full-resolution video is only available on the encrypted HDMI
output.
HDMI output
This output supports 480p, 720p and 1080i formats as per HDMI specification.
This output delivers a digital SD video (480i), YCbCr 8-bit 4:2:2 with or without embedded syncs
(ITU-R BT 656 or 601).
● 148.5/1.001: used in applications where the main output is 1080i or 720p at 29.97 Hz or
59.94 Hz.
● 108 MHz: used in application where the main output is 480p at 59.94 Hz. The display clock in
that case is 27 MHz and an x2 upsampling must be used.
● 108 MHz: used in applications where both outputs are 480i at 29.97 Hz. The display clock in
that case is 13.5 MHz and an x4 upsampling must be used.
● 108 x 1.001 (108.108 MHz): used in applications where the main output is 480p at 60 Hz.
The auxiliary master pixel clock (generated by the clock generator B) is always 27 MHz.
Note: 1080i and 720p are 30/60 Hz display standards; 480i and 480p are 29.97/59.94 Hz display
standards. For some applications where it is preferable to keep the input rate for the display, the
clock is altered by a factor of 1.001 to adapt the output rate by keeping the scanning. This is
possible in 1080i, 720p and 480p formats but not in 480i format where the CVBS or C outputs,
(chroma modulation) are very sensitive to clock rate and can not accept such a divergence.
The VOS implements a number of clock domains to make possible different configurations:
● CLK_PIX_HD: main master pixel clock, clocking HD DACs and TMDS block (HDMI PHY),
CLK_DISP_HD
VTG1
Compositor
YCbCr HDt Digital
HD YCbCr
video1
RGB Colorimetry:
Display RGB to YCbCr Y/C (SD)
SD YC/CB/CR
ITU601/709 4: 4: 4 to formatter
YCbCr SMPTE 240M 4:2:2 CLK_656
to RGB
CLK_PIXEL_HD
Horiz SRC
Upsample
770.x HD Analog
STBus
RGB
CLK_COMP
HDMI HDMI
GDP2 HDMI out
Formatter PHY
CLK_HDMI
YCbCr
CLK_PIX_SD
YCbCr
video2
ID
Display
MIX2
SD AUX out
DENC
YCbCr 3 DAC
VTG2
CLK_DISP_ID CLK_DISP_ID
CLK_DISP_HD CLK_PIX_SD
CLK_PIXEL_HD CLK_COMP
CLK_656 CLK_HDMI
53.2.1 Applications
Table 174 summarizes some clock frequency values with respect to the display configurations.
Related clocks (obtained by division of the same master clock) are shown with the same
background color: magenta for main and blue for auxiliary.
CLK_PIXEL_HD
CLK_DISP_HD
CLK_PIXEL_SD
CLK_DISP_SD
CLK_656
CLK_COMP
Application
These clocks are generated by the clock generator B. For details, see Chapter 17: Clocks
on page 147.
HREF
HDO
HSYNC
HDS
Pixel active
XDO
Active video Active video
XDS
Confidential
All the pixel numbers in a line are referenced to the rising edge of HREF.
● CLKLN (VTGn_CLKLN register) specifies the line length in PIXCLK cycles.
● HDO (register VTGn_HDO) defines the number of PIXCLK cycles between the rising edge
of the internal HREF and the rising edge of HSYNC.
● HDS (register VTGn_HDS) defines the number of PIXCLK cycles between the rising edge
of the internal HREF and the falling edge of HSYNC.
● Registers XDO and XDS, defining the active video line (horizontal dimension of the active
video window) are located in the mixers of the compositor.
Note: If the HDS value is less than the HDO value, the result is the generation of an active low HSYNC
pulse.
(HLFLN-1)
HALF_LINE 0 1 2 3 4 5 6 7 8
HREF 1 2 3 4 5 6 0
VREF
VDO
VSYNCOUT
VDS
YDO
ACTIVE_VID Active video
YDS
0 1 32
Confidential
PIXCLK
HREF
VREF
BNOTT
HALF_LINE
Reference edge
The number of half lines per field HLFLN (or number of lines per picture) is specified in the
VTGn_HLFLN register. The half-line counter is incremented with a half-line resolution. It is reset
when the counter matches the value programmed into the VTGn_HLFLN register, generating
VREF.
If the value programmed into the VTGn_HLFLN register is even, a progressive scan display
output is generated. If the value in HLFLN is odd, an interlaced output is generated. In both
modes, a BNOTT (bottom not top) signal is also generated (in progressive output BNOTT is
always 0). For an interlaced picture with an even number of lines (SMPTE 295M standard) a bit
is programmed in a register to force the VTG to be in interlaced mode. In this case the picture
has HLFLN - 1 half lines in one field and HLFLN + 1 in the other field.
The line counter starts with 1 for VREF top and 0 for VREF bottom. It is then incremented by 1
every HREF.
The registers YDO and YDS defining the vertical active window are located in the mixers of the
compositor. YDO defines the first active line and YDS defines the last active line (in line units).
The number of lines per field is (YDS - YDO + 1).
The VDO register (VTGn_VDO) determines the starting position of the vertical drive output pulse
relative to VREF (half-line increment).
The VDS register (VTGn_VDS) determines the ending position of the vertical drive output pulse
relative to VREF (half-line increment).
(HLFLN-1)
HALF_LINE 0 1 2 3 4 5 6 7 8
HREF 0 1 2 3 4
VREF
VDO
VSYNC
VDS
YDO
ACTIVE_VID
Active video
YDS
Confidential
53.3.3 Interrupts
VST (Vsync top) and VSB (Vsync bottom) can be generated by the VTG. These interrupts are
available though the ITS (interrupt status) register if the corresponding ITM (interrupt mask) bit is
set. In progressive scan, the VTG still generates VST and VSB even though they are not
necessary.
A timer is provided to generate an delayed interrupt PDVS (programmable delay on vsync) n
cycles after the rising edge of vsync. The number of cycles is a 24-bit value defined in the
register VTGn_VTMR (vsync delayed interrupt timer).
VTG1
VREF1
V Counter 1 Line count 1
HREF1
H Counter 1
Pixel count 1
Confidential
VTG2
VREF2
VSYNC1 (from VTG1) V Counter 2 Line count 2
HREF2
HSYNC1 (from VTG1) H Counter 2
Pixel count 2
53.3.5 Syncs generation for DVO, analog, HDMI and waveform generator
The STx7100 VTGs are able to generate several pairs of Hsync and Vsync signals with different
parameters to be used by different units.
These Hsync and Vsync signals are:
● DVO Hsync and Vsync defined by VTGn_VDO, VTGn_VDS, VTGn_HDO and VTGn_HDS
registers.
● Analog Hsync and Vsync that can be used with RGB analog outputs and defined by
VTG1_DACVDO, VTG1_DACVDS, VTG1_DACHDO and VTG1_DACHDS registers.
● Waveform generator Hsync and Vsync defined by VTG1_AWGVDO and VTG1_AWGHDO
registers.
● HDMI Hsync and Vsync which can be delayed relative to Hsync and Vsync. The delay is
specified in the register VTG1_HDO.
Any of these signals can be routed to the output pins VIDDIGOUTHSYNC, VIDDIGOUTVSYNC,
or PIO3(2:0). The selection is done by configuring the register VTG1_HDRIVE.
Waveform
generator
AWG_HSYNC, AWG_VSYNC
(AWGHDO, AWGVDO)
VIDDIGOUTHSYNC
HSYNC, VSYNC VIDDIGOUTVSYNC
VTG1 (HDO, HDS, VDO, VDS)
DAC_HSYNC, DAC_VSYNC
(DACHDO, DACHDS, DACVDO, DACVDS) Selector
HDMI_HSYNC, HDMI_VSYNC
(HDO)
PIO3[2:0]
HDMI
formatter
Confidential
HSYNC, VSYNC
VTG2
(HDO, HDS, VDO, VDS)
The selection of the conversion matrix is possible with through configuration bits.
The pure video signal is reduced by 70% to conform to the EIA 770.x standards.
The YPbPr analog output handles the following raster-scanning systems:
maximum PIXCLK
Active picture Frame
frequency, MHz
1920 x 1080i 2200 x 1125i 74.25
1280 x 720p 1650 x 750p
1920 x 1080i 2200 x 1250i
720 x 483p 858 x 525p 27
The VOS configuration registers can be programmed to generate video complying with the
following display standards: SMPTE 274M (1125i), SMPTE 293M (525p), SMPTE 295M (1250i),
SMPTE 296M (750p) and ARIB-BS4 (525p, 750p, 1125i).
2200 CLKLN
2112(0,-6) Cactive
192(+6,0)
Bactive
700 mV
Aactive Aactive
44T +/- 3T 44T +/- 3T
Active video
300 mV
Confidential
- 300 mV
Aactive
4T +/- 1.5T
The Pb’ and Pr’ waveforms are similar, except for the voltage excursion (+/-350 mV).
Several raster scanning systems can be accommodated by programming Aactive, Bactive,
Cactive and CLKLN.
Extra-sync pulse
With interlaced pictures, the vertical sync line may include a mid-line tri-level sync pulse. Certain
vertical sync lines may therefore contain a broad pulse during the first half line and a broad pulse
during the second half line. This is shown in Figure 190.
1012(+/-3)
132(+/-3) Cbroad
Bbroad
700 mV
Abroad Abroad
44T +/- 3T 44T +/- 3T
highlevel
300 mV
Blanking level
midlevel
zerolevel
midlowlevel
lowlevel
- 300 mV
Confidential
4T +/- 1.5T
Values Abroad, Bbroad and Cbroad are programmable to handle several raster scanning
systems.
Aactive and Abroad have the same value which is programmed in register DHDO_ABROAD. The
blanking waveform (waveform without the broad pulse level) only requires the values Abroad and
CLKLN to be programmed.
The synchronization level is also programmable (five registers for luma and five for chroma:
ZEROLEVEL, MIDLEVEL, HIGHLEVEL, MIDLOWLEVEL and LOWLEVEL).
HLFLN / 2 + 1
HLFLN
HLFLN / 2
active length
active length
active length
blanking length
Confidential
blanking length
blanking length
broad length
broad length
broad length
HLFLN / 2
HLFLN / 2
HLFLN
active length
active length
active length
Confidential
blanking length
blanking length
blanking length
SMPTE 295M is a special case because the number of lines is even for both the interlaced and
progressive systems. Moreover, there are only two special lines in interlaced and one in
progressive. All other lines are either blank lines or active lines. Therefore broadlength must be 0.
858 CLKLN
843 Cactive
123
Bactive
700 mV
Aactive
64T +/- 3T
Active video
300 mV
Confidential
- 300 mV
2T
The P’b, P’r analog waveforms are similar, except for the voltage excursion (+/- 350 mV).
The registers Aactive, Bactive, Cactive and CLKLN must be setup accordingly.
Figure 193 and Figure 193 show SMPTE 293M vertical timing signals.
Figure 194: Vertical timing relating to analog waveform for broad lines
700 mV
300 mV
zerolevel
midlowlevel
lowlevel
- 300 mV
Figure 195: Vertical timing relating to analog waveform for blanking lines
64
Abroad
700 mV
300 mV
Blanking level
zerolevel
midlowlevel
- 300 mV lowlevel
2T
Abroad, Bbroad and Cbroad values are programmable to handle several raster scanning
systems.
Aactive and Abroad have the same value defined in the register DHDO_ABROAD. The blanking
waveform only requires the programming of Abroad and CLKLN. The broad waveform only
requires the programming of the values Bbroad and CLKN. The value Cbroad is not used with
the SMPTE 293M standard.
The synchronization level is also programmable (three registers for luma and three for chroma:
ZEROLEVEL, MIDLOWLEVEL and LOWLEVEL).
#1 #2 #3... #6 #7 #8 #9... #36 #37 #38... #519 #520 #521 ... #525
53.7 Upsampler
The purpose of the upsampler is to adapt the display pixel rate to the HD DAC clock rate. In a
standard configuration, the pixel rate is defined by the clock used in the main display data path
(CLK_DISP_HD) and requires an upsampling by 2 or 4.
In an alternate application where the main and auxiliary outputs are SD, the upsampler gets its
data from the DENC at 27 MHz and up samples by a factor of 4. It must be noticed that the
DENC itself already performs an upsampling by 2 to the original pixel rate at 13.5 MHz.
The SRC (sample rate conversion) filter used to perform the interpolation is a polyphase tapped
delay line filter with 12 taps and programmable coefficients.
The upsampler provides 2 modes:
● High quality mode: the upsampling maintains the bandwidth of the incoming video stream.
It includes an adequate sinx/x compensation filter to cope with the DAC external anti-
aliasing filter.
● Low pass mode: the upsampling implements a 1/4 low-pass filter. This can be used for
‘constrained output’ mode support whereby, while the HDMI produces a full resolution
encrypted digital video, the analog output only provides an output video with a degraded
resolution.
STMicroelectronics can supply suggested coefficient settings for the above applications.
In addition to these modes, the user can modify coefficients to change the filter’s response if
required. Coefficient programming is done through the configuration registers
Confidential
UPSMPL_CSETx_y.
Figure 197 shows the SRD filter structure.
Pixels input
HD+SD UPSMPL_1_1
UPSMPL_1_12
UPSMPL_2_1
UPSMPL_3_1 UPSMPL_2_12
SD only UPSMPL_3_12
UPSMPL_4_1
UPSMPL_4_12
Samples to HD DAC
DHDO_COLOR DHDO - Main display output color space selection 0x00B4 R/W
HD DAC configuration
Reserved 0x00E0 -
Waveform generator
54.1 VTG 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AVSYNC
Reserved DVOSYNC Reserved Reserved ALTSYNC
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CLKLN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Note: The order of VTG1_HDO and VTG1_HDS determine the polarity of the Hsync signal
pin.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved HDS
Note: The order of VTG1_HDO and VTG1_HDS determines the polarity of the Hsync signal
pin.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved HLFLN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
VPOS
VPOL
Note: 1. The order of VTG1_VDO and VTG1_VDS determines the polarity of the Vsync
signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved VDS
Note: The order of VTG1_VDO and VTG1_VDS determine the polarity of the VSYNC signal
pin.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
Reserved AWGHDO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
AWGVPOS 9 8 7 6 5 4 3 2 1 0
Reserved
Reserved
[15:12] Reserved
[11:0] AWGVDO: AWG VSYNC rising edge position relative to VREF
Specifies the offset (in number of half-line) of the AWG Vsync rising edge relative to VREF. The AWG
VSYNC signal rises from 0 to 1 when the half-line counter is equal to VTG1_AWGVDO.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DACHDO
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DACHDS
Note: The order of VTG1_DACHDO and VTG1_DACHDS determine the polarity of the analog
Hsync signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DACVPOS
DACVPOL
Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved DACVDS
Note: The order of VTG1_DACVDO and VTG1_DACVDS determine the polarity of the Vsync
signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
Reserved
FI
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved VTIMER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RST
Reserved
Type: WO
Reset: 0
Description:
[31:1] Reserved
[0] RST
Writing to this bit resets the pixel counters and line counters in the raster generator. This reset is just
activated once on writing. When activated, VTG1 reset also the generated VREF and HREF. For an
interlaced raster, a top field is generated first.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDVS
OFD
VSB
VST
Reserved
0: Bottom field.
1: Top field.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDVS
OFD
VSB
VST
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDVS
OFD
VSB
VST
Reserved
0: Bottom field.
1: Top field.
54.2 VTG 2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CLKLN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved HDO
Note: The order of VTG2_HDO and VTG2_HDS determines the polarity of the Hsync signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved HDS
Confidential
Note: The order of VTG2_HDO and VTG2_HDS determines the polarity of the Hsync signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved HLFLN
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
VPOS
VPOL
VHD Reserved VDO
HREF
0: VSYNC rises one clock cycle after VREF.
[15:12] Reserved
[11:0] VDO: VSYNC rising edge position relative to VREF.
Specifies the offset (in number of half-line) of the Vsync rising edge relative to VREF. The VSYNC output
rises from 0 to 1 level when the half line counter is equal to VTG1_VDO.
Note: The order of VTG2_VDO and VTG2_VDS determines the polarity of the Vsync signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved VDS
Note: The order of VTG2_VDO and VTG2_VDS determine the polarity of the VSYNC signal
pin.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved FI SMD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved VTIMER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RST
Reserved
VTG2_R1 Range 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RG1
VTG2_R2 Range 2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RG2
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDVS
OFD
VSB
VST
Reserved
0: Bottom filed
1: Top filled
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDVS
OFD
VSB
VST
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PDVS
OFD
VSB
VST
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HDMI_IDDQ
HDMI_CFG
UPS_SEL1
DVP_REF
UPS_SEL
DVP_SEL
UPS_DIV
DESL
NUP
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HDS
EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SYHD
AWG
RGB
RSC
Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
P293
P295
SIC
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved ABROAD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BBROAD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CBROAD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BACTIVE
Note: (CACTIVE - BACTIVE) is the number of horizontal active pixels per line.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CACTIVE
Note: (CACTIVE - BACTIVE) is the number of horizontal active pixels per line.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BROADL
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BLANKL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved ACTIVEL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved YMLT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CMLT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved COFF
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved YOFF
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved ACTL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BACT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved BLANKL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved EACT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HDDAC
SDDAC
Reserved Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RPLL_LCK
DLL_LCK
Reserved
3. Wait for the PLL lock and check the lock status.
4. Reset the HDMI serializer.
5. Wait for the serializer DLL lock and check the lock status.
6. Configure the HDMI.
7. reset the VTGs
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HSMTHD
VSMTHD
EN
Reserved
0: Disable - all internal counters and variables are cleared, no instruction is executed
1: Enable
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
INSTRUCTION
mapped into the least significant byte of a 32-bit register space in the STx7100. The DENC
registers are described in Chapter 56 on page 660.
OddEven
Field1
(input)
Hsync
(input)
Clock period change
if square pixel mode switch
PIXCLK
Update of bits SQPIX and NINTRL
OddEven Field1
(input) Clock period change
if square pixel mode switch
PIXCLK
Update of bits SQPIX and NINTRL
Note: If on-the-fly format changing is required, clock switching must be synchronized onto the start of
the frame as shown in the above waveform. Internally, update of bits SQPIX and NINTRL is taken
into account at the beginning of a new frame. (Bits SQPIX and NINTRL are in DENC_CFG7 and
DENC_CFG2 respectively.)
Confidential
● partial VBI consists of lines 1 to 9 and the second half of lines 263 to 272,
● partial VBI consists of the second half of lines 623 to 5 and lines 311 to 318,
Figure 199: PAL-BDGHI, PAL-N typical VBI waveform, interlaced mode (ITU-R625 line numbering)
0V
A B
IV
308 309 310 311 312 313 314 315 316 317 318 319 320
Full VBI1
Partial VBI1 A
I
308 309 310 311 312 313 314 315 316 317 318 317 335 336
A B
III
II
C
III
IV
Figure 200: PAL-BDGHI, PAL-N typical VBI waveform, non-interlaced mode (CCIR-like line
numbering)
Full VBI
Partial VBI A B
0V
Figure 201: NTSC-M typical VBI waveforms, interlaced mode (SMPTE-525 line numbering)
Full VBI1
Partial VBI1
1 2 3 4 5 6 7 8 9 10 18 19
H H 0.5H H
Full VBI2
Partial VBI2
262 263 264 265 266 267 268 269 270 271 272 273 282
0.5H H H
VBI3
525 1 2 3 4 5 6 7 8 9 10 18 19
VBI4
263 264 265 266 267 268 269 270 271 272 273 282
Figure 202: NTSC-M typical VBI waveforms, non-interlaced mode (SMPTE-like line numbering)
Full VBI
Partial VBI
3H 3H 3H
262 1 2 3 4 5 6 7 8 9 10 18 19
H H H 0.5H H
Figure 203: PAL-M typical VBI waveforms, interlaced mode (ITU-R/CCIR-525 line numbering)
Full VBI1
F' F F' F
Partial VBI1 A B
0V I
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 279 280
F F' F
A B
III
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
I
Confidential
II
C
III
IV
Figure 204: PAL-M typical VBI waveforms, non-interlaced mode (ITU-R/CCIR-like line numbering)
Full VBI
Partial VBI A B
0V
OddEven and Hsync signals come from the STx7100's video timing generators VTGn (see
output stage Section 53.3: Video timing generators (VTG) on page 587).
within the YCbCr stream). However, the incoming sync signals (Hsync + OddEven) may be
internally delayed by up to three clock cycles to cope with different data/sync phases, using
configuration bits SYNCIN_AD in DENC_CFG4. The DENC is thus fully slaved to the Hsync
signal, which means that lines may contain more or fewer samples than usual.
● If the digital line is shorter than its nominal value, the sample counter is re-initialized when
the early Hsync arrives and all internal synchronization signals are re-initialized.
● If the digital line is longer than its nominal value, the sample counter stops when it reaches
its nominal end-of-line value and waits for the late Hsync before re-initializing.
PIXCLK
YCbCr Cb Y Cr Y Cb
PIXCLK
OddEven (in)
YCbCr Cb Y Cr Y Cb
Confidential
Y Cr Cb
Black 16 128 128
Blue 36 116 212
Red 64 212 100
Magenta 84 200 184
Green 112 56 72
Cyan 136 44 156
Yellow 160 140 44
White 236 128 128
The corresponding decimal output values just before the DACs are shown in Figure 207 and
Figure 208. Both figures show the static values corresponding to the input values in Table 178.
Confidential
Figure 207: Luminance output levels in autotest for NTSC without set-up
800
White
608
548
Yellow
486
Cyan
Green
414
362
Magenta
290
Red
Black Black
16 Sync level
Figure 208: Luminance output levels in autotest for PAL (BGHI) and SECAM
816
White
624
564
Yellow
502
Cyan
Green
430
378
Magenta
306
Red
Black Black
16 Sync level
This avoids saturating the composite video codes heavily before digital-to-analog conversion in
the case of erroneous or unrealistic YCbCr samples being input to the encoder. These could lead
to overflow errors in the codes driving the DACs. In this way, a distorted output waveform is
avoided.
However, in some applications, it may be desirable to let extreme YCbCr codes pass through the
demultiplexor. This is controlled using bit MAXDYN in register DENC_CFG6. In this case, only
Confidential
codes 0x00 and 0xFF are overridden; if such codes are found in the active video samples, they
are forced to 0x01 and 0xFE.
● Perform a software reset using register DENC_CFG6. This sets all bits in all DENC registers
except DENC_CFGn to their default value.
Alternatively, set DENC_CFG8 bits PH_RST_MODE to 01. Then frequency (and phase)
update is performed on the beginning of the next video line.
Warning: if a standard change occurs after the software reset, the increment value is
automatically re-initialized with the hard-wired or loaded value according to bit SELRST_INC.
The reset phase of the color subcarrier can also be software-controlled by register
DENC_DFS_PHASE0/1.
The subcarrier phase can be periodically reset to its nominal value to compensate for any drift
introduced by the finite accuracy of the calculations. In PAL and NTSC, subcarrier phase can be
adjusted every line, every eight fields, every four fields, or every two fields (DENC_CFG2 bits
VALRST). If SECAM is performed, the subcarrier phase is reset every line.
The burst can be turned off (no burst insertion) by setting DENC_CFG2 bit BURSTEN to 0.
Burst insertion is performed by always starting the burst with a positive-going zero crossing. This
guarantees a smooth start and end of burst with a maximum of undistorted burst cycles and can
only be beneficial to chroma decoders.
This avoids an uncontrolled initial burst phase, and guarantees a start on a positive-going zero
Confidential
crossing with the consequence that two burst start locations are visible over successive lines,
according to line parity. This is normal and explained below.
In NTSC, the relation between subcarrier frequency and line length creates a 180° subcarrier
phase difference with respect to horizontal sync from one line to the next, according to line parity.
So if the burst always starts with the same phase (positive-going zero crossing), the burst is
inserted at time X or at time (X + TNTSC/2) after the horizontal sync tip according to line parity,
where TNTSC is the duration of one cycle of the NTSC burst.
With PAL, a similar rationale holds, and again there are two possible burst start locations. The
subcarrier phase difference with respect to the horizontal sync from one line to the next in this
case is either 0° or 180° with the following series: A-A-B-B-A-A-... (A denotes A-type bursts and
B denotes B-type bursts, A-type and B-type being 180° out of phase with respect to the
horizontal sync). Two locations are thus possible, one for A-type, the other for B-type.
This assumes that the subcarrier is automatically reset periodically (VALRST in DENC_CFG2).
Otherwise, the burst start drifts over several frames, within an interval of half a subcarrier’s cycle.
This is normal and means the burst is correctly locked onto the encoded colors. The equivalent
effect with a gated burst approach would be the following: the start location would be fixed but the
phase of the burst start with respect to the horizontal sync would drift.
cvbs
400
350
300
250
200
5.6 µs
150
100
50
In odd fields, the phase of the subcarrier follows the sequence: 0, 0, π, 0, 0, π, 0, 0, π, ...
compared to a sine wave starting at the same point - 5.6 µs after horizontal sync pulse (inverted
on one line out of every three and also at each frame). This sequence begins from line 1 or line
23 of the first field (see GEN_SECAM in register DENC_CFG7). Bit INV_PHI_SECAM
(DENC_CFG7) allows the inversion of this sequence (π, π, 0, π, π, 0,...) in odd fields. In even
fields, the sequence of the subcarrier is always inverted with respect to the odd field.
To enable SECAM mode, program a 1 in DENC_CFG7.SECAM (MSB) and then soft-reset or
load DENC_CFG0.
The luma channel has a 19th order filter with coefficients programmable by registers
DENC_LU_COEF0..9. This filter is described in Section 55.11: Chrominance encoding on
page 650.
FLT_YS (DENC_CFG9) selects either the register or the hard-wired values for the filter
coefficients.
The luma processing as well as line and field timings in SECAM mode are identical to PAL
BDGHI ones.
0
-5
-10
Amplitude (dB)
-15
-20
-25
-30
-35
-40
1 2 3 4 5 6 7 8 9 10 11 12 13
Frequency (MHz)
Confidential
Figure 211: Luma filtering with 3.58 MHz trap, including DAC attenuation
0
-5
-10
Amplitude (dB)
-15
-20
-25
-30
-35
-40
1 2 3 4 5 6 7 8 9 10 11 12 13
Frequency (MHz)
Figure 212: Luma filtering with 4.43 MHz trap, including DAC attenuation
0
-5
-10
Amplitude (dB)
-15
-20
-25
-30
-35
-40
1 2 3 4 5 6 7 8 9 10 11 12 13
Frequency (MHz)
Figure 213: SECAM chroma filtering (pre-emphasis and 1.3 MHz low pass filtering)
10
Amplitude (dB)
0
-5
-10
-15
10-1 100
Frequency (MHz)
Figure 214: SECAM high-frequency subcarrier pre-emphasis (Bell filtering), including DAC
attenuation
10
Confidential
8
Gain en dB
Gain (dB)
3.8 3.9 4 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8
Frequence (MHz)
Frequency (MHz)
1
0
-1
-2
Amplitude (dB)
f-3=1.6 RGB
-3 f-3=1.1
f-3=1.9
-4 f-3=1.3
-5
-6
-7
-8
-9
0 0.5 1 1.5 2 2.5 3 3.5
Frequency (MHz)
0
-5
-10
Amplitude (dB)
-15
-20
-25
-30
Confidential
-35
-40
0 2 4 6 8 10 12 14
Frequency (MHz)
0
-5
-10
Amplitude (dB)
-15
-20
-25
-30
-35
-40
0 2 4 6 8 10 12 14
Frequency (MHz)
0
-5
-10
Amplitude (dB)
-15
-20
-25
-30
-35
-40
0 2 4 6 8 10 12 14
Frequency (MHz)
0
-5
-10
Amplitude (dB)
-15
Confidential
-20
-25
-30
-35
-40
0 2 4 6 8 10 12 14
Frequency (MHz)
0
-5
-10
Amplitude (dB)
-15
-20
-25
-30
-35
-40
0 2 4 6 8 10 12 14
Frequency (MHz)
The closed-caption encoder considers that closed-caption data has been loaded and is valid on
completion of the write operation into DENC_CCCF1 for field1, or DENC_CCCF2 for field 2. If
closed-caption encoding has been enabled and no new data bytes have been written into the
closed-caption data registers when the closed-caption window starts on the appropriate TV line,
then the circuit outputs two US-ASCII NULL characters with odd parity after the start bit.
300
27.35µs
250
Transition
Time : 220ns
200 10µs
LSB
150
100 13.9µs
7 cycles
50 of 504kHz
61µs
0
t
300
250
200
11µs
LSB
150
100 48.7µs
50 Word 0
6 bits
Word 1 Word 2
4 bits 4 bits
CRCC
6 bits
Bit 1 Bit 20
0
t
CGMS encoding is enabled by setting bit ENCGMS in register DENC_CFG3. When enabled, the
Confidential
CGMS waveform is present once in each field, on lines 20 and 283 (SMPTE-525 line
numbering).
The CGMS data register is double-buffered, so it can be loaded at any time (even during line
20/283) without any risk of corrupting CGMS data that could be in the process of being encoded.
The CGMS encoder considers that new CGMS data has been loaded and is valid on completion
of the write operation into register DENC_CGMS0/1/2.
Signal exchange
The DENC and the Teletext buffer exchange two signals: TTXS (Teletext synchronization) from
the DENC to the Teletext buffer, and TTXD (Teletext data) from the Teletext buffer to the DENC.
Signal TTXS is a request signal generated on selected lines. In response to this signal, the
Teletext buffer is expected to send Teletext bits to the DENC for insertion of a Teletext line into the
analog video signal. The number of Teletext bits sent depends on the Teletext system being used
(selected by register bit DENC_TTX1.TTXT_ABCD); 360 bits are sent for Teletext B - WST in
PAL and SECAM, or 288 for Teletext C - NABTS in NTSC.
The duration of the TTXS window corresponds to the number of bits being sent (see
Transmission protocol below).
● For Teletext B and 625 line systems, the TTXS window duration is 1402 reference clock
periods (corresponding to 360 bits).
● For Teletext C and 525 line systems (NABTS), this duration is 1121 master clock periods.
Following the TTXS rising edge, the encoder expects data from the Teletext buffer after a
programmable number (2 to 9) of 27 MHz master clock periods. Data is transmitted
synchronously with the master clock at an average rate of 6.9375 Mbit/s according to the
protocol described below. In order of transmission, it consists of: 16 clock run-in bits, 8 framing
code bits and one Teletext packet of 336 or 228 bits (depending on the Teletext system being
used). If more than one packet of bits (336 or 228) are transmitted, they are ignored by the
DENC. By default, register bit DENC_CM_TTX.TTX_MASK_OFF masks the two bits of Teletext
framing code, allowing the code to be set by the DENC according to the selected Teletext
standard.
Transmission protocol
In order to transmit the Teletext data bits at an average rate of 6.9375 Mbit/s, which is about
1/3.89 times the master clock frequency, the following scheme is adopted:
The 360-bit packet is regarded as nine 37-bit sequences plus one 27-bit sequence. In every
sequence, each Teletext data bit is transmitted as a succession of four identical samples at
27 Msample/s, except for the 10th, 19th, 28th and 37th bits of the sequence which are
transmitted as a succession of three identical samples.
Figure 224: TTXS rising to first valid sample delay for TXDEL[2:0] = 0
PIXCLK
TTXS
(TXDEL[2:0] + 2) TPIXCLK
70
60
50
40
IRE
30
20
10
0
-100 -50 0 50 100
-144 ns +144 ns
1
0.9
Confidential
0.8
0.7
PSD (dB)
0.6
0.5
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8
Frequency (MHz)
0
-10
-20
PSD (dB)
-30
-40
-50
-60
-70
-80
0 1 2 3 4 5 6 7 8
Frequency (MHz)
Due to the 3.3 V power supply used, the output swing of the DACs is about 1 Vpp. Therefore
some external gain may be required, which, combined with the recommended output filtering
stage, requires active filtering. For this active filtering stage to be very simple, it is possible to
invert the DAC outputs by programming bit DACINV (DENC_CFG5). Code N becomes code
(1024 - N), that is, the resulting waveform undergoes a symmetry around the mid-swing code.
DENC_CFG0 Configuration 0
7 6 5 4 3 2 1 0
DENC_CFG1 Configuration 1
7 6 5 4 3 2 1 0
DENC_CFG2 Configuration 2
7 6 5 4 3 2 1 0
[3] SEL_RST: Select reset values for direct digital frequency synthesizer
0: Hardware reset values for subcarrier oscillator phase (see register DENC_DFS_PHASE0/1 for values)
1: Loaded reset values selected (see registers DENC_DFS_PHASE0/1)
[2] RSTOSC_BUF: Software phase reset of DDFS (direct digital frequency synthesizer) bufferb
0: No reset
1: When a 0-to-1 transition occurs, either the hard-wired default phase value, or the value loaded in
register DENC_DFS_PHASE0/1 (according to bit SELRST), is put to phase buffer. This value is loaded
into accumulator (phase of subcarrier) when PH_RST_MODE from DENC_CFG8 is programmed, or
when the standard changes or soft reset occurs.
RSTOSC_BUF is set back to 0 after the buffer is loaded.
[1:0] VAL_RST: Automatic reset of the oscillatorc
00: Every line
01: Every 2nd field
10: Every 4th field
11: Every 8th field
a. NINTRL update is internally taken into account at the beginning of the next frame. In SECAM mode, only the
interlaced mode is available.
b. RSTOSC_BUF is automatically set back to 0 after the buffer is loaded
c. VAL_RST is taken into account only if bit RST_EN is set. Resetting the oscillator means here forcing the value
of the phase accumulator to its nominal value to avoid accumulating errors due to the finite number of bits used
internally. The value to which the accumulator is reset is either the hard-wired default phase value or the value
loaded in registers DENC_DFS_PHASE0/1 (according to bit SEL_RST), to which a 0°, 90°, 180°, or 270°
correction is applied according to the field and line on which the reset is performed. If SECAM is performed,
the oscillator is reset every line.
DENC_CFG3 Configuration 3
7 6 5 4 3 2 1 0
DENC_CFG4 Configuration 4
7 6 5 4 3 2 1 0
DENC_CFG5 Configuration 5
7 6 5 4 3 2 1 0
DENC_CFG6 Configuration 6
7 6 5 4 3 2 1 0
DENC_CFG7 Configuration 7
7 6 5 4 3 2 1 0
INV_PHI_
SECAM GEN_SECAM Reserved VPS_EN SQPIX
SECAM
[4:2] Reserved
[1] VPS_EN: VPS encoding enable
0: Disablea 1: Enable
[0] SQPIX: Square pixel mode enable.
0: Disablea 1: Enable
a. Default value
DENC_CFG8 Configuration 8
7 6 5 4 3 2 1 0
[5:4] Reserved
[3] BLK_ALL: Blanking of all video lines
0: Disableda
1: Enabled (all inputs ignored - 0x80 instead of Cr and Cb and 0x10 instead of Y)
[2] TTX_NOTMV: priority of ancillary data on a VBI line.
Note: higher priority data overwrites lower priority data.
0a: Priority is: CGMS > Closed caption > Macrovisionb > WSS > VPS > Teletext
1: priority is: Teletext > CGMS > Closed caption > WSS > VPS > Macrovision
Note: After reset, the default value of this bit is zero, however, for devices using teletext, this bit must then
be reprogrammed to 1. This is to avoid the occurrence of teletext glitches in SECAM mode and loss of
teletext data in all modes.
[1:0] Reserved
a. Default value
b. If there is no Macrovision programmed on the line, then VBI line blanking (when register DENC_CFG1 bit
BLKLI = 1) overwrites VPS or teletext, and no VPS or teletext data is encoded.
7 6 5 4 3 2 1 0
0001: 0.0 pixel delay (default for PAL/NTSC in 4:4:4 format or SECAM in 4:2:2 format on CVBS)
0111, 1001, 1011: 0.0 pixel delay
[3] Reserved
[2:1] PLG_DIV_Y
00: When sum of coefficients = 256 01: When sum of coefficients = 512 (reset value)
10: When sum of coefficients = 1024 11: When sum of coefficients = 2048
[0] FLT_YS
0: Use hard-wired coefficients for the luma filter
1: Use register DENC_LCOEF0..9 values, default (reset) or programmed, to determine coefficients
a. DENC_CFG3.DEL_EN selects either default or programmed delays.
DENC_CFG10 Configuration 10
7 6 5 4 3 2 1 0
DENC_CFG11 Configuration 11
7 6 5 4 3 2 1 0
DENC_CFG12 Configuration 12
7 6 5 4 3 2 1 0
DENC_CFG13 Configuration 13
7 6 5 4 3 2 1 0
AUX_NOTMAIN_RGB
RGB_MAXDYN
DAC123_CFG
DAC456_CFG
Address: DencBaseAddress + 0x17C
Type: R/W
Buffer: Immediate
Reset: 0x82
Description: There are two filters for chroma, one for the main and one for the auxiliary path. This
should be taken into account when selecting different output configurations. For
example: if configuration 001 is selected on DAC123 (Y_MAIN, C_MAIN and
CVBS_AUX) and configuration 010 on DAC456 (RGB) then to have correct bandwidths,
RGB should be taken from the main input to have larger (and common) chroma
bandwidth on Y/C and RGB outputs. On the CVBS output, chroma bandwidth should
always be narrow to reduce cross luma effects.
[7] AUX_NOTMAIN_RGB: Select either main or aux video as RGB
Confidential
DENC_STA Status
7 6 5 4 3 2 1 0
(set). Otherwise, closed caption field 2 registers access might be temporarily forbidden by resetting bit
BUF2_FREE until the next field 2 closed caption line occurs.
Note: This bit is false (reset) when 2 pairs of data bytes are awaiting to be encoded, and is set back
immediately after one of these pairs has been encoded (so at that time, encoding of the last pair of bytes is
still pending)
Reset value = 1 (access authorized)
[4] BUF1_FREE: Closed caption registers access condition for field 1
Same as BUF2_FREE but concerns field 1.
(*) Reset value:= 1 (access authorized)
[3:1] FIELDCT: Digital field identification number
000: Indicates field 1
...
111: Indicates field 8
FIELDCT[0] also represents the odd/even information (odd='0', even='1')
[0] Reserved
DFS_INC0 23 22 21 20 19 18 17 16
0x028 D
DFS_INC1 15 14 13 12 11 10 9 8
0x02C D
DFS_INC2 7 6 5 4 3 2 1 0
0x030 D
0x038 VALUE
Description: HUE_EN:
Confidential
0x034 VALUE
0x038 VALUE
Description: These registers contain the 8 bits (21 to 14) of the value with which the phase
accumulator of the DDFS is initialized on every line in SECAM mode. The phase is
calculated with 1.4° accuracy as:
(Blue lines) DENC_DFS_PHASE0 x 16384 (dec), or DENC_DFS_PHASE0 x 0x4000
(Red lines) (256 + DENC_DFS_PHASE0 + DENC_DFS_PHASE1) x 16384 (dec),
or (100 + DENC_DFS_PHASE0 + DENC_DFS_PHASE1) x 0x4000
To validate use of these registers instead of the hard-wired values, follow the procedure
for PAL and NTSC mode.
Confidential
56.3 WSS
15 14 13 12 11 10 9 8
WSS15 WSS14 WSS13 WSS12 WSS11 WSS10 WSS9 WSS8
7 6 5 4 3 2 1 0
WSS7 WSS6 WSS5 WSS4 WSS3 WSS2 WSS1 WSS0
7 6 5 4 3 2 1 0
DAC1_MULT[5:0] DAC3_MULT[5:4]
7 6 5 4 3 2 1 0
DAC3_MULT[3:0] DAC4_MULT[5:2]
Type: R/W
Reset: 0x08
Description:
[7:4] DAC3_MULT[3:0]
[3:0] DAC4_MULT[5:2]
7 6 5 4 3 2 1 0
DAC4_MULT[1:0] DAC5_MULT[5:0]
.. .. .. ..
11 1111: 118.16 124.22
[5:0] DAC5_MULT[5:0]: Multiplying factor on DAC5_G_Y digital signal before D/A converters with 0.78% step
% of default value
if R, G or B if not R, G or B
(DAC123_CFG = 010) (DAC123_CFG != 010)
00 0000: 81.25 75.00
00 0001: 81.84 75.78
00 0010: 82.42 76.56
00 0011: 83.01 77.34
.. .. .. ..
10 0000: (default) 100.00 100.00
.. .. .. ..
11 1111: 118.16 124.22
7 6 5 4 3 2 1 0
Reserved DAC2_MULT[5:0]
7 6 5 4 3 2 1 0
Reserved DAC6_MULT[5:0]
56.5 Hardware ID
7 6 5 4 3 2 1 0
CHIPID
7 6 5 4 3 2 1 0
[5:4] Reserved
DENC_VPS5: [3:0] CNI: 4 bits of CNI, reserved for enhancement of VPS
DENC_VPS4: [7:6] NP[7:0]: Network or program CNI (Country and Network Identification)
DENC_VPS1: [5:0]
DENC_VPS4: [5:1] DAY: Day, binary
DENC_VPS4: [0] MON[3:0]: Month, binary
DENC_VPS3: [7:5]
DENC_VPS3: [4:0] HR: Hour, binary
DENC_VPS2: [7:2] MIN: Minute, binary
DENC_VPS2: [1:0] CNTRY[3:0]: Country, binary
DENC_VPS1: [7:6]
DENC_VPS0: [7:0] PROGT[7:0]: Program type, binary
CGMS0 7 6 5 4 3 2 1 0
0x07C Reserved B1 B2 B3 B4
CGMS1 7 6 5 4 3 2 1 0
CGMS2 7 6 5 4 3 2 1 0
56.8 Teletext
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
Table 180: Teletext line selection for standards other than ITU-R and 625 line systems
TTX_L9 9 9 12
TTX_L10 10 10 13
TTX_L11 11 11 14
TTX_L12 12 12 15
TTX_L13 13 13 16
TTX_L14 14 14 17
TTX_L15 15 15 18
TTX_L16 16 16 19
TTX_L17 17 17 20
TTX_L18 18 18 21
TTX_L19 19 19 22
TTX_L20 20 20 23
TTX_L21 21 21 24
TTX_L22 22 22 25
TTX_L23 23 23 26
TTX_L318 318 268 271
TTX_L319 319 269 272
TTX_L320 320 270 273
TTX_L321 321 271 274
TTX_L322 322 272 275
TTX_L323 323 273 276
TTX_L324 324 274 277
TTX_L325 325 275 278
TTX_L326 326 276 279
TTX_L327 327 277 280
Table 180: Teletext line selection for standards other than ITU-R and 625 line systems
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
TTX_MASK_
C_MULT Reserved BCS_MAIN_EN
OFF
Default peak to peak amplitude of U and V outputs corresponds to 70% of default Y or CVBS peak to
peak amplitude if 100/0/100/0 color bar pattern is input. In other words, when Iref is set to deliver 1 VPP for
CVBS on DAC3 for example (and DAC3_MULT = “1000”), when switched to U, DAC6 delivers 0.7 V PP.
Confidential
Default peak to peak amplitude of RGB outputs corresponds to 70% of default Y or CVBS peak to peak
amplitude if 100/0/75/0 color bar pattern is input. In other words, when Iref is set to deliver 1 VPP for CVBS
on DAC3 for example (and DAC3_MULT = “1000”), when switched to B, DAC6 delivers 0.7 VPP.
[3] TTX_MASK_OFF: Masking of 2 bits in Teletext framing code, depending on selected teletext standard
0: Enable 1: Disable
[2:1] Reserved
[0] BCS_MAIN_EN
Brightness, contrast and saturation control by registers DENC_BRIGHT, DENC_CONTRAST and
DENC_SATURATION on 4:4:4 main video input
0: Disable 1: Enable
CCCF10 7 6 5 4 3 2 1 0
CCCF11 7 6 5 4 3 2 1 0
CCCF20 7 6 5 4 3 2 1 0
CCCF21 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
Default value = 0 1111 line 21 (525/60, 525-SMPTE line number convention); this value
also corresponds to line 21 in l625/50 system,(625-CCIR line number convention).
7 6 5 4 3 2 1 0
Note: If CGMS is allowed on lines 20 and 283 (525/60, 525-SMPTE line number convention),
closed captions should not be programmed on these lines.
625/50 system: (625-CCIR line number convention)
Only lines 319 to 336 should be used for closed caption or extended data services
(preceding lines contain the vertical sync pulses with equalizing pulses).
L24 to L20
0 0000: No line selected for closed caption encoding
i line (318 +i) (CCIR) selected for encoding
....
1 0010: Line 336 (CCIR) selected for encoding
1 1111: Line 349 (CCIR)
Default value:= 0 1111 line 284 (525/60, 525-SMPTE line number convention) this
value also corresponds to line 333 in 625/50 system, (625-CCIR line number
convention)
DENC_BRIGHT Brightness
7 6 5 4 3 2 1 0
Where YIN is 8-bit input luminance and YOUT is the result of a brightness operation (still
on 8 bits).
This value is saturated at 235 (16) or 254 (1) according to DENC_CFG6 bit MAXDYN,
B: brightness (unsigned value with center at 128, default 128).
DENC_CONTRAST Contrast
Confidential
7 6 5 4 3 2 1 0
where, YIN is 8-bit input luminance, YOUT is the result of a contrast operation (still on 8
bits).
This value is saturated at 235 (16) or 254 (1) according to DENC_CFG6 bit MAXDYN,
C: contrast (two’s complement value from -128 to 127, default 0).
DENC_SATURATION Saturation
7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
The coefficients are chosen to give the required filter response for a specific application
according to the symmetrical FIR filter equation:
H(z) = C0 + C1z-1 + C2z-2 + ... + C7z-7 + C8z-8 + C7z-9 + ... + C2z-14 + C1z-15 + C0z-16
The register reset (or default) values give the coefficients for the SECAM square pixel
mode.
Each register value is calculated by adding an offset value to the desired coefficient
value, according to the relationship: register value = offset + actual coefficient value.
For instance, to obtain a coefficient value of 5 for C4, which has an offset of 32, the
register DEN_CFCOEF4 must contain the value 100101, which is the binary equivalent
of 32 + 5.
Filter sampling frequency is VIDPIX_2XCLK (27 MHz, 24.545454 MHz or 29.5 MHz).
MAIN_PLG_DIV[1:0]: This value is chosen depending on the sum of all coefficients.
00: When sum of coefficients = 512 01: When sum of coefficients = 1024 (default)
10: When sum of coefficients = 2048 11: When sum of coefficients = 4096
MAIN_FLT_S
0: Use hardwired coefficients for the chroma filter.
1: Use register DENC_CF_COEFn values, default (reset) or programmed, to determine coefficients.
7 6 5 4 3 2 1 0
equation:
–1 –2 –8 –9 –10 – 16 – 17 –18
H ( z ) = a0 + a1 z + a2 z + a8 z + a9 z + a8 z + …+ a2 z + a1 z + a0 z
The values of the coefficients LU_COEF0 through to LU_COEF7 must be entered in
two’s complement form and the remainder as normal positive values.
The sampling frequency of the filter is PIXCLK (27 MHz, 24.5454 MHz or 29.5 MHz).
The control bits for this filter are in register DENC_CFG9. This register is used only
when bit FLT_YS in DENC_CFG9 is set to 1.
Reserved bits are reset to 0.
Default values:
• a0 = LUMA_COEF_0[4:0] = 0 0001 means +1,
• a1 = LUMA_COEF_1[5:0] = 11 1111 means -1,
• a2 = LUMA_COEF_2[6:0] = 111 0111 means -9,
• a3 = LUMA_COEF_3[6:0] = 000 0011 means +3,
• a4 = LUMA_COEF_4[7:0] = 0001 1111 means +31,
• a5 = LUMA_COEF_5[7:0] = 1111 1011 means -5,
• a6 = LUMA_COEF_6[8:0] = 1 1010 1100 means -84,
• a7 = LUMA_COEF_7[8:0] = 0 0000 0111 means +7,
• a8 = LUMA_COEF_8[8:0] = 1 0011 1101 means +317,
• a9 = LUMA_COEF_9[9:0] = 01 1111 1000 means +504.
7 6 5 4 3 2 1 0
HUE_PHS_SGN HUE_PHS_VAL
57.1 Glossary
HDMI High definition multimedia interface
HDMI is a licensable format designed for transmitting digital television
audiovisual signals from DVD players, set-top boxes and other audiovisual
sources to television sets, projectors and other video displays.
HDMI can carry high quality multi-channel audio data, and all standard and
high-definition consumer electronics video formats, together with
bidirectional control and status signals. Content protection technology is
available.
DVI Digital visual interface
TMDS Transition minimized differential signalling
TERC4 TMDS error reduction coding - 4 bit
SSC4 Synchronous serial controller version 4.0
Confidential
57.2 Overview
The HDMI block transmits HDMI-compatible data. It primarily consists of two sub-blocks:
● digital HDMI frame formatter: frame formatting and encoding.
● analog line driver: serializes the data and transmits the differential line,
Video data synchronous to the pix clock is fed to the HDMI via three 8-bit buses, HSYNC and
VSYNC lines. The video interface supports RGB, YCbCr 4:4:4 and YCbCr 4:2:2 formats only.
The encryption keys generated by the HDCP block are fed to the HDMI on a separate interface.
The HDMI XORs the video data with the keys generated by the HDCP. If the HDMI is in not
authenticated, a default (programmed) value is sent during the video data interval periods; audio
data is not sent at all; null packets and AVI info frames are sent instead.
The HDMI receives audio data via an S/PDIF interface. The HDMI does not compress or
decompress audio, but simply inserts audio into appropriate fields in the HDMI frame. The audio
interface performs the cycle time stamp (CTS) calculations and inserts the CTS in the frame
appropriately.
The HDMI is configured via its STBus interface. This interface is also used to transmit data for
info frame during the data island period of the HDMI frame.
Control data is inserted appropriately, depending on the HDMI configuration.
The HDMI frame formatter interfaces to the line driver on three 10-bit parallel buses, which are
synchronous with the TMDS clock.
The block diagram for the HDMI is shown in Figure 228 below.
HDCP interface
Video in Chl 0
Video data Frame
HSYNC Video formatting
processor Data bus
VSYNC and Line Chl 1
CONTROL line coding
PIXCLK
HSYNC driver
VSYNC Chl 2
TMDSCLK PIXEL
REP.
TMDSCLK EN
SPDIFIN Control
PIXCLK bits
SPDIF CLK Data processor
Config monitor
BCH CLK registers
Confidential
STBus interface
STBus
Each 10-bit bus carries the transition minimized differential signalling (TMDS) data. The TMDS
data changes with each rising edge of the TMDS clock. The clocks have the following
characteristics:
● The TMDS clock frequency is n x PIXCLOCK where n = 1 or 2.
● The BCH clock is used to run BCH-encoding blocks of the data packets.
The HDMI frame formatter accepts video data synchronous to the pix clock (on every rising
edge). Audio data is fed through the S/PDIF interface. The STBus interface is used to configure
and monitor its status. This interface is also used to write the AVI info and any auxiliary data to be
sent on the HDMI during the data island period.
HSync in
HSync out
VSync in
VSync out
444 format
CHL0 RT Retime
CHL 0 in CHL 0 out
Control
CHL 2 in glue CHL2 RT
CHL 1 out
CHL 1 in
CHL 2 out
pix clock
HDMI clock channel
Video processor
Confidential
The first pixel in a frame is counted from when Hsync and Vsync are active on a rising pix clock
edge. The first pixel of the active video window is defined in registers HDMI_ACTIVE_XMIN and
HDMI_ACTIVE_YMIN. The maximum number of pixels per line and maximum number of lines
per frame are defined by the registers HDMI_ACTIVE_XMAX and HDMI_ACTIVE_YMAX.
The retimed Hsync and Vsync (HSync out and VSync out) are used by the other sub-blocks to
derive timings.
The connection of video input bus to the individual channels is as follows.
● RGB, 8 bits per pixel
• CHL0 in connected to B
• CHL1 in connected to G
• CHL2 in connected to R
● YCbCR 4:4:4, 8 bits per pixel
• CHL0 in connected to Cb
• CHL1 in connected to Y
• CHL2 in connected to Cr
The control glue connects CHL0 in to CHL0 RT and CHL1 in to CHL1 RT.
● null packet.
numerator value
(N)
CTS gen
S/PDIF clock and Data pending
packetization Data*
pix clock Packet Data island en
formatter
Confidential
and
Data* BCH coding Chl 0
SPDIF data Audio data Arbiter
packet
S/PDIF clock generation Chl 1
Data*
Chl 2
STBus
interface Info frame
packet
generation Data*
Null packets are sent in the data field when the encryption is enabled and HDMI is in not
authenticated.
pixclock × N
CTS = ---------------------------------
128 × Fs
where FS is the audio sample clock. In other words, CTS is generated by counting the number of
pix clocks in (128 x Fs/N) duration. The CTS counter is a 20 bit counter, and is initialized to zero
after every 128*FS/N clocks. FS and pix clock are treated as asynchronous; appropriate care is
taken during synchronization.
Data buff
HB
SP0
Packet
SP1
data buffer
interface
SP3
Header byte
data buffer
HB
STBus
To reduce the dependency of the CPU, the HDMI_AVI_BUFF_EMPTY signal is bristled out,
which can be used as pacing signal for DMA. The HDMI_AVI_BUFF_EMPTY is set when the
Confidential
data in the buffer is read by the HDMI formatter. It is reset when bit HDMI_IFRAME_CFG.EN is
set.
57.4.5 Arbiter
The arbiter arbitrates between requests from different sources that wish to transmit data during
the data island period of the HDMI frame. The arbiter follows a simple priority-based arbitration
scheme, with CTS packets being given highest priority, followed by audio data packets, general
control packets and info packet having the least priority. If there are no packet requests, the
arbiter sends the data corresponding to the null packet to the packet formatter.
If the transmission of the general control packet is enabled, then the arbiter sends this packet
only, between assertion of VSYNC and next 384 pixel clocks following the assertion of VSYNC.
An interrupt is generated if enabled, notifying completion of general packet transmission.
The channel formatter maps the individual bits of the of the data buffers on to the CHL0, CHL1 or
CHL2 bus, as shown in Table 181 below. A new byte of the subpacket is transmitted during clock
periods 5, 6, 7 and 8, shown by shaded rows.
CHL0
Clock CHL1 bits CHL2 bits
bits
period
4 1 2 3 4 1 2 3 4
1 HB0 SP0-0 SP1-0 SP2-0 SP3-0 SP0-1 SP1-1 SP2-1 SP3-1
2 HB1 SP0-2 SP1-2 SP2-2 SP3-2 SP0-3 SP1-3 SP2-3 SP3-3
3 HB2 SP0-4 SP1-4 SP2-4 SP3-4 SP0-5 SP1-5 SP2-5 SP3-5
4 HB3 SP0-6 SP1-6 SP2-6 SP3-6 SP0-7 SP1-7 SP2-7 SP3-7
5 HB4 SP0-0 SP1-0 SP2-0 SP3-0 SP0-1 SP1-1 SP2-1 SP3-1
6 HB5 SP0-2 SP1-2 SP2-2 SP3-2 SP0-3 SP1-3 SP2-3 SP3-3
7 HB6 SP0-4 SP1-4 SP2-4 SP3-4 SP0-5 SP1-5 SP2-5 SP3-5
8 HB7 SP0-6 SP1-6 SP2-6 SP3-6 SP0-7 SP1-7 SP2-7 SP3-7
HB
Header byte
data buffer
BCH encoder
BCH encoder
SP3
SP3 byte
data buffer
BCH encoder
Video
leading
guardband
Video
preamble Video
data
Reset Control
data
Confidential
Data island
trailing Control
guardband data
Data island
Island
leading
data
guardband
On reset, the HDMI interface does not generate any frames. It stays in the reset state until bit
HDMI_CFG.DEVICE_EN is set. The state machine moves out of the reset state only at the
beginning of the frame (first pixel).
If bit HDMI_CFG.HDMI_NOT_DVI is not set, then the HDMI interface is configured as a digital
visual interface (DVI), and toggles between control data and video data states only (shown by the
blue line).
The extended control periods are generated as programmed in HDMI mode.
The CTLx signals as listed in the table above have to be asserted during a 16 clock window of
opportunity starting at 512 pixel clocks. That is, encryption enable CTLx should be asserted
for 16 clock periods starting from 512 pixel clock periods after assertion of VSYNC. If the HDCP
is enabled, the HDMI framer has to ensure that no data island, video data or any guard band is
transmitted during a keep out period that starts 508 pixels after the active edge of the VSync,
and ends 650 pixels past active edge of VSYNC, to facilitate frame key calculation. No data
Confidential
island is allowed 58 pixel clocks following fall of video data, to facilitate line key calculation.
The EESS is used only when the HDMI transmitter is in the authenticated state.
Data island
During the data island period, HSYNC, VSYNC and packet header bits are mapped onto bits 0,
1 and 2 respectively. Logic 0 is sent on bit 3 for the first clock, and logic 1 thereafter. The LSB 4
bits of channel 1 and channel 2 carry packet data. The four bits are TERC4 encoded as shown in
Table 184.
Video data
During the video data period, the 8-bit input data is encoded in 10 bits, which has an
approximate DC balance, as well as reduced transitions. This is done in two stages. In first stage,
9-bit transition- minimized data is produced. In the second stage, a 10th bit is added, which
balances the overall DC.
Mapping of the encryption keys during the data island period is shown in Table 186.
57.8 Clocks
See Table 69: Video displays clocking for various application on page 156.
57.9 Reset
The HDMI frame formatter is reset by the global asynchronous reset. The TMDS interface
becomes active only after bit HDMI_CFG.DEVICE_EN is set.
Continue only if this bit is set, otherwise the processor has to wait till this bit is set by the HDMI
block.
2. Assemble header bytes as a word (with LSB containing HB0) and write into register
HDMI_IFRAME_HEAD_WD.
3. Assemble packet bytes as words and write to registers HDMI_IFRAME_PKT_WD[0 - 6].
This data is transferred to the FIFO.
4. Enable the info frame by setting bit HDMI_IFRAME_CFG.EN.
The HDMI block automatically infers the number of bytes to be transmitted from the lower
nibble of the third byte in register HDMI_IFRAME_HEAD_WD and starts transmitting the info
frame.
5. HDMI_IFRAME_FIFO_STA.BUSY is set once the HDMI cell starts transmitting the info frame.
It simultaneously resets HDMI_IFRAME_CFG.EN. The BUSY bit is reset only after the
complete info frame is transmitted.
6. HDMI_STA.INFO_BUFF_STA is set once all the data is read by the HDMI cell, not necessary
transmitted.
7. An interrupt is generated (if enabled) once the info frame buffer is empty.
8. The interrupt can be cleared by writing 1 into bit HDMI_INT_CLR.CLR_IFRAME_INT.
One info packet is sent each frame. One info packet may contain multiple info frames. A
maximum of 255 bytes may be carried in each info packet. This implies a maximum of 10 info
frames. To facilitate transmission of an info packet every new frame, an interrupt can be
generated (if enabled) on the start of a new frame. Assuming a typical frame rate of 60 Hz,
transmission of 10 info frames in one frame interval implies servicing 10 interrupts every 16 ms,
or one interrupt every 1.5 ms (maximum).
Channel 2
Bit 0 0C0 1C0 2C0 ................ 31C0 BCH0/2
Insertion of different BCH blocks during the data island period is shown in the figure above. BCH
block 0 is constructed by clubbing BCH0/1,BCH0/2 blocks together. Similarly BCH block 1,2, and
3 are constructed by clubbing BCH1/1, BCH1/2; BCH 2/1, BCH 2/2 and BCH3/1,BCH 3/2 blocks
respectively.
BCH block 0
Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 ................ Bit 6 Bit 7
Subpacket 0
byte 0 Byte 1 Byte 2 Byte3 Byte 4 Byte 5 BCH byte BCH block 0
Byte 6
Byte 0 Byte 1 Byte 2 Byte3 Byte 4 Byte 5 BCH byte BCH block 1
Byte 6
Byte 0 Byte 1 Byte 2 Byte3 Byte 4 Byte 5 BCH byte BCH block 2
Byte6
Byte 0 Byte 1 Byte 2 Byte3 Byte 4 Byte 5 BCH byte BCH block 3
Byte6
Subpacket 3
Confidential
Header packet
Bit 0 Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 ................ Bit 6 Bit 7
Packet header
57.11.2.1Null packet
All the three bytes of the header packet and all the bytes of each of the subpackets of a null
packet contain 0x00.
Bits
Bytes
7 6 5 4 3 2 1 0
HB0 0 0 0 0 0 0 0 1
HB1 0 0 0 0 0 0 0 0
HB2 0 0 0 0 0 0 0 0
All the four subpackets contain the same information. The contents of the subpacket are shown
in Table 188.
Bits
Bytes
7 6 5 4 3 2 1 0
SB0 0 0 0 0 0 0 0 0
SB1 0 0 0 0 CTS_19 CTS_18 CTS_17 CTS_16
SB2 CTS_15 CTS_14 CTS_13 CTS_12 CTS_11 CTS_10 CTS_9 CTS_8
Confidential
Bits
Bytes
7 6 5 4 3 2 1 0
HB0 0 0 0 0 0 0 1 0
HB1 0 0 0 layout sample sample sample sample
present.sp3 present.sp2 present.sp1 present.sp0
HB2 B.3 B.2 B.1 B.0 sample sample sample sample
flat.sp3 flat.sp2 flat.sp1 flat.sp0
layout: Indicates which of two possible audio sample packet layouts are used.
sample present.spX: indicates if subpacket X contains an audio sample
sample flat.spX: Bit is set if no useful audio data is available. Valid only if sample present.spX is
set.
B.X: is set if subpacket X contains the first frame of the IEC60958 block.
Bits
Bytes
7 6 5 4 3 2 1 0
SB0 L.11 L.10 L.9 L.8 L.7 L.6 L.5 L.4
SB1 L.19 L.18 L.17 L.16 L.15 L.14 L.13 L.12
SB2 L.27 L.26 L.25 L.24 L.23 L.22 L.21 L.20
SB3 R.11 R.10 R.9 R.8 R.7 R.6 R.5 R.4
SB4 R.19 R.18 R.17 R.16 R.15 R.14 R.13 R.12
SB5 R.27 R.26 R.25 R.24 R.23 R.22 R.21 R.20
SB6 PR CR UR VR PL CL UL VL
Bits
Bytes
7 6 5 4 3 2 1 0
HB0 1 INFOFRAME_TYPE
HB1 INFOFRAME_VERSION
HB2 0 0 0 INFOFRAME_LENGTH
Bits
Bytes
7 6 5 4 3 2 1 0
PB0 Checksum
PB1 Data byte 1
PB2 Data byte 2
PB3 - PB26 .................
PB27 Data byte 27
The packet bytes are mapped onto individual subpackets as shown below.
Bits
Bytes
7 6 5 4 3 2 1 0
HB0 0 0 0 0 0 0 1 1
HB1 0 0 0 0 0 0 0 0
HB2 0 0 0 0 0 0 0 0
Bits
Confidential
Bytes
7 6 5 4 3 2 1 0
SB0 0 0 0 CLR_AVMUTE 0 0 0 SET_AVMUTE
SB1 0 0 0 0 0 0 0 0
SB2 0 0 0 0 0 0 0 0
SB3 0 0 0 0 0 0 0 0
SB4 0 0 0 0 0 0 0 0
SB5 0 0 0 0 0 0 0 0
SB6 0 0 0 0 0 0 0 0
58 HDMI registers
See also Chapter 54: Video output stage (VOS) registers, HDMI_PHY_LCK_STA on page 637.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ESS_NOT_OESS
HDMI_NOT_DVI
BCH_CLK_RAT
SW_RST_EN
PIXEL_RPT
SYNC_POL
HDCP_EN
HDMI_EN
DLL_CFG
Reserved
Reserved
Address: HDMIBaseAddress + 0x000
Type: R/W
Reset: 0
Description: The register contents like DEVICE_EN, HDMI_NOT_DVI, HDCP_EN, ESS_NOT_OESS,
422_EN, and PIXEL_RPT are expected to take effect from the new frame onwards.
[31] SW_RST_EN
To enable software reset, bit SW_RST must be set to 1. This forces the state machines to reset state
(except the STBus FSM) and re-initialize FIFOs (resets write and read pointers only). The soft reset
execution is synchronous to appropriate clocks in which the soft reset has to be executed. This bit has to
be re-set to 0 after completion of software reset.
1: Soft reset enable
[30:13] Reserved
[12] BCH_CLK_RAT: BCH clock ratio
Confidential
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SPDIF_FIFO_OVRUN_INT_EN
GENCTRL_PKT_INT_EN
INFO_FRAME_INT_EN
HOT_PLUG_INT_EN
NEW_FRM_INT_EN
DLL_LCK_INT_EN
PIX_CAP_INT_EN
SW_RST_INT_EN
INT_EN
Reserved
[6] NEW_FRM_INT_EN
1: Enable interrupt on new frame
[5] DLL_LCK_INT_EN
1: Enable interrupt on DLL lock
[4] HOT_PLUG_INT_EN
1: Enable interrupt on change in hot_plug_in logic toggle
[3] PIX_CAP_INT_EN
1: Enable interrupt after capture of first active pixel
[2] INFO_FRAME_INT_EN
1: Enable interrupt after info frame transmission
[1] SW_RST_INT_EN
1: Enable interrupt after soft reset completion
[0] INT_EN
1: Global interrupt enable
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SPDIF_FIFO_OVRUN_INT_PEND
GENCTRL_PKT_INT_PEND
INFO_FRAME_INT_PEND
HOT_PLUG_INT_PEND
NEW_FRM_INT_PEND
DLL_LCK_INT_PEND
PIX_CAP_INT_PEND
SW_RST_INT_PEND
INT_PEND
Reserved
[8] SPDIF_FIFO_OVRUN_INT_PEND
1: Interrupt on S/PDIF FIFO overrun pending
[7] GENCTRL_PKT_INT_PEND
1: Interrupt on general control packet pending
[6] NEW_FRM_INT_PEND
1: Interrupt on new frame pending
[5] DLL_LCK_INT_PEND
1: Interrupt on DLL lock pending
[4] HOT_PLUG_INT_PEND: Hot plug interrupt pending
1: Any change in logic state of hot_plug_in signal is detected.
[3] PIX_CAP_INT_PEND
1: Pixel capture interrupt pending - set when the pixel data is captured.
[2] INFO_FRAME_INT_PEND
1: Info frame transmission interrupt pending
Set when the info frame buffer is empty
[1] SW_RST_INT_PEND
1: Soft reset completion interrupt pending - set when the software reset process is complete in all the
clock domains. Once set it can be reset only clearbit operation.
Clearing this bit does not de-assert sw reset. If this bit is kept asserted, recursive soft reset interrupts
should not occur.
[0] INT_PEND: Global interrupt pending
1: Global interrupt pending - any interrupt status bit is set to 1. Cannot be cleared by clear bit operation.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CLR_SPDIF_FIFO_OVRUN_INT
CLR_GENCTRL_PKT_INT
CLR_HOT_PLUG_INT
CLR_NEW_FRM_INT
CLR_DLL_LCK_INT
CLR_PIX_CAP_INT
CLR_SW_RST_INT
CLR_IFRAME_INT
Reserved
Reserved
HDMI_STA Status
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HOT_PLUG_STS
INFO_BUFF_STA
PIX_CAP_STA
SW_RST_STA
DLL_LCK
Reserved
Reserved
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MAX_DLY
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved EXTS_MIN
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved XMIN
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved XMAX
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved YMIN
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved YMAX
Note: xmin, xmax, ymin and ymax must be programmed appropriately before the DEVICE_EN bit
is set. If the values of xmin, ymin, xmax and ymax are at zero, the video frame will not start.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CHL0_DATA
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CHL1_DATA
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CHL2_DATA
Description: This register stores a default value of the data that has to be transmitted on channel 2
when the encryption is enabled and the HDMI is not authenticated.
[31:8] Reserved
[7:0] CHL2_DATA: Contains the channel 0 default data
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CHL0_DATA
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
FIFO3_OVR_CLR
FIFO2_OVR_CLR
FIFO1_OVR_CLR
FIFO0_OVR_CLR
SPDIF_DIV
Reserved
LAYOUT
Reserved
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
Reserved EN
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HEADER_BYTES
BUSY
Reserved PKT_BYTES Reserved
[7:3] Reserved
[2:1] HEADER_BYTES
00: Empty
01: one valid byte
10: two valid bytes
11: Header byte word full
[o] BUSY
1: FIFO busy, Data being read from the FIFO
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SP3SP2SP1SP0
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BUFF_NOT_REG
AVMUTE
EN
Reserved
AVMUTE_SET bit is reset. If this bit is set then AVMUTE_CLR bit is reset and
AVMUTE_SET bit is set in the subpacket.
The general packet has to only transmitted between the active edge of VSYNC and 384
pixels following this edge. Once the general packet is transmitted the enable bit is reset
to 0. An interrupt is generated if enabled after completion of general packet
transmission.
[31:3] Reserved
[2] AVMUTE: AVMute status
[1] BUFF_NOT_REG
0: AVMUTE inferred from next bit
1: Data in the buffer transmitted
[0] EN: Enable general control packet transmission
Part 7
Audio
Confidential
59 Audio subsystem
59.1 Overview
The STx7100 audio subsystem decodes and plays different standards of multichannel
compressed audio streams.
The audio decoder is a 400 MHz ST231 CPU core, which basically reads encoded data from
memory and writes decoded PCM data into memory. The audio ST231 is a slave to the ST40
host CPU, and can execute its code through either the EMI or LMI (system and video). The audio
stream (encoded or decoded) can be received either from an external source via the digital PCM
input interface or by an internal source such as the transport subsystem via the memory.
Decoded audio data is output in both analog and digital formats.
For more information on the ST231, see Chapter 4: CPUs on page 36.
Audio outputs
The decoded audio data can be output via a stereo analog DAC on output pins
AUDANAPLEFTOUT, AUDANAMLEFTOUT, AUDANAPRIGHTOUT and AUDANAMRIGHTOUT.
The STx7100 also provides a digital 10-channels PCM output on pins AUD0PCMOUT0,
AUD0PCMOUT1, AUD0PCMOUT2, AUD0PCMOUT3, AUD0PCMOUT4, AUD0PCMCLK_OUT,
AUD0LRCLKOUT and AUD0SCLKOUT.
Confidential
Audio input
Stereo PCM data can be captured by the STx7100 via the input pins AUDATAIN, AUDSTRBIN
and AUDLRCLKIN.
59.2 Features
The STx7100 audio decoder features are as follows:
● compatible with all popular audio standards,
● PCM Mixing with internal or external source with sample rate conversion (32, 44.1, 48 KHz),
● Three frequency synthesizers (comprising clockgen C) generate audio clocks used by the
S/PDIF player, PCM players and audio DAC. Synthesizer FS0 clocks the PCM player
associated to the PCM output; FS1 clocks the PCM player and the audio DAC; FS2 clocks
the S/PDIF.
● A stereo 24-bit audio DAC with differential outputs provides the analog output stream.
Audio
Freq
Audio Synth #2
processor 64
Audio
DMA freq
reqs synth 1
Audio buffers
DMA req
FDMA FIFO
32 PCM output to pad
PCM
Player 0
(SCLK, LRCLK, SDATA)
IRQ
256 x FS
Audio (oversampling
freq clock)
synth 0
STBus
59.4 Operation
Both host CPU (an ST40 core) and FDMA are used during the audio decoding process.
Since the audio decoder is a frame-decoder, the host CPU is required to control the audio
processor frame-by-frame. A mailbox is used for the communication between the two
processors,
The FDMA is used to build the ES buffer, feed the PCM and S/PDIF players and store in memory
the data captured by the PCM reader.
15
2 ⋅ F PLL
F out = ---------------------------------------------------------------------------------------------------------------------------------------------
-
⎛ ⎛ md ⎞ ⎞
sdiv × pe ⋅ 1 + ------- – ⎝ ( pe – 2 ) ⋅ ⎝ 1 + -----------------⎠ ⎠ ⎛ 15 ⎛ md + 1 ⎞ ⎞
⎝ ⎝ 32 ⎠ ⎠ 32
with FPLL equal to 27 or 30 MHz.
To avoid glitches at the frequency synthesizer output, only the MD, PE and EN_PRG parameters
can be changed. The other parameters can be changed but glitches will occur.
The following registers control clock generator C:
● Register AUD_FSYN_CFG controls frequency synthesizer global parameters such as
power-down, reference clock source or PLL filter selection.
● Configuration registers AUD_FSYN0_MD, AUD_FSYN0_PE, AUD_FSYN0_SDIV and
AUD_FSYN0_PROG_EN setup the clock of the frequency synthesizer channel 0.
● Configuration registers AUD_FSYN1_MD, AUD_FSYN1_PE, AUD_FSYN1_SDIV and
AUD_FSYN1_PROG_EN setup the clock of the frequency synthesizer channel 1.
● Configuration registers AUD_FSYN2_MD, AUD_FSYN2_PE, AUD_FSYN2_SDIV and
AUD_FSYN2_PROG_EN setup the clock of the frequency synthesizer channel 2.
Left
LRCLK Right
SCLK
MSB LSB
Confidential
SDIN
1 bit 20 bits 11 bits
The configuration register AUD_ADAC_CTRL controls the power-down, the reset and the mute
of the audio DAC. See also Chapter 14: Audio DAC on page 129.
data from
FDMA Stereo
PCM
SCLK, LRCLK, SDOUT
request Player 1
to FDMA
Analog stereo PCM output
CLK_PCM1 SCLK, LRCLK, SDIN
AUDANAPLEFTOUT
Left channel
AUDANAMLEFTOUT
Audio
DAC
AUDANAPRIGHTOUT
CLK_PCM_DAC Right channel
AUDANAMRIGHTOUT
FSYN_CFG.PCMCLK_SEL[0] AUD0PCMCLKOUT
Audio
frequency EXT_CLK_PCM
synthesizer
CLK_PCM0
channel
CLK_PCM1
channel EXT_CLK_PCM
CLK_SPDIF
channel
FSYN_CFG.PCMCLK_SEL[2]
59.9.1 Overview
The PCM player receives audio data from the FDMA and provides outputs on serial output
channels. It includes a 40 bytes internal FIFO for 10 channels. The STx7100 integrates 2 PCM
players, PCM player 1 uses 2-channel only and PCM player 0 uses up to 10-channels.
S/PDIF latency
It may be necessary to synchronize the PCM players with the S/PDIF player to take into account
the decoding time of the external decoder/amplifier connected to the S/PDIF. This
synchronization is achieved by a pulse generated by the S/PDIF player and received by the PCM
player that will start to produce data after receiving this pulse.
Both PCM player 0 and 1 can be synchronized with the S/PDIF player. This feature is defined in
AUD_PCM_CTRL register.
Decoder latency
synchronized
SPDIF_EOF_LATENCY
outputs
player 1
Start PCM 1
Interrupt
The PCM players can generate an interrupt in the following conditions: FIFO underflow or when
a predefined number of bytes has been read from memory (defined in AUD_PCM_CTRL
register).
The interrupts are handled via the register AUD_PCM_ITS (interrupt status),
AUD_PCM_ITS_CLEAR, AUD_PCM_IT_ENABLE, AUD_PCM_IT_ENABLE_SET,
AUD_PCM_IT_ENABLE_CLEAR.
Clocking
The two PCM players are clocked by two different frequency synthesizer channels (0 and 1). The
synthesizer generates the audio oversampling clock from which the PCM serial clock and left-
right clock are derived. The ratio between the frequency synthesizer clock frequency and the
serial clock is defined in the register AUD_PCM_CTRL.
Control
The register AUD_PCM_CTRL controls the modes of operation (PCM or compressed data), the
memory storage format and the clocking parameters.
Format
A number of format are supported: 16 or 32 bits per subframe, 24, 20, 18 or 16 bits data. The
data alignment and the clock edge polarity can also be defined by the register
AUD_PCM_FORMAT.
Status
The status of the PCM players is reported in the register AUD_PCM_FORMAT.
59.10.1 Overview
The S/PDIF player supports the IEC-61937 (compressed audio data) standard.
The S/PDIF player receives formatted audio data from the FDMA and outputs these audio data
on the S/PDIF output pin. It includes an internal 8-bytes FIFO.
Interrupt
The S/PDIF player can generate an interrupt in the following conditions: FIFO underflow, end of
data burst, end of block, EOF latency, EOF Pd databurst or when a predefined number of bytes
has been read from memory (defined in AUD_SPDIF_CTRL register).
The interrupts are handled via the register AUD_SPDIF_ITS (interrupt status),
AUD_SPDIF_ITS_CLEAR, AUD_SPDIF_IT_ENABLE, AUD_SPDIF_IT_ENABLE_SET,
Confidential
AUD_SPDIF_IT_ENABLE_CLEAR.
Clocking
The S/PDIF player is clocked by the frequency synthesizer channel 2. The ratio between the
frequency synthesizer clock frequency and the S/PDIF clock is defined in the register
AUD_SPDIF_CTRL.
Control
The register AUD_SPDIF_CTRL controls the mode of operation and the clocking parameters.
Burst parameters
The burst parameters pa_pb, pc_pd, channel status bit, user and validity bits, burst length are
defined in the registers AUD_SPDIF_PA_PB, AUD_SPDIF_PC_PD, AUD_SPDIF_CL1,
AUD_SPDIF_CR1, AUD_SPDIF_CL2_CR2_UV, AUD_SPDIF_PAUSE_LAT,
AUD_SPDIF_FRMLGTH_BURST.
Status
The register AUD_SPDIF_STA reports data related to the S/PDIF player state such as data
underflow, end of burst, end of block, and end of subframe.
Interrupt
The PCM reader can generate an interrupt when the FIFO is in overflow.
The interrupts are handled via the register AUD_PCMIN_ITS (interrupt status),
AUD_PCMIN_ITS_CLEAR, AUD_PCMIN_IT_ENABLE, AUD_PCMIN_IT_ENABLE_SET,
AUD_PCMIN_IT_ENABLE_CLEAR.
Clocking
Confidential
The PCM reader is clocked by the external serial clock on pin AUDSTRBIN.
Control
The register AUD_PCMIN_CTRL controls the mode of operation and the memory storage
formats.
Format
The register AUD_PCMIN_FORMAT defines the number of bits per subframe, the data size and
the polarity of the serial and left-right clocks.
Status
The register AUD_PCMIN_STA reports data related to the PCM reader state such as: FIFO
overflow, the number of audio frames received between two vertical syncs and the state (running
or stopped) of the PCM reader.
60 Audio registers
60.1 Summary
AUD_FSYN0_MD Frequency synthesizer channel 0 coarse selection 0x010 R/W 0x0000 0000
AUD_FSYN0_PE Frequency synthesizer channel 0 fine selection 0x014 R/W 0x0000 0000
AUD_FSYN0_SDIV Frequency synthesizer channel 0 output divider 0x018 R/W 0x0000 0000
AUD_FSYN0_PROG_EN Frequency synthesizer channel 0 program enable 0x01C R/W 0x0000 0000
AUD_FSYN1_MD Frequency synthesizer channel 1 coarse selection 0x020 R/W 0x0000 0000
AUD_FSYN1_PE Frequency synthesizer channel 1 fine selection 0x024 R/W 0x0000 0000
AUD_FSYN1_SDIV Frequency synthesizer channel 1 output divider 0x028 R/W 0x0000 0000
AUD_FSYN1_PROG_EN Frequency synthesizer channel 1 program enable 0x02C R/W 0x0000 0000
AUD_FSYN2_MD Frequency synthesizer channel 2 coarse selection 0x030 R/W 0x0000 0000
AUD_FSYN2_PE Frequency synthesizer channel 2 fine selection 0x034 R/W 0x0000 0000
AUD_FSYN2_SDIV Frequency synthesizer channel 2 output divider 0x038 R/W 0x0000 0000
AUD_FSYN2_PROG_EN Frequency synthesizer channel 2 program enable 0x03C R/W 0x0000 0000
AUD_PCMOUT0_ITS_CLR PCM player 0 interrupt status clear 0x00C R/W 0x0000 0000
AUD_PCMOUT0_IT_EN_SET PCM player 0 interrupt enable set 0x014 R/W 0x0000 0000
AUD_PCMOUT0_IT_EN_CLR PCM player 0 interrupt enable clear 0x018 R/W 0x0000 0000
AUD_PCMOUT1_ITS_CLR PCM player 1 interrupt status clear 0x00C R/W 0x0000 0000
AUD_PCMOUT1_IT_EN_SET PCM player 1 interrupt enable set 0x014 R/W 0x0000 0000
AUD_PCMOUT1_IT_EN_CLR PCM player 1 interrupt enable clear 0x018 R/W 0x0000 0000
AUD_SPDIF_ITS_CLR S/PDIF player interrupt status clear 0x00C R/W 0x0000 0000
AUD_SPDIF_IT_EN_SET S/PDIF player interrupt enable set 0x014 R/W 0x0000 0000
AUD_SPDIF_IT_EN_CLR S/PDIF player interrupt enable clear 0x018 R/W 0x0000 0000
AUD_SPDIF_CL1 S/PDIF player channel status for left subframes 0x02C R/W 0x0000 0000
Confidential
AUD_SPDIF_CR1 S/PDIF player channel status for right 0x030 R/W 0x0000 0000
subframes
AUD_SPDIF_CL2_CR2_UV S/PDIF player channel status for right and left 0x034 R/W 0x0000 0000
subframes, user and validity bits
AUD_SPDIF_PAU_LAT S/PDIF player pause gap length and latency 0x038 R/W 0x0000 0000
AUD_PCMIN_ITS_CLR PCM reader interrupt status clear 0x00C R/W 0x0000 0000
AUD_PCMIN_IT_EN_SET PCM reader interrupt enable set 0x014 R/W 0x0000 0000
AUD_PCMIN_IT_EN_CLR PCM reader interrupt enable clear 0x018 R/W 0x0000 0000
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PCM_CLK_SEL
REF_CLK_IN
Reserved
Reserved
Reserved
Reserved
Reserved
BW_SEL
FS_EN
NPDA
RSTP
NDIV
NSB
Address: AudioBaseAddress + 0x000
Type: R/W
Reset: 0xXX00 0000
Description: Defines the global parameters of the frequency synthesizer.
[31:24] Reserved
[23] REF_CLK_IN: Frequency synthesizer reference clock source
0: SATA PHY 30 MHz clock 1: SYSBCLKINALT clock
[22:18] Reserved
[17:16] BW_SEL: Frequency synthesizer reference clock filter
00: Very good reference 10: Bad reference
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MD0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PE0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SDIV0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PROG_EN0
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MD1
Type: R/W
Reset: 0xXXXX XX00
Description: Defines the MD parameter (coarse selection) for the frequency synthesizer channel 1.
The MD parameter is defined in the range [-1, -16] ([0x1F, 0x0F]).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PE1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SDIV1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PROG_EN1
Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MD2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PE2
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SDIV2
000: 2
001: 4
010: 8
011 - 110: Reserved
111: 256
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PROG_EN2
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SOFTMUTE
PDNBG
PDANA
MODE
NRST
NSB
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PCM_CLK_EN
SPDIF_EN
DATA1_EN
DATA0_EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRSTP
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DATA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
Confidential
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
Confidential
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SPDIF_LAT
MEM_FMT
CLK_DIV
MODE
RND
NSAMPLE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RUN_STOP
NSAMPLE
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA_REQ_TRIG_LMT
SCLK_EDGE
DATA_SIZE
PADDING
Reserved
NUM_CH
LR_POL
ORDER
ALIGN
NBIT
Reserved
Specifies the number of channels required at the output. Null data appears at the output for remaining
unused channels.
001: One channel only (stereo) 100: Four channels only
010: Two channels only 101: All five channels
011: Three channels only
Reset value: 000
[7] ORDER: Bit ordering
0: Data is output LSBit first 1: Data is output MSBit first
[6] ALIGN
0: Data is left-aligned wrt to LR clock 1: Data is right-aligned wrt to LR clock
[5] PADDING:
0: Data is delayed by 1 clock cycle 1: Data is not delayed
[4] SCLK_EDGE: Active edge
0: Data is output on the rising edge of SCLK 1: Data is output on the falling edge of SCLK
[3] LR_POL: Left-right clock polarity
0: Left word when LR clock is low 1: Left word when LR clock is high
[2:1] DATA_SIZE: Data size
00: 24 bits 10: 18 bits
01: 20 bits 11: 16 bits
[0] NBIT: Number of bits per subframe
0: 32 bits per subframe 1: 16 bits per subframe
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSTP
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DATA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
Confidential
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLE
Confidential
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SPDIF_LAT
MEM_FMT
CLK_DIV
MODE
RND
NSAMPLE
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NSAMPLES_READ
RUN_STOP
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DMA_REQ_TRIG_LMT
SCLK_EDGE
DATA_SIZE
PADDING
Reserved
NUM_CH
LR_POL
ORDER
ALIGN
NBIT
Reserved
Specifies the number of channels required at the output. Null data appears at the output for remaining
unused channels.
001: One channel only (stereo) 100: Four channels only
010: Two channels only 101: All five channels
011: Three channels only
Reset value: 000
[7] ORDER: Bit ordering
0: Data is output LSBit first 1: Data is output MSBit first
[6] ALIGN
0: Data is left-aligned wrt to LR clock 1: Data is right-aligned wrt to LR clock
[5] PADDING:
0: Data is delayed by 1 clock cycle 1: Data is not delayed
[4] SCLK_EDGE: Active edge
0: Data is output on the rising edge of SCLK 1: Data is output on the falling edge of SCLK
[3] LR_POL: Left-right clock polarity
0: Left word when LR clock is low 1: Left word when LR clock is high
[2:1] DATA_SIZE: Data size
00: 24 bits 10: 18 bits
01: 20 bits 11: 16 bits
[0] NBIT: Number of bits per subframe
0: 32 bits per subframe 1: 16 bits per subframe
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRSTP
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DATA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EOLATENCY
EOBLOCK
EOBURST
NSAMPLE
EOPD
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EOLATENCY_CLR
NSAMPLE_CLR
EOBST_CLR
EOBLK_CLR
EOPD_CLR
UNF_CLR
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EOLATENCY
EOBURST
EOBLOCK
NSAMPLE
EOPD
UNF
Reserved
[1] EOBURST
1: Enable end of data burst interrupt
[0] UNF
1: Enable FIFO underflow interrupt
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EOLATENCY
EOBURST
EOBLOCK
NSAMPLE
EOPD
UNF
Reserved
[1] EOBURST
1: Enable end of data burst interrupt
[0] UNF
1: Enable FIFO underflow interrupt
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EOLATENCY
EOBURST
EOBLOCK
NSAMPLE
EOPD
UNF
Reserved
[1] EOBURST
1: Disable end of data burst interrupt
[0] UNF
1: Disable FIFO underflow interrupt
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STUFFING
Reserved
CLKDIV
MODE
IDLE
RND
MEMREAD
0: 1 x fFS, 2: 128 x fFS, 3: 192 x fFS, 4: 256 x fFS, 6: 384 x fFS, 8: 512 x fFS, 12: 768 x fFS
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
EOLATENCY
EODBURST
EOBLOCK
RUNSTOP
NSAMPLE
PDPAUSE
PDDATA
PABIT
UNF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PA PB
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PA PB
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CL1
Description: Defines the channel status for the left subframe (subframes 31 down to 0).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CR1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NPD_BST LAT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DBURST PDBURST
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSTP
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DATA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSYNC
OVF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSYNC
OVF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSYNC
OVF
Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSYNC
OVF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
VSYNC
OVF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MEM_FMT
MODE
RND
Confidential
NUM_FRAMES
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SAMPL_CNT
RUN_STOP
NFRAMES
VSYNC
OVF
Reserved
[0] RUN_STOP
0: PCM reader stopped
1: PCM reader running
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SCLK_EDGE
DATA_SIZE
PADDING
LR_POL
ORDER
ALIGN
NBIT
Reserved
Part 8
61.1 Overview
The asynchronous serial controller, also referred to as the UART interface, provides serial
communication between the STx7100 and other microcontrollers, microprocessors or external
peripherals. The STx7100 provides four ASCs, two of which are generally used by the smartcard
controllers.
Parity generation, 8- or 9-bit data transfer and the number of stop bits is programmable. Parity,
framing, and overrun error detection is provided to increase the reliability of data transfers. The
transmission and reception of data can simply be double-buffered, or 16-deep FIFOs may be
used. Handshaking is supported on both transmission and reception. For multiprocessor
communication, a mechanism to distinguish the address from the data bytes is included. Testing
is supported by a loop back option. A dual mode 16-bit baudrate generator provides the ASC
with a separate serial clock signal.
Each ASC supports full duplex, asynchronous communication, where both the transmitter and
the receiver use the same data frame format and the same baudrate. Data is transmitted on the
transmit data output pin TXD and received on the receive data input pin RXD.
Each ASC can be set to operate in smartcard mode for use when interfacing to a smartcard.
Confidential
61.2 Control
Register ASC_n_CTRL controls the operating mode of the ASC. It contains control and enable
bits, error check selection bits, and status flags for error identification.
Serial data transmission or reception is only possible when the baudrate generator run bit (RUN)
is set to 1. When the RUN bit is set to 0, TXD is 1. Setting the RUN bit to 0 immediately freezes
the state of the transmitter and receiver and should only be done when the ASC is idle.
Note: Programming the mode control field (MODE) to one of the reserved combinations results in
unpredictable behavior.
The ASC can be set to use either double-buffering or a 16-deep FIFO on transmission and
reception.
Reception of a second character may begin before the received character has been read out of
the receive buffer register. The overrun error status flag (OVERRUN_ERR) in the status register,
ASC_n_STA, is set when the receive buffer register has not been read by the time the reception
of a second character is completed. The previously received character in the receive buffer is
overwritten, and the ASC_n_STA register is updated to reflect the reception of the new
character.
The loop back option (selected by the LOOPBACK bit in register ASC_n_CTRL) internally
connects the output of the transmitter shift register to the input of the receiver shift register. This
may be used to test serial communication routines at an early stage without having to provide an
external network.
● data field (8 or 9 bits, least significant bit (LSB) first, including a parity bit or wake up bit, if
selected),
● stop bits (0.5, 1, 1.5 or 2 stop bits).
Confidential
● seven data bits D[0:6] plus an automatically generated parity bit (MODE set to 011).
Parity may be odd or even, depending on the bit ASC_n_CTRL.PARITYODD. If the modulo 2
sum of the seven data bits is 1, then the even parity bit is set and the odd parity bit is cleared.
In receive mode the parity error flag (PARITYERROR) is set if a wrong parity bit is received. The
parity error flag is stored in the 8th bit (D7) of the ASC_n_RXBUFFER register. The parity error
bit is set high if there is a parity error.
● eight data bits D[0:7] plus an automatically generated parity bit (MODE set to 111),
● eight data bits D[0:7] plus a wake up bit (MODE set to 101).
Parity may be odd or even, depending on bit ASC_n_CTRL.PARITYODD. If the modulo 2 sum of
the eight data bits is 1, then the even parity bit is set and the odd parity bit is cleared. The parity
Confidential
error flag (PARITYERROR) is set if a wrong parity bit is received. The parity error flag is stored in
the 9th bit (D8) of the ASC_n_RXBUFFER register. The parity error bit is set high if there is a
parity error.
In wake up mode, received frames are only transferred to the receive buffer register if the ninth
bit (the wake up bit) is 1. If this bit is 0, no receive interrupt requests is activated and no data is
transferred.
This feature may be used to control communication in multiprocessor systems. When the master
processor wants to transmit a block of data to one of several slaves, it first sends out an address
byte which identifies the target slave. An address byte differs from a data byte in that the
additional ninth bit is 1 for an address byte and 0 for a data byte, so no slave is interrupted by a
data byte. An address byte interrupts all slaves (operating in 8-bit data plus wake up bit mode),
so each slave can examine the eight least significant bits (LSBs) of the received character, which
is the address. The addressed slave switches to 9-bit data mode, which enables it to receive the
data bytes that are coming (with the wake up bit cleared). The slaves that are not being
addressed remain in 8-bit data plus wake up bit mode, ignoring the data bytes which follow.
61.4 Transmission
Transmission begins at the next baudrate clock tick, provided that the RUN bit is set and data
has been loaded into the ASC_n_TX_BUFF. If bit ASC_n_CTRL.CTS_EN is set, then
transmission only occurs when NOT_ASCnCTS is low.
The transmitter empty flag (TXEMPTY) indicates whether the output shift register is empty. It is
set at the beginning of the last data frame bit that is transmitted, that is, during the first comms
clock cycle of the first stop bit shifted out of the transmit shift register.
The loop back option (selected by bit ASC_n_CTRL.LOOPBACK) internally connects the output
of the transmitter shift register to the input of the receiver shift register. This may be used to test
serial communication routines at an early stage without having to provide an external network.
A transmission ends with stop bits (1 is output on TXD). When bit ASC_n_CTRL.SC_EN is 0, the
length of these stop bits is determined by the setting of field ASC_n_CTRL.STOPBITS. This can
either be for 0.5, 1, 1.5 or 2 baud clock periods. In smartcard mode, when bit
ASC_n_CTRL.SC_EN is 1, the number of stop bits is determined by the value in ASC_n_
GUARDTIME.
Bit ASC_n_STA.TXFULL is set when the transmit FIFO is considered full, that is, when it
contains 16 characters. Further writes to ASC_n_TXBUFFER fail to overwrite the most recent
entry in the output FIFO. Bit ASC_n_STA.TXHALFEMPTY is set when the output FIFO contains
eight or fewer characters.
Values are shifted out of the bottom of the output FIFO into a 9-bit output shift register in order to
be transmitted. If the transmitter is idle (that is, the output shift register is empty) and something
is written to the ASC_n_TXBUFFER so that the output FIFO becomes nonempty, the output shift
register is immediately loaded from the output FIFO and transmission of the data in the output
shift register begins at the next baudrate tick.
When the transmitter is just about to transmit the stop bits, and if the output FIFO is nonempty,
the output shift register is immediately loaded from the output FIFO, and the transmission of this
new data begins as soon as the current stop bit period is over (that is, the next start bit is
transmitted immediately following the current stop bit period). If the output FIFO is empty at this
point, the output shift register becomes empty. Thus back to back transmission of data can take
place. Writing anything to ASC_n_TXRESET empties the output FIFO.
After changing the FIFO_EN bit, it is important to reset the FIFO to empty (by writing to the
ASC_n_TXRESET register), or garbage may be transmitted.
61.5 Reception
Reception is initiated by a falling edge on the data input pin RXD, provided that the RUN and
RX_EN bits of the ASC_n_CTRL register are set.
Controlled data transfer can be achieved using the RTS handshaking signal provided by the
UART. The sender checks the RTS to ensure the UART is ready to receive data. In double
buffered reception RTS goes high when ASC_n_RXBUFFER is empty, in FIFO controlled
operation it goes high when RXHALFFULL is zero.
The RXD pin is sampled at 16 times the rate of the selected baudrate. A majority decision of the
first, second and third samples of the start bit determines the effective bit value. This avoids
erroneous results that may be caused by noise.
If the detected value of the first bit of a frame is not 0, then the receive circuit is reset and waits
for the next falling edge transition at the RXD pin. If the start bit is valid, that is 0, the receive
circuit continues sampling and shifts the incoming data frame into the receive shift register. For
subsequent data and parity bits, the majority decision of the seventh, eighth and ninth samples in
each bit time is used to determine the effective bit value. The effective values received on RXD
are shifted into a 10-bit input shift register.
For 0.5 stop bits, the majority decision of the third, fourth, and fifth samples during the stop bit is
used to determine the effective stop bit value. For 1 and 2 stop bits, the majority decision of the
seventh, eighth, and ninth samples during the stop bits is used to determine the effective stop bit
values. For 1.5 stop bits, the majority decision of the 15th, 16th, and 17th samples during the
stop bits is used to determine the effective stop bit value.
Confidential
buffer (double buffered operation), or at least one of the valid entries in the input buffering (FIFO
controlled operation), has bit 8 set.
When receiving 8-bit data frames without parity (see Section 61.3.1 on page 770), the ninth bit of
each input entry (bit 8 of 0 to 9) is undefined.
ASC_n_RXRESET register; otherwise the state of the FIFO pointers may be garbage.
If none of these conditions hold the counter decrements towards 0 at every baudrate tick.
The TIMEOUTNOTEMPTY bit of the ASC_n_STA register is 1 when the input FIFO is not empty
and the time out counter is zero.
The TIMEOUTIDLE bit of the ASC_n_STA register is 1 when the input FIFO is empty and the
time out counter is zero.
The effect of this is that whenever the input FIFO has got something in it, the time out counter
decrements until something happens to the input FIFO. If nothing happens, and the time out
counter reaches zero, the TIMEOUTNOTEMPTY bit of the ASC_n_STA register is set.
When the software has emptied the input FIFO, the time out counter resets and starts
decrementing. If no more characters arrive, when the counter reaches zero the TIMEOUTIDLE
bit of the ASC_n_STA register is set.
61.6.1 Baudrates
Confidential
The baudrate generator provides an internal oversampling clock at 16 times the external
baudrate. This clock only ticks if the bit ASC_n_CTRL.RUN is set to 1. Setting this bit to 0
immediately freezes the state of the ASC’s transmitter and receiver.
Mode 0
When bit ASC_n_CTRL.BAUDMODE is set to 0, the baudrate and the required reload value for
a given baudrate can be determined by the following formulae:
fcomms
BaudRate =
16 x ASCBaudRate
fcomms
ASCBaudRate =
16 x BaudRate
where:
● ASCBaudRate represents the content of the ASC_n_BAUDRATE reload value register,
taken as an unsigned 16-bit integer,
● fcomms is the frequency of the comms clock (clock channel PLL_CLK[2], see
Chapter 17: Clocks on page 147).
The baudrate counter is clocked by the comms clock. It counts downwards and can be started or
stopped by bit ASC_n_CTRL.RUN. Each underflow of the timer provides one oversampling
baudrate clock pulse. The counter is reloaded with the value stored in its 16-bit reload register
each time it underflows.
Writes to register ASC_n_BAUDRATE update the reload register value. Reads from the
ASC_n_BAUDRATE register return the current value of the counter.
Mode 1
When bit ASC_n_CTRL.BAUDMODE is set to 1, the baudrate is controlled by the circuit in
Figure 244.
ASCBaudRate
(accumulator)
ASCBaudRate
(Reload) Carry-out
Oversampling clock
Comms clock
The CPU writes go to ASC_n_BAUDRATE to the reload register. The CPU then reads from
ASC_n_BAUDRATE and returns the value in the accumulator register. Both registers are 16 bits
wide and are clocked by the comms clock (PLL_CLK[2]).
Confidential
ASCBaudRate x fcomms
216
So the baudrate is given by:
ASCBaudRate x fcomms
BaudRate =
16 x 216
This gives good granularity, and hence low baudrate deviation errors, at high baudrate
frequencies.
61.7.1 Using the ASC interrupts when FIFOs are disabled (double buffered operation)
Confidential
The transmitter generates two interrupts; this provides advantages for the servicing software.
For normal operation (that is, other than the error interrupt) when FIFOs are disabled the ASC
provides three interrupt requests to control data exchange via the serial channel:
● TX_HALFEMPTY is activated when data is moved from ASC_n_TXBUFFER to the transmit
shift register,
● TX_EMPTY is activated before the last bit of a frame is transmitted,
AND
RX_BUFFULL RX_BUFFULL_IE
AND
TX_EMPTY TX_EMPTY_IE
AND
TX_HALFEMPTY TX_HALFEMPTY_IE
AND
PARITY_ERR PARITY_ERR_IE
ASC
interrupt
AND OR
FRAME_ERR FRAME_ERR_IE
AND
OVERRUN_ERR OVERRUN_ERR_IE
AND
TIMEOUT_NOTEMPTY TIMEOUT_NOTEMPTY_IE
Confidential
AND
TIMEOUT_IDLE TIMEOUT_IDLE_IE
AND
RX_HALFFULL RX_HALFFULL_IE
TX_FULL
NKD
ASC_n_STA ASC_n_INT_EN
register register
As shown in Figure 245, TX_HALFEMPTY is an early trigger for the reload routine, while
TX_EMPTY indicates the completed transmission of the data field of the frame. Therefore,
software using handshake should rely on TX_EMPTY at the end of a data block to make sure
that all data has really been transmitted.
For single transfers it is sufficient to use the transmitter interrupt (TX_EMPTY), which indicates
that the previously loaded data has been transmitted, except for the last bit of a frame.
For multiple back to back transfers it is necessary to load the next data before the last bit of the
previous frame has been transmitted. The use of TX_EMPTY alone would leave just one stop bit
time for the handler to respond to the interrupt and initiate another transmission. Using the output
buffer interrupt (TX_HALFEMPTY) to signal for more data allows the service routine to load a
complete frame, as ASC_n_TX_BUFF may be reloaded while the previous data is still being
transmitted.
TXHALFEMPTY interrupt
TXEMPTY interrupt
Start
Start
Start
Stop
Stop
Stop
Confidential
When receiving, the driver can use RXBUFFULL to interrupt every time a character arrives.
Alternatively, if data is coming in back to back, it can use RXHALFFULL to interrupt it when there
are more than eight characters in the input FIFO to read. It has as long as it takes to receive eight
characters to respond to this interrupt before data overruns. If less than eight characters stream
in, and no more are received for at least a time out period, the driver can be woken up by one of
the two time out interrupts, TIMEOUTNOTEMPTY or TIMEOUTIDLE.
Start
Start
Stop
Stop
Stop
RXBUFFULL
acknowledge signal, see Handshaking). During the guardtime period the UART receiver is
insensitive to possible start bits and the smartcard is free to send NACKs.
The guardtime is effectively the number of stop bits to use when transmitting in smart card mode.
Programming a value of 0 is undefined. Any positive value < 512 is possible.
The guardtime mentioned here is different from the guardtime mentioned in ISO7816. In fact to
achieve a particular guardtime value, the guardtime should be programmed with the following
value:
Guardtime = guardtime + 2 (mod 256)
In particular, this applies to the special case of guardtime = 255, where effectively, the number of
stop bits is 1.
Note: If guardtime = 255 then any NACKs from the smart card might conflict with subsequent
transmitted start bits, so it is assumed that the smart card is not sending NACKs in this case
(T=1 protocol is being used for example). It is also important that the UART should be
programmed in 0.5 stop bit mode, so that it does not see a subsequent start bit as a frame error
(that is a NACK). So when guardtime = 255, the UART should be programmed in 0.5 stop bit
mode.
Guardtime should always be set to at least two.
61.8.2 Transmission
In smartcard mode FIFOs can be either enabled or disabled. If FIFOs are disabled, the UART
transmission behaves according to NDC requirements.
Handshaking
When the UART is transmitting data to the smartcard, the smartcard can NACK (not
acknowledge) the transmission by pulling the line low, 0.5 baud clock periods into the guardtime
period and holding it low for at least 1 baud clock period. The UART should also be programmed
in 1.5 stop bit mode, and since it receives what it transmits, NACKs is detected as receive
framing errors.
period, the transmit line is pulled low for a baud clock period after the completion of the
receive frame, that is, at the end of the 1/2 stop bit period. This is to indicate to the
smartcard that the data transmitted to the UART has not been correctly received.
● The assertion of the TX_EMPTY interrupt can be delayed by programming the
ASC_n_GUARDTIME register. In normal operation, TX_EMPTY is asserted when the
transmit shift register is empty and no further transmit requests are outstanding.
● The receiver enable bit in the ASC_n_CTRL register is automatically reset after a character
has been transmitted. This avoids the receiver detecting a NACK from the smartcard as a
start bit.
In smartcard mode an empty transmit shift register triggers the guardtime counter to count up to
the programmed value in the ASC_n_GUARDTIME register. TX_EMPTY is forced low during
this time. When the guardtime counter reaches the programmed value TX_EMPTY is asserted
high.
The de-assertion of TX_EMPTY is unaffected by smartcard mode.
61.8.3 Reception
Reception can be done with FIFOs either enabled or disabled. The behavior is the same as in
normal (nonsmartcard) mode except that if a parity error occurs then, providing the transmitter is
idle, and bit ASC_n_CTRL.NACKDISABLE is 0, the UART transmits a NACK on the TXD for one
baud clock period from the end of the received stop bit. RXD is masked when transmitting a
NACK, since TXD is tied to RXD and a NACK must not be seen as a start bit.
If bit ASC_n_CTRL.NACKDISABLE is 1 then no automatic NACK generation takes place.
The registers for each ASC are grouped in 4 Kbyte blocks, with the base of the block for ASC
number n at the address ASCnBaseAddress.
Register addresses are provided as ASCnBaseAddress + offset.
The ASCnBaseAddresses are:
UART0: 0x1803 0000,
UART1: 0x1803 1000,
UART2: 0x1803 2000,
UART3: 0x1803 3000.
There is also one enable register located in the infrared blaster block. This is provided as
IRBBaseAddress + offset.
The IRBBaseAddress is:
0x1811 5000.
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RELOAD_VAL
16 x ASCBaudRate
fcomms
ASCBaudRate =
16 x BaudRate
where: ASCBaudRate represents the content of the ASC_n_BAUDRATE register,
taken as an unsigned 16-bit integer,
fcomms is the frequency of the comms clock (clock channel PLL_CLK[2]).
Mode 0 should be used for all baudrates below 19.2 Kbaud.
Table 203 lists commonly used baudrates with the required reload values and the
approximate deviation errors for an example baudrate with a comms clock of 60 MHz.
Mode 1
When bit ASC_n_CTRL.BAUDMODE is set to 1, the baudrate is given by:
ASCBaudRate x fcomms
BaudRate =
16 x 216
where: fcomms is the comms clock frequency and ASCBaudRate is the value written to
the ASC_n_BAUDRATE register. Mode 1 should be used for baudrates of 19.2 Kbytes
and above as it has a lower deviation error than mode 0 at higher frequencies.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
Reserved TD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RD
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NACK_DISABLE
BAUDMODE
PARITYODD
LOOPBACK
STOPBITS
Reserved
FIFO_EN
CTS_EN
SC_EN
RX_EN
MODE
RUN
Address: ASCnBaseAddress + 0x00C
Type: R/W
Reset: 0
Description: This register controls the operating mode of the UART ASCn and contains control bits
for mode and error check selection, and status flags for error identification.
Programming the mode control field (MODE) to one of the reserved combinations may
result in unpredictable behavior. Serial data transmission or reception is only possible
when the baudrate generator run bit (RUN) is set to 1. When the RUN bit is set to 0,
TXD is 1. Setting the RUN bit to 0 immediately freezes the state of the transmitter and
receiver. This should only be done when the ASC is idle.
Serial data transmission or reception is only possible when the baudrate generator RUN
bit is set to 1. A transmission is started by writing to the transmit buffer register
ASC_n_TXBUFFER.
Confidential
[31:14] Reserved
[13] NACK_DISABLE: NACKing behavior control
0: NACKing behavior in smartcard mode
1: No NACKing behavior in smartcard mode
[12] BAUDMODE: Baudrate generation mode
0: Baud counter decrements, ticks when it reaches 1 1: Baud counter added to itself, ticks when there is
a carry
[11] CTS_EN: CTS enable
0: CTS ignored 1: CTS enabled
[10] FIFO_EN: FIFO enable:
0: FIFO disabled 1: FIFO enabled
[9] SC_EN: Smartcard enable
0: Smartcard mode disabled 1: Smartcard mode enabled
[8] RX_EN: Receiver enable bit
0: Receiver disabled 1: Receiver enabled
[7] RUN: Baudrate generator run bit
0: Baudrate generator disabled (ASC inactive) 1: Baudrate generator enabled
[6] LOOPBACK: Loopback mode enable bit
0: Standard transmit/receive mode 1: Loopback mode enabled
[5] PARITYODD: Parity selection
0: Even parity (parity bit set on odd number of 1’s in data)
1: Odd parity (parity bit set on even number of 1’s in data)
[4:3] STOPBITS: Number of stop bits selection
00: 0.5 stop bits 01: 1 stop bits
10: 1.5 stop bits 11: 2 stop bits
[2:0} MODE: ASC mode control: Mode2
000: Reserved 001: 8-bit data
010: Reserved 011: 7-bit data + parity
100: 9-bit data 101: 8-bit data + wake up bit
110: Reserved 111: 8-bit data + parity
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
RHF
RBE
TNE
THE
TOI
OE
PE
FE
TE
Address: ASCnBaseAddress + 0x010
Type: R/W
Reset: 0
Description:
[31:9] Reserved
[8] RHF: Receiver FIFO is half full interrupt enable
0: Receiver FIFO is half full interrupt disable 1: Receiver FIFO is half full interrupt enable
[7] TOI: Time out when the receiver FIFO is empty interrupt enable
0: Time out when the input FIFO or buffer is empty interrupt disable
1: Time out when the input FIFO or buffer is empty interrupt enable
[6] TNE: Time out when not empty interrupt enable
0: Time out when input FIFO or buffer not empty interrupt disable
1: Time out when input FIFO or buffer not empty interrupt enable
[5] OE: Overrun error interrupt enable
0: Overrun error interrupt disable 1: Overrun error interrupt enable
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved
TONE
NKD
RHF
RBF
TOE
THE
OE
PE
FE
TE
TF
Address: ASCnBaseAddress + 0x014
Type: RO
Reset: 3 (Rx buffer full and Tx buffer empty)
Description:
[31:11] Reserved
[10] NKD: Transmission failure acknowledgement by receiver
0: Data transmitted successfully
1: Data transmission unsuccessful (data NACKed by smartcard)
[9] TF: Transmitter FIFO or buffer is full
0: The FIFOs are enabled and the transmitter FIFO is empty or contains less than 16 characters or the
FIFOs are disabled and the transmit buffer is empty
1: The FIFOs are enabled and the transmitter FIFO contains 16 characters or the FIFOs are disabled and
the transmit buffer is full
[8] RHF: Receiver FIFO is half full
0: The receiver FIFO contains eight characters or less
Confidential
31 30 29 28 28 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved GUARDTIME
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved TIMEOUT
Description: The time out period in baudrate ticks. The ASC contains an 8-bit time out counter, which
reloads from ASC_n_TIMEOUT when one or more of the following is true:
• ASC_n_RXBUFFER is read,
• the ASC is in the middle of receiving a character,
• ASC_n_TIMEOUT is written to.
If none of these conditions hold the counter decrements to 0 at every baudrate tick.
The TONE (time out when not empty) bit of the ASC_N_INT_STA register is 1 when the
input FIFO is not empty and the time out counter is zero. The TIMEOUTIDLE bit of the
ASC_N_INT_STA register is 1 when the input FIFO is empty and the time out counter is
zero.
When the software has emptied the input FIFO, the time out counter resets and starts
decrementing. If no more characters arrive, when the counter reaches zero the
TIMEOUTIDLE bit of the ASC_N_INT_STA register is set.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved NUM_RETRIES
63.1 Overview
The synchronous serial controller (SSC) is a high-speed interface which can be used to
communicate with a wide variety of serial memories, remote control receivers and other
microcontrollers. There are a number of serial interface standards for these. Three SSCs are
provided on the STx7100. The SSC supports all the features of the serial peripheral interface
(SPI) bus and also includes additional functions for the full support of the I2C bus. The general
programmable features should also allow interface to other serial bus standards.
The SSC shares pins with the parallel input/output (PIO) ports. It supports full-duplex1 and half-
duplex synchronous communication when used in conjunction with the PIO configuration.
The SSC uses three signals:
● serial clock SCLK,
● acknowledge generation,
● clock stretching.
These allow software to fully implement all aspects of the standard, such as master and slave
mode, multi-master mode, 10-bit addressing and fast mode.
1. On the STx7100, by default the two serial data in/out signals are multiplexed on to a single pin for
I2C mode (full-duplex mode is not supported).
Master/slave Pin
select
control Serial data out
Confidential
Enable
Interrupt, error control
Transmit Receive
buffer buffer
Peripheral interface
After the data frame has been completely shifted out of the shift register, it transfers the received
data frame into the receive buffer. The transmit and receive buffers are described in Section
63.2.7: Transmit and receive buffers on page 798. The SSC is therefore double buffered. This
allows back-to-back transmission and reception of data frames up to the speed that interrupts
can be serviced.
1. On the STx7100, by default the two serial data in/out signals can be multiplexed on to a single
pin for I2C mode (full-duplex mode is not supported).
The SSC can also be configured to loop the serial data output back to serial data input in order
to test the device without any external connections. This is described in Section
63.2.8: Loopback mode on page 798.
The SSC can be turned on and off by setting the enable control. This is described in Section
63.2.9: Enabling operation on page 798. It can be also be set to operate as a bus master or as a
bus slave device. This is described in Section 63.2.10: Master/slave operation on page 798.
The SSC generates interrupts in a variety of situations:
● when the transmission buffer is empty,
● when an error occurs. A number of error conditions are detected. These are described in
Section 63.2.11: Error detection on page 799.
There are additional hardware features which can be independently enabled in order to fully
support the I2C bus standard when used in conjunction with a suitable software driver. The
additional I2C hardware is described in Section 63.3: I2C operation on page 801.
● two data pins, MTSR, and MRST, which are either inputs or outputs depending on whether
In I2C mode only, the MTSR pin is used as an input and output. This means only the MTSR pad
needs to be used on the I2C data line. However, for backward compatibility, it is still possible to
short MTSR and MRST data pins externally and achieve the same function (the MRST data
output is permanently driven to a high logic value and its input is ignored1.
These pads are provided by three bits of a standard PIO block. Their directions (input, output or
bidirectional) can therefore be configured in software using the appropriate PIO settings.
Consequently the SSC does not need to provide automatic control of data pad directions and
does not need to provide a bidirectional clock port.
1. On the STx7100, by default the two serial data in/out signals can be multiplexed on to a single
pin (full-duplex mode is not supported) for I2C mode.
The connections between the SSC ports and the relevant PIO pins are illustrated in Figure 249.
Pins are shared with PIO, and with EMPI in the GX1 (the selection between PIO and EMPI pins
is made in the glue logic).
OUT_ENn
ALT_DATA_OUTn SCL
SSCn_SCLKOUT
SSC clock
DATA_FROM_PADSn
SSCn _SCLKIN
OUT_ENm
ALT_DATA_OUTm MTSR
SSCn_MTSR_DOUT
DATA_FROM_PADSm
SSCn_MTSR_DIN
OUT_ENp
SSC data
ALT_DATA_OUTp MRST Note: These signals
SSCn_MRST_DOUT can be multiplexed
on to the same pin
DATA_FROM_PADSp
SSCn_MRST_DIN using config control
reg B bit 24 or 25.
SSC PIO/EMPI
Confidential
The pad control block inside the SSC determines which of the serial data input ports is used to
read data from (depending on the master or slave mode). It also determines which of the serial
data output ports to write data to (depending on the master or slave mode).
The deselected serial data output port is driven to ground (except in I2C mode when it is driven
high). Therefore the user must ensure that the relevant PIO pad output enable is turned off
depending on the master/slave status of the SSC.
It is up to the user to ensure that the PIO pads are configured correctly for direction and output
driver type (for example, push/pull or open drain).
Throughout the rest of this document, the data in and out ports is referred to as
SERIAL_DATA_OUT and SERIAL_DATA_IN, where this is assumed to be the correct pair of
pins dependent on the master or slave mode of the SSC.
Clock control
In master mode, the serial clock SCLK, is generated by the SSC according to the setting of the
phase bit PH and polarity bit PO in the control register SSCnCON.
The polarity bit PO defines the logic level the clock idles at, that is, when the SSC is in master
mode but is between transactions. A polarity bit of 1 indicates an idle level of logic 1; 0 indicates
idle of logic 0.
The phase bit PH indicates whether a pulse is generated in the first or second half of the cycle.
This is a pulse relative to the idle state of the clock line; so if the polarity is 0 then the pulse is
positive going; if the polarity is 1 then the pulse is negative going. A phase setting of 0 causes the
pulse to be in the second half of the cycle while a setting of 1 causes the pulse to occur in the first
half of the cycle.
The different combinations of polarity and phase are shown in Figure 250.
PO PH
0 0
0 1
1 0
Confidential
1 1
Pins
MTSR and MRST
Load Latch Shift Latch Shift Latch Unload Load Latch Shift Latch Shift Latch Unload
The SSC always latches incoming data in the middle of the clock period at the point shown in the
diagram. With the different combinations of polarity and phase it is possible to generate or not
generate a clock pulse before the first data bit is latched.
Shifting out of data occurs at the end of the clock period. At the start of the first clock period the
shift register is loaded. At the end of the last clock period, the shift register is unloaded into the
receive buffer.
f comms f comms
Baudrate = ------------------------------------- SSCBRG = -------------------------------------
2 × S SCGBR 2 × B audrate
where SSCBRG represents the content of the baudrate generator register, as an unsigned 16-bit
integer, and fcomms represents the comms clock frequency.
At a comms clock frequency of 60 MHz the baudrates generated are shown in Table 205.
Table 205: Baudrates and bit times for different SSCBRG reload values
The value in SSCnBRG is used to load a counter at the start of each clock cycle. The counter
counts down until it reaches 1 and then flips the clock to the opposite logic value. Consequently,
the clock produced is twice the SSCnBRG number of comms clock cycles.
In read mode the SSCnBRG register returns the current count value. This can be used to
determine how far into each half cycle the counter is.
Confidential
MSB LSB
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Shift direction
MSB LSB
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Shift direction
Data in
Data out
MSB first direction (HB = 1)
The shift register shifts at the end of each clock cycle. The clock pulse for shifting is presented to
Confidential
it from the clock generator (see Section 63.2.2: Clock generation on page 794). This is
regardless of the polarity or phase of the clock.
When a complete data frame has been shifted, the contents of the shift register (that is, all bits
shifted into the register) is loaded into the receive buffer.
There are some additional controls required on the shifting operation to allow full support of the
I2C bus standard. These are described in Section 63.3: I2C operation on page 801.
Transmit error
A transmit error can be generated both in master and slave mode. It indicates that a transfer has
been initiated by a remote master device before a new transmit data buffer value has been
written in to the SSC.
In other words, the error occurs when old transmit data is going to be transmitted. This could
cause data corruption in the half-duplex open drain configuration.
The error condition is indicated by the setting of the TE bit in the status register. An interrupt is
generated if the TEEN bit is set in the interrupt enables register.
The transmit error status bit (and the interrupt, if enabled) is cleared by the next write to the
transmit buffer.
Receive error
A receive error can be generated in both master and slave modes. It indicates that a new data
Confidential
frame has been completely received into the shift register and has been loaded into the receive
buffer before the existing receive buffer contents have been read out. Consequently, the receive
buffer has been overwritten with new data and the old data is lost.
The error condition is indicated by the setting of the RE bit in the status register SSCnSTAT. An
interrupt is generated if the REEN bit is set in the interrupt enables register.
The receive error status bit (and the interrupt, if enabled) is cleared by the next read from the
receive buffer.
Phase error
A phase error can be generated in master and slave modes. This indicates that the data received
at the incoming data pin (MRST in master mode or MTSR in slave mode) has changed during
the time from one sample before the latching clock edge and two samples after the edge.
The data at the incoming data pin is supposed to be stable around the time of the latching clock
edge, hence the error condition. Each sample occurs at the comms clock frequency. The
sampling scheme is shown in Figure 252.
Comms clock
Serial clock in
SERIAL_DATA_IN
Sampling points
The error condition is indicated by the setting of the PE bit in the status register. An interrupt is
generated if the PEEN bit is set in the interrupt enables register. The phase error status bit (and
the interrupt, if enabled) is cleared by the next read from the receive buffer.
Serial clock in
Clock
generator
Clock stretcher Serial clock out
Arbitration
Shift register
checker
Serial data in
Serial data out
Peripheral interface
Subsequently, an interrupt must be generated to inform the software that the SSC has been
addressed as a slave device and therefore that it needs to either send data to the addressing
master or to receive data from it.
In addition to normal 7-bit addressing, there is an extended 10-bit addressing mode where the
address is spread over two bytes. In this mode, the SSC must compare two consecutive bytes
with the incoming data after a START condition. It must also generate acknowledge bits for the
first and second bytes automatically if the address matches.
The 10-bit addressing mode is further complicated by the fact that if the slave has been
previously addressed for writing with the full two-byte address, the master can issue a repeated
START condition and then transmit just the first address byte for a read. The slave therefore
must remember that it has already been addressed and must respond.
● For the software interrupt handler to have time to service interrupts, the SSC can hold the
clock line low until the software releases it. This is called clock stretching.
● In master mode the SSC must begin a transmission by generating a START condition and
must end transmission by generating a STOP condition. In multi-master configurations a
START condition should not be generated if the bus is already busy; that is, a START
condition has already been received.
● When the SSC is receiving data from another device, it must generate acknowledge bits in
the ninth bit position. However, when receiving data as a master, the last byte received must
not be acknowledged. This only applies to data bytes; when operating as a slave device the
SSC should always acknowledge a matching address byte; that is, the first byte after a
START condition.
Confidential
To generate a START condition, the I2C START condition generate bit STRTG in register
SSCnI2C, must be set (see Section 63.3.6: START/STOP condition generation on page 806). To
generate a STOP condition, the I2C STOP condition generate bit STOPG, must be set (see
Section 63.3.6: START/STOP condition generation).
To generate acknowledge bits (that is, a low data bit), after each 8 bit data byte when receiving
data, the acknowledge generation bit ACKG in register SSCnI2C, must be set. When receiving
data as a master, this bit must be reset to 0 before the final data byte is received, thereby
signalling to the slave to stop transmitting (see Section 63.3.7: Acknowledge bit generation on
page 807).
To indicate to the software that various situations have arisen on the I2C bus, a number of status
bits are provided in the status register SSCnSTAT. In addition, some of these bits can generate
interrupts if corresponding bits are set in the interrupt enable register SSCnIEN.
To indicate that the SSC has been accessed as a slave device, the addressed as slave bit AAS
in register SSCnSTAT, is set. This also causes an interrupt if the AASEN bit is set in register
SSCnIEN.
The interrupt occurs after the SSC has generated the address acknowledge bit. In 10-bit
addressing mode, where two bytes of address are sent, the interrupt occurs after the second
byte acknowledge bit; it occurs after the first byte acknowledge where only one byte is required.
Until the status bit is reset, the SSC holds the clock line low (see Section 63.3.5: Clock stretching
on page 806). This forces the master device to wait until the software has processed the
interrupt.
Confidential
The status bit and the interrupt are reset by reading from the receive buffer SSCnRBUF, when
the slave is being sent data, and by writing to the transmit buffer SSCnTBUF, when the SSC
needs to send data.
To indicate that a STOP condition has been received, when in slave mode, the STOP condition
detected bit STOP is set. This also causes an interrupt if the STOPEN bit is set in the interrupt
enable register. The STOP interrupt and status bit is reset by a read of the status register
SSCnSTAT.
To indicate that the SSC has lost the arbitration process, when in a multi-master configuration,
the arbitration lost bit ARBL in register SSCnSTAT, is set. This also results in an interrupt if the
ARBLEN bit is set in the interrupt enable register. The interrupt occurs immediately after the
arbitration is lost.
Until the status bit is reset, the SSC holds the clock line low at the end of the current data frame,
(see Section 63.3.5: Clock stretching). This forces the winning master device to wait until the
software has processed the interrupt.
The interrupt and status bit is reset by a read of the status register SSCnSTAT.
To indicate that the I2C bus is busy (that is, between a START and a STOP condition), the I2C
bus busy bit BUSY in register SSCnSTAT is set. This does not generate an interrupt.
As the output drive is open-drain, the slower clock wins and the external clock line remains low
until this device has finished counting its slow clock pulse, or until the slave device is ready to
proceed. In the mean time, the quicker master device has detected a contradiction and goes into
a wait state until the clock signal goes high again.
Once the external clock signal goes high, all the master devices begin counting off their high
clock pulse. In this case the first master to finish counting attempts to pull the external clock line
low and wins (because of the open drain line). The other master devices detect this and abort
their high pulse count and switch to counting out their low clock pulse.
Consequently, the quicker master device determines the length of the high clock pulse and the
slowest master or slave device determines the length of the low clock pulse.
This results in a single synchronized clock signal which all master and slave devices then use to
clock their shift registers.
The synchronization and stretching mechanism is shown in Figure 254.
Master 1
Master 2
Confidential
Master 1
Resultant low period
clock
Master 2
high period Slave
stretch
Slave
stretched
The SSC implements this clock synchronization mechanism when the I2C control bit I2CM, is
enabled.
between the end of the START condition and the beginning of the data transmitted by a remote
master.
START and STOP conditions are detected by sampling the data line continuously when the clock
line is high. Minimum set up and hold times are measured by the counters.
The START condition is detected when data goes low (and the clock is high) and remains low for
the minimum time specified by the I2C standard.
The STOP condition is detected when data goes high (and the clock is high) and remains high
for the minimum time specified by the I2C standard.
START and STOP condition detection is enabled when the I2C control bit I2CM is set in the I2C
control register.
When a START condition is triggered, the SSC informs the I2C control block which then initiates
the address comparison phase.
When a STOP condition is triggered, the SSC sets the STOP bit in the status register. It also
generates an interrupt if the STOPDEN bit is set in the interrupt enable register.
The interrupt and the status bit are cleared when the status register is read.
prepare to retry after the next STOP condition. The clock stretch is not performed if the
master which has lost arbitration has not been addressed.
If a clock stretching event occurs but no relevant interrupt is enabled then the clock is stretched
indefinitely. Hence it is important that the correct interrupts are always enabled.
This situation only arises when two or more master devices generate a START condition within
the minimum hold time of the bus standard. This generates a valid start condition on the bus with
more than one master valid.
However, a master device cannot determine if two or more masters have generated a START
condition, so arbitration is always enabled. The arbitration for which device wins control of the
bus is determined by which master is the first to transmit a low data bit on the data line when the
other master wants to send a high bit. This master wins control of the bus. Therefore a master
which detects a different data bit on its input to that which it transmitted must switch off its output
stage for the rest of the eight bit data byte, as it has lost the arbitration.
The arbitration scheme does not affect the data transmitted by the winning master.
Consequently, arbitration proceeds concurrently with data transmission and the data received by
the selected slave during the arbitration process. It is valid that the winning master is actually
addressing the losing master and hence this device must respond as if it were a slave device.
Arbitration is implemented in hardware by comparing the transmitted and received data bits
every cycle. Loss of arbitration is indicated by the setting of the ARBL arbitration lost error flag in
the status register. An interrupt also occurs if the ARBLEN bit is set in the interrupt enables
register.
Loss of arbitration also causes a clock stretch to be inserted if the master which has lost
arbitration has been addressed. The interrupt and the clock stretch occurs immediately after the
eight bits plus acknowledge. The clock stretch is cleared when the software reads the receive
buffer.
SSC_REP_START_HOLD_TIME Programming repeated start hold time count value 0x020 R/W
SSC_REP_START_SETUP_TIME Programming repeated start setup time count value 0x028 R/W
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BRG
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TD[15:0]
Confidential
RD[15:0]
CLKST_RX_NOT_TX_EN
RX_FIFO_EN
Reserved
Reserved LPB EN MS SR PO PH HB BM
REPSTRT_EN
SSCRHFI_EN
NACK_EN
STOP_EN
ARBL_EN
Reserved
Reserved
Reserved
Reserved
AAS_EN
RE_EN
PE_EN
TE_EN
RI_EN
TI_EN
Address: SSCnBaseAddress + 0x010
Type: R/W
Reset: 0x00
Description: This register holds the interrupt enable bits, which can be used to mask the interrupts.
[15] Reserved
[14] SSCRHFI_EN: Receiver FIFO half full interrupt enable
1: Interrupt enabled
[13:12] Reserved
[11] REPSTRT_EN: I2C repeated start condition interrupt enable
1: Repeated condition interrupt enabled
[10] NACK_EN: I2C NACK condition interrupt enable
1: NACK condition interrupt enabled
[9] Reserved
Confidential
REPSTRT
Reserved
NACK
BUSY
STOP
ARBL
CLST
AAS
RIR
TIR
RE
PE
TE
Address: SSCnBaseAddress + 0x014
Type: RO
Reset: 0x02 (all active bits clear except TIR)
Description:
[15:12] Reserved
[11] REPSTRT: I2C repeated start flag
1: I2C repeated start condition detected
[10] NACK: I2C NACK flag
1: NACK received
[9] BUSY: I2C bus busy flag
1: I2C bus busy
[8] ARBL: I2C arbitration lost flag
1: Arbitration lost
Confidential
I2CFSMODE
REPSTRTG
Reserved
Reserved
STOPG
STRTG
TX_EN
ACKG
AD10
I2CM
Address: SSCnBaseAddress + 0x018
Type: R/W
Reset: 0x00
Description: To suit I2C specifications, bits PH and PO of register SSC_nCON must also be set to 1.
[15:13] Reserved
[12] I2CFSMODE: Configures standard or fast mode for I2C operation
0: Standard mode 1: Fast mode
[11] REPSTRTG: SSC I2C generate repeated START condition
0: Disabled 1: Enabled
[10:6] Reserved
[5] TX_EN: SSC I2C transaction enable control
0: Disabled 1: Enabled
[4] AD10: SSC I2C 10-bit addressing control
Confidential
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REP_START_HOLD_TIME
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
START_HOLD_TIME
[15:0] START_HOLD_TIME
time = clock_period * (value in register)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
REP_START_SETUP_TIME
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
DATA_SETUP_TIME
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STOP_SETUP_TIME
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
BUS_FREE_TIME
[15:0] BUS_FREE_TIME
time = clock_period * (value in register)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SSCTXF_STA
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SSCRXF_STA
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PRE_SCALER_BRG
Confidential
SSCSTOP_CLR
REPSTRT_CLR
SSCARBL_CLR
SSCAAS_CLR
NACK_CLR
Reserved
Reserved
Reserved
1: Clear SSC_STOP
[6] CLR_SSCAAS
1: Clear SSC_AAS
[5:0] Reserved
NOISE_SUPP_WID
Reserved PRESCALE_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved NSWD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PSDO
65 CSS/CPxM
● CSS decoding.
The content protection for recorded or prerecorded media (CPRM/CPPM) defines a robust and
renewable method for protecting content stored on a number of physical media types.
CPPM decoding and CPRM encoding can be used simultaneously. Encode and decode
processes may be carried out simultaneously for all process types (CPPM, CPRM and CSS);
however, only one device key set can be loaded at a time. This means that the key has to be
changed when switching between CPPM and CPRM.
Confidential
66.1 Overview
The DiSEqC (digital satellite equipment control) bus protocol provides nonproprietary commands
to enable communication between satellite receivers and satellite peripheral equipment via a
coaxial cable. The DiSEqC system supports the DiSEqC v2.0 standard, which is a single master,
multiple slave bidirectional system and uses a pulse width keying coded signal to perform
peripheral device functions such as controlling polarization skew, remotely selecting a LNB local
oscillator frequency, moving a steerable antenna to point in the required direction.
The pulse width and the bit interval are software-programmable, which makes the DiSEqC
interface highly flexible to support different pulse width keying coding protocols.
This block transmits and receives the DiSEqC 2.0 compatible frames.
The processor provides the framing (run-in), address, command and the ancillary data fields of
the message.
In the transmitter, the complete message including the framing, address, command and the
payload data bytes are coded using programmable PWK data, and transmitted using a
programmable subcarrier frequency. An interrupt is generated after the total message is
transmitted.
In the receiver the payload received is stored in a local FIFO which is accessible by the
Confidential
processor. An interrupt is generated when pre programmed conditions are met by the module.
The pulse width and symbol periods have to be programmed separately for the receive section.
Note: Subcarrier suppression for the receiver is carried out externally.
The DiSEqC block diagram is shown in Figure 255 below.
DISEQC_TX_DATA_OUT
DiSEqC transmitter
STBus
DISEQC_RX_DATA_IN
DiSEqC receiver
Master command
Slave reply
Each bit in a DiSEqC 2.0 message is represented using a pulse width keying coded signal. The
bits are modulated by a subcarrier (square wave) before transmission. The generation of the
framing byte and the parity enable or disable or selection of odd or even parity is software
programmable. The address, command and data bytes required to be transmitted in the payload
are also written by the processor.
A minimum programmed silence period is ensured by the transmitter between two consecutive
messages.
An interrupt is asserted after a complete message is transmitted and the programmed silence
period has expired.
and the remaining 2 bytes of the second message at the fourth location. This is shown in
Figure 257.
The data fed to the receiver is the envelope of the received data. The subcarrier is suppressed
external to the DiSEqC module.
The continuous tone and the tone burst (both modulated and unmodulated) occur at different
voltage levels and are suppressed from the received DiSEqC message external to the DiSEqC
module.
5. When the message length is greater than the FIFO depth and new data is written in the
DSQ_TX_DATA_BUFF before the last symbol is transmitted, the remaining bytes are
transmitted until the message is complete. After the last symbol is transmitted the TX_RDY
status bit is asserted high and the silence period prevails on the DiSEqC line.
6. If the transmitter is configured for a new message during the silence period it starts
transmitting the new message immediately after the expiry of the silence period if the
DSQ_TX_START bit is set.
7. If the transmitter is not configured for a new message during the silence period it will keep
the DiSEqC line idle.
8. If the transmitter is configured for transmitting a modulated or unmodulated tone burst
before the expiry of the silence period of the current message (bit 1 of register
DSQ_TX_MSG_CFG), if the DSQ_TX_START bit is set the transmission of the selected
tone burst is started immediately after the expiry of the silence period. The tone burst is
transmitted for the duration for which it is programmed (as specified in bits 9 to 15 of register
DSQ_TX_MSG_CFG).
(bits 0 to 7),
• symbol time: DSQ_TX_SYMBOL_PER (bits 0 to 7),
• silence period: DSQ_TX_SILENCE_PER (bits 0 to 15),
• symbol n on time: DSQ_TX_SYMBOLn_ONTIME (bits 0 to 7),
• type of message: DSQ_TX_MSG_CFG (bits 0 to 1 and 15),
• length of message: DSQ_TX_MSG_CFG (bits 2 to 8).
See Configuring the message to be transmitted on page 823 for further details.
2. Check if the TX_RDY bit in the DSQ_TX_STA register is 1. To start transmitting this bit
should be 1. If this bit is 0, then the software must wait until this bit is set to 1.
3. If set then clear the soft reset by writing 0 in the DSQ_TX_SW_RST register.
4. Load the DSQ_TX_DATA_BUFF with the data bytes.
5. If disabled, enable the interrupt generation from transmit section by writing into register
DSQ_TX_INT_EN.
6. Start transmission of the new message by writing 1 into the DSQ_TX_START register.
The transmission of the new message begins immediately after the silence period of the
current message has expired if the transmitter was executing the silence period of a
previous message. If idle the new message transmission starts immediately after the
execution of the TX_START bit.
Underrun errors
When the message length is greater than the FIFO depth an underrun condition is generated if
new data is not written in the DSQ_TX_DATA_BUFF before the last symbol is transmitted. For
an underrun condition the TX_UNDERRUN error bit in the DSQ_TX_STA register is set. Two
possible scenarios exist in which the TX_UNDERRUN status bit must be cleared.
If the underrun interrupt is enabled and an underrun interrupt is generated:
1. On detection of an interrupt, the processor reads the DSQ_TX_INT_STA to infer the
interrupt cause.
2. The processor disables the transmitter by writing 0 in the DSQ_TX_EN register.
3. The processor then clears the underrun interrupt by performing a clear bit operation on the
corresponding underrun clear bit on DSQ_TX_CLR_INT_STA location.
4. The processor then writes in the DSQ_TX_DATA_BUFF to clear the underrun status from
the DSQ_TX_STA register.
5. Execute a soft reset by writing a 1 in the DSQ_TX_SW_RST register to clear the
DSQ_TX_DATA_BUFF.
6. Return to step 1 in Transmitting the message on page 823.
If the underrun interrupt is not enabled, an underrun interrupt is not generated:
1. The processor reads the DSQ_TX_STA register (polls) to determine the state of the
DiSEqC cell to determine whether an underrun condition has occurred.
2. The processor disables the transmitter by writing 0 in the DSQ_TX_EN register.
Confidential
3. The processor then writes in DSQ_TX_DATA_BUFF to clear the underrun status from the
DSQ_TX_STA register.
4. Execute a soft reset by writing 1 in the DSQ_TX_SW_RST register to clear the
DSQ_TX_DATA_BUFF.
5. Return to step 1 in Transmitting the message on page 823.
3. If set then clear the soft reset by writing 0 in the DSQ_TX_SW_RST register.
4. If the DiSEqC interface is programmed for continuous tone transmission when it is already
in the middle of the silence period, the transmission of the continuous tone begins only after
the expiry of the current silence period and it does not require the programming of the
DSQ_TX_START register.
Define the minimum threshold duration needed to determine symbol n on time in the
received PWK coded message (for n = 0 and 1). The value is represented as multiples of
sampling clock periods.
For a sampling clock of 660 kHz, the register needs to be programmed with a value 265 to
achieve 0.4 µs minimum threshold time to detect a symbol n.
4. Maximum threshold symbol on time limits: DSQ_RX_SYMBOLn_MAX_THOLD[0:15]
Define the maximum threshold duration needed to determine symbol n on time in the
received PWK coded message (for n = 0 and 1). The value is represented as multiples of
sampling clock periods.
For a sampling clock of 660 kHz, the register needs to be programmed with a value 529 to
achieve 0.8 µs max threshold time to detect a symbol n.
5. If set, clear the soft reset by writing 0 in the DSQ_RX_SW_RST register.
6. Enable the receive section by writing 1 into register DSQ_RX_EN.
Receiving a message
Repeat the following for each message received:
1. Enable the interrupt generation by writing 1 into register DSQ_RX_INT_EN.
2. The receiver is enabled. The RX_BUSY status bit in register DSQ_RX_STA is set on the
reception of the first symbol of a message. This bit is cleared after the expiry of the silence
period of the message being currently received.
3. PWK decoding is performed on the received payload. Each byte of the received payload
including the frame byte is stored in DSQ_RX_DATA_BUFF.
4. The number of bytes received is calculated and reflected in register DSQ_RX_BYTE_CNT.
5. An interrupt is generated when the last data bit of the payload is received.
6. If the message length is greater than the FIFO depth, and the received data is not read from
DISEQC_RX_DATA_BUFF before the last bit is stored in the RX_BUFFER (RX_FULL), an
overflow condition is generated. At overflow, the Rx overflow error bit in register
DISEQC_RX_STA is set. Two possible scenarios exist in which the RX_OVERFLOW status
bit has to be cleared:
6.1 If the overflow interrupt is enabled, an overflow interrupt is generated on the
PER_INTERRUPT line:
(a) On detection of an interrupt the processor reads DISEQC_RX_INT_STA to infer
the interrupt cause.
(b) The processor disables the receiver by writing ‘0’ in the DISEQC_RX_EN register.
(c) The processor then clears the overflow interrupt by performing a clear bit operation
on the corresponding overflow clear bit on DISEQC_RX_CLR_INT_STA location.
(d) The processor then reads the contents of the DISEQC_RX_DATA_BUFF to clear
the overflow status from the DISEQC_RX_STA register.
(e) The processor can execute a soft reset to clear the DISEQC_RX_DATA_BUFF and
to clear the overflow status from the DISEQC_RX_STA register.
6.2 If the overflow interrupt is not enabled, an overflow interrupt is not generated on the
PER_INTERRUPT line:
(a) The processor reads the DISEQC_RX_STA register (polls) to determine the state
of the diseqc cell to determine whether an overflow condition has occurred.
(b) The processor disables the receiver by writing ‘0’ in the DISEQC_RX_EN register.
Confidential
(c) The processor reads from DISEQC_RX_DATA_BUFF to clear the overflow status
from the DISEQC_RX_STA register.
(d) The processor can either execute a soft reset to clear the
DISEQC_RX_DATA_BUFF and clear the overflow status from the
DISEQC_RX_STA register.
7. If the received message length is greater than the FIFO depth, and data is read from the
DISEQC_RX_DATA_BUFF before the last bit is written into the buffer, the receiver
continues receiving the remaining bytes until the message is complete. After the last symbol
is detected, the receiver asserts the Rx Busy status bit low, till a new message is received.
8. When the symbol On Time of either symbol 0 or symbol 1 does not fall within the
programmed min/max threshold limits specified in the registers
(DISEQC_RX_SYMBn_MIN_THRESH/ DISEQC_RX_SYMBn_MAX_THRESH where
n = 0, 1) the message is said to have a symbol error.
If at least one symbol in the received DiSEqC message violates the programmed threshold
limits, the symbol error status bit in the DISEQC_RX_STA register is set. If the symbol error
interrupt is enabled, a symbol error interrupt is generated on the PER_INTERRUPT line.
9. When the number of bits received in a DiSEqC message is not a multiple of eight, or the
inter-separation time between bits is not equal to the value programmed in the
DISEQC_RX_SYMB_PER register or the inter-separation time between individual bytes in
a diseqc frame is greater than or equal to the value programmed in the
DISEQC_RX_SYMB_PER register, the message is said to have a code error: the code
error status bit in the DISEQC_RX_STA register is set. If the code error interrupt is enabled,
a code error interrupt is generated on the PER_INTERRUPT line.
10. If the parity of the received symbols is even then the message is said to have a parity
error: the parity error status bit in the DISEQC_RX_STA register is set. If the parity error
interrupt is enabled, a parity error interrupt is generated on the PER_INTERRUPT line.
Overflow errors
When the message length is greater than the FIFO depth an overflow condition is generated if
Confidential
the received data is not read from the DSQ_RX_DATA_BUFF before the last bit is stored in the
RX buffer (RX_FULL). For an overflow condition the RX_OVERFLOW error bit in the
DSQ_RX_STA register is set. Two possible scenarios exist in which the RX_OVERFLOW status
bits must be cleared.
If the overflow interrupt is enabled, an overflow interrupt is generated:
1. On detection of an interrupt the processor reads the DSQ_RX_INT_STA to infer the
interrupt cause.
2. The processor disables the receiver by writing 0 in the DSQ_RX_EN register.
3. The processor then clears the overflow interrupt by performing a clear bit operation on the
corresponding overflow clear bit on DSQ_RX_CLR_INT_STA location.
4. The processor then reads the contents of the DSQ_RX_DATA_BUFF to clear the overflow
status from the DSQ_RX_STA register.
5. The processor can either execute a soft reset to clear the DSQ_RX_DATA_BUFF and clear
the overflow status from the DSQ_RX_STA register.
If the overflow interrupt is not enabled, an overflow interrupt is not generated:
1. The processor then reads (polls) the DSQ_RX_STA register to determine whether an
overflow condition has occurred.
2. The processor disables the receiver by writing 0 in register DSQ_RX_EN.
3. The processor then reads from the DSQ_RX_DATA_BUFF to clear the overflow status from
register DSQ_RX_STA.
4. The processor can either execute a soft reset to clear the DSQ_RX_DATA_BUFF and clear
the overflow status from register DSQ_RX_STA.
5. When the message length is greater than the FIFO depth and data is being read from the
DSQ_RX_DATA_BUFF before the last bit is written into the buffer, the remaining bytes are
received until the message is complete. After the last symbol is detected the receiver
asserts the RX_BUSY status bit low until no more new messages are received.
Symbol errors
When the symbol on time of either symbol 0 or symbol 1 does not fall within the minimum or
maximum threshold limits specified in DSQ_RX_SYMBOLn_MIN_THOLD or
DSQ_RX_SYMBOLn_MAX_THOLD the message has a symbol error.
If at least one symbol in the received DiSEqC message violates the programmed threshold
limits, the SYMBOL_ERR status bit in the DSQ_RX_STA register is set. If the SYMBOL_ERR
interrupt is enabled a symbol error interrupt is generated.
Code errors
A code error occurs for any of the conditions listed below.
● The number of bits received in the message is not a multiple of eight. Thus there are either
more or less bits per byte in the message.
● The time between bits or bytes in the received message is not equal to the value
programmed in the DSQ_RX_SYMBOL_PER register.
● The time between individual bytes in a DiSEqC frame is greater than or equal to the value
programmed in the DSQ_RX_SYMBOL_PER register.
Bit DSQ_RX_STA.CODE_ERR is set. If the CODE_ERR interrupt is enabled, a code error
interrupt is generated.
The entire message has a code error when one bit in the received DiSEqC message has a code
error.
Confidential
Parity errors
The message has a parity error when the parity of the received symbols is not odd. The
PARITY_ERR status bit in the DSQ_RX_STA register is set. If the PARITY_ERR interrupt is
enabled a parity error interrupt is generated.
If the division factor is varied from 3020 to 3024, the % variation in the subcarrier clock (22 kHz)
is documented in Table 207 for a system clock frequency of 133 MHz.
Table 207: Subcarrier frequency variation for a system clock of 133 MHz.
Since the allowed variation in subcarrier frequency is 20%, optimum division choices are shown
in shaded boxes in Table 207.
Confidential
67 DiSEqC registers
67.1 Transmitter
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_EN
Reserved
transmission.
[31:1] Reserved
[0] TX_EN
0: Disable transmitter
1: Enable transmitter
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TONE_BURST_TYPE
TONE_BURST_LEN
CONT_TONE_SEL
TX_MSG_CFG
TX_MSG_LEN
Reserved
message payload length of 127 bytes (1 header byte + 1 address byte + 1 command
byte + 124 data bytes).
Bits 9 to 15 specify the duration of the tone burst as an integer multiple of symbol
periods.
Bit 16 selects whether a continuous tone has to be sent. To transmit a continuous tone
a value of 1 is written at this location.
[31:17] Reserved
[16] CONT_TONE_SEL: Continuous tone select
0: No continuous tone 1: Continuous tone selected
[15:9] TONE_BURST_LEN: tone burst duration in integer multiple of Tx symbol period.
000 0001: Tone burst length is 1 symbol period 000 1001: Tone burst length is 9 symbol periods
111 1111: Tone burst length is 127 symbol periods 000 0000: Tone burst length is 128 symbol periods
[8:2] TX_MSG_LEN: total message length.
000 0011: Message length is 3 000 0100: Message length is 4
000 0101: Message length is 5 111 1111: Message length is 127
[1] TONE_BURST_TYPE
0: Unmodulated tone burst message 1: Modulated tone burst message
[0] TX_MSG_CFG
0: Normal message 1: Tone burst message
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PRESCALAR_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SUBCARR_VAL
Reset: 0
Description: The output of prescaler is fed to the subcarrier generation unit. The subcarrier of the
required frequency is generated by dividing the output of the prescaler by an
appropriate value. To divide the output of the prescaler by a value m the subcarrier
generation register is to be loaded with the value m. The time period of the subcarrier
thus generated is given by the following formula:
F (subcarrier ) = F (system clock frequency) / (2n x m)
Where:
• n is the value loaded into the DSQ_TX_PRESCALER, and
• m is the value loaded into DSQ_TX_SUBCARR_DIV.
Refer to Section 66.6.4: Subcarrier generation on page 829 for more details on
subcarrier generation.
For achieving a subcarrier with 50% duty cycle the output of the subcarrier generation
unit is divided by two. Hence if the desired subcarrier division ratio is n the value to be
programmed in DSQ_TX_SUBCARR_DIV register must be n/2.
A value of 0 ensures the prescaler output division by 65536.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved TX_SILENCE_PER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PAYLOAD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SYMBOL_PER
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SYMBOLn_ONTIME
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SW_RST
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
START_MSG
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_UNDRUN_ERR
TX_BUFF_EMPTY
TX_BUFF_HFULL
TX_BUFF_FULL
TX_SW_RST
TX_INT_EN
TX_RDY
Reserved
0: Disabled 1: Enabled
[2] TX_UNDRUN_ERR: Underrun error interrupt
0: Disabled 1: Enabled
[1] TX_SW_RST: Software reset
0: Disabled 1: Enabled
[0] TX_INT_EN: Global Tx interrupt
0: Disabled 1: Enabled
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_BUFF_EMPTY
TX_BUFF_HFULL
TX_BUFF_FULL
TX_SOFT_RST
TX_UNDRUN
TX_RDY
TX_INT
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_BUFF_EMPTY
TX_BUFF_HFULL
TX_UNDER_RUN
TX_BUFF_FULL
TX_INT_PEND
TX_FIFO_STA
TX_SW_RST
TX_RDY
Reserved
010: Two words empty in FIFO 011: Three words empty in FIFO
100: Four words empty in FIFO
The Tx FIFO status bits depict the true status of the DSQ_TX_DATA_BUFF.Hence the bits are cleared
based upon the status of the DSQ_TX_DATA_BUFF.
[6] TX_BUFF_FULL: Tx buffer is full
The Tx buffer full bit in the status register is set when the DSQ_TX_DATA_BUFF is full.This bit is cleared
when there is less than four words left into DSQ_TX_DATA_BUFF.
[5] TX_BUFF_HFULL: Tx buffer is at least half-full
The Tx buffer half full bit in the status register is set when there are at least two words in the
DSQ_TX_DATA_BUFF.This bit is cleared when there is at most one word left in DSQ_TX_DATA_BUFF.
[4] TX_BUFF_EMPTY: Tx buffer is empty. The Tx buffer empty bit in the status register is set at the
beginning of transmission of the last byte of the last word in the DSQ_TX_DATA_BUFF. This bit is
cleared when there is at least one word written into DSQ_TX_DATA_BUFF.
[3] TX_RDY: Transmitter is ready to send messages
The TX_RDY bit in the status register is set once the Tx is ready to send a new message.On reset this bit
is set to one. This bit is cleared immediately after the first symbol of the programmed message is
transmitted on the DiSEqC line.
The TX_RDY status indicates that the transmitter can be programmed for message transmission thus
allowing the flexibility of programming even during the silence period to allow transmission of back to
back messages.
[2] TX_UNDRUN: Tx buffer underrun has occurred
The TX_UNDERRUN bit in the status register is set once an underrun condition occurs. This bit is
cleared by writing data inside the DSQ_TX_DATA_BUFF or by executing a soft reset operation that is
writing 1 in the DSQ_TX_SW_RST register.
[1] TX_SW_RST: Transmitter has been soft reset
The TX_SOFT reset bit in the status register is set after the execution of the soft reset is complete.This
bit can be cleared by writing a 0 in the DSQ_TX_SW_RST bit 0.
[0] TX_INT_PEND: Tx interrupt is pending for acknowledgement
The Tx interrupt pending status is set if any interrupt is pending in the DSQ_TX_INT_STA register. This
bit is cleared when all the interrupt status bits in the DSQ_TX_INT_STA are cleared (serviced).
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_BUFF_EMPTY_CLR
TX_BUFF_HFULL_CLR
TX_BUFF_FULL_CLR
TX_URUN_ERR_CLR
TX_SW_RST_CLR
TX_RDY_CLR
Reserved
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
UMTBST
MTBST
NMSG
CT
Reserved
67.2 Receiver
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX_EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RX_SAMPLING_PER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RX_BYTE_CNT
Reset: 0
Description: Specifies the number of bytes received in the DiSEqC message. This is an 8-bit register
so the maximum length of the received message supported is 256. When a message
consisting of n bytes is received the register holds a value n.The byte count includes the
framing byte also.
[31:8] Reserved
[7:0] RX_BYTE_CNT: Specifies the length of the received payload
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RX_SILENCE_PER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX_PAYLOAD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MIN_SYMBn_TIME
periods.
For a sampling clock of 660 kHz, the register needs to be programmed with a value 265
to achieve 0.4 µs min threshold time to detect a symbol n.
[31:8] Reserved
[7:0] MIN_SYMBn_TIME: Minimum threshold time for symbol n, where n = 0 or 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved MAX_SYMBn_TIME
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SW_RST
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LAST_BYTE_REC
RX_BUFF_HFULL
RX_BUFF_FULL
SYMBOL_ERR
RX_OVF_ERR
PARITY_ERR
CODE_ERR
RX_INT_EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LAST_BYTE_RECEIVED
RX_BUFF_HFULL
RX_BUFF_FULL
SYMBOL_ERR
PARITY_ERR
CODE_ERR
RX_OVF
RX_INT
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LAST_BYTE_RECEIVED
RX_BUFF_HFULL
RX_BUFF_FULL
RX_FIFIO_STA
RX_INT_PEND
SYMBOL_ERR
PARITY_ERR
CODE_ERR
RX_BUSY
RX_OVF
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX_BUFF_HFULL_CLR
LAST_BYTE_RX_CLR
RX_BUFF_FULL_CLR
PARITY_ERR_CLR
CODE_ERR_CLR
SYMB_ERR_CLR
RX_OVF_CLR
Reserved
Reserved
Address: DiSEqCBaseAddress + 0x0B4
Type: WO
Confidential
Reset: 0
Description: The bits in the DSQ_RX_INT_STA register can be cleared by performing a clear bit
operation at appropriate locations.To clear a corresponding interrupt a clear bit
operation has to be performed at the corresponding bit location.
Clearing the interrupt through DSQ_RX_CLR_INT_STA (clear interrupt status location)
only clears the corresponding interrupt status bit in the DSQ_RX_INT_STA register.
The bits in the DSQ_RX_STA register are cleared only when the device condition
causing the interrupt is removed.
[31:8] Reserved
[7] SYMB_ERR_CLR: Symbol error interrupt clear
[6] PARITY_ERR_CLR: Parity error interrupt clear
[5] CODE_ERR_CLR: Code error interrupt clear
[4] LAST_BYTE_RX_CLR: Last byte received interrupt clear
[3] RX_BUFF_FULL_CLR: Rx buffer full interrupt clear
[2] RX_BUFF_HFULL_CLR: Rx buffer half full interrupt clear
[1] RX_OVF_CLR: Rx overflow interrupt error clear
[0] Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved TIME_OUT_PER
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved NOISE_SUPP_WID
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
POL_INV
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUBCARR_SUPP_EN
Reserved
Command summary
Confidential
Figure 258 shows the modes of operation used by the HDCP Cipher hardware when carrying out
authentication commands.
idle
hdcp_auth_cmd AND! authenticated
GEN_KS AND
!authenticated
GEN_AN AND
!authenticated
GEN_KM AND
!authenticated
error
assert_int
interrupt cleared
68.1.2.1 O_ENC_EN
This signal is asserted by HDCP when it is authenticated, the ENC_EN register is set, and the
AV_MUTE register is not set.
68.1.2.2 O_RX_PIXEL_CAPTURE
Ri is updated every 128th frame, starting with the 128th frame, unless specified otherwise by the
I_RATE register. Frames are counted as those for which encryption is enabled, unless in
advance cipher mode (indicated by the assertion of bit HDCP_CTRL.AC_MODE) when all
frames are counted. The O_RX_PIXEL_CAPTURE output is asserted for one frame when the
value of Ri has been updated (this occurs 108 TMDS cycles after the rising edge of V_SYNC,
and remains asserted until the end of the frame). This allows the HDMI to update its value of Ri
as indicated by HDCP Specification Rev 1.1, Digital Content Protection LLC, section Enhanced
Ri Computation Mode.
The algorithm for encrypting the device private keys is delivered separately. Note that the IV
value seeds both encryption and decryption algorithms, and is a random constant for a
given device-key set.
3. Load device keys
Write in the 56-bit IV value in order to seed the decryption of the device keys. Write in the 40
56-bit device keys into the block at the appropriate addresses.
Note: 1 The order of loading must be observed if correct decryption of these keys is to occur: they must
be loaded in starting at key 0, low word then high word, up to key 39.
4. Generate the shared secret value
Calculate Km value from previously loaded device keys. This is done by firstly loading the
Ksv value into the appropriate register and then issuing hdcp_cmd 0x02 and awaiting the
interrupt to indicate completion.
5. Generate a session key
Calculate Ks (and M and R) values by issuing hdcp_cmd 0x03/0x83 (depending on whether
the receiver is a repeater) and awaiting the interrupt to indicate completion.
At this point the software must set bit HDCP_CTRL.AUTHENTICATED. This initiates the
generation of the first frame key. The block is now ready to start output of encryption keys, and
will generate new_Line and frame keys according to the control signals from the HDMI.
By default, R is updated every 128 frames. If a more frequent update is required, software should
set the required update time in HDCP_I_RATE register at a safe juncture (for example upon
re-authentication).
If at any time software wishes to temporarily disable encryption, it may do so (starting with the
next frame) by disabling the ENC_EN register (or AV_MUTE if in EESS mode).
If at any time software wishes to de-authenticate abruptly (for example on loss of sync on the
HDMI interface), or restart a failed authentication mid-way through, then it must unset bit
HDCP_CTRL.AUTHENTICATED, and then restart the authentication process.
idle
instruct HDCP to
generate An, then
read back value
FrameKeyCalc
(hdcpBlockCipher)
vda dia
vda
VideoEncrypt DataEncrypt
(hdcpStreamCipher) (hdcpStreamCipher)
dia1
v_sync
!vda !dia dia
vda
h_sync
v_sync
(enc_enable OR AC_MODE)
v_sync AND !AV_MUTE !enc_enable
OR av_mute2
H_blank V_blank
(complete ReKey, wait) (wait)
v_sync
v_sync
AV_MUTE OR
(!AC_MODE AND !enc_enable)
EncDisSync
authenticated (wait)
AND v_sync
!authenticated
idle
vda = video_data_active
1. After vda has been deasserted, dia must not be asserted
for at least 57 clock cycles. dia must always be false during OESS. dia = data_island_active
2. When operating in OESS, av_mute must not be set
69 HDCP registers
7 6 5 4 3 2 1 0
Reserved AUTH_CMD
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AN_DEBUG_SET
AUTHORISED
AC_MODE
AV_MUTE
Reserved
ENC_EN
Confidential
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
I_RATE_MULTIPLIER
Reserved
HDCP_STA Status
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AUTH_CMD_DONE
AUTH_CMD_ERR
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IV_0 IV[31:0]
IV_1 Reserved IV[55:32]
KSV_0 KSV[31:0]
KSV_1 Reserved KSV[39:32]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AN_0 AN[31:0]
AN_1 AN[63:32]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
KS_0 KS[31:0]
KS_1 Reserved KS[55:32]
HDCP_MI Mi
Address: HDCPBaseAddress + 0x0028 (MI_0); + 0x002C (MI_1)
Type: RO
Reset: 0
Description:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MI_0 MI[31:0]
MI_1 MI[64:32]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved RI
70 Infrared transmitter/receiver
70.1 Overview
The infrared (IR) transmitter/receiver is an ST40 peripheral. For each symbol transmitted, the
software driver determines the symbol period and the symbol on time of the IR pulse, and
transfers these parameters into a eight-word deep FIFO. The IR transmitter/receiver then
generates coded symbols using an internally generated subcarrier clock.
The parameters symbol period and symbol on time are illustrated in Figure 261.
The incoming signal must be detected, and the subcarrier must be suppressed, externally. Only
the symbol envelope can be used by the IR and UHF processors. It is sampled at 10 MHz and
the sample values are transferred into the input buffer in microseconds.
Symbol on time
Symbol period
Confidential
Figure 262 shows the complete system, and Figure 263, the receiver subsystem.
PIO3[6]
RC receive
IR data in Demod and
code processor
carrier suppress Input
PIO3[3] signal
IR processor
IR module
UHF/IR_WAKEUP
POLINV_REG
Noise
Mux
Polarity SCD_UHF/IR_OUT
inversion suppression
SCD
logic filter
(UHF only) SCD_DETECTED
Retime
UHF/IR_DATA_IN
SYMBOL_TIME_OUT
Symbol time
count logic
The transmit interrupt is cleared automatically when new data is written to registers
IRB_TX_SYMB_PER and IRB_TX_ON_TIME. Register bits IRB_TX_INT_STA[4:1] give the
FIFO’s fullness status.
The frequency of the subcarrier is set by programming registers IRB_TX_PRESCALER and
IRB_TX_SUBCARR.
The symbol period, in subcarrier cycles, is programmed in register IRB_TX_SYMB_PER and the
on time of the IR pulse is written to register IRB_TX_ON_TIME. These two registers are eight-
word FIFOs. They must be programmed sequentially as a pair to increment the write pointer and
be ready for the next data. Transmission is enabled by setting bit IRB_TX_EN.TX_EN to 1. If
new data is not written before the last symbol in the buffer is transmitted, no RC codes are
generated. The output is driven to logic 0 and bit IRB_TX_INT_STA.UNDERRUN is set.
Confidential
Before data can be transmitted, the underrun condition must be cleared as follows:
1. Disable the transmission by writing 0 to register IRB_TX_IR_EN.
2. Load at least one block of data into IRB_TX_SYMB_PER_IR and IRB_TX_ON_TIME_IR.
3. Clear the TX_UNDERRUN status bit by writing 1 to register
IRB_TX_CLR_UNDERRUN_IR.
Transmission is resumed by writing 1 to register IRB_TX_IR_EN.
The interrupt is cleared when registers IRB_RX_SYMB_PER and IRB_RX_ON_TIME have been
read. They must be read consecutively, as a pair, to increment the FIFO read pointer. Bits 4 and
5 of register IRB_RX_INT_STA give the fullness level of the FIFO.
If the FIFO is full and has not been read before the arrival of new data, then this data is lost and
a receive overrun flag is set in the status register IRB_RX_INT_STA. No new data is written to
the FIFO while this condition exists.
suppressed.
The noise suppression filter can be disabled by writing 0x00 to register
IRB_RX_NOISE_SUPP_WIDTH_UHF.
Signalling Tolerance
rate (kb/s) % of rate (+/-) Min Nom Max
9.6 0.87 1.41 19.53 22.13
19.2 0.87 1.41 9.77 11.07
38.4 0.87 1.41 4.88 5.96
57.6 0.87 1.41 3.26 4.34
115.2 0.87 1.41 1.63 2.23
12 11 10 9 8 7 6 5 4 3 2 1 0
500 µs
1 ms 2 ms 1 ms 2 ms
Here, the nominal symbol duration is 500 µs and there are 13 symbols (denoted as 12 to 0).
Since the data is shifted through the shift register, the data bit first received is the MSB.
1. Since the SCD operates on a 100 MHz clock, program the prescaler to 100 (0x64).
The sampling clock is 1 MHz, and sampling resolution is 1µs.
2. Program 450 (µs) in register IRB_SCD_SYMB_MIN_TIME, 500 (µs) in
IRB_SCD_SYMB_NOM_TIME and 550 (µs) in IRB_SCD_SYMB_MAX_TIME.
3. Program IRB_SCD_CODE with 0b1 0011 1100 1111 and IRB_SCD_CODE_LEN with 13
(ox0E) corresponding to 13 symbols to be detected.
4. Start the start code detection by setting the enable and re-search bits in IRB_SCD_CFG
to 1.
The start code detectors checks for the minimum symbol time of each register and the sequence
in which symbols are received. If the symbol time is not respected by the input UHF (if noisy) the
start code detection is re-initialized.
● If there is only one start code to be detected, the registers for normal and alternate start
Confidential
Noise recovery
IRB_SCD_NOISE_RECOV is provided to overcome possible issues in detecting a valid start
code in cases where noise preceding the start code has the same logic level as that of a start
code LSB; in such cases the SCD logic may fail to detect a valid start if this register is not
enabled. For example, considering the start code of Figure 264 (0b1 0011 1100 1111) noise at
logic level 1 must be ignored.
Example: Start code is 13-bit, 0b1 0011 1100 1111:
IRB_SCD_NOISE_RECOV
.EN = 1 - noise recovery feature is enabled.
.LOGIC_LEV = 1 - the logical value of first symbol in start code is 1.
.NCSSLV = 00001 as there is change in logic value after first symbol of the start code.
This section describes the RC transmitter and receiver registers, the RC and UHF receiver and
control registers and the noise suppression registers of the IR transmitter/receiver. Although the
IR RC receiver and UHF RC receiver registers are held at different addresses, their register
descriptions are identical and are only given once for each pair of registers. Registers are
suffixed with _IR and _UHF as appropriate.
Register addresses are provided as IRBBaseAddress + offset.
The IRBBaseAddress is:
0x1801 8000.
Offset
Register Description Type
IR UHF
RC transmitter
RC receiver
Noise suppression
I/O control
Offset
Register Description Type
IR UHF
Reverse polarity
IrDA Interface
7 6 5 4 3 2 1 0
PRESCALE_VAL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUBCARR_VAL
Reset: 0
Description: Determines the RC transmit subcarrier frequency. The prescaled clock frequency
divided by (SUBCARR_VAL x 2) gives the subcarrier frequency, which has a 50% duty
cycle.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_SYMB_TIME_VAL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
TX_ON_TIME_VAL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HALF_EMPTY
UNDERRUN
INT_EN
EMPTY
1WD
Reserved
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HALF_EMPTY
UNDERRUN
INT_PEND
EMPTY
1WD
Reserved
7 6 5 4 3 2 1 0
Reserved TX_EN
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HALF_EMPTY
UNDERRUN
Reserved
EMPTY
1WD
Reserved
Reset: 0
Description:
[15:5] Reserved
[4] 1WD
1: Clear interrupt: at least one word empty in FIFO
[3] HALF_EMPTY
1: Clear interrupt: FIFO half-empty
[2] EMPTY
1: Clear interrupt: FIFO empty
[1] UNDERRUN
1: Clear interrupt: underrun
[0] Reserved
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SUBCARR_WID_VAL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
HALF_EMPTY
UNDERRUN
Reserved
EMPTY
1WD
Reserved TX_FIFO_LEVEL Reserved
[7:5] Reserved
[4] 1WD
1: At least one word empty in FIFO
[3] HALF_EMPTY
1: FIFO half empty
[2] EMPTY
1: FIFO empty
[1] UNDERRUN
1: FIFO underrun
[0] Reserved
Clearing an interrupt does not clear the corresponding status flag. The status reflects
the true transmit status.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX_ONTIME_VAL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Confidential
RX_SYMB_TIME_VAL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LAST_SYMB_INT_EN
ATLEAST_1WD
HALF_FULL
OVERRUN
INT_EN
FULL
Reserved
[2] OVERRUN
1: Enable interrupt on overrun
[1] LAST_SYMB_INT_EN
1: Enable interrupt on last symbol receive
[0] INT_EN
1: Enable global receive interrupt
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LAST_SYMB_INT
ATLEAST_1WD
HALF_FULL
OVERRUN
FULL
INT
Reserved
7 6 5 4 3 2 1 0
Reserved RX_EN
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RX_MAX_SYMB_TIME
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
LAST_SYMB_INT_EN
ATLEAST_1WD
HALF_FULL
OVERRUN
INT_EN
FULL
Reserved
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NOISE_SUPP_WID
7 6 5 4 3 2 1 0
Reserved IO_SEL
7 6 5 4 3 2 1 0
Reserved POLARITY
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
AT_LEAST_1WD
LAST_SYMB
HALF_FULL
OVERRUN
Reserved
FULL
Reserved RX_FIFO_LEVEL Reserved
[7:6] Reserved
[5] AT_LEAST_1WD: At least one word
1: Clear interrupt: at least one word in FIFO
[4] HALF_FULL
1: Clear interrupt: FIFO half full
[3] FULL
1: Clear interrupt FIFO full
[2] OVERRUN
1: Clear interrupt: FIFO overrun
[1] LAST_SYMB: Last symbol
1: Clear interrupt: last symbol receive
[0] Reserved
Note: Clearing the interrupt does not clear the status. To clear the status, appropriate actions
(such as reading the data from the FIFO) have to be performed.
7 6 5 4 3 2 1 0
Reserved N
7 6 5 4 3 2 1 0
Reserved CLK_SEL
7 6 5 4 3 2 1 0
Reserved CLK_STA
Confidential
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ASCBAUD
7 6 5 4 3 2 1 0
Reserved BRG_EN
7 6 5 4 3 2 1 0
Reserved IRTX_EN
7 6 5 4 3 2 1 0
Reserved IRRX_EN
7 6 5 4 3 2 1 0
Reserved ASC_CTRL
7 6 5 4 3 2 1 0
Reserved P_STA
7 6 5 4 3 2 1 0
Reserved N
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
71.8 SCD
7 6 5 4 3 2 1 0
Type: R/W
Reset: 0
Description:
[7:4] Reserved
[3] RST_SFT
Reset shift register only. SCD_STA is not affected.
[2] SW_RST
Reset all counters and shift register.
[1] RE_SEARCH
1: Start a new search
Asserting RE_SEARCH while start code detection is in progress has no effect. The purpose of this bit is
to provide software a capability to force a restart when SCD has already detected a start code and
symbol-time-out does not occur.
[0] EN
0: Bypass SCD, UHF sent to UHF_OUT
1: Enable start code detection
7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CODE
Type: R/W
Reset: 0
Description:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MIN _TIME
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
MAX_SYMB_TIME
Reset: 0
Description: Maximum time of a symbol. Any changes in the input data are allowed only between
symbol minimum time and symbol maximum time. The symbol time counting is done by
a clock (enable pulse) output from the pre-scaler. If the maximum time of the symbol is n
pre-scaler clock periods, the SCD_SYMB_MAX_TIME register should be programmed
with a value of (n-1). For example, if a value 0xF is written into this register, the symbol
maximum time is 16 pre-scaler clock periods.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
NOM_TIME
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PRE_SCALAR
7 6 5 4 3 2 1 0
Reserved SCD_INT_EN
7 6 5 4 3 2 1 0
Reserved SCD_INT_CLR
Address: IRBBaseAddress + 0x
Type: WO
Reset: 0
Description: Clear SCD-detected interrupt. This register clears the interrupt only when the SCD is
functioning on the interconnect clock.
1: Clear interrupt
7 6 5 4 3 2 1 0
Reserved SCD_INT_STA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ALT_LOGIC_LEV
ALT_NCSSLV
LOGIC_LEV
NCSSLV
Reserved
Reserved
Reserved
Reserved
ALT_EN
EN
Address: IRBBaseAddress + 0x228
Type: R/W
Reset: 0
Description:
[31:29] Reserved
[28:24] ALT_NCSSLV: Number of contiguous symbols at same logical value as first symbol, for alternate code
0x00: Noise recovery disabled
0x01
0x02
...
0x1E
0x1F
[23:18] Reserved
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ALT_CODE
72.1 Overview
The modem analog front end interface (MAFE) is an integrated interface to an analog front end
(AFE) for a modem such as the STLC7550.
In this chapter, the term sample is a 16-bit data object that is transferred to or from the modem
through the MAFE, and the term sample period is the time from the start of one sample to the
start of the next.
The MAFE simultaneously transmits samples into and out of the AFE. It typically operates at a
rate of 9600 samples/second, giving a typical sample period of 100 µs. That is, every 100 µs, one
sample is transmitted and another received through the MAFE.
The MAFE receives its system clock signal (SCLK) from the AFE. The SCLK frequency is
typically 256 ticks/sample period, or 2.56 MHz. The first 16 ticks of the 256 tick sample period
are used to exchange a 16-bit sample pair (1 bit per tick).
The MAFE uses one DMA to transfer samples from a transmit memory buffer to the AFE, and
simultaneously uses a second DMA to receive samples from the AFE and write them into the
receive memory buffer. The software driver is woken up every time a simultaneous transfer is
completed, that is, every time a transmit memory buffer has been emptied and a receive memory
buffer has been filled. For example, if each memory buffer contains 100 samples, the software is
woken up every 10 ms (100 x 100 µs). This is more stringent for handshake signals, where the
Confidential
Function name
Name Type Function description
(alternate)
PIO2[3] O MAFE_HC1 Indicates to the AFE that a control/status exchange is to take
place.
PIO2[4] O MAFE_DOUT Line for serially transmitting samples to the AFE.
PIO2[5] I MAFE_DIN Line for serially receiving samples from the AFE.
PIO2[6] I MAFE_FS Signal from the AFE indicating the start of a sampling period.
This is latched on falling edges of SCLK. For normal operation
it should not remain high for more than 16 SCLK cycles, and
there should be at least 20 SCLK ticks between consecutive
rising edges of FS.
PIO2[7] I MAFE_SCLK Modem system clock. The frequency should be less than half
of the device system clock.
72.3 Software
The MAFE software manages the data exchange between the software modem and MAFE, and
handles the control/status exchange.
9. confirms that there have been no memory latency problems during the exchange of the
previous buffer, by reading the status (missed) bit,
10. if there are no problems, the software writes to the MOD_ACK register and deschedules.
MOD_CTRL_1 Control 1
7 6 5 4 3 2 1 0
MOD_STA Status 1
7 6 5 4 3 2 1 0
[1] COMPLETE
Set to 1 when a buffer load of samples has been exchanged. Cleared by writing to MOD_ACK register.
[0] IDLE
0: The MAFE interface is exchanging data with the AFE.
1: The RUN bit is low and the MAFE interface is not exchanging data. After the software clears the RUN
bit, the MAFE interface only goes idle when it has finished exchanging the current buffer load of samples.
7 6 5 4 3 2 1 0
MOD_ACK Acknowledge
7 6 5 4 3 2 1 0
ACK
7 6 5 4 3 2 1 0
SIZE Reserved
MOD_CTRL_2 Control 2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CTRL_VAL
MOD_STA Status 2
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
STATUS
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADDR Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADDR Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADDR Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
ADDR Reserved
See Silicon Laboratories Inc. document 32.4 MHz Differential-Link Interface DAA - Embedded
System-Side DAA Module Specification.
Confidential
● ICAM 2.1,
● FAST-I,
● DES ECB, DES ECB DVS 042, DES CBC, DES CBC DVS 042, DES OFB, DES CTS,
● Multi-2 ECB, Multi-2 ECB DVS 042, Multi-2 CBC, Multi-2 CBC DVS 042, Multi-2 OFB, Multi-2
CTS,
● AES ECB, AES ECB DVS 042, AES CBC, AES CBC DVS 042, AES OFB, AES CTS, AES
DTV.
Confidential
The STx7100 includes an independent PWM-timer module with two identical channels, each
containing one programmable timer.
The module includes the following functions:
● generates very low PWM frequencies (typically 1 to 8 kHz for a 100 MHz master clock),
● enables generation of an interrupt on a periodic basis with little software intervention, with a
wide periodic range - from a few microseconds to over 100 ms.
There are two completely independent counters with associated prescalers and duty cycle
control, each usable either to generate an interrupt or generate a PWM waveform (or both if
desired - interrupt and PWM periods are identical).
The PWM capture (decoder) inputs are PWM_CAPTUREIN0 and PWM_CAPTUREIN1. The
encoder outputs are PWM_OUT0, PWM_OUT1, PWM_COMPAREOUT0 and
PWM_COMPAREOUT1 (see Section 8.2: Alternative functions on page 78); the interrupt
requests (routed to the ILC) are all made through a single signal, PWM_INT. Register
PWM_INT_STA indicates which event which caused the interrupt. The module is clocked by two
independent clocks, one for capture inputs/timers and one for PWM outputs.
Each capture input can be programmed to detect rising-edge, falling-edge, both edges or neither
edge (disabled) by means of register PWMn_CPT_EDGE.
Confidential
System clock
Prescaled clock
PWM_OUTn
PWM_INT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PWM0_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PWM1_VAL
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CPT_VAL
Address: PWMTimerBaseAddress + 0x
Type: RO
Reset:
Description: Value of capture counter 0 when a capture event occurs.
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CPT_VAL
Address: PWMTimerBaseAddress + 0x
Type: RO
Reset:
Description: Value of capture counter 1 when a capture event occurs.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP_VAL
Address: PWMTimerBaseAddress + 0x
Type: R/W
Reset:
Description: When the values of PWM0_CPT_VAL and this register are equal, an interrupt is
triggered.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP_VAL
Address: PWMTimerBaseAddress + 0x
Type: R/W
Reset:
Description: When the values of PWM1_CPT_VAL and this register are equal, an interrupt is
triggered.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CE
Address: PWMTimerBaseAddress + 0x
Type: R/W
Reset:
Description: Controls the edge used for the capture of the timer in register PWM0_CPT_VAL.
00: Disabled
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CE
Address: PWMTimerBaseAddress + 0x
Type: R/W
Reset:
Description: Controls the edge used for the capture of the timer in register PWM1_CPT_VAL.
00: Disabled
01: Rising edge
10: Falling edge
11: Rising or falling edge
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CO
Address: PWMTimerBaseAddress + 0x
Type: R/W
Reset:
Description: On the next compare event, this value is output on the COMPAREOUT0 signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved CO
Address: PWMTimerBaseAddress + 0x
Type: R/W
Reset:
Description: On the next compare event, this value is output on the COMPAREOUT1 signal.
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
PWM_CLK_VAL[7:4]
PWM_CLK_VAL[3:0]
CPT_CLK_VAL
PWM_EN
CPT_EN
Reserved
Reset:
Description:
[31:15] Reserved
[14:11] PWM_CLK_VAL[7:4]
High order bits of the parameter that defines the period of the local prescaled clock for the PWM-timer.
The local clock enable signal is generated upon the prescale counter reaching PWM_CLK_VAL[7:0]. See
[10] CPT_EN
0: Disable capture
1: Enable capture
[9] PWM_EN
0: Prescale counter is cleared and PWM counter is stopped
1: Prescale counter and PWM counter are enabled
[8:4] CPT_CLK_VAL: Capture counter clock prescale value
[3:0] PWM_CLK_VAL[3:0]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP1_INT_EN
CMP0_INT_EN
CPT1_INT_EN
CPT0_INT_EN
Reserved
EN
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP1_INT
CMP0_INT
CPT1_INT
CPT0_INT
PWM_INT
Reserved
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CMP1_INT
CMP0_INT
CPT1_INT
CPT0_INT
PWM_INT
Reserved
Reserved
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved PWM_CNT
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CPT_CMP_CNT
Address: PWMTimerBaseAddress + 0x
Type: R/W
Reset:
Description: Counter used in capture and compare mode. Unlike the PWM counter, this can be
accessed when the counter is enabled.
78.1 Glossary
ATA AT attachment
SATA Serial ATA interface
ATAPI AT attachment packet interface
FIS Frame information structure
DWORD SATA work size, 32 bits
AHB Advanced high performance bus
DMA Direct memory access
PHY SATA physical layer
LL Logical link layer
TL Transport layer
BIU Bus interface unit
IPF Interrupt pending flag
ICM Interconnect matrix
Confidential
78.2 References
The SATA interface is based on a host controller block from Synopsys, Inc. For full details, see
the following Synopsys documents:
● DesignWare SATA Host Core Databook
The interface is compliant with the serial ATA specifications for SATA II. See:
● Serial ATA II: Extensions to serial ATA 1.0a specification,
78.3 Overview
Figure 266: SATA host block diagram
To hard
drive
DMA RXN
PLL
STBus 1.5 GHz
30 MHz to USB
The STx7100 integrates a single serial ATA (SATA) host and PHY for a glueless interface to a
Confidential
SATA hard disk drive for DVR applications. The SATA host interface features:
● integrated PHY, configured to perform 8 - 10 bit encode/decode, with 16-bit decoded data
interfaces to the SATA controller,
● 1.5 GHz PLL,
bulk data transfers between the SATA host and the external DDR memory. The data transfer
sequence is listed below.
1. The SATA host initializes and enables the DMA controller for a given transfer.
2. The SATA host issues a bulk transfer command to the DMA controller.
3. The command is executed and SATA host is notified that data is ready to be sent or
received.
4. 4. During a read operation, data is read from the external HDD and written to the external
DDR memory via the host controller.
5. 5. During a write operation, a DMA activate or a DMA setup, the SATA host sends data to
the external HDD.
6. During such a transfer the host controller is in a BUSY state
7. The host controller returns to IDLE when all of the data block has been transmitted or
received.
DSTATAR0
CFG0_MSB Channel 0 configuration 0x444 0x0000 0004 R/W
CFG0_LSB Channel 0 configuration 0x440 0x0000 0C00
SGR0 Reserved - - -
DSR0
Interrupt
RAW_TFR Raw status for INTTFR interrupt 0x6C0 0x0000 0000 RO
RAW_BLOCK Raw status for INTBLOCK interrupt 0x6C8
RAW_SRC_TRAN Raw status for INTSRCTRAN interrupt 0x6D0
RAW_DST_TRAN Raw status for INTDSTTRAN interrupt 0x6D8
RAW_ERR Raw status for INTERR interrupt 0x6E0
TFR_STA Status for INTTFR 0x6E8
BLOCK_STA Status for INTBLOCK interrupt 0x6f0
SRC_TRAN_STA Status for INTSRCTRAN interrupt 0x6F8
DST_TRAN_STA Status for INTDSTTRAN interrupt 0x700
ERR_STA Status for INTERR interrupt 0x708
MASK_TFR Mask for INTTFR interrupt 0x710 0x0000 0000 R/W
MASK_BLK Mask for INTBLOCK interrupt 0x718
MASK_SRC_TRAN Mask for INTSRCTRAN interrupt 0x720
MASK_DST_TRAN Mask for INTDSTTRAN interrupt 0x728
MASK_ERR Mask for INTERR interrupt 0x730
Width
Register Offset Description Default Type
(bits)
Shadow ATA/ATAPI: CDR - command block, CLR - control block
CDR0 0x800 PIO mode: data 0xXXXX 16 RO/WO
Read only for PIO read/receive operation,
write only for PIO write/transmit operation.
DMA mode: FIFO location 0xXXXX XXXX 16/32 RO/WO
Read only for DMA read/receive
operation, write only for DMA write/
transmit operation.
CDR1 0x804 Error 0xFF 8 RO
Feature (current value) 0x00 8 WO
Feature expanded (previous value) 0x00
CDR2 0x808 Sector count (current value) 0xFF 8 R/W
Sector count expanded (previous value)
CDR3 0x80C Sector number (current value)
Sector number expanded (previous value)
CDR4 0x810 Cylinder low (current value)
Cylinder low expanded (previous value)
CDR5 0x814 Cylinder high (current value)
Cylinder high expanded (previous value)
CDR6 0x818 Device/head 0xEF
Width
Register Offset Description Default Type
(bits)
CDR7 0x81C Status 0x7Fa 8 RO
Command 0x00 8 WO
CLR0 0x820 Alternative status 0x7F 8 RO
Device control 0x00 8 WO
SATA
SCR0 0x824 SStatus 0x0000 0000 32 RO
SCR1 0x828 SError 0x0000 0000 32 R/W
SCR2 0x82C SControl
SCR3 0x830 SActive
SCR4 0x834 SNotification
Reserved 0x838 - 0x860 - - - -
SATA host
FPTAGR 0x864 First party DMA tag 0x0000 0000 32 RO
FPBOR 0x868 First party DMA buffer offset
FPTCR 0x86C First party DMA transfer count
DMACR 0x870 DMA control 0x0000 0000 32 R/W
Confidential
a. Status (CDR7) and Alternative status (CLR0) registers are set to 0x7F on power-up, then 0x80
when device presence is detected via PHY READY condition.
b. For cut 1.x, this value must be changed to 0x0013 704A for correct operation; however, for cut 2
onwards, the default value must not be changed.
c. Fixed value which must not be changed.
For more details on programming these registers, see the Synopsys documents listed in
Chapter 78: Serial ATA (SATA) host on page 903.
80 Smartcard interface
80.1 Overview
The smartcard interface supports asynchronous protocol smartcards as defined in the ISO7816-3
standard. Limited support for synchronous smartcards can be provided in software by using the PIO
bits to provide the clock, reset, and I/O functions on the interface to the card. Two smartcard
interfaces are supported on the STx7100. Each of these interfaces is able to automatically detect
and removes power to the smartcard when smartcard removal is detected.
The UART function of the smartcard interface is provided by a UART (ASC). UART ASC0 can be
used by smartcard0 and ASC1 can be used by smartcard1.
Each ASC used by a smartcard interface must be configured as eight data bits plus parity, 0.5 or
1.5 stop bits, with smartcard mode enabled. A 16-bit counter, the smartcard clock generator,
divides down either the comms clock, or an external clock connected to a pin shared with a PIO
bit, to provide the clock to the smartcard. PIO bits in conjunction with software are used to
provide the rest of the functions required to interface to the smartcard. The inverse signalling
convention, as defined in ISO7816-3, is handled in software, inverted data and most significant
bit first. For more information, see Chapter 61: Asynchronous serial controller (ASC)
on page 769 and Chapter 25: Programmable I/O (PIO) ports on page 213.
Confidential
a. The indicated directions are not set by default. They must be programmed in the PIO
configuration registers, since smartcard interfaces are multiplexed as PIO alternate
functions.
All smartcard interface signals are provided by alternate functions of the PIO pins. The
UARTn_TXD data signal is connected to the SCn_DATA pin with the correct driver type and the
clock generator is connected to the SCn_CLK pin.
The ISO standard defines the bit times for the asynchronous protocol in ETUs, which are related
to the clock frequency received by the card. One bit time = one ETU.
The ASC transmitter output and receiver input must be connected together externally. For the
transmission of data from the STx7100 to the smartcard, the ASC must be set up in smartcard
mode.
S a b c d e f g h P
card can be increased. The protocols that govern the negotiation of these clock rates and the
altering of the clock rate are detailed in the ISO7816-3 standard. The clock is used as the comms
clock for the smartcard, so updates to the clock rate must be synchronized with the clock to the
smartcard. This means the clock high or low pulse widths must not be shorter than either the old
or new programmed value.
The source of the smartcard clock generator (that is, glitch free divider) can be set to the
100 MHz system clock or, alternatively, an external reference. For the first smartcard interface
this alternate source is a dedicated programmable frequency synthesizer. Refer to
Chapter 17: Clocks on page 147 for frequency programming details. For the second smartcard
interface this alternate source is SC1_EXTCLKIN on PIO1[2].
Two registers control the period of the generated clock and the running of the clock.
● The SCI_n_CLKVAL register determines the smartcard clock frequency. The value given in
the register is multiplied by two to give the division factor of the input clock frequency. The
divider is updated with the new value for the divider ratio on the next rising or falling edge of
the output clock.
● The SCI_n_CLKCON register controls the source of the clock and determines whether the
smartcard clock output is enabled. The programmable divider and the output are reset when
the ENABLE bit is set to 0.
COMMS/PIO
SC_COND_VCC_EN
Confidential
Alt PIO0[5]
(configuration bit)
PIO0[5] (output)
SC_COND_VCC PIO0[5]
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Reserved SCnCLK_VAL
Confidential
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
SRC
EN
Reserved
The STx7100 TAP conforms to IEEE standard 1149.1, and includes device ID information. Pins
are listed in Table 222. TCK can be stopped in either logic state.
The instruction register is five bits long, with no parity. The pattern 0 0001 is loaded into the
register during the capture-IR state.
There are four defined public instructions, see Table 223. All other instruction codes are
reserved.
There are three test data registers; BYPASS, BOUNDARY_SCAN and IDENTIFICATION. These
registers operate according to IEEE 1149.1. The operation of the BOUNDARY_SCAN register is
defined in the BSDL description.
The identification code is 0xn0D4 4041, where n is the four-bit silicon revision number.
Bit 31 Bit 0 a
STMicroelectronics b
Mask rev Division code Device code
manufacturers ID
n D 4 2 4 0 4 1
a. Closest to TDO
b. Defined as 1 in IEEE 1149.1 standard
83.1 Overview
This chapter describes the functional operation of the universal serial bus host (USBH) interface
module.
The interface works with an embedded microcore. It is compliant with both the EHCI and OHCI
(USB 2.0 and USB 1.1) bus control standards, supporting low, full and high speed, isochronous,
bulk, interrupt and control transfers. It supports up to sixteen endpoints and initiates DMA
transactions on the STBus to access memory.
There are four main areas of a USB system:
● the client software and USB driver,
● USB device.
The client software, USB driver and host controller driver are implemented in software. The host
controller and USB device are implemented in hardware.
The USBH provides the features listed below.
● USB 2.0 EHCI host controller
Confidential
• Compliant with EHCI and USB 2.0 specifications (see Section 83.1.1).
• High speed (480 Mbit/s) transmissions.
• Microframe caching.
• USB 2.0 PING and SPLIT transactions.
• Power management capabilities.
• Port router interfaces to USB 1.1 host controller.
● USB 1.1 OHCI host controller
83.1.1 References
For further details of USB functionality the references below can be downloaded from
www.usb.org.
● Universal Serial Bus Specification, revision 2.0,
● Enhanced Host Controller Interface Specification for Universal Serial Bus, revision 1.0,
● OpenHCI Open Host Controller Interface Specification for USB, revision 1.0a.
83.2 Operation
The USB connects devices with the host. The USB 2.0 host controller includes one high-speed
mode host controller and one USB 1.1 host controller (see Figure 269). The high-speed host
controller implements an EHCI interface. It is used for all high-speed communications to high-speed
mode devices connected to the root ports of the USB 2.0 host controller. This allows
communications to full- and low-speed devices connected to the root ports of the USB 2.0 host
controller to be provided by the companion USB 1.1 host controller.
PLL 60 MHz
USB 1.1
Confidential
OHCI DP
STBus
Bus USB device
PHY DM
interface
USB 2.0
EHCI
OVER_CURR
Alt function
MUXing
PWR_CTRL
The USB 1.1 host controller has no knowledge of the high-speed mode host controller.
High-speed devices are routed to and controlled by the USB 2.0 host controller. When running
and configured, the USB 2.0 HC is the default owner of all the root ports. The USB 2.0 HC and its
driver initially detect all devices attached. If the attached device is not a high-speed device, the
USB 2.0 HC driver releases ownership of the port and control of the device to a companion host
controller. For that port, enumeration starts over from the initial attach detect point and the device
is enumerated under the USB 1.1 HC. Otherwise, the USB 2.0 HC retains ownership of the port
and the device completes enumeration under the USB 2.0 HC.
Tier 2
Hub 1
Func
Tier 7
The USB is a polled bus and the host controller initiates all data transfers. All bus transactions on
the USB 1.1 and most bus transactions on the USB 2.0 involve the transmission of up to three
packets. Bus transactions of four packets manage data transfers between the USB 2.0 host and
full- or low-speed devices.
Each transaction begins when the host controller, on a scheduled basis, sends a USB packet
describing:
● the type and direction of transaction,
● endpoint number.
This is the template for all data transfer over the USB, regardless of the data type. Figure 271
describes the process.
Bus transaction
USB protocol generation is handled in the HC by various state machines. The host controller
driver (HCD) provides the specific instructions for the type of data to send and the target
address. The HC provides all the protocol layer application of packets when sending data to the
peripheral, and also the stripping off of protocol packets when receiving data from the peripheral.
The major functional blocks of the USB system are:
Confidential
● host controller interface (bus wrapper layer between HCD and HC),
● host controller,
The host controller driver and host controller work in tandem to transfer data between client
software and a USB device. Data is translated between shared-memory data structures at the
client software end to USB signal protocols at the USB device end.
HCCA Interrupt 0
Status Interrupt 1
Event ------
Confidential
Bulk
Done
There are two sets of registers implemented in the in the USB 2.0 host: OHCI (USB 1.1) and
EHCI (USB 2).
Register addresses are provided as either
OHCIBaseAddress + offset,
EHCIBaseAddress + offset, or
The OHCIBufferBaseAddress is:
0x191F FC00.
The EHCIBaseAddress is:
0x191F FE00.
Registers in Table 225: USB 1.1 host register summary are detailed in the OpenHCI Open Host
Controller Interface Specification for USB, revision 1.0a.
Registers in Table 226: USB 2.0 host register summary are detailed in the Enhanced Host
Controller Interface Specification for Universal Serial Bus, revision 1.0.
All registers are 32-bit.
Type Type
Confidential
OHCI_HC_CMD_STA Shows status and receives commands from HCD 0x08 R/W R/W
Type Type
Register Description Offset
(HCD) (HC)
Part 9
End notes
Confidential
85 Register index
86 Revision history
Reference Change
Version A July 05
Initial version
Confidential
87 Licenses
Supply of this product does not convey a license under the relevant intellectual property of the
companies mentioned in this chapter nor imply any right to use this intellectual property in any
finished end-user or ready to use final product. An independent license for such use is required
and can be obtained by contacting the company or companies concerned.
Once the license is obtained, a copy must be sent to STMicroelectronics.
The details of all the features requiring licenses are not provided within the datasheet and
register manual. They are provided only after a copy of the license has been received by
STMicroelectronics.
The features requiring licenses are:
CSS
CSS DVD Copy Protection is intellectual property of Matsushita Electronics Industrial Co. The
CSS DVD Copy Protection license allows the use of the CSS decryption cell embedded in the
STx7100.
For all details, contact Matsushita at:
Matsushita Electronics Industrial Co. LTD, CSS Interim License
Organization, 1006 Kadoma, Kadoma-Shi, Osaka 571-8503 JAPAN
Macrovision®
Macrovision Anti-Copy System for DVD is intellectual property of Macrovision Corporation. The
Macrovision license allows the use of the Macrovision feature embedded in STx7100.
For all details, contact Macrovision at:
Macrovision Corp., 1341 Orlean Drive, Sunnyvale, CA 94089 USA
www.macrovision.com
CPRM/CPPM
CPRM/CPPM technology is intellectual property of 4C Entity. The CPRM/CPPM license allows
the use of the CPRM / CPPM technology embedded in the STx7100.
For all details, contact 4C Entity at:
4C Entity, LLC, 225 B Cochrane Circle, Morgan Hill, CA 95037, USA
www.4centity.com
HDCP
HDCP is an intellectual property of Digital Content Protection, LLC. The HDCP license allows the
use of HDCP in the STx7100.
For all details, contact Digital Content Protection, LLC at:
C/O Intel Corporation, Stephen Balogh, JF2-55, 2111 NE 25th Ave, Hillsboro, OR 97124
www.digital-cp.com
Confidential
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences
of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted
by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject
Confidential
to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not
authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics.
CableCARDTM is a trademark of Cable Television Laboratories, Inc. Dolby® and Pro Logic® are registered trademarks of
Dolby Laboratories. SRS®, TruSurround® and TruBass®, are registered trademarks and TruSurround XTTM a trademark of
SRS Labs, Inc. in the U.S. and selected foreign countries. MacrovisionTM is a Trademark of Macrovision corporation.
Supply of this product does not convey a license under the relevant intellectual property of Thomson multimedia, Fraunhofer
Gesellschaft and/or Coding Technologies nor imply any right to use this product in any finished end user or ready-to-use final
product. An independent license for such use is required. For details, see http://www.mp3licensing.com.
TruSurround XT™, TruBass™ and SRS technology rights incorporated in this chip are owned by SRS Labs, a U.S.
corporation and licensed to ST Microelectronics. A purchaser of this chip, who uses the SRS technology incorporated herein,
must sign a license for use of the chip and display of the SRS trademarks. Any product using the SRS technology
incorporated in this chip must be sent to SRS Labs for review. TruSurround XT and SRS are protected under US and foreign
patents issued and/or pending. Neither the purchase of this chip, nor the corresponding sale of audio enhancement
equipment conveys the right to sell commercialized recordings made with any SRS technology. SRS requires all set makers
to comply with all rules and regulations as outlined in the SRS Trademark Usage Manual.
www.st.com