CHAPTER 4 BUS CONTROL FUNCTIONS
48
(2) When accessing word data at even address
Word data is accessed in 1-bus cycle with UBEB = 0 and A0 = 0.
Table 4-1 shows the relationship between the type of operand and the number of UBEB, A0 pins, and bus cycles.
Table 4-1. V30MZ Data Access
Operand
UBEB pin output level
A0 pin output level
Number of Bus Cycles
Word at even address
L
L
1
Word at odd address
1st bus cycle
L
H
2
2nd bus cycle
H
L
Byte at even address
H
L
1
Byte at odd address
L
H
1
Remark
L : low level
H : high level
Normally, the V30MZ performs an access (prefetch) of an operation code in word units. However, when a branch
to an odd address takes place, only 1 byte at that odd address is fetched and subsequent bytes are fetched again in
word units again.
When a vector table address is generated from the vector number (0 to 225), an even address is always
generated, and so an access to the interrupt vector table is always performed as word data at an even address.
Therefore, a vector table access to one interrupt is always performed in 2 bus cycles for the 2 words of the segment
base and offset.
4.1.1 Cautions on accessing word data
When accessing word data by the V30MZ, ensure that all the data that can be checked by the program may be
placed at an even address. When it is placed at an odd address, the result will be as follows.
One bus cycle for a memory access requires 1 clock. Therefore, every time word data at an odd address is
accessed, one extra clock of the instruction execution time are required compared to accessing word data at an even
address. This applies when executing an instruction that has more than one word data access.
In the case of a word data transfer from memory to memory, 2 memory accesses are required for a read from the
source and a write to the destination and so the execution time becomes the maximum when both are odd
addresses.
This problem of odd addresses also happens in stack manipulation. Registers, etc. are automatically saved to the
stack by interrupt servicing, but these are all word data and so when processed at an odd address, note that the
number of bus cycles is doubled and the interrupt response time is delayed.
Example:
Number of execution clocks of MOV reg, mem instruction
Byte data : 1
Word data : 2 (For odd address)
: 1 (For even address)
This is an example in which one word data access is performed.