Comparison between DSP and ordinary MCU

Publisher:码梦创想Latest update time:2011-03-31 Source: elecfansKeywords:DSP  MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Consider an example of digital signal processing, such as a finite impulse response filter (FIR). In mathematical terms, a FIR filter is a series of dot products. It takes an input quantity and an ordinal vector, multiplies the coefficients and the sliding window of input samples, and then adds all the products together to form an output sample.

Similar operations are repeated in large quantities during digital signal processing, so devices designed for this purpose must provide special support, which has led to the separation of DSP devices and general-purpose processors (GPPs):

1 Support for dense multiplication operations

GPPs are not designed to do dense multiplication tasks, and even some modern GPPs require multiple instruction cycles to do a multiplication. DSP processors use specialized hardware to implement single-cycle multiplication. DSP processors also add accumulator registers to handle the sum of multiple products. Accumulator registers are usually wider than other registers, adding extra bits called result bits to avoid overflow. At the same time, in order to fully realize the benefits of specialized multiplication-accumulation hardware, almost all DSP instruction sets include explicit MAC instructions.

2 Memory Structure

Traditionally, GPP uses the von Neumann memory structure. In this structure, there is only one memory space connected to the processor core through a set of buses (an address bus and a data bus). Usually, four memory accesses will occur to perform a multiplication, which takes at least four instruction cycles.

Most DSPs use the Harvard structure, which divides the memory space into two, storing programs and data respectively. They have two sets of buses connected to the processor core, allowing them to be accessed simultaneously. This arrangement doubles the bandwidth of the processor memory, and more importantly, provides data and instructions to the processor core at the same time. Under this layout, the DSP can implement single-cycle MAC instructions.

There is also the problem that today's typical high-performance GPP actually contains two on-chip caches, one for data and one for instructions, which are directly connected to the processor core to speed up access at runtime. Physically, this dual memory and bus structure on chip is almost the same as the Harvard structure. However, logically, there are important differences between the two.

GPP uses control logic to determine which data and instruction words are stored in the on-chip cache, without the programmer's knowledge (and perhaps without the programmer's knowledge). In contrast, DSP uses multiple on-chip memories and multiple sets of buses to ensure multiple memory accesses per instruction cycle. When using DSP, the programmer explicitly controls which data and instructions are stored in on-chip memory. When writing programs, the programmer must ensure that the processor can effectively use its dual buses.

In addition, DSP processors almost never have data caches. This is because typical data for DSP is a data stream. That is, after the DSP processor performs calculations on each data sample, it is discarded and rarely reused.

3 Zero-overhead loops

If you understand a common characteristic of DSP algorithms, that is, most of the processing time is spent executing small loops, it is easy to understand why most DSPs have dedicated hardware for zero-overhead loops. The so-called zero-overhead loop means that the processor does not spend time checking the value of the loop counter, conditionally transferring to the top of the loop, and decrementing the loop counter by 1 when executing the loop.

In contrast, GPP loops are implemented in software. Some high-performance GPPs use branch prediction hardware to achieve nearly the same effect as hardware-supported zero-overhead loops.

4 Fixed-point calculation

Most DSPs use fixed-point calculations instead of floating-point. Although DSP applications must pay great attention to digital accuracy, it should be much easier to do it with floating-point, but for DSP, cheapness is also very important. Fixed-point machines are cheaper (and faster) than corresponding floating-point machines. In order to avoid using floating-point machines while ensuring digital accuracy, DSP processors support saturation calculations, rounding, and shifting in both instruction sets and hardware.

Keywords:DSP  MCU Reference address:Comparison between DSP and ordinary MCU

Previous article:Design and Application of FPGA in Micro Projector
Next article:Design of Elliptic Function Low-pass Filter Based on DDS

Recommended ReadingLatest update time:2024-11-16 20:39

How to quickly master an MCU, you can start from these aspects
The basic principles and functions of any MCU are similar, and the only differences are the configuration and number of peripheral function modules, instruction systems, etc. As for the instruction systems, although they seem to be very different in form, they are actually just different symbols. The meanings, functio
[Microcontroller]
How to quickly master an MCU, you can start from these aspects
MCU Program for Serial Communication
beep bit p3.7 ;buzzer definition       org 00h       jmp main       org 23h ;Serial interrupt entry address       jmp com_int ;Serial interrupt service routine ; ************** Main program starts *******************         org 30h   main: mov sp,#30h ;Set up stack              lcall rest ;Initialize    
[Microcontroller]
Software and hardware design of electronic expansion valve test machine based on single chip microcomputer
Electronic expansion valve is an expansion valve controlled by electronic circuits. It is a key component in variable frequency air conditioning and refrigeration equipment. Since the electronic expansion valve can quickly adjust the valve opening according to the instructions of the CPU, quickly control the flow of
[Microcontroller]
Software and hardware design of electronic expansion valve test machine based on single chip microcomputer
Research and implementation of vehicle video processing system based on DSP
   Introduction   At present, most traffic monitoring application systems are mainly focused on emergency alarm, vehicle positioning and voice communication, and there are not many image applications. Based on this consideration, this paper designs a vehicle image acquisition and processing system. The system collects
[Embedded]
High reliability system design based on 32-bit microcontroller MC68HC376
Introduction With the continuous development of industrial technology, the requirements for microcontroller control are becoming higher and higher. Microcontrollers are required to have higher response speed and stronger data processing capabilities. Various high-performance new microcontrollers have been rapidly dev
[Microcontroller]
Interpretation of 51 single chip microcomputer LED system circuit
The LED rotating display is a rotating LED display screen developed based on the principle of visual persistence. It installs 16 LED light-emitting devices on a carrier with a certain rotation speed. Each LED light-emitting tube is arranged in a straight line with equal spacing. As the rotation speed increases, the pr
[Embedded]
Interpretation of 51 single chip microcomputer LED system circuit
51 single chip microcomputer realizes double-click button triggering of independent buttons
1. Use proteus to draw a simple circuit diagram for subsequent simulation 2. Programming /******************************************************************************************************************** ---- @Project: Independent-KEY ---- @File: main.c ---- @Edit: ZHQ ---- @Version: V1.0 ---- @CreationTime: 20
[Microcontroller]
51 single chip microcomputer realizes double-click button triggering of independent buttons
The structure and principle of 51 single chip microcomputer timer/counter
  Timer/Counter is abbreviated as Timer. Its main functions include generating various time intervals and recording the number of external events. It is one of the most commonly used and basic components in microcomputers. The 803l microcontroller has two 16-bit timer/counters: Timer 0 (T0) and Timer 1 (T1).   T0 is
[Microcontroller]
The structure and principle of 51 single chip microcomputer timer/counter
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号