© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.

Slides:



Advertisements
Similar presentations
Renesas Technology America Inc. 1 SKP8CMINI-15,17 Tutorial 2 Creating A New Project Using HEW4.
Advertisements

Introduction to HT-IDE3000 Micro-C development System Department.
Code Composer Department of Electrical and Computer Engineering
Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
3. Loaders & Linkers1 Chapter III: Loaders and Linkers Chapter goal: r To realize how a source program be loaded into memory m Loading m Relocation m Linking.
Chapter 3 Loaders and Linkers
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS 9.1 Introduction Application programs are typically developed, compiled, and run on host system Embedded programs.
The Functions and Purposes of Translators Code Generation (Intermediate Code, Optimisation, Final Code), Linkers & Loaders.
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Programming Types of Testing.
Lab6 – Debug Assembly Language Lab
Chapter 8: Programming the Microprocessor. Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel.
Loader- Machine Independent Loader Features
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
C6713 DSK Diagnostic Utility included with DSK....
Introduction Purpose Objectives Content Learning Time
Chapter 91 Memory Management Chapter 9   Review of process from source to executable (linking, loading, addressing)   General discussion of memory.
Chapter 2 Software Tools and Assembly Language Syntax.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
P.1ECE 331, Prof. A. Mason Professor Andrew Mason Michigan State University Spring 2013 ECE 331: PC Lab 1: Using HC12 ASM Simulators.
1 C Programming Language Review and Dissection I: Overview, Static and Automatic Variables, and Program Control Flow These lecture notes created by Dr.
RM2D Let’s write our FIRST basic SPIN program!. The Labs that follow in this Module are designed to teach the following; Turn an LED on – assigning I/O.
Introduction Purpose This course describes the process of installing the KPIT GNU toolchain on your PC. Objective Learn how easy it is to get information.
MIPS coding. SPIM Some links can be found such as:
Copyright 2001 Oxford Consulting, Ltd1 January Storage Classes, Scope and Linkage Overview Focus is on the structure of a C++ program with –Multiple.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. e 2 Studio – Getting Started.
Active-HDL Interfaces Debugging C Code Course 10.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Programming with Visual Studio 2005.NET A short review of the process.
Programming with Visual Studio.NET A short review of the process.
C/C++ Programming Environment
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training module provides an overview of debugging features.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This course gives an overview of the Toolchain feature of the High.
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.
CS412/413 Introduction to Compilers and Translators April 14, 1999 Lecture 29: Linking and loading.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This course explains how to use Mapview, a utility program for the.
Renesas Electronics America Inc. © 2011 Renesas Electronics America Inc. All rights reserved. RX Bus State Controller (BSC) Ver
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course describes Coverage, a utility that is used.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 10 – Loaders.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Loaders and Linkers T 李俊葦. 1. Loader Accepts the object programs , prepares these programs for execution by the computer , and indicates the execution.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
CC410: System Programming Dr. Manal Helal – Fall 2014 – Lecture 10 –Linkers.
1 CS 192 Lecture 4 Winter 2003 December 8-9, 2003 Dr. Shafay Shamail.
Lecture 3 Translation.
Chapter 8: Programming the Microprocessor
Tools of the Trade
MODULAR PROGRAMMING Many programs are too large to be developed by one person. programs are routinely developed by teams of programmers The linker program.
David Hedley Staff AE, Applications Engineering 12 Oct 2010
Introduction Purpose Objectives Content Learning Time
PRU-ICSS Programming with CCS
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS
Getting Started: Developing Code with Cloud9
Embedded System Development Lecture 13 4/11/2007
Computer System Laboratory
SPL – PS1 Introduction to C++.
Presentation transcript:

© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in the HEW environment to improve program execution and memory size. Objectives  Learn the different approaches used by programmers.  Understand how to configure the HEW Toolchain to achieve basic optimization. Content  19 pages  3 questions Learning Time  25 minutes Introduction

© 2008, Renesas Technology America, Inc., All Rights Reserved 2 General approaches  Choice of compiler  Compiler settings  Programming algorithms and techniques  Rewriting program in assembly HEW provides tools for easier, more effective optimization Optimization approaches in HEW H8 Toolchain environment  H8 Compiler options  Inter-module Optimizer  Code and algorithm modification Optimization Approaches

© 2008, Renesas Technology America, Inc., All Rights Reserved 3 Program Speed vs. Size Faster execution, but bigger code size Smaller code size, but slower execution Smaller code size, but slower execution Example: Programs use different coding methods to perform similar task

© 2008, Renesas Technology America, Inc., All Rights Reserved 4 Getting Started Steps to begin optimization  Click on Build  Select H8S,H8/300 Standard Toolchain Optimization can be performed in three areas  C/C++ Files  Link Library  Standard Library

© 2008, Renesas Technology America, Inc., All Rights Reserved 5 C/C++ Optimization Optimize the following types of files:  C files (*.c)  C++ files (*.cpp) Configure the Toolchain for C/C++ optimization  Click on C/C++ tab  Select entire project or individual files from “Tutorial”  Select optimization category and type Inter-module optimization is not selected at this time

© 2008, Renesas Technology America, Inc., All Rights Reserved 6 Optimize the following types of files: Library (*.lib, *.obj) Configure items in the Link/Library Click on Link/Library tab Select the whole project (“Tutorial” in this example) Select optimization category and type Link/Library Optimization

© 2008, Renesas Technology America, Inc., All Rights Reserved 7 Optimize items in the Standard Library  Click on Standard Library tab  Select project from Tutorial  Select optimization category and type Standard Library Optimization

© 2008, Renesas Technology America, Inc., All Rights Reserved 9 Inter-module Optimizer Compiler generates inter-module supplementary information Inter-module Optimizer uses supplementary information to optimize each module before linking Linkage Editor Compiler Inter-module Optimizer Source Program Object Program Sub Command Object program Outputs inter- module optimizing information Sub Command Load Module Linker executes automatically after optimization is complete

© 2008, Renesas Technology America, Inc., All Rights Reserved 10 Size and Speed Improvements  Unifies constants and literal strings  Deletes unreferenced symbols  Does short absolute addressing  Does indirect addressing  Does register save and restore  Unifies same codes  Optimizes branch instructions Improvements Size Speed Improvements Size Speed Inter-module Optimizer

© 2008, Renesas Technology America, Inc., All Rights Reserved 11 Overall Improvement Conventional Optimization only With Inter-module Optimizaton ABCD.abs A.c B.c C.c D.c A.c B.c C.c D.c Optimization on compiling Optimization on compiling Optimization on compiling Optimization on compiling Optimization on linking When optimization is enabled, code in Debugging window won’t match original source code. Better ROM Efficiency and Faster Execution Code Size

© 2008, Renesas Technology America, Inc., All Rights Reserved 12 Quantifying the Improvements Determine memory size improvements -View Map file Measure execution speed improvements -Use emulator’s built-in time measurement -Use simulator’s calculated execution cycles -Make physical ∆t measurement via port pin C25 Sort( ) Sort time StartEnd

© 2008, Renesas Technology America, Inc., All Rights Reserved 14 Using Mapview to Measure Size Configure compiler to generate map file (.map)  Select C/C++, Assembly, or Link/Library from Debug configuration directory  Check “Generate file” and click on “Enable all” Launch Mapview to view map file Launch Mapview

© 2008, Renesas Technology America, Inc., All Rights Reserved 15 Mapview shows  Code size  Global variables  Variable address allocation  Section address Selected area (P section) shows  Sizes of functions in selected section  Size of program’s Main function Viewing Size Improvement

© 2008, Renesas Technology America, Inc., All Rights Reserved 16 Oscilloscope: - Manual time measurement Simulator Status window: - Number of instructions and cycles Emulator Status window: - Run time Emulator/Simulator Trace windows Methods of Determining Speed Simulator Status window shows number of instructions and cycles executed Emulator Status window shows the run time in ns (depending on the resolution setting)

© 2008, Renesas Technology America, Inc., All Rights Reserved 17 Data in Trace Windows Emulator Trace window shows cumulative instruction timestamp at a preset resolution of 125ns Simulator Trace window indicates cumulative cycles

© 2008, Renesas Technology America, Inc., All Rights Reserved 19 Course Summary  Optimizing programs for size or speed  Optimization tools in the HEW Toolchain  Inter-module optimization  Techniques for measuring size and speed Download a free evaluation copy of HEW at: