Spru226 PDF
Spru226 PDF
Addendum
1997
SPRU226
TMS320C6x
Addendum
TMS320C6x Addendum to the TMS320 DSP
Development Support Reference Guide
IMPORTANT NOTICE
Texas Instruments Incorporated (TI) reserves the right to make changes to its products or to
discontinue any semiconductor product or service without notice, and advises its customers to
obtain the latest version of relevant information to verify, before placing orders, that the
information being relied on is current.
TI warrants performance of its semiconductor products and related software to current
specifications in accordance with TIs standard warranty. Testing and other quality control
techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing
of all parameters of each device is not necessarily performed, except those mandated by
government requirements.
Please be aware that TI products are not intended for use in life-support appliances, devices,
or systems. Use of TI product in such applications requires the written approval of the
appropriate TI officer. Certain applications using semiconductor devices may involve potential
risks of personal injury, property damage, or loss of life. In order to minimize these risks,
adequate design and operating safeguards should be provided by the customer to minimize
inherent or procedural hazards. Inclusion of TI products in such applications is understood to be
fully at the risk of the customer using TI devices or systems.
TI assumes no liability for applications assistance, customer product design, software
performance, or infringement of patents or services described herein. Nor does TI warrant or
represent that any license, either express or implied, is granted under any patent right, copyright,
mask work right, or other intellectual property right of TI covering or relating to any combination,
machine, or process in which such semiconductor products or services might be or are used.
Preface
iv
Trademarks
Trademarks
Classico, MicroLite, and Virtuoso Nano are trademarks of Eonic Systems, Inc.
Code Composer and Code Maestro are trademarks of Go DSP Corporation.
EVP is a trademark of D2 Technologies.
InvisiLink is a trademark of ViaDSP, Inc.
PC is a trademark of International Business Machines Corporation.
Solaris, SunOS, and Sun-3 are trademarks of Sun Microsystems, Inc.
320 Hotline On-line, cDSP, TI, VelociTI, XDS510, and XDS510WS are
trademarks of Texas Instruments Incorporated.
Windows, Windows 95, and Windows NT are registered trademarks of
Microsoft Corporation.
Email: dsph@[Link]
Asia-Pacific
Japan
Documentation
Fax: +49 81 61 80 40 10
When making suggestions or reporting errors in documentation, please include the following information that is on the title
page: the full title of the book, the publication date, and the literature number.
Mail: Texas Instruments Incorporated
Email: comments@[Link]
Technical Documentation Services, MS 702
P.O. Box 1443
Houston, Texas 77251-1443
Note:
vi
[Link]
[Link]
[Link]
[Link]
When calling a Literature Response Center to order documentation, please specify the literature number of the
book.
Contents
Contents
1
1.4
1.5
2.2
2-2
2-2
2-2
2-2
2-3
2-4
2-5
2-5
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1
vii
Tables
Figures
11.
Tables
31
32
viii
Chapter 1
TMS320C6x Devices
The TMS320C6x devices are the first devices to feature VelociTI, an advanced very long instruction word (VLIW) architecture developed by Texas
Instruments, which allows performance of up to 1600 million instructions per
second (MIPS). The first device in the series is the TMS320C6201, a fixedpoint digital signal processor (DSP).
Topic
Page
1.1
1.2
1.3
1.4
1.5
Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
1-1
TMS320C6x Introduction
The C6x devices also can be used for improved performance on existing applications, such as:
1-2
Key Features
J
J
J
J
CPU
J
J
J
J
J
J
J
J
J
J
J
Memory/peripherals
J
J
J
J
J
J
J
1-3
The CPU has two data paths where processing occurs. Each data path has
four functional units and a register file containing 16 32-bit registers. The
functional units execute logic, shifting, multiply, and data address operations.
All instructions operate on the registers. The two sets of data-addressing units
are exclusively responsible for all data transfers between the register files and
the memory.
1-4
Figure 11 shows the CPU core and peripherals for a TMS320C6201 device.
23
32
EMIF
Program RAM/cache
32-bit address
256-bit data
512K-bit RAM
Data RAM
32-bit address
8-, 16-, 32-bit data
512K-bit RAM
JTAG test/
emulation
control
Program/data buses
Multichannel
(T1/E1)
serial port
DMA
C62xx CPU Core
Instruction dispatch
Ch 0
Control
registers
Instruction decode
Data path 1
Data path 2
A register file
B register file
Ch 2
Control
logic
Test
Emulation
Ch 1
Peripheral bus
Program fetch
Interrupts
Ch 3
Auxiliary
channel
Multichannel
(T1/E1)
serial port
Timer
16 Data
Timer
Host
port
Power management
PLL clock
generator
1.3.1
Addressing Modes
The addressing mode options on the C62xx are either linear or circular, as
specified by the addressing-mode register (AMR).
For more information on addressing modes, see the TMS320C62xx CPU and
Instruction Set Reference Guide.
TMS320C6x Devices
1-5
1.3.2
Interrupts
The CPU has 14 interrupts. These are the reset interrupt, the nonmaskable
interrupt (NMI), and interrupts 415. These interrupts correspond to the
RESET, NMI, and INT4INT15 signals on the CPU boundary. In some C62xx
devices, these signals may be tied directly to pins on the device, connected
to on-chip peripherals, or may be disabled permanently by being tied inactive
on chip. Generally, RESET and NMI are connected directly to pins on the
device.
For more information on interrupts, see the TMS320C62xx CPU and Instruction Set Reference Guide (literature number SPRU189).
1-6
Internal Memory
1.4.1
Data-Memory System
The TMS320C62xx data-memory system includes SRAM and a memory controller. The CPU can access data memory in 8-bit byte, 16-bit halfword, and
32-bit word-lengths. The data memory system supports two memory accesses per cycle. These accesses can be any combination of loads and stores
from the two data buses of the CPU. Similarly, a simultaneous internal and external memory access is supported by the data memory system. The
TMS320C62xx data memory system also supports direct-memory access
(DMA) and external host accesses. For more information on the data-memory
system, see the TMS320C62xx Peripherals Reference Guide.
1.4.2
Program-Memory System
The TMS320C62xx program-memory system includes on-chip SRAM and a
memory/cache controller. The program memory can operate as either an internal program memory or as a directly mapped program cache. There are four
modes under which the program memory system operates:
Program-memory mode
Cache-enable mode
Cache-freeze mode
Cache-bypass mode
The DMA can write data into an addressed space of program memory. The
DMA cannot read from the internal program memory in program memory
mode.
For details on cache modes, see the TMS320C62xx Peripherals Reference
Guide.
TMS320C6x Devices
1-7
Peripherals
1.5 Peripherals
In addition to on-chip memory, the TMS320C6201 contains the following
peripherals:
1.5.1
1.5.2
1-8
Peripherals
A DMA operation consists of a 32-bit word transfer to or from any of the three
C62xx modules:
One of the DMA channels can be used by the processor during the boot load
startup procedure to initialize the internal program memory after reset. The
DMA channels can be used to write to internal program memory.
The boot loader uses the DMA to boot load code from off-chip memory to the
internal program memory area. An external pin (sampled at reset) selects
whether this boot load is performed. The serial port can also be used for booting.
The DMA controller can access all internal program memory, all internal data
memory, and all devices mapped to the EMIF. However, the DMA cannot use
program memory as the source of a transfer and it cannot access memories
configured as cache or memory-mapped on-chip peripheral registers.
See the data sheet for the specific device to find the memory mapping of DMA
control registers. These registers are 2-bits wide and must be accessed
through 32-bit accesses from the CPU. For more information on the DMA operations, see the TMS20C62xx Peripheral Reference Guide.
1.5.3
TMS320C6x Devices
1-9
Peripherals
1.5.4
Power-Down Logic
The C62xx supports three power-down modes (Idle1, 2, and 3) that can reduce system power requirements significantly. Idle1 halts the CPU except for
the interrupt logic. Idle2 halts the CPU and the peripherals (except for the interrupt logic). Idle3 halts the phase-locked loop (PLL), stopping the clock tree
from switching, which effectively halts the entire chip. Idle 3 requires a reset
to wake up the device, while the other two modes can be restored using an
interrupt or reset. For more details on the power-down logic, see the
TMS320C62xx Peripherals Reference Guide.
1.5.5
1.5.6
Timers
The device has two 32-bit general purpose timers that you can use to:
Time events
Count events
Generate pulses
Interrupt the CPU
Send synchronization events to the DMA
The timer has two signaling modes and can be clocked by an internal or an
external source. The timer has an I/O pin that functions as an input clock, as
an output clock, or as a general-purpose I/O pin.
1-10
Chapter 2
TMS320C6x Tools
The TMS320C6x design environment reflects the nature of the advanced very
long instruction word (VLIW) architecture. The environment includes
code-generation tools, evaluation tools, on-line help, and technical
documentation. This chapter provides addenda to Chapters 15 and 16 of the
DSRG.
Topic
Page
2.1
2.2
2-1
C compiler
Assembly optimizer
Assembler
Linker
The tools take C or assembly source code and implement many different optimizations, including software pipelining, to find and exploit the unique instruction-level parallelism of the C6x. After each step in the process, the C6x tools
allow you to evaluate the results and take appropriate steps to achieve the
most parallel code.
2.1.1
C Compiler
The C6x C compiler accepts ANSI C source code and produces C6x
assembly language source code, performing a variety of optimizations to
improve the efficiency of the compiled code. The compiler incorporates four
levels of generic and target-specific optimizations. The level of optimizations
is selectable. The optimizations specific to the C6x DSP include:
2.1.2
Software pipelining
If conversion/predicated execution
Memory address cloning
Memory address dependence elimination
Assembly Optimizer
Once the dynamic profiler identifies critical code segments that can benefit
most from being generated in assembly language, the assembly optimizer
schedules the instructions, taking into account the architectural parallelism of
the C6x DSP. The assembly optimizer allows you to write assembly code without being concerned with pipeline structure of the device or with assigning registers. The tool honors C6x latency requirements, maximizes parallel code,
and allocates registers for the unlimited number of named, virtual registers that
are available to the user. The assembly optimizer takes in linear assembly
instructions and creates an intermediate file that is input into the code generator. The code generator then produces optimized and/or software pipelined assembly code.
2.1.3
Assembler
The assembler translates assembly language source code files into machine
language common object file format (COFF) object files. The assembly files
can contain C6x assembly language instructions, assembler directives, and
macro directives.
2-2
2.1.4
Linker
The linker allows you to combine COFF object files into a single executable
COFF output file. The linker allocates relocatable sections and symbols and
resolves external references between input files. It also accepts previously
linked files and library members as input.
TMS320C6x Tools
2-3
A timing display can be built into the application by inserting a few function calls
in the code. The resulting simple cycle counts, obtained without using the profiler or the debugger, can be printed automatically to allow you to track the
changes in execution speed of an algorithm over time. This output, while less
sophisticated, is continuously available with no further action.
TI provides scan-based emulation systems that support hardware and software debugging of target systems via a JTAG emulation cable. Scan-based
emulation is a unique, nonintrusive approach to system emulation, integration,
and debugging.
Initially, TI offers a stand-alone C6201 test and emulation board (TEB) that interfaces with the host platform through the XDS510 and XDS 510WS emulators through the IEEE Standard 1149.1 (JTAG) compliant port. The board
features a prototyping area for adding user-defined peripherals.
2-4
2.2.1
2.2.2
Windows 95 interface
Menu options for entering and leaving the profiler without exiting the debugger
C input/output displays in the command window
Options for starting and halting the C6x, including single-step, step-over,
return from called function, and run and halt commands
Support for debugging in C, assembly language, or both
Identification of time-consuming sections of the program through the profiler
Memory window that displays the values of a block of memory in any format specified
Watch window that displays the values of variables in the native C format
C source window that displays the C code and highlights the current line
Simulator
The C6x simulator is a software program that uses the TMS320 debugger
graphical user interface to simulate the operation of the C6x processor on the
host processor rather than on an actual target system. It uses object code produced by the macro assembler/linker or ANSI C compiler with the debugger
interface. The simulator provides XDS510 software debug capability for the
C6x with external memory without using the DSP hardware.
Each of the simulator software programs simulates the C6x operation and allows monitoring of the state of the processor. Key features of the C6x simulator include:
2-5
J
J
2-6
Chapter 3
Topic
Page
3.1
3.2
3-1
3-2
Third-Party Support
Phone Number
E-mail Address
Ariel Corporation
6098602900
ariel@[Link]
100541.3370@[Link]
D2 Technologies, Inc.
8055643424
sales@[Link]
4087731042
info@[Link]
6172753733
info@[Link]
3015725000
info@[Link]
GO DSP Corporation
4165996868
gdasilva@[Link]
6042784300
info@[Link]
8188656150
techsprt@[Link]
Pentek, Inc
2018185900
info@[Link]
davem@[Link]
Sonitech, Inc.
6172356824
info@[Link]
[Link]
Spectron Microsystems
8059685100
info@[Link]
[Link]
presrel/[Link]
8006638986 or
6044215422
sales@[Link]
[Link]
ViaDSP, Inc.
5083690048
dpenny@[Link]
6038832430
info@[Link]
3-3
Third-Party Support
Product Area
Ariel Corporation
D2 Technologies, Inc.
Go DSP Corporation
Innovative Integration
PCI6201 DSP coprocessor for telecom, communications and data acquisition applications
Loughborough Sound
Images
Pentek, Inc.
ViaDSP, Inc.
InvisiLink line of software and firmware for high density computer telephony
boards
Sonitech, Inc.
Spectron Microsystems,
Inc.
3-4
Appendix
AppendixAA
Glossary
A
address: The number representing a particular memory or peripheral storage location.
ALU: Arithmetic logic unit. The high-speed CPU circuit that performs arithmetic and logic operations. Numbers are transferred from registers into
the ALU for calculation, and the results are sent back to a register.
ASIC: Application-specific integrated circuit. A custom chip designed for a
specific application. It is designed by integrating standard cells from a
library.
assembler: A software program that creates a machine-language program
from a source file that contains assembly language instructions,
directives, and macro definitions. The assembler substitutes absolute
operation codes for symbolic operation codes, and absolute or
relocatable addresses for symbolic addresses.
assembly optimizer: A software program that optimizes linear assembly
code, which is assembly code that has not been register-allocated or
scheduled. The assembly optimizer is automatically invoked with the
shell program when one of the input files has an .sa extension.
B
boot loader: A built-in segment of code that transfers code from an external
source to program memory at power up.
C
clock cycles: A repeated set of events based on the input from the external
clock.
code: A set of instructions written to perform a task; a computer program or
part of a program.
CPU: Central processing unit. The computing part that coordinates the functions of a processor.
A-1
Glossary
D
data memory: Memory accessed through the C6x RAM interface.
DMA: Direct memory access. The mechanism by which an external device
or peripheral can access the processor memory to transfer data without
the processor having to execute data movement instructions.
DRAM: Dynamic random access memory. The most common type of computer memory, usually using one transistor and a capacitor to represent
a bit. The capacitors must be energized hundreds of times per second
to maintain the charges and lose their content when the power is removed.
E
EMIF: External memory interface. The boundary between the CPU and external memory through which information is conveyed.
execute packet: A set of instructions that execute in parallel.
external interrupt: A hardware reset triggered by a pin.
F
fetch packet: A packet containing up to eight instructions held in memory
for execution by the CPU.
functional unit: An operational portion of the CPU used to compute a result.
G
global interrupt enable (GIE): A bit in the control status register (CSR) that
is used to enable or disable maskable interrupts.
H
hardware interrupt: A suspension of the processor triggered through physical connections with on-chip peripherals or external devices.
HPI: Host port interface. A 16-bit wide access port through which a host (external) processor can read from and write to internal data memory.
A-2
Glossary
I
interrupt: A condition caused either by an event external to the CPU or by
a previously executed instruction. It forces the current program to be suspended and causes the processor to execute an interrupt service routine
corresponding to the interrupt.
L
latency: The delay between when a condition occurs and when the device
reacts to the condition. Also, in a pipeline, the necessary delay between
the execution of two instructions to ensure that the values used by the
second instruction are correct.
LSB: Least significant bit. The lowest order bit in a word.
M
maskable interrupt: A hardware interrupt that can be enabled or disabled
through software.
memory interleaving: A category of techniques for increasing memory
speed.
MIPS: Million instructions per second. A unit of execution speed of a computer.
MSB: Most significant bit. The highest-order bit in a word.
N
NMI: Nonmaskable interrupt. An interrupt that can be neither masked nor
disabled.
O
overflow: A condition in which the result of an arithmetic operation exceeds
the capacity of the register used to hold that result.
Glossary
A-3
Glossary
P
parallelism: The ability to extract multiple instructions from an algorithm that
can be executed at the same time.
pipeline:
R
RAM: Random-access memory. The primary workspace of a computer or
processor. Random means that the contents of each byte can be directly
accessed without regard to the bytes before or after it. RAM chips require
power to maintain their content.
register: A group of bits used for temporarily holding data or for controlling
or specifying the status of a device.
reset: A means of bringing the CPU to a known state by setting the registers
and control bits to predetermined values and signaling execution to start
at a specified address.
RISC: Reduced instruction set computing. A computer architecture that
minimizes chip complexity by using simple instructions.
S
SBSRAM: Synchronous burst static random-access memory.
SDRAM: Synchronous dynamic random-access memory. A high-speed
memory that can transfer bursts of noncontiguous data at 100M bytes
per second.
shifter: A hardware unit that moves bits in a word to the left or to the right
in relation to the current position.
A-4
Glossary
V
VelociTI: Architecture developed by TI that features very long instruction
words
VLIW: Very long instruction word. Architecture using words between the
sizes of 256 bits and 1024 bits.
Glossary
A-5
A-6
Index
Index
CPU
data access 1-8
power down 1-10
A
addressing-mode register
1-5
1-2
architecture
CPU 1-4
VelociTI 1-2
C
C6201 1-2
C6201 block diagram
C6201 CPU
1-5
1-3
1-3
1-5
1-5
C6x debugger
1-2
1-3
C6x simulator
2-5
1-7
functional units
1-10
1-4
A-1
code-generation tools
data access
CPU 1-8
DMA controller 1-8
data memory 1-7
data paths 1-4
debugger interface 2-5
development support 2-2
development tools 2-2
direct memory access 1-3, 1-7, 1-8, 1-9
DMA
See also direct memory access
controller 1-9
data access 1-8
2-5
C6x introduction
cache modes
1-5
1-3
2-2
1-10
Index-1
Index
H
halt CPU
1-10
1-3
host-port interface
1-8, 1-9
nonmaskable interrupt
I
idle modes
1-10
J
JTAG. See IEEE Standard 1149.1
K
1-3
M
MCSP. See multichannel serial port
memory
cache controller 1-7
cache modes 1-7
data 1-7
EEPROM 1-8
EMIF 1-8
external 1-8
flash 1-8
internal 1-7
program 1-7
program-memory modes
PROM 1-8
SDRAM 1-8
Index-2
1-10
1-7
interrupts 1-6
nonmaskable 1-6
key features
optimizations 2-2
2-4
1-6
performance 1-3
peripherals
direct memory access controller
external memory interface 1-8
host-port interface 1-8
idle modes 1-10
MCSP 1-10
multichannel serial port 1-8
power-down logic 1-8
timers 1-8, 1-10
phase-locked loop 1-3
pipeline, definition A-4
power-down logic 1-10
profiler 2-4
program memory 1-7
R
register, definition A-4
reset 1-6
definition A-4
S
1-7
simulator 2-5
software debug 2-5
SRAM 1-7
synchronous burst static RAM
1-8
1-8
Index
T
third-party support 3-3
contacts 3-3
product area 3-4
timers 1-10
tools
assembly optimizer 2-2
C compiler 2-2
debugger 2-4
evaluation 2-4
hardware emulation board
linker 2-2
profiler 2-4
simulator 2-4
transfer information 1-9
V
VelociTI 1-1, 1-2
very long instruction word (VLIW)
X
XDS510
2-5
2-4
Index-3
Index-4