English
Language : 

AN910 Datasheet, PDF (48/51 Pages) STMicroelectronics – ST7 AND ST9 PERFORMANCE BENCHMARKING
ST7 AND ST9 PERFORMANCE BENCHMARKING
9.1.2 Code size measure
Code size is measured with the assembly code. The result is the number of bytes used to
code the test routine (in Test Loop part) without the set and reset instructions for the I/O pin.
Here is an example of a Test Loop:
0000
0002
0004
0006
0009
000B
000C
000D
000E
000F
0010
0012
0014
C290
7809
7982
900200
7F79
E6
93
F7
08
0A
DFF9
D290
22
test:
loop:
finish:
setb p1.0
mov r0, #srcpointer
mov r1, #destpointer
mov dptr, #200h
mov r7, #121
mov a, @r0
movc a, @a+dptr
mov @r1, a
inc r0
inc r2
djnz r7, loop
clr p1.0
ret
; set I/O pin
; beginning of test routine
; end of test routine
; reset I/O pin
The code size of this assembly code equals (12h-2h) = 10h = 16d, thus 16 bytes.
9.2 CALCULATION
9.2.1 Execution time and code size ratios
From execution time and code size measures, preliminary ratios with ST9+ MCU as
reference have been calculated for each test. Using those results, a global execution time
ratio and a global code size ratio have been calculated as an average of all ratios.
As all the tests could not have been implemented on all MCUs (see <Italic>9.2.2 Memory
considerations<Italic end>), one or two different results are presented for each MCU. The
first one, available for all the MCUs, has been calculated with the reduced set of tests
performed on all the MCUs (Table 14). The second one, only available for some MCUs, has
been calculated with the full set of tests (Table 15).
Table 14. Reduced set of tests
Tests concerned
Resulting ratio formulas
ET = execution time
CS = code size
string, char, bubble(10 words), blkmov(64 bytes), convert, 16mul, shright, bitrst
sum(ET ratios of reduced set)
Global ET ratio for reduced set =
number of tests of reduced set
sum(CS ratios of reduced set)
Global CS ratio for reduced set =
number of tests of reduced set
48/51