2
$\begingroup$

I am reading wikipedia article about digital signal processor and as shown in end of attached snapshot

." Most general-purpose microprocessors can also execute digital signal processing algorithms successfully, but may not be able to keep up with such processing continuously in real-time"

Please elaborate with example/application? What is meant by real-time here in context of dsp?

enter image description here

$\endgroup$
1
  • 3
    $\begingroup$ Could you include the text as text, not as phone screenshot? There's the "quotation" formattin button for this very reason. $\endgroup$ Jul 30, 2020 at 12:14

3 Answers 3

3
$\begingroup$

The staple processor instruction of specialized DSP processors is a multiply-accumulate instruction. The vector multiplication and summation are performed in a single command fetch, it's a sort of SIMD (but not exactly). Only advanced MCU's have this instruction in their command set. Hence the advantage of DSP processors over general-purpose MCU's w.r.t. ALU performance on typical signal-processing operations, even when comparable technological process are used in their manufacturing. The same for FPGA devices with internal DSP blocks. In short, less command fetch cycles, higher performance.

$\endgroup$
3
$\begingroup$

Real Time means having time-limit or time-constraint to complete assigned processing. For example : If you are using a DSP processor in the receive chain of a Communication system with certain Symbol Rate, then the processor must be able to process a symbol worth of data within a limited time-constraint in order to keep up with the received signal. If it cannot complete processing of a symbol within that certain time-limit then the received signal samples will start to pile up pending for processing, and eventually the processor will run out of the limited Memory that it is having.

And the reason why general purpose Microprocessors cannot keep up with the real-time requirement is because they lack specialized processing units which can perform vectored MAC(Multiply-Accumulate) operations. They lack SIMD(Single Instruction Multiple Data) architecture, which enables the processing of multiple data with a single instruction in a single fetch cycle.

Thus, compared to general purpose microprocessors, DSP processors can perform the MAC operations on large number of data in smaller number of instructions.

$\endgroup$
3
$\begingroup$

DSP algorithm implementations (software coding) are easiest when your microprocessor has an FPU hardware, but it's also possible with integer (fixed-point) ALUs too.

This means that your microprocessor should either have a dedicated FPU, or it can use a (very inefficient) software emulation for FPU operations. Alternatively one can try a more difficult to program, but more efficient to run, fixed-point approach with integer based arithmetic as well.

Some legacy microprocessors (such as intel 80386,80486, motorola 68010,68020) were based on integer ALU only, and their FPU unit were sold in a separate optional co-processor (80387,80487 or 68881).

Nowadays most (but not all) CPUs come with some 32-bit (or even 64-bit) FPU hardware built-in. But that's not enough.

DSP algorithms require not only an capable arithmetic unit, but also high data throughputs depending on the application. A speech coder can very well be impemented in real-time with a mediocre CPU, while a video encoder in real-time may be hard to achieve.

Real-time means that your processor should be capable of finishing its chunk of job, while live data (opposed to offline data) is fed into it, without overflowing internal storage buffers. This happens, for example, when you play an electronic keyboard; as you press the keys, their sound should be immediately (less than detectable delay threshold) processed and output, before the next keys were pressed (or they will overwrite and skip previously pressed key notes). Or, you want to record input audio as an mp3 file. The input data stream through microphone should be encoded into MP3 audio format before the next buffer filled in so that previous data buffer won't be overwritten.

For high data-rate real-time applications, general purpose CPU may be inefficient or insufficient due to its architecture; so the architecture of CPU is modified. SIMD based FPUs, more cores for parallel processing, optimized caches, and special RISC instruction set (as opposed to CISC) should be employed.

And that's what is referred to as a special purpose DSP processor.

$\endgroup$
10
  • 1
    $\begingroup$ That first sentence is not only false, but weird to see from someone who also mentions the 386 and 68020. Surely you must remember the Motorola 56k series and other contemporary hardware. Pretty sure that the bulk of DSP is still done with integers in hardware (voice codecs, video for known codecs etc). $\endgroup$
    – pipe
    Jul 30, 2020 at 19:55
  • $\begingroup$ @pipe No! On the contrary that's a weird comment to get from someone who had spent enough time here, on DSP stack exchange, to develop the correct sense that DSP operations refer to the mathematical theory of DSP, real numbers, and not to their particular implementations. That's why I have also indicated the fixed-point implementation alternative when a native FPU is not available or software emulation is too expensive... That's a perspective into the theory of signal processing. Integers are used in abundance (especially on video processing), yet this is not the perspective I had... $\endgroup$
    – Fat32
    Jul 31, 2020 at 0:10
  • $\begingroup$ I agree the first sentence is false. I have numerous real-time DSP implentations that are not floating point $\endgroup$
    – johnnymopo
    Aug 2, 2020 at 18:38
  • $\begingroup$ @johnnymopo the fact that you have implemented some subsets of DSP algorithms using fixed point or integer arithmetic cannot make the general statement as false. That's the accepted norm in DSP; FPU is the generalisation, Fixed point is the special case.This is like; visible light being an electromagnetic wave in theory, but treated quite different in most practical applications. Light is an EMW isn't it? $\endgroup$
    – Fat32
    Aug 3, 2020 at 13:11
  • 2
    $\begingroup$ This is a strange discussion. DSP might be described as applying operations to discrete signals in domains such as audio, video, radio in order to improve, interpret or act upon information in that signal. The practical means to do dsp depends on the hw resources and migh be gates of an ASIC or blocks of an FPGA or integer arithmetic of a micro controller or wide SIMD registers of a cpu doing many 64-bit float ops at a time or 2000 «threads» of a GPU or... Often the mathematical theory is easier to map to a scalar double prec float engine than other engines, but we take what we have. $\endgroup$
    – Knut Inge
    Aug 3, 2020 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.