CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.

Slides:



Advertisements
Similar presentations
Using the Web-based Training Tool MyFloridaMarketPlace Revised Date: 12/14/06.
Advertisements

1 Appendix A: Writing and Submitting SAS ® Programs A.1 Writing and Submitting SAS Programs.
Microsoft Office 2007 PowerPoint Web Feature Creating Web Pages Using PowerPoint.
© by Pearson Education, Inc. All Rights Reserved.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Microsoft Windows Vista Chapter 6 Customizing Your Computer Using the Control Panel.
The Internet. Telnet Telnet means using your computer as a terminal. All commands you type are sent to the host computer you are connected to and executed.
Using PDG with e2studio: Example
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
ExitTOC Run & Route Directions 2003 Editing Run and Route Directions Edulog.nt v9.2 Use the buttons to navigate the training package First PagePreviousNextLast.
Building and debugging Electric 1 Building and debugging GNU Electric version 8.08 by Java SDK & Eclipse (Ganymede) by Kazzz (a Japanese engineer) May.
Marlene Galea.  The JDK (Java Development Kit)  An IDE (Integrated Development Environment) ◦ Different IDEs include:  JCreator  NetBeans  BlueJ.
Introduction Purpose Objectives Content Learning Time
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® PowerPoint 2010 © 2011 The McGraw-Hill Companies,
Silicon Labs ToolStick Development Platform
Infinity-project.org Engineering education for today’s classroom The Infinity Project SM LabVIEW for The Infinity Project.
CHAPTER 1 XNA Game Studio 4.0. Your First Project A computer game is not just a program—it is also lots of other bits and pieces that make playing the.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Visual Basic Chapter 1 Mr. Wangler.
IT 211 Project Integration and Deployment Lab #11.
© FPT Software Code Review with VS © FPT Software Agenda What is Code review? Run Code analysis in VS 2012 Configuring Code Analysis rule set.
Microsoft Office 2007 PowerPoint Web Feature Creating Web Pages Using PowerPoint.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Access 2013.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Teacher’s Assessment Assistant Worksheet Builder Starting the Program
ADAM2 Single Remocon MCU IDE User’s Manual S/W Integrated Development Environment - Assembler - Simulator - Code Wizard V1.0 Technical Sales Team, ETA.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications.
Session Objectives • Login to PeopleSoft Test Framework(PTF)
Active-HDL Interfaces Debugging C Code Course 10.
Active-HDL Interfaces Building VHPI Applications C Compilation Course 9.
© 2010 IBM Corporation What’s New in RSA 8.0 Beta 1 – Deployment modeling March, 2010.
Chapter 3 The Visual Basic Editor. Important Features of the VBE Alt-F11 will open the Visual Basic Editor. The Code window is to the right, Project Explorer.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Programmable Logic Training Course HDL Editor
Design Verification Code and Toggle Coverage Course 7.
CISB434: VisiRule 1.
Getting to Know Your Computer Your File System Applications What’s running on your machine Its own devices Networking.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Engineering\CADD Systems Office CADD Manager's Series Customizing the Interface.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
After clicking the link, you will be taken to this page. Both the StudyCards™ and TI StudyCards™ Creator for Windows® needs to be downloaded. The first.
Debugging TI RTOS TEAM 4 JORGE JIMENEZ JHONY MEDRANO ALBIEN FEZGA.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Visual Basic for Application - Microsoft Access 2003 Finishing the application.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
Open project in Microsoft Visual Studio → build program in “Release” mode.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course describes Coverage, a utility that is used.
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Workshop Setup The software/hardware used in this workshop are:
Lab 1: Using NIOS II processor for code execution on FPGA
Computer Programming I
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
Debugging with Eclipse
Software Setup & Validation
Debugging with Eclipse
Embedded Development Tools
Presentation transcript:

CCS APPS CODE COVERAGE

CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code within a program that is not being exercised by test cases –Code coverage tools measure how thoroughly tests exercise programs

CCS APPS Code Coverage Tools with CCS There are two main techniques to obtain code coverage data with CCS for C6000 targets –Simulator Code Coverage Tool: Simulation based code coverage collection –Compiler Path Profiler Tool: Compiler instrumented profiling that can be used for code coverage collection

CCS APPS Simulation Code Coverage Tool Generates code coverage data for application –Instrumentation and collection handled by the simulator non- intrusively View function and line coverage data Enable editor highlighting of line coverage data

CCS APPS Limitations Only supported on C6000 simulators No support on hardware targets (tool is a simulator feature)

CCS APPS Compiler Code Coverage Tool Generate code coverage data for application –Data is collected using the compiler Path Profiling capability –Path profiler will add additional instrumentation code to the application View function and line coverage data Enable editor highlighting of line coverage data (TBD)

CCS APPS Path Profiling Code is instrumented to count number of times each section is entered –Not all sections are instrumented –Post processing computes counts for sections not instrumented Run-time-support function writes the collected information into a profile data file called a PDAT file –This file is written to the host using C I/O –The write occurs when the run-time-support exit() function is called Can execute on any HW or simulation platform Collected profile data can be used for generating code coverage reports Learn more about Path Profiling in the C6000 Compiler User’s Guide – (Section 3.8)

CCS APPS Path Profiling cl6x --gen_profile_info app.out Execute pprofout.pdat pdd6x test.prf cl6x -- use_profile_info=f.prf Build and link to create instrumented executable Execute multiple times with different input data RTS function writes pprofout.pdat via C I/O Profile data decoder Saves overhead on target Build and link to create optimized executable

CCS APPS Path Profiling – Generate Code Coverage cl6x --gen_profile_info app.out Execute pprofout.pdat pdd6x test.prf cl6x -use_profile_info=test.prf --onlycodecov Build and link to create instrumented executable RTS function writes pprofout.pdat via C I/O Profile data decoder Saves overhead on target Generates code coverage data

CCS APPS Path Profiling – Generate Code Coverage cl6x --gen_profile_info app.out Execute pprofout.pdat pdd6x test.prf cl6x -use_profile_info=test.prf --onlycodecov Build and link to create instrumented executable RTS function writes pprofout.pdat via C I/O Profile data decoder Saves overhead on target Generates code coverage data Handled by CCS CodeGen Code Coverage processer

CCS APPS Profiling Overhead Compile Time Overhead –Additional compiler passes pprof6x.exe and pdd6x.exe –Activated under --[gen|use]_profile_info –Runs between parser and optimizer –Handles adding profile code, or using profile info –Slows build time Memory Footprint Overhead –Additional instructions for collecting profile information –.ppdata section contains memory for the profile information Runtime Overhead –Additional instructions for collecting profile information

CCS APPS Profiling Limitations PDAT file is written to the host when the run-time-support exit() function is called –Application must terminate to reach the exit() function –Run-time-support library must be used Following applications will need additional tweaking to support writing of path profiling data –Non-terminating –No main() –Custom boot/initialization routine –No run-time initialization model selected in the linker options JTAG connection required for C I/O call to write the PDAT file to the host (CCS uses JTAG to communicate to the target) Check the C6000 Compiler User’s Guide for more details on how to workaround these limitations: – (Section 3.8)

CCS APPS Reduce Profile Overhead Path profile block counts also unaffected by compiler options Thus, reduce profile overhead by choosing options that reduce code size For instrumented build consider: –-ms3: Smallest code size –-mu: Disable software pipelining –-o: Continue using optimization –-oi0: Disable automatic inlining Avoid making the code so slow it takes too long to run the tests –Especially if using a simulator

CCS APPS LABS

LAB conventions Before starting, it is important to review some lab conventions that will ease your work… Lab steps are in black and numbered for easier reference 1.… 2.… Explanations, notes, warnings are written in blue –Warnings are shown with –Information is marked with –Tips and answers are marked with –Questions are marked with

CCS APPS Simulation Code Coverage: Exercise Summary Key Objectives –Import/Build/Load MainSort.c example –Enable CCS Code Coverage tool –Run the program and view Code Coverage data Tools and Concepts Covered –Importing an existing CCS Eclipse project –CCS Code Coverage tool

CCS APPS Import/Build/Load ‘MainSort’ Project 1.Import the MainSort project into CCS (Project - > Import Existing CCS Eclipse Project) 1.Enable the option to Copy projects into workspace 2.In the Project Explorer view, select the MainSort project (it should appear [Active – Debug]) to make it active 1.Check to make sure that the c674x_cpu_sim_le.ccxml file is [Active]. If it is not [Active], right-click on the file and select Set as Active Target Configuration in the context menu 3.Click on the Debug icon in the toolbar. This will build the project, start the debugger, load the program and run to main

CCS APPS Enable Code Coverage Collection 1.Open the Profile Setup view (Tools-> Profile -> Setup Profile Data Collection) 2.In the Profile Setup view: 1.Press the Activate button to enable profiling/coverage collection 2.Enable the Collect Code Coverage and Exclusive Profile Data option 3.Press the Save button 3.Code Coverage collection has been enabled

CCS APPS Collect Coverage Data and View Results 1.Press the Resume button to run the program 1.The program should terminate on its own 2.View the collected coverage data in the Coverage views (Tools-> Profile -> Setup Profile Data Collection) 3.Two views will be opened: 1.Function Coverage view: Displays function coverage data 2.Line Coverage view: Displays line coverage data 4.In the Line Coverage view, select the Highlight coverage info in editor button. This will highlight line coverage data in the editor – green for lines that were executed and red for lines not executed

CCS APPS View Function and Line Coverage Results

CCS APPS CGT Path Profiling Tool: Exercise Summary Key Objectives –Enable compiler path profiling collection –Run the program and view compiler Code Coverage data Tools and Concepts Covered –Compiler path profiling option –View path profiling based code coverage data in CCS

CCS APPS Enable Compiler Path Profiling Collection 1.In the Project Explorer view, right-click on the MainSort project and select Properties in the context menu to open the MainSort project properties dialog 2.Navigate to the Feedback Options (Build -> C6000 Compiler -> Advanced Options -> Feedback Options) and enable the option for Generate profile feedback data 3.Hit OK to apply the changes

CCS APPS OPTIONAL: Change Active Target Configuration 1.In the Project Explorer view, select the MainSort project (it should appear [Active – Debug]) to make it active 2.Right-click on the EXPKITOMAPL138.ccxml file in the Project Explorer view and select Set as Active Target Configuration in the context menu The below steps are for if you have an OMAP L138 Experimenter Kit and would like to run the Compiler Code Coverage lab on it. If you do not have this hardware, you can continue to run on the simulator and skip the steps in this slide

CCS APPS Collect Path Profile Data and View Code Coverage Results 1.Click on the Debug icon in the toolbar to rebuild, load and run to main 2.Navigate to Tools -> Profile and enable the option for Generate profile feedback data 3.Press the Resume button to run the program 1.The program should terminate on its own 4.View the collected coverage data in the Coverage views (Tools-> Profile -> Process CodeGen Code Coverage) 5.Two views will be opened: 1.CodeGen Function Coverage view: Displays function coverage data 2.CodeGen Line Coverage view: Displays line coverage data 6.Hit OK to apply the changes

CCS APPS CodeGen Line Code Coverage Results