CENTRAL PROCESSING UNIT (CPU)
7902 Group User’s Manual
2-11
2.2 Bus interface unit (BIU)
4-byte boundaries
8-byte boundaries
Even-numbered address
Fig. 2.2.2 BIU registers’ structure
Program address register
Instruction queue buffer
Data address register
Data buffer
PA
DA
Q0
Q9
DB
b23
b0
b23
b31
b7
Table 2.2.1 Functions of BIU registers
Name
Program
address
register
Instruction
queue buffer
Data address
register
Data buffer
In the M37902, the internal buses are used when the CPU accesses the internal area (the internal memory
and SFR) or the external area (the external devices).
2.2.1 Instruction prefetch
While the CPU does not use the internal buses, the BIU reads instructions from the memory and then
stores them in the instruction queue buffer. The CPU reads instructions from the instruction queue buffer
and executes them, so that the CPU can operate at high speed without access to the memory, which
requires a long access time.
The instruction queue buffer can store instructions up to ten bytes. The contents of the instruction queue
buffer is initialized when a branch is made, and the BIU reads a new instruction from the branch destination
address.
When instructions in the instruction queue buffer are insufficient for the CPU’s needs, the BIU extends the
low-level duration of
φCPU (See Figure 5.2.1.) in order to keep the CPU waiting until the BIU fetches
instructions of the required byte number or more.
The operation of instruction prefetch is determined
whether instructions are fetched from the internal
memory or external memory. Figure 2.2.3 shows
operating waveform examples at instruction prefetch.
Note that the operation of BIU’s instruction prefetch
also vary with the store addresses of instructions.
Table 2.2.2 lists the store address of prefetched
instructions.
Table 2.2.2 Store address of prefetched instruction
(1)
Instruction prefetch from internal memory
Instructions are fetched from 4-byte boundaries, 4 bytes at a time. (See Figure 2.2.3-(a).)
Also, at branch, regardless of the low-order 2 bits’ contents (AD1 and AD0) of the branch destination
address, 4 bytes are fetched at at time from the 4-byte boundaries. (See Figure 2.2.3 (a).)
In this case, out of the data (instructions) which will be output onto the internal code buses, 4 bytes
at a time, the instructions assigned at the branch destination address and the following addresses
will be fetched into the instruction queue buffer. Accordingly, as listed in Table 2.2.3, the number of
bytes to be fetched into the instruction queue buffer varies according to the branch destination
address.
Functions
Indicates a storage address of the
instruction to be fetched into an
instruction queue buffer, next.
Temporarily stores an instruction
which has been fetched.
Indicates an address from which data
will be read or to which data will be
written, next.
Temporarily stores data which has
been read from memoryI/O device
by BIU or which will be written to
memoryI/O device by the CPU.
X: It may be “0” or “1.”
AD2 (A2)
!
0
AD1 (A1)
!
0
AD0(A0)
0
Low-order 3 bits
at store address