Try the all-new QuickBooks Online for FREE.  No credit card required.

Microtec C & C Compilers

Document Sample
Microtec C & C   Compilers Powered By Docstoc

Microtec C & C++ Compilers                                                                     D   A       T   A   S   H    E      E   T

    The Mentor Graphics Embedded                 logic analyzers, and emulators, a number      Major Product Features:
Software Division provides flexible and           of different Object Module Formats
                                                                                               • Advanced C++ optimizations
powerful embedded software develop-              (OMFs) are supported, including                 dramatically reduce application
ment products and services. The company’s        IEEE695, ELF/DWARF, COFF,                       memory usage
proven VRTX® real-time operating system,         and OMF386.
industry-standard XRAY® Debugger and                                                           • Pre-compiled header files slash
                                                 Advanced C++ Technology                         compile times
optimizing Microtec® C and C++
Compilers can be used individually or            Reduces Program Overhead                      • Flexible code and data segmentation
together to provide a complete and highly            Since embedded applications need to         enables easy ROMing of applications
integrated embedded software develop-            minimize memory requirements to reduce        • C language extensions minimize
ment environment.                                cost, Microtec C++ Compilers have special       the need for assembly language
                                                 enhancements to eliminate the overhead
Microtec C & C++ Compilers                       of object-oriented programming features.
    Microtec C and C++ Compilers are             For example, the Mentor Graphics linker
complete cross-compiler solutions that           performs sophisticated cross-file optimiza-
include a compiler, assembler, and linker,       tions that eliminate the size overhead
all optimized for building embedded              associated with poor implementations of
applications. Microtec C & C++ Compilers         C++ constructs such as templates. These
may be used as stand-alone tools or with         optimizations automatically identify
the Mentor Graphics XRAY Debugger. In            duplicate copies of templates, in-line
addition, they are compatible with many          functions, and virtual function tables and
third-party debuggers, emulators, and            remove them which results in up to a 30%
real-time operating systems.                     reduction in application size.
                                                     The overhead of certain C++ language
Adheres to Industry Standards                    features, such as exception handling,
    To ensure application portability, it is     cannot be eliminated by optimization.
important that compilers conform to              In such cases, Microtec C++ Compilers
language standards. Mentor Graphics is           enable you to selectively disable the lan-
dedicated to supporting ANSI and industry        guage feature, ensuring that no overhead
standards for both C and C++. Microtec           is added. Combined with Microtec C++
C Compilers support both ANSI C and              Compilers powerful optimizations, this
K&R C. Mentor has been an active partic-         capability provides a ‘minimal overhead’
ipant in the ANSI C++ standardization            subset of C++, appropriate for applications
process and is fully committed to imple-         with constrained memory resources.
menting complete ANSI C++ language
and library support. ANSI C++ features           Optimized for Embedded
already supported by Microtec C++                Applications
Compilers include templates, RTTI                   Mentor Graphics embedded software
(Run-Time Type Identification), bool,             tools are designed exclusively for cross-
and exception handling. Support is also          development and are optimized to reduce
provided for legacy C++ versions, such           the time needed to successfully build
as Cfront 2.1 and 3.0.                           embedded applications. Since most
    To provide compatibility with a wide         embedded systems use ROM or FLASH
range of third-party tools, such as debuggers,   RAM to store the application, the tools

w w w. m e n t o r. c o m
                                                             restored. The interrupt keyword Sophisticated Optimization
                unpacked structures                          allows the compiler to automat-       Whether your goal is to reduce pro-
      int i                                                  ically set up the function pro-   duction costs, minimize power consump-
                                                             logue/ epilogue correctly. The    tion, or both, you face awkward trade-offs
      char c                 padding bytes
                                                             asm keyword allows easy in-       when deciding how powerful a processor
      char d                 padding bytes                   line insertion of a few lines of  or how much memory an application
                                                             assembly language. This           needs. A compiler’s optimizing capability
                    packed structures                        enables routines that must use    plays a critical role in such equations.
                                                             assembly language for low-        Microtec C & C++ Compilers will build a
      int i
                                                             level operations to be largely    smaller, faster application allowing for the
      char c       char d            next variable           coded in C or C++.                appropriate cost reductions in the under-
                                                                 The packed extension is       lying hardware.
The packed extension is useful in areas of                   useful in areas of embedded           To maximize performance, compiler
embedded programming. If you need to             programming. If you need to minimize          optimizations are carefully tailored to spe-
minimize the memory requirements of your         the memory requirements of your applica- cific architectures. For example, RISC
application, you can ‘pack’ the data struc-
                                                 tion, you can ‘pack’ the data structures so   architectures require that expressions be
tures so they consume less space. The second
use is for interfacing to devices that use       they consume less space. The second use       broken down to their simplest operations
memory mapped I/O. To manipulate the             is for interfacing to devices that use mem- prior to optimization. This enables
control registers of these devices from C,       ory mapped I/O. To manipulate the con-        aggressive optimization of load/store
it is necessary to precisely map the control     trol registers of these devices from C, it is operations. In contrast, for CISC architec-
registers on to a C data structure. This may     necessary to precisely map the control
be impossible unless the padding bytes can                                                     tures, complex expressions need to be
                                                 registers to a C data structure. The packed preserved so the optimizer can take
be removed from the data structure, which
the packed extension allows.                     extension enables this precise mapping by advantage of the richer instruction set.
                                                 preventing the compiler from inserting            Microtec C & C++ Compilers provide
                                                 padding bytes into the data structure.        fast, compact code through a range of
simplify the process of placing your                                                           powerful global and local optimizations.
application in ROM. Position-independent                                                               In addition, Microtec C & C++
code and data is also supported.                   interrupt void SensorInterrupt (void) Compilers include powerful analysis
     A number of C and C++ language                {                                                   techniques that allow standard
extensions are also provided. These                      unsigned long int D0;
                                                                                                       optimizations to be applied much
eliminate much of the need to laboriously                asm ( "         movem.1 d0,‘D0‘");
                                                                                                       more widely and aggressively than
hand-code assembly language routines               }
                                                                                                       previously possible.
when interfacing directly to hardware.                                                                 Interprocedural analysis enables the
     A C Run-Time Library (RTL) is               To reduce the need to write in assembly
                                                                                               compiler to look across file boundaries
provided in source code. This allows you         language, the Microtec C & C++ Compilers
                                                 provide several language extensions,          and discover what variables and registers
to minimize system memory requirements including the interrupt and asm keywords. It will be affected when a particular function
by discarding unneeded routines and by           has traditionally been difficult to represent is called. As a result, the function prologue
building the library with the same options interrupt handlers directly as C functions          and epilogue can be optimized to save
as the rest of the applications. The RTL is because the CPU sets the stack up differently and restore only the locations affected by
reentrant and ROMable.                           for an interrupt compared to a standard
                                                 function call. In addition, all scratch       a function’s execution, rather than the
     To reduce the need to write in assembly                                                   entire context. Alias analysis tracks the
                                                 registers must be saved and restored. The
language, Microtec C & C++ Compilers             interrupt keyword allows the compiler to      locations referenced by pointers, allowing
provide several language extensions              automatically set up the function prologue/   the compiler a much clearer understand-
including the interrupt and asm keywords. epilogue correctly. The asm keyword allows ing of which variables are affected when a
It has traditionally been difficult to repre-    easy in-line insertion of a few lines of
                                                                                               value is assigned through a pointer refer-
sent interrupt handlers directly as C            assembly language. This enables routines
                                                 that must use assembly language for low-level ence. By permitting much wider use of
functions because the CPU sets up the            operations to be largely coded in C or C++.   optimizations such as constant and copy
stack differently for an interrupt than it does                                                propagation, alias analysis improves reg-
for a standard function call. In addition,                                                     ister utilization and reduces the frequency
all scratch registers must be saved and                                                        with which values are loaded from memory.

                                                                         automate this process,            Mentor Graphics Services
     Initialized Data
                                                                         including generation of               Mentor Graphics provides comprehen-
                                                                         the code that copies the          sive services to the electronic and embedded
        RAM                                                              values from ROM to                software designer through five Knowledge
                               Copy values from ROM to RAM               initialize the locations in       Centers specializing in different business
                               during start up to initialize variables
                                                                         RAM.                              areas. One of these groups, the Embedded
        ROM                                                              Availability
                                                                                                           Systems Knowledge Center, provides
                                                                                                           services to companies implementing
  Values to Initialize Data                                               Microtec C & C++                 embedded systems or companies seeking
                                                                      Compiler products are                special tools for the embedded software
Initialized data presents a particular                                available on a wide range            market.
challenge in a ROM-based system. The                 of hosts and targets. Contact your local                  Amongst a wide range of capabilities,
variables themselves must be located in              sales representative or visit our web site            the Knowledge Center offers enhanced
RAM, but the actual initialization values            (
need to be stored at another location in                                                                   levels of support to users of Mentor
                                                     for information about availability for                Graphics embedded software design and
ROM and copied into RAM during system
start-up. The Microtec C & C++ Compilers             specific hosts and targets.                            development products; access to consultant
and linkers combine to automate this process,                                                              software designers to assist in the imple-
including generation of the code that copies         Partner with the Best
                                                                                                           mentation of systems; year 2000 analysis
the values from ROM to initialize the                    The Mentor Graphics Embedded
locations in RAM.                                                                                          services; FAA certification services, and
                                                     Solutions Partners program includes indus-
                                                                                                           the development of custom tools for
                                                     try leaders in many fields of embedded
                                                                                                           custom hardware. Engagements customized
   Local and global optimizations include            systems technology, including emulators,
                                                                                                           to the specific requirements of the customer
instruction scheduling, register coloring,           logic analyzers, networking protocols,
                                                                                                           provide valuable aid, lowering project
common sub-expression elimination,                   and real-time operating systems. This
                                                                                                           cost and risk, with the goal of meeting
constant folding, constant and copy prop-            ensures that Mentor Graphics products
                                                                                                           specific market windows.
agation, peephole optimizations, implicit            are compatible with many third-party
function in-lining, invariant code motion,           products, providing you with a broad
branch tail merging, and leaf routine stack          range of tools to select from.
frame elimination.
   Embedded systems typically have
                                                                                        User Defined
limited memory resources broken up into
discrete blocks of ROM, RAM, or                                                             Code

FLASH. To easily generate ROMable                                                         Constants
applications, it is important that the code           Application
generation tools can precisely segment the              Code
                                                                                      Uninitialized Data
application to match the target memory
layout. To support this, Microtec C &                                                  Initialized Data
C++ Compilers can segregate an applica-                                                  Heap Data
tion into an unlimited number of sections.
The linker allows individual sections
themselves to be split. This is useful, for
example, when there is a separate boot
ROM for start-up code.
   Initialized data presents a particular
challenge in a ROM-based system. The
variables themselves must be located in
RAM, but the actual initialization values
need to be stored at another location in
ROM and copied into RAM during system
start-up. Microtec C & C++ Compilers

Corporate Headquarters          Silicon Valley Headquarters      Europe Headquarters            Pacific Rim Headquarters            Japan Headquarters
Mentor Graphics Corporation     Mentor Graphics Corporation      Mentor Graphics Corporation    Mentor Graphics (Taiwan)           Mentor Graphics Japan Co., Ltd.
8005 S.W. Boeckman Road         1001 Ridder Park Drive           Immeuble le Pasteur            Room 1603, 16F,                    Gotenyama Hills
Wilsonville, Oregon 97070 USA   San Jose, California 95131 USA   13/15, rue Jeanne Braconnier   International Trade Building       7-35, Kita-Shinagawa 4-chome
Phone: 503-685-7000             Phone: 408-436-1500              92360 Meudon La Foret          No. 333, Section 1, Keelung Road   Shinagawa-Ku, Tokyo 140
North American Support Center   Fax: 408-436-1501                France                         Taipei, Taiwan, ROC                Japan
Phone: 800-547-4303                                              Phone: 33-(0)1-40-94-74-74     Phone: 886-2-27576020              Phone: 81-3-5488-3030
Fax: 800-684-1795                                                Fax: 33-(0)1-46-01-91-73       Fax: 886-2-27576027                Fax: 81-3-5488-3031               09/99   1015950