12PACKAGE OUTLINE
13SOLDERING
14DEFINITIONS
15LIFE SUPPORT APPLICATIONS
SAA7388
1996 Apr 262
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
1FEATURES
• CD-ROM (Mode 1) and CD-I (Mode 2 - Form 1 and
Form 2) formats supported
• Real-time error detection and correction in hardware
• Suitable for octal speed, n = 8.
• Maximum host transfer burst rate of 13.3 Mbyte/s
• Corrects two errors per symbol with erasure correction
• 36 kbit of on-chip error correction buffer RAM
• 12-byte command FIFO and 12-byte status FIFO
• Compatible with the Advanced Technology Attachment
(ATA) register set and the Advanced Technology
Attachment Program Interface (ATAPI) command set
• Operates with popular memories. (up to 128 kbyte
SRAM; 1 to 16 Mbit DRAM, different speed grades,
nibble or byte wide)
• Interface to Integrated Drive Electronics (IDE) bus
without external bus drivers
• Q-to-W subcode buffering, de-interleaving and
correction are supported
• Device can operate with audio RAMs. A RAM test allows
bad segments to be identified.
SAA7388
2GENERAL DESCRIPTION
The SAA7388 decoder is a block decoder buffer manager
for high-speed CD-ROM applications that integrates
real-time error correction and detection and host interface
data transfer functions into a single chip.
The SAA7388 has an on-chip 36-kbit memory. This
memory is used as a buffer memory for error and erasure
corrections. The chip also has a buffer memory interface
thus enabling the connection of SRAM up to 128 kbytes, or
DRAM up to 16 Mbits. The on-chip memory is sufficient to
buffer 1 sector of data. The external memory can buffer
many more, depending on memory size.
The error corrector of the SAA7388 can perform 2-pass
error correction in real-time. Buffer memory for this
correction is integrated on-chip.
The SAA7388 has an host interface that is compatible with
the SANYO LC89510 or OAK OTI-012 and also
compatible with the ATA/IDE/ATAPI hard disc interface
bus. (All ATAPI registers are present in hardware).
Supply of this Compact Disc IC does not convey an implied
license under any patent right to use this IC in any
Compact Disc application.
3QUICK REFERENCE DATA
SYMBOLPARAMETERMIN.TYP.MAX.UNIT
V
V
I
DDD
f
clk
T
T
DDD1
DDD2
amb
stg
digital supply voltage 13.03.33.6V
digital supply voltage 24.555.5V
supply current−60−mA
clock frequency15.24850.4MHz
operating ambient temperature0−+70°C
storage temperature−55−+125°C
4ORDERING INFORMATION
PACKAGE
TYPE NUMBER
NAMEDESCRIPTIONVERSION
SAA7388GPQFP80plastic quad flat package; 80 leads; lead length 1.95 mm;
SOT318-2
body 14 × 20 × 2.8 mm
1996 Apr 263
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
5BLOCK DIAGRAM
handbook, full pagewidth
V
DDD1
SDA
SCL
INT
RESET
SYN
DMACK
DA1
DA2/EJECT
CS2/SELRQ
IOCS16
1, 14, 24,
41, 59, 68
32
36
37
38
39
40
45
70
71
72
73
DGND
CONTROLLER
V
MICRO-
INTERFACE
DDD2
RCK
SFSY
50, 7428
HOST INTERFACE
BCKWSDATA
SUB
29 30 31 33 34 352325
DECODER
SERIAL
INTERFACE
ERROR
CORRECTOR
SRAM
CACHE
C2POTEST1
TEST2
TEST
SAA7388
MEMORY
MANAGER
OSCILLATOR
SAA7388
75-80
2-10
12
11
13
15-22
27
26
RA0 to RA5
RA6 to RA14
RA16/CAS
RA15/RAS
RWE
RD0 to RD7
CRIN
CROUT
42 43 44 69 46474849
CS1/HEN
HRD
HWR DA0/CMD
IORDY/WAIT/HFBLB
DMARQ/DTEN
SCRST/STEN
IRQ/EOP/HFBC
Fig.1 Block diagram.
1996 Apr 264
51-5860-67
MGD305
HD0 to HD7 HD8 to HD15
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
SAA7388
CD-ROM (ELM)
6PINNING
SYMBOLPINI/ODESCRIPTION
DGND11−digital ground 1
RA62Obuffer RAM address bus output line 6
RA73Obuffer RAM address bus output line 7
RA84Obuffer RAM address bus output line 8
RA95Obuffer RAM address bus output line 9
RA106Obuffer RAM address bus output line 10
RA117Obuffer RAM address bus output line 11 (SRAM) only
RA128Obuffer RAM address bus output line 12 (SRAM) only
RA139Obuffer RAM address bus output line 13 (SRAM) only
RA1410Obuffer RAM address bus output line 14 (SRAM) only
RA15/RAS11Obuffer RAM address bus output line 15 (SRAM) or RAS (DRAM)
RA16/CAS12Obuffer RAM address bus output line 16 (SRAM) or CAS (DRAM)
RWE13Obuffer RAM write enable output
DGND214−digital ground 2
RD015I/Obuffer RAM data bus bidirectional line 0
RD116I/Obuffer RAM data bus bidirectional line 1
RD217I/Obuffer RAM data bus bidirectional line 2
RD318I/Obuffer RAM data bus bidirectional line 3
RD419I/Obuffer RAM data bus bidirectional line 4
RD520I/Obuffer RAM data bus bidirectional line 5
RD621I/Obuffer RAM data bus bidirectional line 6
RD722I/Obuffer RAM data bus bidirectional line 7
TEST223Itest input 2
DGND324−digital ground 3
TEST125Itest input 1
CROUT26Oclock oscillator output
CRIN27Iclock oscillator input
SFSY28Iserial subcode input frame sync input
RCK29Oserial subcode clock output (active LOW)
SUB30Iserial input for Q-to-W subcode input
BCK31Iserial interface bit clock input
V
DDD1
WS33Iserial interface word clock input
DATA34Iserial data input
C2PO35Iserial interface flag input
SDA36I/Osub-CPU serial data input/output
SCL37Isub-CPU serial clock input
INT38Osub-CPU open-collector interrupt output
RESET39Ipower-on reset input (active LOW)
SYN40Isync signal input from sub-CPU
DMARQ/DTEN48OATAPI DMA request host interface data enable output (active LOW);
3-state control
IRQ/EOP/HFBC49Ohost interface end of process flag output ATAPI host interrupt request
(active LOW); 3-state control
V
DDD2
HD051I/Ohost interface data bus input/output line 0
HD152I/Ohost interface database input/output line 1
HD253I/Ohost interface database input/output line 2
HD354I/Ohost interface data bus input/output line 3
HD455I/Ohost interface data bus input/output line 4
HD556I/Ohost interface data bus input/output line 5
HD657I/Ohost interface data bus input/output line 6
HD758I/Ohost interface data bus input/output line 7
DGND559−digital ground 5
HD860I/Ohost interface data bus input/output line 8
HD961I/Ohost interface data bus input/output line 9
HD1062I/Ohost interface data bus input/output line 10
HD1163I/Ohost interface data bus input/output line 11
HD1264I/Ohost interface data bus input/output line 12
HD1365I/Ohost interface data bus input/output line 13
HD1466I/Ohost interface data bus input/output line 14
HD1567I/Ohost interface data bus input/output line 15
DGND668−digital ground 6
DA0/CMD69Ihost interface data input (active LOW)/command select input host interface
DA170IATAPI address line input 1
DA2/EJECT71IATAPI address line input 2
CS2/SELRQ72IATAPI chip select input 2
IOCS1673OATAPI 16-bit data select output
V
DDD2
RA075Obuffer RAM address bus output line 0
RA176Obuffer RAM address bus output line 1
RA277Obuffer RAM address bus output line 2
50−digital supply voltage 2 (5 V)
address line 0
74−digital supply voltage 2 (5 V)
1996 Apr 266
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
SYMBOLPINI/ODESCRIPTION
RA378Obuffer RAM address bus output line 3
RA479Obuffer RAM address bus output line 4
RA580Obuffer RAM address bus output line 5
handbook, full pagewidth
RA0
75
DDD2
V
IOCS16
74
73
SAA7388
CS2/SELRQ
DA2/EJECT
71
72
DA1
70
DA0/CMD
69
DGND1
RA6
RA7
RA8
RA9
RA10
RA11
RA12
RA13
RA14
RA15/RAS
RA16/CAS
RWE
DGND2
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
TEST2
DGND3
RA2
RA5
RA4
RA3
80
79
78
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
RA1
77
76
DGND6
68
HD15
67
HD14
66
HD13
65
HD12
64
HD11
63
HD10
62
HD9
61
HD8
60
DGND5
59
HD7
58
HD6
57
HD5
56
HD4
55
HD3
54
HD2
53
HD1
52
HD0
51
V
50
DDD2
IRQ/EOP/HFBC
49
DMARQ/DTEN
48
SCRST/STEN
47
IORDY/WAIT/HFBLB
46
DMACK
45
HRD
44
HWR
43
CS1/HEN
42
DGND4
41
SAA7388
25
26
27
28
29
30
31
32
SUB
TEST1
CRIN
CROUT
SFSY
RCK
BCK
V
Fig.2 Pin configuration.
1996 Apr 267
DDD1
33
WS
34
DATA
35
C2PO
36
SDA
37
SCL
38
INT
39
RESET
40
SYN
MGD306
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
6.1Pin functions
6.1.1RA0
External memory address signals.
6.1.2RA16/CAS
External memory RA16 signal if SRAM or, CAS signal if
DRAM.
6.1.3RA15/RAS
External memory RA15 signal if SRAM or, RAS signal if
DRAM.
6.1.4RWE
Write output enable signal for external buffer memory. This
is LOW when the SAA7388 wants to write data into the
external memory.
6.1.5RD0
External buffer memory bidirectional data signals.
TO RA14
TO RD7
SAA7388
6.1.12C2PO
Error flag from the CD decoder. A HIGH indicates that a
byte has not been corrected by the C2 error corrector and
therefore is not valid. This is taken into account by the
SAA7388 error corrector.
6.1.13SDA
Sub-CPU bidirectional data signal. This signal forms part
of the 3-wire serial interface between the SAA7388 and the
sub-CPU.
6.1.14SCL
Sub-CPU sync signal. This signal forms part of the 3-wire
serial interface between the SAA7388 and the sub-CPU.
This signal is used to synchronize data transfers between
the sub-CPU and the SAA7388.
6.1.15INT
Sub-CPU interrupt signal. This active LOW output signals
to the sub-CPU that the SAA7388 has an interrupt request.
6.1.6SFSY
Frame sync for the Q-to-W subcode, indicates when
P-channel is available by a HIGH-to-LOW transition.
Frame 0 is also indicated by no transition on this line.
6.1.7
In response to SFSY going LOW data is clocked into the
SAA7388 before each rising edge using this clock output.
6.1.8SUB
Q-to-W subcode is input in response to
mode or WS in “V4” mode compatible with the SAA7345.
6.1.9BCK
Bit clock for the serial data input from the CD decoder.
6.1.10WS
Word clock for the serial data input from the CD decoder.
6.1.11DATA
Serial data input from the CD decoder. This may be either
2
I
S-bus or EIAJ 16-bit format.
RCK
RCK in 3-wire EIAJ
6.1.16
Forcing this input LOW resets the SAA7388.
6.1.17SYN
Sub-CPU clock signal. This signal forms part of the 3-wire
serial interface between the SAA7388 and the sub-CPU.
This signal is the sub-CPU driven bit clock used to
synchronize the signals on the SDA line.
6.1.18
In the ATAPI mode this is the host chip select 1 address
signal. In the Sanyo and Oak compatibility modes setting
this input LOW enables the host interface.
6.1.19
This active LOW signal is the host write request.
6.1.20
This active LOW signal is the host read request.
RESET
CS1/HEN
HWR
HRD
1996 Apr 268
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
6.1.21DMACK
This signal is used in the ATAPI and Oak compatibility
modes during DMA transfers. The host pulls this signal
LOW in response to a DMARQ request to indicate that it is
ready to transfer data.
If this signal is not being used then it must be pulled HIGH
for SAA7388 to operate correctly.
6.1.22
In the ATAPI mode this signal is negated to extend the
host transfer cycle of any host register access. It is used in
PIO transfers. When IORDY is not negated it is in a
high-impedance state.
In the Sanyo compatibility mode the function of this signal
depends on the SELRQ input. If SELRQ is HIGH then
WAIT is set LOW to extend the host transfer cycle. If
SELRQ is LOW then WAIT acts as the DRQ signal in a
DMA transfer.
IORDY/WAIT/HFBLB
SAA7388
6.1.25
In the ATAPI mode this active HIGH signal indicates a host
interrupt request. It is asserted when the sub-CPU writes
to the ITRG register and is negated when the host reads
the status register or writes to the command register.
In the Sanyo compatibility mode this signal is set LOW
when the last data byte is transferred to or from the host.
In the Oak compatibility mode this is the Host First Byte
Cycle output and is HIGH while the first byte in the pseudo
16-bit DMA transfer is accessed. It should be used to
inhibit non-DMA transactions while the first byte is latched.
6.1.26HD0
These are the bidirectional Host Data signals. In the Sanyo
and Oak compatibility modes HD8 to HD15 are never
used.
6.1.27
IRQ/EOP/HFBC
TO HD15
DA0/CMD
In the Oak compatibility mode this signal is the Host First
Byte Latch signal. A rising edge on this signal is used to
latch the first byte in a pseudo 16-bit DMA read. HFBLB
can only be HIGH when pseudo 16-bit DMA transfer mode
is selected.
6.1.23
In the ATAPI or Oak compatibility mode this signal is pulled
LOW to reset the sub-CPU in response to a reset
command from the host.
In the Sanyo compatibility mode this signal is pulled LOW
to signal to the host that status bytes are available for
transfer.
6.1.24
In the ATAPI or Oak compatibility mode this signal is
asserted when the SAA7388 is ready to transfer data
between the host and itself. In ATAPI single word and Oak
DMA transfers this occurs at every word. In ATAPI
multi-word DMA transfers this occurs at the start of the
transfer.
In the Sanyo compatibility mode this signal is pulled LOW
to signal to the host that data bytes are available for
transfer.
SCRST/STEN
DMARQ/DTEN
In the ATAPI mode this is the host Data Address 0 signal.
In the Sanyo and Oak compatibility modes this input
selects between command or data transfers.
6.1.28DA1
This is the ATAPI Data Address 1 signal.
6.1.29DA2/ EJECT
In the ATAPI mode this is the Data Address 2 signal. In the
Oak compatibility mode this is the door switch input pin. Its
state is reflected in the TSTAT register.
6.1.30CS2/SELRQ
In the ATAPI mode this is the Chip Select 2 signal. In the
Oak and Sanyo compatibility mode this is the data transfer
mode select input. It is used to select between PIO and
DMA transfers.
6.1.31IOCS16
This open-collector signal is used in the ATAPI mode to
signal to the host that a 16-bit data port has been
addressed. It is not activated during DMA transfers.
1996 Apr 269
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
7FUNCTIONAL DESCRIPTION
The SAA7388 is comprised of four main blocks; a CD
player interface, an error corrector, a host interface and a
memory manager. These four blocks operate in parallel.
All receive and send data to the buffer memory via the
memory manager. A 36-kbit on-chip SRAM has been
incorporated to allow high-speed data read operations for
the error corrector.
The SAA7388 performs simultaneous data input buffering,
error correction and host data transfer.
7.1CD-DSP interface and data input
The input data is synchronized, decoded, and written to
the buffer RAM. The input data format is software
programmable.
The synchronization is achieved using a sync detector and
a sync interpolator. The sync detector detects the sync
pattern in every sector while the interpolator avoids sync
loss when no sync is found. The detector and interpolator
can be individually enabled and disabled under software
control.
After decoding, each full sector of data (2352 bytes)
comprising sync, header, sub-header and parity fields is
written to the buffer RAM.
7.2Error correction and EDC check
Error correction and detection is performed on each sector
after it is written to the buffer RAM.
SAA7388
7.3Host interface
The host interface controls data transfers between the
SAA7388 and an external microcontroller. The host
interface can be programmed to operate in three modes.
In the Sanyo compatibility mode the host interface is
functionally compatible with the Sanyo LC89510 block
decoder. In the Oak compatibility mode the host interface
is functionally compatible with the Oak OTI-012 controller
chip in enhanced mode.
In the ATAPI mode the interface meets the ATA Program
Interface specification.
7.4Subcode channel Q-to-W buffering
As well as buffering the main data, the SAA7388 can also
be used to buffer R-to-W subcode data in buffer memory.
Two buffer modes exist, raw mode and cooked mode. In
the raw mode, data is written to an external RAM without
any processing being performed. In the cooked mode, the
Q-channel data is extracted, the Q-channel CRC is
calculated, the R-to-W data is de-interleaved and the
residues of each R-to-W frame are calculated. These
residues make it easier to correct errors in the data.
7.5External buffer memory
It is possible to use the SAA7388 with different external
RAM memories. From 0 to 128 kbyte SRAMs or to 16-Mbit
DRAMs are possible. Memories may be nibble or byte
wide (allowing 2, 8 or 16 Mbits). Selection is performed
under software control.
The SAA7388 buffers flag and data of sectors to be
corrected in a 9-bit, 4096 words on-chip RAM memory.
For erasure correction, no external 9-bit memory is
required.
The standard error correction algorithm can be
programmed, and supports mode 1 and mode 2 form 1
and form 2 discs.
After error correction, an electronic data check is
executed.
When this EDC check is also complete, the sector header
and sub-header is written to 8 header registers, and a
decode complete interrupt is generated.
The microcontroller can then read the decoder status, the
sector header and sub-header and the sector start
address from the SAA7388.
1996 Apr 2610
Unique to the SAA7388 is its ability to work with partly
defective DRAMs. The SAA7388 offers the possibility to
use a DRAM with bytes in error.
A RAM test is executed under microcontroller control. This
RAM test indicates defective segments to the
microcontroller which keeps a list of which bad sectors to
avoid. The list can be stored in the buffer memory and/or
the microcontrollers own memory.
7.6Sub-CPU registers
This section describes the registers in the SAA7388. The
operation of the registers varies depending on whether
they are being read from or written to, and the host mode
selected.
901001PTHBlock Pointer register bits 15 to 8
10 01010WALWrite Address register bits 7 to 0
11 01011WAHWrite Address register bits 15 to 8
12 01100STAT0CRCOKILSYNCNOSYNCLBLKUSHORTSBLKERRUCEB
13 01101STAT1MINERRSECERRBLKERR MODERR SH0ERRSH1ERRSH2ERRSH3ERR
14 01110STAT2RMOD3RMOD2RMOD1RMOD0MODEFORMRFORM1 RFORM2
15 01111STAT3VALSTCBLK
16 10000PTHHBlock Pointer register bits 20 to 16
17 10001WAHHWrite Address register bits 20 to 16
18 10010SUB_LSubcode Address register bits 7 to 0
19 10011SUB_HSubcode Address register bits 9 and 8
20 10100
21 10101
22 10110
23 10111
24 11000
25 11001HCONOak Host Configuration register
26 11010ACMDATAPI Command register
27 11011ASAMTATAPI SAM TAG register
28 11100ADCTRATAPI Device Control register
29 11101 ADRSELATAPI Drive Select register
30 11110AINTRATAPI Interrupt Reason register
31 11111AFEATATAPI Features register
APCMD/
COMIN
ATAPI packet command data/command input register
SRSTI/
STBSY
DTENSTEN
1996 Apr 2612
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
7.7Register Descriptions
7.7.1SBOUT/ADATA
This is a 12 byte FIFO used to transfer data from the
sub-CPU to the host.
In the Sanyo and Oak compatibility mode writing to this
register starts a status byte transfer. In this mode if the
SOUTEN bit in the IFCTRL register has been set to logic 1,
writing to the SBOUT register sets the STBSY bit to
logic 0. If the STWAI bit is set to logic 0,
immediately set LOW to inform the host computer that the
status byte is ready to be read from.
If the STWAI bit is set to logic 1 and the DTEN bit in the
IFSTAT register is also set to logic 1, both the STEN pin
and the STBSY will go LOW. However, if the STWAI bit is
set to logic 0, and theDTEN bit is set to logic 0, thenSTEN
is held HIGH until the DTEN bit goes HIGH, thereafter it
goes LOW.
STEN is
SAA7388
7.7.2COMIN/ APCMD
During the ATAPI mode this register is used to read the
program command sent by the host. The program
command can only be received if the appropriate mode
has been selected (see Table 22) and a data transfer has
been started (see DTRG register).
During Sanyo and Oak compatibility modes this register is
a 12 byte FIFO which is used to transfer commands from
the host to the sub-CPU. If reading this register empties
the command FIFO then CMDI is set to logic 1 and further
reads from the register will return FFH.
7.7.3IFCTRL
The IFCTRL register provides control over the host
interface. Resetting the chip will clear all bits. In the ATAPI
mode, only, bits 7 to 5 have any effect.
Table 3 IFCTRL register bits
BITNAMEDESCRIPTION
7CMDIENEnable bits for CMDI, DTEI and DECI. These are interrupt masks, enabling/disabling the
6DTEIEN
5DECIEN
4
3
2
1DOUTENData output enable. DOUTEN enables/disables data transfers. When set to logic 0, all
0SOUTENStatus output enable. SOUTEN enables/disables status byte transfers. When set to
CMDBKCommand break enable. If set to logic 0 then the command break function is enabled
DTWAIData transfer WAIT enable. Setting this bit to logic 0 enables the data WAIT function.
STWAIStatus byte transfer WAIT enable. This bit acts in a similar way to the DTWAI bit except it
sub-CPU interrupt pin. They do not affect the bits in the IFSTAT register. If set to logic 1,
the corresponding interrupt is enabled. It should be noted that these masks do not clear
the interrupts.
and if the host writes to the COMIN FIFO then any data or status byte transfers in
progress will be terminated. If set to logic 1 then this operation is disabled. The data
transfer interrupt DTEI is not generated by a command break.
The data WAIT function allows the SAA7388 to delay hardware execution of the data
transfer until a status byte transfer has been completed. Disabling the data WAIT
function allows data transfers to take place independently of status byte transfers.
controls the status WAIT function. The status WAIT function allows the SAA7388 to
delay hardware execution of the status transfer until a data byte transfer has been
completed. Disabling the data WAIT function allows status transfers to take place
independently of data transfers.
data transfers in progress are aborted.
logic 0, the status FIFO register is reset to empty and all status byte transfers in progress
are aborted.
1996 Apr 2613
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
SAA7388
CD-ROM (ELM)
7.7.4IFSTAT
The IFSTAT register indicates the state of the host interface. In the ATAPI mode, only bits 7 to 2 have any meaning.
Table 4 IFSTAT register bits
BITNAMEDESCRIPTION
7
6
5
4
3
2
1
0
CMDICommand interrupt. In the ATAPI mode this bit is asserted when the host has written
to the ATAPI command register (see ACMD register) and the drive is selected. It is
also asserted when the host writes the execute drive diagnostic command (90H) to
the ATAPI command register, regardless of whether the drive is selected. It is
negated when the sub-CPU reads the ACMD register. In the Sanyo and Oak
compatibility modes this bit is asserted while there are command bytes waiting in the
COMIN FIFO. It is negated when the COMIN FIFO is empty.
DTEIData transfer end interrupt. This bit is asserted at the end of data transfer. It is
negated when the sub-CPU writes to the DTACK register. If the ATAPI mode is
selected this bit is also asserted when a program command has been received and
after a sub-CPU memory transfer.
DECIDecoder interrupt. This bit is asserted when a new sector is available. It is negated by
reading the STAT3 register.
SUBISubcode interrupt. This bit is asserted when a new subcode is available. It is negated
by reading the SUB_H register.
DTBSYData transfer busy.This bit indicates if a data transfer is taking place. It is asserted by
writing to the DTRG register and is negated at the end of the transfer.
SRSTI/STBSYSRST bit interrupt/status transfer busy. In the ATAPI mode this bit is asserted when
the host writes to the ATAPI device control register and sets the SRST bit. It is
negated when the sub-CPU reads the ADCTR register. It should be noted that if this
bit is asserted in the ATAPI mode then the sub-CPU interrupt will also be asserted.
The SRSTI interrupt cannot be disabled. In the Sanyo and Oak compatibility modes
this bit indicates if a status byte transfer is taking place. It is asserted by writing to the
SBOUT register and is negated when the host has emptied the status FIFO.
DTENData transfer and status transfer. These bits reflect the state of the DTEN and STEN
STEN
pins in the Sanyo and Oak compatibility modes. They are updated at the end of a
host read or write.
7.7.5DBCL AND DBCH
The Data Byte Counter is used by the sub-CPU to control
the number of bytes that are transferred in a data transfer.
In the ATAPI mode all 16 bits are available while in the
Sanyo and Oak compatibility modes only 15 bits are
available with bit 7 of DBCH indicating the state of DTEI
(see Table 4). During memory-to-host data transfers the
data byte counter is decremented after every host read.
During host-to-memory data transfers the data byte
counter is decremented as data is written into external
buffer memory.
1996 Apr 2614
7.7.6DACL, DACH AND DACHH
This 21-bit write-only register is used to specify the
external buffer address of the first byte of the data block to
be transferred to the host.
Once the address has been set, it is incremented
automatically as successive bytes are transferred with the
host. It should be noted that pointer operation is
asynchronous from host read/write operation. For this
reason, counter increments are not coincident with host
transfer operations.
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
Bit 7 of the DACHH register specifies which memory is
accessed. If the bit is clear then the address refers to the
external memory, if the bit is set then the address refers to
the 4 kbyte internal memory. The internal memory should
not be accessed during error correction.
This register should be written to before each data transfer
because its value will be undefined at the end of the
previous transfer.
7.7.7PTL, PTH
This register holds a 21-bit pointer to the external buffer
memory address of the head of the current data block after
correction.
The SAA7388 defines the minute byte in the header to be
at the head of the block, and the 12 sync bytes at the tail
of the block. Each block contained in the buffer is taken to
be 2352 bytes.
The controller can transfer the decoded block back to the
host by copying the address of this register to the DACL,
DACH and DACHH pointers after a decoder interrupt.
When the WRRQ bit in the CTRL0 register is set to logic 1,
this pointer is updated at the sync signal of every
2352 byte clocks.
7.7.8WAL, WAH
These registers contain a 21-bit address of where raw data
from the drive is written to the external buffer memory. The
pointer is automatically incremented during data transfer.
The pointer should only be read while drive data writes to
the buffer are disabled. If WAHH is written to while drive
data write is enabled, then the new WA value will be used
AND PTHH
AND WAHH
SAA7388
for the first byte of the next sector. The new pointer value
is temporarily stored in the PT register. This cannot be
read after WA has been written to.
7.7.9DTRG
Writing to this register starts a data transfer. The data
written is discarded.
7.7.10DTACK
Writing to this register clears the
written is discarded.
7.7.11HEAD0, HEAD1, HEAD2
These registers are used to hold the header and the
sub-header data of the current block.
To read the header data set, the SHDREN bit in the
CTRL1 register is set to logic 0; to read the sub-header
data, SHDREN is set to logic 1.
If sub-header is selected, the registers will normally hold
data from bytes 20 to 23. However, if the error flag for one
of these bytes is set, then the byte is taken from the first
sub-header field. (bytes 16 to 19.)
The error flags for header and sub-header can be read
from the STAT1 register. No error correction is performed
on header or sub-header.
Header and sub-header registers are valid directly after
decoder interrupt, and as long as the VALST bit in the
STAT3 register is LOW. In all write modes they contain
information on the block whose header is pointed to by
PTL, PTH and PTHH.
DTEI interrupt. The data
AND HEAD3
Table 5 HEAD registers
SHDRENREGISTERCONTENTS
0HEAD0MINUTES (byte12)
0HEAD1SECONDS (byte 13)
0HEAD2FRAMES (byte 14)
0HEAD3MODE (byte 15)
1HEAD0FILE NUMBER (byte 16 or 20)
1HEAD1CHANNEL NUMBER (byte 17 or 21)
1HEAD2SUBMODE NUMBER (byte 18 or 22)
1HEAD3CODING INFORMATION (byte 19 or 23)
1996 Apr 2615
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
7.7.12CTRL0
Resetting the chip sets all the bits in this register to logic 0.
Table 6 CTRL0 register
BITNAMEFUNCTION
7DECENDisable decoding = 0; Enable decoding = 1. This bit enables/disables decoding
functions. Disabling the decoding functions also disables the decoder interrupt.
6lookaheadAt interrupt PT, header refer to current block = 0; At interrupt PT, header refer to next
block = 1. When this bit is set to logic 1 at decoder interrupt, CMA and header registers
will give information on the next block instead of on the current block. The lookahead
mode was included to provide support for bad RAMs, and to give the CPU better control
on the blocks it wants to read.
5E01RQDisable error correction of bytes = 0; Enable correction of CIRC mis-corrections = 1.
Setting this bit to logic 0 instructs the error corrector not to correct bytes flagged as
reliable by the CIRC error corrector.
automatic extraction of form bit during mode2 correction from sub-header data.
3ERAMRQDisable erasure flag use = 0; Enable erasure flag use = 1. When set to logic 1, the
SAA7388 will enable the use of erasure flag information for error correction. When set to
logic 0, the SAA7388 will disable the use of erasure flag information for error correction.
Use of erasure flags must be disabledSAA7388 when the CD-DSP does not output
erasure flags and when the internal buffer RAM is disabled (which is necessary for
repeat correction).
2WRRQDisable data writes to the buffer and PTL updates = 0; Enables data writes to the buffer
and PTL updates = 1. This bit enables/disables writes from the CD drive into the buffer. It
also enables/disables pointer (PTL, PTH and PTHH) updates each time a block is
received. When WRRQ is set to logic 1, data write will start from the first byte of the next
block onwards. When WRRQ is set to logic 0, repeat correction is enabled. With WRRQ
set to logic 0, the internal buffer RAM is disabled.
1ECCRQDisable ECC correction = 0; Enable ECC correction = 1. When ECCRQ is set to logic 1
the blocks received by the SAA7388 will be error corrected before a decoder interrupt is
generated. When ECCRQ is set to logic 0 no corrections are performed. The algorithm
used is a QD, PD, QE, PE algorithm. In a first step, errors are corrected; in a second
step, erasures are corrected. Correction data is read from the on-chip 36 kbit buffer
memory.
0ENCODENormal operation = 0; Test mode, do not use = 1, this bit must always be set to logic 0.
SAA7388
1996 Apr 2616
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
Table 7 Error correction modes
DECENlookaheadWRRQECCRQdecoder mode
0XXXdecoder disable; note 1
1000monitor only
1001repeat correction
1010write only
1011real-time correct, normal mode
1110write only, lookahead
1111real-time correct, lookahead
Note
1. Where X = don’t care.
7.7.13CTRL1
The reset function clears all the flags in this register.
the decoder with the sync pattern detected in the input data.
5DSCRENDescramble disable (audio) = 0; Descramble enable = 1. This bit enables/disables
descrambling. Setting this bit to logic 0 allows reading of raw data on disc, even audio
signals. This bit should be set to logic 1 for CROM data.
4COWRENCRC with error correction disabled = 0; Detection errors are corrected = 1. This bit
enables/disables rewriting of error bytes in the buffer during error correction. Setting
the bit to logic 0 allows CRC checks without error correction.
3MODRQMode 1 request = 0; Mode 2 request = 1. This bit discriminates Mode 1/Mode 2.
2FORMRQForm 1 request = 0; Form 2 request = 1. This bit discriminates Mode 2/Form 1 and
Mode 2/Form 2.
1MBCKRQDisable mode check function = 0; Enable mode check function = 1. If the mode
specified in the mode byte does not correspond with the raw data mode bit and this bit
is set to logic 1 then error correction and detection is disabled.
0SHDRENHeader data on registers Head0 to Head3 = 0; Sub-header data on registers
Head0 to Head3 = 1. This bit toggles header and sub-header data between registers
HEAD0 to HEAD3.
1996 Apr 2617
Philips SemiconductorsPreliminary specification
Error correction and host interface IC for
CD-ROM (ELM)
7.7.14STAT0
Resetting the chip clears all bits in this register.
Table 9 STAT0 register bits
BITNAMEFUNCTION
7CRCOKCyclic redundancy check not OK = 0; Cyclic redundancy check OK = 1. Set by the
EDC in accordance with the results of the CRC check.
6ILSYNCSync pattern detected at word count 0 to 1174 or 1176 onwards = 1. This bit is set to
logic 1 if the sync pattern in the incoming data is detected between word counts
0 and 1174 or 1176 to infinity, and the decoder has been retimed. Due to the
presence of the cache RAM, it is necessary to stop error correction also when long
blocks have been detected.
5NOSYNCSync pattern inserted by sync interpolator not coincident with data sync = 1. This bit
is set to logic 1, if the word counter reaches 1175 and no sync pattern has been
detected in the input data. It indicates that the sync interpolator circuit inserted a
sync.
4LBLKWith SYIEN = 0, no sync found. Data block size has been extended = 1. This bit is
set to logic 1, if the sync interpolator was switched off, and if the sync interpolator
indicated that sync insertion was necessary. This condition causes the block length to
be extended.
3Reserved
2SBLKShort block indication = 1. This bit is set to logic 1 if the decoder is not retimed when
a sync pattern is detected in an incorrect word location, and is ignored while the
SYDEN bit is set to logic 0.
1ERABLKOne or more bytes of the block are flagged with C2 flags = 1. This bit is set to logic 1
if one or more bytes of the current block contain erasures as indicated by the C2PO
input.
0UCEBLKUncorrectable errors in block = 1. This bit is set to logic 1 when one or more bytes of
the current block remain in error after the error correction process.
SAA7388
7.7.15STAT1
Resetting the chip clears all bits in this register.
The bits in this register indicate the reliability of data in the HEAD0 to HEAD3 registers. Bits MINERR, SECERR,
BLKERR and MODERR indicate errors in the minutes, seconds, frames and mode bytes in the header of the current
block. Bits SH0ERR to SH3ERR indicate errors in the respective bytes in the sub-header.
Table 10 STAT1 register bits
BIT 7BIT 6BIT 5BIT 4BIT 3BIT 2BIT 1BIT 0
MINERRSECERRBLKERRMODERSH0ERRSH1ERRSH2ERRSH3ERR
1996 Apr 2618
Loading...
+ 42 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.