Specifications

5
CPU
All H8 share a common CPU
architecture, a general purpose register
architecture that allows efficient
execution of software written in C and
produces dense code. A good code
density is important to reduce the
amount of memory needed,which in
turn results in a lower system cost and
helps to avoid external memory. As
shown below in figure 5 the 8-bit H8
families have 16-bit wide registers and
the 16-bit families have 32-bit wide
registers,all of which can also be used
partially (for example in bytes). H8S
adds an extended Condition Code
Register (EXR) to allow improved
interrupt control and H8S/2655 adds a
Multiply-Accumulate Unit (MAC) to
boost performance in DSP-type
applications.
Furthermore H8S executes basic
instructions in only one clock cycle,half
as many as H8/300H.
ER0
ER1
ER2
ER3
ER4
ER5
ER6
ER7
R0
R1
R2
R3
R4
R5
R6
R7
R0
R1
R2
R3
R4
R5
R6
R7
PC
CCR
CCR
31
15
7
0
15
7
0
23
15
0
EXR
MAC
PC
15
31
23
0
EXR
MAC
MAC on H8S/26xx only
ER0
ER1
ER2
ER3
ER4
ER5
ER6
ER7
R0
R1
R2
R3
R4
R5
R6
R7
PC
CCR
31
15
7
0
23
15
0
EXR
MAC
Sign Extended
Sign Extended
H8/300H
H8/300
H8/300L
H8S
Being general purpose there is no
restriction placed on how each register is
used,thus they can be used for pointer
or data operations. The architecture also
allows any of the data addressing modes
to be used in conjunction with any
register.
This rich set of general purpose
registers provides the compiler writer
with ample opportunities to optimise
the code generated by the compiler.
Local variables can be optimised into
registers wherever possible,thus
reducing the number of bytes of code
needed to manipulate them. Also,
because each register can be used as an
accumulator, index register or address
pointer, the address arithmetic which
must be performed by the compiler can
be done very effectively. Register ER7
is used as a stack pointer, so all accesses
to stack based data can be performed
very fast.
In addition to the general purpose
registers there are two control registers, a
Condition Code Register (CCR) and a
Program Counter (PC). The CCR is an
8-bit wide register which contains all the
CPU flags such as overflow,zero and
carry as well as the interrupt flags. The
carry flag also doubles as a bit
accumulator when the bit manipulation
operations are used.
The H8/300H CPU offers a H8/300
compatible mode which allows
straightforward reuse of existing H8/300
software. This mode is available in
H8/3032,H8/3042 and µCBIC
products.
Figure 5