Home
SuperH RISC Engine Simulator/Debugger, User`s Manual
Contents
1. 1 Register Name Whether or Not Supported PTEH Supported PTEL Supported TTB Supported TEA Supported MMUCR Supported EXPEVT Supported INTEVT Supported TRA Supported CCR Supported QACRO QACR1 Supported SARO SARS3 Not supported DARO DARS3 Not supported DMATCRO DMATCR3 Not supported CHCRO CHCR3 Not supported DMAOR Not supported MCR Not supported BCR1 BCR2 Partly supported WCR1 WCR2 Partly supported WCR3 Not supported RTCSR Not supported RTCNT Not supported RTCOR Not supported RFCR Not supported Note Even if values are modified or referenced for the registers that are not supported via a dialog box that controls registers etc the simulator debugger execution will not be affected The following shows how each control register is supported by each field HITACHI Rev 3 0 09 00 page 17 of 276 Table 3 6 Control Registers Supported by the SH 4 SH 4 SH7750R Simulator Debugger 2 Register Name Field Name Whether or Not Supported BCR1 ENDIAN Supported MASTER Not supported AOMPX Not supported AOBST Not supported ABBST Not supported A6BST Not supported DRAMTP Not supported IPUP Not supported OPUP Not supported A1MBC Not supported A4MBC Not supported BREQEN Not supported PSHR Not supported MEMMPX Not supported HIZMEM Not supported HIZCNT Not supported A56PCM Not supported BCR2 A6SZ A0SZ Supported PORTEN Not supp
2. 161 Figure 5 96 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time 162 Figure 5 97 Setting Profile List Dialog Box eseseseseseeeeeeseeeeee nennen eene enne 164 Figure 5 98 Profile Tree Window sess eerie nennen trennen nennen ens 165 Figure 5 99 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time 166 Figure 5 100 Find Data Dialog nennen eene ennt 167 Figure 5 101 Setting Profile Tree Dialog Box eese 168 Figure 5 102 Profile Chart Window esee enne enne 169 Figure 5 103 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time 170 Figure 8 1 Source Window ione tee eU pe HERO ROI DIEM 211 Figure 8 2 Disassembly enne nennen nenne etre enne 212 Figure 8 3 Assembler Dialog Box eite ieri petere etit eigen 213 Figure 8 4 Labels Window ete Rep e ebrei p ib vee 214 Figure 8 5 Label Dialog Box Dh terere eren 214 Figure 8 6 Set Address Dialog nennen nennen enne 215 Figure 8 7 Find oo eet hee de a let 216 Figure 9 1 Open Memory Window Dialog Box eeeeeeeeeeeeeeeee nennen nennen 217 Figure 9 2 Memory Window nennen nennen eene 217 Figure 9 3 Set Address Dialog
3. Trace capacity 1024 records C 4096 records C 16384 records C 32758 records Figure 5 24 Trace Acquisition Dialog Box This dialog box specifies the conditions for trace information acquisition Trace start Stop Disable Disables trace information acquisition Enable Enables trace information acquisition Instruction type Instruction Acquires trace information for all instructions Subroutine Acquires trace information for the subroutine instructions only Trace buffer full handling Continue Continues acquiring trace information even if the trace information acquisition buffer becomes full Break Stops execution when the trace information acquisition buffer becomes full Rev 3 0 09 00 page 82 of 276 HITACHI The trace buffer capacity can be selected from 1024 records 4096 records 16384 records 32768 records in the Trace capacity Clicking the OK button stores the settings Clicking the Cancel button closes this dialog box without modifying the settings 5 16 Trace Search Dialog Box Trace Search Ed Item C PTR C Cycle C Address Instruction Value BRA Figure 5 25 Trace Search Dialog Box This dialog box specifies the conditions for searching trace information Specify a search item in Item and search for the specified contents in Value PTR Pointer in the trace buffer for the last executed instruction specify in the form of
4. eese 15 Memory Types for the SH A SH 4 7750R Simulator Debugger 16 Control Registers Supported by the SH 4 SH 4 SH7750R Simulator Debugger 1 17 Control Registers Supported by the SH 4 SH 4 SH7750R Simulator Debugger 2 18 VQ F fctions tote ete teet iR eS 24 Processing When a Break Condition is Satisfied esses 34 Simulation e t o ER n ire e rers 35 Register States at Simulation Error Stop ssseeeeeeeeeee nee 36 Simulator Debugger Commands essere nennen 173 Simulator Debugger Commands cont esee 174 Information Messages eee iet pre Ie e EU sp cuupbendeveeveees 207 Error Messages eene bie hepmeete re pe Re DUI oi teen 208 Rev 3 0 09 00 page xix of xx HITACHI Rev 3 0 09 00 page xx of HITACHI Section 1 Overview The Hitachi Debugging Interface HDI is a Graphical User Interface intended to ease the development and debugging of applications written in programming language and assembly language for Hitachi microcomputers Its aim is to provide a powerful yet intuitive way of accessing observing and modifying the debugging platform in which the application is running Key Features e Windows GUI for debugging e Intuitive interface e On line help e Common Look amp Feel Note The HDI does not run on Windows version 3 1 The simulator debugger provi
5. di aie p a 180 BREAK Xai hatte sentences Seer ie eec ten oen CE etico ren rer 181 ema pde Ges 181 BREAK REGISTER etude ice tee ee etre e e e eve El E e des 182 5 heeswdeneeresotdbeeeend deerant e eerie ied 182 eiat eR UR nS eot tte e eR SH 183 ERASE oin ag WO REB QUON G GN CHE E 183 PVA UA E 184 BILE OAD te teen pmi 185 185 VERIBEY 186 187 E ru a DW E M aes 187 nsec is a ea REN 188 PRATT esos SCR pet temen cdd 189 eS oe Te EES 189 Rev 3 0 09 00 page x of xx HITACHI IAAT M a AS A RI PRETI POSU 190 ocu wast a E 190 MAP DISPEAY 5 eara e RU DR o e ERR a 191 ee aie e RS 191 MEMORY DISPLAY eshetett preesse ee ee desir beet edet d edere edes 192 MEMORY EDIT 3c 3238 panied iia ie eee A ei ee ei eh a 193 MEMOR N BUT pune Son iced a 194 MEMORY MOVE 3 edges guae 195 MEMORY DES T 35er bete Pp Do beide ges 195 196 I D D e E 196 REGISTER DISPLAY Een REPERIO rien reta 197 REGISTERSSET wiegt ui m EH Ue a partes 197 RESET 235 ia esha ettet im 198 5 mrena ie
6. Field Bitl 7 16 450 bit Bitl 8 Field Bitl 3 12 A350 bit Bitl 4 A2H Field Bit9 8 250 bit Bitl 0 A1H Field Bit5 4 A180 bit Bit6 Field Bit1 0 050 bit Bit2 Help Cancel Figure 5 66 WCR3 Dialog Box This dialog box specifies the values of the wait control register 3 WCR3 This dialog box is provided only for the SH 4 series In this dialog box specify the following values AOH Field to A6H Field Data hold time for the corresponding area 0 to 6 AOSO bit to 4650 bit Setup time of the write strobe signal for the corresponding area 0 to 6 Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 127 of 276 HITACHI 5 46 RTCSR Dialog Box ln ele Figure 5 67 RTCSR Dialog Box This dialog box specifies the values of the refresh timer control status register RTCSR This dialog box is provided only for the SH 4 series In this dialog box specify the following values Selecting each box turns the setting on CMF bit CMIE bit OVF bit OVIE bit LMTS bit CKS Field Compare match flag Compare match interrupt enable bit Refresh count overflow flag Refresh count overflow interrupt enable bit Refresh count overflow limit select bit Clock select bit The simulator debugger does not support the functions marked wit
7. 0000036018 00000038 0000036019 00000038 xxxx 0000036020 00000038 0000036021 00000038 4 00000030 20 MOV 0A R2 R3 00000008 sortia 5 00000032 5182 MOV L 8 R15 R1 sort a R3 00000009 sortia 00003 lt 00000009 sort a sort sortia sortia 0000036013 00000038 20 1F32 sortia x x x x x x x x Figure 5 23 Trace Window for SH 4 Series This window displays the following trace information items PTR Pointer within the trace buffer The latest instruction is 0 CYCLE Total number of instruction execution cycles cleared by pipeline reset The CPU internal clock cycles are counted as execution cycles For the SH 4BSC one execution cycle is equivalent to three external cycles ADDRESS Program counter value codel Fetched code 1 code2 Fetched code 2 The code currently decoded is marked with If the two codes are executed in parallel the code fetched at the smaller address is marked with EX EAS Instruction number that was executed in the E stage accessed memory in the A stage or wrote back data in the S stage in the EX pipeline LS EAS Instruction number that was executed accessed memory or wrote back data in the LS pipeline BR EAS Instruction number that was executed accessed memory or wrote back data in the BR pipelin
8. 43 4 351 WAGE EP tor one 43 TEB 43 43 16 Sen nh DR emm E 43 43 17 i Rea Ua eon Red 44 Rev 3 0 09 00 page iv of xx HITACHI 4 4 4 5 4 6 4 7 4 8 4 3 18 Cache he tive sot sch ststeee sees ty ak Re RD 44 4 3 19 Simulated VO 3 2 eet AI aae anita she 44 4 3 20 Control Register none ente e tete E heirs 44 453 2T St ck Trace oo Ure SU e e Ua eee eI 44 4 3 225 External TOOL eet erede ie pino Ee eee ede s 44 step epe ie eade pedale eee diese S 44 44 1 Reset CPU RR ERU tends 44 4432 Om eue Se uai UNS 44 44 3 ReSeE GO o odere etes ep ree aros rere dn erstens 45 Go To Cursor eicere edet eter eter rere Epor eere gs 45 4 45 Set PC TO CUISOE nea ote deae eg 45 44 6 R ni iicet ete eet etti HR ret adips 45 AAT StepiInissssooo eee ee RP RU Up ei Ue ee 45 44 8 Step OVer aisoceseehepeneiheten tiec et iere re Rete 45 4 4 9 StepQut uscite ATA D te it tede e me nt ke 45 AA AO Step izicie ordre tete edis 46 AA eene eA ae eS 46 46 4 eedem 46 45 2 MOA sos roeneon aden 46 5 2 cese PURO ERROR HIER RI 46 455 AAE E t a O TAE E eroe eene reto tr on eid i ted 46 45 5 Test sesso oe e DEDE e 46 45 6 caec
9. c hdi tutorial h8s test mot Figure 9 10 Verify S Record File with Memory Dialog Box You can offset the verification address from the address specified in the S Record by entering a value positive or negative in the Offset field Click the Open button or press ENTER so that the dialog box closes and the file and the memory contents are verified When the file verification is completed a confirmation message box may be displayed this can be switched off in the Confirmations tab on the HDI Options dialog box Rev 3 0 09 00 page 223 of 276 HITACHI Rev 3 0 09 00 page 224 of 276 HITACHI Section 10 Executing Your Program This section describes how you can execute your program You can either run your program continuously or step single or multiple instructions at a time 10 4 Running from Reset To reset your user system and run your program from the reset vector address choose the Run gt Reset Go menu option or click the Reset Go toolbar button Uh The program will run until it hits a breakpoint or a break condition is satisfied You can stop the program manually at any time by choosing the Run gt Halt menu option or by clicking the Halt toolbar button Sh Note The program will start running from whatever address is stored in the reset vector location Therefore it is important to make sure that this location contains the address of your startup code 10 2 Continuously Running Your Program Whe
10. Cycle Total number of execution cycles required for the function Rev 3 0 09 00 page 68 of 276 HITACHI Count Total number of calls for the function 26 Ratio of execution cycle count required for the function to the execution cycle count required for the whole program Histogram Histogram display of the above ratio Double clicking a function to be evaluated displays the Performance Option dialog box In this dialog box functions can be modified Up to 255 functions can be specified A popup menu containing the following options is available by right clicking within the view area 5 9 1 Add Range Adds a new function to be evaluated Clicking this option launches the Performance Option dialog box allowing the user to add a function 5 9 2 Edit Range Only enabled when the highlighting bar is on a user defined range Launches the Performance Option dialog box allowing the user to modify the range s settings 5 9 3 Delete Range Only enabled when the highlighting bar is on a user defined range Deletes the range and immediately recalculates the data for the other ranges 5 9 4 Reset Counts Times Clears the current performance analysis data 5 9 5 Delete All Ranges Deletes all the current user defined ranges and clears the performance analysis data 5 9 6 Enable Analysis Toggles the collection of performance analysis data When performance analysis is active a check mark is shown to the left of the text
11. BD C0 FF B NE A break occurs when a value other than H FF is written to memory address H CO in byte BD 4000 1000 A break occurs when H 1000 is written to memory address H 4000 in longword Note For the SH 3DSP series specify values within the range H A5000000 to H A501FFFF X and Y memory virtual addresses corresponding to physical addresses H 05000000 to H 0501FFFF as the start end addresses for X or Y memory accesses by the MOVX or MOVY instruction Rev 3 0 09 00 page 180 of 276 HITACHI BREAK_DISPLAY Abbreviation BI Description Displays a list of breakpoints Syntax bi Parameter Type None Description Displays a list of breakpoints Examples BREAK_DISPLAY BI BREAK_ENABLE Abbreviation BE Description Enables or disables a breakpoint Syntax be lt flag gt lt index gt A list of breakpoints is displayed A list of breakpoints is displayed Description Enabling or disabling of a breakpoint Enable Disable Index of the breakpoint to be canceled If the index is omitted all breakpoints are deleted Parameter Type flag Keyword E D index Numeric Examples BREAK ENABLE D 0 BE E The first breakpoint is disabled breakpoints are enabled Rev 3 0 09 00 page 181 of 276 HITACHI BREAK_REGISTER Abbreviation BR Description Specifies a register data as a break condition Syntax br lt register name gt lt data gt lt size gt
12. If you are debugging at assembly language level using the Source window in assembly language or mixed display then you will probably find it useful to see the contents of the CPU s general FPU and DSP registers You can do this using the Registers window Registers Oo _ imi xi Register Value oo000000 ooo000000 ooo000000 00001018 111 00000000 2 Figure 12 8 Registers Window To open a Registers window choose the View gt Registers menu option or click the CPU Registers toolbar button i A Registers window opens showing all of the CPU s general FPU and DSP registers and their values displayed in hexadecimal 12 5 Expanding a Bit Register If a register is used to control or display status using flags at the bit level then you will see a plus sign expansion indicator to the left of its name this means that you can expand it To do this double click on the plus sign to show the flags indented by one tab character and the plus sign changes to a minus sign If the flags have sub groups for example register masks they will also have expansion indicators next to them Rev 3 0 09 00 page 240 of 276 HITACHI Registers oy oy x Register Value R10 oooooo000 R11 oooooo000 R12 00000000 R13 00000000 Standard register R14 00000000 R15 00000000 00001018 SR 1111 T M 0 Q IMASK I3 IMASK IZ Expanded bit
13. Rev 3 0 09 00 page 69 of 276 HITACHI 5 10 Performance Option Dialog Box Performance Option Ed Function Name sort Help Figure 5 16 Performance Option Dialog Box This dialog box specifies functions including labels to be evaluated Evaluation results are displayed in the Performance Analysis window Note that when an overloaded function or a class name including a member function is specified the Select Function dialog box opens In the dialog box select a function For details refer to section 14 Selecting Functions Clicking the OK button stores the setting Clicking the Cancel button closes this dialog box without setting the function to be evaluated Rev 3 0 09 00 page 70 of 276 HITACHI 5 11 Registers Window Gy Registers Register Value RO 00000000 R1 00000000 R2 00000000 R3 00000000 R4 00000000 R5 00000000 R6 00000000 R 00000000 RS 00000000 R9 00000000 R10 00000000 R11 00000000 R12 00000000 R13 00000000 R14 00000000 R15 00000000 00000000 SR 1111 Q IMASK 13 IMASK I2 IMASK I1 IMASK IO Reserved Reserved S T Figure 5 17 Registers Window Allows the user to view and modify the current register values A popup menu containing the following options is available by right clicking within the window 5 111 Copy Only available if a block of text is highlighted This copies the selected text into the Windows
14. The toolbars are listed in a multi selection list box To individually switch off a toolbar clear the check box next to the name this name is displayed in a mini title bar when the toolbar is not attached to the border of the main frame window Note The menu bar cannot be switched off Rev 3 0 09 00 page 251 of 276 HITACHI If you need to conserve desktop area for example when using a portable then clear the Cool Look check box to revert to the classic Windows 3 1 style menu and toolbars It is possible to add user defined toolbars click on the New button and enter a name for your toolbar This can be edited later in the Toolbar Name edit box feature only available for user defined toolbars The new toolbar in this case called Toolbar will appear floating at the top left of the main frame but will have no buttons To add buttons you will now have to customize your toolbar 15 4 2 Customizing Individual Toolbars Customizing individual toolbars requires a mouse or other pointing device The feature is not available if only the keyboard is available This is because the toolbars only operate with a mouse so customizing them would be unnecessary unless you have a mouse Select the Commands pane to set the individual buttons in each toolbar Toolbars Commands Button categories Categories Buttons File Ska oa Buttons available Description Select a category then click a button to s
15. eene rennen 38 Second nes oem bes io ok Ue iua dnd donacio gat 39 nm ME EP HP 39 AVA SNew2SesslOD a c ee ERE ENERO E EYE 39 27 deoad SesstOlzn eii cm etit EUR 39 AE Save SessIOna ui e t geo E ten re IR 40 4 174 6CSaVe SessIODncAS oi Sas See enero RE tee 40 4 15 Load Program ORDRES UA MS 40 41 65 MaE eco rhet eoe ee ede ere eret e ee 40 7 besa hee 40 42 OTS TS OE TO ER e eR 40 ADA Q t ii eusanesedugai ee inne old A 40 ADD CODY si ioo eb aen oae e bi dene a onte i 41 42 3 ttt atenta ES ESI 41 ADA Findac cathe Reip adidas adici iut 41 ADS LEV Ate 41 AB NASW E E 41 434 Breakpoints DD epe PUE 41 4 3 2 Command Lane eat eive tein iT cae eee aee 42 4 3 3 JDisassemblyc ren Otero d pre dip uere 42 4344 eee ee eR eO m EH THeg 42 4 395 1 42 4 3 6 Memo eal ee ith Ee es ique benedi 42 4 37 Performance Analysis os eter RUFI ER USER eot 42 43 8 JProfil Eist zi une EUH e m o RI 42 2 3 9 Profiles Tree EE RE 43 4 3 10 Registers inesse eee eee 43 4311 LEE 43 A EN 43 4 3 T3 By 01 i ep
16. Connect Directly to Hardware Start in Coupled Mode Model Logging Disabled nne sh7729 inst Instance Name E gt Edit Memory Map System configuration completed Figure 16 2 Eagle Console Display 16 4 3 Selecting the Target Pressing the GO button in the Eagle Console window will run the hardware simulator This will start the HDI Then you will be prompted to choose a CPU SH 3DSP Simulator z Exit C Previous session file 0_sim Co_sim Debue Co_simhds Figure 16 3 Select Session Dialog Box Note Co verification can be performed for SH 3DSP and SH 4 SH DSP SH7065 only Rev 3 0 09 00 page 264 of 276 HITACHI 16 4 4 Setting the Memory After running the HDI choose Configure Platform from the Setup menu and open the Eagle Console window to set the memory map and endian CPU SH 3DSP Bit size 32 System Call Address Enable 00000000 Endian Big Endian Execution Mode Memory Map Stop C Continue 00000000 03FFFFFF EXT 32 1 04000000 O4FFFFFF 1 0 321 r Round Mode 05007000 05008FFF XRAM 32 1 C Round to nearest 05017000 05018FFF YRAM 321 08000000 DFFFFFFF EXT 32 1 x Round to zero coer un ama Add Delete Help Cancel Figure 16 4 System Configuration Window 16 4 5 Mapping the Memory Resource Define the memory map to access memory models Choose Configure Map from the
17. Copy ou oue eU RID IDEE RI Ue edge uei 62 o oS ES DIE E i eE A E A EE AAEE ae Ei RON peur 62 2 60 87 S D Aa I 63 D369 EE ice 63 S 2 Ves ERO ie 64 6 11 SAVE 64 54 Lbocals Sa cso eh Pes eR a eoe 65 ELLE 65 9 72 Bdit Value se eee t en bo 65 Ja Rad oO E INN 66 Rev 3 0 09 00 page vi of xx HITACHI 5 8 Memory WiIndOW inenthepbundtee pone RR UD rte ree 66 SEL R heshacesgnseeanehteceo rs non he eU ugue eee 66 5 8 2 Eoad antea REPERI 66 3 8 9 usa eei RU RU EE E RU eie oe Ue tees 67 8 4 c 67 o llis thee A tc ee ete ibas qe as oh 67 93826 COPY c s Ret ae Ree aa sa GERUNT RSEN RU etes 67 29 9 7 Compare op neti ieee ie aie aie A ee 67 x ME dC 67 3 0 0 Set Addt SS tei RA Deu EROS P ee eee Em 68 5 8 10 ASCII Byte Word Long Single Float Double Float esses 68 5 9 Performance Analysis Window esses enne nennen enne 68 JOT Add Range ose RE RUE RU E ER Mie cies 69 5 9 2 EditRange eeu pU 69 59 3 D let Range incessere ar en Oi eee e cii ert eb det 69 5 9 4 Reset Counts Times ione ee epe Eee iei ER Gr EEFE EE 69 5
18. REGISTER_SET Abbreviation RS Description Changes the contents of a register Syntax rs lt register gt lt value gt lt mode gt Rev 3 0 09 00 page 197 of 276 HITACHI Parameter lt register gt lt value gt lt mode gt Examples RS PC StartUp RS RO H 1234 WORD RESET Abbreviation RE Description Type Keyword Numeric Keyword byte word long single double Description Register name Register value Data size optional default corresponding register size Byte Word Longword Single precision floating point Double precision floating point Sets the program counter to the address defined by the symbol _StartUp Sets word data H 1234 to RO Resets the microprocessor All register values are set to the initial values of the device Memory mapping and breakpoints are not initialized Syntax re Parameter none Example RE Type Description Resets the microprocessor Resets the microprocessor Rev 3 0 09 00 page 198 of 276 HITACHI SLEEP Abbreviation none Description Delays command execution for a specified period Syntax sleep lt milliseconds gt Parameter Type Description lt milliseconds gt Numeric Delayed time ms Default radix it is not always decimal is used if you do not specify D Example SLEEP D 9000 Delays 9 seconds STEP Abbreviation ST Description Single step in source line or instructio
19. clipboard allowing it to be pasted into other applications Rev 3 0 09 00 page 71 of 276 HITACHI 5 11 2 Edit Launches the Register dialog box allowing the user to set the value of the register indicated by the text cursor not mouse cursor 5 11 3 Toggle Bit Only available if the text cursor is placed on a bit field e g a flag within a status register Changes the current state of the bit to its other state e g a set overflow flag can be cleared 5 12 Source Window The Source window can be used to view any source file that was included within the object file s debug information this may be C C and assembly language S Sort c OF x Line Address BP Label Source n long a 10 long j int 1 min max 00000004 for i20 1 lt 10 i 0000000c 00000014 WEG lt 0 00000018 j2 X O000001c alij 1 00000038 e sorta 00000040 min a 0 AAANANA A Figure 5 18 Source Window It supports column specific double click actions e BP Sets clears a program PC breakpoint at that address e Address Launches the Set Address dialog box allowing the user to enter a new address If the address is within the range of this file then the view will scroll such that the cursor can be positioned correctly If the address is in a different source file then that file will be opened in a new window with the cursor set to the specified address Finally if
20. x Cancel Show Size IV Show Stack Size JV Show Times Show only executed function s Include data of child function s Figure 5 101 Setting Profile Tree Dialog Box Column group check boxes set to display or not to display a specific column Checking in the Show Only Executed Function s check box disables displaying unexecuted functions If a stack information file sni extension output from the optimizing linkage editor does not exist unexecuted functions are not displayed even if this check box is not checked Include Data of Child Function s check box sets whether or not to display information for a child function called in the function as profile data Rev 3 0 09 00 page 168 of 276 HITACHI 5 71 Profile Chart S Profile Chart rand EE main _rand HULL 3 Figure 5 102 Profile Chart Window This window displays the relation of calls for a specific function This window displays the calling relation for the function specified in the Profile List window or Profile Tree window The specified function is displayed in the middle the calling function on the left side and the called function on the right side Values beside the calling and called functions show the number of times the function has been called The Profile Chart window includes the following tool buttons e Expands Size e Reduces Size Right clicking on the mouse within the window displays a popup menu Support
21. 13 1 Displaying Section Group When the overlay function is used that is when several section groups are assigned to the same address range the address ranges and section groups are displayed in the Overlay dialog box Open the Overlay dialog box by choosing the Setup gt Overlay menu option Address Section Name 001000 001023 002000 002005 Figure 13 1 Overlay Dialog Box at Opening This dialog box has two areas the Address list box and the Section Name list box The Address list box displays the address ranges used by the overlay function Click to choose one of the address ranges in the Address list box Overlay Ea Address Section Name 001000 001023 PsectO1 Psectii 002000 002008 Psect02 Psect12 PsectO3 Psecti3 Figure 13 2 Overlay Dialog Box Address Range Selected Rev 3 0 09 00 page 243 of 276 HITACHI The Section Name list box displays the section groups assigned to the selected address range 13 2 Setting Section Group When using the overlay function the highest priority section group must be selected in the Overlay dialog box otherwise HDI will operate incorrectly First click one of the address ranges displayed in the Address list box The section groups assigned to the selected address range will then be displayed in the Section Name list box Click to select the section group with the highest priority among the displayed section groups Address Section Name 001000 001023 PsectO1 Psec
22. Access type Address where a break occurs Number of times that a specified instruction is fetched default 1 Start address of memory where a break occurs if the memory is accessed End address of memory where a break occurs if the memory is accessed If no data is input only the start address is break range Read Write or Read Write Rev 3 0 09 00 page 53 of 276 HITACHI Break Data Start Address Address of memory where a break occurs Data Data value that causes a break Size Data size Option Data match mismatch Break Register Register Register name where break conditions are specified Data Data value that causes a break If no data is input a break occurs whenever data is written to the register Size Data size Option Data match mismatch Note that when Break Sequence is selected under Type the Break Sequence dialog box opens When PC Breakpoint is selected if an overloaded function or class name including a member function is specified in Start Address the Select Function dialog box opens In the dialog box select a function For details refer to section 14 Selecting Functions Clicking the OK button sets the break conditions Clicking the Cancel button closes this dialog box without setting the break conditions Note For the SH 3DSP series specify values within the range H A5000000 to 501 X and Y memory virtual addresses corresponding to physical addresses H 05000000
23. After selecting the entry to be modified in the list box click the button The Operand Cache Modify dialog box will open and the OC contents can be modified Flush Flushes all OC entries Clicking the button clears the U and V bits of all entries to zero and invalidates all OC entries Clicking the OK button stores the modified contents in the memory Clicking the Cancel button closes the dialog box without storing the modified contents Rev 3 0 09 00 page 155 of 276 HITACHI 5 66 Cache Modify Dialog Box This dialog box modifies the OC contents of the entry selected in the Operand Cache dialog box This dialog box is provided only for the SH 4 series and the displayed contents differ according to the target CPU SH 4 SH 4BSC Entry H 001 Tag Address H 01 000000 Long Wordi Long Word4 Update 00000000 44444444 Iv Valid Long Vord1 Long YYord5 11111111 55555555 Long Word2 Long YYord6 H 22222222 H 66666666 Long Word3 Long YYord n 33333333 H 77777777 Help Figure 5 90 Operand Cache Modify Dialog Box for SH 4 SH 4BSC The following items can be specified Entry Entry number selected by the Operand Cache dialog box Tag Address Tag address A longword physical address must be specified Bits 31 to 10 are valid Update Indicates whether or not the entry has been written to Selecting this box makes the simulator debugger assume that
24. HITACHI Table 3 10 Register States at Simulation Error Stop Error Message PC Value Memory Access Error e When an instruction is read SH 3DSP and SH DSP series The third instruction address before the instruction that caused the error SH 1 SH 2 SH 2E SH 3 SH 3E and SH 4 series The instruction address before the instruction that caused the error The slot address if an error occurs when a branch destination is read e When an instruction is executed The instruction address following the instruction that caused the error Illegal Operation The instruction address following the instruction that caused the error Illegal DSP Operation The second instruction address following the instruction that caused the error Invalid DSP Instruction The second instruction address following the instruction that caused the Code error TLB Multiple Hit The address of the instruction that caused the error Use the following procedure when debugging programs which include instructions that generate simulation errors a First execute the program in the stop mode and confirm that there are no errors except those in the intended locations b After confirming the above execute the program in the continuation mode Note If an error occurs in the stop mode and simulation is continued after changing the simulator mode to the continuation mode simulation may not be performed correctly When restarting a simulation always rest
25. In this case use the Edit dialog box in the longword format To open the Edit dialog box in the longword format open the Memory window in the longword format and double click the data to be modified The simulator debugger does not change the high order three bits of the address tag stored in a cache address array to zeros When loading a program by using the Load Object File dialog box to the area where the cache is mapped or copying memory data to this area by using the Copy Memory dialog box clear the bit of the MMUCR to zero to disable the MMU 3 5 2 Cache Hit Rate Checking and Displaying the Cache Hit Rate The simulator debugger displays the cache hit rate in percentage in the Platform sheet in the System Status window The cache hit rate is obtained by dividing the cache hit count by the cache access count the sum of the cache hit count and cache miss count The cache hit count and the cache miss count are also displayed Initializing the Cache Hit Rate The displayed cache hit rate is reset to zero when the simulator debugger is initiated the pipeline is reset or the CCR register value is modified In the SH 3DSP series the cache hit rate is reset to zero also when the CCR2 control register value is modified Rev 3 0 09 00 page 14 of 276 HITACHI 3 6 Bus State Controller BSC For the SH 4BSC the simulator debugger has the functions for specifying and modifying the memory map to use the BSC the user program us
26. Memory menu to display the memory map Rev 3 0 09 00 page 265 of 276 HITACHI Memory System Conf igurat ion Memory map 00000000 OSFFFFFF EXT 04000000 O4FFFFFF 1 0 05007000 05009FFF XRAM 109017000 05018 YRAM System memory resource 08000000 DEFFFFFF EXT 0000000 FFFFFFFF 1 0 05007000 05008FFF Read Write 05017000 05018FFF Read Write Modity Delete Reset Help Close Figure 16 5 Memory Map Dialog Box Clicking the Add button displays the System Memory Resource Modify dialog box System Memory Resource Modify Start address 00000000 End address IH oof FF Cancel r Access type Read C Write Read Write Help Figure 16 6 System Memory Resource Modify Dialog Box In the Access type box specify one of the following access types Read Only read enabled Write Only write enabled Read Write Read and write enabled Note Set the memory map to access memory models Rev 3 0 09 00 page 266 of 276 HITACHI 16 4 6 Opening External Tools Window Choose External Tools from the View menu to display the External Tools window E External Tools giai Co Verification tool Terminate gt Figure 16 7 External Tools Window Tool name Eaglei of Synopsys Inc is displayed Attribute Co verification tool is displayed Status Terminate or Connect is displayed 16 4 Opening Eagle Window Clicking the External Tools wind
27. Removes the selected breakpoint To retain the details of the breakpoint but not have it cause a break when its conditions are met use the Disable option see section 5 1 5 Disable Enable 5 1 4 Delete All Removes all breakpoints from the list 5 1 5 Disable Enable Only enabled if a breakpoint is selected Toggles the selected breakpoint between enabled and disabled when disabled a breakpoint remains in the list but does not cause a break when the specified conditions are satisfied When a breakpoint is enabled a check mark is shown to the left of the menu text and a circle is shown in the Enable column for the breakpoint 5 1 6 Go to Source Opens Source or Disassembly window at address of breakpoint Rev 3 0 09 00 page 52 of 276 HITACHI 5 2 Set Break Dialog Box Set Break x Type C PC Breakpoint C Break Access C Break Data Break Register Break Sequence Start address End address Register Data L Access type C Read Write Readfyrite Byte Single float C Word C Double float C Long Word Option Equal C Not equal Count Hep Cancel Figure 5 2 Set Break Dialog Box This dialog box specifies break conditions A break type to be set is specified using the radio buttons in the Type box Items that can be specified are listed below PC Breakpoint Start address Count Break Access Start address End address
28. Rev 3 0 09 00 page 101 of 276 HITACHI 5 28 MMUCR Dialog Box This dialog box specifies the following values of the MMU control register MMUCR This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series The displayed contents depend on the target CPU SH 3 SH 3E and SH 3DSP Series MMUCR EI RC Field Bit5 4 V SV bit Bit8 Iv TF bit Bit2 IV Ix bit Bitl V AT bit Bit0 Cancel Figure 5 44 MMUCR Dialog Box for SH 3 SH 3E and SH 3DSP Series The following items must be specified Selecting each item turns the setting on RC Field Random counter SV bit Single virtual memory mode bit TF bit TLB flush bit Selecting this box and clicking the OK button flushes TLB IX bit Index mode bit AT bit Address translation bit Specifies whether or not to enable the MMU Rev 3 0 09 00 page 102 of 276 HITACHI SH 4 Series MMUCR x LRUI Field Bit31 26 00000000 SV bit Bit8 URB Field Bit23 18 7 TI bit Bit2 rooo00000 sam pitBit9 URC Field Bitl 5 10 m US Enn Figure 5 45 MMUCR Dialog Box for SH 4 Series 7 AT bit Bit0 The following items must be specified Selecting each item turns the setting on LRUI Field Number indicating the ITLB entry to be replaced when an ITLB miss occurs URB Field Boundary value of the UTLB entry to be replaced URC Field Random counter value which indicates the
29. To select all functions in the Select Function Name list box click the gt gt button 14 2 2 Deleting a Function Click the function you wish to delete from the Set Function Name list box and click the lt button To delete all functions in the Set Function Name list box click the button 14 2 3 Setting a Function Click the OK button to set the functions displayed in the Set Function Name list box The functions are set and the Select Function dialog box closes Clicking the Cancel button closes the dialog box without setting the functions Rev 3 0 09 00 page 246 of 276 HITACHI Section 15 Configuring the User Interface When we designed the user interface for HDI we tried to make all the frequently used operations quickly accessible and have related operations grouped in a logical order However when you are in the middle of a heavy debugging session you may find it more useful to have a different arrangement of the user interface items or you may just have a personal preference for the way you want it arranged We realize this and so HDI allows you to customize the user interface so that you can be satisfied with the tool that you are using for debugging your program This section describes how you can arrange the user interface windows customize various aspects of the display and save the configuration 15 1 Arranging Windows 15 11 Minimizing Windows If you have temporarily finished using an open window but
30. displays that an exception processing error has occurred and enters the command input wait state When the Stop is selected stop mode Executes steps 1 to 3 above then stops SH 3 SH 3E and SH 3DSP Series e When Continue is selected continuation mode Detects an exception during instruction execution 2 Saves the PC and SR to the SPC and SSR respectively 3 Sets the BL bit RB bit and MD bit in the SR to 1s 4 Sets an exception code in control register EXPEVT If necessary appropriate values are set in other control registers 5 Sets the PC to the vector address corresponding to the exception cause If an exception is detected when the BL bit in the SR is 1 reset vector address H A0000000 is set in the PC regardless of the exception cause 6 Starts instruction execution from the address set in the PC When the Stop is selected stop mode Executes steps 1 to 5 above then stops Rev 3 0 09 00 page 19 of 276 HITACHI SH 4 Series e When Continue is selected continuation mode 1 Detects an exception during instruction execution 2 Saves the PC and SR to the SPC and SSR respectively 3 Sets the BL bit RB bit and MD bit in the SR to 1s 4 Sets the FD FPU disable bit in the SR to 0 at reset 5 Sets an exception code in control register EXPEVT If necessary appropriate values are set in other control registers 6 Sets the PC to the vector address corresponding to the e
31. sese rennen 12 3 5 2 Cache Hit Rate eerie dne e DURER ODIO De pe ERU 14 3 6 Bus State Controller BSC anireo niee rni eene ener enne 15 3 7 Direct Memory Access Controller 15 3 8 SH 4 SH 4 SH7750R Supporting Functions eene 16 3 811 16 3 8 2 iene iit ek Me ee eibi Lee aa 16 3 8 3 External Internal Clock Ratio etm 16 3 8 4 Control Registers PR eripe bi ERO P ror HR ERR leased 16 3 0 Exception Processing ettet REI ee etd biete ein oe ua ee e RE dte iun dg 19 3 10 Control Registers etri ee Dt e ERU 20 E EE 21 Rev 3 0 09 00 page iii of xx HITACHI 3 12 Standard I O and File I O Processing sese 24 3 13 Break Conditions Pa CE Ue pe a TE 34 3 13 1 Break Due to the Satisfaction of a Break Command Condition 34 3 13 2 Break Due to the Detection of an Error During Execution of the User Program 35 3 13 3 Break Due to a Trace Buffer ener 36 3 13 4 Break Due to Execution of the SLEEP Instruction 37 3 13 5 Break Due to the STOP Button eeseseseeeeenenerenenne enne 37 3 14 Floating Point D ta eere EE Uere ae ted Ee ence d redo dk 37 3 15 Display of Function Call History
32. the new address then a Disassembly window shows assembly language code Rev 3 0 09 00 page 215 of 276 HITACHI 8 4 1 Looking at the Current Program Counter Address Wherever you can enter an address or value into HDI you can also enter an expression see section 2 2 Data Entry If you enter a register name prefixed by the character the contents of that register will be used as the value in the expression Therefore if you open the Set Address dialog box and enter the expression the Source or Disassembly window display will go to the current PC address You can also display from an offset of the current PC by entering an expression with the PC register plus an offset e g PC 0x100 8 5 Finding Text You can search for a particular text string in the Source window using the find option To do this choose the Find menu option from the popup menu or use the F3 accelerator key The Find dialog box is displayed Find L2 1x Find what locali Eind Next r Direction Cancel C Up Down Figure 8 7 Find Dialog Box Enter the text that you wish to find and click Find Next or press ENTER The Source window will display the text if found highlighted To find the next occurrence of the text click Find Next or press ENTER again To close the Find dialog box click Cancel or press ESC Rev 3 0 09 00 page 216 of 276 HITACHI Section 9 Working with Memory This
33. 00 page 98 of 276 HITACHI 5 25 PTEL Dialog Box This dialog box specifies the following values of the page table entry low register PTEL This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series The displayed contents depend on the target CPU SH 3 SH 3E and SH 3DSP Series PTEL Ed PPN Bit30 1 0 SZ Bit Bit4 H 20000000 1 Kbyte page C 4Kbyte page PR Field Bit6 5 PV Mode User Mode Iv V bit Bit8 Read only No access 7 C bit Bit3 C Read Write No access C Read only Read only 7 D bit Bit2 C Read Write Read Write SH bit Bit1 Cancel Figure 5 40 PTEL Dialog Box for SH 3 SH 3E and SH 3DSP Series PPN Physical page number in longword size PR Field Page protection status PV Mode User Mode Read only No access Enables read in privileged mode Read Write access Enables read and write in privileged mode Read only Read only Enables read in privileged or user mode Read Write Read Write Enables read and write in privileged or user mode SZ Bit Page size bit V bit Valid bit C bit Cacheable bit Rev 3 0 09 00 page 99 of 276 HITACHI D bit Dirty bit SH bit Sharing bit SH 4 Series PTEL EI PPN Bit28 1 0 H 20000000 SZ Bit Bit Bit4 Cancel 1 Kbyte page C 4 Kbyte page C B4 Kbyte page UNE Help PR Field Bit6 5 a au PV Mode User Mode Cbit Bit3 Read only No access
34. 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 zi Help Figure 5 81 Cache Dialog Box for SH 3 and SH 3E Series This dialog box displays the cache contents in Way0 to Way3 This dialog box is provided only for the SH 3 SH 3E SH 3DSP series and SH DSP with Cache The following items are displayed Ent Entry number in the cache The specifiable value depends on the CPU SH 3 and SH 3E series H 00 to H 7F SH 3DSP series H 00 to H FF SH DSP with Cache H 00 to H 3F U Update bit When this bit is 1 the entry has been written to V Validity bit When this bit is 1 the entry is valid LRU Numerical string that determines which way s entry should be replaced when cache miss occurs The same LRU value is assigned to the same entry in all ways Tag adr Tag address to LW3 Longword data to 3 stored in cache Rev 3 0 09 00 page 145 of 276 HITACHI Internal Internal RAM mode Selecting this box enables a half of the cache to be used as the internal RAM when 8 Kbyte or 4 Kbyte is selected in Capacity Capacity Cache capacity Note The items marked with are displayed only for the SH 3 and SH 3E series The cache contents can be modified and flushed using the following buttons Modify Modifies the cache contents After selecting the entry to be modified in the list box click the button The Cache Modify dialog box will open and the cache contents can be modifie
35. 22222222 33333333 44444444 55555555 66666666 77777777 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Cancel Figure 5 84 Instruction Cache Dialog Box for SH 4 SH 4BSC The following items are displayed Ent Entry number in the IC H 00 to H FF V Validity bit When this bit is 1 the entry is valid Tag adr Tag address LWO0 to LW7 Longword data 0 to 7 stored in IC entries The IC contents can be modified
36. Box nennen eene nennen eene ens 219 Fis re 94 Edit Dialog Box eR one TPeDR UH otn tUe iius 220 Figure 9 5 Search Memory Dialog Box sees eene enne 220 Figure 9 6 Fill Memory Dialog Box sese 221 Figure 9 7 Copy Memory Dialog Box sees eene nennen nenne ene ens 222 Figure 9 8 Save Memory As Dialog Box sseeeeeeeeeeeeeeen nennen nennen een rennen 222 Figure 9 9 Load Memory Dialog nennen nennen rene enne 223 Figure 9 10 Verify S Record File with Memory Dialog Box esee 223 Figure 10 1 Highlighted Line Corresponding to PC Address eee 225 Figure 10 2 Step Program Dialog Box sese eene eere 228 Figure 11 1 Setting a Program Breakpoint sese enne 230 Figure 11 2 Breakpoints Window sese 231 Rev 3 0 09 00 page xvii of xx HITACHI Figure 11 3 Run Program Dialog trennen rennes 233 Figure 12 1 Tooltip Watch tae eee meti ce EE Ee rte ene 235 Figure 12 2 Instant Watch Dialog 236 Figure 12 3 Add Watch Dialog Box esent trennen 237 Fig ure 124 Watch Window eee eret ierit te He di rit e ee erento 237 Figure 12 5 Expanding a Watch insiren reesen t oie atse EEE e rene enne 238 Figure 12 6 Edit Value Dialo
37. DLL The CPU DLL module contains information specific to the target microcomputer For example it contains the number and types of registers available to the microcomputer It also translates the raw machine code in the target into more familiar assembly language mnemonics displayed in the Source window and vice versa Target DLL The target DLL informs HDI about the debugging platform s capabilities and selects the correct CPU DLL Since some capabilities of the debugging platform cannot be generic for example target configuration the target DLL also includes extensions to the standard GUI to provide the user with access to these capabilities For a detailed description of the features available using your target DLL refer to the supplied debugging platform user s manual Rev 3 0 09 00 page 270 of 276 HITACHI Appendix GUI Command Summary Menu Item Accelerator Toolbar Graphic Eile New Session Ctrl N e Load Session Ctrl O Fal Save Session Ctrl S Fal Save Session As Load Program lg Initialize 2 Exit Alt F4 Edit Cut Ctrl X S Copy Ctrl C Paste Ctrl V Find F3 EX Evaluate A View Breakpoint Ctrl B E Command Line Ctrl L eno Disassembly Ctrl D E V O Area Ctrl l Labels Ctrl A Locals Ctrl Shift W Eel Memory Ctrl M Performance Analysis Ctrl P E Profile List Ctrl P Profile Tree Ctrl F ex Registers Ctrl R Source Ctrl K HITACHI Rev 3 0 09 00 page 2
38. HDL language sets high or low for the MD pin The BSC sets the endian for the SH DSP SH7065 however it cannot specify the Rev 3 0 09 00 page 262 of 276 HITACHI endian for each area This means that the endian specified for area 0 becomes the endian for all areas Set the endian through the System Configuration dialog box For details refer to the simulator debugger user s manual 16 3 3 Bus State Controller BSC The BSC sets the bus width programmable waits and idle cycle Only normal memory is supported for the memory type 16 3 4 Interrupt Controller INTC Co verification enables interrupts such as NMI IRQ IRL and timer 16 4 Tutorial This section describes the simulator debugger co verification operation 16 41 Introduction Before starting the HDI set the Eagle and hardware simulator For details refer to the product manual This description notes uses Windows version Eagle for tutorial Rev 3 0 09 00 page 263 of 276 HITACHI 16 4 3 Setting Eagle and Running HDI Specify in File to run field in the VSP Software Control Configuration of the Eagle Console window Eile Edit Options Execute Test Help D 2 2 ul New Open Close Save E demo lt a EAGLEC y Controls VSP Software Control Configuration E Monitors Host Name C HdiSimV7 Src exe_file Release hdiexe zi Browse for file to run Arguments Browse for arguments
39. HITACHI SARO to SAR3 DMA source address registers 0 to 3 DARO to DAR3 DMA destination address registers 0 to 3 DMATCRO to DMATCR3 DMA transfer count registers 0 to 3 CHCRO to CHCR3 DMA channel control registers 0 to DMAOR DMA operation register MCR Individual memory control register 1 and BCR2 Bus control registers 1 and 2 WCR1 to WCR3 Wait state control registers 1 to 3 RTCSR Refresh timer control status register RTCNT Refresh timer counter RTCOR Refresh time constant register RFCR Refresh count register SH DSP with Cache POLACA ID Figure 5 38 Control Registers Window for SH DSP with Cache Only the CCR cache control register is displayed for the SH DSP with Cache The control register values can be directly modified in the window Double clicking a register opens the corresponding dialog box In this dialog box the register value can be modified in bit or field units Rev 3 0 09 00 page 97 of 276 HITACHI 5 24 Dialog Box Figure 5 39 PTEH Dialog Box This dialog box specifies the following values of the page table entry high register PTEH This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series VPN Virtual page number in longword size ASID Address space ID Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09
40. Iv D bit Bit2 C Read Write No access Iv SH C Read only Read only WT bit Bit0 C Read Write Read Write um Figure 5 41 PTEL Dialog Box for SH 4 Series In addition to the items set for the SH 3 SH 3E and SH 3DSP series the following item must be specified for the SH 4 series WT bit Write through bit Specifies the writing mode for the cache Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 100 of 276 HITACHI 5 26 Dialog Box LX n 0000000 Help Cancel Figure 5 42 TTB Dialog Box This dialog box specifies the value of the translation table base register TTB in longword size This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values 5 27 Dialog Box TEA x 20000000 Help Figure 5 43 Dialog Box This dialog box specifies the value of the TLB exception address register TEA in longword size This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values
41. Open the Register dialog box in one of three ways Double click the register you want to change Select the register you want to change and press ENTER Select the register you want to change and choose the Edit menu option from the popup menu Register SR x Value 000000 1 Set As Whole Register Figure 12 10 Register Dialog Box As in any other data entry field in HDI you can enter a formatted number or C C expression see section 2 2 Data Entry You can choose whether to modify the whole register contents High Word Low Word etc a masked area floating or flag bits by selecting an option from the drop list box the contents of this list depend on the CPU model and selected register When you have entered the new number or expression click the OK button or press ENTER The dialog box closes and the new value is written into the register 12 5 3 Using Register Contents It can be useful to be able to use the value contained in a CPU register when you are entering a value elsewhere in HDI for example when displaying a specified address in the Source or Memory window You can do this by specifying the register name prefixed by the character e g R1 PC ROL or Rev 3 0 09 00 page 242 of 276 HITACHI Section 13 Overlay Function Programs making use of the overlay function can be debugged This section explains the settings for using the overlay function
42. Session Dialog Box seeeeeeeennen nennen 257 Figure 15 12 HDI Options Confirmation Dialog Box eee 258 Figure 15 13 HDI Options Viewing Dialog Box eeeeeeeeeeeeeenneen nemen 258 Figure 15 14 Setting Radix ioco iiem tem te 259 Figure 16 1 Operating Environment of Co Verification sees 261 Figure 16 2 Eagle Console Display iet prre re en 264 Figure 16 3 Select Session Dialog nennen nennen nenne 264 Figure 16 4 System Configuration 265 Figure 16 5 Memory Map Dialog Box eese nenne nennen nennen 266 Figure 16 6 System Memory Resource Modify Dialog Box sese 266 Figure 16 7 External Tools Window eet eter eee eet tte trei rin 267 Figure 16 8 Eaglei Window 267 Figure A 1 System Modules niter 269 Rev 3 0 09 00 page xviii of xx HITACHI Tables Table 3 1 Table 3 2 Table 3 3 Table 3 4 Table 3 5 Table 3 6 Table 3 7 Table 3 8 Table 3 9 Table 3 10 Table 6 1 Table 6 1 Table 7 1 Table 7 2 Simulator Debugger Functions Supported by Each CPU sees 9 Specifiable Cache Capacity for SH 3 and SH 3E Series Simulator Debugger 12 Memory Types for the SH ABSC Simulator Debugger
43. UTLB entry to be replaced by the LDTLB instruction SV bit Single virtual memory mode bit TI bit TLB invalidating bit Selecting this box and clicking the OK button flushes UTLB and ITLB SQMD bit Store queue mode bit AT bit Address translation bit Specifies whether or not to enable the MMU Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 103 of 276 HITACHI 5 29 Dialog Box EXPEVT x Exception Code Bit1 1 0 ode Jr Figure 5 46 EXPEVT Dialog Box This dialog box specifies the value of the exception event register EXPEVT This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series Exception Code specifies an exception code H 000 to H FFF Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values 5 30 INTEVT Dialog Box INTEVT Ed Exception Code Bitl 1 0 200 Help Cancel Figure 5 47 INTEVT Dialog Box This dialog box specifies the value of the interrupt event register INTEVT This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series Exception Code specifies an exception code H 000 to H FFF Clicking the OK button stores the modified values in the memory Clicking the C
44. and click the Modify button The Memory Map Modify dialog box opens and memory map items can be modified Delete Deletes Memory Map items Select an item to be deleted in the list box and click the Delete button Notes For the SH 4BSC the following must be noted 1 The access cycle count is displayed as 2 Memory map entries cannot be newly created or canceled Therefore only the Modify button can be used for Memory Map 3 For the internal RAM and I O the memory map entries cannot be modified To enable or disable the internal RAM use the ORA bit of the CCR control register 4 The memory map contents depend on the BSC settings If the memory map contents cannot be determined due to BSC incorrect settings this dialog box Clicking the OK button stores the modified settings Clicking the Cancel button closes this dialog box without modifying the settings Rev 3 0 09 00 page 87 of 276 HITACHI 5 19 Memory Map Modify Dialog Box Memory Map Modify E3 Memory type ROM Start address 00000000 End address H 7EFFFFFF State count fi Help Data bus size 32 porum Figure 5 28 Memory Map Modify Dialog Box This dialog box specifies the memory map of the target CPU of the simulator debugger The contents displayed in this dialog box depend on the target CPU The specified data is used to calculate the number of cycles for memory access Memory type Memory type Start address
45. and does not prompt you nor save the current session information Check the Load last session on startup check box if you want to automatically load the last saved session the next time the user program is started Rev 3 0 09 00 page 257 of 276 HITACHI Load Program Load Memory Iv Verify Memory 5 Memory Find Memory IviDelete breakpoint or event Figure 15 12 HDI Options Confirmation Dialog Box Confirmation message boxes can be switched off or on by using the appropriate confirmation check box HDI Options Figure 15 13 HDI Options Viewing Dialog Box The Tab Size list box can be used to set the number of spaces that a tab character will be expanded to within the views Valid values are between 2 and 8 The best value will be the same as your normal editor 15 10 Setting the Default Input Radix HDI can accept input in several numerical bases The default is hexadecimal except Count fields which are always decimal but you can also use one of the prefixes described in section 2 2 2 Rev 3 0 09 00 page 258 of 276 HITACHI Data Formats To improve usability you can select one of these formats as the default i e you will not need to enter the corresponding prefix to use that radix To change the default radix choose the Setup gt Radix menu option This will display a list of possible numbering systems with a check mark to the left of the current radix Hexadecimal v Decim
46. and stack size of each function number of function calls and profile data The stack size number of function calls and profile data are values when the function is called 4 3 10 Registers Opens the Registers window allowing the user to view all the current CPU registers and their contents 4 3 41 Source Launches the Open dialog box allowing the user to enter a file name of the source file in either C C or assembly language format to view If the source file is not included within the current program or there is no debugging information for the file within the absolute abs file then the message Cannot load program No Source level debugging available is displayed 4 3 12 Status Opens the System Status window allowing the user to view the debugging platform s current status and the current session and program names 4 3 13 Trace Opens the Trace window allowing the user to see the current trace information 4 3 14 Watch Opens the Watch window allowing the user to enter C C source level variables and view and modify their contents 4 315 Opens TLB window allowing user to view and modify TLB contents 4 3 16 Opens the Open TLB dialog box allowing the user to enter the type of TLB that you wish to view Rev 3 0 09 00 page 43 of 276 HITACHI 4 3 17 Cache Opens the Cache window allowing the user to view and modify the cache array contents 4 3 18 Cache Opens th
47. array is mapped in the range H 60000000 to H 7FFFFFFF and the data array is mapped in the range H C0000000 to H C0000FFF SH 4 SH 4BSC The simulator debugger simulates operations of the 8 kbyte instruction cache IC the 16 kbyte operand cache OC and two 32 byte store queues SQ The following dialog boxes are provided to manipulate the IC and OC contents e Instruction Cache dialog box Displays and flushes the IC contents e Instruction Cache Modify dialog box Modifies the IC contents e Operand Cache dialog box Displays and flushes the OC contents Operand Cache Modify dialog box Modifies the OC contents For details refer to section 5 63 Instruction Cache Dialog Box through section 5 66 Operand Cache Modify Dialog Box For the cache control registers refer to section 5 32 CCR Dialog Box and section 5 34 QACRO and QACRI Dialog Boxes The IC is mapped in the range H F0000000 to H F1FFFFFF the OC is mapped in the range H F4000000 to H FSFFFFFF and the SQ is mapped in the range H E0000000 to H E3FFFFFF Note If an associative write to a cache entry or modification of a cache address array is performed by using the Memory window the entry or array may not be modified correctly In this case use the Edit dialog box in the longword format To open the Edit dialog box in the longword format open the Memory window in the longword format and double click the data to be modified The simulator debugger does not change the
48. bitwise exclusive OR logical NOT l unequal to gt greater than lt less than gt greater than or lt less than or equal to equal to Rev 3 0 09 00 page 184 of 276 HITACHI Examples EV H 123 D 731B 10 Result 16 D 366 O 556 B 00000000000000000000000101101110 EV R1 R2 Result H 121 D 289 O 441 B 00000000000000000000000100100001 FILE_LOAD Abbreviation FL Description Loads an object code file to memory with the specified offset Existing symbols are cleared but the new ones will override any existing ones with the same names If an offset is specified this will be added to the symbols The file extension default is MOT Syntax fl lt filename gt lt offset gt lt state gt Parameter Type Description lt filename gt String File name lt offset gt Numeric Offset to be added to load address optional default 0 lt state gt Keyword Verify flag optional default V V Verify N No verify Examples FILE LOAD A BINARY TESTFILE A22 Loads S Record file testfile a22 FL ANOTHER MOT H 200 Loads Motorola S Record file another mot with an offset of H 200 bytes FILE SAVE Abbreviation FS Description Saves the specified memory area data to a file The data is saved in Motorola S Record format The user is warned if about to overwrite an existing file The file extension default is Symbols are not automatically saved Rev 3 0 09 00 page 185 of 27
49. direction parameter 13 FTELL Returns the current position of the file pointer H 0D Parameter Block One byte One byte 0 Return value File number 42 Unused 4 ak Offset E 6 Rev 3 0 09 00 page 32 of 276 HITACHI Parameters Return value output 0 Normal completion Error File number input The number returned when the file was opened Offset output The current position of the file pointer as a byte count from the start of the file The following shows an example for inputting one character as a standard input from a keyboard 5 5 C R P E I TOP YS CALL ALL ADR EQ COD AR ADR ARM NBUF OV L OV L PAR ADR R1 REQ COD RO OV L JSR OP OP OP ALIGN DATA DATA R3 4 SYS_CALL H 01210000 PARM INBUF CALL_ADR R3 HITACHI Rev 3 0 09 00 page 33 of 276 3 13 Break Conditions The simulator debugger provides the following conditions for interrupting the simulation of a user program during execution e Break due to the satisfaction of a break command condition e Break due to the detection of an error during execution of the user program e Break due to a trace buffer overflow e Break due to execution of the SLEEP instruction e Break due to the STOP button 3 13 1 Break Due to the Satisfaction of a Break Command Condition There are five break commands as foll
50. e Address Launches the Set Address dialog box allowing the user to enter a new address If the address is in a source file then that file will be opened in a new window a current source view will be brought into focus with the cursor set to the specified address Finally if the address does not correspond to a source file then this window will scroll to that location When an overloaded function or a class name is entered in the Set Address edit field the Select Function dialog box opens for you to select a function e Code and Assembler Launches the Assembler dialog box allowing the user to modify the instruction at that address Note that changes to the machine code do not modify the source file and any changes will be lost at the end of the session e Label Launches the Label dialog box allowing the user to enter a new label or to clear or edit the name of an existing label Source Launches editor at location in source set by optional startup parameters in Windows Start menu HDI shortcut Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking The currently selected standard breakpoint is shown by a check mark to the left of the menu text popup menu containing the following options is available by right clicking within the window but outside the BP column Rev 3 0 09 00 page 58 of 276 HITACHI 5 5 1 Ep Only available if a block of text is
51. egeat te b A ein Meter deter 199 STEP auis antep piene e Pr s 199 STEP OUT gc degna eta shi RE 200 STEP OVER einen ence He eode rre oe tier E e pti hte c dede e rec eos 200 STEP RAT Berne ads 201 SUB MET esos EE 201 SYMBOL ADD ende A ea ea nse ie eee 202 S YMBOISS CEBAR Renee aa eb doni odit eden 202 SYMBOL OAD ys oue oae EEUU Ep Dan 203 SYMBOL SAVE IM denn BED aM eae ean eae 203 SYMBOL VIEW ac PE T A A 204 ERAGE use USED tee abet nti ep v atti E utrum ous 204 TRACE ACQUISEFPION 1n Belt Melati tie i esi asi DURER 205 Secon 7 MESSAGES ER 207 T 1 Information Messages 00 0 cee ceeceecseeseeeeeeeeeeeeeeeecesecesecaecsaecsaecsaecaaecaeseaeseaeseeeeeeeeeeeetens 207 1 25 Messa SS vee acies edet etienne ee eie eie c t ee ibo 208 Section 8 Looking at Your Program aede ttalenetsdg eiae bes de 211 8 1 Compiling for Debugging ssssseeeeeneeeeeee nennen nennen eerte nennen 211 8 2 Viewing the Code eei imet Det e E E dues 211 82 1 Viewing Source Code s asenee sien po DER RO RO RU RU e PREISE en 211 8 2 0 Viewing Assembly Language Code sese 212 8 2 3 Modifying Assembly Language Code esee 213 8 3 Looking at Labels eei E eU REESE RE E EE EE A RELIER En pee 213 8 3 1 Lasting La
52. high order three bits of the address tag stored in a cache address array to zeros When loading a program by using the Load Object File dialog box to the area where the cache is mapped or copying memory data to this area by using the Copy Memory dialog box clear the bit of the MMUCR to zero to disable the MMU SH 4 SH7750R The simulator debugger simulates operations of the 16 kbyte instruction cache IC the 32 kbyte operand cache OC and two 32 byte store queues SQ Rev 3 0 09 00 page 13 of 276 HITACHI The following dialog boxes are provided to manipulate the IC and OC contents Instruction Cache dialog box Displays and flushes the IC contents Instruction Cache Modify dialog box Modifies the IC contents e Operand Cache dialog box Displays and flushes the OC contents e Operand Cache Modify dialog box Modifies the OC contents For details refer to section 5 63 Instruction Cache Dialog Box through section 5 66 Operand Cache Modify Dialog Box For the cache control registers refer to section 5 32 CCR Dialog Box and section 5 34 QACRO and QACRI Dialog Boxes The IC is mapped in the range H F0000000 to H F1 FFFFFF the OC is mapped in the range H F4000000 to H FS5FFFFFF and the SQ is mapped in the range H E0000000 to H E3FFFFFF Note If an associative write to a cache entry or modification of a cache address array is performed by using the Memory window the entry or array may not be modified correctly
53. highlighted This copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 5 2 Set Address Launches the Set Address dialog box allowing the user to enter a new start address The window will be updated so that this is the first address displayed in the top left corner When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function 5 5 3 Go To Cursor Bi Commences to execute the user program starting from the current PC address The program will continue to run until the PC reaches the address indicated by the text cursor not the mouse cursor or another break condition is satisfied 5 5 4 Set PC Here Changes the value of the PC to the address indicated by the text cursor not the mouse cursor 5 5 5 Instant Watch Launches the Instant Watch dialog box with the name extracted from the view at the current text cursor not mouse cursor position Only available when the selected source line is valid 5 5 6 Add Watch Adds the name extracted from the view at the current text cursor not mouse cursor position to the list of watched variables If a Watch window is not open then it is opened and brought to the top of the child windows Only available when the selected source line is valid 5 5 7 Go to Source Opens the Source window including the source program corresponding to the text cursor not the mouse cursor p
54. lt option gt Parameter Type lt register gt Character string lt data gt Numeric lt size gt Keyword B W L S D lt option gt Keyword EQ NE Examples Description Register name Access data Access size If no size is specified the size of the specified register is assumed Note that when data is specified the size must not be omitted Byte size Word size Longword size Single precision floating point size Double precision floating point size Match or mismatch of data The default is EQ A break occurs when the data matches the specified value A break occurs when the data does not match the specified value BREAK REGISTER RO FFFF W EQ A break occurs when the low order two bytes of the BR R10 BREAK SEQUENCE Abbreviation BS Description Sets sequential breakpoints Rev 3 0 09 00 page 182 of 276 RO register change to H FFFF A break occurs when the R10 register is written to HITACHI Syntax bs lt address1 gt address2 address 3 Parameter Type Description lt address1 gt Numeric Addresses of sequential breakpoints Up to eight lt address8 gt addresses can be specified Examples BREAK SEQUENCE 1000 2000 A break occurs when addresses H 1000 H 2000 are passed in this order BS 1000 A break occurs when address H 1000 is executed DISASSEMBLE Abbreviation DA Description Disassembles memory contents to assembly language code T
55. nnn Cycle Total number of instruction execution cycles Address Instruction address Instruction Instruction mnemonic Clicking the OK button stores the settings Clicking the Cancel button closes this dialog box without searching Rev 3 0 09 00 page 83 of 276 HITACHI 5 17 Watch Window Watch Window OF OF xi Value 0x00003fFd4 long 10 00000000 OxOO003fd4 H OO000daa H 000020da H 00002704 0x00003Fd8 OxOOO003fdc OxOO003fe0 00003 4 OxOOO003fe8 OxOOO03fec OxOOO03f fO OxOOO03ff4 OxOOO03ff8 Ox00003fc4 H OOO02f5a H O00003ead H 0000421F H OO004 did 000053 H 00005665 H 00005665 CAcAcAcAcCAcCACACACACA e e e e e e e e e Figure 5 26 Watch Window Allows the user to view and modify C C source level variables The contents of this window are blank unless the current user program can be associated to a C C source file via the debugging information available in the absolute file abs The following items are displayed Name Name of the variable Value Value assigned location and type The assigned location is enclosed by and the type is enclosed by The variables are listed with a plus indicating that the information may be expanded by double clicking on the variable name and a minus indicating that the information may be collapsed Alternatively the plus and minus keys may be used A popup menu containing the following options is available by rig
56. output The number to be used in all file accesses after opening e Open mode input H 00 H 01 w H 02 a H 03 r Rev 3 0 09 00 page 27 of 276 HITACHI H 04 w 05 H 10 rb H 11 wb H 12 ab H 13 reb H 14 w b H 15 a b These modes are interpreted as follows Open for reading w Open an empty file for writing a Open for appending write starting at the end of the file r Open for reading and writing w Open an empty file for reading and writing a Open for reading and appending b Open in binary mode Start address of file name input The start address of the area for storing the file name FCLOSE Closes a file H 06 Parameter Block One byte One byte 0 Return value File number Parameters Return value output 0 Normal completion 1 Error File number input The number returned when the file was opened Rev 3 0 09 00 page 28 of 276 HITACHI FGETC Inputs one byte from a file H 27 Parameter Block One byte One byte 0 Return value File number 42 Unused i F Start address of input buffer Parameters Return value output 0 Normal completion 1 EOF detected File number input The number returned when the file was opened Start address of input buffer input The start address of the buffer for storing i
57. page 48 of 276 HITACHI 47 1 Cascade Arranges the child windows in the standard cascade manner i e from the top left such that the title bar of each child window is visible 4 7 2 Tile Arranges the child windows in the standard tile manner i e sizes each window such that all are displayed without overlapping 4 7 3 Arrange Icons Lines up any iconized windows neatly along the bottom of the parent frame in the standard manner 4 7 4 Close All Closes all the child windows 4 8 Help The Help menu accesses additional information on how to use the functionality provided by HDI 4 8 1 Index Opens the main help file at the index 4 8 2 Using Help Opens a help file allowing the user to find out how to use Windows hypertext help system 4 8 3 Search for Help on Opens the main help file and launches the Search dialog box allowing the user to enter and browse through the file s keywords 4 8 4 About HDI Launches the About HDI dialog box allowing the user to view the version of HDI and the currently loaded DLLs Rev 3 0 09 00 page 49 of 276 HITACHI Rev 3 0 09 00 page 50 of 276 HITACHI Section 5 Windows and Dialog Boxes This section describes types of windows and dialog boxes the features that they support and the options available through their associated popup menu 5 1 Breakpoints Window Breakpoints io ioi x Enable File Symbol A 0 ress Type sort c 21 0000038 BP sort c 8 _main 000
58. program SuperH RISC engine SuperH RISC engine cross assembler C C compiler Instance information file Prelinker Object load module CHER EET gt Optimizing linkage editor Library file Load module Stack information ELF S type profile information SuperH RISC engine simulator debugger Figure 1 1 Creation of Target User Programs Rev 3 0 09 00 page 3 of 276 HITACHI 1 3 Simulation Range The simulator debugger supports the following SuperH RISC engine series microcomputer functions e All CPU instructions pipeline simulation e Exception processing e Registers e All address areas e MMU only for SH 3 SH 3E SH 3DSP and SH 4 series e Cache only for SH 3 SH 3E SH 3DSP SH 4 series and SH DSP with Cache e DMAC only for SH 4BSC e BSC only for the SH 4 series Note that some functions are not supported for microprocessors other than SH 4BSC The simulator debugger does not support the following SuperH RISC engine series MCU functions Programs that use these functions must be debugged with the SuperH RISC engine series emulator e 16 bit free running timer FRT e Serial communication interface SCI e I O ports e Interrupt controller INTC Rev 3 0 09 00 page 4 of 276 HITACHI Section 2 System Overview HDI is a modular software system utilizing self contained modules for specific tasks These modul
59. register IMASK I1 IMASK IO Reserved Reserved S T Expansion indicator HEHooomrrr zL o Figure 12 9 Expanding a Bit Register To collapse an expanded bit register double click on the minus sign The registers collapse back to the single item and the minus sign changes back to a plus sign 12 5 2 Modifying Register Contents There are two ways that you can change a register s contents The quick edit method that allows you to enter values by typing directly into the window but is limited to hexadecimal values only The full edit method that requires you to enter values via a dialog box but allows you to enter values in any base and use complex expressions Quick Edit The quick way to change a register s contents is to select the digit that you wish to change by clicking or dragging on it You will see the selected digit is highlighted Type the new value for the digit it must be in the range 0 9 or a f The new value is written into the digit and the cursor moves to the next digit in the register When you enter a value into the least significant digit of the register the cursor moves on to the most significant digit of the next register If the digit of the register display indicates a bit e g in the CPU condition code register CCR then you can press SPACE to toggle the bit s value Rev 3 0 09 00 page 241 of 276 HITACHI Full Edit The full way to change a register s contents is accessed via a Register dialog box
60. section describes how to look at areas of memory in the CPU s address space It will show you how to look at an area of memory in different formats fill move and test a block of memory and save load and verify an area of memory with a disk file 9 1 Looking at an Area of Memory To look at an area of memory choose the View gt Memory menu option using the Ctrl M accelerator or clicking the Memory Window toolbar button to open a Memory window This will open an Open Memory Window dialog box Open Memory Window x Address Format Byte Figure 9 1 Open Memory Window Dialog Box Type in the start address or equivalent symbol for the window display in the Address field and select the required display format from the Format list Click OK or press ENTER and the dialog box closes and a Memory window opens Byte Memory _Temp_Name gt Of x Figure 9 2 Memory Window Bytes There are two display columns excluding the address display column 1 Data The data read from the debugging platform Where supported it is read from physical memory at the displayed width Editing is supported 2 Value Data displayed in an alternative format Editing is not supported Rev 3 0 09 00 page 217 of 276 HITACHI If you want to change the display format from the one you selected when you opened the window do it from the popup menu 9 1 1 Displaying Memory as ASCII To display and edit memory as ASCII charac
61. simulation or command execution TLB is not correctly set Modify TLB contents and user program handler routine TLB Protection Violation Illegal TLB protection exception occurred during simulation Unified TLB Miss A unified TLB miss occurred during memory access Take necessary procedures such as updating the Unified TLB UTLB contents Unified TLB Multiple unified TLB entries were hit when a virtual address was accessed Multiple Hit TLB is not correctly set Modify TLB contents and user program handler routine Unified TLB A unified TLB protection exception occurred during memory access Take Protection Violation necessary procedures such as updating the Unified TLB UTLB contents Rev 3 0 09 00 page 210 of 276 HITACHI Section 8 Looking at Your Program This section describes how to look at your program as source code and assembly language mnemonics HDI s facilities for dealing with code and symbol information are explained and you will be shown how to look at text files in the user interface 8 1 Compiling for Debugging In order to be able to debug your program at C C source level your C C program must be compiled and linked with the debug option enabled Note Make sure you have the debug option enabled on your compiler and linker when you generate an object file for debugging If your debug object file does not contain any debugging information then you can still load it into the d
62. step execution is performed For details refer to section 5 68 Stack Trace Window Rev 3 0 09 00 page 38 of 276 HITACHI Section 4 Menus This document uses the standard Microsoft menu naming convention Menu title Check mark Hitachi Debugging Interface MANUAL E6000 H8S 2600 Emulator Ele Edit View Run Tools Window Help Drop down Cascading menu Figure 4 4 Menus Check marks indicate that the feature provided by the menu option is selected Ellipsis indicates that selecting the menu option will open a dialog box that requires extra information to be entered Refer to your Windows user manual for details on how to use the Windows menu system 4 1 File The File menu is used for aspects of the program that access program files 4 1 1 New Session Launches the Select Session dialog box allowing the user to select a new debugging platform 4 1 2 Load Session E 1 Launches the Select Session dialog box allowing the user to load a session from a selected session file hds extension session file contains the debugging platform s settings and the current program and the position of open child windows views it contains symbols breakpoints or current register values Rev 3 0 09 00 page 39 of 276 HITACHI 4 1 3 Save Session Updates the session file for the current session file If there is no current session file defined this acts in a similar manner to t
63. te AL 167 5 70 8 Output Profile Information File essere nennen 167 5 70 9 Output Text File occi RE OR IHRRO rie EE ree PI Eee 167 35 70 10 Select D ata z 168 5 70 11 Set ng aes eoe idet eie ee eid lee dee ce indeed cre dp eue cad 168 3l Protile Chart eo ee eee been iei 169 2321 1 Bxp nds 91z6e Ri ep Uo eq ERU 169 5 71 2 Reduces Size eR e eR HERO OPERE 169 3 1 3 e petet eret co bee en edu 169 3 71 4 View Protile LEist nt OD PEERS 170 59 71592 View Protile etra teet e pee beber 170 5 7 1 6 VaiewsProtile Chart 5 22 E reetietenmiiete Nn i den 170 5 71 7 Bnable Protiler eee itte EU AE 170 51 9 Clear D tazsctos citet edet e s bm 171 511 9 Multiple View 5i cete a aa ae ae o ebd ra aa 171 5 71 10 Output Profile Information File eese nennen 171 Section 6 Command dub o eo E 173 5 eere ret RN RI RID BIG E 175 ANATIYSIS since UIN ASEGURO RU Rt 175 ANALYSIS RANGE eese nee DRE GE RETRO REED 176 ANALEYSIS RANGE DEEETE 5s haee roe td ve edt dis eee 176 ASSENMDBLE happen ne Dn EUN 177 ASSERT E Teste bid EES 177 E 178 9 ertet RE RD TA REPE 178 BREAK CEBXALB E EA emet tite ca tet ce e eae 179 BREAK DATA
64. te tenetis 129 5 49 Dialog BOX cnsonen ot eie ORE SH 130 5 30 TEB Dialog Box oett HB RUE E RU ERU urne 131 9 51 TLB Modify Dialog ere rete entree ede 132 5 52 TLB Find Dialog rein eh eee ieas 134 3 33 Open TEB Dialog Rope ttd eon bel nba ient 135 5 54 Instruction TLB Dialog Box eese nennen nennen 136 5 55 Instruction TLB Modify Dialog Box oo eee cee cee cneeceeeeeeeeeeeenecaecnaeceuecaeesaeseaeeeasee 137 5 56 Instruction TLB Find Dialog 139 5 57 Unified TEB Dialog BOX ieget teme etg ei irte itte 140 5 58 Unified TLB Modify Dialog Box sse enne eene nennen 142 5 59 Unified TLB Find Dialog rennen terere 144 5 60 Cache Dialog 55 esent pneRODe oerte ERR Ren 145 5 61 Cache Modify Dialog Box nennen nennen een eene enne 147 5 62 Open Cache Dialog Box OR EHE Re cip p EUER a deco nee E dec 149 5 63 Instruction Cache Dialog 150 5 64 Instruction Cache Modify Dialog Box sees eene 152 5 65 Operand Cache Dialog Box e a aeaa nre trennen rennen 153 5 66 Operand Cache Modify Dialog Box neret eene 156 5 67 Simulated Window eseseseeseseeeeeeeeeene enne en nnne nest 158 2 08 Stack Trace Wan dow es epe ed eee pee piede die be
65. tee y er de eee e ener 52 5 1 6 Go to Sour e scs pe EO ER eR Ae a 52 5 2 Set Break Dialog eite 53 5 3 Break Sequence Dialog Box esee eere Eee iere rg 55 5 4 Command Line Window cccccccssssssnessccececssnncescccscesceensnseecsecscsessnnecsecescsseenseaeeesecesss 56 SUE rsSet ite E A i eee Meets 56 542A Play ete ideae e moe lita 57 5 4 3 Set Lop Piles ueneno ep E E Res 57 DAA WO un EE 57 9 45 Select eiie oe e eee t P RAI E Aree depen 57 340 Copy se AA ie x USC epe iege 37 9 9 DEEE A aala A iusso eSRU SNR PUR UE teotu te etn oen 57 SDL oCopysuusssteseouunex um iD ERE BR eet vg RON 59 3 9 2 SERACGIESS cse eec e rie dee ie e rr AA 59 5 5 9 GOTO CUISOE TREE REUS 59 5 547 Set PCE iioii NS 59 5 95 29 scent eatin ees E ie re 59 9 6 Add W ately eet cheese RU eee ee 59 DIS GIO TO SOULCE S ensis cess tenete e 59 9 62 Labels Window xa rait tec e tao a EC ERE ea ace RN TE I DEREN RUE iad 60 SAU RE E E See bok GR Ss E oa petes 61 5 6 2 Edilio dance o REOR BRE RS 61 5 6 3 GEInd eae niente ea n de eo nette 61 3 64 Find Next ae tect eek esol Cee eri Bites 62 23 0 5 MieW SOUICE ERE ERREUR UE RE IEEE E E 62 23 6 6
66. the entry has been written to Valid Indicates whether or not the entry is valid Selecting this box makes the entry valid Long Word0 to Long Word7 Longword data 0 to 7 to be set to OC entries Rev 3 0 09 00 page 156 of 276 HITACHI Clicking the OK button displays the modified contents in the Operand Cache dialog box Clicking the Cancel button closes the dialog box without displaying the modified contents in the Operand Cache dialog box SH 4 SH7750R Operand Cache Modify Way0 Entry001 Ed Tag Address H 01 000000 Iv Update Iv Valid Long Word 00000000 Long Word4 H 44444444 Long Word1 11111111 Long Word5 55555555 Long Word2 H 22222222 Long Word6 66666666 Long Word3 H 33333333 Long Word 77777777 Help Figure 5 91 Operand Cache Modify Dialog Box for SH 4 SH7750R The following items can be specified Tag Address Tag address A longword physical address must be specified Bits 31 to 10 are valid Update Indicates whether or not the entry has been written to Selecting this box makes the simulator debugger assume that the entry has been written to Valid Indicates whether or not the entry is valid Selecting this box makes the entry valid Long Word0 to Long Word7 Longword data to 7 to be set to OC entries Clicking the OK button displays the modified contents in the Operand Cache dialog box Clicking the Cancel button closes the di
67. the offset from the previous label symbol The contents of memory may be edited by either typing at the current cursor position or by double clicking on a data item The latter will launch the Edit dialog box allowing the user to enter a new value using a complex expression If the data at that address cannot be modified i e within ROM or guarded memory then the message Invalid address value is displayed Double clicking within the Address column will launch the Set Address dialog box allowing the user to enter an address Clicking the OK button will update the window so that the address entered in the Set Address dialog box is the first address displayed in the top left corner A popup menu containing the following options is available by right clicking within the window 5 8 1 Refresh Forcibly updates the Memory window contents 5 8 2 Load Launches the Load Memory dialog box allowing the user to load to the debugging platform s memory from an S Record file mot without deleting the current debug information The offset Rev 3 0 09 00 page 66 of 276 HITACHI field may be used to move the address values specified in the file to a different set of addresses The optional verify flag can be used to check that the information has been downloaded correctly 5 8 3 Save Launches the Save Memory As dialog box allowing the user to save a block of the debugging platform s memory to an S Record file mot The start a
68. to H 0501FFFF as the Start address and End address in Break Access and as the Start address in Break Data for X or Y memory accesses by the MOVX or MOVY instruction Rev 3 0 09 00 page 54 of 276 HITACHI 5 3 Break Sequence Dialog Box Break Sequence Ed Address Address 0004000 5 Address 00 Address4 Cancel Address5 Address6 Help Address Address8 Figure 5 3 Break Sequence Dialog Box This dialog box specifies the pass addresses as break conditions Specify addresses in Address1 to Address8 Not all eight addresses need to be specified When an overloaded function or a class name including a member function is specified as a pass address the Select Function dialog box will open select the function name in the dialog box For details refer to section 14 Selecting Functions Clicking the OK button sets the pass addresses Clicking the Cancel button closes this dialog box without adding a new pass address Rev 3 0 09 00 page 55 of 276 HITACHI 5 4 Command Line Window Command Line no batch file no log file gt rs po main rd R0 00000000 R1 00000000 R2 00000000 R3 00000000 R4 00000000 R5 00000000 R6 00000000 R7 00000000 R8 00000000 R9 00000000 R10 00000000 R11 00000000 00000000 00000000 00000000 00000000 Figure 5 4 Command Line Window Allows the user to control the debugging platform
69. want to be able to look at it in its current state later you can reduce it to an icon This is called minimizing the window To minimize a window either click on the minimize button of the window or choose the E gt Minimize window menu option Window menu _ sort c 00000000 _ 1 p PR G R15 00000002 8 H CB R15 00000004 H 00 R3 00000006 08 4 R15 00000008 QH 0030 12 0000000 0000000 CH 0058 8 PC R1 oo00000e R1 Minimize 00000010 button 00000012 RO G H 0C 4 R15 00000016 amp H 001C 8 00000018 RO RO 0000001 RO CH 0C 4 R15 0000001c G H 08 4 R15 R3 0000001e R3 4 Figure 15 1 Minimizing a Window The window is minimized to an icon at the bottom left of the HDI application window for the above Disassembly window example the icon is Rev 3 0 09 00 page 247 of 276 HITACHI Figure 15 2 Disassembly Window Icon Note You may not be able to see the icon if you have a window open over the bottom of the screen To restore the icon back to a window either double click on the icon or choose the Restore menu option from the window menu 15 1 2 Arranging Icons Although the icons will be put at the bottom left of the HDI application window by default when you minimize a window you can move them anywhere you like in the application window by simply clicking and dragging them to a new position When you rest
70. 0 Ed Tag Address 000000 Iv Valid Long Word 00000000 Long Word4 44444444 Long Word1 11111111 Long Word5 55555555 Long Word2 H 22222222 Long Word6 66666666 Long Word3 33333333 Long Word H 77777777 Help Figure 5 87 Instruction Cache Modify Dialog Box for SH 4 SH7750R The following items can be specified Tag Address Tag address A longword physical address must be specified Bits 31 to 10 are valid Valid Indicates whether or not the entry is valid Selecting this box makes the entry valid Long Word0 to Long Word7 Longword data 0 to 7 to be set to IC entries Clicking the OK button displays the modified contents in the Instruction Cache dialog box Clicking the Cancel button closes the dialog box without displaying the modified contents in the Instruction Cache dialog box 5 65 Cache Dialog Box This dialog box displays the contents of the OC This dialog box is provided only for the SH 4 series and the displayed contents differ according to the target CPU Rev 3 0 09 00 page 153 of 276 HITACHI SH 4 SH 4BSC Operand Cache Eg EntUV Tag adr LWO 1 2 LW3 LW4 LW5 LW6 LW 000 1 1 00000000 00000000 11111111 22222222 33333333 44444444 55555555 66666666 77777777 001 1 1 00000000 00000000 11111111 22222222 33333333 44444444 55555555 66666666 77777777 002 1 1 00000000 00000000 11111111 22222222 33333333 44444444 55555555 666666
71. 000 FFDE MM PR R15 lt 00000000 void main void 0000000004 00000002 fD E 8 R15 R15 00003FC4 0000000006 00000004 FFD E 00 R3 3 lt 00000000 fori 1 0 i lt l0 itt 0000000008 00000006 f D EMM R3 800000008 R15 00003 lt 00000000 0000000009 00000008 FFDE gt 2 00000030 PC 00000030 0000000013 O000000A f D E 0000000014 00000030 FFDE 0A R2 2 lt 0000000 0000000016 00000032 fD EMMW z 00000008 R15 Rl 1 lt 00000000 0000000019 00000034 FFD lt lt E gt 2 R2 Rl lt 0 0000000021 00000036 f D E 0000000C T 0 PC O000000C 0000000023 00000038 FFD 2 sortia 0000000023 0000003A f 0000000025 00000000C FFDE gt MMW 00000078 PC R1 Rl1 00000190 3 0000000029 0000000 fD E z gRl lt 00000190 0000000032 00000010 FF lt lt D gt E Figure 5 20 Trace Window for SH 1 SH 2 SH 2E and SH DSP Series Rev 3 0 09 00 page 75 of 276 HITACHI This window displays the following trace information items PTR Pointer in the trace buffer 0 for the last executed instruction CYCLE Total number of instruction execution cycles cleared by pipeline reset ADDR Instruction address PIPELINE Pipeline execution status Each symbol has the following meaning F Instruction fetch with memory access f Instruction fetch without memory access D Instruction decode E Instruction execution M Memory access W Write back P DSP m Multi
72. 00000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Figure 5 85 Instruction Cache Dialog Box for SH 4 SH7750R This dialog box displays the contents of the cache set on Way0 and Wayl The following items are displayed Ent Entry number in the IC H 00 to H FF V Validity bit When this bit is 1 the entry is valid Tag adr Tag address LWO to LW7 Longword data 0 to 7 stored in IC entries The IC contents can be modified and flushed using the following buttons Modify Modifies the IC contents After selecting the entry to be modified in the list box click the button The Instruction Cache Modify dialog box will open and the IC contents can be modified Flush Flushes all IC entries Clicking the button clears the V bits of all entries to zero and invalidates all IC entries Clicking the OK bu
73. 00000 BS Figure 5 1 Breakpoints Window This window displays all of the specified breakpoints Items that can be displayed are listed below Enable Displays whether the breakpoint is enabled or disabled Breakpoints with mark or O are enabled File Line Displays file names and line numbers where breakpoints are specified Symbol Displays symbols that correspond to breakpoint setting addresses When no symbol exists nothing is displayed Address Displays addresses where breakpoints are specified Type Displays break types BP PC break BA Break access BD Break data BR Break register Register name BS Break sequence When a breakpoint is double clicked in this window the Set Break dialog box is opened and break conditions can be modified If a break sequence is double clicked the Break Sequence dialog box is opened A popup menu containing the following options is available by right clicking within the window Rev 3 0 09 00 page 51 of 276 HITACHI 5 1 1 Add Sets breakpoints Clicking this item will open the Set Break dialog box and break conditions can be specified 5 1 2 Edit Only enabled if a breakpoint is selected Select a breakpoint to be edited and click this item The Set Break dialog box will open and break conditions can be changed Note that if a break sequence is selected for editing the Break Sequence dialog box will open 5 1 3 Delete Only enabled if a breakpoint is selected
74. 000000 00000000 Figure 5 95 Profile List Window This window displays the address and size of a function or a global variable the number of times the function is called or the global variable is accessed and profile data Displayed profile data differs according to the target CPU as follows SH 1 SH 2 SH 2E Series SH DSP SH 2DSP and SH DSP 597065 Called the number of times a global variable is accessed Cycle the number of execution cycles SH 3 SH 3E SH 3DSP Series and SH DSP with Cache Called the number of times a global variable is accessed Cycle the number of execution cycles Cache miss the number of cache misses SH 4 Series Called the number of times a global variable is accessed Cycle the number of execution cycles ICache miss the number of instruction cache misses OCache miss number of operand cache misses The number of execution cycles and cache misses are calculated by subtracting the total execution cycles or cache misses at a specific function call instruction execution from the total execution cycles or cache misses at a return instruction execution of a specific function When the column header is clicked data are sorted in alphabetic or ascending descending order Double clicking the Function Variable or Address column displays the source program or disassembled memory contents corresponding to the address in the line Right clicking on the Rev 3 0 09 00 page 161 of 276 HITACHI mou
75. 0000000 00000000 00000000 00000000 008 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 000 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 001 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 002 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 003 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 004 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 005 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 006 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 007 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 008 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Cancel Figure 5 89 Operand Cache Dialog Box for SH 4 SH7750R This dialog box displays the contents of the cache set on Way0 and Wayl The following items are displayed Ent Entry number in the OC H 000 to H 1FF V Validity bit When this bit is 1 the entry is valid U Update bit When this bit is 1 the entry has been written to Tag adr Tag address LWO to LW7 Longword data 0 to 7 stored in OC entries The OC contents can be modified and flushed using the following buttons Modify Modifies the OC contents
76. 00100 05000000 02000000 06000000 Flush 03000000 07000000 04000000 04000000 05000000 05000000 Find 06000000 06000000 07000000 07000000 04000000 00000000 05000000 00000000 06000000 00000000 Cancel 07000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Figure 5 78 Unified TLB Dialog Box This dialog box displays the UTLB contents This dialog box is provided only for the SH 4 series The following items are displayed Entry Entry number in the UTLB H 00 to H 3F Address array Address array in each entry of the UTLB Data array1 Data array 1 in each entry of the UTLB The UTLB contents can be modified flushed and searched using the following buttons Modify Modifies the UTLB contents After selecting the entry to be modified in the list box click the button The Unified TLB Modify dialog box will open and the UTLB contents can be modified Flush Flushes all UTLB contents Clicking the button clears the V bits of all address arrays and data arrays 1 to zero and invalidates all UTLB entries Rev 3 0 09 00 page 140 of 276 HITACHI Find Searches the UTLB contents Clicking the button will open the Unified TLB Find dialog box and the search condition can be specified Clicking the OK button stores the modified contents in the memory Clicking the Cancel button closes the dialog box without storing the modified contents Rev 3 0 09 00 page 141 of 276 HITACHI 5 58 Unif
77. 09 00 page vii of xx HITACHI 9 14 7 Snapshot ne Donee Rep e 81 5 148 Cleats 81 5 149 Saveisnmos aene eon POR RR RI PO Avis 81 5 1440 Vae W SOUTGe seite t e EU tee i epe ate 81 DTA 1T Trim SOUE eei tee ipte e e cue Bec P endete 81 5 15 Trace Acquisition Dialog 82 9 16 Trace Search Dialog Box enn uuo v OQ UO nitens o 83 5 17 Watch Wandow cits uus epo ROI eio e 84 DLT A GU MD 84 5 17 23 Delete sepes ERR eG Relea ea BG Ses 84 517 3 Delete AIL een teta eto ete ite ode decem x 85 23 17 4 Add Watch ii supe nte nire ntis 85 2 17 95 Edit Vale e ien Dod UU ei qe o teet Pre Een eee piene Une dn 85 5 17 6 RAGIK 2 5 sesh sa coset te ee Delete ep etie rta 85 5 18 System Configuration Dialog 85 5 19 Memory Map Modify Dialog Box seeeeeeeeeeeeee eee eene 88 5 20 Set State Dialog BOX nh Gu RERUM 89 23 21 Memory Map Dialog BOX ceo cei eee Prin e Hon ie t erronee 92 5 22 System Memory Resource Modify Dialog Box esee 94 3 23 Control Registers WndOowW eee epe n Ute RU REN RR UB E 95 25 24 PTEH Dialog BOox oua cH EUER ORE deed 98 5 25 gt PTEL Dialog BOX HR eei e en e ES Re ers 99 5 26 TTB Dialog BOX iecit pP DIR Ens E RODEO REN RI HERO 101 9 27 TEA Dialog Box we o eoa det lei eit HR e teet 101 5 28 IMMUGR Dialog Box ee
78. 2 Find Dialog Box TLB Find E3 Address p 0000000 Address Type Virtual address C Physical address Entry Way Address array Data array 00 0 10000100 2000010 Figure 5 73 TLB Find Dialog Box This dialog box searches the TLB contents This dialog box is provided only for the SH 3 SH 3E and SH 3DSP series The following search conditions can be specified Address Specifies the address to be searched for Address Type Specifies whether the address to be searched for is virtual or physical After specifying the search condition clicking the Find button starts search The search results are displayed in the list box at the bottom of the dialog box in the order of TLB entry way address array and data array To modify the displayed TLB contents select the TLB entry in the list box and click the Modify button The TLB Modify dialog box will open and the TLB contents can be modified This dialog box is closed by clicking the Close button Rev 3 0 09 00 page 134 of 276 HITACHI 5 53 Open Dialog Box Figure 5 74 Open TLB Dialog Box This dialog box selects the TLB to be displayed This dialog box is provided only for the SH 4 series In this dialog box select one of the following TLBs Instruction TLB Selects the instruction ITLB Unified TLB Selects the unified TLB UTLB Clicking the OK button displays the selected TLB dialog box Clicking the Cancel button c
79. 5 50 TLB Dialog Box 10000100 2000010E 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Figure 5 71 TLB Dialog Box 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Cancel x E This dialog box displays the TLB contents This dialog box is provided only for SH 3 SH 3E and SH 3DSP series The following items are displayed Entry Way0 Way3 Entry number in the TLB H 00 to H 1F Address array and data array in each way The TLB contents c
80. 6 HITACHI Syntax fs lt filename gt lt start gt lt end gt Parameter Type Description lt filename gt String File name lt start gt Numeric Start address lt end gt Numeric End address Examples FILE SAVE TESTFILE H 0 H 2013 Saves address range H 0 H 2013 as Motorola S Record file TESTFILE MOT FS 22 H 4000 Saves address range H 4000 H 4FFF as S H 4FFF Record format file ANOTHER A22 FILE_VERIFY Abbreviation FV Description Verifies file contents against memory contents The file data must be in a Motorola S Record format The file extension default is MOT Syntax fv filename lt offset gt Parameter Type Description lt filename gt String File name lt offset gt Numeric Offset to be added to file address optional default 0 Examples FILE VERIFY A BINARY TEST A22 Verifies S Record file TEST A22 against memory FV ANOTHER 200 Verifies Motorola S Record file ANOTHER MOT against memory with an offset of H 200 bytes Rev 3 0 09 00 page 186 of 276 HITACHI GO Abbreviation GO Description Executes object code the user program While the user program is executing the Performance Analysis window is updated Syntax go lt state gt lt address gt Parameter Type Description lt state gt Keyword Specifies whether or not to continue command processing during user program execution optional default wait wait Causes co
81. 66 77777777 003 1 1 00000000 00000000 11111111 22222222 33333333 44444444 55555555 66666666 77777777 004 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 005 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 006 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 007 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 008 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 009 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00A 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00D 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 OOE 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 OOF 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 Modify Flush Help Cancel Figure 5 88 Operand Cache Dialog Box for SH 4 SH 4BSC The following items are displayed Ent Entry number in the OC H 000 to H 1FF U Update bit When this bit is 1 the entry has been written to V Validity bit When this bit is 1 the ent
82. 71 of 276 Configure Map Configure Overlay Menu Item Accelerator Toolbar Graphic pet Status Ctrl U be Trace Ctrl T Watch Ctrl W Ea Run Reset CPU set Go F5 sl Reset Go Shift F5 Go To Cursor Set To Cursor Run Step In F8 m Step Over F7 Step Out m Step e Halt Esc Memory Refresh F12 Load Save Verify El Test A Fill gt Copy ie Compare ke Search i 1 Rev 3 0 09 00 page 272 of 276 HITACHI Item Accelerator Toolbar Graphic Setup Options ER Radix Input Hexadecimal 16 Decimal Octal 8 Binary 8 A E 2 Customize gt Toolbar P Font File Filter Configure Platform ul Window Cascade m Tile E Arrange Icons E Close All Help Index F1 Using Help Search for Help on About HDI HITACHI Rev 3 0 09 00 page 273 of 276 Rev 3 0 09 00 page 274 of 276 HITACHI Appendix Symbol File Format In order for HDI to be able to understand and decode the symbol file correctly the file must be formatted in a specified manner The file must be a plain ASCII text file 2 file must start with the word BEGIN Each symbol must be on a separate line with the value first in hexadecimal terminated by an followed by a space then the symbol text 4 file must end with the word END Example BEGIN 11F
83. 9 00 page ii of xx HITACHI Contents Section T OVERVIEW ad sederet pua VOI I IPs 1 1 FEe t res ono t entes tette A I aate n in ete eee 2 1 2 Target User Program ect re rr cack Rt e p cir eiie 3 1 3 Sunulation Range eoe eae tek fee ate de eh eee eta 4 SECUON 2 System NERVIS Re aas 5 Zel set Interface eto RUD opere tee ementi Opi 5 2 2 coU UH NEUE UNI SEN IS 5 22 1 on ei p Hr ttem 5 2 22 Data Formats iecore e e Da RE RR 5 2 2 3 PHECISIOMN ss o oco ee e tedio ait eee E 6 2 24 Expression Examples eripe terret SR 6 2 2 5 Symbol Format ue eto ete RR HUE ERE a t es 6 2 2 6 Symbol Examples oe niet eee etre tere eret dee 7 2 3 Help eater HIR ER Re e E OE EA iet ie estime eel ects 7 2 3 Context Sensitive eet eR Ue 7 Section Simulator Debugger Functions esee 9 3 1 Simulator Debugger Memory Management 9 31 1 Memory Map Specification oce n oec e see Ue He ORE 9 3 1 2 Memory Resource Specification nennen nenne 10 3 22 er eR Ee eO EE RU uet 10 3 3 Pipeline Reset Processing sense oe Dente Dp RES 10 3 4 Memory Management Unit 11 3 9 Cache ois eco DEOR REO ER Dee dee TO EP PRSE 12 3 5 1 Displaying Cache Contents
84. 9 5 Delete All Ranges uude EUER 69 99 6 Enable Analysis e tei ble dehet e e refe dd 69 5 10 Performance Option Dialog 70 Dell Registers REND ae REI 71 SLE Copy usse ERU NEEDS eu SPHERE 71 2 11 2 ee tena e eie EHE tins 72 SVB Toggle eese peto DD DRUG I pP 72 9 122 Source WindOW fcc o eee ae ARGS dee I UR RAT oat ad eee etnies 72 512 1 Copy iit oio aee am ped PR ame ees 73 512 2 Hnd test Mae ele OUO SU UR ie Mines 73 5 12 3 Set Address 5 nonsese RERO iste Settee ERIS 73 5 124 SOL Tanga iste ate e ete o e eR bt itu ete eti meters 73 3 12 25 Go To CURSOR oet Ue eate BIER OR UIS Daten a eet needs 73 5 12 6 Set PC nO e nete eS 74 2x27 Instant Watch ee iri tee tip ec e dod ipte eH us 74 9 12 8 Add Watch neben bee apetece deep 74 3129 Goto Disassembly aee RU OERU vee ate UR UR Res 74 5 13 System Status Window IATER 74 3 131 Update eden Ree Aaa re other Na eels 75 5 132 CODY citet ope PRU DOE pelt Spas 75 5 14 Trace Window eaae onda e reed iet tendo idet a tese D ieie decks 75 Pind eio eene OE e 80 5 14 2 Find Next Ut ER UE ot nde EE ER geld 80 5 14 3 Pilter l euenit e utetegnep etum pe 80 2 144 Acquisition s ete e eene RR n RE 80 3 145 eee pe ot P et ne EGER UIN p S re tee 80 5 14 6 Restart iii Ede 80 Rev 3 0
85. AH Symbol name 1 11FCH Symbol name 2 11FEH Symbol name 3 1200H Symbol name 4 END Rev 3 0 09 00 page 275 of 276 HITACHI Rev 3 0 09 00 page 276 of 276 HITACHI SuperH RISC engine Simmulator Debugger User s Manual Publication Date 1st Edition March 1999 3rd Edition September 2000 Published by Electronic Devices Sales amp Marketing Group Semiconductor amp Integrated Circuits Hitachi Ltd Edited by Technical Documentation Group Hitachi Kodaira Semiconductor Co Ltd Copyright Hitachi Ltd 1999 rights reserved Printed in Japan
86. AM Inserted Idle Cycle 15 Inserted Wait Cycle 15 Help Figure 5 29 Set State Dialog Box Normal Memory Inserted Idle Cycle Specifies the number of idle cycles to be inserted when the access type changes from read to write or when the access area changes corresponds to the AnIW in WCRI Inserted Wait Cycle Specifies the number of wait cycles to be inserted in all accesses corresponds to the AnW in WCR2 Rev 3 0 09 00 page 89 of 276 HITACHI DRAM Set State s s he sz Figure 5 30 Set State Dialog Box DRAM Inserted Idle Cycle Specifies the number of idle cycles to be inserted when the access type changes from read to write or when the access area changes corresponds to the AnIW WCRI CAS Assertion Width Specifies the CAS assertion period corresponds to the AnW in WCR2 SDRAM Set State Hee ok 7 Figure 5 31 Set State Dialog Box SDRAM Inserted Idle Cycle Specifies the number of idle cycles to be inserted when the access type changes from read to write or when the access area changes corresponds to the AnIW WCRI CAS Latency Cycle Specifies the number of CAS latency cycles corresponds to AnW in WCR2 Rev 3 0 09 00 page 90 of 276 HITACHI Set State Figure 5 32 Set State Dialog Box MPX Inserted Idle Cycle Specifies the number of idle cycles to be inserted when the access type chang
87. ARO dialog box shown in figure 5 57 These dialog boxes are provided only for the SH 4 series In these dialog boxes specify the transfer destination addresses corresponding to channels 0 to 3 Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 114 of 276 HITACHI 5 37 DMATCRO to DMATCR3 Dialog Boxes DMATCRO E3 Transfer Count Bit23 0 H o0000000 Help Cancel Figure 5 58 DMATCRO Dialog Box These dialog boxes specify the values of the DMA transfer count registers 0 to 3 DMATCRO to DMATCR3 The DMATCRI to DMATCR3 dialog boxes have the same functions as the DMATCR0O dialog box shown in figure 5 58 These dialog boxes are provided only for the SH 4 series In these dialog boxes specify the transfer count corresponding to channels 0 to 3 Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 115 of 276 HITACHI 5 38 CHCRO0 to CHCR3 Dialog Boxes CHCRO E3 SSA Field Bit31 29 STC bit Bit28 SM Field Bitl 3 12 Setting prohibited for PCMCIA access Address incremented DSA Field Bit2 7 25 DTC bit Bit2 4 DM Field Bit1 5 1 4 Setting prohibited for PCMCIA access Address incremented RS Field Bitl 1 8 External request dual add
88. BCR2 Bus control registers 1 and 2 WCRI to WCR3 Wait state control registers 1 to 3 MCR Individual memory control register RTCSR Refresh timer control status register RTCNT Refresh timer counter RTCOR Refresh time constant register RFCR Refresh count register DMAC SARO to SAR3 DMA source address registers 0 to 3 to DAR3 DMA destination address registers 0 to 3 DMATCRO to DMATCR3 DMA transfer count registers 0 to 3 CHCRO to CHCR3 DMA channel control registers 0 to 3 DMAOR DMA operation register Notes 1 The register marked with 1 is supported only for the SH 3DSP series 2 The registers marked with 2 are supported only for the SH 4 series 3 Only the CCR register is supported for the SH DSP with Cache The simulator debugger does not support the PCMCIA interface and the synchronous DRAM mode register To modify or display a control register value use the Control Registers window and the dialog box for each register For details refer to section 5 23 Control Registers Window through section 5 49 RFCR Dialog Box 3 11 Trace The simulator debugger writes the results of each instruction execution into the trace buffer The conditions for the trace information acquisition can be specified in the Trace Acquisition dialog box Click the right mouse button in the Trace window and choose Acquisition from the popup menu to display the Trace Acquisition dialog box The acquired trace information is displaye
89. Box essere 144 Figure 5 81 Cache Dialog Box for SH 3 and SH 3E Series sse 145 Rev 3 0 09 00 page xvi of xx HITACHI Figure 5 82 Cache Modify Dialog 147 Figure 5 83 Open Cache Dialog 149 Figure 5 84 Instruction Cache Dialog Box for SH 4 SH A4BSC sse 150 Figure 5 85 Instruction Cache Dialog Box for SH 4 SH7750R 151 Figure 5 86 Instruction Cache Modify Dialog Box for 4 5 4 5 152 Figure 5 87 Instruction Cache Modify Dialog Box for SH 4 SH7750R 153 Figure 5 88 Operand Cache Dialog Box for SH 4 SH 4BSC sse 154 Figure 5 89 Operand Cache Dialog Box for SH 4 SH7750R eee 155 Figure 5 90 Operand Cache Modify Dialog Box for SH 4 SH 4BSC 156 Figure 5 91 Operand Cache Modify Dialog Box for SH 4 5977506 157 Figure 5 92 Simulated I O Window sess nennen eene 158 Figure 5 93 Stack Trace 5 159 Figure 5 94 Stack Trace Setting Dialog Box eese 160 Figure 5 95 Profile Tast 1 2 ie
90. Breakpoint nnenneettee cuit Decem rhe retten 11 3 3 Deleting a Breakpoint esee enne nennen nennen 134 Deleting All Break points Leo oer mU SE eret 11 4 Disabling Breakpoints tertie eee enero Rev 3 0 09 00 page xii of xx HITACHI 11 4 1 Disabling Breakpornt eene DR 232 11 4 2 Enabling a 232 11 5 Temporary Breakpoints cone eterne tt r EEE E e Ee ET E TEE SE 232 Section 12 Looking at Variables iet ertet 235 12 1 Tooltip Wath s 5 ere PR Ree ei eee 235 12 2 Watch cete SRI eel U gk s 235 12 3 Using Watch Tteins oe eee eet Ie pias nave amie 236 12 3 1 Adding a Watch edo eget ete cdit ee reta 236 12 32 Expanding eee mone pee edt 237 12 3 3 Modifying Radix for Watch Item Display esee 238 12 3 4 Changing a Watch Item s Value seseeseeeeeeeeeeneennee nennen 238 12 3 5 Deleting Watch eee RE E eU EE C EE Adie 239 12 4 Lookmg at Local Variables esee eee epe metier iere 239 12 5 Looking at Registers oett iter caa so ree ee iere te Ee ee ER a whence 240 12 5 1 Expanding Bit Register cie aene ieget sete 240 12 5 2 Modifying Register 241 12 5 3 Using Registe
91. CHI COMMENT Abbreviation none Description Allows a comment to be entered useful for documenting log files Syntax text Parameter Type Description text Text Output text Example Start of test routine Outputs comment Start of test routine into the Command Line window and to the log file if logging is active ANALYSIS Abbreviation AN Description Enables disables performance analysis Counts are not automatically reset before running Syntax an lt state gt Parameter Type Description none Displays the performance analysis state state Keyword Enables disables performance analysis enable Enables performance analysis disable Disables performance analysis reset Resets performance analysis counts Examples ANALYSIS Displays performance analysis state AN enable Enables performance analysis Rev 3 0 09 00 page 175 of 276 HITACHI AN disable Disables performance analysis AN reset Resets performance analysis counts ANALYSIS_RANGE Abbreviation AR Description Sets a function for which the performance analysis is provided or displays a function for which the performance analysis is provided without parameters Syntax ar function name gt Parameter Type Description none Displays all functions for which the performance analysis is provided lt function name gt String Name of function for which the performance analysis is provided Examples ANALYSIS_RANGE sort Provi
92. E Total number of instruction execution cycles cleared by pipeline reset ADDR BUS Data on the address bus DATA BUS Data on the data bus CODE Instruction code No Instruction number corresponds to execution number in each stage INSTRUCTION Instruction mnemonic IF Instruction number that was fetched enclosed by when the instruction did not access memory DE Instruction number that was decoded EX Instruction number that was executed MA Instruction number that accessed memory SW Instruction number that wrote back data ACCESS DATA Data access information display format destination accessed data Source or assembly language source programs SH 3DSP Series Trace 102 records no filter CYCLE ADDRESS CODE INSTRUCTION 0000000000 0009 0000000001 0009 0000000002 00000000 4822 L PR R1S void main void 0000000003 00000002 7FCS 8 15 0000000004 00000004 E300 00000000 R3 for i 0 1 lt 10 itt 0000000006 00000006 l1F32 L R3 8 00000008 R15 0000000007 00000008 012 00000030 0000000008 0000000 0009 0000000010 0009 0000000011 00000030 20 MOV 0000000A R2 0000000012 00000032 S1FZ MOV L 8 00000008 R15 Rl 0000000013 00000034 3123 CMP GE R2 Rl 0000000014 3123 0000000015 00000036 SBE9 BF 0000000C 0000000016 00000038 64F3 MOV R15 R4 sort al Figure 5 22 Trace Window for SH 3DSP Series This window displays the following trace information items PTR Po
93. ER EOS DIRE eU EMO 119 Figure 5 62 BCR1 Dialog Box te itte dee debt A coe etes 121 Figure 5 63 BCR2 Dialog BOX ete nee eO REIR teh t reperi 123 Figure 5 64 WCRI Dialog BOX seevier oee en n e ne EEEE rennen enne tene teneret tren trennen 124 Figure 5 65 WCR2 Dialog eene pete petere been 125 Figure 5 66 WCR3 Dialog BOR seinri nerone etit ertet reine RE eee ek ee eee e ets 127 Figure 2 67 RTCSR Dialog BOX tegi e eU ee i RE rie URS 128 Figure 5 68 RTCNT Dialog Box eseeseeseeeeeeeeeeeeenenne nennen nen nein trenes rennen enne 129 Figuie5 69 RT COR Dialog eed ehe tte tese pere tre vende 129 Figure 5 70 Dialog Box nennen nennen eren erinnere nns 130 Figure 2 71 TLB Dialog Nn Uer UM US 131 Figure 5 72 Modify Dialog Box sees nennen nennen 132 Figure 5 73 Find Dialog BOX eiten 134 Figure 5 74 Open TLB Dialog Box eee eee teinte e tree 135 Figure 5 75 Instruction TLB Dialog Box nennen nennen 136 Figure 5 76 Instruction TLB Modify Dialog nennen 137 Figure 5 77 Instruction TLB Find Dialog Box eseeeeeeeneeenen nennen eene 139 Figure 5 78 Unified TLB Dialog eoi nhe tete n te ERR 140 Figure 5 79 Unified TLB Modify Dialog Box sese 142 Figure 5 80 Unified TLB Find Dialog
94. Edit Yalue x Expression 2_ Current Value Hitachi Micro Cancel New Value itachi Micro Systems Figure 12 6 Edit Value Dialog Box Enter the new value or expression in the New Value field and click OK The Watch window is updated to show the new value 12 3 5 Deleting a Watch To delete a watch item select it and choose the Delete menu option from the popup menu The item is deleted and the Watch window updated Note Watch items that you have set in the Watch window can be saved in a session file See section 15 Configuring the User Interface 12 4 Looking at Local Variables To look at local variables open the Locals window by choosing the View gt Locals menu option The Locals window opens OXOOQ03fd4 i Clona 10 2 410 OxOO003fdO 1 long OxOO003fcc int OxOO003fc8 int 2 22117 0x00003fc4 int D D D D 8 1 0 2 Figure 12 7 Locals Window As you debug your program the Locals window will be updated following a step or break from run to show the current local variables and their values If a local variable is not initialized when Rev 3 0 09 00 page 239 of 276 HITACHI defined then the value in the Locals window will be undefined until a value is assigned to the local variable The local variable values and the radix for local variable display can be modified in the same manner as in the Watch window 12 5 Looking at Registers
95. Figure 5 42 TTB Dialog Box emet e RUE ek ehe 101 Figure 5 43 TEA Dialog ete one eet tide pce e ee tet 101 Figure 5 44 MMUCR Dialog Box for SH 3 SH 3E and SH 3DSP 102 Figure 5 45 MMUCR Dialog Box for SH 4 Series sese 103 Figure 5 46 EXPEVT Dialog BOX ieia i E E enne nennen nenne trennen trennen 104 Figure 5 47 INTEVT Dialog Box ecehoniese inp e die p e RERO endete 104 Figure 5 48 TRA Dialog Box esee nennen nennen eene emen nee 105 Figure 5 49 CCR Dialog Box for SH 3 and SH 3E Series sss 106 Figure 5 50 CCR Dialog Box for SH 3DSP Series 107 Figure 5 51 CCR Dialog Box for 4 5 4 108 Figure 5 52 CCR Dialog Box for SH 4 SH7750R sese 109 Figure 5 53 CCR Dialog Box for SH DSP with Cache eee 110 Figure 5 54 CCR2 Dialog pep Er 111 Figure 5 55 QACRO Dialog Box sonein tieren eE e eene nennen nennen eren 112 Figuie6 SARO Daalog BOX etta reed eee eee ee bp ehe Reed 113 Figure 5 57 DARO Dialog BOX oeei e 114 Figur 5 58 DMATCRO Dialog Re Ue n ees ae 115 Figure 5 59 CHCRO Dialog Box eese 116 Figure 5 60 DMAOR Dialog Box enne eene nenne tenete trennen 118 Figure 5 61 MCR Dialog Box eeepc inim p O
96. Function Name Set Function Sample Func long char Sample Sample Func long char int Differ Func short char i Func long char Counter All Function Select Function Set Function 5 Functions 4 Functions 1 Functions Name Func short char Figure 14 1 Select Function Dialog Box This dialog box has three areas Select Function Name list box Displays the overloaded functions or member functions and their detailed information Set Function Name list box Displays the function to be set and their detailed information HITACHI Rev 3 0 09 00 page 245 of 276 e Counter group edit box All Function Displays the number of functions with the same name or member functions Select Function Displays the number of functions displayed in the Select Function Name list box Set Function Displays the number of functions displayed in the Set Function Name list box 14 2 Specifying Functions Select overloaded functions or member functions in the Select Function dialog box Generally one function can be selected at one time only for setting breakpoints setting the function in the Run Program dialog box or setting the function of the performance analysis more than one function can be selected 14 2 1 Selecting a Function Click the function you wish to select in the Select Function Name list box and click the gt button You will see the selected function in the Set Function Name list box
97. HITACHI 5 60 5 Find Displays the Find Text dialog box to find a character string in the Function Variable column Search is started by inputting a character string to be found in the edit box and clicking Find Next or pressing ENTER 5 69 6 Clear Data Clears the number of times functions are called and profile data Data in the Profile Tree window and the Profile Chart window are also cleared 5 69 7 Profile Information File Displays the Save Profile Information File dialog box Profiling results are saved in a profile information file pro extension The optimizing linkage editor optimizes user programs according to the profile information in this file For details of the optimization using the profile information refer to the manual of the optimizing linkage editor 5 69 8 Output Text File Displays the Save Text of Profile Data dialog box Displayed contents are saved in a text file 5 69 9 Select Data Selects profile data types The types of profile data differ according to the debugging platform If this menu option is not supported by the debugging platform it is displayed in gray characters 5 69 10 Setting Displays the Setting Profile List dialog box to set displayed contents Rev 3 0 09 00 page 163 of 276 HITACHI Setting Profile List Figure 5 97 Setting Profile List Dialog Box Column group check boxes set to display or not to display a specific column Function Variables group radi
98. Hitachi Microcomputer Development Environment System SuperH RISC engine Simulator Debug ger User s Manual HITACHI ADE 702 186B Rev 3 0 9 22 00 Hitachi Ltd ot HS0700SDIW7SE Hitacht semiconductor Cautions Hitachi neither warrants nor grants licenses of any rights of Hitachi s or any third party s patent copyright trademark or other intellectual property rights for information contained in this document Hitachi bears no responsibility for problems that may arise with third party s rights including intellectual property rights in connection with use of the information contained in this document Products and product specifications may be subject to change without notice Confirm that you have received the latest product standards or specifications before final design purchase or use Hitachi makes every attempt to ensure that its products are of high quality and reliability However contact Hitachi s sales office before using the product in an application that demands especially high quality and reliability or where its failure or malfunction may directly threaten human life or cause risk of bodily injury such as aerospace aeronautics nuclear power combustion control transportation traffic safety equipment or medical equipment for life support Design your application so that the product is used within the ranges guaranteed by Hitachi particularly for maximum rating operating supply voltage r
99. ITLB contents e Instruction TLB Modify dialog box Modifies the ITLB contents Instruction TLB Find dialog box Searches the ITLB contents Unified dialog box Displays and flushes the UTLB contents e Unified TLB Modify dialog box Modifies the UTLB contents e Unified Find dialog box Searches the UTLB contents For details refer to section 5 54 Instruction TLB Dialog Box through section 5 59 Unified TLB Find Dialog Box Rev 3 0 09 00 page 11 of 276 HITACHI The ITLB is mapped in the range 2000000 to H F3FFFFFF and the UTLB is mapped in the range H F6000000 to H F7FFFFFF The simulator debugger does not support data array 2 for both ITLB and UTLB As well as during user program execution the MMU translates virtual addresses into physical addresses during address display or input in the dialog boxes or windows Therefore in the dialog boxes and windows memory can be accessed with the virtual addresses used in the user program However note that physical addresses must be used in the Memory map and System memory resource Note If an associative write to a TLB entry is performed by using the Memory window the entry may not be modified correctly In this case use the Edit dialog box in the longword format To open the Edit dialog box in the longword format open the Memory window in the longword format and double click the data to be modified 3 5 Cache For the SH 3 SH 3E SH 3DSP SH 4 series and
100. P SH 4 series and SH DSP with Cache The displayed contents depend on the target CPU SH 3 and SH 3E Series E Control Registers x 10000000 2000010E 10000000 20000000 00000123 00000100 00000200 00000040 00000023 Figure 5 35 Control Registers Window for SH 3 and SH 3E Series PTEH Page table entry high register PTEL Page table entry low register TTB Translation table base register TEA TLB exception address register MMUCR MMU control register EXPEVT Exception event register INTEVT Interrupt event register TRA TRAPA exception register CCR Cache control register Rev 3 0 09 00 page 95 of 276 HITACHI SH 3DSP Series ii Control Registers OF x 10000000 2000010E 10000000 20000000 00000123 00000100 00000200 00000040 00000007 00000303 Figure 5 36 Control Registers Window for SH 3DSP Series In addition to the registers displayed for the SH 3 and SH 3E series the CCR2 cache control register 2 is displayed for the SH 3DSP series SH 4 Series Control Registers ES 00000000 2000010F 10000000 20000000 00000301 00000100 00000200 00000040 00008147 00000000 00000000 Figure 5 37 Control Registers Window for SH 4 Series In addition to the registers displayed for the SH 3 and SH 3E series the following registers are displayed for the SH 4 series QACRO and QACR1 Queue address control registers 0 and 1 Rev 3 0 09 00 page 96 of 276
101. PEE T E E ren PE CHEER HEU ERR RE 39 Breakpoints Window eie tee e USE Ep ettet eene dn 51 Set Break Dialog BOX eR ORE etie 53 Break Sequence Dialog nennen nennen 55 Command Line Window isti tette eer erp eor EP ea Eie 56 Disassembly Window eese enne trennen tren nenne 58 Labels Windo 60 Add Isabel Dialog Box hee a e E Aa ae ea 61 Edit Label Dialog Box oue dti eoe Utile s 61 Find Label Containing Dialog Box seen nennen 62 Message Box for Confirming Label 63 Message Box for Confirming All Label Deletion eee 63 Load Symbols Dialog Box esseeeeeeeeeeeeneeeennee nennen nennen rennen 64 Locals Window ett HR HERE e rre re eere re eR pee 65 Memory Window en ERU UD EH RERUM UE 66 Performance Analysis Window esses nennen nennen 68 Performance Option Dialog Box eseeeeseeeeeeeeeeeee nennen eene enne 70 Registers ESPERA ERE RE V RR M eee 71 Source WiIndOW iret EIE 72 System Status WIndONW ice ee e epe eei i ee ees 74 Trace Window for SH 1 SH 2 SH 2E and SH DSP Series 75 Trace Window for SH 3 and SH 3E Series sss 76 Trace
102. QACRO and QACR1 The QACRI dialog box has the same functions as the QACRO dialog box shown in figure 5 55 These dialog boxes are provided only for the SH 4 series In these dialog boxes specify the areas where the store queues 0 and 1 are mapped when the MMU is disabled Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 112 of 276 HITACHI 5 35 SARO to SAR3 Dialog Boxes SARO x Source ddress H 00000000 Help Cancel Figure 5 56 SARO Dialog Box These dialog boxes specify the values of the DMA source address registers 0 to 3 SARO to SAR3 The SAR1 to SAR3 dialog boxes have the same functions as the SARO dialog box shown in figure 5 56 These dialog boxes are provided only for the SH 4 series In these dialog boxes specify the DMA transfer source addresses corresponding to channels 0 to 3 Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 113 of 276 HITACHI 5 36 DARO to DAR3 Dialog Boxes DARO Ed Destination Address 00000000 Help i E Cancel Figure 5 57 DARO Dialog Box These dialog boxes specify the values of the DMA destination address registers 0 to 3 DARO to DAR3 The DARI to DAR3 dialog boxes have the same functions as the D
103. SH DSP with Cache the simulator debugger simulates cache operations and displays the cache contents and cache hit rate Cache operations during user program execution can be monitored The cache functions depend on the CPU 3 5 1 Displaying Cache Contents SH 3 SH 3E SH 3DSP series and SH DSP with Cache The following dialog boxes are provided to manipulate the cache e Cache dialog box Displays and flushes the cache contents e Cache Modify dialog box Modifies the cache contents For the SH 3 and SH 3E series the Cache dialog box enables the cache capacity to be modified and the half of the cache to be used as internal RAM Table 3 2 shows the cache capacity and the ways to be used Table 3 2 Specifiable Cache Capacity for SH 3 and SH 3E Series Simulator Debugger Internal RAM Specification Cache Capacity Ways to Be Used Ways that Can Be Used as Internal RAM 8 kbytes Ways 0 to Ways 2 and 3 can be used as internal RAM 4 kbytes Ways 0 and 1 Way 1 can be used as internal RAM 2 kbytes Way 0 No way can be used as internal RAM Rev 3 0 09 00 page 12 of 276 HITACHI For details refer to section 5 60 Cache Dialog Box and section 5 61 Cache Modify Dialog Box For the cache control register refer to section 5 32 CCR Dialog Box and section 5 33 CCR2 Dialog Box only for SH 3DSP series The cache is mapped in the range H F0000000 to H F1FFFFFF in the SH 3 SH 3E and SH 3DSP series In the SH DSP with Cache the address
104. Specifies the cache operating mode in the PO UO and P3 areas CE bit Cache enable bit Rev 3 0 09 00 page 106 of 276 HITACHI SH 3DSP Series CCR Iv CF bit Bit3 CB bit Bit2 IV WT bit Bitl jo IV CE bit Bit Figure 5 50 CCR Dialog Box for SH 3DSP Series The following items must be specified Selecting each box turns the setting on CF bit CB bit WT bit CE bit Cache flush bit Selecting this box and clicking the OK button flushes the V U and LRU bits of all entries in the cache Copy back bit Specifies the cache writing mode in the P1 area Write through bit Specifies the cache operating mode in the PO UO and P3 areas Cache enable bit Rev 3 0 09 00 page 107 of 276 HITACHI SH 4 SH 4BSC CCR V IIX bit Bitl5 7 OIX bit Bit7 7 ORA bit Bit5 V ICI bit Bitl 1 7 OCI bit Bit3 7 CB bit Bit2 Iv ICE bit Bit8 IV bit Bit0 Iv WT bit Bitl Help Figure 5 51 CCR Dialog Box for SH 4 SH 4BSC The following items must be specified Selecting each box turns the setting on IIX bit ICI bit ICE bit OIX bit OCI bit OCE bit ORA bit CB bit WT bit IC index enable bit IC disable bit Selecting this box and clicking the OK button flushes the V bits of all entries in the IC IC enable bit Specifies whether or not to use the IC OC index enable bit OC disable bit Selecting this box and
105. Start address of the memory corresponding to a memory type End address End address of the memory corresponding to a memory type State count Number of memory access cycles Data bus size Memory data bus width For the SH 4 series Start address and End address cannot be modified Specify Memory type and Data bus size In addition for the SH 4 series clicking the Set state button opens the Set State dialog box and the number of wait states to be inserted in areas 0 to 7 can be specified The specified values correspond to the values in the WCR1 and WCR2 control registers Clicking the OK button stores the settings Clicking the Cancel button closes this dialog box without modifying the settings Note The memory map setting for the area allocated to a system memory resource cannot be deleted or modified First delete the system memory resource allocation with the Memory Map dialog box then delete or modify the memory map setting Rev 3 0 09 00 page 88 of 276 HITACHI 5 200 Set State Dialog Box This dialog box specifies the wait state to be inserted in each area This dialog box is provided only for the SH 4 series Note that only the normal memory is supported for the SH 4 SH 4 SH7750R The Set State dialog box contents depend on the memory type allocated to the target area The values set in this dialog box are also set to the WCR1 and WCR2 control registers Normal Memory Burst ROM and Byte Control SR
106. System Status Window Allows the user to view the current status of the debugging platform Rev 3 0 09 00 page 74 of 276 HITACHI The System Status window is split into four panes 1 Session contains information about the current session including the connected debugging platform and the names of loaded files 2 Platform contains information about the current status of the debugging platform typically including CPU type and mode run status and timing information 3 Memory contains information about the current memory status including the memory mapping resources and the areas used by the currently loaded object file 4 Events contains information about the current event breakpoint status including resource information A popup menu containing the following options is available by right clicking within the window 5 13 1 Update Updates the displayed data 5 13 2 Copy Only available if a block of text is highlighted This copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 14 Trace Window This window displays trace information The displayed information items depend on the target CPU The trace acquisition conditions can be specified in the Trace Acquisition dialog box SH 1 SH 2 SH 2E and SH DSP Series Trace 661 records no filter of x CYCLE ADDR PIPELINE Source 0000000000 PIPELINE RESET void main void 0000000002 00000
107. System Status window 11 2 Standard Breakpoints PC Breakpoints When you are trying to debug your program you will want to be able to stop the program running when it reaches a specific point or points in your code You can do this by setting a PC breakpoint on the line or instruction at which to want the execution to stop The following instructions will show you how to quickly set and clear simple PC breakpoints More complex breakpoint operation can be done via the Breakpoints window which is discussed later To set a program PC breakpoint 1 Make sure that the Source window is open at the place you want to set a program PC breakpoint 2 Double click in the BP column or press F9 at the line showing the address at which you want the program to stop 3 You will see a circle and the word Break appear in the column to indicate that a program PC breakpoint has been set Rev 3 0 09 00 page 229 of 276 HITACHI SE Tutorial c i OF Xx Line Address BP Label Source 00001012 main void main void 1 i 00001018 if MDCR BIT MDS3 0x6 printf Sele 00001024 return 00001026 L SYSCR BYTE 0x01 00001030 SYSCR BYTE O0x1 00001038 BCRL BIT EAE 0 00001040 STOP MODE Figure 11 1 Setting a Program Breakpoint Now when you run your program and it reaches the address at which you set the program PC breakpoint execution halts with the message Break PC Breakpoint displayed on the stat
108. Window for SH 3DSP 77 Trace Window for SH 4 Series eene enne enne 79 Trace Acquisition Dialog Box nece eene trt irte te 82 Trace Search Dialog BOX eere nennen nennen nennen rennen 83 Watch WindOw I RO ERR UE RED PE EE AA peter 84 System Configuration Dialog Box essere nennen eene 85 Memory Map Modify Dialog Box sees enne 88 Set State Dialog Box Normal Memory nennen 89 Set State Dialog Box DRAM 90 Set State Dialog Box 90 setistate Dialog Box MPX Joies ene rrt de eder ete ee ri eere edens 91 Memory Map Dialog Box sees nennen nennen eene enne 92 System Memory Resource Modify Dialog Box eee 94 Control Registers Window for SH 3 and SH 3E 95 Control Registers Window for SH 3DSP Series 96 Control Registers Window for SH 4 Series seeeseeeeeeeerenen 96 Control Registers Window for SH DSP with Cache sese 97 Rev 3 0 09 00 page xv of xx HITACHI Figure 5 39 PTEH Dialog II epe fed 98 Figure 5 40 PTEL Dialog Box for SH 3 SH 3E and SH 3DSP Series 99 Figure 5 41 PTEL Dialog Box for SH 4 Series nennen 100
109. a RC Sac td ei ea eaa MeL ait is be teet 47 AST XCopyociaken enmt tenere o eet e OH 47 4 5 8 Compare ice ERU E UU RUD E eU ere ce 47 45 9 Configure Map cune heHhoDureletnepe n epar eerte 47 4 5 10 Configure Overlay ecc aun terre eie e e Ee recedere antes 47 Nune P 47 406 l Status Bat EEREEE TIS 47 46 2 OPUOD Ss sees 48 46 3 Radix wir npt BAe eS HEE ie i Re ER 48 40 4 CUSTOMIZE iR Ug 48 4 6 5 Configure Platform 48 Mans sian ERES 48 4 71 Cascade eee e P EE DR E 49 4A 12 ae ieee aa Oak eae 49 41 3 _ Arrange ICONS ione me cte a Pagi 49 ATA se RUE UU RUE UN 49 Help 5ueithetunst heDueieene pu es acest tia see tats Mette AS 49 ASV Shien nals Re ae oe 49 4 82 gt Usmg este rq d 49 48 3 Search for Help Oon eee eee ete reed pres 49 Rev 3 0 09 00 page v of xx HITACHI ASA About emn bremen 49 Section 5 Windows and Dialog Boxes eese 51 5 1 Window osse te eerte e Ea ESE E E EEEE E E KESSE 51 SM OU e a sees ees ea ee e ae aT 52 Edilizia ee eo 52 5 1 3 D cece eo Ee eR ERN 52 541 4 Delete Ah as To ee gna 52 919 JDisable Enable 5e erect ree
110. a condition was satisfied and execution has stopped Break Register The break register condition was satisfied and execution has stopped Break Sequence The break sequence condition was satisfied and execution has stopped PC Breakpoint The breakpoint condition was satisfied and execution has stopped Sleep Execution has been stopped by the SLEEP instruction Step Normal End The step execution succeeded Stop Execution has been stopped by the Stop button Trace Buffer Full Since the Break mode was selected by Trace buffer full handling in the Trace Acquisition dialog box and the trace buffer became full execution was terminated Rev 3 0 09 00 page 207 of 276 HITACHI 7 2 Error Messages The simulator debugger outputs error messages to notify users of the errors of user programs or operation Table 7 2 lists the error messages Table 7 2 Error Messages Message Address Error Contents One of the following states occurred e APC value was an odd number e Aninstruction was read from the internal I O area e Word data was accessed to an address other than a multiple of 2 e Longword data was accessed to an address other than a multiple of 4 e The VBR or SP was a value other than a multiple of 4 e Anerror occurred in the exception processing of an address error Correct the user program to prevent the error from occurring Exception Error An error occurred during excep
111. achi reserves the right to change wholly or partially the specifications design user s manual and other documentation at any time without notice 2 This user s manual and this system are copyrighted and all rights are reserved by Hitachi No part of this user s manual all or part may be reproduced or duplicated in any form in hard copy or machine readable form by any means available without Hitachi s prior written consent 3 Hitachi assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein Preface Read First READ this user s manual before using the Hitachi Debugging Interface hereinafter referred to as the HDI KEEP the user s manual handy for future reference Do not attempt to use the system until you fully understand its mechanism About this Manual This manual explains the use of the simulator debugger and the HDI and for Hitachi microcomputer development tools The following section will provide a brief Introduction to the debugging interface and simulator debugger and list its key features The following sections System Overview Simulator Debugger Functions Menus Windows and Dialog Boxes Command Lines and Messages give reference information about the operation and facilities available from these respective areas The following sections Looking at Your Program Working with Memory Executing Your Program Sto
112. ady fetched and decoded is cleared and new data is fetched and decoded from the current PC In addition the number of executed instructions and the number of instruction execution cycles are zero cleared 3 4 Memory Management Unit MMU For the SH 3 SH 3E SH 3DSP and SH 4 series the simulator debugger simulates MMU operations such as TLB operations address translation or MMU related exceptions TLB miss exception TLB protection exception TLB invalid exception and initial page write exception The user program using address translation by the MMU can be simulated and debugged In addition the MMU related exception handler routines can be simulated and debugged The MMU functions depend on the CPU SH 3 SH 3E and SH 3DSP Series The following dialog boxes are provided to manipulate the 32 entry 4 way TLB contents e dialog box Displays and flushes TLB contents e TLB Modify dialog box Modifies the TLB contents e Find dialog box Searches TLB contents For details refer to section 5 50 TLB Dialog Box section 5 51 TLB Modify Dialog Box and section 5 52 TLB Find Dialog Box The is mapped in the range H F2000000 to H F3FFFFFF that is all entries of are allocated within this range SH 4 Series The following dialog boxes are provided to manipulate the 4 entry instruction TLB ITLB and 64 entry unified TLB UTLB contents e Instruction TLB dialog box Displays and flushes the
113. al Octal Binary Figure 15 14 Setting Radix Rev 3 0 09 00 page 259 of 276 HITACHI Rev 3 0 09 00 page 260 of 276 HITACHI Section 16 Co verification Functions This section describes co verification using the Synopsys Eagle For details of the Eagle or hardware simulator refer to the applicable manuals for the product 16 1 Features The simulator debugger can simulate and debug SuperH RISC engine microcomputers It can perform co verification for the SH 3DSP SH 4 and SH DSP SH7065 series microcomputers The co verification function evaluates programs written in C C language or assembly language at an early stage before hardware development is completed Co verification supports the following and enables efficient program testing and debugging e Interrupts such as NMI IRQ IRL or Timer e Bus width WAIT or IDLE e A timer 16 2 Operating Environment Co verification can be executed in the following environment WindowsNT machine UNIX machine Simulator Hardware debugger simulator Figure 16 1 Operating Environment of Co Verification Notes 1 Co verification can only be performed on Windows and cannot be performed on Windows 95 or Windows 98 2 Eagle can also run on UNIX However an environment to operate the remote shell must be implemented on Windows NT Rev 3 0 09 00 page 261 of 276 HITACHI 16 3 Simulator Debugger Functions This section describes the simulator d
114. alog box without displaying the modified contents in the Operand Cache dialog box Rev 3 0 09 00 page 157 of 276 HITACHI 5 67 Simulated I O Window ii Simulated 170 Window Simulated 1 0 Figure 5 92 Simulated I O Window This window is for standard I O and file I O system calls from the user program Clicking the right mouse button on the Simulated I O window displays the following popup menus Copy Copies the highlighted text to the Windows clipboard so that the text can be pasted to another application Paste Pastes the text from the Windows clipboard to the Simulated I O window Clear Window Clears the contents of the Simulated I O window For the I O processing refer to section 3 12 Standard I O and File I O Processing Rev 3 0 09 00 page 158 of 276 HITACHI 5 68 Stack Trace Window Stack Trace Value fune3 short 0 00000094 param 3 Ox00003ffa Ox00003fd8 short local 3 D 3 0 00003 44 unsigned long funcZ short Ox00000072 param 2 Ox00003ffa Ox00003fe4 short local 2 2 Ox00003fe0 unsigned long funci short Ox0000003e param 1 Ox00003ffa Ox00003ff0 short local 1 D i 0x00003fec unsigned long main 0 00000012 start 103 Ox00003ffa short F P L F P L F P L F L Figure 5 93 Stack Trace Window This window displays the function call history The following items are displayed Kind Indicates the type of t
115. ame is entered the Select Function dialog box opens for you to select a function 5 124 Set Line Launches the Set Line dialog box allowing the user to display and move the text cursor not the mouse cursor to a specific line 5 12 5 Go To Cursor el Commences to execute the user program starting from the current PC address The program will continue to run until the PC reaches the address indicated by the text cursor not the Rev 3 0 09 00 page 73 of 276 HITACHI mouse cursor or another break condition is satisfied Grayed if not supported by the debugging platform 5 12 6 Set PC Here Changes the value of the PC to the address indicated by the text cursor not the mouse cursor 5 127 Instant Watch Launches the Instant Watch dialog box with the name extracted from the view at the current text cursor not mouse cursor position 5 128 Add Watch Adds the name extracted from the view at the current text cursor not mouse cursor position to the list of watched variables If the Watch window is not open then it is opened and brought to the top of the child windows 5 12 9 Go to Disassembly Opens a Disassembly view at the address matching the current source line 5 13 System Status Window System Status DE x Item Status Connected to SH 1 Simulator CPU SH 1 Run Status Ready Break Cause PC Breakpoint Single Step Count Lo x Execute From Pipeline Reset Exec Instructions 600 Figure 5 19
116. an be modified searched and flushed using the following buttons Modify Find Flush Clicking the OK button stores the modified contents in the memory Clicking the Cancel Modifies the TLB contents After selecting the entry to be modified in the list box click the button The TLB Modify dialog box will open and the TLB contents can be modified Searches the TLB contents Clicking the button will open the TLB Find dialog box and the search condition can be specified Flushes all TLB contents Clicking the button clears the valid bits of all address arrays and data arrays and invalidates all TLB entries button closes the dialog box without storing the modified contents Rev 3 0 09 00 page 131 of 276 HITACHI 5 5 Modify Dialog Box TLB Modify Ed Entry Virtual Address n oo ni 0000000 Way Physical Addess o H 20000000 d ASID H 0 H FF 00 Cacheable Dirty Protection Share status PV Mode User Mode Read only No access C Read Write No access 1 Kbyte page C Read only Read only Page Size C 4Kbyte page Help Figure 5 72 Modify Dialog Box C Read Write Read Write This dialog box specifies the TLB contents of the entry and way selected in the TLB dialog box This dialog box is provided only for the SH 3 SH 3E and SH 3DSP series The following items can be specified Entry Entry number selected by the TLB dialo
117. ancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 104 of 276 HITACHI 5 31 Dialog E3 Immediate Data Bit9 2 Cancel Figure 5 48 TRA Dialog Box This dialog box specifies the value of the TRAPA exception register TRA This dialog box is provided only for the SH 3 SH 3E SH 3DSP and SH 4 series Immediate Data specifies an immediate value H 00 to H FF The specified value is multiplied by four and the result is set in the TRA register Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 105 of 276 HITACHI 5 32 CCR Dialog Box This dialog box specifies the following values of the cache control register CCR This dialog box is provided only for the SH 3 SH 3E SH 3DSP SH 4 series and SH DSP with Cache The displayed contents depend on the target CPU SH 3 and SH 3E Series CCR 7 RA bit Bit5 IV CF bit Bit3 7 WT bit Bitl poen IV CE bit Bit Figure 5 49 CCR Dialog Box for SH 3 and SH 3E Series The following items must be specified Selecting each item turns the setting on RA bit RAM bit Specifies the cache operating mode CF bit Cache flush bit Selecting this box and clicking the OK button flushes the V U and LRU bits of all entries in the cache WT bit Write through bit
118. and flushed using the following buttons Modify Modifies the IC contents After selecting the entry to be modified in the list box click the button The Instruction Cache Modify dialog box will open and the IC contents can be modified Flush Flushes all IC entries Clicking the button clears the V bits of all entries to zero and invalidates all IC entries Rev 3 0 09 00 page 150 of 276 HITACHI Clicking the OK button stores the modified contents in the memory Clicking the Cancel button closes the dialog box without storing the modified contents SH 4 SH7750R Instruction Cache EntV 130 11 Lw2 LW3 LWA4 LW5 LW6 LW7 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 00000000 00000000 00000000 00000000 00000000 00000000 000
119. ange heat radiation characteristics installation conditions and other characteristics Hitachi bears no responsibility for failure or damage when used beyond the guaranteed ranges Even within the guaranteed ranges consider normally foreseeable failure rates or failure modes in semiconductor devices and employ systemic measures such as fail safes so that the equipment incorporating Hitachi product does not cause bodily injury fire or other consequential damage due to operation of the Hitachi product This product is not designed to be radiation resistant No one is permitted to reproduce or duplicate in any form the whole or part of this document without written approval from Hitachi Contact Hitachi s sales office for any questions regarding this document or Hitachi semiconductor products Trademarks Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States and or other countries IBM PC is the name of a computer administered by International Business Machines Corporation ELF DWARF is the name of an object format developed by the Tool Interface Standards Committee products or brand names used in the manual are trademarks or registered trademarks of their respective companies Read First 1 Hitachi Ltd including its subsidiaries hereafter collectively referred to as Hitachi pursues a policy of continuing improvement in design performance and safety of the system Hit
120. ariables in the source files via the debugging information available in the object file The following items are displayed Name Name of the variable Value Value assigned location and type The assigned location is enclosed by and the type is enclosed by The variables are listed with a plus indicating that the information may be expanded by double clicking on the variable name and a minus indicating that the information may be collapsed Alternatively the plus and minus keys may be used For more information on the display of information refer to section 12 3 2 Expanding a Watch A popup menu containing the following options is available by right clicking within the window 5 7 1 Copy Only available if a block of text is highlighted This copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 7 2 Edit Value Launches a dialog box to modify the selected variable s value Rev 3 0 09 00 page 65 of 276 HITACHI 5 7 3 Radix Changes the radix for the selected local variable display 5 8 Memory Window Byte Memory _Temp_Name iol OF xi Figure 5 14 Memory Window Allows the user to view and modify the contents of the debugging platform s memory Memory may be viewed in ASCII byte word long word single precision floating point and double precision floating point formats and the title bar indicates the current view style and the address shown as
121. artup boot H O0O0001012 main H O000106A MODE H 0000108E MASK1 H ODOD010BA DMAC RUN H 00001180 MASKZ H 000011Ac _DTC_REGS 00001298 SCIO ACT 000012 2 SCIO RUN H 00001316 H 00001342 RUN H 00001358 DEND A H 0000136C WOVI H O0000139E _ H O000013c6 COPY MEM H 00001412 INITSCT H 0000145C D ROM Figure 8 4 Labels Window You can view symbols sorted either alphabetically by ASCII code or by address value by clicking on the respective column heading You can quickly set a software break at an address by double clicking or right clicking and selecting Break on the BP popup menu in the BP column 8 3 2 Adding a Label from a Source or Disassembly Window You can quickly add a label from a Source or Disassembly window by double clicking in the Label column at the address for which you want to assign the Label The Label dialog box opens for you to enter the text Figure 8 5 Label Dialog Box Rev 3 0 09 00 page 214 of 276 HITACHI Enter the label name text and click OK so that the label is added to the label list with the address value contained in the Address column of the corresponding line and the Source window display is updated to show the label The Clear button can be used to remove the label This method can also be used for quickly modifying the text of existing labels When you double click on the label in the Label column the text is copied
122. bbreviation SR Description Controls the speed of stepping in the STEP and STEP_OVER commands A rate of 6 causes the fastest stepping A value of is the slowest Syntax sr lt rate gt Parameter Type Description none Displays the step rate lt rate gt Numeric Step rate 1 to 6 6 fastest Examples SR Displays the current step rate SR6 Specifies the fastest step rate SUBMIT Abbreviation SU Description Executes a file of emulator commands This command can be used even in a command file to be processed Any error aborts the file The stop button terminates the process Syntax su lt filename gt Parameter Type lt filename gt String Examples SUBMIT COMMAND HDC SU A SETUP TXT Description File name Processes the file COMMAND HDC Processes the file SETUP TXT on drive A Rev 3 0 09 00 page 201 of 276 HITACHI SYMBOL_ADD Abbreviation SA Description Adds a symbol or changes an existing one Syntax sa lt symbol gt lt value gt Parameter Type Description lt symbol gt String Symbol name lt value gt Numeric Value Examples SYMBOL ADD start H 1000 Defines the symbol start at 1000 SA END_OF_TABLE 1000 Uses current default radix and defines END_OF_TABLE at H 1000 SYMBOL CLEAR Abbreviation SC Description Deletes a symbol If no parameters are specified deletes all symbols after confirmation Syntax sc lt symbol gt Parameter Type Descript
123. bels ensesehe eee aeo phOURI Pep Ipeiene oe 214 8 3 2 Adding a Label from a Source or Disassembly Window sess 214 84 Looking ata Specie Address sce oec oerte Dont ee me re Din 215 8 4 1 Looking at the Current Program Counter Address esses 216 Rev 3 0 09 00 page xi of xx HITACHI 829 Finding on Le Dementia Section 9 Working with Memory eese eeene nennen enne nnne 9 1 Looking at an Area of MeMory w eee ee cee cee cece cneeceeeeeeeeeeeeeeeeeeeeesecesecsaecsaecaeeeneeeeeee 9 1 1 Displaying Memory as ASCII eee eeceseceseceseceseceecaeecaeseaeseaseseesereeeensees 9 1 2 Displaying Memory as Bytes nennen nennen 9 1 3 Displaying Memory as Words sese 9 1 4 Displaying Memory as Longwords eene nennen 9 1 5 Displaying Memory as Single Precision Floating Point sss 9 1 6 Displaying Memory as Double Precision Floating 9 1 7 Looking at a Different Area of Memory ssssseeeeeeeee nen 9 2 Modifying Memory Contents eb iere t e HEP rees E rE rie si pen 02 Rr EB ii ED Rt d 92 2 A rime 9 2 3 Selecting a Memory Range essere nennen nenne 9 3 Finding Value 1n Memory ceret ete rete 9 4 Filling an Area of Memory
124. by sending text based commands instead of the window menus and commands It is useful if a series of predefined commands need to be sent to the debugging platform by calling them from a batch file and optionally recording the output in a log file The command can be executed by pressing Enter after the command is input to the text box Or the Enter button in the right of the text box is clicked For information about the available commands refer to the on line help If available the window title displays the current batch and log file names separated by colons The functionality of the toolbar buttons is identical to the popup menu options shown below 5 4 1 Set Batch File Launches the Set Batch File dialog box allowing the user to enter the name of an HDI command file hdc The batch file is then run automatically The name of the file is shown on the window title bar Rev 3 0 09 00 page 56 of 276 HITACHI 5 4 2 3 Runs the last entered HDI command file hdc It is displayed in a recessed state while the batch file is running and can be used to stop an executing batch file and return control to the user 5 4 3 Set Log File Launches the Open Log File dialog box allowing the user to enter the name of an HDI log file log The logging option is automatically set and the name of the file shown on the window title bar Opening a previous log file will ask the user if they wish to append or over write
125. c values will be displayed and entered by default without entering the radix prefix The current radix has a check mark to its left and the associated toolbar button is locked down For example if the current radix is decimal then the number ten will be displayed as 10 and may be entered as 10 H A 0 etc if the current radix is hexadecimal then the number ten will be displayed as 0A and entered as A p 10 etc 4 6 4 Customize Cascades menu displaying list of options that be customized by the user Toolbar When this cascade menu option is selected the Customize dialog box is launched Font When this cascade menu option is selected the Font dialog box is launched allowing a fixed width font to be selected File Filter When this cascade menu option is selected the Customize File Filter dialog box is launched allowing the browser file filters for object source and memory files to be changed to match the user s requirements 4 6 5 Configure Platform if Launches a set up dialog box allowing the user to modify the debugging platform settings Refer to section 5 18 System Configuration Dialog Box for more details 4 7 Window The Window menu modifies the display of currently open child windows The following menu options are always displayed and a numbered list of current child windows will be appended the topmost child window will have a check mark Rev 3 0 09 00
126. cation Closing these windows automatically disconnects Eagle When referencing and modifying the memory contents by using the simulator debugger there are cases when the hardware simulator cycles are counted and not counted Hardware simulator cycles are counted in coupling mode and when the memory model on the hardware simulator is accessed in the uncoupling mode Hardware simulator cycles are not counted in cases other than above When the Eagle s Local memory and Direct memory are used the number of cycles displayed in the Trace window and Status window are incorrect To refer to the correct number of cycles use the Eagle s Remote memory Rev 3 0 09 00 page 268 of 276 HITACHI Appendix A System Modules The following section describes the architecture of the HDI debugging system HDI graphical user interface Debugging platform User User code system object file hardware EL Figure A 1 HDI System Modules In normal operation the user program will be placed directly into the user system hardware for example as an EPROM HDI uses this information to provide a Windows based debugging system To decrease the learning curve when swapping between different debugging platforms and or user system hardware HDI provides a single unified interface the GUI and a family of target specific modules Normally the user will only interact with the standard GUI once the appropriate targe
127. ck of the debugging platform s memory for a specified data value If a block of memory is highlighted the start and Rev 3 0 09 00 page 67 of 276 HITACHI end fields in the dialog box will be set automatically with the start and end addresses corresponding to the highlighted block respectively 5 8 9 Set Address Launches the Set Address dialog box allowing the user to enter a new start address The window will be updated so that this is the first address displayed in the top left corner When an overloaded function or a class name including a member function is entered the Select Function dialog box opens for you to select a function 5 8 10 ASCIUByte Word Long Single Float Double Float A check mark next to these six options indicates the current view format The user may select a different option to change to that format 5 9 Performance Analysis Window Performance Analysis iof imi xi Index Function Cycle Count Histogram 58 988988 Figure 5 15 Performance Analysis Window This window displays the number of execution cycles required for the specified functions The number of execution cycles can be obtained from the difference between the total number of execution when the target function is called and that when execution returns from the function The following items are displayed Index Index number of the set condition Function Name of the function to be measured or the start address of the function
128. clicking the OK button clears the V and the U bits of all entries in the OC to zero OC enable bit Specifies whether or not to use the OC OC RAM bit Copy back bit Specifies the cache writing mode in the P1 area Write through bit Specifies the cache writing mode in the PO UO and P3 areas Rev 3 0 09 00 page 108 of 276 HITACHI SH 4 SH7750R CCR EMODE bit Bit31 OCI bit Bit3 V IIX bit Bit15 I7 bit Bit0 V ICI bit Bitl 1 7 ORA bit Bit5 Bes ICE bit Bit8 7 CB bit Bit2 IV OIX bit Bit7 IV WT bit Bitl Figure 5 52 CCR Dialog Box for SH 4 SH7750R The following items must be specified Selecting each box turns the setting on EMODE bit Cache doubled mode bit IIX bit IC index enable bit ICI bit IC disable bit Selecting this box and clicking the OK button flushes the V bits of all entries in the IC ICE bit IC enable bit Specifies whether or not to use the IC OIX bit OC index enable bit OCI bit OC disable bit Selecting this box and clicking the OK button clears the V and the U bits of all entries in the OC to zero OCE bit OC enable bit Specifies whether or not to use the OC ORA bit OC RAM bit CB bit Copy back bit Specifies the cache writing mode in the P1 area WT bit Write through bit Specifies the cache writing mode in the PO UO and P3 areas Rev 3 0 09 00 page 109 of 276 HITACHI SH DSP with Cache Figure 5 53 CCR Dialog Bo
129. currently open windows will be closed and the connection to the debugging platform initialized If user program has been downloaded to the user system then the status bar will Rev 3 0 09 00 page 256 of 276 HITACHI display the percentage done When the download is completed windows will be opened updated to show the latest information from the user system 15 9 Setting HDI Options There are a number of settings available to help you to use the HDI interface Choosing the Setup gt Options menu option will launch the HDI Options dialog box HDI Options x Session Confirmation Viewing On Exit Save session automatically Prompt for save session Quit without asking Load last session on startup Cancel Figure 15 11 HDI Options Session Dialog Box The On Exit group of radio buttons automates saving the current session when the user program is shut down e Save session automatically This will save the session information in the current session file If there is no current session file then you will be prompted to enter an HDI session file name e Prompt for save session This will always ask you if you want to save the current session when the program is shut down If you select Yes then the session information is saved in the current session file If there is no current session file then you will be prompted to enter a session file name Quit without asking This shuts down the program
130. curring Illegal LRU Set LRU value of the cache is invalid Check the setting Illegal Operation Either of the following states occurred e A division by zero occurred during DIV1 instruction execution Zero was written to by the SETRC instruction Correct the user program to prevent the error from occurring Illegal PR bit An attempt was made to execute an FPU instruction while the PR bit value of the FPSCR is illegal Correct the user program to prevent the error from occurring Initial Page Write Initial page write occurred during simulation Take necessary procedures such as updating the TLB contents Instruction TLB Illegal LRU An LRU value in the instruction TLB is illegal Check the setting Instruction TLB Miss Instruction TLB Protection Violation An instruction TLB miss occurred during memory access Take necessary procedures such as updating the TLB contents An instruction TLB protection exception occurred during memory access Take necessary procedures such as updating the TLB contents Invalid DSP Instruction Code An invalid instruction code was detected in the DSP parallel instruction Correct the user program to prevent the error from occurring Invalid Slot Instruction Either of the following states occurred Aninstruction that changes a PC value a branch instruction immediately after a delayed branch instruction was executed e Anerror occurred during the exce
131. d Flush Flushes all cache contents Clicking the button clears the V U and LRU bits of all entries to zero and invalidates all cache entries Clicking the OK button stores the modified contents in the memory Clicking the Cancel button closes the dialog box without storing the modified contents Rev 3 0 09 00 page 146 of 276 HITACHI 5 61 Cache Modify Dialog Box Cache Modify Ed Entry Long YYord0 noi pu ys 00000000 Tag Address Long Word1 n 0000000 11111111 LRU Long YWord2 000000 H 22222222 iv Valid Long YYord3 a 33333333 Help Figure 5 82 Cache Modify Dialog Box This dialog box modifies the cache contents of the way and entry selected in the Cache dialog box This dialog box is provided only for the SH 3 SH 3E SH 3DSP series and the SH DSP with cache The following items can be specified Entry Entry number selected by the Cache dialog box Way Way number selected by the Cache dialog box Tag Address Tag address A longword physical address must be specified Bits 31 to 10 are valid LRU Numerical string that determines which way s entry should be replaced when a cache miss occurs The LRU values for the same entries in the other ways are also modified to the specified value Valid Specifies whether or not the entry is valid Selecting this box makes the entry valid Rev 3 0 09 00 page 147 of 276 HITACHI Update Indicates whet
132. d Next Finds the next occurrence of the label containing the text that you entered 5 6 5 View Source Opens the Source or Disassembly window containing the address corresponding to the label 5 6 6 Copy Only available if a block of text is highlighted This copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 6 7 Delete Deletes the currently selected label from the symbol list Alternatively use the Delete accelerator key A confirmation message box appears Rev 3 0 09 00 page 62 of 276 HITACHI HDI Please confirm Delete label Figure 5 10 Message Box for Confirming Label Deletion If you click on the Yes button the label is removed from label list and the window display is updated If the message box is not required then do not select the Delete Label option of the Confirmation seat in the HDI Options dialog box 5 6 8 Delete Deletes all the labels from the list confirmation message box appears HDI amp Please confirm Delete ALL labels Figure 5 11 Message Box for Confirming All Label Deletion If you click on the Yes button all the labels are removed from the HDI system s symbol table and the list display will be cleared If the message box is not required then do not select the Delete All Labels option of the Confirmation seat in the HDI Options dialog box 5 6 9 Load Merges a symbol file into HDI s current symbol tab
133. d in the Trace window The trace information displayed in the Trace window depends on the target CPU as follows SH 1 SH 2 SH 2E and SH DSP Series e Total number of instruction execution cycles e Instruction address e Pipeline execution status e Instruction mnemonic e Data access information destination and accessed data e C C or assembly language source programs Rev 3 0 09 00 page 21 of 276 HITACHI SH 3 and SH 3E Series e Total number of instruction execution cycles e Data on the address bus Data on the data bus e Instruction code e Instruction number e Instruction mnemonic e Instruction number that was fetched enclosed by when the instruction did not access memory e Instruction number that was decoded e Instruction number that was executed e Instruction number that accessed memory e Instruction number that wrote back data e Data access information destination and accessed data e C C or assembly language source programs SH 3DSP Series e Total number of instruction execution cycles e Program counter value e Instruction code e Instruction number that was fetched enclosed by when the instruction did not access memory e Instruction number that was decoded e Instruction number that was executed e Instruction number that accessed memory e Instruction number that wrote back data e Instruction number e Instruction mnemonic e Data access information destination and acces
134. dent of the current default system radix Symbols may be used by name and ASCII character strings can be entered if surrounded by single quote characters e g demo Rev 3 0 09 00 page 5 of 276 HITACHI The following prefixes be used to identify radices O Octal Decimal Hexadecimal Ox Hexadecimal The contents of a register may be used by specifying the register name prefixed by the character e g R1 FR2 2 2 3 Precision All mathematics in expression evaluation is done using 32 bits signed Any values exceeding 32 bits are truncated 2 2 4 Expression Examples Buffer_start 0x1000 R1 B 10001101 pointer 2 increment_size amp gt gt D 15 flag ER4 2 2 5 Symbol Format You can specify and reference symbols in the same format as in programming language Cast operators may be used together with symbols and you can reference data after its type has been converted Note the following limitations e Pointers can be specified up to four levels e Arrays can be specified up to three dimensions e No typedef name can be used Rev 3 0 09 00 page 6 of 276 HITACHI 2 2 6 Symbol Examples Object value p Object value Class value value 0 Object value g value Class function short struct STR value 2 3 Help Specifies direct reference of a member Specifi
135. des simulation functions for SuperH RISC engine series SH 1 SH 2 SH 2E SH 3 SH 3E SH 3DSP SH 4 and SH DSP series microprocessors and provides debugging functions for programs written in C or assembly language Therefore the simulator debugger promotes efficient debugging of programs In the SH 4 series there are two types of microprocessors SH 4 and SH 4 SH7750R which have different cache specifications In addition the SH 4 consists of two different version microprocessors one improves the simulation speed by limiting a part of simulation functions called SH 4 in this manual and one provides high level functions called SH 4BSC in this manual The SH DSP series consists of the SH DSP the SH 2DSP and the SH DSP SH7065 which do not have cache and SH DSP with Cache which has on chip cache Note that in this manual the SH 4 series means the SH 4 SH A4BSC and SH 4 SH7750R and the SH DSP series means the SH DSP the SH 2DSP the SH DSP SH7065 and the SH DSP with Cache When used with the following software the simulator debugger reduces the time required for software development e Hitachi Embedded Workshop HEW SuperH RISC engine series C C compiler SuperH RISC engine series cross assembler e Optimizing linkage editor Rev 3 0 09 00 page 1 of 276 HITACHI 1 1 Features e Since the simulator debugger r
136. des the performance analysis for the function sort AR Displays the function for which the performance analysis is provided ANALYSIS_RANGE_DELETE Abbreviation AD Description Deletes the specified function or all functions if no parameters are specified it does not ask for confirmation Syntax ad lt index gt Rev 3 0 09 00 page 176 of 276 HITACHI Description Parameter Type none lt index gt Numeric Deletes all functions Index number of function to delete Examples ANALYSIS_RANGE_DELETE 6 AD ASSEMBLE Abbreviation AS Description Deletes the function with index number 6 Deletes all functions Assembles mnemonics and writes them into memory In assembly mode exits steps back a byte the ENTER key steps forward a byte Syntax as lt address gt Parameter Type Description lt address gt Numeric Address at which to start assembling Example AS H 1000 Starts assembling from H 1000 ASSERT Abbreviation none Description Checks if an expression is true or false It can be used to terminate the batch file when the expression is false If the expression is false an error is returned This command can be used to write test harnesses for subroutines Syntax assert expression Rev 3 0 09 00 page 177 of 276 HITACHI Parameter Type Description lt expression gt Expression Expression to be checked Example ASSERT RO 0x100 Returns an err
137. dialog box e Register values displayed in the Registers window e Input data in the Register dialog box The floating point data format conforms to the ANSI C standard In the simulator debugger the rounding mode for floating point decimal to binary conversion can be selected in the System Configuration dialog box One of the following two modes can be selected e Round to nearest RN e Round to zero RZ If a denormalized number is specified for binary to decimal or decimal to binary conversion it is converted to zero in RZ mode and it is left as a denormalized number in RN mode If an overflow Rev 3 0 09 00 page 37 of 276 HITACHI occurs during decimal to binary conversion the maximum floating point value is returned in RZ mode and the infinity is returned in RN mode 3 15 Display of Function Call History The simulator debugger displays the function call history in the Stack Trace window when simulation stops which enables program execution flow to be checked easily Selecting a function name in the Stack Trace window displays the corresponding source program in the Source window the function that has called the current function can also be checked The displayed function call history is updated in the following cases e When simulation stops under the break conditions described in section 3 13 Break Conditions e When register values are modified while simulation stops due to the above break conditions e While single
138. e 102 5 29 EXPEVT Dialog edie etait UR OU ele mq testet 104 5 30 INTEVT Dialog Box eere are Rider 104 5 31 TRA Dialog BOX cie E ct ect v 105 5 32 COR Dialog d Se oen U dpt UE e Ue uote reU 106 5 33 CCR Dialog Box e teet ae dte eee AS 111 5 34 QACRO and QACRI Dialog Boxes eese eene enne enne nene en nnne enne 112 5 35 SARO to SAR3 Dialog 113 9 36 DARO DARZ Dialog Boxes oet dete e HERO EH tee MER SUPE 114 5 37 DMATCRO to DMATCR3 Dialog Boxes eese nennen rennen 115 5 38 CHCRO to CHCR3 Dialog Boxes essere nennen 116 5 39 DMAOR Dialog RR coebcvesesustssesoensaye 118 5 40 MCR Dialog Box nne eet eh hice irte tete pant 119 541 BERL Dialog BOX intente e eere tee dp E e iet prit eie 121 5 42 BER Dialog ond eerte o pe RE peel re Re ER 123 5 43 WERT Dialog BOX epu eD nene De De IUE 124 23 44 WER Dialog EAS Sie eee ead A DN EIER 125 23 45 WCRI Dialog deter 127 5 46 RICSR Dialog BOx ete pre en eene P Te eit tT erret ree e A de Meets 128 Rev 3 0 09 00 page viii of xx HITACHI DAT sete ipte tee tree 129 3 48 RICOR Dialog BOX ictor ote aeta
139. e FP EXASD Instruction number that was executed accessed memory or wrote back data in the FP pipeline only for FSCA FSRRA FIPR and FTRV instructions in the X stage and for FDIV and FSQRT instructions in the D stage Rev 3 0 09 00 page 79 of 276 HITACHI INSTRUCTION Instruction number assigned to the instruction to be executed memory address instruction code and mnemonic of that instruction ACCESS DATA Data access information display format destination transfer data Source or assembly language source programs Double clicking a line in the Trace window opens the Source window or Disassembly window In the window the source code is displayed and the selected line is indicated by the cursor A popup menu containing the following options is available by right clicking within the window 5 14 1 Find Launches the Trace Search dialog box allowing the user to search the current trace buffer for a specific trace record 5 142 Find Next If a find operation is successful and the item found is non unique then this will move to the next similar item 5 14 3 Filter This function is not supported by this simulator debugger version Launches the Filter Trace dialog box allowing the user to mask out all unnecessary trace entries 5 14 4 Acquisition Launches the Trace Acquisition dialog box allowing the user to define the area of user program to be traced This is useful to focus tracing on prob
140. e when the Enable Analysis in the Performance Analysis window is checked a warning message box is displayed Performance Analysis is enabled Profiling and Performance Analysis use the same resources so cannot be used at the same time If vou continue and enable Profiling Performance Analysis will be disabled This will delete your current Performance Analysis data Cancel Figure 5 103 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When OK is clicked the performance analysis data acquisition is disabled and the profile data acquisition is enabled Rev 3 0 09 00 page 170 of 276 HITACHI 5 71 8 Clear Data Clears the number of times functions are called and profile data Data in the List window and the Profile Tree window are also cleared 5 71 9 Multiple View If the Profile Chart window is going to be opened when it has already been opened selects whether another window is to be opened or the same window is to be used to display data When a check mark is shown to the left side of the menu text another window is opened 5 71 10 Output Profile Information File Displays the Save Profile Information File dialog box Profiling results are saved in a profile information file pro extension The optimizing linkage editor optimizes user programs according to the profile information in this file For details of the optimization using the profile information refer to the manual of the o
141. e Open Cache dialog box allowing the user to enter the type of cache that you wish to view 4 3 19 Simulated I O Opens the Simulated I O window enabling the standard I O and file I O 4 3 20 Control Register Opens the Control Registers window allowing the user to view and modify the control register contents 4 3 21 Stack Trace Opens the Stack Trace window displaying the current stack trace information 4 3 22 External Tool Opens the External Tools window allowing the user to use the co verification tool 4 4 Run The Run menu controls the execution of the user program in the debugging platform 4 4 1 Reset CPU mr 1 Resets the user system hardware and sets the PC to the reset vector address See also section 4 1 6 Initialize 4 4 2 Go Starts executing the user program at the current PC Rev 3 0 09 00 page 44 of 276 HITACHI 4 4 3 Reset Go Executes the user program from the reset vector address 4 4 4 Go To Cursor Bi Starts executing the user program at the current PC and continues until the PC equals the address indicated by the current text cursor not mouse cursor position 4 4 5 Set PC To Cursor Changes the value of the Program Counter PC to the address at the row of the text cursor not mouse cursor Disabled if no address is available for the current row 4 4 6 Run Launches the Run Program dialog box allowing the user to enter temporary breakpoints before executin
142. e at this address the program will not stop If this happens program execution can be stopped by pressing ESC choosing the Run gt Halt menu option or clicking on the Halt toolbar button Zh 2 The Go To Cursor feature requires a temporary breakpoint if you have already used all those available then the feature will not work and the menu option will be disabled 10 4 Running to Several Points When you want to perform something like the Go To Cursor operation but the destination is outside the Source window or want to stop at several addresses you can use HDI s temporary breakpoint feature see section 11 5 Temporary Breakpoints 10 5 Single Step When you are debugging your code it is very useful to be able to step a single line or instruction at a time and examine the effect of that instruction on the system In the Source window a step operation will step a single source line In the Disassembly window a step operation will step a single assembly language instruction If the instruction calls another function or subroutine you have the option to either step into or step over the function If the instruction does not perform a call then either option will cause the debugger to execute the instruction and stop at the next instruction Rev 3 0 09 00 page 226 of 276 HITACHI 10 5 1 Stepping Into a Function If you choose to step into the function the debugger will execute the call and stop at the first line or in
143. e precision floating point format Rev 3 0 09 00 page 192 of 276 HITACHI Examples MEMORY DISPLAY H C000 H 100 WORD MEMORY DISPLAY H 1000 H FF MEMORY EDIT Abbreviation ME Description Displays H 100 bytes of memory starting at H C000 in word units Displays H FF bytes of memory starting at H 1000 in byte units Allows memory contents to be modified When editing memory the current location may be modified in a similar way to that described in the ASSEMBLE command description When editing exits edit mode goes back a unit and blank line goes forward without modification Syntax me address lt mode gt lt state gt Parameter Type lt address gt Numeric lt mode gt Keyword byte word long ascii single double lt state gt Keyword V N Description Address to edit Format optional default byte Edits in byte units Edits in word units Edits in longword units Edits in ASCII codes Edits in the single precision floating point format Edits in the double precision floating point format Verify flag optional default V Verify No verify Rev 3 0 09 00 page 193 of 276 HITACHI Example ME H 1000 WORD Modifies memory contents in word units starting from H 1000 with verification MEMORY_FILL Abbreviation MF Description Modifies the contents in the specified memory area to the specified data value Syntax mf lt start gt lt end gt
144. ebugger functions supported by co verification 16 3 1 Simulator Debugger Memory Management 1 Usable Memory Model Co verification uses the following memory models which are set by Eagle e Memory models managed by Eagle Direct Memory in Eagle e Memory models used by hardware simulator Remote Memory in Eagle e Memory managed by simulator debugger Local Memory in Eagle For details refer to the Eagle user s manual 2 Setting Memory Map Set the memory map for the simulator debugger even when using the memory models managed by Eagle or memory models used by the hardware simulator The memory map can be set through the System Configuration dialog box The memory will be used to calculate the number of memory access cycles during simulation The following items should be set for the memory map e Memory type e Start address and end address of the memory area e Number of memory access cycles e Memory data width Co verification invalidates the number of memory access cycles and memory data width set through the System Configuration dialog box Therefore validate these items through the bus state controller BSC 3 Defining Memory Resources Define memory resources to execute the memory models managed by Eagle and the memory models used by the hardware simulator Memory resources can be defined through the System Memory Resource Modify dialog box 16 3 20 Endian The MD pin sets the endian for the SH 3DSP and SH 4 The
145. ebugging platform but you will only be able to debug at assembly language level 8 2 Viewing the Code 8 2 1 Viewing Source Code To look at your program s source choose the View gt Source menu option use the Ctrl K accelerator or click on the Source Window toolbar button ne Select your source file and click Open HDI opens a Source window S Tutorial c Iof x Line Address BP Label Source 00001012 main void main void 00001018 if MDCR BIT MDS 0x pt printf Sele 00001024 return 00001026 if SYSCR 0 01 00001030 SYSCR BYTE Ox1 00001038 BCRL BIT EAE 0 00001040 STOP MODE Figure 8 1 Source Window Rev 3 0 09 00 page 211 of 276 HITACHI The Source window is divided into two areas the header bar area and the main window area and split vertically into five columns Line Address BP breakpoint Label and Source The respective width of each column can be adjusted by dragging the dividing line between each column title in the header bar The cursor will change to and a vertical line will be displayed where the dividing line of the columns will be Release the mouse button when you are satisfied with the column width and the display will be updated with the new column width 8 2 2 Viewing Assembly Language Code If you have a source file open right click to open the popup menu and select Go to Disassembly to open a Disassembly window at the same address as t
146. ecting this box makes the entry valid Cacheable Enables or disables caching Selecting this box enables caching of the page Dirty Specifies whether or not the page has been written to Selecting this box makes the simulator debugger assume that the page has been written to Share status Specifies whether or not to share the page with multiple processes Selecting this box specifies that the page is shared Write through Write through bit Specifies the cache writing mode Clicking the OK button displays the modified contents in the Unified TLB dialog box Clicking the Cancel button closes the dialog box without modifying the UTLB contents Rev 3 0 09 00 page 143 of 276 HITACHI 5 59 Unified TLB Find Dialog Box Unified TLB Find Ed Address n o1 000000 Address type Virtual address C Physical address Entry Address Array Data array 01 01000100 0100010F Figure 5 80 Unified TLB Find Dialog Box This dialog box searches the UTLB contents This dialog box is provided only for the SH 4 series The following search conditions can be specified Address Specifies the address to be searched for Address type Specifies whether the address to be searched for is virtual or physical After specifying the search condition clicking the Find button starts search The search results are displayed in the list box at the bottom of the dialog box in the order of UTLB entry address array and data array 1 To mod
147. ed menu options are described in the section 5 71 3 View Source and in the subsequent sections 5 711 Expands Size Expands spaces between each function The key also be used to expand spaces 5 712 Reduces Size a Reduces spaces between each function The key can also be used to reduce spaces 5 71 3 View Source Displays the source program or disassembled memory contents for the address of the function on which the cursor is placed when the right side button of the mouse is clicked If the cursor is not Rev 3 0 09 00 page 169 of 276 HITACHI placed a function when the right side button is clicked this menu option is displayed in gray characters 5 71 4 View Profile List Displays the Profile List window 5 71 5 View Profile Tree Displays the Profile Tree window 5 71 6 View Profile Chart Displays the Profile Chart window for the specific function on which the cursor is placed when the right side button of the mouse is clicked If the cursor is not placed on a function when the right side button is clicked this menu option is displayed in gray characters 5 71 7 Enable Profiler Toggles acquisition of profile data When profile data acquisition is active a check mark is shown to the left of the menu text Profile data and performance analysis data cannot be acquired at a time If the profile data acquisition is going to be enabled when the performance analysis data acquisition is activ
148. ee its description Drag the button of button s to any toolbar operation Description Load session from a file Figure 15 7 Customize Toolbar Commands Dialog Box Rev 3 0 09 00 page 252 of 276 HITACHI 15 4 3 Button Categories At the top left of the dialog box is a list of button categories For each category a list of buttons within that category will be displayed to the right Click on a button operation option in the list to view a description of the button s operation in the Description field 15 44 Adding a Button to a Toolbar To add a button to a toolbar 1 Select the button category from the button category list 2 Select the button item from the operation list 3 Drag the button from the dialog box to the toolbar location you wish to add the new button Then the button is inserted into the tool bar 15 4 5 Positioning a Button in a Toolbar gt To move a button position in a toolbar 1 Select the button in a toolbar 2 Drag the button to the new position in the toolbar or another toolbar Note Holding down the Ctrl key while dragging will copy the button 15 4 6 Removing a Button from a Toolbar gt To remove a button in a toolbar 1 Select the button in a toolbar 2 Drag the button out of the toolbar anywhere into the main frame Rev 3 0 09 00 page 253 of 276 HITACHI 15 5 Customizing the Fonts You can customize the display font for text style windows e g Source and Memor
149. emory Map the start address end address memory type data bus width and access cycles are displayed in that order The memory types are as follows e SH 1 SH 2 SH2E SH 3 SH 3E and SH 3DSP Series ROM internal ROM RAM internal RAM EXT external memory I O internal I O e SH DSP XROM internal XROM YROM internal YROM XRAM internal XRAM YRAM internal YRAM EXT external memory I O internal I O e SH DSP with Cache XRAM internal XRAM YRAM internal YRAM INTRAM internal RAM EXT external memory I O internal I O Rev 3 0 09 00 page 86 of 276 HITACHI e SH DSP SH7065 XRAM internal XRAM YRAM internal YRAM INTROM internal ROM EXT external memory I O internal I O e SH 2DSP XRAM internal XRAM YRAM internal YRAM INTROM internal ROM INTRAM internal RAM EXT external memory I O internal I O e SH 4 SH 4 SH7750R NORMAL normal memory INTRAM internal RAM I O internal I O e SH 4 BSC NORMAL normal memory MPX Multiplex BCSRAM byte control SRAM BSTROM burst ROM and burst count DRAM DRAM SDRAM synchronous DRAM INTRAM internal RAM I O internal I O Memory Map can be specified modified or deleted using the following buttons Add Specifies Memory Map items Clicking this button opens the Memory Map Modify dialog box and memory map items can be specified Modify Modifies Memory Map items Select an item to be modified in the list box
150. emory area and file name to load from an S Record format file on disk 4 5 3 Save Launches the Save Memory As dialog box allowing the user to select a start and an end address in the memory area to save to an S Record format file on disk If a block of memory is highlighted in a Memory window these will be automatically entered as the start and end addresses when the dialog box is displayed 4 5 4 Verify Launches the Verify S Record File with Memory dialog box allowing the user to select a start and an end address in the memory area to check against the contents of an S Record file on disk 4 5 5 Test 5 Launches the Test Memory dialog box allowing the user to specify a block of memory to test for correct read write operation The exact test is target dependent However in all cases the current contents of the memory will be overwritten YOUR PROGRAM AND DATA WILL BE ERASED This simulator debugger does not support this function Rev 3 0 09 00 page 46 of 276 HITACHI 4 5 6 Fill Launches the Fill Memory dialog box allowing the user to fill a block of the debugging platform s memory with a value The start and end fields can be specified in the same way as that with the Save option refer to section 4 5 3 Save 4 5 7 Copy Launches the Copy Memory dialog box allowing the user to copy a block of the debugging platform s memory to an address within the same memory area The blocks may overlap in wh
151. enin 263 16 4 2 Setting Eagle and Running HDI esee 264 16 4 3 Selecting tbe Target I DRE eti 264 16 4 4 Setting the Memory nennen nenne 265 16 4 5 Mapping the Memory Resource esssseseeeenereneneen eene nenne 265 16 4 6 Opening External Tools Window 267 16 4 7 Opening Eagle etenim RR eds 267 16 4 8 Downloading the Tutorial Program seen 268 16 5 JNotes on Co VeblfiCatlOTi iiec e die o vene HR OON Dee este iie 268 Appendix System Modules irte teste eor 269 Appendix B GUI Command Summary sese 271 Appendix Symbol File d eaae dae ide iae e qd rog seed 275 Rev 3 0 09 00 page xiv of xx HITACHI Figures Figure 1 1 Figure 4 1 Figure 5 1 Figure 5 2 Figure 5 3 Figure 5 4 Figure 5 5 Figure 5 6 Figure 5 7 Figure 5 8 Figure 5 9 Figure 5 10 Figure 5 11 Figure 5 12 Figure 5 13 Figure 5 14 Figure 5 15 Figure 5 16 Figure 5 17 Figure 5 18 Figure 5 19 Figure 5 20 Figure 5 21 Figure 5 22 Figure 5 23 Figure 5 24 Figure 5 25 Figure 5 26 Figure 5 27 Figure 5 28 Figure 5 29 Figure 5 30 Figure 5 31 Figure 5 32 Figure 5 33 Figure 5 34 Figure 5 35 Figure 5 36 Figure 5 37 Figure 5 38 Creation of Target User 15 nennen eene 3 on eror rH ER
152. es are linked to a general purpose Graphical User Interface which provides a common look amp feel independent of the particular modules with which the system is configured 2 1 User Interface The HDI Graphical User Interface is a Windows application that presents the debugging platform to you and allows you to set up and modify the system Refer to a standard Windows user manual for details on how to operate within a Windows application 2 2 Data Entry When entering numbers in any dialog box or field you can always enter an expression instead of a simple number This expression can contain symbols and can use the operators in the C C programming languages Use of C C programming language features such as arrays and structures is only available if an object DLL that supports C C programming language debugging is in use In some dialogs where there is a control expecting an end address it is possible to enter a range by prefixing the value with a sign This will set the actual end address to be equal to the start address plus the entered the value 2 2 1 Operators The C C programming language operators are available amp l gt gt lt lt lt gt lt gt amp amp II 2 2 2 Data Formats Unprefixed data values will be taken as being in the default radix set by the Setup gt Radix menu option The exception is count field which use decimal values by default indepen
153. es from read to write or when the access area changes corresponds to the AnIW WCRI First Read Cycle Specifies the number of cycles to be inserted in the first cycle for the read access First Write Cycle Specifies the number of cycles to be inserted in the first cycle for the write access Second After Cycle Specifies the number of cycles to be inserted in the second and the following cycles for the burst transfer The items marked with correspond to the AnW in WCR2 Rev 3 0 09 00 page 91 of 276 HITACHI 5 21 Memory Map Dialog Box System Configuration Memory map 00000000 7EFFFFFF EXT 321 7F000000 7FOOOFFF RAM 321 Exec Mode STOP 7F001000 DFFFFFFF EXT 321 0000000 FFFFFFFF Ifo 321 System memory resource 00000000 00003FFF Read 00004000 00007FFF Write 00008000 OOOOFFFF Read Write Figure 5 33 Memory Map Dialog Box This dialog box displays a memory map and information on the target CPU System Configuration Displays the target CPU address bus width and execution mode of the simulator debugger System memory resource Displays the access type start address and end address of the current memory resources Memory map Displays the start address end address memory type data bus width and access cycles System memory resource can be specified modified and deleted using the following buttons Add Specifies System memory resource items Clicking this button opens the System Mem
154. es indirect reference of a member Specifies reference of a member with class Specifies a pointer Specifies an array Specifies reference of a pointer to member Specifies reference of a global variable Specifies a member function C Specifies cast operation HDI has a standard Windows context sensitive help system This provides on line information about using the debugging system Help can be invoked by pressing the F1 key or via the Help menu Additionally some windows and dialog boxes have a dedicated help button to launch the help file at the appropriate content 2 3 1 Context Sensitive Help To get help on a specific item in the HDI help cursor can be used To enable the help cursor press SHIFT F1 or click the button on tool bar Your cursor then changes to include a question mark You can then click on the item for which you require help and the help system will be opened at the appropriate content HITACHI Rev 3 0 09 00 page 7 of 276 Rev 3 0 09 00 page 8 of 276 HITACHI Section 3 Simulator Debugger Functions This section describes the functions of the SuperH RISC engine series simulator debugger Note that the endian MMU cache control registers BSC and DMAC can be used only in the CPUs listed in table 3 1 Table 3 1 Debugging Endian Platform Name selection MMU Cache SH 1 Control Registers Simulato
155. eset vector does not continue command processing GO_TILL Abbreviation GT Description Executes the user program from the current PC with temporary breakpoints This command takes multiple addresses as parameters and these are used to set temporary PC breakpoints these breakpoints only exist for the duration of the command Syntax gt lt state gt lt address gt Parameter Type Description lt state gt Keyword Specifies whether or not to continue command processing during user program execution optional default wait wait Causes command processing to wait until user program stops continue Continues command processing during execution lt address gt Numeric Temporary breakpoint address list Rev 3 0 09 00 page 188 of 276 HITACHI Wait is the default and this causes command processing to wait until user program stops executing Continue allows you to continue to enter commands but they may not work depending on the debugging platform Example GO_TILL H 1000 Continues execution until the PC reaches address H 1000 HALT Abbreviation HA Description Halts the user program This command can be used after the GO command if the GO command uses continue for option Syntax ha Parameter Type Description none Halts the user program Example HA Halts the user program HELP Abbreviation HE Description Opens a window displaying the help file For context sensitive help the F1 key
156. f 276 HITACHI Instant Watch Ea Temp Name2 Hitachi Micro 0 48 H 0 000038 ur 1 0 00003 9 uns Add Watch 2 H 74 0 00003 3 H 61 a 0 00003 un 4 H 63 c 0 00003 un 5 H 68 h Ox00003fbd un H 69 Ox00003fbe uns 7 H 20 Q 00003fbf unsi ro 4 I Figure 12 2 Instant Watch Dialog Box You can add this variable to the list of watch items in the Watch window by clicking on the Add Watch button 12 3 Using Watch Items When you are debugging your program you may find it useful to be able to look at variables of interest and see their values at different times during the program execution HDI allows you to open Watch windows which contain a list of variables and their values To open a Watch window choose the View gt Watch menu option or click on the Watch Window toolbar button Ball if it is visible A Watch window opens Initially the contents of the window will be blank 12 31 Adding a Watch There are two ways to add watch items to the Watch window the quick method accessed from the Source window and the full method using the Add Watch dialog box in the Watch window Quick Method The quickest way to add a variable to the Watch window is to use the Add Watch feature To use Add Watch from a Source Window 1 Open the Source window showing the variable tha
157. format The new value is written into the digit and the cursor moves on to the next digit in memory 9 2 2 Full Edit The full way to change the contents of memory is accessed via the Edit dialog box Move the cursor on the memory unit depending on your Memory window display choice that you wish to change Either double click on the memory unit or press ENTER The Edit dialog box opens Rev 3 0 09 00 page 219 of 276 HITACHI Edit word at H 00001024 x Verify Cancel Figure 9 4 Edit Dialog Box Like any other data entry field in HDI you can enter a formatted number or C C expression see section 2 2 Data Entry When you have entered the new number or expression click the OK button or press ENTER the dialog box closes and the new value is written into memory 9 2 3 Selecting a Memory Range If the memory address range is in the Memory window you can select the range by clicking on the first memory unit depending on your Memory window display choice and dragging the mouse to the last unit The selected range is highlighted 9 3 Finding a Value in Memory To find a value in memory you must open a Memory window then choose the Search menu option from the popup menu Alternatively with a Memory window in focus just press F3 This will open the Search Memory dialog box Search Memory xi Begin End Cancel OE Cancel Data p Format Long m Figure 9 5 Search Memory Dialo
158. g BOX unas Reto eee eei UR REESS 239 Figure 12 7 Locals eei een ene eed 239 Figure 12 8 Registers Window ect de rhe prive E Re E ie eei vete 240 Figure 12 9 Expanding a Bit nennen nennen eene enne 241 Figure 12 10 Register Dialog Box essen enne 242 Figure 13 1 Overlay Dialog Box at Opening eese nennen eene 243 Figure 13 2 Overlay Dialog Box Address Range Selected sess 243 Figure 13 3 Overlay Dialog Box Highest Priority Section Group Selected 244 Figure 14 1 Select Function Dialog 245 Figure 15 1 Minimizing a Window nennen enne 247 Figure 15 2 Disassembly Window eene 248 Figure 15 3 Icons Before Arrangement es eenei sdear eei ipep espesie oiu 248 Figure 15 4 Icons After Arrangement nennen nennen rennen nennen 249 Figure 15 5 Selecting WindOW citer eR UE NU eR Ue ted 250 Figure 15 6 Customize Toolbar Toolbars Dialog Box eene 251 Figure 15 7 Customize Toolbar Commands Dialog Box eese 252 Figure 15 8 Font Dialog ep DROP UE 254 Figure 15 9 Customize File Filter Dialog Box eene enne 255 Figure 15 10 Session Name Display essent enne nnne nenne 256 Figure 15 11 HDI Options
159. g Box Enter the start and end addresses of the range in which to search if an area of memory was selected in the Memory window then the Begin and End address values will be filled in Rev 3 0 09 00 page 220 of 276 HITACHI automatically and the data value to search for The end address also be prefixed by which will use the entered value as a range Select the search format and click OK or press ENTER The dialog box closes and HDI searches the range for the specified data If the data is found it will be highlighted in the Memory window If the data cannot be found the caret position in the Memory window remains unchanged and a message informing you that the data could not be found is displayed on the message box 9 4 Filling an Area of Memory with a Value You can set the contents of a range of memory addresses to a value using the memory fill feature 9 4 1 Filling a Range To fill a range of memory with the same value choose the Fill menu option on a Memory window s popup menu or Memory gt Fill menu option The Fill Memory dialog box opens Fill Memory Begin End Cancel H 0E Data 7217 Format Long Figure 9 6 Fill Memory Dialog Box If an address range has been selected in the Memory window the specified start and end addresses will be displayed Select the format from the Format drop list and enter the data value in the Data field Click the OK button
160. g box Way Way number selected by the TLB dialog box Virtual Address Virtual address in longword size Bits 16 to 12 are set to 0 regardless of the input value Bits 31 to 10 are used as the virtual address Physical Address Physical address in longword size Bits 31 to 10 are valid ASID Address space ID which specifies the process that can access the virtual page Rev 3 0 09 00 page 132 of 276 HITACHI Valid Specifies whether or not the entry is valid Selecting this box makes the entry valid Cacheable Enables or disables caching Selecting this box enables caching of the page Dirty Specifies whether or not the page has been written to Selecting this box assumes that the page has been written to Share status Specifies whether or not to share the page with multiple processes Selecting this box specifies that the page is shared Page Size Specifies the page size The page protection status can be selected by Protection PV Mode User Mode Read only No access Enables read in privileged mode Read Write No access Enables read and write in privileged mode Read only Read only Enables read in privileged or user mode Read Write Read Write Enables read and write in privileged or user mode Clicking the OK button displays the modified contents in the TLB dialog box Clicking the Cancel button closes the dialog box without modifying the TLB contents Rev 3 0 09 00 page 133 of 276 HITACHI 5 5
161. g the user program 4 4 7 Step In e Executes a block of user program before breaking The size of this block is normally a single instruction but may be set by the user to more than one instruction or a C C source line see also section 4 4 10 Step If a subroutine call is reached then the subroutine will be entered and the view is updated to include its code 4 4 8 Step Over P Executes a block of user program before breaking The size of this block is normally a single instruction but can be set by the user to more than one instruction or a C C source line see also section 4 4 10 Step If a subroutine call is reached then the subroutine will not be entered and sufficient user program will be executed to set the current PC position to the next line in the current view 4 4 9 Step Out P Executes sufficient user program to reach the end of the current function and set the PC to the next line in the calling function before breaking Rev 3 0 09 00 page 45 of 276 HITACHI 4 4 10 Step Launches the Step Program dialog box allowing the user to modify the settings for stepping 4 411 Halt Stops the execution of the user program 4 5 Memory The Memory menu is used for aspects of the user program that access memory 4 5 1 Refresh Forces a manual update of the contents of all open Memory windows 4 5 2 Load Launches the Load Memory dialog box allowing the user to select an offset address in the m
162. ged in a tile format Windows that are minimized to icons are not affected 15 1 4 Cascading Windows Open windows can also be arranged in a cascading format with only their left and top border visible under the window in front of them by choosing the Window Cascade menu option currently open windows are arranged in a cascading format Windows that are minimized to icons are not affected Rev 3 0 09 00 page 249 of 276 HITACHI 15 2 Locating Currently Open Windows When you have many windows open in the HDI application window it is quite easy to lose one of them behind the others There are two methods that you can use to find the lost window 15 2 1 Locating the Next Window To bring the next window in the window list to the front of the display choose Next from the window menu or press CTRL F6 Repeating this operation will cycle selection of all windows open and minimized 15 2 2 Locating a Specific Window To select a specific window choose from the list of windows open and minimized at the bottom of the Window menu The currently selected window has a check mark next to it in the window list In the following example the Disassembly window is the currently selected window Window Help Cascade Tile Arrange Icons Close All 1 Disassembly 2 Byte Memory 00000000 3 Trace 0 records filter 4 Registers Figure 15 5 Selecting a Window The window that you select will be brought t
163. h Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 128 of 276 HITACHI 5 47 RTCNT Dialog Box RTCNT x RTCNT Bit7 0 H FF Help Cancel Figure 5 68 RTCNT Dialog Box This dialog box specifies the values of the refresh timer counter RTCNT This dialog box is provided only for the SH 4 series Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values 5 48 RTCOR Dialog Box RTCOR x RTCOR BitZ 0 H FF Help Cancel Figure 5 69 RTCOR Dialog Box This dialog box specifies the values of the refresh time constant register RTCOR This dialog box is provided only for the SH 4 series Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 129 of 276 HITACHI 5 49 Dialog Box Figure 5 70 RFCR Dialog Box This dialog box specifies the values of the refresh count register RFCR This dialog box is provided only for the SH 4 series Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 130 of 276 HITACHI
164. h multiple processes Selecting this box specifies that the page is shared Clicking the OK button displays the modified contents in the Instruction TLB dialog box Clicking the Cancel button closes the dialog box without modifying the ITLB contents Rev 3 0 09 00 page 138 of 276 HITACHI 5 56 Instruction TLB Find Dialog Box Instruction TLB Find Ed Address n 0000000 Address type Virtual address C Physical address Entry Address Array Data array 01 10000100 2000014 Figure 5 77 Instruction TLB Find Dialog Box This dialog box searches the ITLB contents This dialog box is provided only for the SH 4 series The following search conditions can be specified Address Specifies the address to be searched for Address type Specifies whether the address to be searched for is virtual or physical After specifying the search condition clicking the Find button starts search The search results are displayed in the list box at the bottom of the dialog box in the order of ITLB entry address array and data array 1 To modify the displayed ITLB contents select the ITLB entry in the list box and click the Modify button The Instruction TLB Modify dialog box will open and the ITLB contents can be modified Clicking the Close button closes this dialog box Rev 3 0 09 00 page 139 of 276 HITACHI 5 57 Unified TLB Dialog Box Unified TLB Ed Entry Address array Data array 00000000 04000000 Mody 010
165. hat is being changed The edit box on this dialog box is limited to accept only valid characters for filter type or extension 4 Change the filter name and or extension If more than one extension is required then separate each extension with a semi colon For example mot a20 a37 gt To enter a new filter 1 Select the file group from the File drop list 2 Click the Add button to open the Add Filter dialog box The dialog title will display the file group that is being changed The edit box on this dialog box is limited to accept only valid characters for filters 3 Enter a name for the filter type and the extensions you want to use for the filter Note If the filter type entered matches an existing type the filter for the existing type will be changed to the newly entered filter gt To remove a filter Rev 3 0 09 00 page 255 of 276 HITACHI 1 Select the file group from the File drop list 2 Select the file type name from the Type drop list 3 The file type will be removed when the Delete button is clicked 15 7 Saving a Session If you have downloaded the user program into the debugging platform have the corresponding source files displayed and a number of auxiliary windows open then it can take some time to setup this information the next time the program is loaded To help with this HDI can save the current settings to a file If you are already using a named session or want to create a ses
166. he Save Session As menu option 4 1 4 Save Session As Launches the Save As dialog box allowing the user to save the current session details under a new file name A session file contains the debugging platform s settings and the current program and the position of open child windows views it contains symbols breakpoints or current register values 4 1 5 Load Program Launches the Load Program dialog box allowing the user to select an object file in either S Record mot s20 and obj extensions or ELF DWAREF abs extension format and download it to the debugging platform s memory This will also load the symbols if they are available in the selected file 4 1 6 Initialize 2 This will attempt to re initialize the debugging system It will close down any open child windows and shut down the link to the debugging platform If this is successful an attempt to re establish the link to the debugging platform will be made The message Link up will appear in the left most box of the status bar if this is successful See also section 4 4 1 Reset CPU 4 1 7 Exit This will close down the HDI The actions that are carried out by the HDI can be defined by the user in the On Exit section of the HDI Options dialog box See also section 4 6 2 Options 4 2 Edit The Edit menu is used for aspects of the program that access or modify data in the child windows and debugging platform 4 2 1 Cut Only available
167. he Command Line window allowing the user to enter text based commands to control the debugging platform These commands can be piped in from a batch file and the results piped out to a log file allowing automatic tests to be performed 4 3 3 Disassembly Launches the Set Address dialog box allowing the user to enter the address that you wish to view 4 3 4 Labels Launches the Labels window allowing the user to manipulate the current program s symbols labels 4 3 5 Locals Opens the Locals window allowing the user to view and edit the values of the variables defined in the current function The contents are blank unless the PC is within a source level function 4 3 6 Memory Launches the Open Memory Window dialog box allowing the user to specify a memory block and view format to display within a Memory window 4 3 7 Performance Analysis Launches the Performance Analysis window allowing the user to set up and view the number of times that particular sections of the user program have been called 4 3 8 Profile List Opens the Profile List window allowing the user to view the address and size of a function or a global variable the number of times the function is called and profile data Rev 3 0 09 00 page 42 of 276 HITACHI 4 3 9 Profile Tree Opens the Profile Tree window allowing the user to view the relation of function calls in a tree structure The Profile Tree window also displays the address size
168. he current Source window If you do not have a source file but wish to view code at assembly language level either choose the View gt Disassembly menu option use the Ctrl D accelerator or click on the Disassembly Window toolbar button This will open Set Address dialog box in which you can address to start disassembling The Disassembly window shows Address BP breakpoint Code showing the machine code values Label and Assembler showing the disassembled mnemonics with labels when available Additionally the final column contains any source line starting at that address thus providing mixed mode display ga Disassembly C Hew Hdid_sh TUTORIALS sort c 00000000 mai PR Q R15 void main void 00000002 ZH CB R15 00000004 H 00 R3 for i 0 i 1 00000006 R3 ee 08 4 R15 00000008 H 0030 12 0000000a 0000000 0058 8 PC R1 R1 0000000 00000010 RO CH 0C 4 R15 001 8 aa Breakpoint Figure 8 2 Disassembly Window Rev 3 0 09 00 page 212 of 276 HITACHI 8 2 3 Modifying Assembly Language Code You can modify the assembly language code by double clicking on the instruction that you wish to change The Assembler dialog box will open Assembler x Address Code Mnemonic Machine code TERN 2312 Address Disassembled OK Cancel instruction Figure 8 3 Assembler Dialog Box The address machine code and disassembled instruction are displayed Type the new
169. he display of disassembled memory is fully symbolic Syntax da address lt length gt Parameter Type Description address Numeric Start address length Numeric Number of instructions optional default 16 Examples DISASSEMBLE H 100 5 Disassembles 5 lines of code starting at H 100 DA H 3E00 20 Disassembles 20 lines of code starting at H 3E00 ERASE Abbreviation ER Description Clears the Command Line window Rev 3 0 09 00 page 183 of 276 HITACHI Syntax er Parameter Type Description none Clears the Command Line window Example ER Clears the Command Line window EVALUATE Abbreviation EV Description Provides a calculator function evaluating simple and complex expressions with parentheses mixed radices and symbols All operators have the same priority but parentheses may be used to change the order of evaluation The operators have the same meaning as in C C Expressions can also be used in any command where a number is required Register names may be used but must always be prefixed by the character The result is displayed in hexadecimal decimal octal or binary Syntax ev lt expression gt Parameter Type Description lt expression gt Expression Expression to be evaluated Valid operators amp amp logical AND logical OR lt lt left arithmetic gt gt right arithmetic shift shift 96 modulo bitwise OR amp bitwise AND bitwise V
170. he symbol F Function P Function parameter L Local variable Name Indicates the symbol name Value Indicates the value address and type of the symbol Right clicking on the mouse within the window displays a popup menu Supported menu options are described in the following sections 5 68 Copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 68 2 Goto Source Displays in the Source window the source program corresponding to the selected function Rev 3 0 09 00 page 159 of 276 HITACHI 5 68 3 View Setting Launches the Stack Trace Setting dialog box allowing the user to specify the Stack Trace window settings Stack Trace Setting Figure 5 94 Stack Trace Setting Dialog Box Nest level specifies the level of function call nestings to be displayed in the Stack Trace window Display symbol group check boxes specify the symbol types to be displayed in addition to functions Display Radix group radio buttons specify the radix for displays in the Stack Trace window Rev 3 0 09 00 page 160 of 276 HITACHI 5 69 Profile List Window Function Variable main sort change rand DIVL 3 MULL 3 DIVUL 3 rnext Address H 00000000 H O00O0000A 000001 0000028 00000206 000002 00000304 00000340 Size H ODODODAA H 0000013C 00000048 00000000 00000000 00000000 00
171. hen you may want to start running your program and want it to stop if it hits one or more addresses but do not want to set permanent breakpoints at these addresses For example you may want to perform something like the Go To Cursor operation but the destination may be outside the Source window or you may want to stop at several addresses To Rev 3 0 09 00 page 232 of 276 HITACHI do this you can use temporary breakpoint feature to run as it supports up to ten temporary breakpoints that are cleared when you break Temporary breakpoints are set in the Run Program dialog box which is opened by choosing the Run Run menu option The Run Program dialog box opens Run Program x Program Counter 00001 000 Stop At Go Reset Cancel Bact Figure 11 3 Run Program Dialog Box Enter the symbols or address values for the points at which you want the program to stop up to ten points in the Stop At field When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function For details refer to section 14 Selecting Functions Click the Go PC button to start running from the current program counter address as displayed in the Program Counter field Click the Go Reset button to reset the CPU and start running from the reset vector address When the program halts the temporary breakpoints that you specified are cleared from the cur
172. her or not the entry has been written to Selecting this box makes the simulator debugger assume that the entry has been written to Long Word0 to Long Word3 Longword data 0 to 3 to be set to cache entries Clicking the OK button displays the modified contents in the Cache dialog box Clicking the Cancel button closes the dialog box without displaying the modified contents in the Cache dialog box Rev 3 0 09 00 page 148 of 276 HITACHI 5 62 Open Cache Dialog Box Open Cache Figure 5 83 Open Cache Dialog Box This dialog box selects the cache to be displayed This dialog box is provided only for the SH 4 series In this dialog box select one of the following caches Instruction cache Selects the instruction cache IC Operand cache Selects the operand cache OC Clicking the OK button displays the selected cache dialog box Clicking the Cancel button closes the Open Cache dialog box Rev 3 0 09 00 page 149 of 276 HITACHI 5 63 Instruction Cache Dialog Box This dialog box displays the contents of the IC This dialog box is provided only for the SH 4 series and the displayed contents differ according to the target CPU SH 4 SH 4BSC Instruction Cache x Ent V Tag adr L0 Lw Lw3 14 LW5 LW6 LW 1 00000000 00000000 11111111 22222222 33333333 44444444 55555555 66666666 77777777 1 00000000 00000000 11111111 22222222 33333333 44444444 55555555 66666666 77777777 1 00000000 00000000 11111111
173. ht clicking within the windows 5 171 Copy Only available if a block of text is highlighted This copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 17 2 Delete Removes the variable indicated by the text cursor not the mouse cursor from the Watch window Rev 3 0 09 00 page 84 of 276 HITACHI 5 17 3 Delete All Removes all the variables from the Watch window 5 17 4 Add Watch Launches the Add Watch dialog box allowing the user to enter a variable or expression to be watched 5 17 5 Edit Value Launches the Value dialog box allowing the user to change the variable s value Particular care should be taken when the value of a pointer is changed as it may no longer point to valid data 5 17 6 Radix Modifies the radix for the selected watch item display 5 18 System Configuration Dialog CPU SH 3E Bit size 32 System Call Address Enable 00000000 Endian Big Endian Execution Mode MEO Stop Continue 00000000 7EFFFFFF EXT 321 7F000000 7FOOOFFF RAM 32 1 Round Mode 7 001000 DFFFFFFF EXT 321 C Round to nearest 0000000 FFFFFFFF I0 321 Round to zero Add Modify Delete Help Cancel Figure 5 27 System Configuration Dialog Box Rev 3 0 09 00 page 85 of 276 HITACHI This dialog box specifies the endian system call start location execution mode floating point rounding mode a
174. ich case any data within the overlapped region of the source block will be overwritten The start and end fields can be specified in the same way as that with the Save option refer to section 4 5 3 Save 4 5 8 Compare Launches the Compare Memory dialog box allowing the user to select a start and an end address in the memory area to check against another area in memory The start and end fields can be specified in the same way as that with the Save option refer to section 4 5 3 Save 4 5 9 Configure Map Opens the Memory Mapping window allowing the user to view and edit the debugging platform s current memory map In some debugging platforms the Memory Map dialog box will open 4 5 10 Configure Overlay Launches the Overlay dialog box When the overlay function is used the target section group can be selected in the dialog box 4 6 Setup The Setup menu is used to modify the settings of the HDI user interface and the configuration of the debugging platform 4 6 1 Status Bar Toggles the status bar feature on and off If the feature is enabled then a check mark will be displayed to the left of the menu text Rev 3 0 09 00 page 47 of 276 HITACHI 4 6 2 Options EL Launches the HDI Options dialog box allowing the user to modify the settings that are specific to the HDI not debugging platform dependent settings 4 6 3 Radix 16 10 12 Cascades a menu displaying a list of radix in which the numeri
175. icular areas of code for a period of time and then look at other areas but want to return to the previous ones afterwards When concentrating on these areas you will want to set breakpoints to stop your program execution at useful points If you have set these breakpoints and wish to move on to another area of investigation but know that you will want to return to the current area later it is frustrating to have to delete all the breakpoints you have set only to have to set them all again when you return Fortunately HDI eases this problem by allowing you to disable breakpoints while still leaving them in the breakpoint list 11 4 4 Disabling a Breakpoint To disable an individual breakpoint select the breakpoint in the list by clicking on the line corresponding to it and choose the Disable menu option from the popup menu Alternatively double click in the Enable column of the breakpoint you need to disable The symbol in the Enable column is cleared to show that the breakpoint is disabled 11 4 2 Enabling a Breakpoint When you want to re enable a breakpoint in the Breakpoints window list select the breakpoint in the list by clicking on the line corresponding to it and choose the Enable menu option from the popup menu Alternatively double click in the Enable column of the breakpoint you need to enable The symbol in the Enable column is set to show that the breakpoint is enabled 11 5 Temporary Breakpoints There are times w
176. ied TLB Modify Dialog Box Unified TLB Modify Ed Entry Virtual Address 01 H 01 000000 ASID H 0 H FF Physical Address 00 n o1 000000 Page Size 2 Valid 1Kbyte page Iv Cacheable C 4Kbyte page V Dirty 64 Kbyte page v Share status T Mbyte page Iv Write through Protection PY Mode User Mode Read only No access C Readjwrite No access Cancel Read only Read only C Readjwrite Readjwrite Help Figure 5 79 Unified TLB Modify Dialog Box This dialog box specifies the UTLB contents of the entry selected in the Unified TLB dialog box This dialog box is provided only for the SH 4 series The following items can be specified Entry Entry number selected by the Unified TLB dialog box ASID Address space ID which specifies the process that can access the virtual page Virtual Address Virtual address in longword size Bits 31 to 10 are valid Physical Address Physical address in longword size Bits 31 to 10 are valid Page Size Specifies the page size Rev 3 0 09 00 page 142 of 276 HITACHI Protection Specifies the page protection status PV Mode User Mode Read only No access Enables read in privileged mode Read only Read only Enables read in privileged or user mode Read Write No access Enables read and write in privileged mode Read Write Read Write Enables read and write in privileged or user mode Valid Specifies whether or not the entry is valid Sel
177. ield DRAMTP Field IPUP bit OPUP bit AIMBC bit A4MBC bit BREQEN bit PSHR bit MEMMPX bit HIZMEM bit HIZCNT bit A56PCM bit Burst ROM control in area 6 When using the burst ROM specify the burst count together Memory type for areas 2 and 3 Pull up resistor state for control input pins Pull up resistor state for control output pins SRAM byte control mode for area 1 SRAM byte control mode for area 4 BREQ enable bit Partial sharing mode bit MPX bus bit for areas 1 to 6 High impedance control bit High impedance control bit Bus type for areas 5 and 6 The simulator debugger does not support the functions marked with and does not support PCMCIA Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 122 of 276 HITACHI 5 42 BCR2 Dialog Box 64 bits C 8 bits C 16 bits amp 32 bits BCR2 x ABSZ Field Bit 13 12 A 2SZ Field Bit 5 4 BA bits C 18 bits C 8 bits 32 bits 552 Field Bit 11 10 C B4 bits C 18 bits 8 bits 32 bits A1SZ Field Bit 3 2 C 64 bits C 16 bits 8 bits 32 bits AMSZ Field Bit 9 8 052 Field Bit 15 14 64 bits 16 bits 8 bits 32 bits 64 bits 16 bits C 8 bits 32 bits A3SZ Field Bit 7 6 C 64 bi
178. if a block is highlighted in a child window whose contents can be modified Rev 3 0 09 00 page 40 of 276 HITACHI This will remove the contents of the highlighted block from the window and place it on the clipboard in the standard Windows manner 4 2 2 Copy Only available if a block is highlighted in a child window whose contents can be modified This will copy the contents of the highlighted block to the clipboard in the standard Windows manner 4 2 3 Paste Only available if the contents of the child window can be modified This will copy the contents of the Windows clipboard into the child window at the current cursor position 4 2 4 Find Only available if the window contains text This will launch the Find dialog box allowing the user to enter a word and locate occurrences within the text If a match is found the cursor will move to the start of the word 4 2 5 Evaluate Launches the Evaluate dialog box allowing the user to enter a numeric expression e g pc 205 2 and display the result in all currently supported radices 4 3 View The View menu is used to select and open new child windows If the menu option is grayed then the features provided by the window are not available with the current debugging platform 4 3 1 Breakpoints Opens the Breakpoints window allowing the user to view and edit current breakpoints Rev 3 0 09 00 page 41 of 276 HITACHI 4 3 2 Command Line Opens t
179. ify the displayed UTLB contents select the UTLB entry in the list box and click the Modify button The Unified TLB Modify dialog box will open and the UTLB contents can be modified Clicking the Close button closes this dialog box Rev 3 0 09 00 page 144 of 276 HITACHI 5 60 Cache Dialog Box EntUV LRU Tag adr LWO LW1 LW LWw3 0 0 000000 00000000 00000000 00000000 00000000 00000000 Internal RAM 00111111 00000000 00000000 00000000 00000000 00000000 0 000000 00000000 00000000 00000000 00000000 00000000 Capacity 0 0 000000 00000000 00000000 00000000 00000000 00000000 8 Kbyte 000000 00000000 00000000 00000000 00000000 00000000 C 4 Kbyte 0 0 000000 00000000 00000000 00000000 00000000 00000000 C 2 Kbyte 00111111 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 0 0 000000 OFFFFCOO 00000000 11111111 22222222 33333333 00111111 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 00111111 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000 00000000 0 0 000000 00000000 00000000 00000000 00000000
180. in gray characters Find Data Eind Next 9 Gancel C Minimum Figure 5 100 Find Data Dialog Box By selecting the search type from the Find Data group and entering Find Next button or ENTER key search is started If the Find Next button or the ENTER key is input repeatedly the second larger data the second smaller data when the Minimum is specified is searched for 5 70 7 Clear Data Clears the number of times functions are called and profile data Data in the Profile Tree window and the Profile Chart window are also cleared 5 70 8 Output Profile Information File Displays the Save Profile Information File dialog box Profiling results are saved in a profile information file pro extension The optimizing linkage editor optimizes user programs according to the profile information in this file For details of the optimization using the profile information refer to the manual of the optimizing linkage editor 5 70 9 Output Text File Displays the Save Text of Profile Data dialog box Displayed contents are saved in a text file Rev 3 0 09 00 page 167 of 276 HITACHI 5 70 10 Select Data Selects profile data types The types of profile data differ according to the debugging platform If this menu option is not supported by the debugging platform it is displayed in gray characters 5 70 11 Setting Displays the Setting Profile Tree dialog box to set displayed contents Setting Profiler Tree
181. ing the BSC can be debugged Table 3 3 lists the memory types that can be specified for the SH 4BSC Table 3 3 Memory Types for the SH 4BSC Simulator Debugger Address H 00000000 to H O3FFFFFF area 0 Specifiable Memory Types Normal memory burst ROM and MPX H 04000000 to H O7FFFFFF area 1 Normal memory byte control SRAM and MPX H 08000000 to H OBFFFFFF area 2 Normal memory DRAM SDRAM and MPX H 0C000000 to H OFFFFFFF area 3 Normal memory DRAM SDRAM and MPX H 10000000 to H 13FFFFFF area 4 Normal memory byte control SRAM and MPX H 14000000 to H 17FFFFFF area 5 Normal memory burst ROM and MPX H 18000000 to H 1BFFFFFF area 6 Normal memory burst ROM and MPX H 1C000000 to H 1FFFFFFF area 7 Cannot be specified H 7C000000 to H 7C001FFF Internal RAM cannot be changed H E0000000 to H FFFFFFFF I O cannot be changed The high order three bits of the addresses for areas 0 to 7 in table 3 3 must be ignored H 00000000 and H 20000000 are both in area 0 The simulator debugger does not support the PCMCIA For details on memory mapping refer to section 5 21 Memory Map Dialog Box For details on BSC control register setting refer to section 5 40 MCR Dialog Box through section 5 49 RFCR Dialog Box 3 7 Direct Memory Access Controller DMAC For the SH 4BSC the simulator debugger simulates the 4 channel DMAC operations the user program us
182. ing the DMAC can be debugged For details on DMAC control register setting refer to section 5 35 SARO SAR3 Dialog Boxes through section 5 39 DMAOR Dialog Box Rev 3 0 09 00 page 15 of 276 HITACHI 3 8 SH 4 SH 4 SH7750R Supporting Functions 3 8 1 BSC For the SH 4 SH 4 SH7750R by eliminating the bus control function in the BSC only SRAM bus width and the number of states can be specified Table 3 4 lists the memory types that can be specified for the SH 4 SH 4 7750R Table 3 4 Memory Types for the SH 4 SH 4 7750R Simulator Debugger Address Specifiable Memory Types H 00000000 to H OSFFFFFF area 0 SRAM H 04000000 to H O7FFFFFF area 1 H 08000000 to H OBFFFFFF area 2 H 0C000000 to H OFFFFFFF area 3 H 10000000 to H 13FFFFFF area 4 H 14000000 to H17FFFFFF area 5 H 18000000 to H 1BFFFFFF area 6 H 1C000000 to H 1FFFFFFF area 7 Cannot be specified H 7C000000 to H 7C001FFF Internal RAM cannot be changed H E0000000 to H FFFFFFFF I O cannot be changed 3 8 2 DMA The DMA function cannot be used 3 8 3 External Internal Clock Ratio The external internal clock ratio is 1 1 3 8 4 Control Registers Table 3 5 lists the control registers supported by the SH 4 SH 4 SH7750R simulator debugger Rev 3 0 09 00 page 16 of 276 HITACHI Table 3 5 Control Registers Supported by the SH 4 SH 4 SH7750R Simulator Debugger
183. instruction or edit the old instruction in the Mnemonic field Pressing ENTER will assemble the instruction into memory and move on to the next instruction Clicking OK will assemble the instruction into memory and close the dialog box Clicking Cancel or pressing ESC will close the dialog box Note The assembly language display is disassembled from the actual machine code in the debugging platform s memory If the memory contents are changed the display will show the corresponding new assembly language code but will not match the text shown in the source display 8 3 Looking at Labels The debug object file also contains symbolic information This is a table of text names that represent an address in the program and is referred to as labels in HDI You will see symbols in the Label field on the line of the corresponding address and in the Assembler field as part of an instruction s operand Notes 1 Aninstruction s operand is replaced with a label name if the operand and label value match If two or more labels have the same value then the label that comes first alphabetically will be displayed 2 Wherever you can enter an address or value in an HDI edit control you can use a label instead Rev 3 0 09 00 page 213 of 276 HITACHI 8 3 1 Listing Labels To see a list of all the labels defined in the current session open the Labels window by choosing the View gt Labels menu option Labels x H 00001000 st
184. inter in the trace buffer 0 for the last executed instruction Rev 3 0 09 00 page 77 of 276 HITACHI CYCLE ADDRESS CODE SW No INSTRUCTION Source Total number of instruction execution cycles cleared by pipeline reset Program counter value Instruction code Instruction number that was fetched enclosed by when the instruction did not access memory Instruction number that was decoded Instruction number that was executed Instruction number that accessed memory Instruction number that wrote back data Instruction number corresponds to execution number in each stage Instruction mnemonic and data access information display format destination lt accessed data C C or assembly language source programs Rev 3 0 09 00 page 78 of 276 HITACHI SH 4 Series Trace 1024 records no filter CYCLE ADDRESS codel code2 EX EAS LS EAS BR EAS FP EXASD INSTRUCTION ACCESS DATA 0000036005 00000034 xxxx 1F32 XX XXl1 xx x 0000036006 00000038 20 1F32 0000036007 00000038 20 1F32 0000036008 00000038 20 1F32 0000036009 00000038 20 1F32 0000036010 00000038 20 1F32 0000036011 00000038 20 1F32 0000036012 00000038 20 1 2 sortia sortia sortia sortia sortia sort sort 0000036014 00000038 20 1F32 0000036015 00000038 20 1F32 0000036016 00000038 51F2 0000036017 00000038
185. into the edit box of the Label dialog box You can then edit it and the modified version is saved in the label list The Source window display is updated to show the new label Note To use added or modified labels again in later sessions save them in a file For details see section 5 6 11 Save As 8 4 Looking at a Specific Address When you are looking at your program in a Source window you may want to look at another area of your program s code Rather than scrolling through a lot of code in the program you can go directly to a specific address Double click in the Address column the Set Address dialog box opens Set Address x Cancel Figure 8 6 Set Address Dialog Box Enter the address or symbol name in the edit box and either click on OK or press ENTER If the code at that address is in the same source file the Source window updates to show the code at the new address When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function For details refer to section 14 Selecting Functions If the new address is in a source file that is already being viewed in a Source window that window is brought to the front and updated to show the code at the new address If the new address is in another source file a new Source window opens to show the code at that address By default the new window shows source if it is available If no source is available for
186. ion none Deletes all symbols symbol String Symbol name Examples SYMBOL CLEAR Deletes all symbols after confirmation SC start Deletes the symbol start Rev 3 0 09 00 page 202 of 276 HITACHI SYMBOL_LOAD Abbreviation SL Description Loads symbols from file File must be in XLINK Pentica b format i e XXXXH name The symbols are added to the existing symbol table Syntax sl lt filename gt Parameter Type lt filename gt String Examples SYMBOL_LOAD TEST SYM SL MY_CODE SYM SYMBOL_SAVE Abbreviation SS Description Description File name Loads the file TEST SYM Loads the file MY_CODE SYM Saves symbols to a file in XLINK Pentica b format The symbol file extension default is SYM If the file name already exists then a prompt to overwrite the file is displayed Syntax ss lt filename gt Parameter Type lt filename gt String Examples SYMBOL_SAVE TEST SS MY_CODE SYM Description File name Saves symbol table to TEST SYM Saves the symbol table to MY_CODE SYM Rev 3 0 09 00 page 203 of 276 HITACHI SYMBOL_VIEW Abbreviation SV Description Displays all defined symbols or those containing the case sensitive string pattern Syntax sv lt pattern gt Parameter Type Description none Displays all symbols lt pattern gt String Displays the symbols including the specified string pattern Examples SYMBOL_VIEW BUFFER Displays all symbols c
187. is not written to the file Parameter Block One byte One byte 0 Return value File number 42 Unused f Start address of output buffer Parameters e Return value output 0 Normal completion Error e File number input The number returned when the file was opened e Start address of output buffer input The start address of the buffer used for storing the output data 11 FEOF Checks for end of file H OB Parameter Block One byte One byte 0 Return value File number Parameters e Return value output 0 File pointer is not at EOF 1 EOF detected e File number input The number returned when the file was opened Rev 3 0 09 00 page 31 of 276 HITACHI 12 FSEEK Moves the file pointer to the specified position Parameter Block One byte One byte 0 Return value File number 2 Direction Unused 4 Offset 6 Parameters Return value output 0 Normal completion Error File number input The number returned when the file was opened Direction input 0 The offset specifies the position as a byte count from the start of the file 1 The offset specifies the position as a byte count from the current file pointer 2 The offset specifies the position as a byte count from the end of the file Offset input The byte count from the location specified by the
188. it Burst enable bit AMXEXT Bit Address multiplex bit RFSH bit Refresh control bit RMODE bit Refresh mode bit EDOMODE bit EDO mode bit Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 120 of 276 HITACHI 5 41 Dialog Box ENDIAN Bit Bit31 AUBST Field Bitl 3 11 Big endian Normal memory MASTER Bit Bit30 ABBST Field Bit1 0 8 Master Normal memory AUMPX Bit29 ABBST Field Bit 5 MPX Normal memory DRAMTP Field Bit4 2 Area 2 and 3 are DRAM 7 IPUP bit Bit25 7 PSHR bit Bitl 8 7 OPUP bit Bit24 V MEMMPX bit Bitl 7 I7 AIMBC bit Bit21 7 HIZMEM bit Bitl 5 Cancel 7 AAMBC bit Bit20 7 HIZCNT bit Bitl 4 V BREQEN bit Bitl9 V A56PCM bit Bit0 Help Figure 5 62 BCRI Dialog Box This dialog box specifies the values of the bus control register 1 BCR1 This dialog box is provided only for the SH 4 series In this dialog box specify the following values Selecting each box turns the setting on ENDIAN Bit Endian flag MASTER Bit Master slave flag AOMPX Memory type of area 0 AOBST Field Burst ROM control in area 0 When using the burst ROM specify the burst count together ASBST Field Burst ROM control in area 5 When using the burst ROM specify the burst count together Rev 3 0 09 00 page 121 of 276 HITACHI AOBST F
189. ith a selectable intervals between steps Open it by choosing the Run gt Step menu option The Step Program dialog box is displayed Steps f Rate 1 Slowes Step Over Calls v Source Level Step OK Cancel Figure 10 2 Step Program Dialog Box Enter the number of steps in the Steps field choose whether you want to step over function calls by the Step Over Calls check box and choose whether to make one line of the source program correspond to one step by the Source Level Step check box If you are using the feature for automated stepping choose the step rate from the list in the Rate field Click OK or press ENTER to start stepping Rev 3 0 09 00 page 228 of 276 HITACHI Section 11 Stopping Your Program This section describes how you can halt execution of your program This section describes how to do this directly by using the halt command and by setting breakpoints at specific locations in your code 11 1 Halting Execution When your program is running the Halt toolbar button is enabled a red STOP sign and when the program has stopped it is disabled the STOP sign is grayed out To stop the program click on the Halt toolbar button press ESC or choose the Run gt Halt menu option Your program s execution is halted with the message Break Stop displayed on the status bar HDI will then update any open windows The last break cause can also be viewed in the Platform pane of the
190. l Toolbars eese 252 Rev 3 0 09 00 page xiii of xx HITACHI 15 4 3 Button Categories ta hep Ie epe 253 15 4 4 Adding a Button to a Toolbar essere nennen 253 15 4 5 Positioning a Button in a Toolbar seen 253 15 4 6 Removing a Button from a Toolbar see 253 15 5 Customizing the Fonts oreet d derent eiecit He oerte ner 254 15 6 Customizing the File Filters nennen 254 15 7 SAVINGS a SESSIODU coe en aul Uo upon UR UE UO RU quee 256 15 8 Eo ding Sessions eme enero ugue esee eus 256 15 9 Setting HDI Options isset Fe e tee a E 257 15 10 Setting the Default Input Radix seen eene enne 258 section 16 Co vertfication Functions eene 261 16 1 EFeatures petere Ca Rt palet i qe bU RS 261 16 2 Operating 2 metet repete Dite RE es 261 16 3 Simulator Debugger Functions eese tenete ene 262 16 3 1 Simulator Debugger Memory Management sese 262 16 3 2 uec eo ed Eh Herr 262 16 3 3 Bus State Controller eene enne 263 16 3 4 Interrupt Controller INTC eeesseeseeeseeeeeenenennene enne nnne ene 263 16 4 Tutorial eR Uii te enu 263 16 41 Introduction uu
191. le The Load Symbols dialog box opens Rev 3 0 09 00 page 63 of 276 HITACHI Load Symbols Look in 3 H8stut J File name my code sym Files of type Symbol Files sym Figure 5 12 Load Symbols Dialog Box The dialog box operates like a standard Windows open file dialog box select the file and click Open to start loading The standard file extension for symbol files is sym When the symbol loading is complete a confirmation message box may be displayed showing how many symbols have been loaded this can be switched off in the Confirmations sheet on the HDI Options dialog 5 6 10 Save Saves HDI s current symbol table to a symbol file 5 6 11 Save As The Save Symbols dialog box operates like a standard Windows Save File As dialog box Enter the name for the file in the File name field and click Open to save HDI s current label list to a symbol file The standard file extension for symbol files is sym See appendix C for symbol file format Rev 3 0 09 00 page 64 of 276 HITACHI 5 7 Locals Window 8410 0x00003fd0 long 10 1 OxOO0003fcc int OxOO003fc8 int 22117 OxOO0003fc4 int TO 1 0x00003fd4 bauen do D D D D Figure 5 13 Locals Window Allows the user to view and modify the values of all the local variables The contents of this window are blank unless the current PC can be associated to a function containing local v
192. lem areas 5 14 5 Halt This function is not supported by this simulator debugger version Stops tracing data and updates the trace information without stopping execution of the user program 5 14 6 Restart Starts tracing data Rev 3 0 09 00 page 80 of 276 HITACHI 5 14 7 Snapshot This function is not supported by this simulator debugger version Updates the trace information to show the debugging platform s current status without stopping user program execution 5 14 8 Clear Empties the trace buffer in the debugging platform If more than one trace window is open all Trace windows will be cleared as they all access the same buffer 5 14 9 Save Launches the Save As file dialog box allowing the user to save the contents of the trace buffer as a text file It is possible to define a numeric range based on the Cycle number or to save the complete buffer saving the complete buffer may take several minutes Note that this file cannot be reloaded into the trace buffer 5 14 10 View Source Opens a Source or Disassembly window for the address 5 14 11 Trim Source Removes white space from the left side of the source Rev 3 0 09 00 page 81 of 276 HITACHI 5 15 Trace Acquisition Dialog Box Trace Acquisition x Trace start Stop Disable Enable r Instruction type Instruction Cancel Subroutine Trace buffer full handling Help Continue C Break
193. loses the Open TLB dialog box Rev 3 0 09 00 page 135 of 276 HITACHI 5 54 Instruction TLB Dialog Box Instruction TLB x Entry ddress array Data array1 00 00000000 00000000 01 10000000 10000000 02 20000000 00000000 03 30000000 10000000 Modify Flush Find Help Figure 5 75 Instruction TLB Dialog Box This dialog box displays the ITLB contents This dialog box is provided only for the SH 4 series The following items are displayed Entry Entry number in the ITLB H 00 to H 03 Address array Address array in each entry of the ITLB Data 1 Data array 1 in each entry of the ITLB The ITLB contents can be modified flushed and searched using the following buttons Modify Modifies the ITLB contents After selecting the entry to be modified in the list box click the button The Instruction TLB Modify dialog box will open and the ITLB contents can be modified Flush Flushes all ITLB contents Clicking the button clears the V bits of all address arrays and data arrays 1 to zero and invalidates all ITLB entries Find Searches the ITLB contents Clicking the button will open the Instruction TLB Find dialog box and the search condition can be specified Clicking the OK button stores the modified contents in the memory Clicking the Cancel button closes the dialog box without storing the modified contents Rev 3 0 09 00 page 136 of 276 HITACHI 5 55 Instruction TLB Modify Dialog Box I
194. lt data gt lt mode gt lt state gt Parameter Type Description lt start gt Numeric Start address lt end gt Numeric End address lt data gt Numeric Data value lt mode gt Keyword Data size optional default byte byte Byte word Word long Longword single Single precision floating point double Double precision floating point lt state gt Keyword Verify flag optional default V V Verify N No verify Examples MEMORY FILL H C000 Modifies memory contents in the range from H C000 to H COFF H 55AA WORD H COFF to word data H 55AA MF H 5000 H 7FFF H 21 Modifies memory contents in the range from H 5000 to H 7FFF to data H 21 Rev 3 0 09 00 page 194 of 276 HITACHI MEMORY_MOVE Abbreviation MV Description Moves data in the specified memory area Syntax mv start end dest lt state gt Parameter Type start Numeric end Numeric dest Numeric state Keyword V N Examples MEMORY MOVE 3H 1000 H 1FFF H 2000 MV H FB80 H FF7F H 3000 MEMORY TEST Abbreviation MT Description Description Source start address Source end address including this address Destination start address Verify flag optional default V Verify No verify Moves memory contents in the area from H 1000 to H IFFF into H 2000 Moves memory contents in the area from H FBS80 to H FF7F into H 3000 Performs read write and verification testing in the specified address range At this ti
195. me the original contents are destroyed The test will access the memory according to the map settings This simulator debugger does not support MEMORY TEST command Syntax mt start end Rev 3 0 09 00 page 195 of 276 HITACHI Parameter Type Description lt start gt Numeric Start address lt end gt Numeric End address including this address Examples MEMORY TEST H 8000 H BFFF Tests from H 8000 to H BFFF MT H 4000 H 5000 Tests from H 4000 to H 5000 QUIT Abbreviation QU Description Exits HDI Closes a log file if it is open Syntax qu Parameter Type Description none Exits HDI Example QU Exits HDI RADIX Abbreviation RA Description Sets default input radix If no parameters are specified the current radix is displayed Radix can be changed by using before numeric data Syntax ra lt mode gt Rev 3 0 09 00 page 196 of 276 HITACHI Parameter Type Description none Displays current radix lt mode gt Keyword Sets radix to specified type H Sets radix to hexadecimal D Sets radix to decimal O Sets radix to octal B Sets radix to binary Examples RADIX Displays the current radix RAH Sets the radix to hexadecimal REGISTER_DISPLAY Abbreviation RD Description Displays CPU register contents Syntax rd Parameter Type Description none Displays all register contents Example RD Displays all register contents
196. mmand processing to wait until user program stops continue Continues command processing during execution lt address gt Numeric Start address for PC optional default PC value Wait is the default and this causes command processing to wait until user program stops executing Continue allows you to continue to enter commands but they may not work depending on the debugging platform Examples GO Executes the user program from the current PC value Command processing cannot be continued GO CONTINUE H 1000 Executes the user program from H 1000 Command processing can be continued GO_RESET Abbreviation GR Description Executes the user program starting at the address specified in the reset vector While the user program is executing the Performance Analysis window is updated Rev 3 0 09 00 page 187 of 276 HITACHI Syntax gr lt state gt Parameter Type Description lt state gt Keyword Specifies whether or not to continue command processing during user program execution optional default wait wait Causes command processing to wait until user program stops continue Continues command processing during execution Wait is the default and this causes command processing to wait until user program stops executing Continue allows you to continue to enter commands but they may not work depending on the debugging platform Example GR Executes the user program starting at the address specified in the r
197. n units execution Performs a specified number of instructions from current PC Default is stepping by lines if source debugging is available Count default is 1 Syntax st lt mode gt lt count gt Parameter Type Description lt mode gt Keyword Type of single step optional instruction Steps by assembly instruction line Steps by source code line lt count gt Numeric Number of steps optional default 1 Example STEP 9 Steps code for 9 steps Rev 3 0 09 00 page 199 of 276 HITACHI STEP_OUT Abbreviation SP Description Steps the program out of the current function i e a step up This works for both assembly language and source level debugging Syntax 5 Parameter Type Description none Steps the program out of the current function Example SP Steps the program out of the current function STEP_OVER Abbreviation SO Description Performs a specified number of instructions from current PC This command differs from STEP in that it does not perform single step operation in subroutines or interrupt routines These are executed at full speed Syntax so lt mode gt lt count gt Parameter Type Description lt mode gt Keyword Type of stepping optional instruction Steps by assembly instruction line Step by source code line lt count gt Numeric Number of steps optional default 1 Example SO Steps over 1 step code Rev 3 0 09 00 page 200 of 276 HITACHI STEP_RATE A
198. n your program is stopped and the debugger is in break mode the HDI will highlight the line in the Source and Disassembly windows that correspond to the CPU s current program counter PC address value This will be the next instruction to be executed if you perform a step or continue running BP Address Label Line Source 00001012 main void main void PC Location printf 00001024 return if SYSCR BYTE Register Value SYSCR BYTE R14 R15 BCRL BIT EAE 00001018 SR 1111 STOP MODE Figure 10 1 Highlighted Line Corresponding to PC Address Rev 3 0 09 00 page 225 of 276 HITACHI To continue running from the current PC address click the Go toolbar button 81 the Run gt Go menu option 10 3 Running to the Cursor The function for executing only a part of the user program is provided by the Go To Cursor feature to execute to a specific address Using Go To Cursor 1 Make sure that a Source or Disassembly window is open showing the address at which you wish to stop 2 Position the text cursor on the address at which you wish to stop by either clicking in the Address field or using the cursor keys 3 Choose the Go To Cursor menu option from the popup menu The debugging platform will run your program from the current PC value until it reaches the address indicated by the cursor s position Notes 1 If your program never executes the cod
199. nd end fields may be set similarly to the Search option see section 5 8 8 Search 5 8 4 Test Launches the Test Memory dialog box allowing the user to validate a block of memory within the debugging platform The details of the test depend on the debugging platform The start and end fields may be set similarly to the Search option see section 5 8 8 Search 5 8 5 Fill This function is not supported by this simulator debugger version Launches the Fill Memory dialog box allowing the user to fill a block of the debugging platform s memory with a specified value The start and end fields may be set similarly to the Search option see section 5 8 8 Search 5 8 6 Copy Launches the Copy Memory dialog box allowing the user to copy a block of memory within the debugging platform to another location within the same memory space The blocks may overlap The start and end fields may be set similarly to the Search option see section 5 8 8 Search 5 8 7 Compare Launches the Compare Memory dialog box allowing the user to select a start and an end address in the memory area to check against another area in memory If a block of memory is highlighted in a Memory window these will be automatically set as the start and end addresses when the dialog box is displayed Similar to Verify memory but compares two blocks in memory 5 8 8 Search Launches the Search Memory dialog box allowing the user to search a blo
200. nd memory map CPU Displays the current CPU The CPU must be specified in the Select Session dialog box For the SH DSP Internal Mode or External Mode is selected For SH DSP SH7065 one of the following is selected ROM Disable Fast Mode Specifies internal ROM disabled fast access mode ROM Disable Slow Mode Specifies internal ROM disabled slow access mode ROM Enable Fast Mode Specifies internal ROM enabled fast access mode ROM Enable Slow Mode Specifies internal ROM enabled slow access mode For SH 2DSP one of the following is selected ROM Disable Specifies internal ROM disabled mode ROM Enable Specifies internal ROM enabled mode Bit size Displays the address bus width It is fixed to 32 bits Endian Specifies big endian or little endian for the SH 1 SH 2 SH 2E series SH DSP and SH 2DSP this item is fixed as Big Endian System Call Address Specifies the start address of a system call that performs standard input output or file input output processing from the user system Enable Specifies whether the system call is enabled or disabled Execution Mode Specifies whether the simulator debugger stops or continues operating when a simulation error occurs Stop Stops the simulation Continue Continues the simulation Round Mode Specifies the rounding mode for floating point decimal to binary conversion Round to nearest Rounds to the nearest value Round to zero Rounds toward zero In the M
201. nd the corresponding value into the Value field and press OK The Add Label dialog box closes and the label list is updated to show the new label When an overloaded function or a class name is entered in the Value field the Select Function dialog box opens for you to select a function For details refer to section 14 Selecting Functions 5 6 2 Edit Launches the Edit Label dialog box Edit Label x Name gres Value F 00001 012 Figure 5 8 Edit Label Dialog Box Edit the label name and value as required and then press OK to save the modified version in the label list The list display is updated to show the new label details When an overloaded function or a class name is entered in the Name field the Select Function dialog box opens for you to select a function For details refer to section 14 Selecting Functions 5 6 3 Find Launches the Find Label Containing dialog box Rev 3 0 09 00 page 61 of 276 HITACHI Find Label Containing Ed Clear Cancel Figure 5 9 Find Label Containing Dialog Box Enter all or part of the label name that you wish to find into the edit box and click OK or press ENTER The dialog box closes and HDI searches the label list for a label name containing the text that you entered Note Only the label is stored by 1024 characters of the start therefore the label name must not overlap mutually in 1024 characters or less Labels are case sensitive 5 6 4 Fin
202. nput data FPUTC Outputs one byte to a file H 28 Parameter Block One byte One byte 0 Return value File number 2 Unused 4 el Start address of output buffer Parameters Return value output 0 Normal completion 1 Error File number input The number returned when the file was opened Rev 3 0 09 00 page 29 of 276 HITACHI e Start address of output buffer input The start address of the buffer used for storing the output data 9 FGETS H 29 Reads character string data from a file Reads character string data from a file Data is read until either a new line code or a NULL code is read or until the buffer is full Parameter Block Parameters e Return value output 0 Normal completion 1 EOF detected e File number input 0 2 4 6 One byte One byte Return value File number Buffer size Start address of input buffer The number returned when the file was opened e Buffer size input The size of the area for storing the read data A maximum of 256 bytes can be stored e Start address of input buffer input The start address of the buffer for storing input data Rev 3 0 09 00 page 30 of 276 HITACHI 10 FPUTS Writes character string data to a file H 2A Writes character string data to a file The NULL code that terminates the character string
203. nstruction TLB Modify Ed Entry Virtual Address 01 H 10000000 ASID H 0 H FF Physical Address 00 H 20000000 Page Size M Valid 1 Kbyte page W Cacheable C A Kbyte page C 64 Kbyte page C 1 Mbyte page Share status Protection PV Mode User Mode C Read only No access Read only Read only Help Figure 5 76 Instruction TLB Modify Dialog Box This dialog box modifies the ITLB contents of the entry selected in the Instruction TLB dialog box This dialog box is provided only for the SH 4 series The following items can be specified Entry Entry number selected by the Instruction TLB dialog box ASID Address space ID which specifies the process that can access the virtual page Virtual Address Virtual address in longword size Bits 31 to 10 are valid Physical Address Physical address in longword size Bits 31 to 10 are valid Page Size Specifies the page size Rev 3 0 09 00 page 137 of 276 HITACHI Protection Valid Cacheable Share status Specifies the page protection status PV Mode User Mode Read only access Enables read in privileged mode Read only Read only Enables read in privileged or user mode Specifies whether or not the entry is valid Selecting this box makes the entry valid Enables or disables caching Selecting this box enables caching of the page Specifies whether or not to share the page wit
204. o buttons specify whether to display both the functions and global variables or to display either one of them in the Function Variable column Checking in the Show Only Executed Function s check box disables displaying unexecuted functions If a stack information file sni extension output from the optimizing linkage editor does not exist unexecuted functions are not displayed even if this check box is not checked The Include Data of Child Function s check box sets whether or not to display information for a child function called in the function as profile data Rev 3 0 09 00 page 164 of 276 HITACHI 5 70 Profile Tree Window Profile Tree F3 PI Times Cycle Function Application Address H 00000000 H O000028E H OO0001E6 H OO0000AA Size H O000000AA H ODDODODU H O00000A8 H 0000013 Stack Size H 00000034 00000000 H 00000034 H 00000014 Figure 5 98 Profile Tree Window This window displays the relation of function calls in a tree structure Displayed contents are the address size stack size number of function calls and profile data The stack size number of function calls and profile data are values when the function is called Displayed profile data differ according to the target CPU as follows SH 1 SH 2 SH 2E Series SH DSP SH 2DSP and SH DSP SH7065 Cycle the number of execution cycles SH 3 SH 3E SH 3DSP Series and SH DSP with Cache Cycle the number of execution c
205. o eere tos 159 3 681 Copy asse coser een Dp RD RD DRUG PRU 159 25 08 2 GO TO SOURCE 4a LI UR ER eet i ete D Ltt vdd ea cob bikes eR SERRE DIRE 159 25 08 3 View Setting ii neces eei err OP pei IR rhe terius 160 5 09 Profile Last W1ndOW ao iR UESTRE RU EUR E E EUER To 161 5 60 VIeW SOUEGCG eii nr ertet E e ETE e 162 25 69 2 View Profile Tree ettet ee e Exe Ero 162 3 09 37 View Profilez Chart ien ec eerte er UR CN s 162 5 69 14 Enable Profilet eterne e een ere Pee Pese EUNT 162 23 69 5 Bind hei ied eid e d P ee pie erp rebeldes 163 3 60 6 Clear Data eee ee bet pete a epe esee epe e edere ede ep eee 163 3 69 7 Profile Information File 4er tee tede P n eee E eb erue e 163 5 69 89 Output Text File cts eec Uere gray ET Ebert 163 9 699 Select Dafa us eie ERREUR tre EU ep EORR REM eb 163 5 69 10 Se tery is cise reete te eee UH E DUEB 163 9 70 Profile Tree Window ie deett etre tacente rie teet esee en DECRE 165 5 70 L VIEM SOUC E iio rrr rie ETE 166 9 70 2 Vaew Profile Last etre EU A AERE E pe E aot 166 9 2033 View Profiles Chart icici UE et ER 166 3 70 4 Enable Profiler RUIN Seve R 166 3 703 Pindi oue iere oer etm UIROS noo iine 167 25 70 6 Bind 167 Rev 3 0 09 00 page of xx HITACHI 9 70 c Clear Data sho E so ee ee
206. o the front of the display If it is minimized the icon is restored to a window 15 3 Enabling Disabling the Status Bar You can select whether or not the status bar is displayed at the bottom of the HDI application window by default it will be displayed To disable display of the status bar choose the Setup gt Status Bar menu option The status bar will be disabled and removed from the HDI application window display To re enable the Status bar display choose the Setup gt Status Bar menu option again The Status bar will be enabled and added to the HDI application window display Rev 3 0 09 00 page 250 of 276 HITACHI 15 4 Customizing the Toolbar To control the selection and arrangement of buttons displayed on the toolbar choose the Setup gt Customize gt Toolbar menu option The Customize dialog box opens and contains two panes The first pane Toolbars is used to set the overall appearance of the toolbars while the second pane Commands is used to set the individual buttons in each toolbar 15 4 4 Overall Appearance Select the Toolbars pane to set the overall appearance of the toolbars Customize Ea Toolbars Commands Toolbars Menu bar v Show Tooltips New File Edi Cool Look View Large Buttons o Bee Run Memory Setup Window Help 11 11111110411 Apply Help Figure 15 6 Customize Toolbar Toolbars Dialog Box
207. ontaining the word BUFFER SV Displays all the symbols TRACE Abbreviation TR Description Displays the trace buffer contents The last most recently executed cycle in the buffer is 0 and older cycles have negative values Syntax tr lt start rec gt lt count gt Parameter Type Description lt start rec gt Numeric Offset optional default most recent cycle 9 lt count gt Numeric Count optional default 10 Example TRO5 Displays five lines of trace buffer contents starting from the top of the buffer Rev 3 0 09 00 page 204 of 276 HITACHI TRACE_ACQUISITION Abbreviation TA Description Enables or disables trace information acquisition Syntax ta mode Parameter mode Examples TRACE ACQU ISITION E TAD Type Description Keyword Enabling or disabling trace information acquisition E Trace information acquisition is enabled D Trace information acquisition is disabled Trace information acquisition is enabled Trace information acquisition is disabled Rev 3 0 09 00 page 205 of 276 HITACHI Rev 3 0 09 00 page 206 of 276 HITACHI Section 7 Messages 7 1 Information Messages The simulator debugger outputs information messages as listed in table 7 1 to notify users of execution status Table 7 1 Information Messages Message Break Access Contents The break access condition was satisfied and execution has stopped Break Data The break dat
208. or if RO does not contain 0x100 BREAKPOINT Abbreviation BP Description Specifies a breakpoint at the address where the instruction is written Syntax bp lt address gt lt count gt Parameter Type Description lt address gt Numeric The address of a breakpoint lt count gt Numeric The number of times the instruction at the specified address is to be fetched optional default 1 Examples BREAKPOINT 0 2 A break occurs when an attempt is made to execute the instruction at address for the second time BP CO A break occurs when an attempt is made to execute the instruction at address H CO BREAK_ACCESS Abbreviation BA Description Specifies a memory range as a break condition Syntax ba lt start address gt lt end address gt lt mode gt Rev 3 0 09 00 page 178 of 276 HITACHI Parameter Type lt start address gt Numeric lt end address gt Numeric lt mode gt Keyword R W RW Examples BREAK_ACCESS 0 1000 W BA FFFF Description The start address of a breakpoint The end address of a breakpoint optional default lt start address gt Access type optional default RW A break occurs when the specified range is read A break occurs when the specified range is written to A break occurs when the specified range is read or written to A break occurs when the specified range from address H O to address H 1000 is written to A break occurs when address H FFFF i
209. or press ENTER the dialog box closes and the new value are written into the memory range 9 5 Copying an Area of Memory You can copy an area of memory using the memory copy feature Select a memory range see section 9 2 3 Selecting a Memory Range choose the Copy menu option from the popup menu The Copy Memory dialog box opens Rev 3 0 09 00 page 221 of 276 HITACHI Copy Memory x Begin End Cancel pe SSCS ance Destination Yerty Format Long bd Figure 9 7 Copy Memory Dialog Box The source start and end address specified in the Memory window will be displayed in the Begin and End fields Enter the destination start address in the Destination field and click the OK button or press ENTER the dialog box closes and the memory block will be copied to the new address 9 6 Saving an Area of Memory You can save an area of memory in the address space to a disk file using the save memory feature Open the Save Memory As dialog box by choosing the Memory gt Save menu option Save Memory As x Start End e E Cancel fe hdi tutorial h s tutorial mot Browse Eile name Figure 9 8 Save Memory As Dialog Box Enter the start and end addresses of the memory block that you wish to save and a file name The File name drop list contains the previous four file names used for saving memory or a standard Save As dialog box can be launched by clicking the Br
210. ore the icon to a window the window will be at the same position that it was in when you minimized it Similarly when you minimize it again the icon will be placed at the last position that you moved it to When you have many minimized windows as icons the display can look rather messy To tidy up the icons choose the Window gt Arrange Icons menu option The icons will be arranged in order from the bottom left of the application window Hitachi Debug interface E6000 85 2600 Emulator Eie Edit View Run Memory Setup Window Help DH w Wee eximi Of E Disassembl ain xj ELLE a da e e e ForHep press OM Z Figure 15 3 Icons Before Arrangement Rev 3 0 09 00 page 248 of 276 HITACHI gt Hitachi Debugaing interface E6000 85 2600 Emulator Eie Edit View Run Memory Setup Window Help IEEE TEMPS MI dol wen da ofa em i 25 J LL uc ol 5 x 11 Disessemblen E ES For Help press F1 NUM 2 Figure 15 4 Icons After Arrangement 15 13 Tiling Windows After some heavy debugging you may find that you have many windows open on the screen You can arrange all the windows in a tile format with none of them overlapping each other using the Tile function by choosing the Window gt Tile menu option currently open windows are arran
211. ore the register contents general control and system registers and the memory contents to the state prior to the occurrence of the error 3 13 3 Break Due to a Trace Buffer Overflow After the Break mode is specified with Trace buffer full handling in the Trace Acquisition dialog box the simulator debugger stops execution when the trace buffer becomes full The following message is displayed when execution is stopped Rev 3 0 09 00 page 36 of 276 HITACHI Trace Buffer Full 3 13 4 Break Due to Execution of the SLEEP Instruction When the SLEEP instruction is executed during instruction execution the simulator debugger stops execution The following message is displayed when execution is stopped Sleep Note When restarting execution change the PC value to the instruction address at the restart location 3 13 5 Break Due to the STOP Button Users can forcibly terminate execution by clicking the STOP button during instruction execution The following message is displayed when execution is terminated Stop Execution can be resumed with the GO or STEP command 3 14 Floating Point Data Floating point numbers can be displayed and input for the following real number data which makes floating point data processing easier e Data in the Set Break dialog box when the break type is set to Break Data or Break Register e Data the Memory window e Data in the Fill Memory dialog box e Data in the Search Memory
212. orted WCR 1 DMAW Not supported A6IW AOIW Supported WCR2 A6W AOW Supported A6B Not supported A5B Not supported Not supported Note If values are modified or referenced for the registers that are not supported via a dialog box that controls registers etc the simulator debugger execution will not be affected Rev 3 0 09 00 page 18 of 276 HITACHI 3 9 Exception Processing The simulator debugger detects the generation of exceptions corresponding to TRAPA instructions general illegal instructions slot illegal instructions and address errors In addition for the SH 3 SH 3E SH 3DSP and SH 4 series the simulator debugger simulates MMU related exception processing TLB miss TLB protection exception TLB invalid exception and initial page write For the SH 2E SH 3E and SH 4 series the simulator debugger also simulates FPU exception processing The simulator debugger simulates exception processing with the following procedures depending on the Execution Mode setting in the System Configuration dialog box SH 1 SH 2 SH 2E and SH DSP Series e When Continue is selected continuation mode Detects an exception during instruction execution 2 Saves the PC and SR in the stack area 3 Reads the start address from the vector address corresponding to the vector number 4 Starts instruction execution from the start address If the start address is 0 the simulator debugger stops exception processing
213. ory Resource Modify dialog box and System memory resource items can be specified Modify Modifies System memory resource items Select an item to be modified in the list box and click this button The System Memory Resource Modify dialog box opens and System memory resource items can be modified Delete Deletes System memory resource items Select an item to be deleted in the list box and click this button Rev 3 0 09 00 page 92 of 276 HITACHI Note that the Reset button can reset the Memory and System memory resource to the default value Clicking the Close button closes this dialog box Rev 3 0 09 00 page 93 of 276 HITACHI 5 22 System Memory Resource Modify Dialog Box System Memory Resource Modify Figure 5 34 System Memory Resource Modify Dialog Box This dialog box specifies or modifies system memory settings Start address Start address of the memory area to be allocated End address address of the memory area to be allocated Access type Access type Read Read only Write Write only Read Write Read and write Click the OK button after specifying the Start address End address and Access type Clicking the Cancel button closes this dialog box without modifying the setting Rev 3 0 09 00 page 94 of 276 HITACHI 5 23 Control Registers Window This window displays the following control register values This window is provided only for the SH 3 SH 3E SH 3DS
214. osition Only available when the selected source line is valid Rev 3 0 09 00 page 59 of 276 HITACHI 5 6 Labels Window Name H 00001000 startup boot 00001012 main 0000106 STOP MODE 0000108 MASKEl H 000010BA _DMAC_ RUN H 00001180 MASKZ 000011 REGS 00001298 SCIO ACT 00001282 SCIO RUN H 00001316 H 0000134Z RUN H 00001358 DENDDA H 0000136C WOVI H 0000139E TXIO 000013 6 COPY MEM 00001412 INITSCT H 0000145C ROM Figure 5 6 Labels Window You can view symbols sorted either alphabetically by ASCII code or by address value by clicking on the respective column heading It supports column specific double click actions e BP Sets or cancels a standard breakpoint at that address e Address Opens a Source window at the start of the function e Name Launches the Edit Label dialog box Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking The currently selected standard breakpoint is shown by a check mark to the left of the menu text A popup menu containing the following options is available by right clicking within the window but outside the BP column Rev 3 0 09 00 page 60 of 276 HITACHI 5 6 1 Add Launches the Add Label dialog box Add Label x Mame Value Cancel Figure 5 7 Add Label Dialog Box Enter the new label name into the Name field a
215. ow use the scroll bars To quickly look at a new address you can use the Set Address dialog box This can be opened either be choosing the Set Address menu option from the popup menu or by double clicking in the Address column Rev 3 0 09 00 page 218 of 276 HITACHI Set Address x Cancel Figure 9 3 Set Address Dialog Box Enter the new address value and click OK or press ENTER The dialog box closes and the Memory window display is updated with the data at the new address When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function For details refer to section 14 Selecting Functions 9 2 Modifying Memory Contents There are two ways that you can change the contents of memory at an address 1 Quick edit method allows you to enter values by typing directly into the window but is limited to ASCII when displaying ASCII format or hexadecimal values only when displaying all other formats 2 Full edit method uses a dialog box to enter values as floating point or evaluated expressions 9 2 1 Quick Edit The quick way to change the contents of memory is to select the digit that you wish to change by clicking or dragging on it You will see the selected digit is highlighted Type the new value for the digit it must be in the range 0 9 a f when displaying not ASCII format or the new value for ASCII it must be ASCII when displaying ASCII
216. ow with the right mouse button displays the following popup menu Connect Connects to Eagle Terminate Disconnects Eagle Note If Terminate is selected to disconnect Eagle it cannot be reconnected Select Connect to connect to Eagle The Eaglei window will then open E Eaelei Figure 16 8 Eaglei Window Rev 3 0 09 00 page 267 of 276 HITACHI A message from Eagle is displayed on the Eaglei window Clicking the Eagle window with the right mouse button displays the following popup menu Coupling Toggles between the coupling mode and uncoupling mode in Eagle A check mark is displayed when the coupling mode is selected Update Map Updates the Eagle map setting Selecting the Update Map displays the dialog box for selecting the file to be displayed Select the Eagle map setting file and open the dialog box The simulator debugger will load map information 16 4 8 Downloading the Tutorial Program There are three ways to download the tutorial program Through the simulator debugger download the program by selecting Load Program from the File menu Directly to memory For details refer to the Eagle user s manual Through the hardware simulator Set the initial value to the memory model using the HDL language function 16 5 Notes on Co Verification When performing co verification keep the following in mind 1 Keep the External Tools window and Eaglei window open when performing co verifi
217. ows e BREAKPOINT Break based on the address of the instruction executed e BREAK ACCESS Break based on access to a range of memory e BREAK DATA Break based on the value of data written to memory e BREAK REGISTER Break based on the value of data written to a register e BREAK SEQUENCE Break based on a specified execution sequence When break condition is satisfied during user program execution the instruction at the breakpoint may or may not be executed before a break depending on the type of break as listed in table 3 8 Table 3 8 Processing When a Break Condition is Satisfied Command Instruction When a Break Condition is Satisfied BREAKPOINT Not executed BREAK ACCESS Executed BREAK DATA Executed BREAK REGISTER Executed BREAK SEQUENCE Not executed For BREAKPOINT and BREAK SEQUENCE if a breakpoint is specified at an address other than the beginning of the instruction the break condition will not be detected When break condition is satisfied during user program execution a break condition satisfaction message is displayed on the status bar and execution stops Rev 3 0 09 00 page 34 of 276 HITACHI 3 13 2 Break Due to the Detection of an Error During Execution of the User Program The simulator debugger detects simulation errors that is program errors that cannot be detected by the CPU exception generation functions The System Configuration dialog box specifies whether to stop or continue the simula
218. owse button Click the Save button or press ENTER so that the dialog box closes and the memory block will be saved to the disk as a Motorola S Record format file When the file save is completed a confirmation message box may be displayed this can be switched off in the Confirmations tab on the HDI Options dialog box Rev 3 0 09 00 page 222 of 276 HITACHI 9 7 Loading an Area of Memory To load an S Record file to an area of memory without removing the current debugging information by using the load memory feature Open the Load Memory dialog box by choosing the Memory gt Load menu option Load Memory Offset Verify File name c hdi tutorial h8s test mot Figure 9 9 Load Memory Dialog Box You can offset the loading address from the address specified in the S Record by entering a value positive or negative in the Offset field Click the Open button or press ENTER so that the dialog box closes and the data loads into memory When the file load is completed a confirmation message box may be displayed this can be switched off in the Confirmations tab on the HDI Options dialog box 9 8 Verifying an Area of Memory You can compare an area of memory against a previously saved block of memory using the memory verify feature Open the Verify S Record File with Memory dialog box by choosing the Memory gt Verify menu option Verify S Record File with Memory Offset Eile name
219. plier execution Stall inherent in the instruction gt Split lt Stall due to conflict Refer to the programming manual of each device for more information on pipeline operation INSTRUCTION Instruction mnemonic and data access displayed in the form of Transfer destination Transfer data Source or assembly language source programs SH 3 and SH 3E Series Trace 105 records filt CYCLE ADDR BUS DATA BUS INSTRUCTION EX MA SW ACCESS DATA 0000000010 00000030 00000000 05 0000000011 00000032 E20A51F2 MOV 0000000 2 06 0000000012 00000034 20 5182 MOV L 8 00000008 Rl15 Rl 08 0000000013 00000036 31238BE9 CMP GE R2 Rl 09 08 0000000014 00003 31238BE9 09 R2 0000000A 0000000015 00000038 00000000 BF 0000000C 0A R1 00000000 sort a 0000000016 0000003A 64F37410 MOV R15 R4 OB OA 0000000017 0000000C 64F37410 T 0 j rand 0000000018 0000000 D11E410B 8 00000078 PC Rl 0000000019 00000010 D11E410B JSR GRl 0000000020 00000088 00091F03 0000000021 00000012 00000190 R1 lt 00000190 0000000022 00000190 00000190 0000000023 00000192 4F22D407 STS L PR R1S PR 00000012 0000000024 00000194 4F22D407 Q000001C PC R4 Figure 5 21 Trace Window for SH 3 and SH 3E Series This window displays the following trace information items Rev 3 0 09 00 page 76 of 276 HITACHI Pointer in the trace buffer for the last executed instruction CYCL
220. pping Your Program Looking at Variables Overlay Function Selecting Functions and Configuring the User Interface provide a how to guide to using HDI for debugging Co verification Functions describes how to debug the user program by using the co verification tool This manual assumes that the HDI is used on the English version of Microsoft Windows 95 operating system running on the IBM PC Assumptions It is assumed that the reader has a competent knowledge of the C C programming language assembly language mnemonics for the processor being debugged and is experienced in using Microsoft Windows applications Rev 3 0 09 00 page i of xx HITACHI Document Conventions This manual uses the following typographic conventions Table 1 Typographic Conventions CONVENTION MEANING Menu gt Menu Option Bold text with gt is used to indicate menu options for example File gt Save As FILENAME C Uppercase names are used to indicate file names enter this string Used to indicate text that must be entered excluding the quotes Used to indicate required key presses For example Ctrl N means press the Ctrl key and then while holding the Ctrl key down press the N key gt When this symbol is used it is always located in the left hand margin It indicates that the text to its immediate right is describing The how to symbol how to do something Rev 3 0 0
221. ptimizing linkage editor Rev 3 0 09 00 page 171 of 276 HITACHI Rev 3 0 09 00 page 172 of 276 HITACHI Section 6 Command Lines Table 6 1 lists the commands Table 6 1 Simulator Debugger Commands Command Name Abbreviation Function Comment ANALYSIS AN Enables or disables performance analysis ANALYSIS_RANGE AR Sets or displays performance analysis functions ANALYSIS RANGE AD Deletes a performance analysis range DELETE ASSEMBLE AS Assembles instructions into memory ASSERT Checks if an expression is true or false BREAKPOINT BP Sets a breakpoint at an instruction address BREAK ACCESS BA Specifies a memory range access as a break condition BREAK CLEAR BC Deletes breakpoints BREAK DATA BD Specifies a memory data value as a break condition BREAK DISPLAY BI Displays a list of breakpoints BREAK ENABLE BE Enables or disables a breakpoint BREAK REGISTER BR Specifies a register data as a break condition BREAK SEQUENCE BS Sets sequential breakpoints DISASSEMBLE DA Disassembles memory contents ERASE ER Clears the Command Line window EVALUATE EV Evaluates an expression FILE LOAD FL Loads an object program file FILE SAVE FS Saves memory to a file FILE VERIFY FV Verifies file contents against memory GO GO Executes user program GO RESET GR Executes user program from reset GO TILL GT Executes user program until temporary breakpoint HALT HA Hal
222. ption processing of an invalid slot instruction Correct the user program to prevent the error from occurring Rev 3 0 09 00 page 209 of 276 HITACHI Table 7 2 Message Memory Access Error Error Messages cont Contents One of the following states occurred e Amemory area that had not been allocated was accessed e Data was written to a memory area having the write protect attribute e Data was read from a memory area having the read disable attribute e Amemory area in which memory does not exist was accessed Allocate memory change the memory attribute or correct the user program to prevent the memory from being accessed Multiple Exception Multiple exceptions occurred Correct the user program to prevent the error from occurring Slot FPU Disable An attempt was made to execute an FPU instruction in a delay slot while the FPU is disabled SR FD 1 Correct the user program so that no error occurs System Call Error System call error occurred Modify the incorrect contents of registers RO R1 and parameter block TLB Invalid TLB invalid exception occurred during simulation or during command execution Take necessary procedures such as updating the TLB contents TLB Miss TLB miss occurred during simulation or during command execution Take necessary procedures such as updating the TLB contents TLB Multiple Hit Multiple TLB entries were hit when a virtual address was accessed during
223. r Contents eei itr ep ee ee ho erc HOD 242 Section 3 Overlay FUNCHON ono tle ERO eR on tapa M 243 13 1 Displaying Section Group nennen nennen rene 243 13 2 Set ng Section ea ee e ete e b p epe 244 Section 14 Selecting Eunetlonsz Ure Pr o NOR 245 14 1 Displaying Punctions eerte ette dee edere beers 245 14 2 Specityimg Functions e ERE RE beet atest EEE E EEEE EEE ESEE EE 246 14 2 1 Selecting a Function ementi eiie teer prece 246 14 2 2 Deleting a Function need ec ende io epe E reti mee 246 1423 Setting a Function ice ero ten eo REB ten m 246 Section 15 Configuring the User Interface sees 247 15 1 Arranging Windowsi e epa uere ee 247 Minimzang Wind OWS aeree greet em Ud 247 15 12 Arranging Icons eee eom eene e e Eee e detect dod 248 19 1 3 Tiling Windows ie oet bt et rne 249 15 1 4 Cascading Windows esse tene DP Re D ERR tete ipee 249 15 2 Locating Currently Open Windows esseseeeeeeeeeeeeeen nennen ener 250 15 2 1 Locating the Next eee eee eerte petiere itera 250 15 2 2 Locating a Specific nennen 250 15 3 Enabling Disabling the Status 250 15 4 Customizing the Toolbar essere nennen eene enne netten 251 15 41 Overall Appearance oi ee reU S neon Ont pP 251 15 4 2 Customizing Individua
224. r Debugger Functions Supported by Each CPU BSC DMAC SH 2 SH 2E SH 3 SH 3E SH 3DSP SH SH 4BSC SH 4 4 SH7750R O 0 gt gt SH DSP SH 2DSP SH DSP SH7065 X SH DSP with Cache O O Not 3 1 3 1 e O Supported A Partly supported Not supported Simulator Debugger Memory Management 1 Memory Map Specification A memory map can be specified in the System Configuration dialog box to calculate the number of memory access cycles during simulation The following items can be specified Memory type Start and end addresses of the memory area Number of memory access cycles Memory data bus width HITACHI Rev 3 0 09 00 page 9 of 276 The memory types that be specified depend on the CPU For details refer to section 5 18 System Configuration Dialog Box The user program can be executed in all areas except for the internal I O area 3 1 2 Memory Resource Specification A memory resource must be specified to load and execute a user program The memory resource including the following items can be specified in the System Memory Resource Modify dialog box e Start address e End address e Access type The access type can be read write read only or write only Since an error occurs if the user program attempts an illegal access for e
225. rent breakpoint list However when the dialog box is opened again the list is retained in the Stop At field and will be set again if you click the Go PC or Go Reset buttons Rev 3 0 09 00 page 233 of 276 HITACHI Rev 3 0 09 00 page 234 of 276 HITACHI Section 12 Looking at Variables This section describes how to look at the variables and data objects that your program uses It shows you how to view variables set up watch items and look at the contents of the CPU s general FPU DSP and on chip peripheral registers 12 1 Tooltip Watch The quickest way to look at a variable in your program is to use the Tooltip Watch feature gt To use Tooltip Watch 1 Open the Source window showing the variable that you want to examine 2 Rest the mouse cursor over the variable name that you want to examine a tooltip will appear near the variable containing basic watch information for that variable Z 221 void COPY MEM void 222 223 unsigned short u 225 TempZ Namet NAME u 226 227 u H 7E21 Figure 12 1 Tooltip Watch 12 2 Instant Watch To look at the variable in more detail use the Instant Watch feature 2 To use Instant Watch 1 Open the Source window showing the variable that you want to examine 2 Click on the variable You should see a cursor on the variable 3 Choose the Instant Watch menu option from the popup menu The Instant Watch dialog box opens Rev 3 0 09 00 page 235 o
226. ress mode TS Field Bit6 4 Iv DS bit Bitl 9 Iv TM bit Bit7 C Quadword size 64 bits C Byte size 8 bits IV RL bit Bit1 8 V IE bit Bit2 Word size 18 bits C Longword size 32 bits C 32 byte block transfer AL bit Bitl6 DE bit Bit0 iuum cme Figure 5 59 CHCRO0 Dialog Box 7 AM bit Bitl 7 7 TE bit Bitl These dialog boxes specify the values of the DMA channel control registers 0 to 3 CHCRO to CHCR3 The CHCR1 to CHCR3 dialog boxes have the same functions as the CHCRO dialog box shown in figure 5 59 These dialog boxes are provided only for the SH 4 series In these dialog boxes specify the following values Selecting each box turns the setting on SSA Field Specifies attributes for the source address space STC bit Specifies wait control for the source address space DSA Field Specifies attributes for the destination address space DTC bit Specifies wait control for the destination address space SM Field Source address mode Specifies whether the DMA transfer source address is incremented or decremented Rev 3 0 09 00 page 116 of 276 HITACHI DM Field RS Field TS Field DS bit RL bit AM bit AL bit TM bit IE bit TE bit DE bit Destination address mode Specifies whether the DMA transfer destination address is incremented or decremented Resource select Specifies the transfer request source Transmit size Specifies the tran
227. ription Type Description Displays logging status Starts or suspends logging Starts logging Suspends logging Specifies the logging output file Stores the logging in file TEST Suspends logging Resumes logging Displays logging status Description Displays the current memory mapping Displays the current memory mapping Allocates a memory area Rev 3 0 09 00 page 191 of 276 HITACHI Syntax ms lt start address gt lt end address gt lt mode gt Parameter Type Description lt start address gt Numeric Specified start address lt end address gt Numeric Specified end address lt mode gt Keyword Access type optional default RW R Read only W Write only RW Displays the current memory mapping Examples MAP SET 00003FFF RW A read write enabled area is allocated to addresses H 0000 to H 3FFF MS 5000 A read write enabled area is allocated to address H 5000 MEMORY DISPLAY Abbreviation MD Description Displays memory contents Syntax md address lt length gt lt mode gt Parameter Type Description lt address gt Numeric Start address lt length gt Numeric Length optional default H 100 bytes lt mode gt Keyword Display format optional default byte byte Displays in byte units word Displays in word units 2 bytes long Displays in longword units 4 bytes ascii Displays in ASCII codes single Displays in single precision floating point format double Displays in doubl
228. rrays then they will also have expansion indicators next to them Watch Window OP xi Value Expanded watch QxOOO03ff8 unsigned H O1 OxOOOO03ff8 unsi H OS 0x00003ff9 unsi H Oc 0x00003ffa unsi Hitachi Micro Systems E Hitachi Micro Systems E Collapsed watch 0000105 0x00003fb4 gt Expansion indicator Figure 12 5 Expanding a Watch To collapse an expanded watch item double click on the item again The item s elements will collapse back to the single item and the minus sign changes back to a plus sign 12 3 3 Modifying Radix for Watch Item Display To change the radix of watch item select the corresponding item by clicking it and click the right mouse button on the item Then a popup menu will be displayed Choose the Radix menu option from the popup menu Then choose the radix in which you wish the selected watch item to be displayed The value will be updated immediately 12 3 4 Changing a Watch Item s Value You may wish to change the value of a watch variable e g for testing purposes or if the value is incorrect due to a bug in your program To change a watch item s value use the Edit Value function gt Editing a watch item s value 1 Select the item to edit by clicking on it you will see a blinking cursor on the item 2 Choose the Edit Value menu option from the popup menu Rev 3 0 09 00 page 238 of 276 HITACHI The Edit Value dialog box opens
229. ry is valid Tag adr Tag address LWO0 to LW7 Longword data to 7 stored in OC entries The OC contents can be modified and flushed using the following buttons Modify Modifies the OC contents After selecting the entry to be modified in the list box click the button The Operand Cache Modify dialog box will open and the OC contents can be modified Flush Flushes all OC entries Clicking the button clears the U and V bits of all entries to zero and invalidates all OC entries Clicking the OK button stores the modified contents in the memory Clicking the Cancel button closes the dialog box without storing the modified contents Rev 3 0 09 00 page 154 of 276 HITACHI SH 4 SH7750R Operand Cache xi EntVU Tagadr LW0 LW1 Lw2 LW3 LW4 LW5 LW6 LW 000 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 001 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 002 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 003 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 004 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 005 0 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 006 0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 007 0 0 00000000 00000000 00000000 00000000 00000000 0
230. s Release the mouse button when you are satisfied with the column width and the display will be updated with the new column width 11 31 Adding a Breakpoint You can add a new breakpoint in the Breakpoints window by choosing the Add menu option from the popup menu The Set Break dialog box will open in which you can enter the type and parameters of the new breakpoint 11 3 2 Modifying a Breakpoint To edit an existing breakpoint in the Breakpoints window select the breakpoint in the list by double clicking or by clicking on the line corresponding to it and choose Edit menu option from the popup menu The Set Break dialog box will open in which you can change the type and parameters of the selected breakpoint When a break sequence is selected the Break Sequence dialog box will open 11 3 3 Deleting a Breakpoint To delete an existing breakpoint in the Breakpoints window select the breakpoint in the list by clicking on the line corresponding to it and choose the Delete menu option from the popup menu The breakpoint is deleted and the window is updated Rev 3 0 09 00 page 231 of 276 HITACHI 11 3 4 Deleting All Breakpoints To delete all of the breakpoints listed in the Breakpoints window choose the Delete All menu option from the popup menu All breakpoints are deleted and the window is cleared 11 4 Disabling Breakpoints During the course of a debugging session you may find that you tend to focus on part
231. s accessed Note For the SH 3DSP series specify values within the range H A5000000 to H A501FFFF X and Y memory virtual addresses corresponding to physical addresses H 05000000 to H 0501FFFF as the start end addresses for X or Y memory accesses by the MOVX or MOVY instruction BREAK CLEAR Abbreviation BC Description Deletes breakpoints Syntax be lt index gt Parameter Type lt index gt Numeric Examples BREAK CLEAR 0 BC Description Index of the breakpoint to be canceled If the index is omitted all breakpoints are deleted The first breakpoint is deleted breakpoints are deleted Rev 3 0 09 00 page 179 of 276 HITACHI BREAK_DATA Abbreviation BD Description Specifies a memory data value as a break condition Syntax bd lt address gt lt data gt lt size gt lt option gt Parameter Type Description lt address gt Numeric The address where the break condition is checked lt data gt Numeric Access data lt size gt Keyword Size optional default L B Byte size W Word size L Longword size S Single precision floating point size D Double precision floating point size option Keyword Match or mismatch of data The default is EQ EQ A break occurs when the data matches the specified value _ A break occurs when the data does not match the specified _ value Examples BREAK DATA 0 100 LEQ A break occurs when H 100 is written to memory address H O in longword
232. se within the window displays a popup menu Supported menu options are described in the following sections 5 691 View Source Displays the source program or disassembled memory contents for the address in the selected line If a line of a global variable is selected this menu option is displayed in gray characters 5 60 2 View Profile Tree Displays the Profile Tree window 5 60 3 View Profile Chart Displays the Profile Chart window focused on the function in the specified line 5 60 4 Enable Profiler Toggles acquisition of profile data When profile data acquisition is active a check mark is shown to the left of the text Profile data and performance analysis data cannot be acquired at a time If the profile data acquisition is going to be enabled when the performance analysis data acquisition is active when the Enable Analysis in the Performance Analysis window is checked a warning message box is displayed Performance Analysis is enabled Profiling and Performance Analysis use the same resources so cannot be used at the same time If you continue and enable Profiling Performance Analysis will be disabled This will delete your current Performance Analysis data Cancel Figure 5 96 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When OK is clicked the performance analysis data acquisition is disabled and the profile data acquisition is enabled Rev 3 0 09 00 page 162 of 276
233. sed data e C C or assembly language source programs Rev 3 0 09 00 page 22 of 276 HITACHI SH 4 Series e Total number of instruction execution cycles CPU internal clock e Program counter value e Fetched instruction code e Instruction number that was executed accessed memory or wrote back data in the EX pipeline e Instruction number that was executed accessed memory or wrote back data in the LS pipeline e Instruction number that was executed accessed memory or wrote back data in the BR pipeline e Instruction number that was executed accessed memory or wrote back data in the FP pipeline e Instruction number assigned to the instruction to be executed e Memory address instruction code and mnemonic of the instruction to be executed e Data access information destination and accessed data e C C or assembly language source programs The trace information can be searched The search conditions can be specified in the Trace Search dialog box Click the right mouse button in the Trace window and choose Find from the popup menu to display the Trace Search dialog box For details refer to section 5 14 Trace Window Rev 3 0 09 00 page 23 of 276 HITACHI 3 12 Standard I O and File I O Processing The simulator debugger provides the Simulated I O window to enable the standard I O and file I O processing listed in table 3 7 to be executed by the user program When the I O processing is executed the Simulated I O windo
234. ses the dialog box without storing the modified values Rev 3 0 09 00 page 124 of 276 HITACHI 5 44 WCR2 Dialog Box ABW Field Bit31 29 A6B Field Bit28 26 ASW Field Bit25 23 A5B Field Bit22 20 AAW Field Bitl 9 1 7 Field Bit1 5 1 3 A2W Field Bitl 1 9 ATW Field Bit8 6 AOW Field Bit5 3 Field Bit2 0 Figure 5 65 WCR2 Dialog Box This dialog box specifies the values of the wait control register 2 WCR2 This dialog box is provided only for the SH 4 series In this dialog box specify the following values AOW Field to A6W Field Wait state control for the corresponding area 0 to 6 Note that the specifications for areas 2 and 3 are valid only for normal memory Memory types for areas 2 and 3 are indicated on the right side of A3W Field and A2W Field A6B Field Burst pitch count for the burst transfer in area 6 Rev 3 0 09 00 page 125 of 276 HITACHI 5 Field Burst pitch count for the burst transfer in area 5 AOB Field Burst pitch count for the burst transfer in area 0 This simulator debugger does not support the functions marked with Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 126 of 276 HITACHI 5 45 Dialog Box WCR3 Ed Field Bit25 2 4 A6SO bit Bit26 Field Bit21 20 A5S0 bit Bit22
235. sfer data size DREQ select bit Request check level bit Acknowledge mode bit Acknowledge level bit Transmit mode bit Specifies the bus mode for transfer Interrupt enable bit Transfer end bit This bit is set when transfer has been completed for the count specified in the DMATCR DMA enable bit This bit is enabled when the user program execution starts This simulator debugger does not support PCMCIA For the RS Field setting only the automatic request and the external area can be selected Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 117 of 276 HITACHI 5 39 DMAOR Dialog Box PR Field Bit9 8 CHO gt CH1 gt CH2 gt CH3 C CH CH2 CH3 cHi M AEbit Bit2 C CH2 CH0 CHI CH3 v NMIF bit Bitl 7 DDT bit Bit5 C Round robin mode 7 DME bit Bit0 Cancel Figure 5 60 DMAOR Dialog Box This dialog box specifies the values of the DMA operation register DMAOR This dialog box is provided only for the SH 4 series In this dialog box specify the following values Selecting each box turns the setting on PR Field Priority mode Specifies the priority of the channels when transfer is requested to two or more channels at the same time DDT bit On demand data transfer bit AE bit Address error flag NMIF bit NMI flag DME bit DMAC master enable bit Enables
236. should be pressed Help on a particular command can be displayed by entering HELP or HE followed by the command name Syntax he lt command gt Rev 3 0 09 00 page 189 of 276 HITACHI Parameter Type Description none Displays the contents of the help lt command gt String Displays the help for the specified command Examples HE Displays the contents of the help HE GO Displays help for the GO command INITIALISE Abbreviation IN Description Initializes HDI user system all breakpoints and memory mapping It also initializes debugging platform as if you had reselected the target DLL Syntax in Parameter Type Description none Initializes HDI Example IN Initializes HDI LOG Abbreviation LO Description Controls logging of command output to file If no parameters are specified logging status is displayed If an existing file is specified you will be warned if you answer No data will be overwritten to the existing file otherwise the file will be added Logging is only supported for the command line interface Syntax lo lt state gt I lt filename gt Rev 3 0 09 00 page 190 of 276 HITACHI Parameter none lt state gt lt filename gt Examples LOG TEST LO LOG LOG MAP_DISPLAY Abbreviation MA Description Type Keyword Numeric Displays memory mapping Syntax ma Parameter none Example MA MAP SET Abbreviation MS Desc
237. sion with the same name as the current object file choose the File gt Save Session menu option To save the current setting under a new name choose the File gt Save Session As menu option This will launch a common file dialog box prompting you for a file name Up to three files are saved an HDI session file hds a target session file hdt and a watch session file hdw The first includes the HDI interface settings e g all the open windows and their positions The second includes the settings specific to the debugging platform user system e g the name of the debugging platform and its configuration The third is only created if a Watch window is open and it includes a list of the variables currently being watched The session name is then displayed as the second entry in HDI s title bar A Hitachi Debugging Interface MANUAL E6000 H8S 2600 Emulator Iof xi File Edit View Run Setup Tools Window Help Figure 15 10 Session Name Display Note The session file does not include symbol or memory information To use modified information again in later sessions save the symbol and memory information in appropriate files For details see section 9 6 Saving an Area of Memory and section 5 6 11 Save As 15 8 Loading a Session To reload a saved session choose the File gt Load Session menu option This will launch a standard Windows file dialog box prompting you for an HDI session file name hds Any
238. ss to the R1 register for the parameter block refer to each function description MSB LSB Parameter block address e Reserve the parameter block and input output buffer areas Each parameter of the parameter block must be accessed in the parameter size After the I O processing the simulator debugger resumes simulation from the instruction that follows the system call instruction Note Whena JSR BSR or BSRF instruction is used as a system call instruction the instruction following the JSR BSR or BSRF instruction is executed as a normal instruction not a slot instruction Therefore the instruction placed immediately after the system call instruction JSR BSR or BSRF must not be one that produces different results depending on whether executed as a normal instruction or as a slot instruction Each I O function is described in the following format 1 N 4 2 Parameter Block 5 Parameters 6 1 Number corresponding to table 3 7 2 Function name 3 Function code 4 I O overview 5 I O parameter block 6 I O parameters Rev 3 0 09 00 page 25 of 276 HITACHI 1 GETC Inputs one byte from the standard input device H 21 Parameter Block One byte One byte 0 r Input buffer start address 4 2 Parameters e Input buffer start address input Start address of the buffer to which the input da
239. struction of the function To step into the function either click the Step In toolbar button TH or choose the Run gt Step In menu option 10 5 2 Stepping Over a Function Call If you choose to step over the function the debugger will execute the call and all of the code in the function and any function calls that that function may make and stop at the next line or instruction of the calling function To step over the function either click the Step Over toolbar button TPI or choose the Run gt Step Over menu option 10 6 Stepping Out of a Function During debugging there are occasions when you may have entered a function finished stepping through the instructions that you want to examine and would like to return to the calling function without stepping through all the remaining code in the function Or alternatively and perhaps more usefully you may have stepped into a function by accident when you meant to step over it and so want to return to the calling function without stepping all the way through the current function You can do this with the Step Out feature To step out of the current function either click the Step Out toolbar button ei or choose the Run gt Step Out menu option Rev 3 0 09 00 page 227 of 276 HITACHI 10 7 Multiple Steps Sometimes you may find it useful to step several instructions at a time You can do this by using the Step Program dialog box The dialog box also provides an automated step w
240. t module has been selected the rest of the system configures itself automatically by loading the appropriate modules Rev 3 0 09 00 page 269 of 276 HITACHI Graphical User Interface This is the main HDI EXE program that runs under Windows It uses familiar Windows operations with menus and windows to give a user friendly view into the debugging system The GUL is the only contact between the user and the rest of the system it processes commands and provides the required information about the user program It also provides the interface between the module DLLs and the host file system i e the PC Object DLL When creating the user program a compiler will generate an absolute object file This file contains the actual machine code and data that the microcomputer processes to execute the functions making up the target application In order to debug the user program as original source code the compiler must provide more information to the debugger For this reason nearly all compilers have a debugging option that puts all the information necessary for debugging your source code into the absolute file which is usually called a debug object file The object DLL extracts this information from the object file for display to the user Since the format of data is compiler dependent more than one object DLL may be present in the HDI directory HDI will try each in turn until it finds one that can understand the object file s format CPU
241. t you want to examine 2 Click on the variable You should see a cursor on the variable 3 Choose the Add Watch menu option from the popup menu The variable is added as a watch item and the Watch window is updated Rev 3 0 09 00 page 236 of 276 HITACHI Full Method The full method uses a dialog box that allows you to enter more complex watch expressions for example arrays structures or pointers To use Add Watch from a Watch Window 1 Open the Watch window 2 Choose the Add Watch menu option from the popup menu The Add Watch dialog box opens Add Watch xi Address z erable expression Figure 12 3 Add Watch Dialog Box Enter the name of the variable that you wish to watch and click OK The variable is added to the Watch window Watch Window iof Imi x value H 00005665 OxOO003fc4 int Figure 12 4 Watch Window 12 3 2 Expanding a Watch If a watch item is a pointer array or structure then you will see a plus sign expansion indicator to the left of its name This means that you can expand the watch item To expand a watch item double click on it The item expands to show the elements in the case of structures and arrays or data value in the case of pointers indented by one tab character and the plus sign Rev 3 0 09 00 page 237 of 276 HITACHI changes to a minus sign If the elements of the watch item also contain pointers structures or a
242. ta is written to 2 PUTC Outputs one byte to the standard output device H 22 Parameter Block One byte One byte 0 r Output buffer start address 2 Parameters e Output buffer start address input Start address of the buffer in which the output data is stored 3 GETS Inputs one line from the standard input device H 3 Parameter Block One byte One byte 0 r Input buffer start address 2 Parameters e Input buffer start address input Start address of the buffer to which the input data is written to Rev 3 0 09 00 page 26 of 276 HITACHI 4 PUTS Outputs one line to the standard output device H 24 Parameter Block One byte One byte 0 F Output buffer start address 4 2 Parameters e Output buffer start address input Start address of the buffer in which the output data is stored 5 FOPEN Opens a file H 25 The FOPEN opens a file and returns the file number After this processing the returned file number must be used to input output or close files A maximum of 256 files can be open at the same time Parameter Block One byte One byte 0 Return value File number 2 Open mode Unused 4 Start address of file 6 Parameters e Return value output 0 Normal completion Error e File number
243. ters choose the ASCII menu option from the popup menu and the display will be updated to show the area of memory as ASCII characters 9 1 2 Displaying Memory as Bytes To display and edit memory as bytes choose the Byte menu option from the popup menu and the display will be updated to show the area of memory as individual bytes as shown in figure 9 2 9 1 3 Displaying Memory as Words To display and edit memory as words choose the Word menu option from the popup menu and the display will be updated to show the area of memory as 16 bit words 9 1 4 Displaying Memory as Longwords To display and edit memory as longwords choose the Long menu option from the popup menu and the display will be updated to show the area of memory as 32 bit longwords 9 1 5 Displaying Memory as Single Precision Floating Point To display and edit memory as single precision floating point data choose the Single float menu option from the popup menu and the display will be updated to show the area of memory as single precision floating point data 9 1 6 Displaying Memory as Double Precision Floating Point To display and edit memory as double precision floating point data choose the Double float menu option from the popup menu and the display will be updated to show the area of memory as double precision floating point data 9 1 7 Looking at a Different Area of Memory If you want to change the area of memory that is displayed in the Memory wind
244. the address does not correspond to a source file then a new Disassembly window will be opened When an Rev 3 0 09 00 page 72 of 276 HITACHI overloaded function a class name is entered the Select Function dialog box opens for you to select a function e Label Launches the Label dialog box allowing the user to enter a new label and edit the name of an existing label e Line Launches the Set Line dialog box allowing the user to go directly to a line in the source file e Source Opens the source file in the editor specified in the Startup menu HDI shortcut at this source line Within the BP column a list of currently supported standard breakpoint types can be displayed by right clicking The currently selected standard breakpoint is shown by a check mark to the left of the menu text A popup menu containing the following options is available by right clicking in any of the other columns within the window 5 12 1 Copy Only available if a block of text is highlighted This copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 122 Find Launches the Find dialog box allowing the user to search the source file for a string 5 12 3 Set Address Launches the Set Address dialog box allowing the user to enter a new start address The window will be updated so that this is the first address displayed in the top left corner When an overloaded function or a class n
245. the current log 5 4 4 Logging a Toggles logging to file on and off When logging is active the button becomes effective Note that the contents of the log file cannot be viewed until logging is completed or temporarily disabled by clearing the check box Re enabling logging will append to the log file 5 4 5 Select All Selects all contents output in the Command Line window 5 4 6 Copy Only available if a block of text is highlighted This copies the highlighted text into the Windows clipboard allowing it to be pasted into other applications 5 5 Disassembly This window is used to display code at the assembly language level This window layout has a different layout to the Source window with an additional column Label which displays the symbol label name if available for that address Assembler information is obtained by disassembling the memory contents and may be edited or viewed directly from memory without requiring debug information from the object file Rev 3 0 09 00 page 57 of 276 HITACHI iy Disassembly C hew hdi4_sh TUTORIAL sort c Address BP Code Label Assembler nesses SOURCE al ad C8 R15 H 00 R3 R3 H 08 4 R15 amp H 0030 12 Q H 0078 8 PC R1 R1 RO CH 0C 4 R15 RO H 001C 8 RO RO RO G H OC 4 R15 SUC Deom uet R Figure 5 5 Disassembly Window It supports column specific double click actions e BP Toggles standard event types at that address
246. tii 002000 002005 I II ELT 12 PsectO3 Psecti3 Figure 13 3 Overlay Dialog Box Highest Priority Section Group Selected After selecting a section group clicking the OK button stores the priority setting and closes the dialog box Clicking the Cancel button closes the dialog box without storing the priority setting Note Within the address range used by the overlay function the debugging information for the section specified in the Overlay dialog box is referred to Therefore the same section of the currently loaded user program must be selected in the Overlay dialog box Rev 3 0 09 00 page 244 of 276 HITACHI Section 14 Selecting Functions When selecting overloaded functions or member functions that can be used in C programs follow the description in this section 14 1 Displaying Functions Use the Select Function dialog box to display overloaded functions and member functions A function can be selected in the following cases When setting a breakpoint When specifying a function in the Run Program dialog box In the Set Address dialog box for opening the Source window In the Set Address dialog box for opening the Memory window When adding or modifying a symbol When specifying a function for performance analysis When overloaded functions have the same specified function name or when a class name including a member function is specified the Select Function dialog box opens Select Function Select
247. tion processing Correct the user program to prevent the error from occurring FPU Disable An attempt was made to execute an FPU instruction while the FPU is disabled SR FD 1 Correct the user program to prevent the error from occurring FPU Error One of the following states occurred during floating point operation e An FPU error occurred e An invalid operation occurred e A division by zero occurred An overflow occurred e An underflow occurred e An inaccurate operation occurred Correct the user program to prevent the error from occurring General Invalid Instruction Either of the following states occurred e Acode other than an instruction was executed e An error occurred in the exception processing of a reserved instruction exception Correct the user program to prevent the error from occurring Illegal CCR2 Set The CCR2 value is illegal Check the setting Illegal Combination BSC Register An attempt was made to access the area for which the BSC register setting is invalid Correct the user program to prevent the error from occurring Rev 3 0 09 00 page 208 of 276 HITACHI Table 7 2 Error Messages cont Message Conients Illegal DSP Either of the following states occurred Operation e Ashift of more than 32 bits was executed with the PSHA instruction e Ashift of more than 16 bits was executed with the PSHL instruction Correct the user program to prevent the error from oc
248. tion when such an error occurs Table 3 9 lists the error messages error causes and the action of the simulator debugger in the continuation mode Table 3 9 Simulation Errors Processing in Continuation Error Message Error Cause Mode Memory Access Error Access to a memory area that has not memory write nothing is been allocated written on memory read all bits are read as 1 Write to a memory area having the write protect attribute Read from a memory area having the read disable attribute Access to an area where memory does not exist Illegal Operation Zero division executed by the DIV1 Operates in the same way as the instruction actual device operation Writing zero by the SETRC instruction Illegal DSP Operation Shift of more than 32 bits executed by the PSHA instruction Shift of more than 16 bits executed by the PSHL instruction Invalid DSP Instruction Invalid DSP instruction code Always stops Code TLB Multiple Hit Hit to multiple TLB entries at MMU Undefined address translation only for the SH 3 SH 3E and SH 3DSP series When a simulation error occurs in the stop mode the simulator debugger returns to the command wait state after stopping instruction execution and displaying the error message Table 3 10 lists the states of the program counter PC at simulation error stop The status register SR value does not change at simulation error stop Rev 3 0 09 00 page 35 of 276
249. ts C 16 bits C 8 bits 32 bits Help PORTEN Bit Bit 0 Cancel Figure 5 63 BCR2 Dialog Box This dialog box specifies the values of the bus control register 2 BCR2 This dialog box is provided only for the SH 4 series In this dialog box specify the following values AOSZ Field to A6SZ Field Bus width of the corresponding area 0 to 6 PORTEN Bit Port function enable bit When this box is selected the pins are used as ports Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 123 of 276 HITACHI 5 43 WCRI Dialog WCR1 x DMAIW Field Bit30 28 AGIW Field Bit26 2 4 0 Cancel ASIW Field Bit22 20 0 Y A4IW Field Bitl 8 16 0 A3IW Field Bitl 4 12 A2IW Field Bitl 0 8 ATIW Field Bit6 4 AOIW Field Bit2 0 Figure 5 64 WCRI Dialog Box This dialog box specifies the values of the wait control register 1 WCR1 This dialog box is provided only for the SH 4 series In this dialog box specify the following values DMAIW Field Idle cycle count specification for the DMAIW DACK devices AOIW Field to A6IW Field Idle cycle count specification for areas 0 to 6 The simulator debugger does not support the function marked with Clicking the OK button stores the modified values in the memory Clicking the Cancel button clo
250. ts user program HELP HE Gets help for command line or help on a command INITIALISE IN Initializes HDI Rev 3 0 09 00 page 173 of 276 HITACHI Table 6 1 Command Name Abbreviation Simulator Debugger Commands cont Function LOG LO Controls command output logging MAP_DISPLAY MA Displays memory mapping MAP_SET MS Allocates a memory area MEMORY_DISPLAY MD Displays memory contents MEMORY_EDIT ME Modifies memory contents MEMORY_FILL MF Fills a memory area MEMORY_MOVE MV Moves a block of memory MEMORY_TEST MT Tests a block of memory QUIT QU Exits HDI RADIX RA Sets default input radix REGISTER_DISPLAY RD Displays CPU register values REGISTER_SET RS Changes CPU register contents RESET RE Resets CPU SLEEP Delays command execution STEP ST Steps program by instructions or source lines STEP_OUT SP Steps out of the current function STEP_OVER SO Steps program not stepping into functions STEP RATE SR Sets rate of stepping SUBMIT SU Executes a command file SYMBOL ADD SA Defines a symbol SYMBOL CLEAR SC Deletes a symbol SYMBOL LOAD SL Loads a symbol information file SYMBOL SAVE SS Saves a symbol information file SYMBOL VIEW SV Displays symbols TRACE TR Displays trace buffer contents TRACE ACQUISITION TA Enables or disables trace information acquisition The following describes each command syntax Rev 3 0 09 00 page 174 of 276 HITA
251. tton stores the modified contents in the memory Clicking the Cancel button closes the dialog box without storing the modified contents Rev 3 0 09 00 page 151 of 276 HITACHI 5 64 Instruction Cache Modify Dialog Box This dialog box modifies the IC contents of the entry selected in the Instruction Cache dialog box This dialog box is provided only for the SH 4 series and the displayed contents differ according to the target CPU SH 4 SH 4BSC Entry H 01 Tag Address 01 000000 Long Long wWord4 Valid 00000000 H 44444444 Long Word1 Long Word5 Long YYord2 Long YYord6 Long YYord3 Long 33333333 arrr Figure 5 86 Instruction Cache Modify Dialog Box for SH 4 SH 4BSC The following items can be specified Entry Displays the entry number selected by the Instruction Cache dialog box Tag Address Tag address A longword physical address must be specified Bits 31 to 10 are valid Valid Indicates whether or not the entry is valid Selecting this box makes the entry valid Long Word0 to Long Word7 Longword data to 7 to be set to IC entries Clicking the OK button displays the modified contents in the Instruction Cache dialog box Clicking the Cancel button closes the dialog box without displaying the modified contents in the Instruction Cache dialog box Rev 3 0 09 00 page 152 of 276 HITACHI SH 4 SH7750R Instruction Cache Modify Way0 Entry0
252. uns on a host computer software debugging can start without using an actual user system thus reducing overall system development time e The simulator debugger performs a pipeline simulation to calculate the number of instruction execution cycles for a program thus enabling performance evaluation without using an actual user system e The simulator debugger offers the following features and functions that enable efficient program testing and debugging The ability to handle all of the SuperH RISC engine series CPUs Functions to trace instructions or subroutines Functions to stop or continue execution when an error occurs during user program execution Profile data acquisition and function unit performance measurement A comprehensive set of break functions Functions to set or edit memory maps Functions to display function call history e The breakpoint memory map performance and trace can be set through the dialog box under Windows Environments corresponding to each memory map of the SuperH RISC engine microprocessors can be set through the dialog box Rev 3 0 09 00 page 2 of 276 HITACHI 1 2 Target User Program Load modules in ELF DWAREF format and S type format can be debugged with the simulator debugger These load modules are called user programs in this manual Figure 1 1 shows the creation of target user programs to be debugged Assembly source C source C source program program
253. us bar and the Source window display is updated with the program PC breakpoint line highlighted Note The line or instruction at which you set a program PC breakpoint is not actually executed the program stops just before it is about to execute it If you choose to Go or Step after stopping at the program PC breakpoint then the highlighted line will be the next instruction to be executed 11 3 Breakpoints Window The Breakpoints window allows you to access complex breakpoints if your debugging platform supports them and gives you more control over setting or clearing and enabling or disabling breakpoints To open the Breakpoints window choose the View gt Breakpoints menu option or click the Breakpoint toolbar button Ei if visible Rev 3 0 09 00 page 230 of 276 HITACHI The Breakpoints window opens Breakpoints _ Ini xi nable File Line Symbol Address Type TUTORIAL C 36 00001030 Type PC TUTORIAL C 42 00001042 Type PC Temp Name 000 00 Type Read a Figure 11 2 Breakpoints Window The window displays a list of the breakpoints set in the system The breakpoint list is divided horizontally into five columns Enable File Line Symbol Address and Type The respective widths of each of the columns can be adjusted by clicking and dragging on the dividing line between each column title in the header bar The cursor will change to and a vertical line will be displayed at the dividing line of the column
254. w must be open Table 3 7 I O Functions Function No Code Function Name Description 1 H 21 GETC Inputs one byte from the standard input device 2 H 22 PUTC Outputs one byte to the standard output device 3 H 23 GETS Inputs one line from the standard input device 4 H 24 PUTS Outputs one line to the standard output device 5 H 25 FOPEN Opens a file 6 H 06 FCLOSE Closes a file 7 H 27 FGETC Inputs one byte from a file 8 H 28 FPUTC Outputs one byte to a file 9 H 29 FGETS Inputs one line from a file 10 H 2A FPUTS Outputs one line to a file 11 H OB FEOF Checks for end of file 12 H 0C FSEEK Moves the file pointer 13 H 0D FTELL Returns the current position of the file pointer To perform I O processing use the System Call Address in the System Configuration dialog box in the following procedure 1 Set the address specialized for I O processing in the System Call Address select Enable and execute the program 2 When detecting a subroutine call instruction BSR JSR or BSRF that is a system call to the specialized address during user program execution the simulator debugger performs I O processing by using the RO and 1 values as the parameters Therefore before issuing a system call set as follows in the user program e Set the function code table 3 7 to the RO register 1 byte 1 byte LSB Function MEE SEEN Rev 3 0 09 00 page 24 of 276 HITACHI e Set the parameter block addre
255. whole DMAC operations This bit becomes valid when the user program execution starts The simulator debugger does not support the functions marked with Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 118 of 276 HITACHI 5 40 MCR Dialog Box MCR TRC Field Bit29 2 7 TRWL Field Bit1 5 1 3 0 1 TPC Field Bit21 1 9 TRAS Field Bitl 2 10 0 2 RCD Field Bitl 7 16 SZ Field Bit8 7 2 64bit AMX Field Bit5 3 0 RASD bit Bit31 AMXEXT Bit Bit6 MRSET bit Bit30 RFSH bit Bit2 TCAS bit Bit23 RMODE bit Bitl BE Bit Bit9 EDOMODE Bit Bitl Help Figure 5 61 Dialog Box This dialog box specifies the values of the individual memory control register MCR This dialog box is provided only for the SH 4 series In this dialog box specify the following values Selecting each box turns the setting on TRC Field Specifies the RAS precharge period after refresh TPC Field RAS precharge period RCD Field RAS CAS delay TRWL Field Write precharge delay TRAS Field RAS assertion period for CAS before RAS refresh Rev 3 0 09 00 page 119 of 276 HITACHI SZ Field Memory data size AMX Field Address multiplexing RASD bit RAS down mode bit MRSET Mode register set TCAS bit CAS negation period BE B
256. with a Value nennen JAT o eer peer iere en 9 5 Copying an Area of Memory sier eote eer ae e ee eara nennen rennen enne 9 6 Saving an Area of Memory osx edo PURUS REDE U UR USE EIUS 9 7 Loading an Area of ren eene enne 9 8 Verifying an Area of Memory trennen een eene ener tenete trees Section 10 Executing Your 10 1 Running from Reset nee ebrio Re eie te eain 10 2 Continuously Running Your Program eene nennen 10 3 Running to the C rsoOr ne nissin e Deere pei tee pem RP FU de 10 4 Running to Several Points eet teet eet iere beau ie ete dub eta 10 5 SungleStepus c aieo teret es oen etes ton d Re A SE Cree 10 5 1 Stepping Into a Function ener 10 5 2 Stepping Over a Function 10 6 Stepping Out of a Function sseeeeeeeeeeeeeeenennee nennen nennen rene een ener 10 7 Multiple Steps teet Ure trot eR E tec EE Section 11 Stopping Your Pro arenas ose i Gay re etes ae ege or tnde tse dur pea pee T i Hal ng Execullon ore tt re PT ERR 11 2 Standard Breakpoints PC Breakpoints eeseeeeeeeeeeeeeen nennen 11 3 Breakpoints Window nene tere rni er E RE Ete e etri 11 3 1 Adding Breakpoint eet ettet re epe eterne euis 11 3 2 Modifying a
257. x for SH DSP with Cache The following items must be specified Selecting each box turns the setting on WB bit Write back bit CP bit Cache purge bit TW bit Two way mode bit OD bit Operand replacement disable bit ID bit Instruction replacement disable bit CE bit Cache enable bit W field Way specification bit Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 110 of 276 HITACHI 5 33 CCR2 Dialog Box CCR2 Ed IV W3LOAD bit Bit9 W3LOCK bit Bit8 Iv W LOAD bit Bitl iv W LOCK bit Bit0 Figure 5 54 CCR2 Dialog Box This dialog box specifies the following values of the cache control register 2 CCR2 This dialog box is provided only for the SH 3DSP series The following items must be specified Selecting each item turns the setting on W3LOAD bit W3LOCK bit W2LOAD bit W2LOCK bit Way 3 load bit Way 3 lock bit Way 2 load bit Way 2 lock bit Clicking the OK button stores the modified values in the memory Clicking the Cancel button closes the dialog box without storing the modified values Rev 3 0 09 00 page 111 of 276 HITACHI 5 34 QACRO0O and QACRI Dialog Boxes Area Bit4 2 00000000 Help i E Cancel Figure 5 55 QACRO Dialog Box These dialog boxes specify the values of the queue address control registers 0 and 1
258. xample trying to write to a read only memory such an illegal access in the user program can be easily detected 3 2 Endian In the SH 3 SH 3E SH 3DSP SH 4 series SH DSP SH7065 and SH DSP with Cache little endian as well as big endian can be specified as the data allocation format in the memory a user program created in the little endian format can also be simulated and debugged Use Endian in the System Configuration dialog box to specify the endian The specified endian is valid for all accesses to external memory and in the SH 3DSP it is also valid for accesses to the X or Y memory word or longword data is written to or read from the memory in the specified byte order Note The specified endian is applied to all accesses to external memory in common The actual SH DSP with Cache and SH DSP SH7065 have the function for specifying endian in memory area units but the simulator debugger does not support this function 3 3 Pipeline Reset Processing The simulator debugger which simulates the pipeline execution resets the pipeline when e The program counter PC is modified after the instruction simulation stops and before it restarts e The Run command to which the execution start address has been specified is executed e Initialization is performed or a program is loaded Rev 3 0 09 00 page 10 of 276 HITACHI e Memory data being currently fetched and decoded is rewritten When the pipeline is reset data alre
259. xception cause If an exception is detected when the BL bit in the SR is 1 reset vector address H A0000000 is set in the PC regardless of the exception cause 7 Starts instruction execution from the address set in the PC e When the Stop is selected stop mode Executes steps to 6 above then stops 3 10 Control Registers For the SH 3 SH 3E SH 3DSP and SH 4 series the simulator debugger supports the memory mapped control registers that are used for exception processing MMU control and cache control In addition for the SH 4 series the simulator debugger also supports the control registers that are used for BSC and DMAC control For the SH DSP with Cache the simulator debugger only supports the CCR register that is used for cache control Therefore a user program using exception processing MMU control cache control BSC control and DMAC control can be simulated and debugged The registers supported by the simulator debugger are listed below MMU PTEH Page table entry high register PTEL Page table entry low register TTB Translation table base register TEA TLB exception address register MMUCR MMU control register Exception processing TRA TRAPA exception register EXPEVT Exception event register INTEVT Interrupt event register Cache CCR Cache control register CCR2 Cache control register 2 QACRO and QACR1 Queue address control registers 0 and 1 Rev 3 0 09 00 page 20 of 276 HITACHI BSC and
260. y windows or change the default font that is used when a new window is opened To change the display font choose the Setup gt Customize gt Font menu option This will launch the Font dialog box Font Font Font Style Regular Courier New Fixedsys T MS LineDraw Bold Italic Terminal Sample Use as Default Font AaBbYyzz Figure 15 8 Font Dialog Box The dialog box is based on the standard Windows font selection dialog box except that only fixed width fonts are listed in the Font list box By pressing the Use as Default Font button the font to be used when a new window is opened can be specified 15 6 Customizing the File Filters You can customize the file filters displayed in the Open dialog box To change the filters choose the Setup gt Customize gt File Filter menu option This will launch the Customize File Filter dialog box Rev 3 0 09 00 page 254 of 276 HITACHI Customize File Filter Ea File TA Type 5 Record Add Filter Edit R mot a20 a37 Delete Figure 15 9 Customize File Filter Dialog Box Note Changes are made immediately when using this dialog box There is no option to cancel changes made gt To edit an existing filter 1 Select the file group from the File drop list 2 Select the file type name from the Type drop list 3 Click the Edit button to open the Edit Filter dialog box The dialog title will display the file group t
261. ycles Cache miss the number of cache misses SH 4 Series Cycle the number of execution cycles ICache miss the number of instruction cache misses OCache miss the number of operand cache misses The number of execution cycles and cache misses are calculated by subtracting the total execution cycles or cache misses at a specific function call instruction execution from the total execution cycles or cache misses at a return instruction execution of a specific function Note Displayed stack size does not represent the actual size Use it as a reference value when the function is called If there is no stack information file sni extension output from the optimizing linkage editor the stack size is not displayed For details of the stack information file refer to the manual of the optimizing linkage editor Double clicking a function in the Function column expands or reduces the tree structure display The expansion or reduction is also provided by the or key Double clicking the Address Rev 3 0 09 00 page 165 of 276 HITACHI column displays the source program or disassembled memory contents corresponding to the specific address Right clicking on the mouse within the window displays a popup menu Supported menu options are described in the following sections 5 70 1 View Source Displays the source program or disassembled memory contents for the address in the selected line 5 70 2 View Profile List Displa
262. ys the Profile List window 5 70 3 View Profile Chart Displays the Profile Chart window focused on the function in the specified line 5 70 4 Enable Profiler Toggles acquisition profile data When profile data acquisition is active a check mark is shown to the left of the menu text Profile data and performance analysis data cannot be acquired at a time If the profile data acquisition is going to be enabled when the performance analysis data acquisition is active when the Enable Analysis in the Performance Analysis window is checked a warning message box is displayed Performance Analysis is enabled Profiling and Performance Analysis use the same resources so cannot be used at the same time If you continue and enable Profiling Performance Analysis will be disabled This will delete your current Performance Analysis data Figure 5 99 Warning Message Box Showing Profiler and Analysis Cannot Be Set at a Time When OK is clicked the performance analysis data acquisition is disabled and the profile data acquisition is enabled Rev 3 0 09 00 page 166 of 276 HITACHI 5 70 5 Find Displays the Find Text dialog box to find a character string in the Function column Search is started by inputting a character string to be found in the edit box and clicking Find Next or pressing ENTER 5 70 6 Find Data Displays the Find Data dialog box When the cursor is in the Function column this menu option is displayed
Download Pdf Manuals
Related Search
Related Contents
"取扱説明書" Guía del USUARIO ドキュメント一覧 to the Fire Tiger Tooth Blade Safety Instruction Manual. 点検整備のすすめ istruzioni di installazione, funzionamento e manutenzione per l`uso Brodit ProClip 854985 Infineon DDR2 4GB 667MHz CL5 Manuel d`utilisation Virtual Glass Copyright © All rights reserved.
Failed to retrieve file