background image

HP 64146

7700 Series Emulator
Softkey Interface

User’s Guide

HP Part No. 64146-97005
Printed in U.S.A.
February 1994

Edition 2

Summary of Contents for 64146A

Page 1: ...HP 64146 7700 Series Emulator Softkey Interface User s Guide HP Part No 64146 97005 Printed in U S A February 1994 Edition 2 ...

Page 2: ......

Page 3: ...o another language without the prior written consent of Hewlett Packard Company The information contained in this document is subject to change without notice AdvanceLink Vectra and HP are trademarks of Hewlett Packard Company IBM and PC AT are registered trademarks of International Business Machines Corporation MS DOS is a trademark of Microsoft Corporation MELPS is a registered trademark of Mits...

Page 4: ...his 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 64146 97002 August 1992 Edition 1 64146 97005 February 1994 ...

Page 5: ...r to real time execution selecting a target system clock source This manual does not Show you how to use every Softkey Interface command and option the Softkey Interface is described in the Softkey Interface Reference For the most part the HP 64146A and HP 64146B emulators all operate the same way Differences of between the emulators are described where they exist Both the HP 64146A and HP 64146B ...

Page 6: ...apter 3 In Circuit Emulation This chapter shows you how to install the emulator probe into a target system and how to use the in circuit emulation features Chapter 4 Configuring the Emulator This chapter shows you how to restrict the emulator to real time execution select a target system clock source allow background cycles to be seen by the target system Chapter 5 Using the Emulator This chapter ...

Page 7: ...s options and parts of command syntax bold italic Commands options and parts of command syntax which may be entered by pressing softkeys normal User specified parts of a command Represents the HP UX prompt Commands which follow the are entered at the HP UX prompt RETURN The carriage return key ...

Page 8: ...Notes ...

Page 9: ... Time Operation 1 7 Coverage Measurements 1 8 Reset Support 1 8 Watch Dog Timer 1 8 Limitations Restrictions 1 9 Access to Internal RAM 1 9 Trace Internal RAM 1 9 DMA Support 1 9 Watch Dog Timer in Background 1 9 Step Command with Foreground Monitor 1 9 Step Command and Interrupts 1 9 Emulation Commands in Stop Wait Mode 1 10 Stack Address 1 10 2 Getting Started Introduction 2 1 Before You Begin 2...

Page 10: ...re Breakpoints 2 22 Setting a Software Breakpoint 2 22 Clearing a Software Breakpoint 2 23 Stepping Through the Program 2 24 Displaying Registers 2 24 Using the Analyzer 2 26 Specifying a Simple Trigger 2 26 Displaying the Trace 2 27 Displaying Trace with Time Count Absolute 2 28 Changing the Trace Depth 2 29 Using the Storage Qualifier 2 29 7700 Series Analysis Status Qualifiers 2 30 Restriction ...

Page 11: ...iguration 4 16 Target memory access size 4 16 Respond to target system interrupts 4 17 Enable watchdog timer 4 17 Debug Trace Configuration 4 18 Break processor on write to ROM 4 18 Trace background or foreground operation 4 18 Trace refresh cycles by emulation analyzer 4 19 Trace DMA cycles by emulation analyzer 4 19 Trace HOLD HLDA cycles by emulation analyzer 4 19 Replace 16 bit addresses with ...

Page 12: ... Command with Foreground Monitor 5 8 Step Command and Interrupts 5 8 Emulation Commands in Stop Wait Mode 5 9 Stack Address 5 9 A Using the Foreground Monitor Introduction A 1 Comparison of Foreground and Background Monitors A 1 Background Monitors A 2 Foreground Monitors A 2 An Example Using the Foreground Monitor A 3 Assemble and Link the Monitor A 3 Modifying Location Declaration Statement A 3 ...

Page 13: ...ion Pod 2 3 Figure 2 2 Sample Program Listing 2 4 Figure 2 3 Linkage Editor Command File 2 7 Figure 2 4 Softkey Interface Display 2 9 Figure 4 1 Chip Group and Type for Configuration 4 7 Tables Table 1 1 Supported Microprocessors 1 3 Table 2 1 Chip Group and Chip Type for Configuration 2 13 Contents 5 ...

Page 14: ...Notes 6 Contents ...

Page 15: ... your target system so you can control operation of the processor in your application hardware usually referred to as the target system The emulator performs just like the MELPS 7700 Series microprocessor but is a device that allows you to control the MELPS 7700 Series directly These features allow you to easily debug software before any hardware is available and ease the task of integrating hardw...

Page 16: ...Figure 1 1 HP 64146 Emulator for MELPS 7700 Series 1 2 Introduction ...

Page 17: ...SP 16 M37702 3 M4 xxxFP SP 8 M37702S4AFP M4AxxxFP SP 16 S4FP SP 8 S4AFP SP 16 M37702 M6LxxxFP 8 M37702S1BFP M37702TL HPD HP 641466 61002 64146B M37702 3 M2BxxxFP SP 25 M37702S1BFP M37702TB HPD S1BFP SP 25 HP 64146 61001 64146A M37702 3 M4BxxxFP SP 25 M37702S4BFP HP 64146 61002 S4BFP SP 25 64146B M6BxxxFP 25 M37704 5 M2 xxxFP SP 8 M37704S1AFP M37704T HPD M2AxxxFP SP 16 S1FP SP 8 S1AFP SP 16 M37704 ...

Page 18: ...rocessor using default emulation pod HP 64146 61002 To emulate other processors of 7700 Series you need to purchase appropriate emulation pod and or emulation processor The HP 64146A B 001 emulator is provided with no emulation pod You need to purchase appropriate emulation pod and emulation processor listed in Table 1 1 To purchase emulation pod or emulation processor contact the address listed i...

Page 19: ...al The emulator can be configured to generate the RDY signal Also the emulator accepts RDY signal from the target system Use the high speed access mode of the emulator The emulator can run with no wait state However there is a limitation in the mapping of the emulation memory in this mode Refer to Chapter 4 of this manual for more detail Emulation memory The HP 64146A B 7700 Series emulator is use...

Page 20: ...ound or Background Emulation Monitor When you power up the emulator or when you initialize it the background monitor is used by default You can also configure the emulator to use a foreground monitor Before the background and foreground monitors are described you should understand the function of the emulation monitor program The Function of the Monitor Program The monitor program is the interface...

Page 21: ...specified number of instructions 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 BRK instructions into user program Refer to th...

Page 22: ... allows you to perform coverage measurements on programs in emulation memory Reset Support The emulator can be reset from the emulation system under your control or your target system can reset the emulation processor Watch Dog Timer You can configure the emulator to disable the watch dog timer 1 8 Introduction ...

Page 23: ...Direct memory access to emulation memory is not allowed Watch Dog Timer in Background Watch dog timer suspends count down while the emulator is running in background monitor Step Command with Foreground Monitor Step command is not available when the emulator is used with a foreground monitor Step Command and Interrupts When an interrupt occurs while the emulator is running in monitor the emulator ...

Page 24: ...ed to break the emulator into the monitor to use these commands Once you break the emulator into the monitor the stop or wait mode will be released Stack Address In some versions of 7700 microprocessor the stack can be located in Bank FF However the HP 64146A B 7700 Series emulator doesn t support the feature The stack must be located in Bank 0 1 10 Introduction ...

Page 25: ...ftkey Interface This chapter will Tell you what must be done before you can use the emulator as shown in the tutorial examples Describe the sample program used for this chapter s example This chapter will show you how to Start up the Softkey Interface Load programs into emulation and target system memory Enter emulation commands to view execution of the sample program Getting Started 2 1 ...

Page 26: ...allation Service manual for instructions on installing software 3 In addition you should read and understand the concepts of emulation presented in the Concepts of Emulation and Analysis manual The Installation Service manual also covers HP 64700 system architecture A brief understanding of these concepts may help avoid questions later 4 Connected the emulator to the emulation probe as shown in Fi...

Page 27: ...ace and may be copied from the following location usr hp64000 demo emul hp64146 cmd_rds a77 Data Declarations The TABLE section defines the messages used by the program to respond to various command inputs These messages are labeled Msg_A Msg_B and Msg_I Initialization The program instruction at the Init label initializes the stack pointer Figure 2 1 Connecting the Emulation Pod Getting Started 2 ...

Page 28: ...ND SECTION SAMPPROG DATA 8 INDEX 16 Set up the Stack Pointer Init LDX Stack TXS SEM Clear Previous command Clear_Input LDA B 00H STA B DT Cmd_Input Read command input byte If no command has been entered continue to scan for it Scan LDA A DT Cmd_Input CMP A 00H BEQ Scan INDEX 8 A command has been entered The destination area is cleared SEP X Clear_Output LDX 00H LDY 20H Clear_Loop STA B DT Msg_Dest...

Page 29: ...1H BEQ Cmd_A CMP A 42H BEQ Cmd_B BRA Cmd_I Command A is entered A the number of bytes in message A X location of the message Jump to the routine which writes the message Cmd_A LDA A 11H LDX Msg_A BRA Output Command B is entered Cmd_B LDA A 11H LDX Msg_B BRA Output An invalid command is entered Cmd_I LDA A 0FH LDX Msg_I Message is written to the destination Y location of the destination area Output...

Page 30: ...ither A nor B an invalid command has been entered and execution is transferred to the instructions at Cmd_I The instructions at Cmd_A Cmd_B and Cmd_I each load accumulator A with the length of the message to be displayed and index register X with the starting location of the appropriate message Then execution transfers to Output which writes the appropriate message to the destination location Msg_...

Page 31: ...generate HP Absolute file for the Sofktey Interface you need to use m77cnvhp absolute file format converter program The m77cnvhp converter is provided with the Softkey Interface To generate HP Absolute file enter following command m77cnvhp cmd_rds RETURN You will see that cmd_rds X cmd_rds L and cmd_rds A are generated These are sufficient throughout this chapter Note You must specify s option whe...

Page 32: ... the measurement system has been initialized enter the configuration interface with the following command msconfig RETURN To define a measurement system for the 7700 Series emulator enter make_sys emm77 RETURN Now to add the emulator to the measurement system enter add module_number naming_it m77 RETURN Enter the following command to exit the measurement system configuration interface end RETURN I...

Page 33: ...sage and returned to the HP UX prompt Error messages are described in the Softkey Interface Reference manual HPB64146 19003 A 04 00 20Aug92 M37700 EMULATION SERIES 64700 A Hewlett Packard Software Product Copyright Hewlett Packard Co 1992 All Rights Reserved Reproduction adaptation or translationwithout prior written permission is prohibited except as allowed undercopyright laws RESTRICTED RIGHTS ...

Page 34: ...ee the next line just as you do with the HP UX more command After all the information on the particular topic has been displayed or after you press q to quit scrolling through information you are prompted to press RETURN to return to the Softkey Interface SYSTEM COMMANDS COMMAND FILES displays the possible help files help displays the possible help files fork a shell specified by shell variable SH...

Page 35: ... m m display or modify processor memory space m addr display memory at address m d dtype addr display memory at address with display option m addr addr display memory in specified address range m dm addr addr display memory mnemonics in specified range m addr display 128 byte block starting at address A m addr value modify memory at address to value m d dtype addr value modify memory with display ...

Page 36: ...and chip type are listed in Table 2 1 Note If your processor is not listed in Table 2 1 refer to chapter 4 of this manual for information on configuring the emulator Processor node single Modify reset value for Stack Pointer no Modify memory configuration When you are going to emulate a processor which have no internal RAM answer yes to this question and map 100 hex through FFF hex as emulation RA...

Page 37: ...M37701S4SP S4ASP 7720S1 M37720S1FP S1AFP 7702M2 M37702M2 xxxFP M2AxxxFP 7730S2 M37730S2FP M2BxxxFP S2AFP M37703M2 xxxSP S2SP M2AxxxSP S2ASP M2BxxxSP 7732S4 M37732S4FP 7702M4 M37702M4 xxxFP S4AFP M4AxxxFP M4BxxxFP 7780S M37780STJ M37703M4 xxxSP STFP M4AxxxSP M4BxxxSP 7781M4 M37781M4TxxxJ M4TxxxFP 7702M6 M37702M6BxxxFP M6LxxxFP 7781E4 M37781E4TxxxJ E4TxxxFP 7702S1 M37702S1FP S1AFP 7795S M37795SJ S1B...

Page 38: ...e into memory unless you use the nosymbols option symbol information is loaded Both global symbols and symbols that are local to a source file can be displayed Global To display global symbols enter the following command display global_symbols RETURN Listed are address ranges associated with a symbol Global symbols in cmd_rds Static symbols Symbol name ____________________ Address range __ Segment...

Page 39: ..._ Offset Cear_Input 00C005 0005 Clear_Loop 00C019 0019 Clear_Output 00C015 0015 Cmd_A 00C02D 002D Cmd_B 00C034 0034 Cmd_I 00C03B 003B Cmd_Input 000100 0000 Init 00C000 0000 Msg_A 00C100 0000 Msg_B 00C111 0011 Msg_Dest 000101 0001 Msg_I 00C122 0022 Msgs 00C100 0000 Output 00C040 0040 Process_Cmd 00C023 0023 STATUS M37700 Running in monitor____________________________________ R display local_symbols...

Page 40: ...sassembling memory contents Note When you use PGUP or PREV key to see the previous lines of memory display disassembled mnemonic may not be accurate Memory mnemonic file cmd_rds a77 address data 00C000 A22102 LDX 0221H 00C003 9A TXS 00C004 F8 SEM 00C005 42A900 LDA B 00H 00C008 428D0001 STA B 0100H 00C00C AD0001 LDA A 0100H 00C00F C900 CMP A 00H 00C011 F0F9 BEQ 00C00CH 00C013 E210 SEP 10H 00C015 A2...

Page 41: ...S 00C004 F8 SEM 00C005 Clear_Input 42A900 LDA B 00H 00C008 428D0001 STA B DT 0100H 00C00C cmd_rds Scan AD0001 LDA A DT 0100H 00C00F C900 CMP A 00H 00C011 F0F9 BEQ cmd_rds a77 Scan 00C013 E210 SEP 10H 00C015 Clear_Output A200 LDX 00H 00C017 A020 LDY 20H 00C019 c Clear_Loop 429D0101 STA B DT 0101H X 00C01D E8 INX 00C01E 88 DEY 00C01F D0F8 BNE cmd_r Clear_Loop 00C021 C210 CLP 10H STATUS M37700 Runnin...

Page 42: ... For example to run the sample program from the address of Init label run from Init RETURN Note The run from transfer_address command is not available in the 7700 Series Softkey Interface Displaying Memory in Blocked Format You can display memory locations in blocked format For example to display the Msg_Dest locations of the sample program in blocked byte format enter the following command displa...

Page 43: ...ions Memory bytes blocked update address data hex ascii 000101 08 54 48 49 53 20 49 53 20 T H I S I S 000109 10 4D 45 53 53 41 47 45 20 M E S S A G E 000111 18 41 00 00 00 00 00 00 00 A 000119 20 00 00 00 00 00 00 00 00 000121 28 00 00 00 00 00 00 00 00 000129 30 00 00 00 00 00 00 00 00 000131 38 00 00 00 00 00 00 00 00 000139 40 00 00 00 00 00 00 00 00 000141 48 00 00 00 00 00 00 00 00 000149 50 ...

Page 44: ...rom the user program to the monitor You can continue user program execution with the run command To break emulator execution from the sample program to the monitor enter the following command break RETURN Using Software Breakpoints Software breakpoints are provided with an 7700 Series BRK instruction When you define or enable a software breakpoint the emulator will replace the opcode at the softwa...

Page 45: ...reak to background request which as with the processor break command Since the system controller knows the locations of defined software breakpoints it can determine whether the BRK instruction is software breakpoints or opcode in your target program If it is a software breakpoint execution breaks to the monitor and the BRK instruction is replaced by the original opcode A subsequent run or step co...

Page 46: ...urce file in which the local symbol is defined must be included After the software breakpoint has been set enter the following commands to display memory and see if the software breakpoint was correctly inserted display memory Init mnemonic options m0x0 RETURN Memory mnemonic file cmd_rds a77 address label data 00C000 Init A22102 LDX 0221H 00C003 9A TXS 00C004 F8 SEM 00C005 Clear_Input 42A900 LDA ...

Page 47: ...am Counter is now at the address A message on the status line shows that the software breakpoint has been hit The status line also shows that the emulator is now executing in the monitor When software breakpoints are hit they become inactivated To reactive the breakpoint so that is pending you must reenter the modify software_breakpoints set command Clearing a Software Breakpoint To remove softwar...

Page 48: ...command step RETURN RETURN RETURN You will see the inverse video moves according to the step execution You can continue to step through the program just by pressing the RETURN key when a command appears on the command line it may be entered by pressing RETURN Note When the emulator performs step execution all memory access is performed by byte access Displaying Registers Enter the following comman...

Page 49: ...mulator B Index Register X Index Register Y Direct Page Register When you enter the step command with registers displayed the register display is updated every time you enter the step command step RETURN RETURN RETURN Registers Next_PC 00C01D PC C01D PG 00 DT 00 SP 0221 PS 0031 mx c A 0075 B 0000 X 0200 Y 0120 DPR 0000 STATUS M37700 Stepping complete_____________________________________ display re...

Page 50: ... a Simple Trigger Suppose you want to trace program execution after the point at which the sample program execute the Cmd_A routine To do this The following command makes this trace specification trace after cmd_rds a77 Cmd_A status exec RETURN Registers Next_PC 00C01D PC C01D PG 00 DT 00 SP 0221 PS 0031 mx c A 0075 B 0000 X 0200 Y 0120 DPR 0000 Step_PC 00C01D INX Next_PC 00C01E PC C01E PG 00 DT 0...

Page 51: ...er cmd_rds a7 Cmd_A A9FF INSTRUCTION opcode unavailable 001 cmd_rds 00002E A211 A211H opcode fetch mx 6 00 uS 002 cmd_rds 00002F A211 LDX C100H 2 0 uS 003 cmd_rds 000030 C100 C100H opcode fetch 6 00 uS 004 cmd_rds 000032 0C80 0C80H opcode fetch 8 00 uS 005 cmd_rds 000032 0C80 BRA cmd_rds a Output 2 0 uS 006 cmd_rds a7 Cmd_B 11A9 11A9H opcode fetch 6 00 uS 007 cmd_rds a Output 01A0 01A0H opcode fet...

Page 52: ... data write mx 8 00 uS 018 cmd_rds 000004 4953 xx53H data write mx 4 00 uS 019 cmd_rds 000004 4920 4920H data read mx 8 00 uS 020 cmd_rds 000005 2020 20xxH data write mx 8 00 uS 021 cmd_rds 000006 2049 xx49H data write mx 4 00 uS 022 cmd_rds 000006 2053 2053H data read mx 8 00 uS 023 cmd_rds 000007 5353 53xxH data write mx 8 00 uS 024 cmd_rds 000008 5320 xx20H data write mx 4 00 uS 025 cmd_rds 000...

Page 53: ...ce count relative RETURN Trace List Offset 0 Label Address Data Opcode or Status time count Base symbols hex mnemonic w symbols absolute 015 cmd_rds 000002 5448 xx48H data write mx 84 0 uS 016 cmd_rds 000002 5349 5349H data read mx 92 0 uS 017 cmd_rds 000003 4949 49xxH data write mx 100 uS 018 cmd_rds 000004 4953 xx53H data write mx 104 uS 019 cmd_rds 000004 4920 4920H data read mx 112 uS 020 cmd_...

Page 54: ...x00H data write mx 56 00 uS 008 cmd_rds 000009 0088 00xxH data write mx 56 00 uS 009 cmd_rds 00000A D000 xx00H data write mx 56 00 uS 010 cmd_rds 00000B 0088 00xxH data write mx 56 00 uS 011 cmd_rds 00000C D000 xx00H data write mx 56 00 uS 012 cmd_rds 00000D 0088 00xxH data write mx 56 00 uS 013 cmd_rds 00000E D000 xx00H data write mx 56 00 uS 014 cmd_rds 00000F 0088 00xxH data write mx 56 00 uS S...

Page 55: ...Trace List Offset 0 Label Address Data Opcode or Status time count Base symbols hex mnemonic w symbols relative after cmd_rds a77 Scan 00AD INSTRUCTION opcode unavailable 001 cmd_rds 00000E C901 C901H opcode fetch mx 6 00 uS 002 Cmd_Input FFFF xxFFH data read mx 4 00 uS 003 cmd_rds 00000F FFFF CMP A 00H 2 0 uS 004 cmd_rds 000010 F000 F000H opcode fetch mx 6 00 uS 005 cmd_rds 000011 F000 BEQ cmd_rd...

Page 56: ... Softkey Interface from within window systems the end command with no options causes an exit only in that window To end locked from all windows enter the following command end locked RETURN This option only appears when you enter the Softkey Interface via the emul700 command When you enter the Softkey Interface via pmon and MEAS_SYS only one window is permitted Refer to the Softkey Interface Refer...

Page 57: ...he installation of the emulator probe into target systems Show you how to install the emulator probe Show you how to use features related to in circuit emulation Prerequisites Before performing the tasks described in this chapter you should be familiar with how the emulator operates in general Refer to the HP 64700 Emulators System Overview manual and the Getting Started chapter of this manual In ...

Page 58: ... installing the emulator probe into the target system Do not install the emulator probe into the processor socket with power applied to the target system Caution DAMAGE TO THE EMULATOR WILL RESULT IF THE PROBE IS NOT INSTALLED CORRECTLY Make sure pin 1 of probe connector is aligned with pin 1 of the socket When installing the emulation probe be sure that the probe is installed into the processor s...

Page 59: ...it The emulation pod cannot generate clock signal using a ceramic or quartz crystal resonator Target Memory Access Size You can configure the emulator to access target system memory by byte access or word access to perform emulation commands Respond to Target System Interrupts You can configure the emulator whether or not the emulator responds to interrupt signals from the target system during for...

Page 60: ...Notes 3 4 In Circuit Emulation ...

Page 61: ...ommands request access of target system resources target system memory register contents etc The emulator is a flexible instrument and may be configured to suit your needs at any stage of the development process This chapter describes the options available when configuring the HP 64146A B emulator The configuration options are accessed with the following command modify configuration RETURN After e...

Page 62: ...ling interrupts from the target system Enabling watch dog timer Debug Trace Configuration Enabling breaks on writes to ROM Enabling tracing refresh cycles Enabling tracing DMA cycles Enabling tracing HOLD HLDA cycles Enabling 16bit symbol display Defining the DT register value for symbol display Simulated I O Configuration Simulated I O is described in the Simulated I O reference manual Interactiv...

Page 63: ...tion pod the clock speed is 1 MHz When you use an emulation pod with clock faster than 16 MHz you need to select the high speed access mode to run the emulator with no wait state If the high speed access mode is not selected one wait state is inserted by the emulator external Selects the clock input to the emulator probe from the target system You must use a clock input conforming to the specifica...

Page 64: ...f the emulator configuration How you answer this configuration question is important in some situations For example when the external clock has been selected and the target system is turned off reset to monitor should not be selected otherwise configuration will fail When an external clock source is specified this question becomes Enter monitor after configuration using external clock and the defa...

Page 65: ...y modify internal RAM or SFR Display modify target system memory Load store target system memory Caution If your target system circuitry is dependent on constant execution of program code you should restrict the emulator to real time runs This will help insure that target system damage does not occur However remember that you can still execute the reset break and step commands you should use cauti...

Page 66: ...e M37730xx or M37732xx select this item 7790 When you are going to emulate M37795xx M37796xx M37780xx or M37781xx select this item When you select one of these groups you will see the following question Micro processor type xxxx group Select the chip you are going to emulate Note If your processor is not included in the above groups select other in this question and answer to the following questio...

Page 67: ...7701S4SP S4ASP 7720S1 M37720S1FP S1AFP 7702M2 M37702M2 xxxFP M2AxxxFP 7730S2 M37730S2FP M2BxxxFP S2AFP M37703M2 xxxSP S2SP M2AxxxSP S2ASP M2BxxxSP 7732S4 M37732S4FP 7702M4 M37702M4 xxxFP S4AFP M4AxxxFP M4BxxxFP 7780S M37780STJ M37703M4 xxxSP STFP M4AxxxSP M4BxxxSP 7781M4 M37781M4TxxxJ M4TxxxFP 7702M6 M37702M6BxxxFP M6LxxxFP 7781E4 M37781E4TxxxJ E4TxxxFP 7702S1 M37702S1FP S1AFP 7795S M37795SJ S1BFP...

Page 68: ...f your processor These addresses can be specified on 16 byte boundaries If your processor has no internal RAM enter 0 as start address and end address of internal RAM area If your processor has only one SFR area specify the same value as the first one for the Second internal RAM questions Internal ROM area start address Internal ROM area end address Specify the start address and end address of int...

Page 69: ...tion pod Modify value for Stack Pointer SP Reset value for the stack pointer is automatically set up to the end of internal RAM area When the processor you select has no internal RAM it is set up to FFF hex If you would like to change the value answer yes to this question Reset value for Stack Pointer SP This question allows you to specify the value to which the stack pointer SP will be set on ent...

Page 70: ...an 16 MHz This question allows you to configure the emulator for clock internal external faster than 16 MHz no When the clock speed is equal or slower than 16 MHz select this answer The emulator runs with no wait state yes When the clock speed is faster than 16 MHz select this answer You will be asked the following question Enable high speed access mode for emulation memory When clock speed is fas...

Page 71: ...al mode You can define up to 16 different map terms which can be placed wherever you like Refer to Mapping memory section in this chapter The emulator generates the RDY signal and inserts one wait state for all memory access Note Changing this configuration will reset the memory map Monitor type The monitor type configuration question allows you to choose between a foreground monitor which is supp...

Page 72: ...nitor execution However in some cases you may require an emulation monitor tailored to the requirements of your system In this case you will need to use a foreground monitor linked into your program modules See the Using the Foreground Monitor appendix for more information on foreground monitors background Selects the use of the background monitor When you select the background monitor and the cur...

Page 73: ...und monitor to the user program If it is important that the symbol database contain both monitor and user program symbols you can create a different absolute file in which the monitor and user program are linked Then you can load this file after configuration Mapping memory The emulation memory consists of 128K 512K 1M 2M bytes mappable in 256 byte blocks You can define up to 16 different map term...

Page 74: ...ulation ROM Blocks of memory can also be characterized as guarded memory Guarded memory accesses will generate break to monitor requests Writes to ROM will generate break to monitor requests if the Enable breaks on writes to ROM configuration item is enabled see the Debug Trace Configuration section which follows To map memory for the sample program enter the following mapper commands delete all R...

Page 75: ...re the emulator so that write cycles are performed to both internal RAM or SFR and emulation memory In this case you can display the data written to emulation memory without suspending program execution To use this feature you need to map these area to emulation RAM eram When you do this you can display the contents of emulation memory with display memory command without suspending user program ex...

Page 76: ...mory may be different from the actual value of internal RAM Especially you should pay a close attention when seeing flags of SFR Note When you modify memory the emulator breaks to the monitor and writes data to internal RAM or SFR Therefore user program is suspended when modifying internal RAM or SFR Emulator Pod Configuration To access the emulator pod configuration questions you must answer yes ...

Page 77: ... target system during foreground operation yes The emulator will respond to interrupt signals from the target system no The emulator will not respond to interrupt signals from the target system Note You may need to set up switches inside the emulation pod to accept interrupts from the target system Refer to the manual provided with your emulation pod Enable watchdog timer This question allows you ...

Page 78: ... the write to ROM break is enabled yes Causes the emulator to break into the emulation monitor whenever the user program attempts to write to a memory region mapped as ROM no The emulator will not break to the monitor upon a write to ROM The emulator will not modify the memory location if it is in emulation ROM Trace background or foreground operation This question allows you to specify whether th...

Page 79: ...yzer This question is asked only when the 7720 processor is selected in Micro processor group configuration question You can direct the emulator to send DMA cycle data to emulation analyzer or not to send it yes When you enable tracing DMA cycles DMA cycles will appear as one analysis trace line no DMA cycles will not appear on analysis trace list Trace HOLD HLDA cycles by emulation analyzer You c...

Page 80: ...pper 8bit which will be used to display symbols in 16bit addresses The value specified in this question will be combined with the 16bit value in mnemonic field and symbols are displayed using the value Simulated I O Configuration The simulated I O feature and configuration options are described in the Simulated I O reference manual Interactive Measurement Configuration The interactive measurement ...

Page 81: ...ary file This file is deleted when you exit the Softkey Interface with the end release_system command When you specify a filename the configuration will be saved to two files the filename specified with extensions of EA and EB The file with the EA extension is the source copy of the file and the file with the EB extension is the binary or loadable copy of the file Ending out of emulation with the ...

Page 82: ...Interface with the end release_system command it saves you from having to modify the default configuration and answer all the questions again To reload the current configuration you can enter the following command load configuration RETURN 4 22 Configuring the Emulator ...

Page 83: ...we will discuss in more detail other features of the emulator This chapter discusses Internal RAM and SFR of 7700 Series Features available via pod_command Debugging C Programs Limitations and restrictions of the emulator This chapter shows you how to Use sequential trigger feature of the analyzer Store the contents of memory into absolute files Make coordinated measurements Use a command file Usi...

Page 84: ...tion memory Enter memory mapping screen with modify configuration command and map 100H through 27FH to emulation RAM 100h thru 27fh emulation ram RETURN end RETURN Loading the Sample Program The sample program is loaded with the following command load cmd_rds RETURN Running the Example Enter the following command to cause the emulator to run the sample program run from Init RETURN Modify the comma...

Page 85: ... writes data to internal RAM or SFR it is written to emulation memory simultaneously You can display this data in emulation memory without suspending user program execution Note The contents of emulation memory is updated only when user program writes data to internal RAM or SFR Therefore the contents of emulation memory may be different from the actual value in internal RAM or SFR Especially you ...

Page 86: ... configuration files in particular assume that the configuration of the HP 64700 pod is NOT changed except by the Softkey Interface Be aware that what you see in modify configuration will NOT reflect the HP 64700 pod s configuration if you change the pod s configuration with this command Also commands which affect the communications channel should NOT be used at all Other commands may confuse the ...

Page 87: ...ou can display source lines highlighted with the following command set source on inverse_video on RETURN To display only source lines use the following command set source only RETURN Specifying Address with Line Numbers You can specify addresses with line numbers of C source program For example to set a breakpoint to line 20 of main c program enter the following command modify software_breakpoints...

Page 88: ...ter the following command display data _int_data int_16 RETURN Using a Command File You can use a command file to perform many functions for you without having to manually type each function For example you might want to create a command file that loads configuration loads program into memory and displays memory To create such a command file type log and press TAB key You will see a command line l...

Page 89: ...ory Contents to an Absolute File The Getting Started chapter shows you how to load absolute files into emulation or target system memory You can also store emulation or target system memory to an absolute file with the following command store memory 0c000h thru 0c047h to absfile RETURN The command above causes the contents of memory locations C000 hex through C047 hex to be stored in the absolute ...

Page 90: ...memory access to emulation memory is not allowed Watch Dog Timer in Background Watch dog timer suspends count up while the emulator is running in background monitor Step Command with Foreground Monitor Step command is not available when the emulator is used with foreground monitor Step Command and Interrupts When an interrupt occurs while the emulator is ruuning in monitor the emulator fails to do...

Page 91: ... need to break the emulator into the monitor to use these commands Once you break the emulator into the monitor the stop or wait mode will be released Stack Address In some versions of 7700 microprocessor the stack can be located in Bank FF However the HP 64146A B emulator doesn t support the feature The stack must be located in Bank 0 Using the Emulator 5 9 ...

Page 92: ...Notes 5 10 Using the Emulator ...

Page 93: ...he monitor programs are named fm7700b a77 Comparison of Foreground and Background Monitors An emulation monitor is required to service certain requests for information about the target system and the emulation processor For example when you request a register display the emulation processor is forced into the monitor The monitor code has the processor dump its registers into certain emulation memo...

Page 94: ...en the emulation processor enters the monitor code to display registers it will not respond to target system interrupt requests This may pose serious problems for complex applications that rely on the microprocessor for real time non intrusive support Also the background monitor code resides in emulator firmware and can t be modified to handle special conditions Foreground Monitors A foreground mo...

Page 95: ...ogram with the following commands rasm77 s fm7700b a77 RETURN link77 fm7700b RETURN Enter s as command parameter m77cnvhp fm7700b RETURN If you haven t already assembled linked and converted the sample program do that now Refer to the Getting Started chapter for instructions on assembling linking and converting the sample program Modifying Location Declaration Statement You may need to modify the ...

Page 96: ...ter Modifying the Emulator Configuration The following assumes you are modifying the default emulator configuration that is the configuration present after initial entry into the emulator or entry after a previous exit using end release_system Enter all the default answers except those shown below Modify memory configuration yes You must modify the memory configuration so that you can select the f...

Page 97: ...ss all existing memory mapper terms are deleted and a term for the monitor block will be added Add the additional term to map memory for the sample program and map other area as target RAM 0c00h0 thru 0dfffh emulation rom RETURN default target ram RETURN end RETURN If your processor has no internal RAM map 0 hex through 2ff hex as emulation RAM See the Mapping Memory section of the Configuring the...

Page 98: ...d the sample program with the following command load cmd_rds RETURN Running User Program Before running the user program you should initialize the stack pointer by breaking the emulator out of reset break RETURN To run the sample program from address Init enter the following command run from Init RETURN Now you can use the emulator with the foreground monitor A 6 Using A Foreground Monitor ...

Page 99: ...tep command is not available when you are using the emulator with a foreground monitor Synchronized Measurement You cannot perform synchronized measurements over the CMB when using a foreground monitor If you need to make such measurements select the background monitor type when configuring the emulator Using A Foreground Monitor A 7 ...

Page 100: ...Notes A 8 Using A Foreground Monitor ...

Page 101: ...converter program will read the MELPS 7700 Hex format file with hex suffix and the symbol file with sym suffix It will generate the following HP format files HP Absolute file with X suffix HP Linker symbol file with L suffix HP Assembler symbol files with A suffix When the q option is specified warning messages are suppressed Suppose that you have the following two files sample hex MELPS 7700 Hex ...

Page 102: ...sections can be handled Up to 1000 functions can be handled If a label name or symbol name contains it will be replaced with _ Note When you convert files which contain no local symbols the assembler symbol files A file won t be generated In this case you will see an error message when you load the program into the emulator However this error will cause no damage on your operation B 2 Using the Co...

Page 103: ...isplay 2 18 breaks break command 2 20 guarded memory accesses 4 14 software breakpoints 2 20 write to ROM 4 18 C C program debugging 5 5 displaying in mnemonic memory display 5 5 displaying in trace listing 5 5 caution statements emulator cannot run without a stack pointer 4 10 internal memory must be assigned as emulation memory 4 14 pin alignment of emulator probe 3 2 real time dependent target ...

Page 104: ...convert absolute file to HP Absolute 2 7 converter m77cnvhp 2 7 coordinated measurements 4 20 5 7 copy memory 5 4 coverage analysis 5 4 D Debugging C programs 5 5 device table file 2 9 display command data 5 5 memory blocked 2 18 memory mnemonic 2 16 registers 2 24 symbols 2 14 trace 2 27 display data 5 6 displaying 16bit symbols 4 20 DMA controllers external 4 14 E emul700 command to enter the So...

Page 105: ...4 3 enable high speed access mode 4 10 enable watchdog timer 4 17 loading 4 21 monitor entry after 4 4 monitor type selection 4 11 processor mode register address 4 8 respond to target system interrupts 4 17 restrict to real time runs 4 5 saving 4 21 select chip 4 6 set up internal RAM address 4 8 set up internal ROM address 4 8 set up internal SFR address 4 8 stack pointer 4 9 target memory acces...

Page 106: ...reground monitor 1 9 5 8 step fails when an interrupt exists 1 9 5 8 trace internal RAM 1 9 5 8 watch dog timer 1 9 5 8 enable high speed access mode emulator configuration 4 10 enable watchdog timer emulator configuration 4 17 end command 2 32 4 21 exit Softkey Interface 2 32 external analyzer 2 26 configuration 4 21 external clock source 4 3 F file extensions EA and EB configuration files 4 21 f...

Page 107: ...nstallation hardware 2 2 software 2 2 interactive measurements 4 20 internal clock source 4 3 internal RAM 4 15 5 2 copying to emulation memory 2 20 L limitations of the emulator 5 8 link linking the sample program 2 7 linking the getting started sample program 2 7 loading absolute files 2 14 loading emulator configurations 4 21 local symbols 2 22 local symbols displaying 2 15 locked end command o...

Page 108: ...ping maximum number of terms 4 13 sequence of map load commands 4 15 mnemonic memory display 2 16 specify M flag and X flag 2 16 with symbols 2 17 modify command configuration 4 1 memory 2 19 software breakpoints clear 2 23 software breakpoints set 2 22 module 2 32 module emulation 2 8 monitor breaking into 2 20 monitor emulation 4 11 background 4 12 A 2 comparison of foreground background A 1 for...

Page 109: ...ing up emulation pod for target interrupts 3 3 Setting up the pod to accept target interrupts 4 17 software breakpoint cmds while running user code 2 21 software breakpoints not allowed in target ROM 2 21 software breakpoints only at opcode addresses 2 20 target accesses to emulation memory 4 14 target system must have clock circuit 3 3 4 4 turn on target system before turn on the emulator 3 2 use...

Page 110: ...mapping emulation or target 4 13 writes to 4 14 run command 2 18 S sample program description 2 3 for chapter 5 5 2 saving the emulator configuration 4 21 select chip emulator configuration 4 6 set command symbols on 2 17 set up internal RAM address emulator configuration 4 8 set up internal ROM address emulator configuration 4 8 set up internal SFR address emulator configuration 4 8 set up proces...

Page 111: ...limiters 2 11 supported microprocessors 1 3 symbol in memory display 2 17 symbols display 16bit symbols 4 20 symbols displaying 2 14 system overview 2 2 T target memory RAM and ROM characterization 4 13 target memory access size emulator configuration 4 16 target memory loading absolute files 2 14 target system dependency on executing code 4 5 Terminal Interface 2 11 trace display with C source li...

Page 112: ...acing background operation 4 18 trigger state 2 27 trigger specifying 2 26 U undefined software breakpoint 2 21 user target memory loading absolute files 2 14 W wait mode 1 10 watchdog timer enable disable by emulator configuration 4 17 window systems 2 32 write to ROM break 4 18 X X flag to display memory in mnemonic format 2 16 10 Index ...

Reviews: