Bound-T time and stack analyserApplication NoteRenesas H8/300Issue 1TR-AN-H8300-001 2010-02-25Tidorum Ltd.Tidrum
1.5 Typographic conventionsWe use the following fonts and styles to show the role of pieces of the text:Register The name of a H8/300 register embedde
2 USING BOUND-T FOR H8/3002.1 Input formatsExecutable fileThe target program executable file must be supplied in the standard GCC COFF format, or in t
Some H8/300 devices require or allow further device-specific options which are listed in a separate table in section 2.3.Table 1: Command optionsOpt
OptionMeaning and default value-sym=fileFunctionLoads more symbol definitions from the named file, adding to the symbol tables read from the main exec
(X) for which the target program is intended. For example, the option -device=3292 chooses the H8/3292 device. Equivalent forms are -device=lego, or -
2.4 S-Record file formatA target program in S-record formatBound-T for the H8/300 can read target programs in an S-record format, a common textual fil
2.5 H8/300-specific symbol-file formatThe generic -symbols optionBound-T has a generic option -symbols for naming additional symbol-definition
Bound-T chooses the calling protocol as follows, depending on the format of the target program executable file being analysed:• If t
3 WRITING ASSERTIONS3.1 OverviewIf you use Bound-T to analyse non-trivial programs you nearly always have to write assertions to control and guide the
To find out the linkage names in the target program, you can either dump the executable file (run Bound-T with just the executable file name as argume
Tidorum Ltdwww.tidorum.fiTiirasaarentie 32FI-00200 HelsinkiFinlandThis document was written at Tidorum Ltd. by Niklas Holsti.The document is currently
• Using the absolute address:subprogram address "14D4"• Using a positive hexadecimal offset relative to the entry point of Rerun:subprogram
variable address "pw2" 55;-- The parameter word that was pushed immediately before-- the JSR has the value 553.4 StacksCurrently Bound-T for
4 THE H8/300 PROCESSOR AND TIMING ANALYSISThis chapter starts by describing the H8/300 processor. The focus is on how the H8/300 architecture and i
Program Counter and Condition Code RegisterThe 16-bit Program Counter (PC) register points to the next instruction. Instructions are 16 or 32 bits in
Memory areasThe 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 exec
One instruction, SLEEP, can lead to an underestimated execution time because the duration of the "sleep mode" is not included in the WCET bo
5 SUPPORTED H8/300 FEATURES5.1 OverviewThis chapter explains in detail how Bound-T models H8/300 instructions, registers and status flags. We will fir
Table 7: Generic limitations of Bound-T Generic Limitation Remarks for H8/300 targetUnderstands only integer operations in loop-counter computations.N
H8/300 instruction RemarksCMP.B #i, RnL followed by SUBX #j, RnH Modelled as the 16-bit operation CMP.W #j:i,Rn, an instruction that is not implemente
H8/300 instruction RemarksDAA, DAS, DIVXU Result is opaque.ROTL,ROTR, ROTXL, ROTXR, SHAL, SHAR, SHLL, SHLRResult is opaque.BAND, BIAND, BILD, BIST, BL
PrefaceThe information in this document is believed to be complete and accurate when the document is issued. However, Tidorum Ltd. reserves the right
Combining 8-bit operations into 16-bit operationsWhen a processor only supports short arithmetic, such as 8 or 16 bits on the H
Stack dataOn the H8/300, a subprogram usually stores its local variables in the stack and accesses them using Register Indirect mode based on the Stac
This model is incomplete and rather ad-hoc. For example, in the real processor the instruction sequenceMOV.B #255, R3LADD.B R3L, R4Hhas exactly the sa
Instruction Z condition C conditionNEG RdRd = 0 Rd > 0NOTopaque−ORresult = 0−ORC #k, CCRZ or (bit 2 of k) C or (bit 2 of k)POP, PUSH result = 0−ROT
Table 11: Condition codes in BccMnemonic BccMeaning Interpretation depending on the -bcc option-bcc=signed -bcc=unsignedBRA (BT) Always (True) True (b
Jump address tables and switch/case statementsWhen a switch/case statement has a dense (numerically consecutive) set of case labels the compiler often
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 t
Memory wait statesAccess to on-chip memory (ROM, RAM or register field) does not involve wait states, but off-chip memory access can force the process
6 PROCEDURE CALLING PROTOCOLS6.1 Calls and returns in the H8/300In this chapter, we discuss how H8/300 programs use subprograms (procedures and functi
In the remaining sections of this chapter, we explain each supported calling protocol and how Bound-T interprets it. Note that a calling protocol usu
Contents1 INTRODUCTION 11.1 Purpose and scope...11.2 Overview
Bound-T tracks the changes in SP and translates SP-relative addresses with varying offsets to addresses relative to the SP on entry (after the BSR or
7 WARNING AND ERROR MESSAGES7.1 Warning messagesThe following lists the Bound-T warning messages that are specific to the H8/300 or that have a speci
Warning Message Meaning and RemedyCOFF ".file" entry with no file-name.ReasonsThe COFF symbol table contains a primary entry of ".file&
Warning Message Meaning and RemedyMeaning of P not understood and thus ignoredReasons The assertion P on the value of the property bcc_signed allows m
Warning Message Meaning and RemedyActionIf you want to use symbolic names and/or source-code references, supply a COFF file with a symbol table. The u
Table 14: Error messagesError Message Meaning and RemedyAccess to reserved memory address A is assumed to reach external memoryProblem The target prog
Error Message Meaning and RemedyAt most one S-record file allowed; it was "file1 ". The file "file2 " is rejected.ProblemThe comma
Error Message Meaning and RemedySolutionIf this problem has some serious effects, obtain a correct COFF file in a form that Bound-T supports, or trans
Error Message Meaning and RemedyReasons1. The executable file may be invalid. It may be damaged or contain a program for another member of the Renesas
Error Message Meaning and RemedyReasonsThe line is too long. Note that blanks and other white-space characters are included in the length.SolutionShor
TablesTable 1: Command options...
Error Message Meaning and RemedyS-record too long; at most N characters allowed.ProblemThe S-record file (the target program file, or a file named in
Error Message Meaning and RemedySolutionSee the error message "Invalid instruction".Unexpected end of COFF fileProblemThe COFF executable fi
Error Message Meaning and RemedyUnknown value for -mode: value Problem The value given for the command-line option -mode=value is not recognised.Reaso
Document change logIssue Section Changes1 All First issue.vi
1 INTRODUCTION1.1 Purpose and scopeBound-T is a tool for computing bounds on the worst-case execution time and stack usage of real-time programs; see
Stack usage analysisIn a similar way, Bound-T can analyse the machine code to find out where the stack pointer is changed and how much it is changed.
Originally published by Hitachi Ltd.3rd edition, September 1997.[6] GCC, the GNU Compiler Collection.http://gcc.gnu.org/.[7] H8/300 IAR C Compiler Ref
Kommentare zu diesen Handbüchern