T exas Instruments (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 the specifications
applicable at the time of sale in accordance with TI’s standard warranty . T esting 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.
Certain applications using semiconductor products may involve potential risks of death,
personal injury , or severe property or environmental damage (“Critical Applications”).
TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED, OR
WARRANTED TO BE SUITABLE FOR USE IN LIFE-SUPPORT APPLICATIONS, DEVICES
OR SYSTEMS OR OTHER CRITICAL APPLICATIONS.
Inclusion of TI products in such applications is understood to be fully at the risk of the customer.
Use of TI products in such applications requires the written approval of an appropriate TI officer .
Questions concerning potential risk applications should be directed to TI through a local SC
sales office.
In order to minimize risks associated with the customer’s applications, adequate design and
operating safeguards should be provided by the customer to minimize inherent or procedural
hazards.
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.
Copyright 1997, Texas Instruments Incorporated
About This Manual
Preface
Read This First
This user’s guide serves as an applications reference book for the TMS320C3x
generation of digital signal processors (DSPs). These include the TMS320C30,
TMS320C31, TMS320LC31, and TMS320C32. Throughout the book, all references to ’C3x refer collectively to the ’C30, ’C31, ’LC31 and ’C32.
This book provides information to assist managers and hardware/software
engineers in application development. It includes example code and hardware connections for various applications.
The guide shows how to use the instructions set, the architecture, and the ’C3x
interface. It presents examples for frequently used applications and discusses
more involved examples and applications. It also defines the principles involved
in many applications and gives the corresponding assembly language code for
instructional purposes and for immediate use. Whenever the detailed explanation
of the underlying theory is too extensive to be included in this manual, appropriate
references are given for further information.
Notational Conventions
This document uses the following conventions.
-
Program listings, program examples, and interactive displays are shown in
a special typeface. Examples use a bold version of the special
typeface for emphasis; interactive displays use a bold version of the
special typeface to distinguish commands that you enter from items that the
system displays (such as prompts, command output, error messages, etc.).
Here is an example of a system prompt and a command that you might
enter:
C: csr –a /user/ti/simuboard/utilities
iii
Notational Conventions
-
In syntax descriptions, the instruction, command, or directive is in bold
typeface and parameters are in an
italic typeface
. Portions of a syntax that
are in bold must be entered as shown; portions of a syntax that are in
describe the type of information that must be entered. Here is an example
of a directive syntax:
italics
.asect ”
The directive .asect has two parameters, indicated by
address
section name
”,
address
section name
. When you use .asect, the first parameter is an actual section
name, enclosed in double quotes; the second parameter is an address.
-
Square brackets ( [ and ] ) identify an optional parameter. If you use an
optional parameter, you specify the information within the brackets; you
do not enter the brackets themselves. Here is an example of an instruction
that has an optional parameter:
LALK
16-bit constant [, shift]
The LALK instruction has two parameters. The first parameter,
constant
, is required. The second parameter,
shift
, is optional. As this syntax
shows, if you use the optional second parameter, you must precede it with a
comma.
Square brackets are also used as part of the pathname specification for
VMS pathnames; in this case, the brackets are actually part of the pathname (they are not optional).
-
Braces ( { and } ) indicate a list. The symbol | (read as or) separates items
within the list. Here is an example of a list:
and
16-bit
{ * | *+ | *– }
This provides three choices: *, *+, or *–.
Unless the list is enclosed in square brackets, you must choose one item
from the list.
-
Some directives can have a varying number of parameters. For example,
the .byte directive can have up to 100 parameters. The syntax for this directive is:
.byte
value1 [, ... , valuen]
This syntax shows that .byte has at least one value parameter, but you
may supply additional value parameters, separated by commas.
iv
Information About Cautions / Related Documentation from Texas Instruments
Information About Cautions
This book contains cautions.
This is an example of a caution statement.
A caution statement describes a situation that could potentially
damage your software or equipment.
The information in a caution is provided for your protection. Please read each
caution carefully.
Related Documentation From Texas Instruments
The following books describe the TMS320 floating-point devices and related
support tools. To obtain a copy of any of these TI documents, call the Texas
Instruments Literature Response Center as indicated in the section
Need Assistance
title and literature number.
TMS320C3x General Purpose Applications User’s Guide
SPRU194) provides information to assist you in application development
for the TMS320C3x generation of digital signal processors (DSPs). It
includes example code and hardware connections for various appliances.
It also defines the principles involved in many applications and gives the
corresponding assembly language code for instructional purposes and for
immediate use.
…on page vi. When ordering, please identify the book by its
(literature number
TMS320C3x/C4x Assembly Language Tools User’s Guide
number SPRU035) describes the assembly language tools (assembler,
linker, and other tools used to develop assembly language code),
assembler directives, macros, common object file format, and symbolic
debugging directives for the ’C3x and ’C4x generations of devices.
TMS320C3x/C4x Optimizing C Compiler User’s Guide
SPRU034) describes the TMS320 floating-point C compiler. This C compiler
accepts ANSI standard C source code and produces TMS320 assembly
language source code for the ’C3x and ’C4x generations of devices.
(literature number
If You
(literature
Read This First
v
Related Documentation from Texas Instruments / References
References
TMS320C3x C Source Debugger User’s Guide
(literature number
SPRU053) tells you how to invoke the ’C3x emulator , evaluation module,
and simulator versions of the C source debugger interface. This book
discusses various aspects of the debugger interface, including window
management, command entry , code execution, data management, and
breakpoints. It also includes a tutorial that introduces basic debugger
functionality.
TMS320 DSP Development Support Reference Guide
(literature number
SPRU011) describes the TMS320 family of digital signal processors and
the tools that support these devices. Included are code-generation tools
(compilers, assemblers, linkers, etc.) and system integration and debug
tools (simulators, emulators, evaluation modules, etc.). Also covered are
available documentation, seminars, the university program, and factory
repair and exchange.
TMS320 Third-Party Support Reference Guide
(literature number
SPRU052) alphabetically lists over 100 third parties that provide various
products that serve the family of TMS320 digital signal processors. A
myriad of products and applications are offered—software and hardware
development tools, speech recognition, image processing, noise cancellation, modems, etc.
The publications in the following reference list contain useful information
regarding functions, operations, and applications of digital signal processing
(DSP). These books also provide other references to many useful technical
papers. The reference list is organized into categories of general DSP , speech,
image processing, and digital control theory and is alphabetized by author.
-
General Digital Signal Processing
Antoniou, Andreas,
Digital Filters: Analysis and Design
. New York, NY:
McGraw-Hill Company, Inc., 1979.
Bateman, A., and Y ates, W.,
Digital Signal Processing Design
. Salt Lake
City, Utah: W. H. Freeman and Company, 1990.
Brigham, E. Oran,
The Fast Fourier Transform.
Englewood Cliffs, NJ:
Prentice-Hall, Inc., 1974.
Burrus, C.S., and Parks, T .W .,
DFT/FFT and Convolution Algorithms.
New
York, NY: John Wiley and Sons, Inc., 1984.
Chassaing, R., and Horning, D.,
TMS320C25.
New York, NY: John Wiley and Sons, Inc., 1990.
Digital Signal Processing Applications with the TMS320 Family , Vol. I.
Digital Signal Processing with the
Tex-
as Instruments, 1986; Prentice-Hall, Inc., 1987.
vi
References
Digital Signal Processing Applications with the TMS320 Family, Vol. III.
McGraw Hill Company, Inc., 1987.
Rabiner, Lawrence R., and Schafer, R.W.,
Signals.
Shaughnessy , Douglas.,
Englewood Cliffs, NJ: Prentice-Hall, Inc., 1978.
Speech Communication.
Digital Processing of Speech
Wesley, 1987.
-
Image Processing
Andrews, H.C., and Hunt, B.R.,
Digital Image Restoration
Cliffs, NJ: Prentice-Hall, Inc., 1977.
Gonzales, Rafael C., and Wintz, Paul,
Digital Image Processing.
MA: Addison-Wesley Publishing Company, Inc., 1977.
Pratt, William K.,
Digital Image Processing
. New Y ork, NY: John Wiley and
Sons, 1978.
-
Multirate DSP
Crochiere, R.E., and Rabiner, L.R.,
Multirate Digital Signal Processing
Englewood Cliffs, NJ: Prentice-Hall, Inc., 1983.
V aidyanathan, P .P .,
Multirate Systems and Filter Banks
NJ: Prentice-Hall, Inc.
-
Digital Control Theory
New York, NY:
Reading, MA: Addison-
. Englewood
Reading,
.
. Englewood Cliffs,
viii
Dote, Y .,
Servo Motor and Motion Control Using Digital Signal Processors
.
Englewood Cliffs, NJ: Prentice-Hall, Inc., 1990.
Jacquot, R.,
Modern Digital Control Systems.
New Y ork, NY: Marcel Dekker,
Inc., 1981.
Katz, P.,
Digital Control Using Microprocessors
. Englewood Cliffs, NJ:
Prentice-Hall, Inc., 1981.
Kuo, B.C.,
Digital Control Systems.
New York, NY: Holt, Reinholt and
Winston, Inc., 1980.
Moroney , P .,
tors.
Cambridge, MA: The MIT Press, 1983.
Phillips, C., and Nagle, H.,
Issues in the Implementation of Digital Feedback Compensa-
Digital Control System Analysis and Design.
Englewood Cliffs, NJ: Prentice-Hall, Inc., 1984.
-
Adaptive Signal Processing
Haykin, S.,
Adaptive Filter Theory.
Englewood Cliffs, NJ: Prentice-Hall,
Inc., 1991.
Widrow, B., and Stearns, S.D.
Adaptive Signal Processing.
Englewood
Cliffs, NJ: Prentice-Hall, Inc., 1985.
-
Array Signal Processing
References
Haykin, S., Justice, J.H., Owsley, N.L., Y en, J.L., and Kak, A.C.
Processing.
Hudson, J.E.
Englewood Cliffs, NJ: Prentice-Hall, Inc., 1985.
Adaptive Array Principles.
New York, NY: John Wiley and
Sons, 1981.
Monzingo, R.A., and Miller, J.W.
Introduction to Adaptive Arrays.
NY: John Wiley and Sons, 1980.
Array Signal
New Y or k,
Read This First
ix
If You Need Assistance
If You Need Assistance . . .
-
World-Wide Web Sites
TI Onlinehttp://www.ti.com
Semiconductor Product Information Center (PIC)http://www.ti.com/sc/docs/pic/home.htm
DSP Solutionshttp://www.ti.com/dsps
320 Hotline On-line
Microcontroller Home Pagehttp://www.ti.com/sc/micro
Networking Home Pagehttp://www.ti.com/sc/docs/network/nbuhomex.htm
-
North America, South America, Central America
Product Information Center (PIC)(972) 644-5580
TI Literature Response Center U.S.A.(800) 477-8924
Software Registration/Upgrades(214) 638-0333Fax: (214) 638-7742
U.S.A. Factory Repair/Hardware Upgrades(281) 274-2285
U.S. Technical Training Organization(972) 644-5580
Microcontroller Hotline(281) 274-2370Fax: (281) 274-4203Email: mi cro @ti.com
Microcontroller Modem BBS(281) 274-3700 8-N-1
DSP Hotline(281) 274-2320Fax: (281) 274-2324Email: dsph@ti.com
DSP Modem BBS(281) 274-2323
DSP Internet BBS via anonymous ftp to ftp://ftp.ti.com/pub/tms320bbs
Networking HotlineFax: (281) 274-4027
-
Europe, Middle East, Africa
European Product Information Center (EPIC) Hotlines:
Literature Response Center+852 2 956 7288Fax: +852 2 956 2200
Hong Kong DSP Hotline+852 2 956 7268Fax: +852 2 956 1002
Korea DSP Hotline+82 2 551 2804Fax: +82 2 551 2828
Korea DSP Modem BBS+82 2 551 2914
Singapore DSP HotlineFax: +65 390 7179
Taiwan DSP Hotline+886 2 377 1450Fax: +886 2 377 2718
Taiwan DSP Modem BBS+886 2 376 2592
Taiwan DSP Internet BBS via anonymous ftp to ftp://dsp.ee.tit.edu.tw/pub/TI/
-
Japan
Product Information Center+0120-81-0026 (in Japan)Fax: +0120-81-0036 (in Japan)
DSP Hotline+03-3769-8735 or (INTL) 813-3769-8735Fax: +03-3457-7071 or (INTL) 813-3457-7071
DSP BBS via Nifty-ServeType “Go TIASP”
t
+03-3457-0972 or (INTL) 813-3457-0972Fax: +03-3457-1259 or (INTL) 813-3457-1259
http://www.ti.com/sc/docs/dsps/support.htm
Email: TLANHOT@micro.ti.com
x
If You Need Assistance / Trademarks
-
Documentation
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.
Note:When calling a Literature Response Center to order documentation, please specify the literature number of the
book.
Trademarks
ABEL is a trademark of DATA I/O.
CodeView, MS, MS-DOS, MS-Windows, and Presentation Manager are registered trademarks of
Microsoft Corporation.
DEC, Digital DX, Ultrix, VAX, and VMS are trademarks of Digital Equipment Corporation.
HPGL is registered trademark of Hewlett Packard Company.
Macintosh and MPW are trademarks of Apple Computer Corp.
Micro Channel, OS/2, PC-DOS, and PGA are trademarks of International Business Machines Corporation.
SP ARC, Sun 3, Sun 4, Sun Workstation, SunView, and SunWindows are trademark of SP ARC International,
Inc., but licensed exclusively to Sun Microsystems, Inc.
UNIX is a registered trademark in the United States and other countries, licensed exclusively through
Description of signed and unsigned integer and floating-point formats. Discussion of floatingpoint multiplication, addition, subtraction, normalization, rounding, and conversions.
Description of primary and expansion interfaces for the ’C30 and ’C31; external interface timing
diagrams; programmable wait-states and bank switching.
The TMS320C3x generation of digital signal processors (DSPs) are highperformance CMOS 32-bit floating-point devices in the TMS320 family of
single-chip DSPs.
The ’C3x generation integrates both system control and math-intensive functions
on a single controller. This system integration allows fast, easy data movement
and high-speed numeric processing performance. Extensive internal busing and
a powerful DSP instruction set provide the devices with the speed and flexibility
to execute at up to 60 million floating-point operations per second (MFLOPS).
The devices also feature a high degree of on-chip parallelism that allows users
to perform up to 11 operations in a single instruction.
The ’C3x family consists of three members: the ’C30, ’C31, and ’C32. The
’C30, ’C31, and ’C32 can perform parallel multiply and arithmetic logic unit
(ALU) operations on integer or floating-point data in a single cycle.
The processors also possess the following features for high performance and
ease of use:
-
General-purpose register file
-
Program cache
-
Dedicated auxiliary register arithmetic units (ARAU)
-
Internal dual-access memories
-
One direct memory access (DMA) channel (a two-channel DMA on the
TMS320C32) supporting concurrent I/O
-
Short machine-cycle time
General-purpose applications are greatly enhanced by the large address
space, multiprocessor interface, internally and externally generated wait states,
two external interface ports (one on the ’C31 and the ’C32) two timers, two serial
ports (one on the ’C31 and the ’C32), and multiple-interrupt structure. The ’C3x
supports a wide variety of system applications from host processor to dedicated
coprocessor.
1-2
High-level language is implemented more easily through a register-based architecture, large address space, powerful addressing modes, flexible instruction
set, and well-supported floating-point arithmetic.
Figure 1–1 shows a block diagram of ’C3x devices.
Figure 1–1. TMS320C3x Devices Block Diagram
TMS320C3x Devices
RAM
block 0
1Kx32 (’C30-’C31)
256x32 (’C32)
CPU
Integer and
floating-point
multiplier
8 auxiliary registers
2 index registers
Address
generation 1
12 control registers
2 low-power modes
(’C31-’C32)
IOSTRB
XRDY
XD31-0
XA12-0
MSTRB
Expansion port
(’C30)
memory interface
32-bit
data access
32-bit
program access
RESET
INT3-3
IACK
XF1-0
H1
H3
MCBL/MP
X2/CLKIN
V
DD
E-
VSSSHZ
MU6-0
X1
Program
cache
(64x32)
Integer and
floating-point
multiplier
8 extended-precision registers
Controller
Address
generation 0
1.1.1TMS320C3x Key Specifications
RAM
block 1
1Kx32 (’C30-’C31)
256 x32 (’C32)
DMA
coprocessor
DMA
channel 0
DMA
channel 1 (’C32)
ROM
4Kx32 (’C30)
boot (’C31-’C32)
Primary port
memory interface
Data access
32-bit (’C30-’C31)
8/16/32-bit (’C32)
Program access
32-bit (’C30-’C31)
16/32-bit (’C32)
Timer 0
Timer 1
Serial port 0
Serial port 1 (’C30)
RDY
HOLD
HOLDA
STRB (’C30-’C31)
R/W
D31-0
A23-0
STRB0_B3-0
STRB1_B3-0
(’C32)
IOSTRB
PRGW (’C32)
TCLK0
TCLK1
CLKX0
DX0
FSX0
CLKR0
DR0
FSR0
CLKX1
DX1
FSX1
CLKR1
DR1
FSR1
(’C32)
(’C32)
The key specifications of the ’C3x devices include the following:
-
Performance up to 60 MFLOPS
-
Highly efficient C language engine
-
Large address space: 16M words 32 bits
-
Fast memory management with on-chip DMA
-
Industry-exclusive 3-V versions available on some devices
1.1.2TMS320C30
The ’C30 is the first member of the ’C3x generation. It differs from the ’C31 and
’C32 by offering 4K ROM, 2K RAM, a second serial port, and a second external
bus.
1.1.3TMS320C31 and TMS320LC31
The ’C31 and ’LC31 are the second members of the ’C3x generation. They are
low-cost 32-bit floating-point DSPs which have a boot-loader program, 2K RAM,
single external port, single serial port, and are available in 3.3-V operation
(’LC31).
Introduction
1-3
TMS320C3x Devices
1.1.4TMS320C32
The ’C32 is the newest member of the ’C3x generation. They are enhanced
versions of the ’C3x family and the lowest cost floating-point processors on the
market today. These enhancements include a variable-width memory interface, two-channel DMA coprocessor with configurable priorities, flexible boot
loader, and a relocatable interrupt vector table.
1-4
Table 1–1. TMS320C30, TMS320C31, TMS320LC31, and TMS320C32 Comparison
Cycle
Memory (words)
On-ChipOff-ChipPeripherals
Device
Name
Freq
(MHz)
27752K4K6416M32
Time
(ns)
RAMROMCacheParallelSerial
8K32
DMA
Channels
212181 PGA0° to 85° (commercial)
Timers
Package
Type
Temperature
’C30
(5 V)
’C31
(5 V)
Introduction
’LC31
(3.3 V)
33602K4K6416M32
8K32
40502K4K6416M32
8K32
50402K4K6416M32
8K32
27752KBoot loader6416M32112132 PQFP0° to 85° (commercial)
33602KBoot loader6416M32112132 PQFP0° to 85° (commercial)
40502KBoot loader6416M32112132 PQFP0° to 85° (commercial)
50402KBoot loader6416M32112132 PQFP0° to 85° (commercial)
60332KBoot loader6416M32112132 PQFP0° to 85° (commercial)
33602KBoot loader6416M32112132 PQFP0° to 85° (commercial)
40502KBoot loader6416M32112132 PQFP0° to 85° (commercial)
21 2181 PGA0° to 85° (commercial)
21 2181 PGA
208 PQFP
21 2181 PGA
208 PQFP
–55° to 125° (military)
0° to 85° (commercial)
0° to 85° (commercial)
–55° to 125° (military)
–40° to 125° (extended)
–55° to 125° (military)
–40° to 125° (extended)
–55° to 125° (military)
–40° to 125° (extended)
–40° to 125° (extended)
TMS320C3x Devices
1-5
1-6
Cycle
TMS320C3x Devices
Table 1–1. TMS320C30, TMS320C31, TMS320LC31, and TMS320C32 Comparison (Continued)
Memory (words)
Device
Name
’C32
(5 V)
On-ChipOff-Chip
Freq
(MHz)
4050512Boot loader6416M32/16/8122144 PQFP0° to 85° (commercial)
5040512Boot loader6416M32/16/8122144 PQFP0° to 85° (commercial)
6033512Boot loader6416M32/16/8122144 PQFP0° to 85° (commercial)
Time
(ns)
RAM
ROMCacheParallelSerial
Peripherals
DMA
Channels
Timers
Package
Type
Temperature
–40° to 125° (extended)
–40° to 125° (extended)
–55° to 125° (military)
1.2Typical Applications
The TMS320 family’s versatility , realtime performance, and multiple functions
offer flexible design approaches in a variety of applications, which are shown
in Table 1–2.
Table 1–2. Typical Applications of the TMS320 Family
Disk control
Servo control
Robot control
Laser printer control
Engine control
Motor control
Kalman filtering
FAX
Cellular telephones
Speaker phones
Digital speech
Interpolation (DSI)
X.25 packet switching
Video conferencing
Spread spectrum
Communications
Spectrum analysis
Function generation
Pattern matching
Seismic processing
Transient analysis
Digital filtering
Phase-locked loops
Secure communications
Radar processing
Sonar processing
Image processing
Navigation
Missile guidance
Radio frequency modems
Sensor fusion
Engine control
Vibration analysis
Antiskid brakes
Anticollision
Adaptive ride control
Global positioning
Navigation
Voice commands
Digital radio
Cellular telephones
ConsumerIndustrialMedical
Radar detectors
Power tools
Digital audio/TV
Music synthesizer
Toys and games
Solid-state answering
Machines
Robotics
Numeric control
Security access
Power line monitors
Visual inspection
Lathe control
CAM
This chapter provides an architectural overview of the ’C3x processor. It includes
a discussion of the CPU, memory interface, boot loader, peripherals, and direct
memory access (DMA) of the ’C3x processor.
The ’C3x architecture responds to system demands that are based on sophisticated arithmetic algorithms that emphasize both hardware and software solutions. High performance is achieved through the precision and wide dynamic
range of the floating-point units, large on-chip memory , a high degree of parallelism, and the DMA controller.
Figure 2–1 through Figure 2–3 show functional block diagrams of the ’C30,
’C31, and ’C32 architectures, respectively.
2-2
Figure 2–1. TMS320C30 Block Diagram
0
0
Overview
Cache
(64
32 24242424323232
PDATA bus
RDY
HOLD
HOLDA
STRB
R/W
D31–D0
A23–A0
RESET
INT3–0
IACK
MC/MP
XF(1,0)
VDD(3-0)
IODVDD(1,0)
ADVDD(1,0)
PDV
DD
DDVDD(1,0)
MDV
DD
VSS(3-0)
DVSS(3–0)
CVSS(1,0)
IV
SS
V
BBP
SUBS
X1
X2/CLKIN
H1
H3
EMU6-0
RSV10–0
SHZ
Legend:
PDATA bus – program data bus
PADDR bus – program address bus
DDATA bus – data data bus
DADDR1 bus – data address 1 bus
DADDR2 bus – data address 2 bus
PADDR bus
DDATA bus
DADDR1 bus
Multiplexer
DADDR2 bus
DMADATA bus
DMAADDR bus
IR
PC
Controller
RAM
24
Multiplexer
CPU1
block 0
× 32)
(1K
32324040
Multiplier
REGISTER2
REGISTER 1
40
40
40
32
× 32)
323224243224
RAM
block 1
× 32)
(1K
CPU1
CPU2
REG1
REG2
32-bit
barrel
shifter
ALU
Extended-
precision
registers
(R7–R0)
DISP0, IR0, IR1
ARAU0ARAU1
BK
24
Auxiliary
24
registers
32
(AR0–AR7)
32
32
Other
registers
32
(12)
40
40
24
24
32
32
ROM
block
(4K
× 32)
DMA controller
Global-control
register
Source-address
register
Destination-
address
register
Transfer-
counter
register
40
Multiplexer
Peripheral Data Bus
Peripheral Address Bus
Serial port 0
Port-control
register
R/X timer
register
Data-transmit
register
Data-receive
register
Serial port 1
Port-control
register
R/Xtimer
register
Data-transmit
register
Data-receive
register
Timer0
Global-control
register
Timer-period
register
Timer-counter
register
Timer1
Global-control
register
Timer-period
register
Timer-counter
register
Port control
Primary
Expansion
XRDY
MSTRB
IOSTRB
XR/W
XD31–XD
XA12–XA
FSX0
DX0
CLKX0
FSR0
DR0
CLKR0
FSX1
DX1
CLKX1
FSR1
DR1
CLKR1
TCLK0
TCLK1
Architectural Overview
2-3
Overview
Figure 2–2. TMS320C31 Block Diagram
Cache
(64 × 32)
32 2424
PDATA bus
Multiplexer
IR
PC
Controller
PADDR bus
DDATA bus
DADDR1 bus
DADDR2 bus
DMADATA bus
DMAADDR bus
RDY
HOLD
HOLDA
STRB
R/W
D31–D0
A23– A0
RESET
INT(3– 0)
IACK
MCBL/ MP
XF(1,0)
V
(19– 0)
DD
VSS(24– 0)
SHZ
X2/ CLKIN
EMU(3– 0)
X1
H1
H3
Legend:
PDATA bus – program data bus
PADDR bus – program address bus
DDATA bus – data data bus
DADDR1 bus – data address 1 bus
DADDR2 bus – data address 2 bus
32
Multiplexer
CPU1
RAM
block 0
(1K × 32)
24
32324040
REG1
REG2
RAM
block 1
(1K × 32)
2424323232
Multiplier
40
40
40
32
24
24
32
32
32
32
24
32
CPU1
CPU2
REG1
REG2
Extended-
precision
registers
(R7–R0)
DISP0, IR0, IR1
ARAU0
Auxiliary
registers
(AR0– AR7)
registers
BK
Other
(12)
24
32-bit
barrel
shifter
ALU
32
40
40
ARAU1
24
24
32
32
Boot
loader
24
DMA controller
Global-control
register
Source-address
register
Destination-
address
register
Transfer-
counter
register
40
MUX
Multiplexer
Peripheral Data Bus
Peripheral Address Bus
Serial port 0
Serial-port control
register
Receive/transmit
timer register
Data-transmit
register
Data-receive
register
Timer0
Global-control
register
Timer-period
register
Timer-counter
register
Timer1
Global-control
register
Timer-period
register
Timer-counter
register
Port Control
Primary STRB
control register
FSX0
DX0
CLKX0
FSR0
DR0
CLKR0
TCLK0
TCLK1
-
2-4
Figure 2–3. TMS320C32 Block Diagram
Overview
32
IR
PC
24
RESET
INT(3-0)
IACK
XF(1,0)
H1
H3
MCBL/ MP
CLKIN
CV
SS
DVSS(6-0)
IV
SS
DV
DD
V
DDL
V
SSL
V
EMU0–3
(6-0)
(3-9)
(11-3)
(7-0)
(5-0)
SUBS
SHZ
Controller
Legend:
PDATA bus – program data bus
PADDR bus – program address bus
DDATA bus – data data bus
DADDR1 bus – data address 1 bus
DADDR2 bus – data address 2 bus
The ’C3x devices (’C30, ’C31, and ’C32) have a register-based CPU architecture. The CPU consists of the following components:
-
Floating-point/integer multiplier
-
Arithmetic logic unit (ALU)
-
32-bit barrel shifter
-
Internal buses (CPU1/CPU2 and REG1/REG2)
-
Auxiliary register arithmetic units (ARAUs)
-
CPU register file
Figure 2–4 shows a diagram of the various CPU components.
2-6
Figure 2–4. Central Processing Unit (CPU)
DADDR1 bus
DADDR2 bus
DDATA bus
Multiplexer
Central Processing Unit (CPU)
CPU1 bus
CPU2 bus
REG1 bus
REG2 bus
DADDR1 bus
DADDR2 bus
†
Disp = an 8-bit integer displacement carried in a program-control instruction
CPU1 bus
REG1 bus
REG2 bus
40
40
32
32324040
Multiplier
40
Extended-
precision
registers
(R0–R7)
Disp†, IR0, IR1
ARAU0ARAU1
24
24
32
32
32
32
BK
Auxiliary
registers
(AR0–AR7)
Other
registers
(12)
32-bit barrel
shifter
ALU
40
40
40
24
24
32
32
Architectural Overview
2-7
Central Processing Unit (CPU)
2.2.1Floating-Point/Integer Multiplier
The multiplier performs single-cycle multiplications on 24-bit integer and 32-bit
floating-point values. The ’C3x implementation of floating-point arithmetic allows
for floating-point or fixed-point operations at speeds up to 33-ns per instruction
cycle. T o gain even higher throughput, you can use parallel instructions to perform
a multiply and an ALU operation in a single cycle.
When the multiplier performs floating-point multiplication, the inputs are 32-bit
floating-point numbers, and the result is a 40-bit floating-point number. When
the multiplier performs integer multiplication, the input data is 24 bits and yields
a 32-bit result. See Chapter 5,
detailed information.
Data Formats and Floating-Point Operation,
2.2.2Arithmetic Logic Unit (ALU) and Internal Buses
The ALU performs single-cycle operations on 32-bit integer, 32-bit logical,
and 40-bit floating-point data, including single-cycle integer and floatingpoint conversions. Results of the ALU are always maintained in 32-bit integer
or 40-bit floating-point formats. The barrel shifter is used to shift up to 32 bits
left or right in a single cycle. See Chapter 5,
Operation,
for detailed information.
for
Data Formats and Floating-Point
Four internal buses, CPU1, CPU2, REG1, and REG2 carry two operands from
memory and two operands from the register file, allowing parallel multiplies
and adds/subtracts on four integer or floating-point operands in a single cycle.
2.2.3Auxiliary Register Arithmetic Units (ARAUs)
Two auxiliary register arithmetic units (ARAU0 and ARAU1) can generate two
addresses in a single cycle. The ARAUs operate in parallel with the multiplier
and ALU. They support addressing with displacements, index registers (IR0 and
IR1), and circular and bit-reversed addressing. See Chapter 6,
2-8
Modes,
for more information.
Addressing
2.3CPU Primary Register File
The ’C3x provides 28 registers in a multiport register file that is tightly coupled
to the CPU. Table 2–1 lists the register names and functions.
All of the primary registers can be operated upon by the multiplier and ALU and
can be used as general-purpose registers. The registers also have some special
functions. For example, the eight extended-precision registers are especially
suited for maintaining extended-precision floating-point results. The eight auxiliary
registers support a variety of indirect addressing modes and can be used as
general-purpose 32-bit integer and logical registers. The remaining registers
provide such system functions as addressing, stack management, processor
status, interrupts, and block repeat. See Chapter 3,
information.
System-stack pointer3.1.63-4
Status register3.1.73-5
CPU/DMA interrupt-enable regis-
ter
CPU interrupt flag3.1.93-11
I/O flag3.1.103-16
Repeat start-address3.1.113-17
Repeat end-address3.1.1 13-17
3.1.83-9
The extended-precision registers (R7–R0) can store and support operations
on 32-bit integers and 40-bit floating-point numbers. Any instruction that assumes
the operands are floating-point numbers uses bits 39–0. If the operands are
either signed or unsigned integers, only bits 31–0 are used; bits 39–32 remain
unchanged. This is true for all shift operations. See Chapter 5,
Floating-Point Operation,
for extended-precision register formats for floating-
Data Formats and
point and integer numbers.
The 32-bit auxiliary registers (AR7–AR0) are accessed by the CPU and
modified by the two ARAUs. The primary function of the auxiliary registers is
the generation of 24-bit addresses. They also can be used as loop counters
or as 32-bit general-purpose registers that are modified by the multiplier and
ALU. See Chapter 6,
Addressing Modes
, for detai led inform ation and ex amples
of the use of auxiliary registers in addressing.
2-10
The data-page pointer (DP) is a 32-bit register . The eight least significant bits
(LSBs) of the data-page pointer are used by the direct addressing mode as a
pointer to the page of data being addressed. Data pages are 64K words long,
with a total of 256 pages.
The 32-bit index registers (IR0, IR1) contain the value used by the ARAU to
compute an indexed address. See Chapter 6,
Addressing Modes
, for examples
of the use of index registers in addressing.
CPU Primary Register File
The ARAU uses the 32-bit block size register (BK) in circular addressing to
specify the data block size.
The system-stack pointer (SP) is a 32-bit register that contains the address
of the top of the system stack. The SP always points to the last element pushed
onto the stack. A
performs a preincrement; a
pop
performs a postdecre-
push
ment of the system-stack pointer. The SP is manipulated by interrupts, traps,
calls, returns, and the PUSH and POP instructions. See Section 6.10,
and User Stack Management
, on page 6-29, for more information.
System
The status register (ST) contains global information relating to the state of the
CPU. Operations usually set the condition flags of the status register according
to whether the result is 0, negative, etc. These include register load and store
operations as well as arithmetic and logical functions. When the status register
is loaded, however, a bit-for-bit replacement is performed with the contents of
the source operand, regardless of the state of any bits in the source operand.
Following a load, the contents of the status register are identical to the contents
of the source operand. This allows the status register to be easily saved and
restored. See T able 3–2 on page 3-6 for a list and definitions of the status register bits.
The CPU/DMA interrupt-enable register (IE) is a 32-bit register. The CPU
interrupt-enable bits are in locations 10–0. The DMA interrupt-enable bits are
in locations 26–16. A 1 in a CPU/DMA interrupt-enable register bit enables the
corresponding interrupt. A 0 disables the corresponding interrupt. See Section 3.1.8 on page 3-9 for more information.
The CPU interrupt flag register (IF) is also a 32-bit register. A 1 in a CPU
interrupt flag register bit indicates that the corresponding interrupt is set. A
0 indicates that the corresponding interrupt is not set. See Section 3.1.9 on
page 3-11 for more information.
The I/O flag register (IOF) controls the function of the dedicated external pins,
XF0 and XF1. These pins may be configured for input or output and may also
be read from and written to. See Section 3.1.10 on page 3-16 for more information.
The repeat-counter (RC) is a 32-bit register that specifies the number of times
to repeat a block of code when performing a block repeat. When the processor
is operating in the repeat mode, the 32-bit
repeat start-address register (RS)
contains the starting address of the block of program memory to repeat, and
the 32-bit
repeat end-address register (RE)
contains the ending address of the
block to repeat.
Architectural Overview
2-11
Other Registers
2.4Other Registers
The program-counter (PC) is a 32-bit register containing the address of the
next instruction to fetch. Although the PC is not part of the CPU register file,
it is a register that can be modified by instructions that modify the program flow.
The instruction register (IR) is a 32-bit register that holds the instruction opcode
during the decode phase of the instruction. This register is used by the instruction
decode control circuitry and is not accessible to the CPU.
2-12
2.5Memory Organization
The total memory space of the ’C3x is 16M (million) 32-bit words. Program,
data, and I/O space are contained within this 16M-word address space, allowing
the storage of tables, coefficients, program code, or data in either RAM or
ROM. In this way , memory usage is maximized and memory space allocated
as desired.
2.5.1RAM, ROM, and Cache
Figure 2–5 shows how the memory is organized on the ’C30. RAM blocks 0
and 1 are each 1K 32 bits. The ROM block, available only on the ’C30, is
4K 32 bits. Each RAM and ROM block is capable of supporting two CPU
accesses in a single cycle.
Figure 2–6 shows how the memory is organized on the ’C31. RAM blocks 0
and 1 are each 1K 32 bits and support two accesses in a single cycle. A boot
loader allows the loading of program and data at reset from 8-, 16-, 32-bit-wide
memories or serial port.
Figure 2–7 shows how the memory is organized on the ’C32. RAM blocks 0
and 1 are each 256 32 bits and support two accesses in a single cycle. A
boot loader allows the loading of program and data at reset from 1-, 2-, 4-, 8-,
16-, and 32-bit-wide memories or serial port. The ’C32 enhanced external
memory interface provides the flexibility to address 8-, 16-, or 32-bit data independently of the external memory width. The external memory width can be 8-, 16-,
or 32-bits wide.
Memory Organization
The ’C3x’s separate program, data, and DMA buses allow for parallel program
fetches, data reads and writes, and DMA operations. For example, the CPU can
access two data values in one RAM block and perform an external program
fetch in parallel with the DMA controller loading another RAM block, all within
a single cycle.
Architectural Overview
2-13
Memory Organization
Figure 2–5. Memory Organization of the TMS320C30
RDY
HOLD
HOLDA
STRB
R/W
D31–D0
A23–A0
Cache
(64 32)
32242432242432
PDATA bus
PADDR bus
DDATA bus
DADDR1 bus
Multiplexer
DADDR2 bus
DMADATA bus
DMAADDR bus
32243224243224
Program counter/
instruction register
RAM
block 0
(1K 32)
block 1
(1K 32)
CPU
RAM
32
controller
ROM block
(4K 32)
XRDY
MSTRB
IOSTRB
XR/W
XD31–XD0
XA12–XA0
Multiplexer
Peripheral bus
DMA
2-14
Figure 2–6. Memory Organization of the TMS320C31
Memory Organization
RDY
HOLD
HOLDA
STRB
R/W
D31–D0
A23–A0
Cache
(64 32)
32242432242432
PDATA bus
PADDR bus
DDATA bus
DADDR1 bus
Multiplexer
DADDR2 bus
DMADATA bus
DMAADDR bus
32243224243224
Program counter/
instruction register
RAM
block 0
(1K 32)
RAM
block 1
(1K 32)
CPU
32
controller
Boot ROM
Multiplexer
Peripheral bus
DMA
Architectural Overview
2-15
Memory Organization
Figure 2–7. Memory Organization of the TMS320C32
A23–A0
D31–D0
R/W
HOLD
HOLDA
PRGW
STRB0_B3/A-1
STRB0_B2/A-2
STRB0_B1
STRB0_B0
STRB1_B3/A-1
STRB1_B2/A-2
STRB1_B1
STRB1_B0
IOSTRB
Enhanced
external
memory
interface
RAM
Cache
(64 32)
32242432242432
PDATA bus
PADDR bus
DDATA bus
DADDR1 bus
Multiplexer
DADDR2 bus
DMADATA bus
DMAADDR bus
32243224243224
Program counter/
instruction register
block 0
(256 32)
RAM
block 1
(256 32)
CPU
32
controller
Boot ROM
Multiplexer
Peripheral bus
DMA
2-16
A 64 32-bit instruction cache is provided to store often-repeated sections
of code, which greatly reduces the number of off-chip accesses. This allows
for code to be stored off chip in slower, lower-cost memories. The external
buses are also freed for use by the DMA, external memory fetches, or other
devices in the system.
See Chapter 4,
Memory and the Instruction Cache
, for more information.
2.5.2Memory Addressing Modes
The ’C3x supports a base set of general-purpose instructions as well as arithmeticintensive instructions that are particularly suited for digital signal processing and
other numeric-intensive applications. See Chapter 6,
information.
Four groups of addressing modes are provided on the ’C3x. Each group uses
two or more of several different addressing types. The following list shows the
addressing modes with their addressing types.
-
General instruction addressing modes:
J
Register. The operand is a CPU register.
J
Short immediate. The operand is a 16-bit (short) or 24-bit (long) immediate value.
J
Direct. The operand is the contents of a 24-bit address formed by
concatenating the 8 bits of data-page pointer and a 16-bit operand.
J
Indirect. An auxiliary register indicates the address of the operand.
Memory Organization
Addressing Modes
, fo r mo re
-
3-operand instruction addressing modes:
J
Register. Same as for general addressing mode.
J
Indirect. Same as for general addressing mode.
-
Parallel instruction addressing modes:
J
Register. The operand is an extended-precision register.
J
Indirect. Same as for general addressing mode.
-
Branch instruction addressing modes:
J
Register. Same as for general addressing mode.
J
PC-relative. A signed 16-bit displacement or a 24-bit displacement is
added to the PC.
Architectural Overview
2-17
Internal Bus Operation
2.6Internal Bus Operation
Much of the ’C3x’s high performance is due to internal busing and parallelism.
Separate buses allow for parallel program fetches, data accesses, and DMA
accesses:
-
Program buses: PADDR and PDATA
-
Data buses: DADDR1, DADDR2, and DDA TA
-
DMA buses: DMAADDR and DMADA TA
These buses connect all of the physical spaces (on-chip memory, off-chip
memory, and on-chip peripherals) supported by the ’C3x. Figure 2–5,
Figure 2–6, and Figure 2–7 show these internal buses and their connections
to on-chip and off-chip memory blocks.
The program counter (PC) is connected to the 24-bit program address bus
(P ADDR). The instruction register (IR) is connected to the 32-bit program data
bus (PDA T A). These buses can fetch a single instruction word every machine
cycle.
The 24-bit data address buses (DADDR1 and DADDR2) and the 32-bit data
data bus (DDATA) support two data-memory accesses every machine cycle.
The DDATA bus carries data to the CPU over the CPU1 and CPU2 buses. The
CPU1 and CPU2 buses can carry two data-memory operands to the multiplier,
ALU, and register file every machine cycle. Also internal to the CPU are register
buses REG1 and REG2, which can carry two data values from the register file
to the multiplier and ALU every machine cycle. Figure 2–4 shows the buses
internal to the CPU section of the processor.
2-18
The DMA controller is supported with a 24-bit address bus (DMAADDR) and
a 32-bit data bus (DMADA TA). These buses allow the DMA to perform memory
accesses in parallel with the memory accesses occurring from the data and
program buses.
2.7External Memory Interface
The ’C30 provides two external interfaces: the primary bus and the expansion
bus. The ’C31 provides one external interface: the primary bus. The ’C32 provides one enhanced external interface with three independent multi-function
strobes. These buses consist of a 32-bit data bus and a set of control signals. The
primary and enhanced memory buses have a 24-bit address bus, whereas the
expansion bus has a 13-bit address bus. These buses address external program/
data memory or I/O space. The buses also have external RDY
state generation. You can insert additional wait states under software control.
Chapter 9,
The ’C3x family was designed for 32-bit instructions and 32-bit data operations.
This architecture has many advantages, including a high degree of parallelism
and provisions for a C compiler. However, the ’C30 and ’C31 require a 32-bit-wide
external memory even when the data requires only 8- or 16-bit-wide memories.
The ’C32 enhanced external memory interface overcomes this limitation by providing the flexibility to address 8-, 16-, or 32-bit data independently of the external memory width. In this way, the chip count and the size of external memory
is reduced. The number of memory chips can be further reduced by the ’C32’s
ability to allow code execution from 16- or 32-bit-wide memories. The ’C32
memory interface also reduces the total amount of RAM by allowing the physical
data memory to be 8, 16, or 32 bits wide. Internally, the ’C32 has a 32-bit architecture. So you can treat the ’C32 as a 32-bit device regardless of the physical
external memory width. The external memory interface handles the conversion
between external memory width and ’C32 internal 32-bit architecture.
External Memory Interface
External Memory Interface
signals for wait-
, covers external bus operation.
2.7.1TMS320C32 16- and 32-Bit Program Memory
The ’C32 executes code from either 16- or 32-bit-wide memories. When
connected to 32-bit memories, ‘C32 program execution is identical to that
of the ’C31. When connected to 16-bit zero wait-state memory, the ’C32
takes two instruction cycles to fetch a single 32-bit instruction. During the
first cycle, the ’C32 fetches the lower 16 bits. During the second cycle, the
’C32 fetches the upper 16 bits and concatenates them with the previously
fetched lower 16 bits. This process occurs entirely within the memory interface and is transparent to you. An external pin, PRGW
program memory width.
, dictates the external
Architectural Overview
2-19
External Memory Interface
2.7.2TMS320C32 8-, 16-, and 32-Bit Data Memory
The ’C32 external memory interface can load and store 8-, 16-, or 32-bit quantities into external memory and convert them into an internally-equivalent 32-bit
representation. The external memory interface accomplishes this without
changing the CPU instruction set. Figure 2–8 shows the supported external
memory widths, data types and sizes for zero wait-state memory and the associated cycle count.
Figure 2–8. TMS320C32-Supported Data Types and Sizes and External Memory Widths
Memory Width
8
Data
Type
Size
16
32
8
1-cycle read
2-cycle read
4-cycle read
To access 8-, 16-, or 32-bit data quantities (types) from 8-, 16-, or 32-bit-wide
memory , the memory interface uses either strobe STRB0 or STRB1, depending
on the address location within the memory map. Each strobe consists of four pins
for byte enables and/or additional addresses. For a 32-bit memory interface, all
four pins are used as strobe byte-enable pins. These strobe byte-enable pins
select one or more bytes of the external memory . For a 16-bit memory interface,
the ’C32 uses one of these pins as an additional address pin, while using two
pins as strobe byte-enable pins. For an 8-bit memory interface, the ’C32 uses
two of these pins as additional address pins while using one pin as strobe pin.
The ’C32 manipulates the behavior of these pins according to the contents of
the bus control registers (one control register per strobe). By setting a few bit
fields in this register, you indicate the data-type size and external memory width.
16
1-cycle read
1-cycle read
2-cycle read
32
1-cycle read
1-cycle read
1-cycle read
2-20
2.8Interrupts
Interrupts
The ’C3x supports four external interrupts (INT3–INT0), a number of internal
interrupts, and a nonmaskable external RESET
interrupt either the DMA or the CPU. When the CPU responds to the interrupt,
the IACK pin can be used to signal an external interrupt acknowledge. Section
7.5,
Reset Operation
The ’C30 and ’C31 external interrupts are level-triggered. To reduce external
logic and simplify the interface, the ’C32 external interrupts are edge- and levelor level-only triggered. The triggering is user-selectable through a bit in the
status register . See Section 3.1.7,
, on page 7-21 covers RESET and interrupt processing.
Status Register (ST)
signal. These can be used to
, for more information.
Two external I/O flags, XF0
under software control. These pins are also used by the interlocked operations
of the ’C3x. The interlocked-operations instruction group supports multiprocessor communication. See Section 7.4,
examples.
and XF1, can be configured as input or output pins
Interlocked Operations
, on page 7-13 for
Architectural Overview
2-21
Peripherals
2.9Peripherals
All ’C3x peripherals are controlled through memory-mapped registers on a dedicated peripheral bus. This peripheral bus is composed of a 32-bit data bus and
a 24-bit address bus. This peripheral bus permits straightforward communication to the peripherals. The ’C3x peripherals include two timers and two serial
ports (only one serial port and one DMA coprocessor are available on the ’C31
and one serial port and two DMA coprocessor channels on the ’C32).
Figure 2–9 shows these peripherals with their associated buses and signals.
See Chapter 12,
Figure 2–9. Peripheral Modules
Memory
space
Peripherals
, for more information.
Serial port 0
Port-control register
R/X timer register
Data-transmit register
Data-receive register
FSX0
DX0
CLKX0
FSR0
DR0
CLKR0
Peripheral data bus
Peripheral address bus
Available on ’C30
Serial port 1
Port-control register
R/X timer register
Data-transmit register
Data-receive register
Timer0
Global-control register
Timer-period register
Timer-counter register
Timer1
Global-control register
Timer-period register
Timer-counter register
FSX1
DX1
CLKX1
FSR1
DR1
CLKR1
TCLK0
TCLK1
2-22
2.9.1Timers
2.9.2Serial Ports
Peripherals
The two timer modules are general-purpose 32-bit timer/event counters with
two signaling modes and internal or external clocking. They can signal internally
to the ’C3x or externally to the outside world at specified intervals or they can
count external events. Each timer has an I/O pin that can be used as an input
clock to the timer , as an output signal driven by the timer, or as a general-purpose
I/O pin. See Chapter 12,
Peripherals
, for more information about timers.
The bidirectional serial ports (two on ’C30, one each on the ’C31 and ’C32) are
totally independent. They are identical to a complementary set of control registers
that control each port. Each serial port can be configured to transfer 8, 16, 24,
or 32 bits of data per word. The clock for each serial port can originate either
internally or externally. An internally generated divide-down clock is provided.
The pins are configurable as general-purpose I/O pins. The serial ports can also
be configured as timers. A special handshake mode allows ’C3x devices to
communicate over their serial ports with guaranteed synchronization.
Architectural Overview
2-23
Direct Memory Access (DMA)
2.10 Direct Memory Access (DMA)
The on-chip DMA controller can read from or write to any location in the
memory map without interfering with the CPU operation. The ’C3x can interface to slow, external memories and peripherals without reducing throughput
to the CPU. The DMA controller contains its own address generators, source
and destination registers, and transfer counter. Dedicated DMA address and
data buses minimize conflicts between the CPU and the DMA controller. A
DMA operation consists of a block or single-word transfer to or from memory .
See Section 12.3,
Figure 2–10 shows the DMA controller and its associated buses.
The ’C30 and ’C31 DMA coprocessors have one channel, while the ’C32 DMA
coprocessor has two channels. Each channel of the ’C32 DMA coprocessor is
equivalent to the ’C30/31 DMA with the addition of user-configurable priorities.
Because the DMA and CPU have distinct buses on the ’C3x devices, they can
operate independently of each other. However, when the CPU and DMA access
the same on-chip or external resources, the bandwidth can be exceeded and
priorities must be established. The ’C30 and ’C31 assign highest priority to the
CPU. The ’C32 DMA coprocessor provides more flexibility by allowing you to
choose one of the following priorities:
DMA Controller
, on page 12-48 for more information.
-
CPU:For all resource conflicts, the CPU has priority over the DMA.
-
DMA: For all resource conflicts, the DMA has priority over the CPU.
-
Rotating: When the CPU and DMA have a resource conflict during consecutive instruction cycles, the CPU is granted priority. On the following
cycle, the DMA is granted priority . Alternate access continues as long as
the CPU and DMA requests conflict in consecutive instruction cycles.
The DMA/CPU priority is configured by the DMA PRI bit fields of the corresponding
DMA global-control register. See Section 12.3,
DMA Controller
, on page 12-48 for
a complete description.
2-24
Figure 2–10. DMA Controller
DMAADDR bus
DMADATA bus
DMA controller
Global-control register
Direct Memory Access (DMA)
Peripheral data bus
Source-address register
Destination-address register
Transfer-counter register
Peripheral address bus
Architectural Overview
2-25
TMS320C30, TMS320C31, and TMS320C32 Differences
2.11 TMS320C30, TMS320C31, and TMS320C32 Differences
Table 2–2 shows the major differences between the ’C32, ’C31, and the ’C30
devices.
2-26
TMS320C30, TMS320C31, and TMS320C32 Differences
Table 2–2. Feature Set Comparison
Feature’C30’C31’C32
External busTwo buses:
-
Primary bus:
32-bit data
24-bit address
active for
STRB
0h–7FFFFFh and
80A000h–FFFFFFh
-
Expansion bus:
32-bit data
13-bit address
MSTRB
active for
800000h–801FFFh
IOSTRB
active for
804000h–805FFFh
ROM4kNoNo
One bus:
32-bit data
24-bit address
STRB
active 0h–7FFFFFh
and 80A000h–FFFFFFh
One bus:
-
-
-
32-bit data
24-bit address
active for
STRB0
0h–7FFFFFh and
880000h–8FFFFFh;
8-, 16-, 32-bit data in
8-, 16-, 32-bit-wide
memory
active for
STRB1
900000h–FFFFFFh;
8-, 16-, 32-bit data in
8-, 16-, 32- bit-wide
memory
IOSTRB
active for
810000h–82FFFFh
Boot loaderNoY esYes
On-chip RAM2k
address:
809800h–809FFFh
DMA1 channel
CPU greater priority than
DMA
2k
address:
809800h–809FFFh
1 channel
CPU greater priority than
DMA
512
address:
87FE00h–87FFFFh
2 channels
Configurable priorities
Serial ports211
Timers222
InterruptsLevel-triggeredLevel-triggeredLevel-triggered or com-
bination of edge- and
level-triggered
Interrupt vector
table
Fixed 0–3FhMicroprocessor: 0–3Fh
fixed
Relocatable
Boot loader:
809C1h–809FFFh fixed
Package208 PQFP
132 PQFP144 PQFP
181 PGA
Voltage5 V5 V and 3.3 V5 V
Temperature
0° to 85°C (commercial)
–40 to 125°C (extended)
–55 125°C (military)
0° to 85°C (commercial)
–40 to 125°C (extended)
–55 125°C (military)
0° to 85°C (commercial)
–40 to 125°C (extended)
–55 125°C (military)
Architectural Overview
2-27
Chapter 3
CPU Registers
The central processing unit (CPU) register file contains 28 registers that can
be operated on by the multiplier and arithmetic logic unit (ALU). Included in the
register file are the auxiliary registers, extended-precision registers, and index
registers.
Three registers in the ’C32 CPU register file have been modified to support new
features (2-channel DMAs, program execution from 16-bit memory width, etc.)
The registers modified in the ’C32 are: the status (ST) register, interrupt-enable
(IE) register, and interrupt flag (IF) register.
The ’C3x provides 28 registers in a multiport register file that is tightly coupled to
the CPU. The program counter (PC) is not included in the 28 registers. All of these
registers can be operated on by the multiplier and the ALU and can be used as
general-purpose 32-bit registers.
Table 3–1 lists the registers’ names and assigned functions of the ’C3x.
The registers also have some special functions for which they are particularly
appropriate. For example, the eight extended-precision registers are especially
suited for maintaining extended-precision floating-point results. The eight auxiliary
registers support a variety of indirect addressing modes and can be used as
general-purpose 32-bit integer and logical registers. The remaining registers
provide system functions, such as addressing, stack management, processor
status, interrupts, and block repeat. See Chapter 6,
information.
3.1.1Extended-Precision Registers (R7–R0)
The eight extended-precision registers (R7–R0) can store and support operations
on 32-bit integer and 40-bit floating-point numbers. These registers consist of two
separate and distinct regions:
-
Bits 39–32: dedicated to storage of the exponent (e) of the floating-point
number.
-
Bits 31–0: store the mantissa of the floating-point number:
J
Bit 31: sign bit (s)
J
Bits 30–0: the fraction (f)
CPU Multiport Register File
Addressing Modes
, for more
Any instruction that assumes the operands are floating-point numbers uses
bits 39–0. Figure 3–1 illustrates the storage of 40-bit floating-point numbers
in the extended-precision registers.
Figure 3–1. Extended-Precision Register Floating-Point Format
3932 31 300
Mantissa
For integer operations, bits 31–0 of the extended-precision registers contain
the integer (signed or unsigned). Any instruction that assumes the operands
are either signed or unsigned integers uses only bits 31–0. Bits 39–32 remain
unchanged. This is true for all shift operations. The storage of 32-bit integers
in the extended-precision registers is shown in Figure 3–2.
Figure 3–2. Extended-Precision Register Integer Format
3932 310
Signed or unsigned integerUnchanged
FractionSignExponent
CPU Registers
3-3
CPU Multiport Register File
3.1.2Auxiliary Registers (AR7–AR0)
The CPU can access the eight 32-bit auxiliary registers (AR7–AR0), and the
two auxiliary register arithmetic units (ARAUs) can modify them. The primary
function of the auxiliary registers is the generation of 24-bit addresses. However,
they can also operate as loop counters in indirect addressing or as 32-bit generalpurpose registers that can be modified by the multiplier and ALU. See Chap -
Addressing Modes
ter 6,
3.1.3Data-Page Pointer (DP)
The data-page pointer (DP) is a 32-bit register that is loaded using the load data
page (LDP) instruction (see Chapter 13,
eight LSBs of the data-page pointer are used by the direct addressing mode as a
pointer to the page of data being addressed (see Section 6.3,
on page 6-4). Data pages are 64K-words long, with a total of 256 pages. Bits 31–8
are reserved; you must always keep these set to 0 (cleared).
3.1.4Index Registers (IR0, IR1)
, for more information.
Assembly Language Instructions
). The
Direct Addressing
,
The 32-bit index registers (IR0 and IR1) are used by the ARAU for indexing
the address. See Chapter 6,
3.1.5Block Size (BK) Register
The 32-bit block size register (BK) is used by the ARAU in circular addressing to
specify the data block size. See Section 6.7,
for more information.
3.1.6System-Stack Pointer (SP)
The system-stack pointer (SP) is a 32-bit register that contains the address of the
top of the system stack. The SP always points to the last element pushed onto
the stack. The SP is manipulated by interrupts, traps, calls, returns, and the
PUSH, PUSHF, POP, and POPF instructions. Stack pushes and pops perform
preincrements and postdecrements on all 32 bits of the SP. However, only the
24 LSBs are used as an address. See Section 6.10,
Management
, on page 6-29 for more information.
Addressing Modes
Circular Addressing
, for more information.
, on page 6-21
System and User Stack
3-4
3.1.7Status (ST) Register
The status (ST) register contains global information about the state of the CPU.
Operations usually set the condition flags of the status register according to
whether the result is 0, negative, etc. This includes register load and store
operations as well as arithmetic and logical functions. However, when the
status register is loaded, the contents of the source operand replace the ST’s
contents bit for bit, regardless of the state of any bits in the source operand.
Following an ST load, the contents of the status register are identical to the
contents of the source operand. This allows the status register to be saved
easily and restored. At system reset, a 0 is written to this register.
Figure 3–3 shows the format of the status register for the ’C30 and ’C31 devices.
Figure 3–4 shows the format of the status register for the ’C32 device. Table 3–2
describes the status register bits, their names, and their functions.
Figure 3–3. Status Register (TMS320C30 andTMS320C31)
CPU Multiport Register File
31 – 16151413121 110987654321
xx
Notes:1) xx = reserved bit, read as 0
xx
2) R = read, W = write
GIECCCECFxxRM OVM LUFLVUFNZV
xx
R/WR/WR/WR/WR/WR/WR/W R/W R/WR/WR/W
R/WR/W
Figure 3–4. Status Register (TMS320C32 Only)
31 – 16151413121110987654321
PRGW
xxGIECCCECFxxRM OVM LUFLVUFNZV
status
Notes:1) xx = reserved bit, read as 0
2) R = read, W = write
INT
config
RR/WR/WR/WR/WR/WR/WR/WR/W R/W R/WR/WR/W
R/WR/W
0
C
0
C
CPU Registers
3-5
CPU Multiport Register File
Table 3–2. Status Register Bits
Bit NameReset Value NameDescription
C0Carry flagCarry condition flag
V0Overflow flagOverflow condition flag
Z0Zero flagZero condition flag
N0Negative flagNegative condition flag
UF0Floating-point under-
flow flag
LV0Latched overflow flagLatched overflow condition flag
LUF0Latched floating-point
underflow flag
OVM0Overflow mode flagOverflow mode flag
RM0Repeat mode flagRepeat mode flag
CE0Cache enableCE enables or disables the instruction cache.
Floating-point underflow condition flag
Latched floating-point underflow condition flag
The overflow mode flag affects only integer operations.
If OVM = 0, the overflow mode is turned off and integer
results that overflow are treated in no special way.
If OVM = 1, integer results overflowing in the positive
direction are set to the most positive, 2s-complement
number (7FFF FFFFh), and integer results overflowing
in the negative direction are set to the mos t negative
32-bit, 2s-complement number (8000 0000h).
If RM = 1, the PC is modified in either the repeat-block
or repeat-single mode.
Set CE = 1 to enable the cac he, allowing the cache to
be used according to the least recently used (LRU)
stack manipulation.
Set CE = 0 to disable the cache, preventing cache
updates or modifications (no cache fetches can be
made). Cache clearing (CC = 1) is allowed when
CE = 0.
Note:If a load of the status register occurs simultaneously with a CPU interrupt pulse trying to reset GIE, GIE is reset.
3-6
CPU Multiport Register File
Table 3–2. Status Register Bits (Continued)
Bit NameDescriptionNameReset Value
CF0Cache freezeEnables or disables the instruction cache
Set CF = 1 to freeze the cache (cache is not updated),
including LRU stack manipulation. If the cache is
enabled (CE = 1), fetches from the cache are allowed,
but modification of the cache contents is not allowed.
Cache clearing (CC = 1) is allowed. At reset, this bit
is cleared to 0, but it is set to 1 after reset.
When CF = 0, the cache is automatically updated by
instruction fetches from external memory. Also, when
CF = 0, cache clearing (CC = 1) is allowed.
The following table summarizes the CE and CF bits:
CE
CC0Cache clearCC = 1 invalidates all entries in the cache. This bit is
always cleared after it is written to, and is always read
as 0. At reset, 0 is written to this bit.
GIE0Global interrupt-enableIf GIE = 1, the CPU responds to an enabled interrupt.
If GIE = 0, the CPU does not respond to an enabled
interrupt.
INT config0Interrupt configuration
(‘C32 only)
Sets the external interrupt signals INT3 – INT0 for levelor edge-triggered interrupts.
INT Config
CF
Effect
0
0
Cache not enabled
0
1
Cache not enabled
1
0
Cache enabled and not frozen
1
1
Cache enabled but frozen
(cache read only)
Effect
0
1
All the external interrupts (INT3 – INT0)
are configured as level-triggeredinterrupts. Multiple interrupts may be
triggered when the signal is active for
a long period of time.
All the external interrupts (INT3 – INT0)
are configured as edge-triggered inter-rupts. Edge and duration are required
for all interrupts to be recognized.
Note:If a load of the status register occurs simultaneously with a CPU interrupt pulse trying to reset GIE, GIE is reset.
CPU Registers
3-7
CPU Multiport Register File
Table 3–2. Status Register Bits (Continued)
Bit NameDescriptionNameReset Value
PRGWDependent
on PRGW
pin level
Note:If a load of the status register occurs simultaneously with a CPU interrupt pulse trying to reset GIE, GIE is reset.
Program width status
(‘C32 only)
Indicates the status of the external input PRGW pin.
When the signal of the PRGW pin is high, the PRGW
status bit is set to 1, indicating a 16-bit memory width.
The ‘C32 performs two fetches to retrieve a single 32-bit
instruction word. The PRGW bit is a read-only bit, and
can have the following values:
PRG
0
1
Effect
Instruction fetches use one 32-bit external program memory read.
Instruction fetches use two 16-bit external program memory reads.
3-8
3.1.8CPU/DMA Interrupt-Enable (IE) Register
The CPU/DMA interrupt-enable (IE) register of the ’C30, ’C31, and ’C32 are
32-bit registers (see Figure 3–5 and Figure 3–6). The CPU interrupt-enable bits
are in locations 10–0 for ’C30 and ’C31 devices, and 11–0 for ’C32 devices. The
direct memory access (DMA) interrupt-enable bits are in locations 26–16 for
‘C30 and ‘C31 devices, and 31–16 for ’C32 devices. A 1 in a CPU/DMA IE bit
enables the corresponding interrupt. A 0 disables the corresponding interrupt.
At reset, 0 is written to this register.
Table 3–3 describes the interrupt-enable register bits, their names, and their
functions.
CPU Multiport Register File
Figure 3–5. CPU/DMA Interrupt-Enable (IE) Register
(TMS320C30 and TMS320C31)
Figure 3–7, Figure 3–8, and Figure 3–9 show the 32-bit CPU interrupt flag registers (IF) for the ‘C30, ‘C31, and ‘C32 devices, respectively. A 1 in a CPU IF
register bit indicates that the corresponding interrupt is set. The IF bits are set
to 1 when an interrupt occurs. They may also be set to 1 through software to
cause an interrupt. A 0 indicates that the corresponding interrupt is not set. If
a 0 is written to an IF register bit, the corresponding interrupt is cleared. At reset,
0 is written to this register. Table 3–4 describes the interrupt flag register bits,
their names, and their functions.
0DMA1 external interrupt 2 enable (’C32 only)
CPU Registers
3-11
CPU Multiport Register File
Figure 3–7. TMS320C30 CPU Interrupt Flag (IF) Register
10
xx
Notes:1) xx = reserved bit, read as 0
yyyy
R/WR/WR/WR/WR/WR/WR/WR/WR/WR/WR/WR/W
2) yy = reserved bit, set to 0 at reset; can store value
3) R = read, W = write
DINT9TINT18TINT0
71115–1231–16
XINT1RINT1
5
60
RINT04XINT03INT32INT21INT1
Figure 3–8. TMS320C31 CPU Interrupt Flag (IF) Register
10
xx
Notes:1) xx = reserved bit, read as 0
yyyy
2) yy = reserved bit, set to 0 at reset
3) R = read, W = write
DINT9TINT18TINT0
R/WR/WR/WR/WR/WR/WR/WR/WR/WR/WR/W
71115–1231–16
xx
xx
5
60
RINT04XINT03INT32INT21INT1
Figure 3–9. TMS320C32 CPU Interrupt Flag (IF) Register
INT0
INT0
31–16
ITTP
Notes:1) xx = reserved bit, read as 0
2) R = read, W = write
3-12
1115–12
DINT1xxxx
R/WR/WR/WR/WR/WR/WR/WR/WR/WR/WR/WR/W
10
DINT09TINT18TINT0
7
5
6
RINT04XINT03INT32INT21INT1xx
0
INT0
CPU Multiport Register File
Table 3–4. IF Bits and Functions
Bit
Name
INT00External interrupt 0 flag
INT10External interrupt 1 flag
INT20External interrupt 2 flag
INT30External interrupt 3 flag
XINT00Serial port 0 transmit flag
RINT00Serial port 0 receive flag
XINT10Serial port 1 transmit flag (‘C30 only)
RINT10Serial port 1 receive interrupt flag (‘C30 only)
TINT00Timer 0 interrupt flag
TINT10Timer 1 interrupt flag
DINT0DMA channel interrupt flag (‘C30 and ‘C31 only)
Reset
Value
Function
DINT00DMA0 channel interrupt flag (‘C32 only)
DINT10DMA1 channel interrupt flag (‘C32 only)
ITTP0Interrupt-trap table pointer (see Section 3.1.9.1)
Allows the relocation of interrupt and trap vector tables (‘C32 only)
Note:If a load of the interrupt flag (IF) register occurs simultaneously with a set of a flag by an
interrupt pulse, the loading of the flag has higher priority and overwrites the value of the
interrupt flag register.
CPU Registers
3-13
CPU Multiport Register File
3.1.9.1Interrupt-Trap Table Pointer (ITTP)
Similar to the rest of the ‘C3x device family, the ’C32’ s reset vector location
remains at address 0. However, the interrupt and trap vectors are relocatable.
This is achieved by the interrupt-trap table pointer (ITTP) bit field in the CPU
interrupt flag register, shown in Figure 3–9. The ITTP bit field dictates the
starting location (base) of the interrupt-trap vector table. This base address
is formed by left shifting by eight bits the value of the ITTP bit field. This shifted
value is called the effective base address and is referenced as EA[ITTP], as
shown in Figure 3–10. Therefore, the location of an interrupt or trap vector
is given by the addition of the effective base address formed by the ITTP bit
field (EA[ITTP]) and the offset of the interrupt or trap vector in the interrupttrap vector table, as shown in Figure 3–1 1. For example, if the ITTP contains
the value 100h, the serial port transmit interrupt vector is located at 10005h.
Note that the vectors stored in the interrupt-trap vector table are the addresses
of the start of the respective interrupt and trap routines. Furthermore, the
interrupt-trap vector table must lie on a 256-word boundary, since the eight
LSBs of the ef fective base address of the interrupt-trap vector table are 0.
See Section 7.6,
Interrupts
, on page 7-26 for more information on interrupt
vector tables.
Figure 3–10. Effective Base Address of the Interrupt-Trap Vector Table
EA[ITTP] =
Bits 31–16 of the CPU interrupt flag register
70823
00000000
3-14
Figure 3–11. Interrupt and Trap Vector Locations
CPU Multiport Register File
EA (ITTP) + 00h
EA (ITTP) + 01h
EA (ITTP) + 02h
EA (ITTP) + 03h
EA (ITTP) + 04h
EA (ITTP) + 05h
EA (ITTP) + 06h
EA (ITTP) + 07h
EA (ITTP) + 08h
EA (ITTP) + 09h
EA (ITTP) + 0Ah
EA (ITTP) + 0Ch
EA (ITTP) + 0Dh
EA (ITTP) + 1Fh
Reserved
INT0
INT1
INT2
INT3
XINT0
RINT0
Reserved
Reserved
TINT0
TINT1
DINT0EA (ITTP) + 0Bh
DINT1
Reserved
EA (ITTP) + 20hTRAP0
.
.
.
.
EA (ITTP) + 3Bh
EA (ITTP) + 3Ch
EA (ITTP) + 3Dh
EA (ITTP) + 3Eh
EA (ITTP) + 3Fh
TRAP27
TRAP28 (reserved)
TRAP29 (reserved)
TRAP30 (reserved)
TRAP31 (reserved)
CPU Registers
3-15
CPU Multiport Register File
3.1.10 I/O Flag (IOF) Register
The I/O flag (IOF) register is shown in Figure 3–12 and controls the function
of the dedicated external pins, XF0 and XF1. These pins can be configured for
input or output. The pins can also be read from and written to. At reset, 0 is
written to this register. Table 3–5 describes the I/O flags register bits, their
names, and their functions.
Figure 3–12. I/O Flag (IOF) Register
31–16
Notes:1) xx = reserved bit, read as 0
15–12
xxxxxx
2) R = read, W = write
11–8
INXF17OUTXF16I
Table 3–5. IOF Bits and Functions
Bit Name
I/OXF00If 0, XF0 is configured a general-purpose input pin.
OUTXF00Data output on XF0.
INXF00Data input on XF0. A write has no effect.
I
/OXF10If 0, XF1 is configured a general-purpose input pin.
OUTXF10Data output on XF1.
INXF1
5
/OXF1
RR/WR/WRR/WR/W
4
INXF03OUTXF02I/OXF01xx
xx
Reset
Value
Function
If 1, XF0 is configured a general-purpose output pin.
If 1, XF1 is configured a general-purpose output pin.
0Data input on XF1. A write has no effect.
0
3-16
CPU Multiport Register File
3.1.11 Repeat-Counter (RC) and Block-Repeat (RS, RE) Registers
The repeat-counter (RC) register is a 32-bit register that specifies the number
of times a block of code is to be repeated when a block repeat is performed.
n
If RC contains the number
The 32-bit repeat start-address (RS) register contains the starting address of
the program-memory block to be repeated when the CPU is operating in the
repeat mode.
The 32-bit repeat end-address (RE) register contains the ending address of
the program-memory block to be repeated when the CPU is operating in the
repeat mode.
Note: RE < RS
If RE< RS and the block mode is enabled, the code between RE and RS is
bypassed when the program counter encounters the repeat end (RE) address.
, the loop is executed n + 1 times.
CPU Registers
3-17
Other Registers
3.2Other Registers
3.2.1Program-Counter (PC) Register
The program counter (PC) is a 32-bit register containing the address of the
next instruction fetch. While the program-counter register is not part of the
CPU register file, it can be modified by instructions that modify the program
flow.
3.2.2Instruction Register (IR)
The instruction register (IR) is a 32-bit register that holds the instruction opcode during the decode phase of the instruction. This register is used by the
instruction decode control circuitry and is not accessible to the CPU.
3-18
3.3Reserved Bits and Compatibility
T o retain compatibility with future members of the ’C3x family of microprocessors,
reserved bits that are read as 0 must be written as 0. You must not modify the
current value of a reserved bit that has an undefined value. In other cases, you
should maintain the reserved bits as specified.
Reserved Bits and Compatibility
CPU Registers
3-19
Chapter 4
Memory and the Instruction Cache
The ’C3x provides a total memory space of 16M (million) 32-bit words that contain
program, data, and I/O space. Two RAM blocks of 1K 32 bits each (available
on the ’C30 and ’C31) or two RAM blocks of 256 32 bits (available on the ’C32)
and a ROM block of 4K 32 bits (available only on the ’C30) or boot loader
(available on the ’C31 and the ’C32) permit two CPU accesses in a single cycle.
A 64 32-bit instruction cache stores often-repeated sections of code, greatly
reducing the number of off-chip accesses and allowing code to be stored off-chip
in slower, lower-cost memories.
The ’C3x accesses a total memory space of 16M (million) 32-bit words of program, data, and I/O space and allows tables, coefficients, program code, or
data to be stored in either RAM or ROM. In this way , you can maximize memory
usage and allocate memory space as desired.
RAM blocks 0 and 1 are each 1K 32 bits on the ’C30 and ’C31. The ROM
block is 4K 32 bits on the ’C30. The ’C31 and ’C32 have a boot ROM. By
manipulating one external pin (MC/MP
or MCBL/MP), you can configure the first
1000h words of memory to address the on-chip ROM or external RAM. Each onchip RAM and ROM block can support two CPU accesses in a single cycle. The
separate program buses, data buses, and DMA buses allow for parallel program
fetches, data reads/writes, and DMA operations, which are covered in Chap ter 1 1,
Peripherals
.
The following sections describe the memory maps for the ’C30, ’C31, and
’C32.
4.1.1.1TMS320C30 Memory Map
The memory map depends on whether the processor is running in microprocessor mode (MC/MP = 0) or microcomputer mode (MC/MP = 1). The
memory maps for these modes are similar (see Figure 4–1 on page 4-4).
Locations 800000h–801FFFh are mapped to the expansion bus. When this
region is accessed, MSTRB is active. Locations 802000h–803FFFh are
reserved. Locations 804000h–805FFFh are mapped to the expansion bus.
When this region is accessed, IOSTRB
807FFFh are reserved. All of the memory-mapped peripheral bus registers
are in locations 808000h–8097FFh. In both modes, RAM block 0 is located
at addresses 809800h–809BFFh, and RAM block 1 is located at addresses
809C00h–809FFFh. Locations 80A000h–0FFFFFFh are accessed over the
external memory port (STRB
-
Microprocessor Mode
In microprocessor mode, the 4K on-chip ROM is not mapped into the ’C3x
memory map. Locations 0h–03Fh consist of interrupt vector, trap vector,
and reserved locations, all of which are accessed over the external memory
port (STRB
040h–7FFFFFh are also accessed over the external memory port.
is active. Locations 806000h–
active).
active) (see Figure 4–1 on page 4-4). Locations
4-2
-
Microcomputer Mode
In microcomputer mode, the 4K on-chip ROM is mapped into locations
0h–0FFFh. There are 192 locations (0h–0BFh) within this block for interrupt
vectors, trap vectors, and a reserved space (’C30). Locations 1000h–
7FFFFFh are accessed over the external memory port (STRB active).
Memory
Se ct i on 4 . 1. 2,
memory maps in greater detail and Section 4.2,
Peripheral Bus Memory Map
, on page 4-9 describes the peripheral
Reset/Interrupt/T rap Vector Map
on page 4-14 provides the vector locations for reset, interrupts, and traps.
Be careful! Access to a reserved area produces unpredictable
results.
,
Memory and the Instruction Cache
4-3
Memory
Figure 4–1. TMS320C30 Memory Maps
0h
03Fh
040h
7FFFFFh
800000h
801FFFh
802000h
803FFFh
804000h
805FFFh
806000h
807FFFh
808000h
8097FFh
809800h
809BFFh
809C00h
809FFFh
80A000h
FFFFFFh
Reset, interrupt, trap vectors,
and reserved locations (64)
(external STRB
STRB active
(8.192M words)
Expansion bus
MSTRB active
(8K words)
Reserved
(8K words)
Expansion bus
IOSTRB
(8K words)
Reserved
(8K words)
Peripheral bus
memory-mapped
(6K words internal)
RAM block 0
(1K words internal)
RAM block 1
(1K words internal)
STRB active
(7.96M words)
Microprocessor modeMicrocomputer mode
active)
External
active
registers
External
0h
0BFh
0C0h
0FFFh
1000h
7FFFFFh
800000h
801FFFh
802000h
803FFFh
804000h
805FFFh
806000h
807FFFh
808000h
8097FFh
809800h
809BFFh
809C00h
809FFFh
80A000h
FFFFFFh
Reset, interrupt, trap vectors,
and reserved locations (192)
ROM
(Internal)
External
active
STRB
(8.188M words)
Expansion bus
MSTRB
active
(8K words)
Reserved
(8K words)
Expansion bus
IOSTRB
memory-mapped
(6K words internal)
(1K words internal)
(1K words internal)
active
(8K words)
Reserved
(8K words)
Peripheral bus
registers
(Internal)
RAM block 0
RAM block 1
External
STRB
active
(7.96M words)
4-4
4.1.1.2TMS320C31 Memory Map
The memory map depends on whether the processor is running in microprocessor mode (MCBL/MP = 0) or microcomputer mode (MCBL/MP = 1). The
memory maps for these modes are similar (see Figure 4–2 on page 4-6).
Locations 800000h–807FFFh are reserved. All of the memory-mapped
peripheral bus registers are in locations 808000h–8097FFh. In both modes,
RAM block 0 is located at addresses 809800h–809BFFh, and RAM block 1 is
located at addresses 809C00h–809FFFh. Locations 80A000h–0FFFFFFh
are accessed over the external memory port (STRB
-
Microprocessor Mode
In microprocessor mode, the boot loader is not mapped into the ’C3x
memory map. Locations 0h–03Fh consist of interrupt vector, trap vector,
and reserved locations, all of which are accessed over the external
memory port (STRB active) (see Figure 4–2 on page 4-6). Locations
040h–7FFFFFh are also accessed over the external memory port.
-
Microcomputer Mode
In microcomputer mode, the boot loader ROM is mapped into locations
0h–0FFFh. The last 63 words (809FC1h to 809FFFh) of internal RAM
Block 1 are used for interrupt and trap
4-6). Locations 1000h–7FFFFFh are accessed over the external
memory port (STRB active).
branches
Memory
active).
(see Figure 4–2 on page
Section 4.1.2,
peripheral memory maps in greater detail and Section 4.2,
Trap Vector Map
Peripheral Bus Memory Map
, on page 4-9 describes the
Reset/Interrupt/
, on page 4-14 provides the vector locations for reset, inter-
rupts, and traps.
Be careful! Access to a reserved area produces unpredictable
results.
Memory and the Instruction Cache
4-5
Memory
Figure 4–2. TMS320C31 Memory Maps
0h
03Fh
040h
7FFFFFh
800000h
807FFFh
808000h
8097FFh
809800h
809BFFh
809C00h
809FFFh
80A000h
FFFFFFh
Reset, interrupt, trap vectors,
and reserved locations (64)
(external STRB
STRB active
(8.192M words)
Reserved
(32K words)
Peripheral bus
memory-mapped
(6K words internal)
RAM block 0
(1K words internal)
RAM block 1
(1K words internal)
STRB
(7.96M words)
active)
External
registers
External
active
0h
0FFFh
1000h
400000h
7FFFFFh
800000h
807FFFh
808000h
8097FFh
809800h
809BFFh
809C00h
809FC0h
809FC1h
809FFFh
80A000h
FFF000h
FFFFFFh
Reserved for bootloader operations
Boot 1
Boot 2
Reserved
(32K words)
Peripheral bus
memory-mapped
(6K words internal)
RAM block 0
(1K words internal)
RAM block 1
(1K – 63 words internal)
User program interrupt
and trap branches
(63 words internal)
Boot 3
External
STRB
active
(8.188M words)
registers
External
STRB
active
(7.96M words)
†
4-6
Microprocessor modeMicrocomputer/boot-loader mode
†
See Section 3.1.3,
Data-Page Pointer (DP)
, on page 3-4 for more information.
4.1.1.3TMS320C32 Memory Map
The memory map depends on whether the processor is running in microprocessor mode (MCBL/MP = 0) or microcomputer mode (MCBL/MP = 1). The
memory maps for these modes are similar (see Figure 4–3 on page 4-8).
Locations 800000h–807FFFh, 809800h–80FFFh, and 830000H–87FDFFh are
reserved. Locations 810000h–82FFFFh are mapped to the external bus with
IOSTRB
active. All of the memory-mapped peripheral bus registers are in locations 808000h–8097FFh. In both modes, RAM block 0 is located at addresses
87FE00h–87FEFFh, and RAM block 1 is located at addresses 87FF00h–
87FFFFh. Locations 900000h–FFFFFFh are mapped to the external bus with
STRB1 active.
Unlike the fixed interrupt-trap vector table location of the ’C30 and ’C31 devices,
the ’C32 has a user-relocatable interrupt-trap vector table. The interrupt-trap
vector table must start on a 256-word boundary. The starting location is programmed through the interrupt-trap table pointer (ITTP) bit field in the CPU interrupt flag (IF) register. See Section 3.1.9.1,
on page 3-14.
-
Microprocessor Mode
Memory
Interr up t- Trap Table Pointer (I TT P )
,
In microprocessor mode, the boot loader is not mapped into the ’C3x memory
map. Locations 0h–7FFFFFFh are accessed over the external memory port
(STRB0 active) with location 0h containing the reset vector.
-
Microcomputer Mode
In microcomputer mode, the on-chip boot loader ROM is mapped into
locations 0h–0FFFh. Locations 1000h–7FFFFFh are accessed over the
external memory port (STRB0 active).
The ’C32 boot loader has additional modes over the ’C31 boot loader to handle
the data types, sizes, and memory widths supported by the external memory interface. The memory boot load supports data transfer with and without handshaking.
The handshake mode allows synchronous program transfer by using two pins as
data-acknowledge and data-ready signals.
See Section 4.1.2,
Reset/Interrupt/Trap Vector Map
Peripheral Bus Memory Map
, on page 4-14 for more information.
, on page 4-9 and Section 4.2,
Be careful! Access to a reserved area produces unpredictable
results.
Memory and the Instruction Cache
4-7
Memory
Figure 4–3. TMS320C32 Memory Maps
0h
7FFFFFh
800000h
807FFFh
808000h
8097FFh
809800h
80FFFFh
810000h
Reset-vector location
External memory
memory-mapped registers
(6K words internal)
External memory
IOSTRB
active
STRB0
(8.192M words)
Reserved
(32K words)
Peripheral bus
Reserved
(26K words)
active (128K)
(128K words)
0h
0FFFh
1000h
1001h
7FFFFFh
800000h
807FFFh
808000h
8097FFh
809800h
80FFFFh
810000h
810001h
Reserved for
boot-loader operations
Boot 1
External memory
STRB0
active
(8.188M words)
Reserved
(32K words)
Peripheral bus
memory-mapped registers
(6K words internal)
Reserved
(26K words)
Boot 2
External memory
active (128K)
IOSTRB
(128K words)
4-8
82FFFFh
830000h
87FDFFh
87FE00h
87FEFFh
87FF00h
87FFFFh
880000h
8FFFFFh
900000h
FFFFFFh
82FFFFh
Reserved
(319.5K words)
RAM block 0
(256 words internal)
RAM block 1
(256 words internal)
External memory
STRB0
active
(512K words)
External memory
Microprocessor modeMicrocomputer/boot-loadermode
active
STRB1
(7.168M words)
830000h
87FDFFh
87FE00h
87FEFFh
87FF00h
87FFFFh
880000h
8FFFFFh
900000h
900001h
FFFFFFh
Reserved
(319.5K words)
RAM block 0
(256 words internal)
RAM block 1
(256 words internal)
External memory
STRB0
active
(512K words)
Boot 3
External memory
active
STRB1
(7.168M words)
4.1.2Peripheral Bus Memory Map
The following sections describe the peripherial bus memory maps for the ’C30,
’C31, and ’C32.
4.1.2.1TMS320C30 Peripheral Bus Memory Map
The ’C30 memory-mapped peripheral registers are located starting at address
808000h. Figure 4–4 on page 4-10 shows the peripheral bus memory map. The
shaded blocks are reserved.
Memory
Memory and the Instruction Cache
4-9
Memory
Figure 4–4. TMS320C30 Peripheral Bus Memory-Mapped Registers
Serial port 0 R/X timer counter
Serial port 0 R/X timer period
Serial port 0 data transmit
4-10
80804Ch
808050h
808052h
808053h
808054h
808055h
808056h
808058h
80805Ch
808060h
808064h
Serial port 0 data receive
Serial port 1 global control
FSX/DX/CLKX serial port 1 control
FSR/DR/CLKR serial port 1 control
Serial port 1 R/X timer control
Serial port 1 R/X timer counter
Serial port 1 R/X timer period
Serial port 1 data transmit
Serial port 1 data receive
Expansion-buscontrol
Primary-buscontrol
4.1.2.2TMS320C31 Peripheral Bus Memory Map
The ’C31 memory-mapped peripheral registers are located starting at address
808000h. Figure 4–5 shows the peripheral bus memory map. The shaded
blocks are reserved.
Figure 4–5. TMS320C31 Peripheral Bus Memory-Mapped Registers
The ’C32’s memory-mapped peripheral and external-bus control registers are
located starting at address 808000h, as shown in Figure 4–6 on page 4-13. The
shaded blocks are reserved.
4-12
Figure 4–6. TMS320C32 Peripheral Bus Memory-Mapped Registers
Memory
808000h
808004h
808006h
808008h
808010h
808014h
808016h
808018h
808020h
808024h
808028h
808030h
808034h
808038h
808040h
DMA 0 global control
DMA 0 source address
DMA 0 destination address
DMA 0 transfer counter
DMA 1 global control
DMA 1 source address
DMA 1 destination address
DMA 1 transfer counter
Timer 0 global control
Timer 0 counter
Timer 0 period
Timer 1 global control
Timer 1 counter
Timer 1 period register
Serial port global control
808042h
808043h
808044h
808045h
808046h
808048h
80804Ch
808060h
808064h
808068h
8097FFh
FSX/DX/CLKX serial port control
FSR/DR/CLKR serial port control
Serial port R/X timer control
Serial port R/X timer counter
Serial port R/X timer period
Serial port data transmit
Serial port data receive
IOSTRB buscontrol
STRB0 buscontrol
STRB1 buscontrol
Memory and the Instruction Cache
4-13
Reset/Interrupt/Trap Vector Map
4.2Reset/Interrupt/Trap Vector Map
The addresses for the reset, interrupt, and trap vectors are 00h–3Fh, as shown
in Figure 4–7 and Figure 4–8. The reset vector contains the address of the reset
routine.
-
’C30 and ’C31 Microprocessor and Microcomputer Modes
In the microprocessor mode of the ’C30 and ’C31 and the microcomputer
mode of the ’C30, the reset interrupt and trap vectors stored in locations
0h–3Fh are the addresses of the starts of the respective reset, interrupt,
and trap routines. For example, at reset, the content of memory location
00h (reset vector) is loaded into the PC, and execution begins from that
address (see Figure 4–8 on page 4-16).
-
’C31 Microcomputer/Boot-Loader Mode
In the microcomputer/boot-loader mode of the ’C31, the interrupt and trap
vectors stored in locations 809FC1h–809FFFh are
the start of the respective interrupt and trap routines (see Figure 4–9 on
page 4-17).
branch
instructions to
-
’C32 Microprocessor and Microcomputer/Boot-Loader Mode
The ’C32 has a user-relocatable interrupt-trap vector table. The interrupttrap vector table must start on a 256-word boundary . The starting location is
programmed through the interrupt-trap table pointer (ITTP) bit field in the
CPU interrupt flag (IF) register. See Section 3.1.9.1,
Pointer (ITTP)
, on page 3-14. The reset vector is stored at location 0h in
Interrupt-Trap Table
microprocessor mode.
4-14
Reset/Interrupt/Trap Vector Map
Figure 4–7. Reset, Interrupt, and Trap Vector Locations for the TMS320C30
Traps 28–31 are reserved; do not use them.
Unlike the ’C31’s microprocessor mode, the ’C31 microcomputer/boot loader
mode uses a dual-vectoring scheme to service interrupts and trap requests. In
this dual vectoring scheme, a branch instruction rather than a vector address
is used.
Memory and the Instruction Cache
4-17
Reset/Interrupt/Trap Vector Map
Figure 4–10. Interrupt and Trap Vector Locations for TMS320C32
EA (ITTP) + 00h
EA (ITTP) + 01h
EA (ITTP) + 02h
EA (ITTP) + 03h
EA (ITTP) + 04h
EA (ITTP) + 05h
EA (ITTP) + 06h
EA (ITTP) + 07h
EA (ITTP) + 08h
EA (ITTP) + 09h
EA (ITTP) + 0Ah
EA (ITTP) + 0Ch
EA (ITTP) + 0Dh
EA (ITTP) + 1Fh
Reserved
INT0
INT1
INT2
INT3
XINT0
RINT0
Reserved
Reserved
TINT0
TINT1
DINT0EA (ITTP) + 0Bh
DINT1
Reserved
4-18
EA (ITTP) + 20hTRAP0
.
.
.
.
EA (ITTP) + 3Bh
EA (ITTP) + 3Ch
EA (ITTP) + 3Dh
EA (ITTP) + 3Eh
EA (ITTP) + 3Fh
TRAP27
TRAP28 (reserved)
TRAP29 (reserved)
TRAP30 (reserved)
TRAP31 (reserved)
Note: Traps 28–31
Traps 28–31 are reserved; do not use them.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.