ZR36057 ZORAN [Zoran Corporation], ZR36057 Datasheet - Page 15

no-image

ZR36057

Manufacturer Part Number
ZR36057
Description
ENHANCED PCI BUS MULTIMEDIA CONTROLLER
Manufacturer
ZORAN [Zoran Corporation]
Datasheet
5.4 PostOffice Handshaking Protocol
Reading data from or writing data to any of the ZR36057 guests
using the PostOffice mechanism requires the host software to
follow the handshaking protocol described below. The main idea
is that the host has to poll the PostOffice request pending bit in
order to confirm the availability of the GuestBus and verify the
validity of the data contained in the PostOffice data byte. In
general, host accesses to the PostOffice register may change
the PostOffice pending bit, as explained below. Thus, the host
software must ensure that accesses to the PostOffice register
are governed by a central routine. For example, independent
accesses to the PostOffice register both from an interrupt
service routine and the main processor task(s), or from more
than one task in a multitasking environment, might cause a
deadlock, unless explicit protection measures are taken.
5.4.1
• The host reads the PostOffice register, and checks the Post-
• The host writes a full doubleword to the PostOffice register,
GADR[2:0]
GADR[2:0]
GDAT[7:0]
GDAT[7:0]
Office pending bit. If this bit is ‘1’, the write cycle cannot be
executed now, because the GuestBus master is busy exe-
cuting a previous PostOffice read or write request. Once this
bit is ‘0’, the write request can be made.
containing the data byte to be sent to the guest, the guest’s
PCI CLK
PCI CLK
GCS0
GCS2
GWR
GWR
GWS
GWS
GRD
GRD
Host Writes to a Guest Device
1
1
0x0
2
2
3
3
Data valid from ZR36057
Figure 4. Two Examples of GuestBus Cycles
0x1
4
4
5
5
Example 1
Example 2
Enhanced PCI Bus Multimedia Controller
15
6
6
5.4.2
• The ZR36057 completes the current code-write cycle, if one
• The host may read the PostOffice register, to verify that the
• Note that in multiple (back-to-back) PostOffice operations
• The host reads the PostOffice register, and checks the Post-
identity (0,...,7), the specific guest register (0,...,7), and an
indication that this is a write request (direction bit = 1). As a
result of writing to the PostOffice data byte, the PostOffice
pending bit is set to ‘1’.
is being executed, and, before executing the next code-write
cycle (if one is needed), it executes the pending PostOffice
request. At the completion of the GuestBus write cycle it
clears the request pending bit.
pending bit is ‘0’, meaning that the write request has been
completed.
the host has to poll the request pending bit only once be-
tween two requests, since reading this bit zero indicates
both that the previous request has been completed and that
the next request can be made.
Office pending bit. If this bit is ‘1’, the read cycle cannot be
executed now, because the GuestBus master is busy exe-
cuting a previous PostOffice read or write request. Once this
bit is ‘0’, the read request can be made.
7
7
Host Reads from a Guest Device
8
8
Sampling Points
0x5
9
9
10
10
Data valid from Guest
11
11
12
12
13
13

Related parts for ZR36057