• Aucun résultat trouvé

L2 Secondary Cache Protocol

Dans le document PowerPC to PCI Bridge (Page 126-130)

,ill I AACK# ____

5.7 L2 Secondary Cache Protocol

The L2 cache provides two different services-caching for 60X CPU accesses to system memory and snooping for PCI to system memory accesses. Table 5-22 shows the actions the L 1 and L2 caches and the 650 Bridge can take when the 60X CPU reads or writes system memory and when a PC I device reads or writes system memory.

Table 5-22. Cache and 650 Bridge Action Table

Transfer L1 Action L2 Action 650 Bridge Action

CPU to Any action taken by the L 1 does No bus action. (The L2 can Paces transfer.

Memory not have an effect on the SOX bus, invalidate, snarf, update, etc.) Accesses DRAM.

Transfer because the L 1 activity takes

place completely within the SOX Claims transfer with L2_CLAIM#. Does not pace the transfer.

CPU. Paces the transfer. Does not access DRAM.

Supplies (or receives) the data.

Backs off transfer with ARTRY#. Does not pace the transfer.

Asserts bus request. Does not access DRAM.

Arbitrates.

PCI to No bus action No bus action. Paces transfer.

Memory Accesses DRAM.

Transfer

Backs off transfer with ARTRY#. No bus action. Does not pace the transfer.

Asserts bus request. . Does not access DRAM.

Arbitrates.

No bus action. Backs off transfer with ARTRY#. Does not pace the transfer.

Asserts bus request. Does not access DRAM.

Arbitrates.

Backs off transfer with ARTRY#. Backs off transfer with ARTRY#. Does not pace the transfer.

Asserts bus request. Asserts bus request. Does not access DRAM.

Arbitrates.

5.7.1 L2 Caching for 60X CPU Accesses to System Memory

60X CPU reads or writes of system memory are serviced by the 650 Bridge unless L2_CLAIM#

is asserted (with L2_PRESENT# asserted) on the second CPU clock after the assertion of TS#

(transaction start) by the 60X CPU. When the 654 Controller senses L2_CLAIM# asserted, it drops the 650 Bridge completely out of the servicing of the transaction, and the L2 cache takes over driving the data, AACK#, and TA# lines to complete the cycle to the 60X CPU.

The L2_CLAIM# signal must be held asserted by the L2 cache throughout the remainder of the memory transaction, until the L2 asserts AACK# and TA# at the end of the transaction. The L2 Cache can assert AACK# one clock prior to the final TA# or during the same clock of the final TA#.

The L2_CLAIM# signal can be asserted before the second CPU clock after TS# is asserted by the 60X CPU, but the 650 Bridge only samples the signal on the second CPU clock.

The 650 Bridge Chip Set

5.7.2 Cache Snooping for PCI to System Memory Accesses

On PCI to memory cycles, the 654 Controller masters the 60X bus to drive the required snoop cycles to the 60X and L2. During PCI to system memory cycles, the 60X CPU and the L2 cache assert ARTRY# (rather than L2_ CLAIM#) for a cache hit. The 654 Controller drives AACK# active one CPU bus clock after it asserts T8# and then samples ARTRY# the next CPU bus clock.

To execute a snoop cycle, the 654 Controller drives the following 60X CPU bus control signals:

• TSIZ[0:2] (transfer size) is set to binary 100 (four bytes or one word).

• TT[0:3] (transfer type) is set to 01 01 bfor snooping a read to system memory and to 0001 b for snooping a write to system memory.

• TBST# is deasserted 5.7.2.1 Restoring ARTRY#

If the setup bit AR8TR is set to one when the 654 Controller samples ARTRY# active on the se-cond clock after TS#, the 654 Controller drives ARTRY# inactive the sese-cond clock after AACK#

is inactive and then tri-states its buffer. This is required because neither the L2 nor the 60X can restore ARTRY# since they both can be driving it and one is a 3.3V or 3.6V part and the other can be a 5.0V part. If ARSTR is not set, the device that asserts ARTRY# must deassert ARTRY# one clock after AACK# is asserted.

5.7.2.2 Arbitration on Cache Hits

The 654 Controller samples L2_CACHE_REQ# and CPU_REQ# the clock after ARTRY# is as-serted by either the 60X or the L2 or both. If only one request is active, the 654 Controller grants the bus to that requester (or refresh) before granting the bus to another master.

If both the 60X and L2 bus request lines are active, the 654 Controller grants the bus to the 60X first. If after the end of the cycle, the L2_CACHE_REQ# is still active, then bus mastershipis granted to the L2. (A well-behaved write-back L2 updates during the 60X write and drops its bus request.)

5.7.3 Error Checking for the L2 Cache

L2 cache designs store 64 data bits plus the 8 parity bits from the 60X CPU bus. When the L2 cache supplies data, it asserts both the 64 data bits and the 8 parity bits on the CPU bus. The 650 Bridge uses the DPE# signal from the 60X CPU to determine if there has been a parity error in the data supplied by the L2 cache.

The 654 Controller samples DPE# from the 60X CPU two clocks after each TA# is asserted by the L2 (L2_ CLAIM# was asserted) to determine if the L2 data has good parity. If the 654 Controller samples DPE# asserted, TEA# is asserted if the cycle is still in progress on the bus. (If DPE#

occurs after the cycle completes, the 654 asserts INT _CPU#.) 5.7.4 Additional L2 Cache Information

There is an exception to snooping the 60X CPU bus on every PCI to memory cycle. It occurs

dur-o ing a burst transaction when the PCI access is the most-significant word within a double-word boundary of system memory. A snoop is not necessary in this case because the cache sector has already been snooped by the low-order word within the double-word boundary.

The 654 Controller does not assert TA# during snoop cycles because these cycles are being run only to. snoop the 60X CPU and L2 cache for addresses that a PCI master is running to system memory.

102

The 650 Bridge Chip Set

A write-back l2 cache can execute 32-byte burst read or write cycles on the 60X CPU bus in the same manner as the 60X. The 654 Controller grants permission to the L2 cache to master the bus (L2_CACHE_GNT# is asserted) before the l2 cache can initiate a 60X cycle with TS#.

5.7.5 Example of a PCI to Memory Read Transaction With Cache Hit

The PCI to memory rea9 transaction shown in Figure 5-20 is identical to the one shown in Figure 4-15 upto PCLClK 2. To signal a cache hit, either the L 1 or L2 cache asserts ARTRY#

.so that the 654 Controller samples it asserted on PCL ClK 3. At this point, the 654 Controller gen-erates a PCI target retry, shuts down the memory controller, and begins an arbiter switch.

The 654 Controller generates a PCI target retry by asserting STOP# on PCLCLK 3 (DEVSEl#

remains asserted from PCLCLK 2). On PCLCLK 4, the 654 Controller negates DEVSEL# and STOP#(TRDY#was not yet asserted). A well behaved PCI bus master will also remove FRAME#

and IRDY# by PCLCLK 4. The 654 Controller also negates PCLOE# on PCLCLK 4 to disable the PCLAD bus drivers in the 653 Buffer.

To shut down the memory controller, the 654 negates MEM_DATA_SEL# on PCLCLK 4.

During PCI to memory write transactions with page hit and cache hit, WE# and MEM_DATA_OE#

are negated on PCLCLK 3, before the CAS# access sequence begins. During PCI to memory write transactions with page miss and cache hit, RAS# and RASHI/CASlO are driven high on the CPU_CLK following PCLCLK 2-a cache hit on PCLClK 3-causes them to be left high. This also forces a page miss on the next memory access.

To begin the arbiter switch, the 654 Controller removes the grant from the PCI bus master by PCLCLK 4. Meanwhile, the cache that signaled a cache hit (L 1 or L2 or both) asserts its bus re-quest signaL On the CPU_ClK following PCLCLK 5, the arbiter grants the bus to the rere-questing

cache. .

Since the current bus master is losing the bus grant, PCLSEl# and CPU_ADDR_OE# are driven high and AACK# is tri-stated on PCLClK 5.

The following notes refer to Figure 5-20:

1. These signals are sourced by the responding cache, L 1 or L2.

2. During PCI to memory transactions during which there is a cache hit by the L 1 or L2 cache, the responding cache must assert ARTRY# on the CPU_ClK after it samples TS# active, or the cache hit condition will not be recognized.

The 650 Bridge Chip Set

PCCCLK(C)

C/BE[3:0]# (C) '::XCwd XRyte Enables 1 X PCCAD (C) [PCI] --<Address TAC'

1

FRAME#(C) 1 \ 1 'single OF hurst 1 7

"

IRDY# (C)

\

1

, "

TRDY#(C)

,

"

DEVSEL# (C)

, "

STOP#

\ , "

PCCSEL# (C)

,

ADDRHIIDATALO (C) 1

\

1

,

MEM_DATA_SEL# (C)

\ I

MEM_PAGE_HIT# (C) \ ~it ,

CPU_CLK (C) BURST_CLK# (C) RASHI/CASLO (C) 1

MEM_ADDR(B) '::X~ __________________________ ~x~

______

~

__

RAS#(C) CAS# (C) MEM_DATA (B) PCCOE# (C) PCCAD (B) [B]

CPU_ADDR_OE# (C) CPU_ADDR (B) TS# (C) [C]

AACK# (C) [C]

ARTRY# (C) [Lx]

PCCGNT# (C) (1) Lx_REQ# (C) (1) Lx_GNT# (C) (1) TS# (C) [Lx]

--7-~~--~(~~=======(j~---_______________________________________________

-JI 1

xsdoop Xdares~ ~

___

~~~,~~~~~,---~--~----~--~--~---J, 1

~r~--~----~--~--~----~~"----~

~Siioop

1 ,I; 1

\ <f) \ Hit

I

I ,

1 'Arbiter switch I

~x Wr,ite Bapk r - - " : " " " " - - -...

L,J

--~--~~--~--~_T~~--~~--~----~I ~

Figure 5-20. PCI to Memory Read - Cac~e Hit Timing Diagram

104

The 650 Bridge Chip Set

5.7.6 Example of a CPU to Memory Read Transfer With Page Miss and L2 Cache Hit The single-beat CPU to memory read transfer shown in Figure 5-21 is typical of a CPU to memory read with page miss during cycles 0 through 2. By cycle 3 however, the L2 has driven L2_CLAIM#

active. During cycle 3, the example L2 drives the requested data onto the 60X data bus, and as-serts TA# and AACK# for one cycle, completing the transfer. If this was a burst transfer, the exam-. pie L2 would have kept TA# active for three more cycles while delivering three more beats of dataexam-.

Since a page miss occured on this transfer, RAS# and RASHI/CASLO were sent high in cycle 3. These two signals are left high. The 654 Controller leaves AACK# and TA# tri-stated, and does not assert CPU_DATA_OE#.

o

I 1 2 3

4 5

CPU_CLK (C) I

CPU_GNT#(C):_~ __ ~~ ____ ~/ __ ~ ______ ~ ______ ~ ______ ~ ______ __

TBST# (C) I =::J~~--rl ----,---;-~""'"---(c=

I

CPU_ADDR (C) I =::J)----.---C====~C===}_~----1c=

TS# (C) :

=::J , c=

L2_CLAIM# [L2] (C) I I

\~---~----~

AACK# [L2] (C) I ---;---~---r--'______'_ _ ___1

TA# [L2] (C) I =::J~~---....!...--...r----'---'---,

CPU_DATA [L2] (B) I

---'---r---'---<===J--...J....----CPU_ADDR_SEL# (C)

MEM_PAGE_HIT# (C) I _ _ _ _ ~---....J

I

RASHI/CASLO (C) I _ _ _ _ _ _ _ .1...-_ _ _ _ _ - - '

MEM_ADDR (B) I

x==

I---~--~--~~~---~

RAS# (C) I _ _ _ _ _ _ _ _ _ _ _ _ _ - - '

CAS#(C)'---~---~---MEM_DATA_SEL# (C) I

---~---___r_---I

MEM~DATA(B),~3S~--~---~---~ __ ----~---CPU_DATA_OE# (C) I ---"---'---....;....,.---~---~---

Dans le document PowerPC to PCI Bridge (Page 126-130)