MCDS User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
MCDS User’s Guide TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents ...................................................................................................................... ICD In-Circuit Debugger ................................................................................................................ Processor Architecture Manuals .............................................................................................. TriCore ...................................................................................................................................... MCDS User's Guide .............................................................................................................. 1 History ................................................................................................................................ 5 Introduction ....................................................................................................................... 6 Intended Audience 6 How to read this Document 6 Related Documents 7 Background Information ................................................................................................... 8 Trace Source 8 Program Trace 8 Trace Sink 9 Trace Filter and Trigger 9 The Emulation Device Concept 10 TRACE32 Support for Emulation Devices ...................................................................... 12 Feature Overview 12 Target Interface 12 MCDS Licensing 13 MCDS Basic Features ....................................................................................................... 15 MCDS Concept 15 MCDS of XC2000ED and C166 15 MCDS of TriCore 16 MCDS Configuration 17 General Settings 18 Timestamp Setup 18 Trace Buffer Configuration 19 AGBT Off-chip Trace Configuration 19 Trace Sources 19 Example: Core Trace on TriCore AURIX 20 Example: Bus Trace on TriCore AUDO-MAX 21 Trace Control 22 ©1989-2021 Lauterbach GmbH MCDS User’s Guide 1 Trace States 22 Trace Buffer Size and Usage 23 Trace Modes 23 Trace Trigger Configuration 23 Other Trace Configuration Commands 24 Basic Trace Usage 24 Trigger and Filter via Break.Set command 25 MCDS Breakpoints 26 Trace Filter 36 Examples 36 Watchpoints 40 Example 41 Trace Decoding 42 Bus Trace Information 44 Searching the Trace 45 Specific Cycles 45 Special Events 46 Exception Decoding 46 Exception Decoding Using Tables 47 Exception Decoding Using DCU Messages 47 Trace Limitations and Restrictions 48 MCDS Unlocking 49 MCDS Special Features .................................................................................................... 50 Benchmark Counters 50 Counting Chip-internal Signals 51 Example 51 Counting User-defined Events 51 Example 51 Example: Record BMC Counters in the Trace 53 Trace Through Resets and Power Cycles 55 Soft Resets 55 Hard Resets 55 Power Cycles 55 Reset Marker 56 Special Trace Sources via OTGM 56 Peripheral Trace 58 Example: Peripheral Trace for DMA of TC277TE 59 Trace Evaluation 60 Signal Options 62 Tracing the GTM 63 Example: GTM trace of TC265DE 64 miniMCDS 70 Known Issues and Recommendations 71 ©1989-2021 Lauterbach GmbH MCDS User’s Guide 2 Clock System ..................................................................................................................... 72 EEC Clock System 72 Maximum Clock Frequency 73 Allowed Clock Ratios 73 Verifying the Clock Setup 73 Device Specific Details 74 XC2000ED and C166 74 TriCore AUDO-NG (TC v1.3) 75 TriCore AUDO-F, AUDO-S and AUDO-MAX (TC v1.3.1) 75 TriCore AUDO-MAX (TC v1.6) 75 TriCore AURIX (TC v1.6.1) 76 MCDS Clock System 76 MCDS Sampling 76 MCDS Timestamps 77 Clock Counters 77 Timestamp Configuration 78 Timestamp Decoding 78 Periodic Trigger 78 MCDS Clock Configuration 79 Automatic Configuration with the CLOCK Commands 79 Manual Configuration 80 Deprecated Configuration 81 Emulation Memory ............................................................................................................ 82 Background Information 82 EMEM Partitioning 83 Memory Arrays and Tiles 83 Trace Buffer Configuration 84 GUI Integration 85 PRACTICE Functions 86 Co-operation with Third-party Usage 86 Configuration Example 87 Device Specific Details 88 TriCore AUDO-NG 88 TriCore AUDO-F 88 TriCore AUDO-S and AUDO-MAX 89 TriCore AURIX 89 AGBT High-speed Serial Trace ........................................................................................ 90 Background Information 90 Xilinx Aurora 91 Requirements 91 TriCore Chip Requirements 91 Target Board Requirements 92 TRACE32 Requirements 93 ©1989-2021 Lauterbach GmbH MCDS User’s Guide 3 AGBT Configuration 96 Trace Streaming 96 Limitations and Restrictions 97 Advanced Emulation Device Access ...............................................................................99 EEC Access 99 EEC EMEM Access 100 EEC Register Access 100 Impact of Direct EEC Access 101 Guarded MCDS Programming 101 Timestamp Usage 102 Trigger Program Example 102 Example Scripts 104 Known Issues and Application Hints .............................................................................. 105 Missing Instructions 105 Invalid Program Trace at the Beginning of the Trace Recording 105 No Trace Content Displayed 105 FIFOFULL error 106 Concurrent Usage of Different Trace Methods 106 PCP Channel ID 107 Workaround for the TASKING PCP C/C++ Compiler 107 Glossary ............................................................................................................................. 108 Infineon Glossary 108 Lauterbach Glossary 109 ©1989-2021 Lauterbach GmbH MCDS User’s Guide 4 MCDS User’s Guide Version 30-Apr-2021 History ©1989-2021 Lauterbach GmbH MCDS User’s Guide 5 Introduction The MCDS (Multi-Core Debug Solution) is an on-chip trigger and trace solution from Infineon, available for the Infineon TriCore and C166/ XC2000 devices. It is used during the development stage of an embedded system for debugging, tracing, profiling, and verification. Using TRACE32, the user can set up the MCDS for performing on- and off-chip trace. Based on the generated trace recording, the user can analyze, profile, and verify the behavior of his application. Additionally, it is possible to program triggers for stopping program execution, redirecting them to device pins or to influence the trace recording, e.g. for recording only the trace data of interest. The on-chip memory used for storing the trace data can also be used for calibration, a technique that allows the dynamic overlay of code and data memory with alternate code or parameters. Calibration is not supported by Lauterbach tools. TRACE32 can be configured to cooperate with third-party tools to share resources, e.g. the on-chip memory. For using these features, a special version of the chip is required, the Emulation Device. But also some of the Product Devices include the MCDS or at least a reduced variant of the MCDS, the so-called Mini-MCDS. For related information, refer to the documentation of your device. This MCDS User’s Guide is intended to guide the TRACE32 user through the configuration of the on-chip trace, trigger and filter setup. Additionally it provides background knowledge. This User’s Guide is not intended to replace the available training manuals or the TRACE32 command references. Intended Audience The reader of this document is assumed to have basic knowledge in using TRACE32 and has gathered experience using it. Additionally specific knowledge of the architecture and the device is mandatory, see the Infineon documentation. The MCDS User’s Guide is not a replacement for the Infineon documentation of the Emulation Devices. How to read this Document It is recommended to completely read the chapters Background Information and MCDS Basic Features before reading the other ones. Developers responsible for the PLL setup are expected to read the EEC Clock System chapter to understand why the application should program the EEC clocks. It is not necessary to read this documentation completely for using the MCDS. This User’s Guide is separated into independent chapters handling different topics. These chapters can be read independently and in arbitrary order. Reading the first paragraph of a chapter gives the reader all the information to decide whether it is important for his use case or not. Some of the TRACE32 features require a deeper understanding of the MCDS and the Emulation Device implementation. The related parts and chapters of this User’s Guide are indicated to be for MCDS Expert Users only. ©1989-2021 Lauterbach GmbH MCDS User’s Guide 6 The MCDS on TriCore chips does not only support the TriCore cores, it also supports the PCP and the GTM. When referring to TriCore in general, the entire TriCore device is addressed. This includes the TriCore cores as well as the PCP or GTM cores. From the user’s point of view the MCDS implementation for C166 and XC2000 devices is identical. Within this document there is no differentiation between C166 and XC2000. Related Documents Before using the MCDS it is mandatory to know the architecture under debug. The most important information about the device can be found in the Infineon Documentation: • User’s Manual and/or Target Specification • Emulation Device Target Specification (for MCDS Expert Users) • Data-, Delta- and Errata Sheets Please contact Infineon for this documentation. This document assumes that the reader already knows how to use the TRACE32 debugger for the corresponding device. The related information can be found in the Processor Architecture Manuals: • “TriCore Debugger and Trace” (debugger_tricore.pdf)