Chapter 7
Programming the MIPS32® 74K™ Core Family, Revision 02.14
87
The MIPS32® DSP ASE
The MIPS DSP ASE is provided to accelerate a large range of DSP algorithms. You can get most programming infor-
mation from this chapter. There’s more detail in the formal DSP ASE specification
, but expect to read
through lots of material aimed at hardware implementors. You may also find
useful for tips and examples
of converting DSP algorithms for the DSP ASE.
Different target applications generally need different data size and precision:
•
32-bit data: audio (non-hand-held) decoding/encoding - a wide range of “hi-fi” standards for consumer audio or
television sound.
Raw audio data (as found on CD) is 16-bit; but if you do your processing in 16 bits you lose precision beyond
what is acceptable for hi-fi.
•
16-bit data: digital voice for telephony. International telephony code/decode standards include G.723.1
(8Ksample/s, 5-6Kbit/s data rate, 37ms delay), G.729 (8Kbit/s, 15ms delay) and G.726 (16-40Kbit/s, computa-
tionally simpler and higher quality, good for carrying analogue modem tones). Application-specific filters are
used for echo cancellation, noise cancellation, and channel equalization.
Also used for soft modems and much general “DSP” work (filters, correlation, convolution); lo-fi devices use 16
bits for audio.
•
8-bit data: processing of printer images, JPEG (still) images and video data.
7.1 Features provided by the MIPS® DSP ASE
Those target applications can benefit from unconventional architecture features because they rely on:
•
Fixed-point fractional data types: It is not yet economical (in terms of either chip size or power budget) to use
floating point calculations in these contexts. DSP applications use fixed-point fractions. Such a fraction is just a
signed integer, but understood to represent that integer divided by some power of two. A 32-bit fractional format
where the implicit divisor is 2
16
(65536) would be referred to as a Q15.16 format; that’s because there are 16 bits
devoted to fractional precision and 15 bits to the whole number range (the highest bit does duty as a sign bit and
isn’t counted).
With this notation Q31.0 is a conventional signed integer, and Q0.31 is a fraction representing numbers between
-1 and 1 (well, nearly 1). It turns out that Q0.31 is the most popular 32-bit format for DSP applications, since it
won’t overflow when multiplied (except in the corner case where -1
×
-1 leads to the just-too-large value 1).
Q0.31 is often abbreviated to Q31.
The DSP ASE provides support for Q31 and Q15 (signed 16-bit) fractions.
•
Saturating arithmetic: It’s not practicable to build in overflow checks to DSP algorithms - they need to be too
fast. Clever algorithms may be built to be overflow-proof; but not all can be. Often the least worst thing to do
Summary of Contents for MIPS32 74K Series
Page 1: ...Document Number MD00541 Revision 02 14 March 30 2011 Programming the MIPS32 74K Core Family...
Page 10: ...Programming the MIPS32 74K Core Family Revision 02 14 10...
Page 54: ...3 8 The TLB and translation Programming the MIPS32 74K Core Family Revision 02 14 54...
Page 83: ......
Page 101: ...The MIPS32 DSP ASE 101 Programming the MIPS32 74K Core Family Revision 02 14...
Page 134: ...8 4 Performance counters Programming the MIPS32 74K Core Family Revision 02 14 134...