AV PCI CONTROLLER
mand” information, written by the host, for the next available
buffer. Table 10 shows the interpretation for this
case.
Table 10: STAT_COM entry content, when
STAT_BIT=0
Bit
31:2
1
0
Content
FRAG_TAB_PTR[31:2]
FRAG_TAB_PTR [1]
STAT_BIT
Description
The address pointer to the
fragment table of the next buffer
to be used. The 2 l.s. bits of the
address must be ‘0’ - that is, the
address must be doubleword
aligned.
Must to be ‘0‘.
Must be ‘0’ to indicate that the
table entry is a command.
If the STAT_BIT=‘1‘, the content of the entry is the “status” infor-
mation, written by the ZR36067, of the most recently processed
field or frame. Table 11 shows the interpretation for this case.
Table 11: STAT_COM entry content, when
STAT_BIT=1
Bit
Content
31:24 F_CNT[7:0]
23
22:1 F_LENGTH[21:0]
0 STAT_BIT
Description
The serial number, modulo 256, of the
most recent field or frame. Used in
compression only.
Reserved, set to ‘0’.
The length of the most recently com-
pressed field or frame in bytes, used in
compression only. The length is dou-
bleword aligned, so bits 2..1 are
always ‘0‘.
‘1‘, indicating that this table entry is a
status written by the ZR36067.
9.2 Fragment Table
The Fragment Table (Figure 9) defines the structure of the allo-
cated memory for each code buffer. The table has N entries for
N allocated fragments. Each entry holds two doublewords:
• first doubleword - the physical address of the fragment (must
be doubleword aligned).
• second doubleword - has the following fields:
- bits 20:1, the fragment length in doublewords (the frag-
ment must be doubleword aligned),
- bit 0, F (“Final” bit), when ‘1’ indicates that this fragment is
the final fragment of the buffer,
- bits 31:21, unused, must be 0.
9.3 JPEG Compression Modes
The sequence of actions performed by the host software and the
ZR36067 is as follows:
• The host allocates the first four code buffers and writes out
the code buffer table and the fragment table.
• The host loads the ZR36067’s I_STAT_COM_PTR register
with the base address of the code buffer table.
• After the start of the compression process, the ZR36067
starts filling the fragments of the first code buffer with the
compressed data of the first field or frame.
• After successfully completing transfer of the compressed
data of a field or frame, the ZR36067 writes the status infor-
mation back to the STAT_COM entry of the current buffer. It
sets the STATUS_BIT in the STAT_COM entry, declaring its
content as status. It then issues an interrupt, and starts the
next field or frame process.
• If a new code buffer is unavailable at the beginning of a field
or frame process (that is, if the STATUS_BIT of the next
buffer entry is ‘1’), the ZR36067 polls the STAT_COM entry
until the buffer is available.
• When the host receives the interrupt, it checks the
STAT_COM entries in the code buffer table. For each entry
whose STAT_BIT=’1’, the host checks F_CNT to determine
whether any fields/frames were dropped. It records the code
buffer information, updates the fragment table and
STAT_COM entry of the code buffer, and returns it by reset-
ting STAT_BIT to ‘0’.
Several scenarios might cause a field or frame process to be
unsuccessful:
• The allocated code buffer memory was smaller than the ac-
tual field/frame code volume (the ZR36067 fills the final
fragment, but the field/frame code transfer is not complete).
• A ZR36060 strip memory overflow occurs during the field/
frame compression (might be caused by very large PCI bus
latency).
• The compression of a field has not ended by the time the
trailing edge of the next VSync is detected.
After an unsuccessful field/frame process in compression, the
ZR36067 does not issue an interrupt, re-uses the current code
buffer - that is, does not over-write its STAT_COM entry, and
restarts with the next field or frame. The software can determine
the number of fields or frames that were skipped by reading
F_CNT.
9.4 JPEG Decompression Modes
The sequence of actions performed by the host software and the
ZR36067 is as follows:
• The host allocates the first four code buffers and writes out
the code buffer table and the fragment table.
21