www.fairchildsemi.com 8
SCANPSC100F
Parallel Processor Interface (PPI) (Continued)
READ AND WRITE CYCLES
A Write cycle (see Figure 2) is initiated by asserting CE
and R/W low followed by a LOW on STB a set time later.
CE
and STB are gated wi thin the PSC100F and may b e
asserted concurrentl y (i.e., zer o setup a nd hold time). Th e
address is then asserted on A2:0 to indicate which internal
address within the PSC100F will be written to by the processor. An address decoder within th e PSC100F monito rs
the address lines f or a valid PSC100F register ad dress.
Once a valid address has been decoded, the RDY
line
becomes active (a propagation delay time later). The active
RDY
line will go LOW immediately if the addressed register
is ready to accept data. If the addressed register is not
ready, the RDY
pin will remain HIGH preventing the processor from completing the bus cycle. Once the reg ister is
ready to receive date (s ee Table 2), the RDY
pin will go
LOW and processor can resume the write cycle. The processor then forces a HIGH on STB (a wait time a fter RDY
goes LOW) which latches the address (A2:0) and data
(D7:0) completing the bus cycle. The RDY
line is forced
HIGH a propagation delay later.
A Read cycle (see Figure 3) is initiated by asserting CE
LOW and R/W HIGH followed by a LOW on STB a set time
later. CE
and STB are gated withi n the PSC100F and m ay
be asserted concurre ntly (i.e., zero setup and hold time).
The address bits (A2:0) are then asserted to indicate which
internal address with in the PSC100F will be read by the
processor. An address decoder within the PSC100F monitors the address lines for a valid PSC100F register
address. Once a valid address has been decoded and if
the addressed PSC100 F register is ready to b e read (see
Table 2), valid data is placed on the Data lines (D7:0) a
propagation delay later and the ready line is asserted LOW.
If the addressed register is not ready (e.g. , the TDI shifte r/
buffer is empty), the ready line will remain HIGH and hold
the bus cycle until the register contains valid data. RDY
will
then go LOW allowing the read cycle to con tinue. Wit h the
HIGH-to-LOW edge on RDY
line, the processor can successfully read the valid data . Ho weve r, the bus cycle is n ot
completed within the PSC100F until the rising edge on STB
which resets the PSC10 0F rea d logi c (requ ired prio r to the
start of the next read cycle).
Important note concerning the use of RDY
: The RDY
signal provides a useful “handshake” between the
PSC100F and the processor. However, care must be taken
when using the PSC100F RDY
signal to prevent a large (or
indefinite) numbe r of processor genera ted wait states. Fo r
example, if the TDO shifter/buffer is not enabled for shift
operations and the processor writes to the TDO shifter/
buffer address 3 times, the two registers which make up
the TDO shifter/buffer will accept the first two bytes of data,
but since the data is not shiftin g out, the 3rd byte will be
held off by the RDY
signal indefinitely. An equally sever e
problem could resu lt with a finite number of wait states if
the application use s dynamic memo ries. Holding t he local
bus with the PSC100F RDY
line long enough to violat e a
DRAM refresh time will result in lost data within the
dynamic memo ry.
Writing and Reading without the use of RDY
: With use
of worst case PSC100F timin g, Write a nd Rea d cyc les ca n
be successfully comple ted witho ut the use of t he RDY
signal. All read and write cycles will complete within 2.5 SCK
cycles (worst case). Therefore, by assuring at least 2.5
cycles occur after the rising edge of STB, b us cycles can
be completed without using the RDY
“handshake”. The critical timing relationship within the PSC100F for write and
read operation is betwee n the rising edge of STB an d the
falling edge of SCK. The rising edge of strobe latches the
address/data and also generates the internal signals
required to complete read/write within the PSC100F
(including a signal with resets the read/write logic and
releases the RDY line ). The propagation o f these internal
signals is initiated on the first falling edge of SCK after the
STB pin is asserted HIGH. If the rising edge on STB occurs
an internal setup time (t
S4
) or greater before the falling
edge of SCK, the bus cycle can be comp leted within 1.5
SCK cycles (see Figure 4). However, if the internal setup
time is not met, the propagat ion of internal control/reset
signals is delayed until the next falling edge of SCK (1 SCK
cycle later) which effectively completes the read/write operation and reset the logic for the next bus cycle within 2.5
cycles (see Figure 5). Synchronizing the rising edge of STB
with the falling edge of SCK to assur e that t
S4
is met pro-
vides the maximum performance for a read/write operation.
However, the asynchronous interface can be used effectively with software delays, hardware delays or programmed wait states (to assure 2.5 SCK cycles are
completed) to avoid the need for synchronization.
Consecutive Reads and Writes: Separate control logic
and data/address latche s are used for a read and write
operation within the PSC100F. This allows a write to occur
after a read (o r conversely, a read to occur after a write)
prior to the 1.5/2.5 SCK clock cycle requirements
described above. The timing for a read (or write) followed
by a write (or read) is shown in Figure 5 and Figure 6.
SYNCHRONIZATION
Writes and reads can be synchronized by using any of
three methods: polling, interrupts, or wait state generation:
• Status bits may be polle d to see if a register is ready to
be written to or read from . To stabilize the status bits for
read operations, the Update Status bit must be set in
MODE2 to latch the status.
Note: The status bits only provide the state of the shifter/buffers and do not
indicate that an internal write or read is complete. Therefore, for applications not usi ng the RDY
signal to monitor the internal write/read status, timing must be c ontrolled to as s ure that at l east 2.5 SCK cycles are completed
between consecut iv e read or consecutive wr ite cyc les.
• Any of three different events can be us ed to generate
interrupts by forcing the INT pin HIGH, see Table 1.
• The RDY
pin can be used to hold off the ho st until the
addressed register is ready to be accessed. As
described above, this pi n can also be used to hold off
additional reads/writes until the synchr onizer ha s recovered from the previous read/write. RDY
= 0 signifies that
the SCANPSC100F is ready to complete the current PPI
cycle. The logic that determines the state of RDY
is
summarized in Table 2.
Reading from CNT32 can be synchronized f or testing by
using the Single Step Counter mode bit.