| |
Datasheet Home \ Datasheet Details
Download
PDF Abstract Text:
Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.
Renesas Technology Corp. Customer Support Dept. April 1, 2003
To all our customers
Regarding the change of names mentioned in the document, such as Hitachi Electric and Hitachi XX, to Renesas Technology Corp.
The semiconductor operations of Mitsubishi Electric and Hitachi were transferred to Renesas Technology Corporation on April 1st 2003. These operations include microcomputer, logic, analog and discrete devices, and memory chips other than DRAMs (flash memory, SRAMs etc.) Accordingly, although Hitachi, Hitachi, Ltd., Hitachi Semiconductors, and other Hitachi brand names are mentioned in the document, these names have in fact all been changed to Renesas Technology Corp. Thank you for your understanding. Except for our corporate trademark, logo and corporate statement, no changes whatsoever have been made to the contents of the document, and these changes do not constitute any alteration to the contents of the document itself. Renesas Technology Home Page: http://www.renesas.com
Renesas Technology Corp. Customer Support Dept. April 1, 2003
Hitachi Microcomputer Development Environment System
AE-4X Series E6000 Emulator
ADE-702-314 Rev. 1.0 03 / 28 / 02 Hitachi, Ltd. HS0AE4XEPI61HE
Cautions
IMPORTANT INFORMATION
READ FIRST
LIMITED WARRANTY
DISCLAIMER
HITACHI MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, ORAL OR WRITTEN, EXCEPT AS PROVIDED HEREIN, INCLUDING WITHOUT LIMITATION THEREOF, WARRANTIES AS TO MARKETABILITY, MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE OR USE, OR AGAINST INFRINGEMENT OF ANY PATENT. IN NO EVENT SHALL HITACHI BE LIABLE FOR ANY DIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY NATURE, OR LOSSES OR EXPENSES RESULTING FROM ANY DEFECTIVE E6000 EMULATOR, THE USE OF ANY E6000 EMULATOR, OR ITS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. EXCEPT AS EXPRESSLY STATED OTHERWISE IN THIS WARRANTY, THIS E6000 EMULATOR IS SOLD "AS IS ", AND YOU MUST ASSUME ALL RISK FOR THE USE AND RESULTS OBTAINED FROM THE E6000 EMULATOR.
SAFETY PAGE
READ FIRST
DEFINITION OF SIGNAL WORDS
This is the safety alert symbol. It is used to alert you to potential personal injury hazards. Obey all safety messages that follow this symbol to avoid possible injury or death.
DANGER
DANGER indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury. WARNING indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury. CAUTION indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury. CAUTION used without the safety alert symbol indicates a potentially hazardous situation which, if not avoided, may result in property damage.
WARNING
CAUTION CAUTION
NOTE emphasizes essential information.
WARNING
Observe the precautions listed below. Failure to do so will result in a FIRE HAZARD and will damage the user system and the emulator product or will result in PERSONAL INJURY. The USER PROGRAM will be LOST. 1. Do not repair or remodel the emulator product by yourself for electric shock prevention and quality assurance. 2. Always switch OFF the E6000 emulator and user system before connecting or disconnecting any CABLES or PARTS. 3. Before inserting the user system interface cable, make sure that front and back sides are correctly aligned to the user system. 4. Supply power according to the power specifications and do not apply an incorrect power voltage. Use only the provided power cable.
Preface
About This Manual
Style computer Used for Text that you type in, or that appears on the screen. A label representing the actual value you should type as part of a command. Names of menus, menu commands, buttons, dialogue boxes, and windows that appear on the screen.
parameter
Trademarks Microsoft , Windows , Windows 98, Windows Me, Windows NT 4.0, Windows 2000, and ® MS-DOS are registered trademarks of Microsoft Corporation in the United States and / or other countries. IBM is a registered trademark of International Business Machines Corporation.
Contents
About This Manual...............................................ii Section 1 Introduction ............................................1
1.1 Debugging Features ..................................................... 1 1.1.1 Breakpoints ..................................................... 1 1.1.2 Trace .......................................................... 1 1.1.3 Execution Time Measurements...................................... 2 1.1.4 Performance Analysis ............................................. 2 1.1.5 Bus Monitoring .................................................. 2 1.1.6 Coverage ....................................................... 2 Complex Event System (CES) ............................................. 2 1.2.1 Event Channels .................................................. 3 1.2.2 Range Channels .................................................. 3 1.2.3 Breaks ......................................................... 4 1.2.4 Timing......................................................... 4 Hardware Features ...................................................... 4 1.3.1 Memory........................................................ 4 1.3.2 Clocks ......................................................... 5 1.3.3 Probes ......................................................... 5 1.3.4 Environment Conditions ........................................... 6 1.3.5 Emulator External Dimensions and Mass .............................. 6
Section 2 Setting Up .............................................7
2.1 2.2 Package Contents ....................................................... 7 ® Setting Up the PC Interface Board on Windows 98 ............................ 8 2.2.1 Setting Up the PC Interface Board.................................... 8 2.2.2 Modifying the CONFIG.SYS File .................................... 11 2.2.3 Modifying the SYSTEM.INI File .................................... 12 ® Setting Up the PC Interface Board on Windows NT 4.0......................... 13 Installing the HDI ....................................................... 14 Troubleshooting ........................................................ 15 2.5.1 Faulty Connection................................................ 15 2.5.2 Communication Problems.......................................... 16
Section 3 Hardware ..............................................17
3.1 Connecting to the User System ............................................. 17
3.1.1 Connecting the User System Interface Cable Body to the E6000 Emulator .... 18 3.1.2 User System Interface Cable Head ................................... 19 3.1.3 Connecting the Use System Interface Cable Head........................ 20 3.1.4 Antenna at the User System Interface Cable Head ....................... 21 Power Supply .......................................................... 22 3.2.1 AC Adapter ..................................................... 22 3.2.2 Polarity of Power Supply Plug....................................... 22 3.2.3 Power Supply Monitor Circuit....................................... 23 Hardware Interface...................................................... 23 3.3.1 Signal Protection on the E6000 Emulator .............................. 23 3.3.2 User System Interface Circuits....................................... 23 3.3.3 External Probes / Trigger Output 1 .................................... 25 3.3.4 External Probe 2 (EXT2) / Trigger Output .............................. 26 3.3.5 Power Supply Circuit .............................................. 27 Jumper Pin Settings...................................................... 28 Differences between MCU and E6000 Emulator............................... 29 3.5.1 Registers........................................................ 29 3.5.2 EEPROM ....................................................... 29 3.5.3 WDT .......................................................... 30 3.5.4 SYSCR Register.................................................. 30 3.5.5 Security ........................................................ 31 3.5.6 Contactless Operation ............................................. 31
Section 4 Tutorial................................................32
4.1 4.2 4.3 Introduction............................................................ 32 Starting HDI........................................................... 33 4.2.1 Selecting the Target Platform ....................................... 34 Setting up the E6000 Emulator ............................................. 36 4.3.1 Configuring the Platform ........................................... 36 4.3.2 Mapping the Memory ............................................. 38 Downloading the Tutorial Program ......................................... 41 4.4.1 Loading the Object File ............................................ 41 4.4.2 Displaying the Program Listing ...................................... 42 Using Breakpoints....................................................... 44 4.5.1 Setting a PC Break ................................................ 44 4.5.2 Executing the Program............................................. 46 4.5.3 Examining Registers .............................................. 48 4.5.4 Reviewing the Breakpoints ......................................... 49 Examining Memory and Variables .......................................... 50 4.6.1 Viewing Memory ................................................. 50
Section 5 Diagnostic Test Procedure.................................81
5.1 5.2 System Set-Up for Test Program Execution ................................... 81 Diagnostic Test Procedure Using Test Program ................................ 82
Appendix A Command Line Functions...............................89
Figures
Figure 4.18 Figure 4.19 Figure 4.20 Figure 4.21 Figure 4.22 Figure 4.23 Figure 4.24 Figure 4.25 Figure 4.26 Figure 4.27 Figure 4.28 Figure 4.29 Figure 4.30 Figure 4.31 Executed) Figure 4.32 Figure 4.33 Figure 4.34 Figure 4.35 Figure 4.36 Figure 4.37 Figure 4.38 Figure 4.39 Figure 4.40 Figure 4.41 Figure 4.42 Figure 4.43 Figure 4.44 Figure 4.45 Figure 4.46 Figure 4.47
Open Memory Window Dialog Box ................................... 50 Memory Window (Byte) ............................................ 51 Watch Window (After Adding Variables)............................... 52 Watch Window (Symbol Expansion) ................................... 53 Add Watch Dialog Box ............................................. 53 Watch Window (Adding Variables) .................................... 54 Program Window after Executing the Reset Go Command .................. 55 Program Window after Executing the Step In Command (1)................. 56 Program Window after Executing the Step Out Command.................. 57 Program Window after Executing the Step In Command (2)................. 58 Program Window after Executing the Step Over Command................. 59 Locals Window.................................................... 60 Locals Window (After Contents of Variable min are Changed) .............. 61 Locals Window (Elements of Array Variable a after Function sort has been ................................................................ 62 Breakpoint / Event Properties Dialog Box ................................ 63 Breakpoints Window ............................................... 64 Stopping the Program by an Event Breakpoint ........................... 65 Trace Window .................................................... 66 General Panel in Trace Filter Dialog Box ............................... 67 Bus / Area Panel in Trace Filter Dialog Box ............................. 68 Trace Window (When Trace Filter is Specified).......................... 69 Selecting the Conditions for Measurement............................... 71 Displaying the Measurement Conditions................................ 72 Displaying the Analysis Results (1) .................................... 73 Displaying the Analysis Results (2) .................................... 74 Open Bus Monitor Menu Dialog Box .................................. 74 Set Address For RAM Monitor Dialog Box.............................. 75 RAM Monitor Display .............................................. 76 Stack Trace Window ............................................... 77 Coverage Main Window............................................. 78
Tables
Table 1.1 Table 1.2 Table 2.1 Table 3.1 Table 3.2 Table 3.3 Table 3.4 Table 3.5 Table 3.6 Table 4.1 Table 4.2 Table 4.3 Table 4.4 Table A.1 Memory Types...................................................... 5 Environment Conditions .............................................. 6 Address Map of PC Interface Board and Memory Switch Setting .............. 9 Initial Value Differences between MCU and E6000 Emulator................. 29 EEPROM Differences between MCU and E6000 Emulator ................... 29 WDT Differences between MCU and E6000 Emulator ...................... 30 SYSCR Register Differences between MCU and E6000 Emulator.............. 30 Security Differences between MCU and E6000 Emulator .................... 31 Differences in Contactless Operation .................................... 31 Configuration Options ................................................ 38 Memory Types...................................................... 39 Access Types ....................................................... 39 Step Commands ..................................................... 54 Command List...................................................... 89
Section 1 Introduction
The E6000 emulator is an advanced realtime in-circuit emulator which allows programs to be developed and debugged for the AE-4 series microcomputers (herein after called the MCU). The E6000 emulator can be used either without a user system, for developing and debugging software, or with a user system via a user system interface cable, for debugging user hardware. The E6000 emulator works with the Hitachi debugging interface (HDI), a Microsoft Windows based interface program. This provides a powerful range of commands for controlling the emulator hardware, with a choice of either fully interactive or automated debugging.
Debugging Features
Breakpoints
The E6000 emulator provides a comprehensive range of alternative types of breakpoints, to give you the maximum flexibility in debugging applications and user system hardware. Hardware Break Conditions: Up to 12 break conditions can be defined using the event and range channels in the complex event system (CES). For more information about the hardware break conditions, see section 1.2, Complex Event System (CES). Program Breakpoints (PC breakpoints): Up to 256 program breakpoints can be defined. These program breakpoints are set by replacing the user instruction with a BREAK instruction. 1.1.2 Trace
The E6000 emulator incorporates a powerful realtime trace facility which allows you to examine MCU activity in detail. The realtime trace buffer holds up to 32768 bus cycles, and it is continuously updated during execution. The buffer is configured as a rolling buffer, which can be stopped during execution and read back by the host computer without halting emulation. The data stored in the trace buffer is displayed in both source program and assembly languages for ease of debugging. However, if trace filtering is used, only assembly language can be displayed. The buffer can be set up to store all bus cycles or just selected cycles. This is called trace acquisition and uses the complex event system (CES) to select the parts of the program you are interested in see section 1.2, Complex Event System (CES), for more information.
It is also possible to store all bus cycles and then just look at selected cycles. This is called trace filtering. 1.1.3 Execution Time Measurements
The E6000 emulator allows you to measure the total execution time, or to measure the time of execution between specified events in the complex event system. You can set the resolution of the timer to any of the following values: 20 ns, 125 ns, 250 ns, 500 ns, 1 µs, 2 µs, 4 µs, 8 µs, or 16 µs. At 20 ns, the maximum time that can be measured is approximately six hours, and at 16 µs the maximum time is about 200 days. 1.1.4 Performance Analysis
The E6000 emulator provides functions for measuring the performance of a program. The performance of the specified program range can be displayed either as a histogram or in percentage form. A timer resolution of 20 ns, 40 ns, or 160 ns can be selected. In addition, the execution count of the specified program range can be measured (1 to 65535). 1.1.5 Bus Monitoring
The E6000 emulator incorporates a bus monitoring function that monitors and displays the contents of the accessed area in HDI windows without stopping the program execution. Up to eight blocks of 256 bytes can be monitored. In addition, the E6000 emulator can output trigger signals to external probe 2 (EXT2) when specified addresses (four points max.) are accessed. 1.1.6 Coverage
The E6000 emulator provides a coverage function. The coverage function executes programs and obtains and stores histories of data access. This function allows you to know what part of your program has been or has not been tested.
Complex Event System (CES)
In most practical debugging applications, the program or hardware errors that you are trying to debug occur under a certain restricted set of circumstances. For example, a hardware error may
only occur after a specific area of memory has been accessed. Tracking down such problems using simple PC breakpoints can be very time consuming. The E6000 emulator provides a very sophisticated system for giving a precise description of the conditions you want to examine, called the complex event system. This allows you to define events which depend on the state of a specified combination of the MCU signals. The complex event system provides a unified way of controlling the trace, break, and timing functions of the E6000 emulator. 1.2.1 Event Channels
The event channels allow you to detect when a specified event has occurred. The event can be defined as a combination of one or more of the following: · Address or address range · Address outside range · Data, with an optional mask · Read or Write or either · MCU access type (e.g., instruction prefetch) · MCU access area (e.g., on-chip ROM and on-chip RAM) · A signal state on one or more of the four external probes · A certain number of times that the event must be triggered · Delay cycles after an event Up to eight events can be combined into a sequence, in which each event is either activated or deactivated by the occurrence of the previous event in the sequence. For example, you can cause a break if an I / O register is written to after a specified area of RAM has been accessed. 1.2.2 Range Channels
The range channels can be set up to be triggered on a combination of one or more of the following: · Address or address range · Data, with an optional mask · Read or Write or either · MCU access type (e.g., instruction prefetch) · MCU access area (e.g., on-chip ROM and on-chip RAM)
· A signal state on one or more of the four external probes · Delay cycles after an event The event detection system can be used to control the break and trace functions of the E6000 emulator. 1.2.3 Breaks
You use breaks to interrupt program execution when a specified event, or sequence of events, is activated. For example, you can set up a break to halt execution when the program reads from one address, and then writes to another address. The break can also optionally be delayed by up to 65535 bus cycles. 1.2.4 Timing
You can set up two events and then measure the execution time of the program between the activation of the first event and second event.
Hardware Features
Memory
Table 1.1 Memory Types
Memory Type On-chip User Emulator Description Accesses the MCU on-chip memory. Accesses the memory on the user system. Accesses the emulation memory.
Note) "User" can not be set on this emulator. The contents of a specified block of memory can be displayed using the Memory.. function. The contents of memory can be modified at any time, even during program execution, and the results are immediately reflected in all other appropriate windows. 1.3.2 Clocks
The emulation clock can be specified as any of the following frequencies: 1.7856 MHz, 2.4576 MHz, 3.5712 MHz, 4.9152 MHz, 6.78 MHz, 7.1424 MHz, 9.8304 MHz, or target clock. The E6000 emulator works within the voltage and frequency ranges described in each MCU hardware manual. 1.3.3 Probes
External probe 1 (EXT1) and external probe 2 (EXT2) can be connected to the E6000 emulator to make use of any signal for braking or tracing. The probe 1 signal can be used as an event detection system condition, depending on whether the level is high or low. Probe 2 outputs high-level signals for use in triggering oscilloscopes, etc., when the condition for setting (1 to 4) the bus monitor function is satisfied.
Environment Conditions
Observe the conditions listed in table 1.2 when using HS0AE4EPI61H. Table 1.2 Environment Conditions
Emulator External Dimensions and Mass
Dimensions: 219 x 170 x 54 mm Mass: 900 g
Section 2 Setting Up
Package Contents
Before proceeding you should check that you have all the items listed above, and contact your supplier if any are missing.
Setting Up the PC Interface Board on Windows® 98
Setting Up the PC Interface Board
· Start up Windows 98. · Click the My Computer icon with the right mouse button and select Properties from the popup menu. The System Properties dialog box will be displayed. · Double-click the Computer icon in the Device Manager panel to open the Computer Properties dialog box. · Click the Memory in the View Resources panel to display the memory resources.
Figure 2.1 Computer Properties Dialog Box (Before Setting)
Define the memory area so that Windows 98 does not use the area as follows: · Click Memory in the Reserve Resources panel and click Add.
The Edit Resource Setting dialog box will be displayed.
Figure 2.2 Edit Resource Setting Dialog Box · Enter the memory area addresses in Start value and End value. · Shut down the host computer (do not restart it) and turn off the power switch. · Using a small screwdriver, rotate the switch in the rear panel of the PC interface board so that the arrow points to the number corresponding to the memory area you have selected. · Remove the cover from the host computer and install the PC interface board in a spare ISA slot. · Replace the host computer cover. · Connect the PC interface cable between the PC interface board and the PC IF connector on the E6000 emulator. Press each plug firmly home until it clicks into position. · Switch on the host computer. · Open the Computer Properties dialog box and check that the memory area you have selected is listed as System Reserved.
Figure 2.3 Computer Properties Dialog Box (After Setting) 2.2.2 Modifying the CONFIG.SYS File
Setting Up the PC Interface Board on Windows NT® 4.0
The PC interface board uses the ISA bus slot, and therefore the host computer must have a spare ISA bus slot. This section describes the general procedure for installing the PC interface board in the host computer. For details, refer to the manual of your host computer. Starting Windows NT : · Execute Start / Programs / Administrative Tools (Common) / WindowsNT Diagnostics. · Click the Memory button in the Resource tab and, in the following form, make a note of the upper memory areas that have already been used. # 0 1 2 3 · Shut down Windows NT .
Start
Starting the Host Computer in Setup Mode: For details on the setup mode, refer to the manual of your host computer. · Check which upper memory areas have already been used. # 0 1 2 3 Start End # 4 5 6 7 Start End # 8 9 A B
Start
The memory areas being used should be the same as those checked for Windows NT above. · Define the memory area for the PC interface board. Select one of the memory areas that correspond to the following PC interface board switch settings, and no other devices can access the selected memory area.
If the Intel P&P BIOS disk is supplied with the host computer, define the memory area as follows: · Start the host computer with the Intel P&P BIOS disk. · Check the upper memory areas that have already been used, with View / System Resources. · Add Unlisted Card with Configure / Add Card / Others.. · Click No in the dialog box displayed because there is no .CFG file. · Move to the Memory hex list box in the Configure Unlisted Card dialog box. · Click the Add Memory.. button to display the Specify Memory dialog box. · Enter a memory area range that is not used by any other device and that corresponds to one of the PC interface board switch settings. · Save the file. · Exit the current setup program. · Shut down the host computer (do not restart it) and turn off the power switch. · Using a small screwdriver, rotate the switch in the rear panel of the PC interface board so that the arrow points to the number corresponding to the memory area you have selected. · Remove the cover from the host computer and install the PC interface board in a spare ISA slot. · Replace the host computer cover. · Connect the PC interface cable between the PC interface board and the PC IF connector on the E6000 emulator. Press each plug firmly home until it clicks into position. · Switch on the host computer.
Installing the HDI
To install the HDI, refer to Hitachi Debugging Interface for E6000 Setup Guide.
Troubleshooting
Faulty Connection
If the following message box appears during initialization, the PC interface board was not able to detect the E6000 emulator.
Figure 2.4 Faulty Connection Message This indicates: · Power supply not connected to the E6000 emulator, or the emulator not switched on. Check the power LED on the E6000 emulator. · The PC interface cable is not correctly connected between the PC interface board and the E6000 emulator.
Communication Problems
The following message box indicates that the HDI was not able to set up the E6000 emulator correctly:
Figure 2.5 Communication Problem Message This indicates: · The memory area reserved in the CONFIG.SYS file does not match the interface switch setting on the rear panel of the PC interface board. · Selected area of memory is in use by another application.
Section 3 Hardware
This section explains how to connect the E6000 emulator to the user system.
Connecting to the User System
This E6000 emulator package includes a user system interface cable dedicated for use with the IC card reader. The head of the user system interface cable has the same shape as the IC card, and therefore, the E6000 emulator can be easily connected to the IC card reader on the user system by inserting the cable head into the IC card reader. To connect the E6000 emulator to the user system, proceed as follows: · After checking that the E6000 emulator power is off, plug the user system interface cable body into the E6000 emulator. · Insert the user system interface cable head into the IC card reader on the user system. · Turn on and initiate the E6000 emulator.
Figure 3.1 gives details of the connectors provided on the E6000 emulator.
Figure 3.1 E6000 Emulator Connectors
Connecting the User System Interface Cable Body to the E6000 Emulator
Plug the user system interface cable body into the E6000 emulator, taking care to insert it straight, and push it firmly into place.
Figure 3.2 External View of the E6000 Emulator
User System Interface Cable Head
The following figure shows an overview of the contactless user system interface cable.
Figure 3.3 External View of the Contact less User System Interface Cable The following explains each section. · Through hole CAP1 for bypass capacitor between contact Vcc and GND
Solder a 0.1-uF capacitor to prevent overshooting at the rising edge of Vcc due to your contact ICcard reader. · Probe pin for measuring contact signals
Use the probe pin to measure Vcc, GND, CLK, RES, and I / O-1 signals with an oscilloscope at contact operation. · Through hole CAP2 for antenna tuning capacitor
The through hole of an adjustment capacitor is used when contactless operation prevents the emulator from communicating with a contactless IC-card reader.
Antenna pattern SDIP-64 IC socket
This antenna pattern is for the contact less operation based on ISO14443. This IC socket is used to check working samples. The operation of working samples of SDIP-64type chips can be checked. This socket is available for the MCU of contact type and Dual Way. · Contact pad This contact pad is for contact operation based on ISO7816. 3.1.3 Connecting the Use System Interface Cable Head
Antenna at the User System Interface Cable Head
Figures 3.4 and 3.5 show the shape and resonance characteristics of an antenna for ISO14443 contact operation on the user system interface cable head.
Figure 3.4 External View of the User System Interface Cable Head
Figure 3.5 Resonance Characteristics of the User System Interface Cable Head (Horizontal axis: frequency 1 MHz / Div, Vertical axis: attenuation factor: relative value (log scale) dB / Div)
Power Supply
AC Adapter
The AC adapter supplied with the E6000 emulator must be used at all times. 3.2.2 Polarity of Power Supply Plug
Figure 3.6 shows the polarity of the power-supply plug.
Figure 3.6 Polarity of Power Supply Plug
Power Supply Monitor Circuit
The E6000 emulator incorporates a power supply monitor circuit From AC adapter that only lights the red LED when a voltage higher than 4.75 V is supplied. If this LED does not light, you should check the E6000 emulator voltage level. An input voltage less than 4.75 V could indicate that insufficient current is being supplied to the E6000 emulator. Note: Use the provided AC adapter for the E6000 emulator.
Hardware Interface
For the following user system interface signals, control circuits are connected between the user system and the MCU in the E6000 emulator: · RESET · CLK · I / O-1 / IRQ and I / O-2 / IRQ · La and Lb 3.3.1 Signal Protection on the E6000 Emulator
All user system interface signals are over / reverse voltage protected by use of diode arrays and have pull-up resistors. The VCC pin is monitored by the E6000 emulator to detect a powered user system hardware presence. 3.3.2 User System Interface Circuits
The interface circuit between the MCU in the E6000 emulator and the user system has a signal delay of about 3 ns due to the user system interface cable and it includes pull-up resistors. Therefore, high-impedance signals will be pulled up to the high level. When connecting the E6000 emulator to a user system, adjust the user system hardware to compensate for propagation delays.
The following diagrams show the equivalent circuits of the interface signals: Vcc:
Figure 3.7 User System Interface Signal Circuit CLK:
Figure 3.8 User System Interface Circuit for CLK RESET:
Figure 3.9 User System Interface Circuit for RESET
Figure 3.10 User System Interface Circuit for I / O-1 / IRQ and I / O-2 / IRQ La and Lb:
RF IC 12V Zener diode User system interface cable
Figure 3.11 User System Interface Circuit for La and Lb
External Probes / Trigger Output 1
An 8-pin connector, marked EXT1 (at the lower right of the user system interface cable connector), on the E6000 emulator case accommodates four external probe inputs and two trigger outputs. The pin assignment of this connector is shown in figure 3.12.
Figure 3.12 Probe1 and Trigger Connector
The external probe interface circuit is shown in figure 3.13.
Figure 3.13 External Probe1 Interface Circuit The trigger output is a low-level signal and is controlled by event channel 8. The trigger output is available as either T5V (within the range from 2.5 V to 5 V does not depend on the user Vcc level) or TUvcc (the user system supply voltage level).
External Probe 2 (EXT2) / Trigger Output
A 6-pin connector, marked EXT2 (at the lower right of the user system interface cable connector), on the E6000 emulator case accommodates four trigger outputs. The pin assignment of this connector is shown in figure 3.14.
Figure 3.14 Connector for External Probe 2 The trigger output is a high-level signal and is output during read or write cycles when a trigger which condition (1 to 4) of the bus monitor function is satisfied. The trigger output is available as Vcc (user system power voltage level).
Power Supply Circuit
CAUTION
When the user system is connected to the E6000 emulator, start up the E6000 emulator and then turn on / off the user system. Failure to do so will result in a FIRE HAZARD and will damage the emulator product and the host computer.
The MCU in the E6000 emulator always operates at 5 V E6000 emulator power supply. This means that no power is taken from the user system. The circuit interfacing the MCU and the user system includes a voltage level shifter to support operation at a low voltage. Therefore, note that even if the user system operates at a voltage lower than 3 V, the MCU in the E6000 emulator can operate at the maximum operating frequency 5MHz (Input CLK frequency 10MHz). You can set a user low VCC threshold in the range 5 V - 0 V by using the E6000 emulator configuration dialog box. If the user VCC drops below this threshold, the User System Voltage in the System Status window will display Down and Reset is input, otherwise OK is displayed. When user system interface cable is not connected, this function does not work.
5V User Vcc level User threshold
User Vcc threshold
OK Down
Figure 3.15 Relationship of Vcc between the User System and E6000 Emulator
Jumper Pin Settings
Do not change the settings of jumper pin JP1 if removing the cover of the emulator. Keep pins 1 and 2 closed.
Differences between MCU and E6000 Emulator
Registers
When the E6000 emulator is initialized or the system is reset, there are some differences in the initial values in some of the general registers between the MCU and E6000 emulator as shown in table 3.1. Table 3.1 Initial Value Differences between MCU and E6000 Emulator
Please refer to section 3.3.2, User System Interface Circuits, for details of the protection circuit used on the I / O ports of the E6000 emulator. 3.5.2 EEPROM
Table 3.2 EEPROM Differences between MCU and E6000 Emulator
Item Programming time Overwrite time Erase time Setting the registers MCU 4 ms (max) in normal mode / 2 ms (max) in fast mode 2 ms (max) in normal mode / 1 ms (max) in fast mode 2 ms (max) in normal mode / 1 ms (max) in fast mode MCU limits the setting as follows. Source address(ER5):RAM Destination address(ER6):EEPROM Byte count(R4L):up to page size If the setting is wrong, the result of EEPMOV is not guaranteed. E6000 Emulator Always MCU max time. Always MCU max time. Always MCU max time. If the setting wrong, the result of EEPMOV is not guaranteed and the result is different from the one of MCU.
Table 3.3 WDT Differences between MCU and E6000 Emulator
Item EWE interrupt MCU The interrupt processing starts after instruction 1) is executed, in the following example: 1) MOV.B R0L, @ECR 2) EEPMOV.B UDF interrupt No UDF interrupt processing is performed between the RTE instruction at the end of the EWE interrupt processing and the instruction following the RTE instruction. E6000 Emulator If a break is specified or single-step execution is performed for the example instructions on the left, the EWE interrupt timing in the E6000 emulator differs from that in the MCU. If a break is specified or single-step execution is performed for the RTE instruction described on the left, a UDF interrupt will occur.
SYSCR Register
Table 3.4 SYSCR Register Differences between MCU and E6000 Emulator
Item CRES bit MCU Set to 1 at cold reset. E6000 Emulator The CRES bit is always set to 1 when the user system interface cable is not connected. When the user system interface cable is connected, high or low of the CRES bit is determined by the User Vcc Threshold power supply level of the user power supply voltage monitoring function of the emulator.
Security
Table 3.5 Security Differences between MCU and E6000 Emulator
Item LVD MCU The MCU is reset if low voltage is detected. E6000 Emulator The emulator has a circuit for detecting drops in Vcc, but true LVD is not supported (the emulator only provides pseudo-LVD) Does not support high-voltage detecting function. Supports low-frequency CLK detecting function. Does not support high-frequency CLK detecting function.
HVD LFD HFD
The MCU is reset if a high voltage is detected. The MCU is reset if a low frequency CLK is detected. The MCU is reset if a high frequency CLK is detected.
Contactless Operation
Table 3.6 Differences in Contactless Operation
Item Characteristics of antenna input pin Switching contact / contactless (CCLMD bit) Residual multiplication coprocessor operation register (CPRMD bit) Coprocessor operation in contactless mode MCU Refer the MCU hardware manual. The results of MCU selfjudgment are reflected. The results of MCU selfjudgment are reflected. E6000 Emulator Different from those of MCU Set with the Communication mode item in the Configuration Properties window. Set with the Active Coprocessor item in the Configuration Properties window.
Section 4 Tutorial
Introduction
The tutorial is based on a simple C program. Before reading this chapter: · Set up the E6000 emulator from the HDI software. See section 2, Setting Up. You do not need to connect the E6000 emulator to a user system to use this tutorial. · Make sure you are familiar with the architecture and instruction set of the MCU. For more information, refer to the Hardware Manual and Programming Manual for the target MCU. The tutorial program arranges ten random data in ascending / descending order. The source program (Sort.c), and the object file in the Sysrof format (Tutorial.abs) are provided in the HDI installation disk.
Starting HDI
To start the HDI: · Select HDI for E6000 AE-4 from the Start menu.
Figure 4.1 HDI Start Menu
Selecting the Target Platform
The HDI has extended functions for supporting multiple target platforms, and if your system is set up for more than one platform you will first be prompted to choose the target platform.
Figure 4.2 Select Platform Dialog Box · For this tutorial select E6000 AE-4 Emulator and click OK to continue. Note that you can change the target platform at any time by choosing New Session.. from the File menu. When the emulator has been successfully set up, the Hitachi Debugging Interface window will be displayed, with the message Link up in the status bar.
Menu bar Tool bar Help button
Program window
Status bar
Setting up the E6000 Emulator
Before downloading a program to the E6000 emulator, you first need to set up the target MCU conditions. The following items need to be configured: · The device type · The device option · The clock source · Communications mode · The user signals · The memory map The following sections describe how to set up the E6000 emulator as appropriate for the tutorial program. 4.3.1 Configuring the Platform
To set up the target configuration: · Choose Configure Platform.. from the Setup menu to set up the conditions for the selected platform. · The following dialog box will be displayed:
Figure 4.4 Configuration Dialog Box
· Set up the options as shown in table 4.1. Table 4.1 Configuration Options
Option Device Clock Timer resolution User system voltage monitoring level (User LowVCC threshold) Driver Watchdog timer and user reset All other options Communication mode Break count Value (Depending on Evaluation Chip) AE460 3.5712 MHz 125 ns 4.00 V
E6000 ISA Driver Disabled Enabled Contact mode 65535
· Click OK to change the target MCU settings. 4.3.2 Mapping the Memory
After you have selected the device and mode in the Configuration Dialog Box, the HDI automatically maps the E6000 emulator memory for the device and mode you have selected. · To display the current memory mapping, choose Configure Map.. from the Memory menu, or click the Memory Map button in the toolbar.
The Memory Mapping dialog box shown in figure 4.5 is displayed.
Figure 4.5 Memory Mapping Dialog Box Table 4.2 lists the three memory types available in the E6000 emulator. Table 4.2 Memory Types
Memory Type On-chip User Emulator Description Accesses the MCU on-chip memory. Accesses the memory on the user system Accesses the emulation memory
Note) "User" can not be set on this emulator. Table 4.3 lists the three access types. Table 4.3 Access Types
Access Type Read-write Read-only Guarded Description RAM ROM No access allowed
For this tutorial, we can use the default mapping, but you can edit the mapping as follows: · To change the map setting, click the Edit button after selecting the target mapping line, or simply double-click that line. Here, double-click the On Chip Read-only in the Memory Mapping dialog box. The Edit Memory Mapping dialog box is displayed.
Figure 4.6 Edit Memory Mapping Dialog Box · Click OK to close the dialog box. · To display the device map information, select Status from the View menu or click the Status button in the toolbar to open the System Status window, and select the Memory sheet. The device map information is then displayed as follows:
Figure 4.7 System Status Window (Memory Sheet) Note: The memory map differs depending on the target MCU.
Downloading the Tutorial Program
After the E6000 emulator is set up, you can download the object program you want to debug. 4.4.1 Loading the Object File
First load the Sysrof-format object file, as follows: · Choose Load Program.. from the File menu, or click the Load Program button in the toolbar. The Load Program dialog box is then displayed.
· Click the Browse.. button, select the Tutorial.abs file in the Tutorial directory from the Open dialog box, and click the Open button. The Load Program dialog box is displayed. Click the Open button to start to download the file.
Figure 4.8 Open Dialog Box (Object File Selection) When a file has been loaded, the dialog box shown in figure 4.9 displays information about the memory areas that have been filled with the program code.
Figure 4.9 HDI Dialog Box · Click OK to continue. The program has been loaded into the on-chip ROM. 4.4.2 Displaying the Program Listing
The HDI allows you to debug a program at a source level.
· Choose Source.. from the View menu, or click the Program Source button in the toolbar.
You will be prompted for the C source file corresponding to the object file you have loaded.
Figure 4.10 Open Dialog Box (Source File Selection) · Select Tutorial.c and click Open to display the program window.
Figure 4.11 Source Program Window · If necessary, choose Font.. option from the Customize submenu on the Setup menu to choose a font and size suitable for your host computer. Initially the program window opens showing the beginning of the main program, but you can scroll through the program with the scroll bars to see other sections.
Using Breakpoints
The simplest debugging aid is the PC break, which lets you halt execution when a particular point in the program is reached. You can then examine the state of the MCU and memory at that point in the program. 4.5.1 Setting a PC Break
Figure 4.12 Setting a Breakpoint (PC Break) The word · Break will be displayed there to show that a PC break is set at that address. Although not performed in this tutorial, double-clicking repeatedly in the Break column can change the display in the cyclic order shown below to set the event for measuring the execution time between events (+Timer: start time measurement -Timer: stop time measurement), point-to-point trace (+Trace: start trace -Trace: temporarily stop trace), or trace stop (TrStop: stop trace). When -Trace is followed by +Trace, trace is resumed. However, when -Trace is followed by TrStop, trace will not resume even after +Trace appears. (Blank) Break +Timer -Timer +Trace -Trace TrStop (Blank) ..
Executing the Program
To run the program from the address pointed to by the reset vector: · Choose Reset Go from the Run menu, or click the Reset Go button in the toolbar.
The program will be executed up to the PC break you inserted, and the statement will be highlighted in the program window to show that the program has halted.
Examining Registers
While the program is halted you can refer to the contents of the MCU registers. These are displayed in the Registers window. · Choose Registers from the View menu, or click the CPU Registers button in the toolbar:
Reviewing the Breakpoints
You can see a list of all the breakpoints set in the program in the Breakpoints window. · Choose Breakpoints from the View menu, or click the Breakpoint button in the toolbar:
Figure 4.17 Breakpoints Window The Breakpoints window also allows you to enable or disable breakpoints, define new breakpoints, and delete breakpoints by pop-up menu.
Examining Memory and Variables
You can monitor the behavior of a program by examining the contents of an area of memory, or by displaying the values of variables used in the program. 4.6.1 Viewing Memory
You can view the contents of a block of memory in the Memory window. For example, to view the memory corresponding to the main in Byte: · Choose Memory.. from the View menu, or click the Memory button in the toolbar.
· Enter main in the Address field, and set Format to Byte.
Figure 4.18 Open Memory Window Dialog Box
· Clicking OK opens the Memory window showing the specified area of memory and enables to check the contents of the memory block.
Figure 4.19 Memory Window (Byte) 4.6.2 Watching Variables
As you execute a step of a program, it is useful to be able to look at the values of variables used in your program, to verify that they change in the way that you expected. For example, look at the long-type array variable a, declared at the beginning of the program, using the following procedure: · Click the left of array variable a and move the cursor to the position in the program window. · Click in the Program window with the right mouse button to display a pop-up menu, and choose Add Watch.
The Watch window will display the variable.
Figure 4.21 Watch Window (Symbol Expansion) A variable name can be specified to add a variable to the Watch window. · Click in the Watch window with the right mouse button to display a popup menu, and choose Add Watch.. · Enter variable name max and click the OK button.
Figure 4.22 Add Watch Dialog Box
The long-type variable max is added to the Watch window.
Figure 4.23 Watch Window (Adding Variables)
Stepping Through a Program
The E6000 emulator provides a range of options to perform step execution by executing an instruction or statement at a time. The alternative step commands listed in table 4.4 are provided. Table 4.4 Step Commands
Command Step in Step Over Step out Step.. Description Executes every statement, including statements within functions. Executes a function call in a single step. Exits a function and stops at the next statement of the calling program. Allows you to step repeatedly the specified number of times.
Single Stepping
Figure 4.24 Program Window after Executing the Reset Go Command · Choose Step In two times from the Run menu, or click on the Step In button two times in the toolbar, to step through the sort statement.
Figure 4.25 Program Window after Executing the Step In Command (1) Exit the function, and back to the next statement in the main program, by choosing Step Out from the Run menu, or clicking the Step Out button in the toolbar.
Figure 4.26 Program Window after Executing the Step Out Command
Choose Step In four times from the RUN menu, or click the Step In button four times to call the change function.
Figure 4.27 Program Window after Executing the Step In Command (2)
Stepping Over a Function
The Step Over command executes a function, without single stepping through the body of the function, and stops at the next statement in the main program. · Choose Step Over three times from the Run menu, or click the Step Over button three times in the toolbar.
Figure 4.28 Program Window after Executing the Step Over Command
Displaying Local Variables
For example, we will examine the local variables in the function sort. This function declares five local variables: a, j, i, min, and max. · Choose Locals from the View menu, or click the Locals button in the toolbar.
Figure 4.29 Locals Window The Locals window will show nothing when there are no local variables. · Choose Step In from the Run menu or click the Step button in the toolbar to perform step execution one time.
The contents of variable a, j, i, min and max are changed and their values are displayed.
Figure 4.30 Locals Window (After Contents of Variable min are Changed) · Double click the + symbol in front of array a in the Locals window to display the separate elements of array a. · Refer to the elements of array a before executing the sort function, and confirm that random data is sorted in descending order.
Figure 4.31 Locals Window (Elements of Array Variable a after Function sort has been Executed)
Using the Complex Event System
Now define an event, using the complex event system, to monitor a part of the program as follows: · Choose Breakpoints from the View menu to display the Breakpoints window, or click the Breakpoints button in the toolbar.
The Breakpoints window shows the new event you have defined.
Figure 4.33 Breakpoints Window · Choose Reset Go from the Run menu, or click the Reset Go button in the toolbar.
Using the Trace Buffer
The trace buffer allows you to look back over previous MCU cycles to see exactly what the MCU was doing prior to a specified event. 4.9.1 Displaying the Trace Buffer
You can specify the address accessed by the program to use the trace buffer to look back to see what accesses took place. · Open the Trace window by choosing Trace from the View menu, or click the Trace button in the toolbar.
If necessary scroll the window down so that you can see the last few cycles. The Trace window is displayed, as shown in figure 4.35.
Figure 4.35 Trace Window
Currently the Trace window shows all the MCU cycles. · First click in the Trace window with the right mouse button and choose Clear from the popup menu to clear the existing trace buffer. · Then choose Filter to display the Trace Filter dialog box.
Figure 4.36 General Panel in Trace Filter Dialog Box This allows you to define a filter to restrict which cycles will be displayed in the trace buffer. · If necessary, click General to show the General panel.
Figure 4.38 Trace Window (When Trace Filter is Specified)
Measuring the Performance
By using the performance analysis function in the HDI, you can measure the performance of a program. The results are displayed as a histogram or as percentages. 4.10.1 Selecting the Measurement Conditions
Select the conditions for measurement as follows: · Select Performance Analysis from the View menu or click the PA button in the toolbar and open the Performance Analysis dialog box.
· Click the Conditions button and open the Performance Analysis Conditions window. · After clicking No. 1 in the Performance Analysis Conditions, click the Edit button and open the Performance Analysis Properties dialog box.
The following dialog box will be displayed to allow selection of the measuring conditions.
In the Performance Analysis Conditions window, the conditions selected in the Performance Analysis Properties dialog box are displayed.
Displaying the Analysis Results
The performance analysis results are displayed as a histogram or as percentages. · Select Performance Analysis from the View menu or click the PA button in the toolbar and open the Performance Analysis dialog box.
Figure 4.41 Displaying the Analysis Results (1) The performance analysis results are displayed as a histogram and as percentages. · Click Value.
Figure 4.42 Displaying the Analysis Results (2) The analysis results are displayed as percentages and as the actual time measured.
Bus Monitor
You will be able to refer to the contents of memory in realtime (minimum time to update the window is 1s) as shown in the example window below when you execute the user program. · Choose Bus Monitor Window.. from the View menu.
Figure 4.43 Open Bus Monitor Menu Dialog Box · Choose Set Address For RAM Monitor from the Select Bus Monitor Function, and click OK.
Figure 4.44 Set Address For RAM Monitor Dialog Box · Choose Reset Go from the Run menu or click the Reset Go button on the tool bar. You can now watch the memory contents being updated in realtime (minimum time for updating the window is 1s) as shown in the example window below. In this tutorial, since the user program stops at PC breaks, only accessed addresses can be confirmed.
Figure 4.45 RAM Monitor Display
Stack Trace Function
Figure 4.46 Stack Trace Window You can see that the PC is currently in the sort function and is called from the main function. Note: This function can be used only when a load module with debugging information in Dwarf2 format has been loaded.
Coverage Function
Figure 4.47 Coverage Main Window Clicking the Save to CSV button in the Coverage Main window saves this coverage result with the CSV-file format. For details on the above functions, refer to the online help. Online help can be displayed by clicking the Help button in any window or pressing the F1 key.
Saving the Session
Before exiting, it is good practice to save your session, so that you can resume with the same E6000 emulator and HDI configuration at your next debugging session.
· Choose Save Session from the File menu. · Choose Exit from the File menu to exit HDI.
Section 5 Diagnostic Test Procedure
This section describes the diagnostic test procedure using the E6000 emulator test program.
System Set-Up for Test Program Execution
To execute the test program, use the following hardware do not connect the user system interface cable and user system. · AE-4 E6000 emulator (HS0AE4XEPI61H) · Host computer (MS-DOS) · E6000 PC interface board (One of the following interface boards is shown in this manual. Prepare a suitable one according to your PC interface specifications.) ISA bus interface board (HS6000EII01H) PCI bus interface board (HS6000EIC01H, HS6000EIC02H) PCMCIA interface card (HS6000EIP01H) LAN interface adapter (HS6000ELN01H) 1. Install the E6000 PC interface board in the host computer and connect the supplied PC interface cable to the board. 2. Connect the PC interface cable to the AE-4X E6000. 3. Connect the supplied AC adapter to the AE-4X E6000. 4. Initiate the host computer to make it enter DOS prompt command input wait state. 5. Turn on the E6000 switch.
Diagnostic Test Procedure Using Test Program
Messages and test contents displayed during the tests are as follows. You can perform tests No. 1 through No. 24. (The testing time is about 20 minutes when you use a PCI interface card on ® Windows 98 at 333 MHz with 64 MB of main memory.)
Message E6000 AE-4X Emulator Tests Vn.m Copyright (c) 2001 Hitachi Ltd. Loading driver............................OK (Use PCI)
Description
Test program start message. Vn.m shows the version number. Shows that the driver software for the PC interface board has been normally loaded. Shows that the driver software for the PC interface board has been normally initialized. Shows that the PC interface board is correctly installed in the host computer. Shows that the E6000 emulator is correctly connected to the host computer. Shows the ID number of the lower board of the E6000 emulator (always 5). Shows the ID number of the upper board of the E6000 emulator (always 1c).
Initializing driver.....................OK
Searching for interface card ...................OK
Checking emulator is connected ...............OK
Emulation board ID:
Shows the check results for the registers in the E6000 emulator.
Shows the results of decoding test and marching test for the dual-port RAM in the E6000 emulator (normal completion). Shows the results of decoding test for the firmware RAM in the E6000 emulator (normal completion). Shows the results of marching test in the E6000 emulator (normal completion). Shows the results of decoding test for the trace RAM in the E6000 emulator (normal completion). Shows the results of marching test in the E6000 emulator (normal completion).
Shows the results of decoding test for the mapping RAM in the E6000 emulator (normal completion). Shows the results of marching test in the E6000 emulator (normal completion). Shows the results of decoding test for the Coverage RAM in the E6000
...........................................OK 6) Test Internal ROM and RAM A) Decode Test (Internal ROM) ................OK B) Marching test (Internal ROM) ................OK C) Decode Test (Internal RAM) ................OK D) Marching Test (Internal RAM) ...............OK 7) RESERVED 8) Test Emulation RAM STEP Operation A) Step Operation ............................OK
emulator (normal completion). Shows the results of decoding and marching test for the emulation RAM in the E6000 emulator (normal completion).
Shows the check results for the step execution controlling circuits in the E6000 emulator (normal completion). Shows the check results for the forced break controlling circuits in the E6000 emulator (normal completion). Shows the check results for the illegal access break controlling circuits in the E6000 emulator (normal completion). Shows the check results for internal ROM controlling circuits in the E6000 emulator (normal completion). Shows the check results for hardware break controlling circuits in the E6000 emulator (normal completion).
9) Test Keybreak Key Break ..................................OK
10) Test Emulation RAM Hardware Break A) GRD Break ...............................OK B) WPT Break ...............................OK 11) Test Internal ROM Write-Protect A) ROMWR Test ............................OK
12) Test Hardware Break A) Break Point Initialized......................OK B) Event Detectors CES channel 1-12 ............OK C) Test Sequencing 1 .........................OK D) Check Range Break .... ....................OK E) Range Break Test for Data ...................OK F) Check Compare Either ......................OK
Shows the check results for the trace controlling circuits in the E6000 emulator (normal completion).
Shows the check results for execution time measurement circuits in the E6000 emulator (normal completion).
Shows the check results for monitor controlling circuits in the E6000 emulator (normal completion).
Shows the check results for execution time measurement controlling circuits in the E6000 emulator (normal completion).
Shows the check results for bus monitor circuits in the E6000 emulator (normal termination).
Shows the check results for GoReset controlling circuits in the E6000 emulator (normal termination).
Shows the check results for coverage controlling circuits in the E6000 emulator (normal completion).
Shows the check results for writing to EEPROM / rewriting to EEPROM / erasing and its erasing time, EEMAX Break write-protect controlling circuits in the E6000 emulator (normal completion).
Shows the check results for Double Stack, I / O Stacks and RAM Stack controlling circuits in the E6000 emulator (normal completion). Shows the check results for sub-chip bus circuit in the E6000 emulator (normal termination).
Shows the check results for coverage controlling circuits in the E6000 emulator (normal completion).
When -S is added to the command line, steps 1 to 24 will be repeatedly executed.
When detecting an error, the test program displays ERROR and stops execution. In this case, the emulator hardware may be malfunctioning. Inform a Hitachi sales agency of the test results in detail.
Appendix A Command Line Functions
|