Specifications

For example, for the chips in the H8/3297 series, the chip type defines the amount of internal
memory: from 16 to 60 kilo-octets or ROM and from 0.5 to 2 kilo-octets of RAM. The choice of
internal or external memory depends on the two input pins that define the operation "mode"
and on one bit in the System Configuration register (bit RAME in SYSCR).
The H8/3297 chips can operate in three modes:
Mode 3 is called "single-chip mode". In mode 3, the chip uses only internal memories and
large parts of the address space are reserved.
Mode 2 is called "expanded mode with on-chip PROM". In mode 2 the chip can use external
memory for those addresses that are reserved in mode 3, but still uses the internal ROM or
PROM as in mode 3.
Mode 1 is called "expanded mode without on-chip PROM". In mode 1 the address region for
the internal ROM/PROM is mapped to external memory instead; the only accessible
internal memory is the internal RAM (and the on-chip register field).
In modes 1 and 2, the target program can choose between internal or external RAM by
controlling bit RAME in the SYSCR register. If RAME is off, the internal RAM addresses are
mapped to external memory instead.
That was how the memory map is defined in the H8/3297 series of H8/300 chips. Other chip
series may have other rules.
In general, the memory map determines two aspects of a memory access:
how long it takes (longer for external memory), and
which storage location is accessed (internal or external).
In modes 1 and 2 the target program can control the RAME bit to access either the internal
RAM or an external memory. This means that the interpretation of an address in this region
depends dynamically on the value of RAME, which could be hard to handle in a static analysis.
In effect, there would be two memory "banks", an internal bank and an external bank, with
RAME as the bank selector.
Bound-T does not support or detect dynamic changes to RAME. Instead Bound-T assumes that
the memory map is fixed throughout the analysed part of the target program. For example, for
chips in the H8/3297 series Bound-T accepts command-line options to specify the mode and
the value of RAME.
If your target program does change the memory map dynamically, perhaps by changing RAME,
you should split the analysis in a like way and analyse separately each part of the program
with the corresponding memory-map options. If this is too difficult, you should use the worst-
case memory-map options (all memory is external) but this may lead to a considerably over-
estimated WCET bound.
Even if you can specify the correct memory map options, Bound-T may still over-estimate the
time for those dynamic memory accesses that Bound-T cannot bound enough to decide if they
map to internal or external memory. A common case is stack accesses; Bound-T usually does
not know the absolute value of the stack pointer. Here you should use the command-line
option -stack to tell Bound-T if the stack is in internal or external RAM.
5.8 Timing accuracy and approximations
Bound-T reports WCET values that take into account most of the timing features of the
H8/300. This section explains these features, how Bound-T models them, and where Bound-T
must make assumptions or approximations.
30 Supported H8/300 Features Bound-T for H8/300