Introduce the factors to be considered in selecting DSP chips with examples[Copy link]
DSP chip, also known as digital signal processor, is a microprocessor that is particularly suitable for digital signal processing operations. Its host application is to implement various digital signal processing algorithms in real time and quickly. In the hardware design of DSP system, only after the DSP chip (DSP technology) is selected, can its peripheral circuits and other circuits of the system be further designed. Therefore, when designing DSP application system, the selection of DSP chip is a very important link. So, what are the selection principles and considerations of DSP chip? (Embedded processor) The selection of DSP chip should be determined according to the actual needs of the application system, so as to meet the use requirements and not waste resources, thereby achieving the purpose of minimizing costs. The editor has collected and sorted out information, and summarized the selection parameters of DSP chips in the following aspects according to different application scenarios, design goals and different focuses of selecting DSP chips: 1. Factors to consider in selecting DSP chips (1) Calculation accuracy: In general, the calculation accuracy of floating-point DSP chips is higher than that of fixed-point DSP chips, but power consumption and price also increase accordingly. Generally, the word length of fixed-point DSP chips is 16 bits, 24 bits or 32 bits, and the word length of floating-point chips is 32 bits. The accumulator is generally 32 bits or 40 bits. The characteristics of fixed-point DSP are high main frequency, fast speed, low cost, and low power consumption. It is mainly used in control, communication, voice/image, consumer electronics and other fields with low computational complexity. For problems that can usually be solved with fixed-point devices, try to use fixed-point devices as much as possible because they are economical, fast, low cost and low power consumption. However, when programming, you should pay attention to the dynamic range of the signal and add calibration operations to limit the dynamic range of the signal in the code. Although I We can improve the calculation accuracy by improving the algorithm, but doing so will increase the complexity of the program and the amount of calculation. The speed of floating-point DSP is generally lower than that of fixed-point DSP, and its cost and power consumption are higher than those of fixed-point DSP. However, because it uses floating-point data format, its processing accuracy and dynamic range are much higher than those of fixed-point DSP, which is suitable for applications with high calculation complexity and high precision requirements. Even for general applications, when programming floating-point DSP, there is no need to consider data overflow and insufficient precision, so programming is more convenient and easier than fixed-point DSP. Therefore, the calculation accuracy requirement is a compromise issue, and it is necessary to determine the best combination point based on experience. (2) Operation speed: First, we need to determine the algorithm for digital signal processing. Once the algorithm is determined, its computational load and completion time are roughly determined. Based on the computational load and time requirements, we can estimate the lower limit of the DSP chip's operation speed. When selecting a DSP chip, the main criteria for measuring the operation speed of each chip are: MIPS MOPS (Millions of Operations Per Second), one million instructions per second. The general DSP is 20~100 MIPS, and the TMS320B2XX using very long instruction words is 2400 MIPS. It must be pointed out that this is a measure of the computing speed of fixed-point DSP chips. It should be noted that the indicator provided by the manufacturer generally refers to the peak indicator. Therefore, a certain margin should be left when designing the system. MOPS (Millions of Operations Per Second), one million operations per second. The problem with this indicator is what is an operation. Usually, operations include address calculation, DMA access data transfer, I/O operations, etc. in addition to CPU operations. Generally speaking, the higher the MOPS, the faster the product-accumulation and operation speed. MOPS can give a comprehensive description of the performance of the DSP chip. MFLOPS (MillionFloatingPointOperationsPerSecond), million floating point operations per second, this is an important indicator for measuring floating point DSP chips. For example, when the main frequency of TMS320C31 is 40MHz, the processing capacity is 40MFLOPS, and when the instruction cycle of TMS320C6701 is 6ns, the single-precision operation can reach 1GFLOPS. Floating point operations include floating point multiplication, addition, subtraction, storage and other operations. It should be noted that the indicator provided by the manufacturer generally refers to the peak indicator. Therefore, a certain margin should be left when designing the system. MBPS (Million Bits Per Second) is a measure of the data throughput rate of a bus or I/O port, that is, the bandwidth of a bus or I/O. MAC time, the time it takes to perform a multiplication and addition operation: Most DSP chips can complete a MAC operation within one instruction cycle. FFT/FIR execution time, the time it takes to run an N-point FFT or N-point FIR program. Since FFT operation/FIR operation is a typical algorithm for digital signal processing, this indicator can be used as a comprehensive indicator to measure chip performance. (3) Addressing space: The sizes of program, data, and I/O space of different DSP series are different. Unlike ordinary MCU, DSP can complete multiple operations in one instruction cycle, so the instruction efficiency of DSP is very high. There is generally no problem with program space. The key is whether the data space is sufficient. The size of data space can be expanded with the help of DMA and program space. (4) Arrangement of on-chip hardware resources such as memory: including the size of memory, the amount of on-chip memory,The size of the on-chip memory determines the chip's operating speed and cost. For example, in the same series of DSP chips from TI, different types of chips have different hardware resources such as memory configuration. Through careful analysis of the algorithm program and application goals, the requirements for the on-chip resources of the DSP chip can be roughly determined. Several important considerations are the amount of on-chip RAM and ROM, whether the memory can be expanded externally, whether the bus interface/interrupt/serial port is sufficient, whether it has A/D conversion, etc. (5) Development and debugging tools: Complete and convenient development tools and related supporting software are essential for developing large and complex DSP systems, and play an important role in shortening the product development cycle. Development tools include software and hardware. Software development tools mainly include: C compiler, assembler, linker, program library, software emulator, etc. After determining the DSP algorithm, the written program code is simulated and run through the software emulator to determine the necessary performance indicators. Hardware development tools include online hardware emulators and system development boards. Online hardware emulators are usually JTAG peripheral scanning interface boards that can debug the designed hardware online; before the hardware system is completed, running the designed DSP software in real time on development boards with different functions can improve development efficiency. Even in some small-volume products, the development board is directly used as the final product. (6) Choice of word length: Generally, floating-point DSP chips use 32-bit data words, while most fixed-point DSP chips use 16-bit data words. Motorola's fixed-point chips use 24-bit data words to achieve a compromise between fixed-point and floating-point precision. Word length is an important factor affecting cost. It affects the size of the chip, the number of pins, and the size of the memory. When designing, the smallest data word should be selected as much as possible while meeting performance indicators. (7) Power consumption and power management: Generally speaking, personal digital products, portable devices and outdoor equipment have special requirements for power consumption, so this is also an issue that should be considered. It usually includes the selection of power supply voltage and power management functions. The power supply voltage is generally relatively low, and the low voltage power supply of the chip is usually 3.3V, 2.5V, 1.8V, 0.9V, etc. At the same clock frequency, their power consumption will be much lower than that of the chip with 5V power supply voltage. After strengthening the management of power supply, sleep and wait modes are usually used to save power consumption. For example, TI provides detailed application notes whose functions change with instruction type and processor configuration. (8) Price and manufacturer's after-sales service factors: Price includes the price of DSP chip and the price of development tools. If expensive DSP chip is used, its application scope will certainly be subject to certain restrictions even if its performance is high. However, low-priced chips must have fewer functions, less on-chip memory, and poorer performance, which brings certain difficulties to programming. Therefore, it is necessary to determine a moderately priced DSP chip based on the actual system application. It is also necessary to fully consider factors such as the after-sales service provided by the manufacturer. Good after-sales technical support is also an important resource in the development process. Generally, the cost of fixed-point DSP is lower than that of floating-point DSP, and the speed is also faster. To obtain a low-cost DSP system, try to use fixed-point algorithms and fixed-point DSP. (9) Convenient implementation: The structure of floating-point DSP makes it easier to implement DSP system, without considering the addressing space problem, and the efficiency of instruction support for C language is also high. (10) Internal components: According to the application requirements, select a DSP with special components. For example, C2000 is suitable for motor control; OMAP is suitable for multimedia, etc. (11) Other factors: When selecting a DSP chip, you should also consider the packaging form (DIP, PGA, PLCC, PQFP), quality standards, supply conditions, life cycle, DSP chip hardware resources (on-chip RAM, ROM, external expansion space, I/O interface), DSP chip development tools, DSP chip power consumption, etc. 2. Examples of DSP chip selection Selection of DSP chips for DSP system development for digital control and motion control For digital control, motion control mainly includes disk drive control, engine control, laser printer control, inkjet printer control, motor control, power system control, robot control, high-precision servo system control, CNC machine tools, etc. Of course, these are mainly applications designed for digital motion control systems. In the control of these systems, not only are peripheral circuits specifically used for digital control systems required, but also the chips are required to have the general characteristics of digital signal processors. For example, in the DSP control system for controlling brushless DC motors, two types of control are required during the operation of brushless DC motors. One is speed control, which is to control the current supplied to the stator coil; the other is phase change control, which changes the stator conduction phase when the rotor reaches the specified position to achieve a change in the stator magnetic field. This control actually implements the mechanism of physical brushes. Therefore, this type of motor needs a position feedback mechanism, such as Hall elements, photoelectric encoders, or back-electromotive force zero-crossing detection using the characteristics of trapezoidal back-electromotive force. Motor speed control also calculates the rotor speed based on the position feedback signal, and then uses control methods such as PI or PID to adjust the PWM duty cycle in real time to achieve stator current regulation. Therefore, the control chip has to perform more calculations. Of course, there are also special brushless DC motor control chips; but generally speaking, in most applications, in addition to motor control, there are always other controls and communications that need to be done. Therefore, it is best to choose a chip with PWM.At the same time, chips with strong mathematical operation functions are also a good choice. Motorola's digital signal processor DSP568xx series integrates the fast operation function of general digital signal processors and the rich peripheral features of single-chip microcomputers, making this series particularly suitable for applications that require strong data processing capabilities and more control functions. The control of brushless DC motors is one of the typical applications of this series of DSPs. In addition, in the field of digital motion control, TI's TMS320C24x series, TMS320Lx240xx series, and especially TMS320LF2407A have been widely used in control. As a general-purpose programmable microprocessor optimized for digital control systems, TMS320LF2407A not only has the characteristics of low power consumption and code confidentiality, but also integrates extremely strong digital signal processing capabilities, and integrates the input, output, A/D conversion, event capture and other peripherals necessary for digital control systems. Its clock frequency is 40MHz, and the instruction cycle is less than 50ns. It adopts improved Harvard structure and pipeline technology, and can execute several instructions in one instruction cycle. From the perspective of running speed and accuracy, the above two chips are almost the same, but the debugging and development environment (CCS) of TMS320LF2407A is more mature and has more reference materials, which will undoubtedly reduce the development cycle. DSP chip selection for low-power, handheld devices, and wireless terminal applications Compared with other series, the main feature of C54X, C54XX, and C55X is low power consumption, so they are most suitable for personal and portable Internet access and wireless communication applications, such as mobile phones, PDAs, GPS and other applications. The processing speed is between 80 and 400 MIPS. C54XX and C55XX generally only have McBSP synchronous serial port, HPI parallel interface, timer, DMA and other peripherals. It is worth noting that C55XX provides EMIF external memory expansion interface, which can directly use SDRAM, while C54XX cannot use it directly.