Professional Documents
Culture Documents
Choosing The Appropriate Simulator Configuration in Code Composer Studio IDE
Choosing The Appropriate Simulator Configuration in Code Composer Studio IDE
Choosing The Appropriate Simulator Configuration in Code Composer Studio IDE
ABSTRACT
The simulator configurations for a DSP include: functional CPU simulator, cycle accurate
CPU simulator, functional device simulator, and device simulator. The simulators also
support features for validation and optimization such as the pipeline stall analyzer, code
coverage and multi-event profiler, and cache analysis tool. There are also features, such as
the pin connect and port connect, which provide external stimuli to the application. It is critical
to use the appropriate simulator configuration and a combination of features during the
different stages of application development.
This application note relates the application validation and optimization challenges to
available simulation configurations and supported tools. It helps the developer choose the
appropriate simulator configuration along with applicable features during different stages of
application development.
Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Application Software Development Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1 Validation and Optimization Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Choosing the Appropriate Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1 Simulator Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Algorithm Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2.1 Recommended Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3 Algorithm Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3.1 Recommended Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.3.2 Profilers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3.3 Pipeline Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.4 Application Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.4.1 Recommended Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.5 Application Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.5.1 Recommended Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.5.2 Cache Optimizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1
SPRA864
Contents
List of Figures
Figure 1 Component View of an Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Figure 2 Algorithm Validation and Optimization and the Simulator Configurations . . . . . . . . . . . . . . 4
Figure 3 Application Validation and Optimization and the Simulator Configurations . . . . . . . . . . . . 5
List of Tables
Table 1 TMS320C6x Simulator Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 2 TMSW320C55x Simulator Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 3 Functional Device Simulators vs. Device Simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 4 Algorithm Validation and Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 5 Application Validation and Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1 Introduction
Code Composer Studio IDE for C55x and C6x has multiple simulator configurations available
through the import menu in Code Composer Studio setup. The simulators support features such
as the pipeline stall analyzer, code coverage and multi-event profiler, and cache analysis tool.
There are also features, such as the pin connect and port connect, which provide external
stimuli to the application. It is critical to use the appropriate simulator configuration and a
combination of features during the different stages of application development.
The organization of the application note is as follows:
• Section 2 describes a typical application development flow and associated validation and
optimization challenges.
• Section 3 enumerates the different simulator configurations, supported features, and tools.
Further, it describes how appropriate combinations of simulator configuration, features, and
tools addresses these challenges.
• Section 4 describes typical user scenarios, illustrating the usage of simulators to tackle the
validation and optimization challenges.
NOTE: The various simulator configurations and features discussed in this document refer to
those supported by Code Composer Studio IDE v2.2.
Figure 1 depicts a typical structure of an application that contains multiple modules integrated
into the application framework. The framework includes using DSP/BIOS and CSL. The
application operates on external stimuli through peripherals such as a serial port.
Algorithms, such as FIR and VOL in the figure, are developed first. These are then integrated
into the application framework.
Application Framework
VOL FIR
DSP/BIOS CSL
TMS320 Hardware
Bug fix
Test Test
functionality performance Optimized
Build Debug Tune
algorithm
Optimize
Real-world
interaction
Bug fix
VOL
Test Test
Integrate/ functionality performance
Debug Tune
build
FIR
Optimize
Application
framework
The simulator configurations are classified based on the extent of the DSP device simulated and
the level of detail to which the DSP device is simulated (for details, refer to section A.1):
• Core simulators
– functional CPU simulator
– cycle-accurate CPU simulator
– CPU and cache simulators
• Full-device simulators
– functional-device simulator
– device simulator
The features supported for simulating external stimuli to the DSP are classified as follows (for
details, refer to section A.2):
• pin connect
• port connect
• cross bar
• boot load
• external host port
The validation and optimization features supported by the simulators are classified as follows
(for details refer to section A.3):
• pipeline analysis
• simulator analysis events
• Code Composer Studio IDE profiler
• cache analysis (part of the analysis tool kit released with Code Composer Studio IDE v2.2)
• code coverage and multi-event profiler (part of the analysis tool kit released with Code
Composer Studio IDE v2.2)
Refer to Appendix A for further details on these capabilities. All these simulator configurations
and features are integrated into the Code Composer Studio IDE. Therefore, all the simulator
configurations support Code Composer Studio IDE features such as viewing CPU/peripheral
registers, viewing memory contents, setting breakpoints, etc.
Let us now focus on how the simulation configurations can be used to address the different
validation and optimization challenges identified.
C64xx Cycle Accurate Simulates the core of the C64x processor. This is faster than the device simulator but does not
Sim, Little Endian simulate peripherals and cache system (uses a flat memory system).
6
SPRA864
C67xx Cycle Accurate Simulates the core of the C67x processor. This is faster than the device simulator but does not
Sim, Little Endian simulate peripherals and cache system (uses a flat memory system).
C6201 Device Sim, Little Simulates the C6201 processor. Supports PBUS, DMA, DMS, PMS, McBSP(2), timer(2), EMIF
Endian Map 0 supports interfacing with async, SDRAM and SBSRAM memory models (EMIF not fully cycle
accurate). Does not support HPI.
C6202 Device Sim, LIttle Simulates the C6202 processor. Supports PBUS, DMA, DMS, PMS, McBSP(3), timer(2), EMIF
Endian Map 0 supports interfacing with async, SDRAM and SBSRAM memory models (EMIF not fully cycle
accurate). Does not support Exp.Bus 32-bit.
C6203 Device Sim, Little Simulates the C6203 processor. Supports PBUS, DMA, DMS, PMS, McBSP(3), timer(2), EMIF
Endian Map 0 supports interfacing with async, SDRAM and SBSRAM memory models (EMIF not fully cycle
accurate). Does not support Exp.Bus 32-bit.
C6204 Device Sim, Little Simulates the C6204 processor. Supports PBUS, DMA, DMS, PMS, McBSP(2), timer(2), EMIF
Endian Map 0 supports interfacing with async, SDRAM and SBSRAM memory models (EMIF not fully cycle
accurate). Does not support Exp.Bus 32-bit.
C6205 Device Sim, Little Simulates the C6205 processor. Supports PBUS, DMA, DMS, PMS, McBSP(2), timer(2), EMIF
Endian Map 0 supports interfacing with async, SDRAM and SBSRAM memory models (EMIF not fully cycle
accurate). Does not support PCI.
C6211 Device Simulator, Simulates the C6211 processor. Supports L1D, L1P, L2 cache, EDMA, QDMA, timer(2),
Little Endian McBSP(2), EMIF supports interfacing with async and SDRAM memory models. Does not support
HPI.
C6414 Device Simulator, Simulates the C6414 processor. Supports L1D, L1P, L2 cache, EDMA, QDMA, interrupt selector,
Little Endian McBSP(3), timer(3), EMIF supports interfacing with async, SDRAM and generic sync RAM
memory models. Does not support HPI, Utopia.
C6415 Device Simulator, Simulates the C6415 processor. Supports L1D, L1P, L2 cache, EDMA, QDMA, interrupt selector,
Little Endian McBSP(3), timer(3), EMIF supports interfacing with async, SDRAM and generic sync RAM
memory models. Does not support HPI, PCI, Utopia.
C6416 Device Simulator, Simulates the C6416 processor. Supports L1D, L1P, L2 cache, EDMA, QDMA, interrupt selector,
Little Endian McBSP(3), timer(3), TCP, VCP, EMIF supports interfacing with async, SDRAM and generic sync
RAM memory models. Does not support HPI, PCI, Utopia.
C6416 Functional Simulates the C6416 processor. This is faster than the device simulator but does not simulate all
Simulator, Little Endian the peripherals. Supports functional timer(2), interrupt selector , EDMA and QDMA (uses a flat
memory system).
C6411 Device Simulator, Simulates the C6411 processor. Supports L1D, L1P, L2 cache, EDMA, QDMA, interrupt selector,
Little Endian McBSP(2), timer(3), EMIF supports interfacing with async, SDRAM and generic sync RAM
memory models. Does not support HPI, Utopia.
C6701 Device Sim, Little Simulates the C6701 processor. Supports DMA, McBSP(2), timer(2), EMIF supports interfacing
Endian Map 0 with async, SDRAM and SBSRAM memory models (EMIF not fully cycle accurate). Does not
support HPI.
7
SPRA864
C6712 Device Simulator, Simulates the C6712 processor. Supports L1D, L1P, L2 cache, EDMA, QDMA, McBSP(2),
Little Endian Timer(2), EMIF supports interfacing with async and SDRAM memory models.
C6713 Device Simulator, Simulates the C6713 processor. Supports L1D, L1P, L2 cache, EDMA, QDMA, timer(2), EMIF
Little Endian supports interfacing with async and SDRAM memory models, McBSP(2), McASP(2), interrupt
selector. Does not support HPI, IIC.
C6713 Functional Simulates the C6713 processor. This is faster than the device simulator but does not simulate all
Simulator, Little Endian the peripherals. Supports functional timer(2), interrupt selector, EDMA and QDMA (uses a flat
memory system).
Configuration Description
C55xx Functional Simulates the C55x CPU Rev 2.1 core. This gives the fastest possible result but pipeline effects
Simulator of the CPU are neglected; means instructions are executed one at a time. Supports the timer but
doesn’t support any other peripherals. This simulator will not be cycle or cycle count accurate.
C55xx Cycle Accurate Simulates the C55x CPU Rev 2.1 core. Supports program/data memory with latency. If the
Simulator memory configuration is not provided, a flat memory system(memory with no latency, no
DARAM/SARAM) is used as default. Supports the timer but doesn’t support any other peripheral.
C55xx Cache Simulator Simulates C55x CPU Rev 2.1 core. Supports program/data memory with latency. If the memory
configuration is not provided, a flat memory system (memory with no latency, no
DARAM/SARAM) is used a default. Also supports timer and C55x Instruction Cache. Does not
support any other peripheral.
C5510 Device Simulator Simulates the C5510 processor. Supports ICache, DMA, EMIF, timers (2), McBSP (3), RHEA,
and EHPI. Doesn’t support DPLL and GPIO. Internal memory interface supports interfacing with
SARAM and DARAM models. External memory supports interfacing with asynchronous and
SBSRAM models.
C5502 Functional Simulates the C5502 processor. This is faster than the device simulator but does not simulate all
Simulator the peripherals. Supports functional timers (3), watchdog timer, DMA, and ICache. Doesn’t
support EMIF, McBSP, VBUS, IIC ,UART and UHPI peripherals. Uses flat memory system.
C5502 Device Simulator Simulates the C5502 processor. Supports ICache, DMA, EMIF, timers (3), watchdog timer,
McBSP (3), VBUS, IIC, and UART peripherals. Doesn’t support UHPI. Internal memory interface
supports interfacing with SARAM and DARAM models. External memory supports interfacing
with async, SBSRAM, and SDRAM models.
NOTE:
• All the configurations on the C6x have a corresponding big endian mode configuration
supported in the product. Subsequent references to simulator configurations apply to both
the endian modes.
• All the configurations on the C6x having map 0 specified in the above table have a
corresponding map1 configuration supported in the product.
8
SPRA864
• Since C55x has a protected pipelined architecture, there are two variants of CPU simulators
available on the C55x platform: functional CPU simulator (having no pipeline effects
modeled) and cycle accurate CPU simulator (having the pipeline effects modeled
accurately).
• Most of the capabilities of the simulator configurations mentioned in algorithmic development
stages are also applicable to the application development stage. If they are not applicable,
they will be specifically mentioned.
The code coverage tool gives information about the source code that was not exercised in a run
of the application.
9
SPRA864
10
SPRA864
Functional vs. Cycle Accurate Memory Subsystems Functional vs. Cycle Accurate DMA
The functional device simulators model the cache system to Applications use DMA to transfer data across internal
give correct event counts for cache hits and misses. The memories, peripherals and external memories. These
cycle accurate simulators, besides giving correct event transfers are typically synchronized with events such as
counts, also model the cycle latencies due to memory interrupts, serial port events, etc. For simulating the
accesses The cycle accurate cache models in the device application behavior correctly, it would suffice to simulate the
simulators can be used to get an estimate of the cycles DMA transfers synchronized on those events, and not
gained after optimizing the application, using the analysis necessarily model the latencies accurately.
information from the functional device simulators. The functional simulator utilizes this characteristic to
simulate applications correctly with higher speeds by not
modeling the latencies.
Cycle accurate DMA on device simulators mimic the real
target behavior by modeling the latencies, the bus
contentions, the transfer protocols, etc.
TMS320C6x:
Related features:
Pin connect, port connect are used for providing external stimuli for peripherals such as the
serial port. Simulator analysis events can be used for observing events on the target. These
events can be used for debugging by configuring them to stop simulation when the event occurs.
Example:
For the application in Figure 1, the VOL and FIR algorithms are integrated into an application
framework that uses DSP/BIOS and CSL. The functional device simulator may be used to verify
application correctness.
11
SPRA864
12
SPRA864
13
SPRA864
2. Select the desired configuration from the available list of configurations shown in the
window.
Click on Import and then Save and Quit.
This will set the selected simulator configuration in the Code Composer Studio setup.
14
SPRA864
4 User Scenarios
Table 4 lists out a few user scenarios during application development and highlights the
appropriate simulator configuration and the applicable features than can be used in Code
Composer Studio IDE.
Table 4. Algorithm Validation and Optimization
Platform Problem Solution
(a) Algorithm Validation
C55x/C6x I am using FIR, IIR and LMS algorithms from For quick validation, use the C55x functional simulators.
a vendor. How can I quickly validate them on For the C6x, the CPU simulator configurations can be
the C55x/C6x platforms? used.
15
SPRA864
16
SPRA864
17
SPRA864
5 References
1. Code Composer Studio Getting Started Guide (SPRU509)
2. Code Coverage And Multi-event Profiler User Guide (SPRU624)
3. Using the Code Coverage And Multi-event Profiler for Robustness and Efficiency Analysis
(SPRA868)
4. Cache Analysis User Guide (SPRU575)
5. Using the Cache Analysis Tool to Improve Cache Utilization (SPRA863)
18
SPRA864
Appendix A
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to discontinue
any product or service without notice. Customers should obtain the latest relevant information before placing
orders and should verify that such information is current and complete. All products are sold subject to TI’s terms
and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI
deems necessary to support this warranty. Except where mandated by government requirements, testing of all
parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for
their products and applications using TI components. To minimize the risks associated with customer products
and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process
in which TI products or services are used. Information published by TI regarding third–party products or services
does not constitute a license from TI to use such products or services or a warranty or endorsement thereof.
Use of such information may require a license from a third party under the patents or other intellectual property
of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction
of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for
such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or service voids all express and any implied warranties for the associated TI product or service and
is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265