Consoles 961
point applies. On the other hand, the capacity to dig a
big hole is as good as infinite, too.
25.19.5 Parallelism
DSPs differ from conventional microprocessors in that
their architecture is contrived to make certain common
processes as slick as possible and to be able to perform
as much real data manipulation and housekeeping
within each clock cycle as possible. This latter is called
parallelism, and the degree of parallelism is what sets
devices apart in capability. For instance, performing an
FIR filter (or a mixer routine, for that matter) within one
clock cycle, a DSP can.
- Do a multiply and accumulate (MAC).
- Fetch in the next data word ready for the next MAC,
update data pointer. - Fetch in the next coefficient ready for the next MAC,
update coefficient pointer. - Update the program counter.
In short, everything that needs to happen to ensure a
filter point can be calculated within one cycle is done,
ready for the next.
25.19.6 Multiple Memory Spaces
Memory allocation is nearly always somewhat different
from ordinary processors, which usually have just one
memory space shared between all functions; DSPs have
at least two separate memory spaces; the Freescales
have three, for example: one for the program informa-
tion (program memory), one typically for coefficients,
and one typically for the inevitable intermediate filter
values etc. necessarily stored between per-sample calcu-
lations and for internally stacked-up audio data, if
brought in enbloc from outside.
25.19.7 Real-Time Specific Peripherals
Additionally, most DSPs have convenient peripherals
built into them to allow ready, seamless, and fast
transfer of data in and out of the chip, either into
memory-mapped data space and/or through a variety of
serial communication formats. It is usually possible to
seamlessly connect a DSP to a number of convention-
ally serially formatted A/D or D/A converters and to
other DSPs. Definitely not least, a ready and fast means
of importing fresh programs/coefficients with which to
modify the data is always available via a host port.
A related major tool is DMA, or direct memory
access. This allows the moving of considerable amounts
of data into and out of the DSPs memories with little
impact on the main cycle budget other than that required
to set up the necessary pointers and to fire off the DMA
activity at the required times. On very busy processors
conflicts can arise (DMA does borrow some real
processor resources while it’s not looking, and under
normal circumstances usually gets away with it) so it’s
not entirely free, but it is more than handy.
25.20 Time Processing in DSP
25.20.1 Time Manipulation
Something what is very readily achieved in digital is
storing information, either long term onto disks or flash
memory, medium term in RAM, or short term within
processor registers and internal RAM. Nearly all manip-
ulations of data of any complexity greater than the soft
matrix example above demand storage.
25.20.2 Delay
A stream of input data is written into RAM memory and
subsequently, some time later, read out again. The
length of time recordable (sample length) depends on
the size of memory and the sampling rate—the faster
the rate, the quicker the memory will be eaten. This
memorized sample may be stored elsewhere then— say,
on a hard drive.
Say a relatively short time delay is required for an
echo. The input data stream would be written into RAM
and read out at a fixed time (a certain number of
samples) later. Sooner rather than later the memory
would run out and the delay stop, so the memory is
usually arranged as a circular buffer; when the buffer
end is reached, the memory register leaps back to the
start of the buffer and overwrites what was previously
there, and so on. The buffer is read in the same manner,
at a time after it has been written determined by the
required delay. As long as the buffer is long enough to
contain enough samples for the required delay, a contin-
uous delayed output version of the input is available.
The main advantage to the seeming complexity of the
circular buffer is that only pointers, or indexes, are
being changed and updated; the only audio samples
being changed are the writing of the newest sample over
the oldest one. What is important is what is not
happening; huge amounts of data are not being read and