HP H8/3003 User manual

HP 64784
H8/3003 Emulator
Terminal Interface
User’s Guide
HP Part No. 64784-97010
August 1995
Edition 6


Notice Hewlett-Packard makes no warranty of any kind with regard to
this material, including, but not limited to, the implied warranties
of merchantability and fitness for a particular purpose.
Hewlett-Packard shall not be liable for errors contained herein or for
incidental or consequential damages in connection with the furnishing,
performance, or use of this material.
Hewlett-Packard assumes no responsibility for the use or reliability of
its software on equipment that is not furnished by Hewlett-Packard.
© Copyright 1995, Hewlett-Packard Company.
This document contains proprietary information, which is protected by
copyright. All rights are reserved. No part of this document may be
photocopied, reproduced or translated to another language without the
prior written consent of Hewlett-Packard Company. The information
contained in this document is subject to change without notice.
HP is a trademark of Hewlett-Packard Company.
UNIX is a registered trademark in the United States and other
countries, licensed exclusively through X/Open Company Limited.
H8/3003is a registered trademark of Hitachi Ltd.
Hewlett-Packard Company
P.O. Box 2197
1900 Garden of the Gods Road
Colorado Springs, CO 80901-2197, U.S.A.
RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure
by the U.S. Government is subject to restrictions set forth in
subparagraph (C) (1) (ii) of the Rights in Technical Data and Computer
Software Clause at DFARS 252.227-7013. Hewlett-Packard Company,
3000 Hanover Street, Palo Alto, CA 94304 U.S.A. Right for non-DOD
U.S. Government Department and Agencies are as set forth in FAR
52.227-19(c)(1,2).

Printing History New editions are complete revisions of the manual. The date on the
title page changes only when a new edition is published.
A software code may be printed before the date; this indicates the
version level of the software product at the time the manual was issued.
Many product updates and fixes do not require manual changes, and
manual corrections may be done without accompanying product
changes. Therefore, do not expect a one-to-one correspondence
between product updates and manual revisions.
Edition 1 64784-97000, July 1993
Edition 2 64784-97002, March 1994
Edition 3 64784-97004, August 1994
Edition 4 64784-97006, April 1995
Edition 5 64784-97008, May 1995
Edition 6 64784-97010, Aug 1995

Using This Manual
This manual is designed to give you an introduction to the HP 64784
H8/3003 Emulator. This manual will also help define how these
emulators differ from other HP 64700 Emulators.
This manual will:
give you an introduction to using the emulator
explore various ways of applying the emulator to accomplish
your tasks
show you emulator commands which are specific to the
H8/3003 Emulator
This manual will not:
tell you how to use each and every emulator/analyzer
command (refer to the User’s Reference manual)

Organization
Chapter 1 An introduction to the H8/3003 emulator features and how they can
help you in developing new hardware and software.
Chapter 2 A brief introduction to using the H8/3003 Emulator. You will load
and execute a short program, and make some measurements using the
emulation analyzer.
Chapter 3 How to plug the emulator probe into a target system.
Chapter 4 Configuring the emulator to adapt it to your specific measurement
needs.
Appendix A H8/3003 Emulator Specific Command Syntax and Error Message

Contents
1 Introduction to the H8/3003 Emulator
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Purpose of the H8/3003 Emulator . . . . . . . . . . . . . . . . . . 1-1
Features of the H8/3003 Emulator . . . . . . . . . . . . . . . . . . 1-3
Supported Microprocessors . . . . . . . . . . . . . . . . . . . . 1-3
Clock Speeds . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Emulation memory . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7
Reset Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Real Time Operation . . . . . . . . . . . . . . . . . . . . . . . 1-8
Limitations, Restrictions . . . . . . . . . . . . . . . . . . . . . . . 1-9
Foreground Monitor . . . . . . . . . . . . . . . . . . . . . . . . 1-9
DMA Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Internal RAM of H8/3005 . . . . . . . . . . . . . . . . . . . . . 1-9
Watch Dog Timer in Background . . . . . . . . . . . . . . . . . 1-9
Monitor Break at Sleep/Standby Mode . . . . . . . . . . . . . . 1-9
Hardware Standby Mode . . . . . . . . . . . . . . . . . . . . . 1-9
Interrupts in Background Cycles . . . . . . . . . . . . . . . . . 1-9
Reset Output Enable Bit . . . . . . . . . . . . . . . . . . . . . . 1-9
Evaluation chip . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
2 Getting Started
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
A Look at the Sample Program . . . . . . . . . . . . . . . . . . . . 2-3
Using the Help Facility . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Initialize the Emulator to a Known State . . . . . . . . . . . . . . . 2-8
Set Up the Proper Emulation Configuration . . . . . . . . . . . . . 2-9
Set Up Emulation Conditions . . . . . . . . . . . . . . . . . . . 2-9
Mapping Memory . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Contents-1

Transfer Code into Emulation Memory . . . . . . . . . . . . . . 2-12
Transferring Code from a Terminal
In Standalone Configuration . . . . . . . . . . . . . . . . . . 2-12
Transferring Code From A Host,
HP 64700 In Transparent Configuration . . . . . . . . . . . . 2-15
Looking at Your Code . . . . . . . . . . . . . . . . . . . . . . . 2-18
Familiarize Yourself with the System Prompts . . . . . . . . . . 2-19
Running the Sample Program . . . . . . . . . . . . . . . . . . . 2-20
Stepping Through the Program . . . . . . . . . . . . . . . . . . . 2-22
Tracing Program Execution . . . . . . . . . . . . . . . . . . . . 2-22
Predefined Trace Labels . . . . . . . . . . . . . . . . . . . . . 2-22
Predefined Status Equates . . . . . . . . . . . . . . . . . . . . 2-23
Specifying a Trigger . . . . . . . . . . . . . . . . . . . . . . . 2-23
Using Software Breakpoints . . . . . . . . . . . . . . . . . . . . 2-27
Displaying and Modifying the Break Conditions . . . . . . . . 2-27
Defining a Software Breakpoint . . . . . . . . . . . . . . . . . 2-28
Searching Memory for Strings or Numeric Expressions . . . . . . 2-29
Making Program Coverage Measurements . . . . . . . . . . . . . 2-29
Trace Analysis Considerations . . . . . . . . . . . . . . . . . . . 2-30
How to Specify the Trigger Condition . . . . . . . . . . . . . 2-30
Store Condition and Disassembling . . . . . . . . . . . . . . . 2-32
Triggering the Analyzer by Data . . . . . . . . . . . . . . . . 2-34
3 In-Circuit Emulation
Installing the Target System Probe . . . . . . . . . . . . . . . . . . 3-2
QFP adaptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
PGA adaptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
QFP socket/adaptor . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Installing the QFP Adaptor . . . . . . . . . . . . . . . . . . . . 3-5
Installing the 64784E PGA adaptor . . . . . . . . . . . . . . . . 3-6
Installing the H8/3003 microprocessor . . . . . . . . . . . . . . 3-9
Using Low Voltage Adaptor . . . . . . . . . . . . . . . . . . . . 3-10
Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Installing the 64797B PGA adaptor . . . . . . . . . . . . . . . 3-11
Run from Target System Reset . . . . . . . . . . . . . . . . . . . 3-12
Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . 3-13
Target System Interface . . . . . . . . . . . . . . . . . . . . . . 3-26
4 Configuring the H8/3003 Emulator
Types of Emulator Configuration . . . . . . . . . . . . . . . . . . 4-1
Emulation Processor to Emulator/Target System . . . . . . . . . 4-1
2-Contents

Commands Which Perform an Action or Measurement . . . . . 4-2
Coordinated Measurements . . . . . . . . . . . . . . . . . . . . 4-2
Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Emulation Processor to Emulator/Target System . . . . . . . . . . 4-3
cf ba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
cf dbc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
cf drst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Memory Mapping . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Break Conditions . . . . . . . . . . . . . . . . . . . . . . . . 4-18
Where to Find More Information . . . . . . . . . . . . . . . . . . 4-19
A H8/3003 Emulator Specific Command Syntax
CONFIG_ITEMS . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Related information . . . . . . . . . . . . . . . . . . . . . . . . A-4
ACCESS MODE and DISPLAY MODE . . . . . . . . . . . . . . A-4
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
Related Information . . . . . . . . . . . . . . . . . . . . . . . . A-5
ADDRESS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
REGISTER CLASS and NAME . . . . . . . . . . . . . . . . . . A-7
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
Emulator Specific Error Messages . . . . . . . . . . . . . . . . . A-15
Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-15
Contents-3

Illustrations
Figure 1-1. HP 64784 Emulator for the H8/3003 . . . . . . . . . . 1-2
Figure 2-1. Sample Program Listing . . . . . . . . . . . . . . . . . 2-5
Figure 3-1. Installing the QFP adaptor . . . . . . . . . . . . . . . . 3-5
Figure 3-2 Installing the PGA adaptor (General) . . . . . . . . . . 3-6
Figure 3-3 Installing the PGA adaptor (3001 mode 3/4) . . . . . . . 3-7
Figure 3-4 Installing the PGA adaptor (3004/5 mode 3) . . . . . . . 3-8
Figure 3-5 Installing the H8/3003 microprocessor . . . . . . . . . . 3-9
Figure 3-6 Installing the PGA adaptor (General) . . . . . . . . . 3-11
Tables
Table 1-1. Supported Microprocessors . . . . . . . . . . . . . . . . 1-3
Table 1-2. Clock Speeds . . . . . . . . . . . . . . . . . . . . . . . 1-6
Table 3-1. DC Characteristics of input high voltage . . . . . . . . 3-10
Table 3-2. Bus timing (Vcc = 5.0V, f = 16MHz) . . . . . . . . . 3-13
Table 3-3. Refresh controller timing
(Vcc = 5.0V, f = 16MHz) . . . . . . . . . . . . . . . . 3-16
Table 3-4. Control signal timing
(Vcc = 5.0V, f = 16MHz) . . . . . . . . . . . . . . . . 3-17
Table 3-5. Timing condition of On-chip supporting
modules (Vcc = 5.0V, f = 16MHz) . . . . . . . . . . 3-18
Table 3-6. Bus timing (Vcc = 3.0V, f = 10MHz) . . . . . . . . . 3-20
Table 3-7. Control signal timing
(Vcc = 3.0V, f = 10MHz) . . . . . . . . . . . . . . . . 3-23
Table 3-8. Timing condition of On-chip supporting
modules (Vcc = 3.0V, f = 10MHz) . . . . . . . . . . 3-24
Table 4-1. Clock Speeds . . . . . . . . . . . . . . . . . . . . . . . 4-6
4-Contents

1
Introduction to the H8/3003 Emulator
Introduction The topics in this chapter include:
Purpose of the H8/3003 Emulator
Features of the H8/3003 Emulator
Purpose of the
H8/3003 Emulator The H8/3003 Emulator is designed to replace the H8/3003
microprocessor in your target system so you can control operation of
the microprocessor in your application hardware (usually refer
to as the target system). The H8/3003 emulator performs just like the
H8/3003 microprocessor, but is a device that allows you to control the
H8/3003 microprocessor directly. These features allow you to easily
debug software before any hardware is available, and ease the task of
integrating hardware and software.
Introduction to the H8/3003 Emulator 1-1

Figure 1-1. HP 64784 Emulator for the H8/3003
1-2 Introduction to the H8/3003 Emulator

Features of the
H8/3003 Emulator
Supported
Microprocessors The HP 64784A H8/3003 emulator supports the microprocessors listed
in Table 1-1.
Table 1-1. Supported Microprocessors
Supported Microprocessor QFP Adaptor
Board PGA Adaptor
Board/
QFP probe
Type Package System
Clock
Divider
On-chip ROM Supply Voltage
H8/3005 80pinQFP --
4.75 to 5.25V -HP64784E/
HP64784K*1
2.7 to 5.25V
H8/3004 80pinQFP --
4.75 to 5.25V -HP64784E/
HP64784K*1
2.7 to 5.25V
H8/3003 112 pin QFP 1:2 - 4.75 to 5.25V
HP64784C HP64784E/
HP64784F
2.7 to 5.25V
--
4.75 to 5.25V
2.7 to 5.25V
H8/3002 100 pin QFP --
4.75 to 5.25V HP64784D HP64784E/
HP64784G
2.7 to 5.25V
H8/3001 80 pin QFP --
4.75 to 5.25V -HP64784E/
HP64784J *1
Introduction to the H8/3003 Emulator 1-3

Table 1-1. Supported Microprocessors (Cont’d)
Supported Microprocessor QFP Adaptor
Board PGA Adaptor
Board/
QFP probe
Type Package System
Clock
Divider
On-chip ROM Supply Voltage
2.7 to 5.25V
H8/3032 80 pin QFP
-
PROM 4.75 to 5.25V
-HP64784E/
HP64784H
2.7 to 5.25V
Masked ROM 4.75 to 5.25 V
2.7 to 5.25V
H8/3031 80 pin QFP --
4.75 to 5.25 V -HP64784E/
HP64784H
2.7 to 5.25 V
H8/3030 80 pin QFP --
4.75 to 5.25 V -HP64784E/
HP64784H
2.7 to 5.25 V
H8/3042 100 pin QFP
-
PROM 4.75 to 5.25V
HP64784D HP64784E/
HP64784G
2.7 to 5.25V
Masked ROM 4.75 to 5.25V
2.7 to 5.25V
H8/3041 100 pin QFP - Masked ROM 4.75 to 5.25V HP64784D HP64784E/
HP64784G
2.7 to 5.5V
H8/3040 100 pin QFP - Masked ROM 4.752 to 5.25V HP64784D HP64784E/
HP64784G
2.7 to 5.25V
*1 When you do in-circuit emulation for H8/3001 with mode 3/4 or
H8/3004/5 with mode 3, you must use HP 64784-66509 shipped with
HP 64784J/K. Refer to the "In-Circuit Emulation" Chapter in this
manual for more details.
1-4 Introduction to the H8/3003 Emulator

The H8/3003 emulator is provided without any QFP adaptors and PGA
adaptor(HP 64784E) with QFP probe. To emulate each processor with
your target system, you need to purchase appropriate QFP adaptor or
PGA adaptor with QFP probe listed in Table 1-1. To purchase them,
contact your local HP sales representative.
You can buy HP 64797B low voltage adaptor to emulate each
processor running with supply voltage from 2.7 up to 5.25V input in
your target system. To buy HP 64797B, contact your local HP sales
representative.
The list of supported microprocessors in Table 1-1 is not necessarily
complete. To determine if your microprocessor is supported or not,
contact Hewlett-Packard.
Clock Speeds You can select whether the emulator will be clocked by the internal
clock source or by the external clock source on your target system.
When you select a clock input conforming to the specification of Table
1-2.
Refer to the "Configuration the Emulator" Chapter in this manual for
more details.
Introduction to the H8/3003 Emulator 1-5

Table 1-2. Clock Speeds
Clock source Chip Without 64797B With 64797B
Internal H8/3001
H8/3002
H8/3003T
H8/3004
H8/3005
H8/3030
H8/3031
H8/3032
H8/3040
H8/3041
H8/3042
16MHz
(System clock) 8MHz
(System clock)
H8/3003 with system
clock divider 8MHz
(System clock) 8MHz
(System clock)
External H8/3001
H8/3002
H8/3003T
H8/3004
H8/3005
H8/3030
H8/3031
H8/3032
H8/3040
H8/3041
H8/3042
From 0.5 up to 16MHz
(System clock) From 0.5 up to 10MHz
(System clock)
H8/3003 with system
clock divider From 1 up to 24MHz
(System clock is from
0.5 up to 12MHz)
From 1 up to 20MHz
(System clock is from
0.5 up to 10MHz)
1-6 Introduction to the H8/3003 Emulator

Emulation memory The H8/3003 emulator is used with one of the following Emulation
Memory Cards.
HP 64726A 128K byte Emulation Memory Card
HP 64727A 512K byte Emulation Memory Card
HP 64728A 1M byte Emulation Memory Card
HP 64729A 2M byte Emulation Memory Card
You can define up to 16 memory ranges (at 512 byte boundaries and
least 512 byte in length.) The emulator occupies 6K byte, which is
used for monitor program and internal RAM of microprocessor mapped
as emulation RAM, leaving 122K, 506K, 1018K, 2042K byte of
emulation memory which you may use. You can characterize memory
range as emulation RAM (eram), emulation ROM (erom), target
system RAM (tram), target system ROM (trom), or guarded memory
(grd). The emulator generates an error message when accesses are
made to guarded memory locations. You can also configure the
emulator so that writes to memory defined as ROM cause emulator
execution to break out of target program execution.
Analysis The H8/3003 emulator is used with one of the following analyzers
which allows you to trace code execution and processor activity.
HP 64704A 80-channel Emulation Bus Analyzer
HP 64703A 64-channel Emulation Bus Analyzer and
16-channel State/Timing Analyzer.
HP 64794A/C/D Deep Emulation Bus Analyzer
The Emulation Bus Analyzer monitors the emulation processor using
an internal analysis bus. The HP 64703A 64-channel Emulation Bus
Analyzer and 16-channel State/Timing Analyzer allows you to probe
up to 16 different lines in your target system.
Registers You can display or modify the H8/3003 internal register contents. This
includes the ability to modify the program counter (PC) value so you
can control where the emulator starts a program run.
Breakpoints You can set the emulator/analyzer interaction so the emulator will
break to the monitor program when the analyzer finds a specific state or
states, allowing you to perform post-mortem analysis of the program
execution. You can also set software breakpoints in your program.
This feature is realized by inserting a special instruction into user
Introduction to the H8/3003 Emulator 1-7

program. One of undefined opcodes (5770 hex) is used as software
breakpoint instruction. Refer to the "Using Software Breakpoints"
section of "Getting Started" chapter for more information.
Reset Support The emulator can be reset from the emulation system under your
control; or your target system can reset the emulation processor.
Real Time Operation Real-time signifies continuous execution of your program at full rated
processor speed without interference from the emulator. (Such
interference occurs when the emulator needs to break to the monitor to
perform an action you requested, such as displaying target system
memory.) Emulator features performed in real time include: running
and analyzer tracing. Emulator features not performed in real time
include: display or modification of target system memory, load/dump
of target memory, display or modification of registers.
1-8 Introduction to the H8/3003 Emulator

Limitations,
Restrictions
Foreground Monitor Foreground monitor is not supported for the H8/3003 emulator.
DMA Support Direct memory access to the emulation by external DMAC is not
allowed.
Internal RAM of
H8/3005 When you emulate H8/3005 processor, you can’t use address 0fef10h -
0ff00fh (mode 1) and 0ffef10h - 0fff00fh (mode 3) as internal RAM.
These area are worked as external 8bit 3state area.
Watch Dog Timer in
Background Watch dog timer is suspended count up while the emulator is running
in background monitor.
Monitor Break at
Sleep/Standby Mode When the emulator breaks into the background monitor, sleep or
software standby mode is released. Then, PC indicates next address of
"SLEEP" instruction.
Hardware Standby
Mode Hardware standby mode is not supported for the H8/3003 emulator.
Hardware standby request from target system will give the emulator
reset signal.
Interrupts in
Background Cycles The H8/3003 emulator does not accept any interrupts while in
background monitor. Such interrupts are suspended while running the
background monitor, and will occur when context is changed to
foreground.
Reset Output Enable
Bit The RSTOE (Reset output enable bit) is used to determine whether the
H8/3003 processor outputs reset signal when the processor is reset by
the watch dog timer. However, the H8/3003 emulator ignores the
configuration of the RSTOE, and works as it is configured with the
modify configuration command.
Introduction to the H8/3003 Emulator 1-9

Evaluation chip Hewlett-Packard makes no warranty of the problenm caused by the
H8/3003 Evaluation chip in the emulator.
1-10 Introduction to the H8/3003 Emulator
Table of contents