How we do them and measure the results
- Code Size: TOTAL. This measurement is in
BYTES, and is taken from the code map generated by
the L51 linker. Look for it in the Link Map of
Module. The last CODE entry address, plus the
length of that segment are used to compute the actual
code size. This value will include the length of
gaps, whichif you have themare a part of
your overall code size as any other space used will
become a part of your program.
- Code Size: MODULE. This measurement is in
BYTES. This value can be found in the .LST listing
file as a part of the translation summary located at
the end of the listing. We exclude the CONSTANT SIZE
because they can not always appear in the listing
file. When several files are used, such as DHRY.C and
TIME.C, we use the TOTAL of these sizes. Check the
claims of the other vendors, and you'll find that
they DO NOT use a summary. Preferring instead to use
only the main file, to bolster their
misleading representations.
- Data Size: STATIC. This measurement is in
BYTES. This value is derived from the linkers .M51
map file. It includes all the internal memory usage,
including the chips machine stack. In fact, it will
always be at least the absolute address of the stack
+ 1.
- Data Size: DYNAMIC. This measurement is in
BYTES. To make this measurement we run the target
program with an emulator (although in most cases a
simulator is sufficient). We stop the program at the
first statement in main(), and fill all memory space
with a known pattern (we use 0x55 and 0xAA). Then we
run the program until it's over, but trapping it
before it could enter an infinite loop. When the
program is done, we go back and manually count the
data spaces to determine the actual usage. In case
the 0x55 pattern is found in the results,
we re-run this measurement and use the 0xAA value as
a double check.
- Data Size: TOTAL. This measurement is in
BYTES, and represents the sum of the two preceding
values.
- Xdata Size: STATIC. This measurement is in
BYTES. It is derived from the sum of the XDATA
segments listed in the linkers .M51 file, and
includes the length any gaps and the last listed
XDATA segment. It does NOT include the external stack
(if present) segment.
- Xdata Size: DYNAMIC. This measurement is in
BYTES. As in the Data size dynamic measurement
mechanism, we stop the actual execution and fill
memory with a known pattern. The Keil compiler uses
an external stack located at 0xFFFF. So we fill that
last Kbyte of memory with our known value, and see
how much has been altered with use. The Franklin
compiler my use xdata at various locations depending
upon linker settings. The appropriate place is found
and usage is measured in a similar and consistent
manner.
- Xdata Size: Total. This measurement in is
BYTES, and represents the sum of the two preceding
values.
- Execution Time: The basis for this measurement
will vary depending upon the nature of the program
under test. Only the useful portions of
the program are counted. For instance, program
initializations and any final printf() statements are
not counted as they can be unduly influenced by the
baud rate of the output device. We have tried to
indicate in the sources where the start and end of
these points are located. As a final note, resolution
is unit dependent.