版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Digital SignalProcessorsDigital Signal Processing is carried out by mathematical operations. In comparison, word processing and similar programs merely rearrange stored data. This means that computers designed for business and other general applications are not optimized for algorithms such as digit
2、al filtering and Fourier analysis. Digital Signal Processors are microprocessors specifically designed to handle Digital Signal Processing tasks. These devices have seen tremendous growth in the last decade, finding use in everything from cellular telephones to advanced scientific truments. In fact,
3、 hardware engineers use DSP to mean Digital Signal Processor, just as algorithm developers use DSP to mean Digital Signal Processing. This chapter looks at how DSPs are different from other types of microprocessors, how to decide if a DSP is right for your application, and how to get started in this
4、 exciting new field. In the next chapter we will take amore detailed look at one of these sophisticated products: the Analog Devices SHARC family.How DSPs are Different from Other MicroprocessorsIn the 1960s it was predicted that artificial intelligence would revolutionize the way humans interact wi
5、th computers and other machines. It was believed that by the end of the century we would have robots cleaning our houses, computers driving our cars, and voice interfaces controlling the storage and retrieval of information. This hasnt happened; these abstract tasks are far more complicated than exp
6、ected, and very difficult to carry out with the step-by-step logic provided by digital computers.However, the last forty years have shown that computers are extremely capable in two broad areas, (1) data manipulation, such as word processing and database management, and (2) mathematical calculation,
7、 used cience, engineering, and Digital Signal Processing. All microprocessors can perform both tasks; however, it is difficult (expensive) to make a device that is optimized for both. There are technical tradeoffs in the hardware design, suchas the size of thetruction set and how interrupts are hand
8、led. Even503CHAPTER28504The Scientist and Engineers Guide to Digital Signal ProcessingData ManipulationMath CalculationTypical ApplicationsMain OperationsFIGURE 28-1Data manipulation versus mathematical calculation. Digital computers are useful for two general tasks: data manipulation and mathematic
9、al calculation. Data manipulation is based on moving data and testing inequalities, while mathematical calculation uses multiplication and addition.more important, there are marketing issues involved: developmentandmanufacturing cost, competitive position, product lifetime, and so on. As a broad gen
10、eralization, these factors have made traditional microprocessors, such as the Pentium, primarily directed at data manipulation. Similarly, DSPs aredesigned to perform the mathematical calculations needed in Digital Signal Processing.Figure 28-1 lists the most important differences between these two
11、categories. Data manipulation involves storing and sorting information.Fortance, consider a word processing program. The basic task is tostore the information (typed in by the operator), organize the information(cut and paste, spell checking, page layout, etc.), and then retrieve the information (su
12、ch as saving the document on a floppy disk or printing it with a laser printer). These tasks are accomplished by moving data from one location to another, and testing for inequalities (A=B, AB THEN .). Second, if the two entries are not in alphabetical order, switch them so that they are (AWB). When
13、 this two step process is repeated many times on all adjacent pairs, the list will eventually become alphabetized.As another example, consider how a document is printed from a word processor. The computer continually tests the input device (mouse or keyboard) for the binary code that indicates print
14、 the document. When this code is detected, the program moves the data from the computers memory to the printer. Here we have the same two basic operations: moving data and inequality testing. While mathematics is occasionally used in this type ofWord processing, database management, spread sheets, o
15、perating sytems, etc.data movement (A ? B) valuetesting (If A=Bthen .)Digital Signal Processing, motion control, scientific and engineering simulations, etc.addition (A+B=C ) multiplication (AB=C )Chapter 28- Digital Signal Processors505application, it is infrequent and does not significantly affect
16、 execution speed.the overallIn comparison, the execution speed of most DSP algorithms islimited almostcompletely by the number of multiplications and additions required. For example, Fig. 28-2 shows the implementation of an FIR digital filter, the mostcommon DSP technique. Using the standard notatio
17、n, the input signal is referred to by x , while the output signal is denoted by y . Our task is to calculate the sample at location n in the output signal, i.e., yn. An FIR filter performs this calculation by multiplying appropriate samples from the inputsignal by a group of coefficients, denoted by
18、: a0, a1, a2, a3,?, and then adding the products. In equation form, yn is found by:yn a0 xn % a1 xn&1 % a2 xn&2 % a3 xn&3 % a4 xn&4 % ?This is simply saying that the input signal has been convolved with a filter kernel (i.e., an impulse response) consisting of: a0, a1, a2, a3,?. Depending on the app
19、lication, there may only be a few coefficients in the filter kernel, or many thousands. While there is some data transfer and inequality evaluation in this algorithm, such as to keep track of the intermediate results and control the loops, the math operations dominate the execution time.xn-3xn-2xn-1
20、xnInput Signal, x FIGURE 28-2FIR digital filter. In FIR filtering, each sample in the output signal, yn, is found by multiplying samples from the input signal, xn, xn-1, xn-2, ., by the filter kernel coefficients, a0, a1, a2, a3 ., and summing the products.aaaa7531aaaa6420Output signal, y yn506The S
21、cientist and Engineers Guide to Digital Signal ProcessingIn addition to preforming mathematical calculations very rapidly, DSPs must also have a predictable execution time. Suppose you launch your desktop computer on some task, say, converting a word-processing document from one form to another. It
22、doesnt matter if the processing takes ten milliseconds or ten seconds; you simply wait for the action to be completed before you give the computer its next assignment.In comparison, most DSPs are used in applications where the processing iscontinuous, not having a defined start or end. Fortance, con
23、sider anengineer designing a DSP system for an audio signal, such as a hearing aid.If the digital signal is being received at 20,000 samples per second, the DSP must be able to maintain a sustained throughput of 20,000 samples per second. However, there are important reasons not to make it any faste
24、r than necessary. As the speed increases, so does the cost, the power consumption, the design difficulty, and so on. This makes an accurate knowledge of the execution time critical for selecting the proper device, as well as the algorithms that can be applied.Circular BufferingDigital Signal Process
25、ors are designed to quickly carry out FIR filters and similar techniques. To understand the hardware, we must first understand the algorithms. In this section we will make a detailed list of the steps needed to implement an FIR filter. In the next section we will see how DSPs are designed to perform
26、 these steps as efficiently as possible.To start, we need to distinguish between off-line processing and real-time processing. In off-line processing, the entire input signal resides in the computer at the same time. For example, a geophysicist might use a seismometer to record the ground movement d
27、uring an earthquake. After theas computed tomography and MRI.The data set is acquired while the patientiside the machine, but the image reconstruction may be delayed until a latertime.The key point is that all of the information is simultaneously availableto the processing program. This is commoncie
28、ntific research andengineering, but not in consumer products. Off-line processing is the realm of personal computers and mainframes.In real-time processing, the output signal is produced at the same time that the input signal is being acquired. For example, this is needed in telephone communication,
29、 hearing aids, and radar. These applications must have the information immediately available, although it can be delayed by a shortamount. Fortance, a 10 millisecond delay in a telephone call cannot bedetected by the speaker or listener. Likewise, it makes no difference if a radar signal is delayed
30、by a few seconds before being displayed to the operator. Real-time applications input a sample, perform the algorithm, and output a sample, over-and-over. Alternatively, they may input a groupChapter 28- Digital Signal Processors507MEMORY ADDRESSSTORED VALUEMEMORY ADDRESSSTORED VALUE2004020041200422
31、004320044200452004620047200482004920040200412004220043200442004520046200472004820049xn-3xn-2xn-1 xn xn-7xn-6xn-5xn-4xn-4xn-3xn-2xn-1xnnewest samplenewest sampleoldest samplexn-7xn-6xn-5oldest samplea. Circular buffer at sometantb. Circular buffer after next sampleFIGURE 28-3Circular buffer operation
32、. Circular buffers are used to store the most recent values of a continually updated signal. This illustration shows how an eight sample circular buffer might appear at sometant in time (a), and how it would appear one sample later (b).of samples, perform the algorithm, and output a group of samples
33、. This is the world of Digital Signal Processors.Now look back at Fig. 28-2 and imagine that this is an FIR filter being implemented in real-time. To calculate the output sample, we must have access to a certain number of the most recent samples from the input. For example,suppose we use eight coeff
34、icients in this filter, a0, a1, ? a7 . This means we must know the value of the eight most recent samples from the input signal, xn, xn& 1, ? xn& 7. These eight samples must be stored in memory and continually updated as new samples are acquired. What is the best way tomanage these stored samples? T
35、he answer is circular buffering.Figure 28-3 illustrates an eight sample circular buffer. We have placed this circular buffer in eight consecutive memory locations, 20041 to 20048. Figure(a) shows how the eight samples from the input might be stored at one particular tant in time, while (b) shows the
36、 changes after the next sample is acquired. The idea of circular buffering is that the end of this linear array is connected to its beginning; memory location 20041 is viewed as being next to 20048, just as 20044 is next to 20045. You keep track of the array by a pointer (a variable whose value is a
37、n address) that indicates where the most recent sample resides. For tance, in (a) the pointer conta the address 20044, while in (b) it conta 20045. When a new sample is acquired, it replaces the oldest sample in the array, and the pointer is moved one address ahead. Circular buffers are efficient be
38、cause only one value needs to be changed when a new sample is acquired.Four parameters are needed to manage a circular buffer. First, there must be a pointer that indicates the start of the circular buffer in memory (in this example, 20041). Second, there must be a pointer indicating the end of the-
39、0.225767-0.269847-0.228918-0.113940-0.062222-0.222977-0.371370-0.462791-0.225767-0.269847-0.228918-0.113940-0.048679-0.222977-0.371370-0.462791508The Scientist and Engineers Guide to Digital Signal Processingarray (e.g., 20048), or a variable that holds its length (e.g., 8). Third, the step size of
40、the memory addressing must be specified. In Fig. 28-3 the step size isone, for example: address 20043 contaone sample, address 20044 contathe next sample, and so on. This is frequently not the case. Fortance, theaddressing may refer to bytes, and each sample may require two or four bytesto hold its
41、value. In these cases, the step size would need to be two or four, respectively.These three values define the size and configuration of the circular buffer, and will not change during the program operation. The fourth value, the pointer to the most recent sample, must be modified as each new sample
42、is acquired. In other words, there must be program logic that controls how this fourth value is updated based on the value of the first three values. While this logic is quite simple, it must be very fast. This is the whole point of this discussion; DSPs should be optimized at managing circular buff
43、ers to achieve the highest possible execution speed.As an aside, circular buffering is also useful in off-line processing. Consider a program where both the input and the output signals are completely contained in memory. Circular buffering isnt needed for a convolution calculation, because every sa
44、mple can be immediately accessed. However, many algorithmsare implemented each stage. Fortages, with an intermediate signal being created between tance, a recursive filter carried out as a series of biquadsoperates in this way. The brute force method is to store the entire length of each intermediat
45、e signal in memory. Circular buffering provides anotheroption: store only those intermediate samples needed for the calculation at hand. This reduces the required amount of memory, at the expense of a more complicated algorithm. The important idea is that circular buffers are useful for off-line pro
46、cessing, but critical for real-time applications.Now we can look at the steps needed to implement an FIR filter using circular buffers for both the input signal and the coefficients. This list may seem trivial and overexamined- its not! The efficient handling of these individual tasks is what separa
47、tes a DSP from a traditional microprocessor. For each new sample, all the following steps need to be taken:1.2.3.4.5.6.7.8.9.10.11.12.13.14.Obtain a sample with the ADC; generate an interrupt Detect and manage the interruptMove the sample into the input signals circular buffer Update the pointer for
48、 the input signals circular buffer Zero the accumulatorControl the loop through each of the coefficientsFetch the coefficient from the coefficients circular buffer Update the pointer for the coefficients circular buffer Fetch the sample from the input signals circular buffer Update the pointer for t
49、he input signals circular buffer Multiply the coefficient by the sampleAdd the product to the accumulatorTABLE 28-1FIR filter steps.Move the output sample (accumulator) to a holding buffer Move the output sample from the holding buffer to the DACChapter 28- Digital Signal Processors509The goal is to
50、 make these steps execute quickly. Since steps 6-12 will be repeated many times (once for each coefficient in the filter), special attention must be given to these operations. Traditional microprocessors must generally carry out these 14 steps erial (one after another), while DSPs are designedto per
51、form them in parallel.ome cases, all of the operations within theloop (steps 6-12) can be completed in a single clock cycle. Lets look at the internal architecture that allows this magnificent performance.Architecture of the Digital Signal ProcessorOne of the biggest bottlenecks in executing DSP alg
52、orithms is transferring information to and from memory. This includes data, such as samples from theinput signal and the filter coefficients, as well as programtructions, thebinary codes that go into the program sequencer. For example, suppose weneed to multiply two numbers that reside somewhere in
53、memory. To do this, we must fetch three binary values from memory, the numbers to be multiplied,plus the programtruction describing what to do.Figure 28-4a shows how this seemingly simple task is done in a traditional microprocessor. This is often called a Von Neumann architecture, after the brillia
54、nt American mathematician John Von Neumann (1903-1957). Von Neumann guided the mathematics of many important discoveries of the early twentieth century. His many achievements include: developing the concept of a stored program computer, formalizing the mathematics of quantum mechanics, and work on t
55、he atomic bomb. If it was new and exciting, Von Neumann was there!As shown in (a), a Von Neumann architecture conta a single memory and a single bus for transferring data into and out of the central processing unit (CPU). Multiplying two numbers requires at least three clock cycles, one to transfer each of the three numbers over the bus from the memory to the CPU. We dont count the time to transfer the result back to memory, because weassume that it remain the CPU for additional manipulation (such as the sumof products in an FIR filter). The Von Neumann design is quite satisfactorywhen yo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 保险招标采购制度
- 采购部门管理制度范本
- 采购锁证索票制度
- 采购项目建设管理制度
- 采购食品安全管理制度
- 重大生产原料采购制度
- 钉钉采购审批管理制度
- 食堂物资采购制度及流程
- 八年级数学下册2025-2026学年第一次月考测试卷(19-20章)(含答案)-人教版(2024)八下
- 第19章 二次根式(章节复习检测提高卷)原卷版-人教版(2024)八下
- 超级单品成就超级品牌报告鸭鸭羽绒服解数咨询
- 2025年腹部外伤试题及答案
- 污水池清理专项安全施工技术方案
- 赛马比赛活动方案
- 江苏省专升本2025年美术学艺术概论试卷(含答案)
- 矿井水、生活污水处理站建设工程投标文件
- 职业调查报告:室内设计行业分析
- 《农村供水水质管理技术导则》编制说明
- 牡丹养殖知识培训内容课件
- 第三节 管理在线学习资源教学设计小学信息科技川教版2024三年级下册-川教版2024
- 5.2《凝聚价值追求》教学设计 2025-2026学年度道德与法治九年级上册 统编版
评论
0/150
提交评论