
1-13
Cache Units
1
PRELIMINARY
1.2.5.2
Speculative Execution
The M II CPU is capable of speculative execu-
tion following a floating point instruction or
predicted branch. Speculative execution allows
the pipelines to continuously execute instruc-
tions following a branch without stalling the
pipelines waiting for branch resolution. The
same mechanism is used to execute floating
point instructions (see Section 1.6) in parallel
with integer instructions.
The M II CPU is capable of up to four levels of
speculation (i.e., combinations of four condi-
tional branches and floating point opera-
tions). After generating the fetch address using
branch prediction, the CPU checkpoints the
machine state (registers, flags, and processor
environment), increments the speculation level
counter, and begins operating on the predicted
instruction stream.
Once the branch instruction is resolved, the
CPU decreases the speculation level. For a
correctly predicted branch, the status of the
checkpointed resources is cleared. For a
branch misprediction, the M II processor
generates the correct fetch address and uses
the checkpointed values to restore the machine
state in a single clock.
In order to maintain compatibility, writes that
result from speculatively executed instructions
are not permitted to update the cache or
external memory until the appropriate branch
is resolved. Speculative execution continues
until one of the following conditions occurs:
1) A branch or floating point operation
is decoded and the speculation level
is already at four.
2) An exception or a fault occurs.
3) The write buffers are full.
4) An attempt is made to modify a
non-checkpointed resource (i.e.,
segment registers, system flags).
1.3
Cache Units
The M II CPU employs two caches, the Unified
Cache and the Instruction Line Cache (Figure
1-2, Page 1-15). The main cache is a 4-way
set-associative 64-KByte unified cache. The
unified cache provides a higher hit rate than
using equal-sized separate data and instruction
caches. While in Cyrix SMM mode both SMM
code and data are cacheable.
The instruction line cache is a fully associative
256-byte cache. This cache avoids excessive
conflicts between code and data accesses in the
unified cache.
1.3.1 Unified Cache
The 64-KByte unified write-back cache func-
tions as the primary data cache and as the
secondary instruction cache. Configured as a
four-way set-associative cache, the cache stores
up to 64 KBytes of code and data in 2048
lines. The cache is dual-ported and allows any