KeyStone Advance Debug

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Cortex-M3 Implementation Overview. Chapter 6 in the reference book.
AVEKSHA: A Hardware-Software Approach for Non-intrusive Tracing and Profiling of Wireless Embedded Systems SenSys 2011 Best Paper Matthew Tancreti, Mohammad.
8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
Parul Polytechnic Institute
Dr. Rabie A. Ramadan Al-Azhar University Lecture 3
C6614/6612 Memory System MPBU Application Team.
KeyStone C66x CorePac Overview
Yaron Doweck Yael Einziger Supervisor: Mike Sumszyk Spring 2011 Semester Project.
Extended Memory Controller and the MPAX registers And Cache
FPGA Configuration. Introduction What is configuration? – Process for loading data into the FPGA Configuration Data Source Configuration Data Source FPGA.
StreamBlade SOE TM Initial StreamBlade TM Stream Offload Engine (SOE) Single Board Computer SOE-4-PCI Rev 1.2.
Multicore Applications Team
Last update: August 9, 2002 CodeTest Embedded Software Verification Tools By Advanced Microsystems Corporation.
KeyStone Training Multicore Navigator Overview. Overview Agenda What is Navigator? – Definition – Architecture – Queue Manager Sub-System (QMSS) – Packet.
Keystone PCIe Usage Eric Ding.
ARM-DSP Communication Architecture
Technion Digital Lab Project Performance evaluation of Virtex-II-Pro embedded solution of Xilinx Students: Tsimerman Igor Firdman Leonid Firdman.
NS Training Hardware. System Controller Module.
Keystone PCIe Usage Eric Ding.
Multicore Software Development Kit (MCSDK) Training Introduction to the MCSDK.
Multicore Navigator: Queue Manager Subsystem (QMSS)
Cortex-M3 Debugging System
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Multicore Software Development Kit (MCSDK) Training Introduction to the MCSDK.
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
MMI Applications Team October 2011 KeyStone C66x Multicore SoC Overview.
Lecture 2. General-Purpose (GP) Computer Systems Prof. Taeweon Suh Computer Science Education Korea University ECM586 Special Topics in Embedded Systems.
MICE III 68000/20/30 MICETEK International Inc. CPU MICEIII MICEView Examples Contents Part 1: An introduction to the MC68000,MC68020 and Part.
Ch. 9 Interrupt Programming and Real-Time Sysstems From Valvano’s Introduction to Embedded Systems.
KeyStone Training Network Coprocessor (NETCP) Overview.
Extended Memory Controller and the MPAX registers
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
C66x KeyStone Training HyperLink. Agenda 1.HyperLink Overview 2.Address Translation 3.Configuration 4.Example and Demo.
Cisco S2 C4 Router Components. Configure a Router You can configure a router from –from the console terminal (a computer connected to the router –through.
Extended Memory Controller and the MPAX registers And Cache Multicore programming and Applications February 19, 2013.
Keystone PCIe Usage Eric Ding.
Multicore Applications Team
David Abbott - JLAB DAQ group Embedded-Linux Readout Controllers (Hardware Evaluation)
Keystone Family PCIE Eric Ding. TI Information – Selective Disclosure Agenda PCIE Overview Address Translation Configuration PCIE boot demo.
MMI Applications Team October 2011 KeyStone C66x Multicore SoC Overview.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced Debugging on the RX600.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced E 2 Studio Topics.
MSP432™ MCUs Training Part 14: Serial Wire Output Trace
Keystone Advanced Debug. Agenda Debug Architecture Overview Advanced Event Triggering DSP Core Trace System Trace Application Embedded Debug Support Multicore.
This material exempt per Department of Commerce license exception TSU Xilinx On-Chip Debug.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L05I Advanced Debugging on the RX600 Fatih Peksenar.
Design of DSP testing environment Performed By: Safovich Yevgeny Instructors: Eli Shoshan Yevgeni Rifkin הטכניון - מכון טכנולוגי לישראל הפקולטה.
Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.
NS Training Hardware Traffic Flow Note: Traffic direction in the 1284 is classified as either forward or reverse. The forward direction is.
Network Coprocessor (NETCP) Overview
DSP C5000 Chapter 10 Understanding and Programming the Host Port Interface (EHPI) Copyright © 2003 Texas Instruments. All rights reserved.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
HCS12 Technical Training Module 15 – Break Module Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
KeyStone SoC Training SRIO Demo: Board-to-Board Multicore Application Team.
Chapter 3. Advanced Hardware Fundamentals The various parts you will commonly find in an embedded-system circuit 발표일시 : 발표자 : 채화영.
Lecture 2. General-Purpose Computer Systems Prof. Taeweon Suh Computer Science Education Korea University ECM586 Special Topics in Embedded Systems.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Introduction to Operating Systems Concepts
Voice Controlled Robot by Cell Phone with Android App
Dr. Michael Nasief Lecture 2
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Debugging Debug environments Debug via serial
Sem 2v2 Chapter4: Router Components
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
JTAG, Multi-ICE and Angel
Embedded Development Tools
Presentation transcript:

KeyStone Advance Debug KeyStone Training Multicore Applications Literature Number: SPRP803

Agenda Debug Architecture Overview Advanced Event Triggering DSP Core Trace System Trace Application Embedded Debug Support Multicore System Analyzer (MCSA) Indicates features that are new on the Keystone generation of the C6000 Family

Debug Architecture Overview KeyStone Advance Debug

Debug Architecture Features Advanced Event Triggering Hardware Breakpoints/Watchpoints Event Monitoring/Counting Core Trace Control DSP Core Trace Export Program, Timing, Data, Event Info System Trace Export Bus Statistics and Events (CP Tracer) Export Software Messages Cross Triggering

Trace Data Capture Mechanisms DSP Core Trace Debug Port EMU pins (11) for export to an external receiver* Dedicated TI Embedded Trace Buffer (TETB) 4KB on each core System Trace Debug Port EMU pins (4)for export to an external receiver* System Level TI Embedded Trace Buffer (TETB) 32KB per device * XDS560v2 Pro = 2GB

Embedded Trace Buffer (TETB) Can be optionally drained “on the fly” to L2, shared, or external memories Can trigger event on ½ full status or full status Advantages Virtually extends the limited ETB size Data can be streamed from the device via Ethernet or any other transport

External Trace Receiver Debug Subsystem Debug Subsystem System Trace Debug Port External Trace Receiver TETB C66x CorePac DSP Core Trace AET Key Points Each CorePac has a copy of AET and its own XDS560 (Core Trace) unit. It also has an ETB where trace data can be captured on all cores simultaneously. There is only a single set of pins out to the debug port. These pins either need to be shared across CorePacs or all dedicated to a single CorePac. The recommendation is to allocated all pins to a single CorePac in order to get the best trace bandwidth. There is one System Level ETB which is shared between all cores for STM. System Trace can also be sent out the pins. The pins used for System Trace are independent from Core Trace. (This may not always be the case. It’s possible that future device might multiplex pins.)

Advanced Event Triggering KeyStone Advance Debug

Advanced Event Triggering (AET) Logic that can monitor Program Bus Activity Data Memory Bus Activity System Events Non-Intrusive / Real Time Programmable at load or run time Key Points AET is completely non-intrusive. Simplest configuration is a hardware breakpoint (Generate a halt trigger when the PC is equal to a specified value). More complex scenarios are possible, assuming the hardware is understood. Use Cases: Simple Use Case Hardware breakpoint – Halt when PC address is a specified value Hardware Watchpoint – Halt when Write address is a specified valu Complex Examples Store PC trace sample on every 10000th cycle. (Basis for statistical profiling) Store data trace samples when a task other than Task A is executing and the write address is in the range between address B and C. (Monitor for a write to a tasks stack outside the context of that task)

Advanced Event Triggering Inputs Input Logic 6 Dual Range Address Comparators 4 Program/Data Address w/ Value Qualify 2 Program Address Only 4 Auxiliary Event Generators 4 State Sequencer 2 Timers/Counters With Min/Max Watermark Capabilities …. Key Points This is not an exhaustive list, but these are the most popular inputs Auxiliary Event Generators allow almost any system level event to be used as an input Use Cases: Watermark Counter – Can be used as a monitor for the longest latency for a specified interrupt over an indeterminate period of time. Notes The CCS breakpoint manager doesn’t currently give an interface to configure the State Sequencer. This can still be used with AETLIB.

Advanced Event Triggering Outputs (Triggers) Output Logic (Triggers) CPU Halt Request* Interrupt Counter Inc/Dec/Reset (events) Timer Start/Stop (cycles) Store Trace Sample (7 Streams: PC, time, read a-d write a-d and pc tag) Start Trace (7 Streams) State Sequencer Transition …. Notes The CPU Interrupt Halt request is treated as a NOP when the debugger is not connected. A fielded application that might generate a halt trigger will not actually halt. This is by design. The 7 Trace Streams are PC, Timing, Read Address, Read Data, Write Address, Write Data, and PC Tag A Store Trace Trigger can be thought of as like a pushbutton light switch. When the switch is depressed, the light comes on. When it is released, the light goes off. So, for the AET Trigger Builder, when the condition generating the trigger is true, trace samples are stored. When it goes false, trace samples are not stored. A Start Trace trigger can be thought of as a normal light switch. When the switch is flipped, the light comes on and remains on, until someone shuts it off. When the event for a start trace trigger is true, tracing is started and continues even after the logic of the trigger builder is false. In order to turn off the trace stream, a halt trace trigger must be issued. *Halt Request ignored when debugger not connected

KeyStone Advance Debug DSP Core Trace KeyStone Advance Debug

DSP Core Trace Core Trace (aka XDS560 Trace, CPU Trace) Event Trace Allows real-time, non intrusive, cycle accurate logging of PC (PC Trace) and Data (Data Trace) activity on the DSP Memory Buses. Captured Trace data is compressed by on-chip hardware, passed either to the ETB or an external receiver, and then decoded on the host (with CCS or a stand alone decoder) Event Trace Event Trace is similar to PC trace, but allows selection of a subset of events that are tagged within the Trace Output. Notes Core Trace is single core focused. There is no means for cross core alignment yet. Core Trace is similar to a Logic analyzer placed on the CPU Memory Busses. This is an important point. Reads/Writes that don’t use these busses cannot be traced . So EDMA reads/writes and CPU Register reads/writes are not able to be traced. PC and Timing Trace compress nicely and when captured alone. Should always be able to be captured without any bandwidth issues. Data Trace does not compress nicely and can cause bandwidth limitations. On average, Trace can capture a single data sample every ~80 cycles. (There is a fifo that eases this restriction, but it is only 8 samples deep and will easily overflow if this limit is passed more than very small periods of time. Trace can be configured in two ways to handle bandwith issues. It can be configured to just drop trace data when the bandwith limit is passed (This results in loss of trace data) Or it can be configured to stall the processor to allow the fifo to be emptied. (This can cause non real-time execution) The ideal situation, when capturing data trace, is to allow AET to filter the data being captured to only that which the user is interested. With Event Trace, we don’t have the on/off triggers. Trace is just captured from the beginning. A set of events can be configured, and the program address where these events ccur will be highlighted in the trace. Note the following limitation. Only a single event will be captured on any single sample, and these are prioritized by the input event number. So, if event 1, 3, and 4 all occur on the same cycle, the event trace will only indicate event 1. If only 3 and 4 occur, it will only indicate 3. It might be necessary to capture trace multiple times with different priorities in order to find what is actually occurring on each cycle. And, the least frequent events should be given the higher priority.

KeyStone Advance Debug System Trace KeyStone Advance Debug

System Trace Allows System Level monitoring of Application Events and Resources Two Options Software Messages Hardware Messages – Common Platform Tracer (CPTracer) Notes The Software Messages are much like a printf, without the drawbacks of printf. Drawbacks of printf Consume many cycles of PC execution Even worse, the CPU halts and waits for CCS to poll it to pull up the data. Printf messages will always be printed in roder of the CPU when CCS polls, so data can look out of order CP Tracer modules are Statistics Counters that periodically push their contents out the System trace port.

STMLib is a component of the CToolsLib Family of libraries Software Messaging Enabled By System Trace Library (STMLib) Advantages over Standard Printf Real-time System Level Cycle aligned Up to 240 User Defined Channels Reduced capability library build (compact) also provided (< 1K ) Notes Channels simply allow the user to filter the data based on each channel. Cycle aligned - get information from different part of the device and align the timing STMLib is a component of the CToolsLib Family of libraries Download free via Gforge: https://gforge.ti.com/gf/project/ctoolslib/frs/

Common Platform Tracer (CPTracer) CPT Modules - Provide data for slave buses. Profiling: Periodically export STM Messages for statistics counters Throughput Counter 0,1 – Bytes of slave acknowledged accesses Wait Counter – Number of cycles a master access must wait for slave acknowledge Access Counter – Number of unique transactions Event Logging New Request Last Read Last Write Can define window in which the statistics are stored to the trace buffer and the counters are reset Can log throughput, wait counter and number of transactions Or other events

KeyStone CP Tracer Modules Legend KeyStone CP Tracer Modules Bridge Wireless Apps Only CPU/2 256b TeraNet SCR S VUSR MSMC_SS for EMIF_DDR3 (36b) Media Apps Only S M3_DDR CPT M CP Tracer S M3_SL2 CPT 4 CPTs for SRAM (36b) VUSR M S CPT M DDR3 CPT CPT TPCC 16ch QDMA M TC0 M TC1 EDMA_0 XMC X 4/ x 8 CONFIG CPU/3 32b TeraNet SCR SRIO S x5 CP Tracer (x5) S x8 CP Tracer (x8) S CPU/3 128b TeraNet SCR CPU/3 32b TeraNet SCR x7 x4 for Wireless x8 for Media CP Tracer (x7) S S CorePac M S TETB x2 TSIP S S AIF2 SRIO M SRIO S MPU CPT x4 M S VCP2 Bridge 12 S TCP3D PA/SA M Bridge 13 SCR CPU /2 x2 S TPCC TPTC S TCP3E TPCC 64ch QDMA M TC2 TC3 TC4 TC5 TC6 TC7 TC8 TC9 Bridge 14 S FFTC SCR CPU / 3 x4 S TPCC TPTC SCR CPU / 3 x4 S TPCC TPTC EDMA_1,2 Monitors transactions from AIF,SRIO, Core, TCs PA/SA S CPT Monitors transactions from AIF, TCs S TCP3e_W/R Notes This slide shows the locations of the CP Tracer modules in Keystone. CPT S TCP3d MPU CPT S Semaphore AIF / DMA M FFTC / DMA RAC_BE0,1 TAC_FE MPU CPT x2 S QMSS CPU / 3 128b SCR VCP2 (x4) S S STM TETB CPU/6 32b TeraNet SCR S DebugSS SEC_CTL S PLL_CTL Global Timestamp Bootcfg QMSS M MPU CPT S QMSS PCIe M PCIe S CPU/3 32b TeraNet Write-only SCR Timer S GPIO I2C INTC UART X8 / x16 CPU / 6 32b TeraNet SCR DebugSS EMIF16 S DAP (DebugSS) M CP Tracer (x5) M Boot ROM S S STM CPU / 3 32b TeraNet SCR CP Tracer (x8) M x2 Preliminary Information under NDA - subject to change S SPI CP Tracer (x7) M TSIP0,1 M S TETB … 18

CPTLibis a component of the CToolsLib Family of libraries Configuration CCS Breakpoint Manager CPTracer Library (CPTLib) Use Case based APIs Enable/Disable functions allow isolation of Trace Data generation CPTLibis a component of the CToolsLib Family of libraries Download free via Gforge: https://gforge.ti.com/gf/project/ctoolslib/frs/

CPTracer Sample Output Notes This data initially appears in CCS as textual output, with a timestamp and value for each item. Once this has been captured, selecting Tools->Analysis->STM Graph plots the results like this. The wiki page that this points to initially reflected steps for CCSv5. X axis – time, Y axis % or raw numbers Red - > bus BW (bytes divide by the window size) Green – average access bytes/cycles blue transaction per second, Yellow – accumulate wait time (0) purple – average latency (0) light blue % bus throughput access happen / requests http://processors.wiki.ti.com/index.php/CorePac_1_L2_CPT_-_CCS_setup_XDS560v2_System_Trace_Example

Cross Triggering Provides a means to propagate debug events from one processor to another. Other processors can generate actions upon cross trigger Sample Debug Events Processor Entering Debug State Watch Point Match ETB Full Sample Debug Actions Restart Interrupt Request Start Trace

Application Embedded Debug Support KeyStone Advance Debug

Application Embedded Debug Support CToolsLib – A suite of libraries that can be used for embedding debug elements into an application AETLib ETBLib CPTLib DSPTraceLib STMLib Available Free Via GForge: https://gforge.ti.com/gf/project/ctoolslib/frs/ Notes AETLIB – For configuring the programmation of triggers in the Advanced Event triggering. Also provides APIs for configuring and reading the AET timer/counters. ETBLIB – For reading data from the Embedded Trace buffers on the fly. CPTLIB – For configuring the CP Tracers to capture data DSPTraceLib – For configuring Core Trace and the trace receivers from within an application STMLIB – Implementation of the STM Software Message API

AETLib Provides programmatic access to the Advanced Event Triggering logic Advantages Reuse of limited AET resources (task stack monitoring) More granularity for enabling/disabling AET/Trace at specific points of the application Capture of Trace data from fielded devices Use Case Monitor task stacks for overflow by reusing AET resources. AETLIB reconfigures the AET resources to watch the top of the currently executing tasks stack. Without AETLIB, there are only enough resources to watch 1 data range at a time, and we can’t watch dynamic task stacks because we don’t know where they will be allocated.

ETBLib Provides application access to configuration of the embedded trace buffer Advantages ETB can be configured without Debugger connection Dynamic draining of ETB is supported Events generated on half full and full Data can be moved from ETB into internal memory and passed off via any transport (Ethernet, Srio, etc) Virtually extend the size of the ETB

System Trace Libraries STMLib Application Interface to System Trace Software Messages Advantages Small function overhead Real-Time System Level Time Stamp CPTLib Application Interface to Common Platform Tracer Configuration

Multicore System Analyzer (MCSA) KeyStone Advance Debug

Multicore System Analyzer (MCSA) Suite of tools providing real-time visibility into performance and behavior of an application. Information collected in various ways Advanced Tooling Features: Real-time event monitoring Multicore event correlation Correlation of software events, hardware events and CPU trace Real-time profiling and benchmarking Real-time debugging http://processors.wiki.ti.com/index.php/Multicore_System_Analyzer

Analysis Features Benchmarking: Finding out how long it takes some action to complete. Includes 'context aware' benchmarking for multi-threaded analysis CPU and Task Load Monitoring: real-time visibility into how busy your system really is O/S Execution Monitoring: monitoring task switches and the state of kernel objects such as semaphores Filtering events Multicore Event Correlation

Current/Future Features Ethernet Transport JTAG Stop-Mode JTAG Run-Mode Execution Graph CPU Load Task Load Benchmark/Duration Context Aware Profile Statistics / Count Analysis ETB Draining CPU Trace, STM, UIA Correlation Logging on Linux Realtime Config & Software Instrumentation Control USB Transport STM Transport Remote Debug Back Trace System Analyzer 1.0 MCSA User’s Guide System Analyzer 1.1

For More Information For more information, refer to: Debug and Trace for KeyStone I Devices User’s Guide Debug and Trace for KeyStone II Devices User’s Guide For questions regarding topics covered in this training, visit the support forums at the TI E2E Community website.