Specifications

Memory areas
The H8/300 has three kinds of memory area:
On-Chip Memory. Most of this is usually ROM with a smaller part of RAM. An access takes 2
execution states, whether for read or write and for either octet or word data.
On-Chip Register Field. This area contains memory-mapped peripheral registers. An octet
access takes 3 states and a word access (including instruction fetches and stack accesses)
takes 6 states.
External Memory. This is ROM or RAM that is not on the same chip as the processor. Access
time is the same as for the On-Chip Register Field plus possible wait states.
The address range for the several areas the memory map depends on the model of the
processor, that is, the specific chip, and perhaps also on the "operating mode" and status
settings of the chip. The on-chip memory is usually at the start of the address range and the
on-chip register field is at the end. You must use the command-line option -device=X to tell
Bound-T which device is used.
When the device is known, for an access to a statically known memory address Bound-T can
look up the kind of memory at this address and determine the correct access time. For a
dynamic (register indirect) memory address Bound-T cannot always determine the memory
area and must then assume the worst case (external memory or on-chip register field).
Disabled on-chip RAM
In some H8/300 devices the program can disable or enable the internal (on-chip) RAM
memory by clearing or setting the RAME bit in the System Control Register (SYSCR). When the
internal RAM is disabled, addresses normally mapped to the internal RAM will instead access
external memory and so are slower.
Bound-T assumes that the RAME setting is constant for all code in one analysis, according to
the command-line option -internal_ram=enabled or -internal_ram=disabled. This lets Bound-T
know whether to assume fast (internal) or slow (external) access time for "internal RAM"
addresses. If this assumption is false, and the program instead switches back and forth between
enabled and disabled internal RAM, you must specify -internal_ram=disabled to be safe with
respect to the access time in the disabled state, but this will over-estimate the access time in
the enabled state. Note, moreover, that dynamic changes in the enabled or disabled state of
the on-chip RAM is equivalent to memory bank switching and may invalidate even the control-
flow analysis of Bound-T.
Input-output instructions
There are two special instructions, MOVFPE and MOVTPE, that synchronize with the peripheral
E (enable) clock and therefore have a variable execution time. The variable component is the
operand access time which varies from 9 to 16 execution states.
Summary
To summarize, the following H8/300 architectural features can lead to approximate (over-
estimated) execution times for the concerned instructions:
Memory access time for dynamic addressing when Bound-T cannot determine the area that
is accessed.
Run-time changes to the enabled or disabled state of the internal (on-chip) RAM memory.
The instructions MOVFPE and MOVTPE.
18 H8/300 Timing Analysis Bound-T for H8/300