1.2.1 Floating-Point Code Development
1.3
Components of the C28x plus Floating-Point CPU
www.ti.com
Components of the C28x plus Floating-Point CPU
When developing C28x floating-point code use Code Composer Studio 3.3, or later, with at least service
release 8. The C28x compiler V5.0, or later, is also required to generate C28x native floating-point
opcodes. This compiler is available via Code Composer Studio update advisor as a seperate download.
V5.0 can generate both fixed-point as well as floating-point code. To build floating-point code use the
compiler switches:-v28 and - -float_support = fpu32. In Code Composer Studio 3.3 the float_support
option is in the build options under compiler-> advanced: floating point support. Without the float_support
flag, or with float_support = none, the compiler will generate fixed-point code.
When building for C28x floating-point make sure all associated libraries have also been built for
floating-point. The standard run-time support (RTS) libaries built for floating-point included with the
compiler have fpu32 in their name. For example rts2800_fpu32.lib and rts2800_fpu_eh.lib have been built
for the floating-point unit. The "eh" version has exception handling for C++ code. Using the fixed-point
RTS libraries in a floating-point project will result in the linker issuing an error for incompatible object files.
To improve performance of native floating-point projects, consider using the
C28x FPU Fast RTS Library
(
). This library contains hand-coded optimized math routines such as division, square root,
atan2, sin and cos. This library can be linked into your project before the standard runtime support library
to give your application a performance boost. As an example, the standard RTS library uses a polynomial
expansion to calculate the sin function. The Fast RTS library, however, uses a math look-up table in the
boot ROM of the device. Using this look-up table method results in approximately a 20 cycle savings over
the standard RTS calculation.
The C28x+FPU contains:
•
A central processing unit for generating data and program-memory addresses; decoding and executing
instructions; performing arithmetic, logical, and shift operations; and controlling data transfers among
CPU registers, data memory, and program memory
•
A floating-point unit for IEEE single-precision floating point operations.
•
Emulation logic for monitoring and controlling various parts and functions of the device and for testing
device operation. This logic is identical to that on the C28x fixed-point CPU.
•
Signals for interfacing with memory and peripherals, clocking and controlling the CPU and the
emulation logic, showing the status of the CPU and the emulation logic, and using interrupts. This logic
is identical to the C28x fixed-point CPU.
Some features of the C28x+FPU central processing unit are:
•
Fixed-Point instructions are pipeline protected. This pipeline for fixed-point instructions is identical to
that on the C28x fixed-point CPU. The CPU implements an 8-phase pipeline that prevents a write to
and a read from the same location from occurring out of order. See
•
Some floating-point instructions require pipeline alignment. This alignment is done through software to
allow the user to improve performance by taking advantage of required delay slots.
•
Independent register space. These registers function as system-control registers, math registers, and
data pointers. The system-control registers are accessed by special instructions.
•
Arithmetic logic unit (ALU). The 32-bit ALU performs 2s-complement arithmetic and Boolean logic
operations.
•
Floating point unit (FPU). The 32-bit FPU performs IEEE single-precision floating-point operations.
•
Address register arithmetic unit (ARAU). The ARAU generates data memory addresses and
increments or decrements pointers in parallel with ALU operations.
•
Barrel shifter. This shifter performs all left and right shifts of fixed-point data. It can shift data to the left
by up to 16 bits and to the right by up to 16 bits.
•
Fixed-Point Multiplier. The multiplier performs 32-bit
×
32-bit 2s-complement multiplication with a 64-bit
result. The multiplication can be performed with two signed numbers, two unsigned numbers, or one
signed number and one unsigned number.
SPRUEO2A – June 2007 – Revised August 2008
Introduction
9
Содержание TMS320C28 series
Страница 2: ...2 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 12: ...Introduction 12 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 20: ...CPU Register Set 20 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...
Страница 136: ...Instruction Set 136 SPRUEO2A June 2007 Revised August 2008 Submit Documentation Feedback ...