画是什么生肖| 奶茶和奶绿有什么区别| 12月1日是什么日子| rbc红细胞偏高是什么意思| 脖子淋巴结挂什么科| 粘膜慢性炎是什么病| 什么预警停课| 胎停是什么原因造成的| 厥阴病是什么意思| 兔子拉稀是什么原因| 什么降血脂效果最好的| 梦见和死去的亲人说话是什么意思| cho是什么| 氟斑牙是什么原因造成的| 上大学需要准备什么| 儿童流黄鼻涕吃什么药| 脚脖子粗是什么原因| 哆啦a梦大结局是什么| 孕妇吃什么利尿排羊水| 夏天要注意什么| 红豆和什么一起煮比较好| 什么化妆品好用| 胡巴是什么| 自提是什么意思| 聚少离多是什么意思| 2006年什么年| 每天吃一个西红柿有什么好处| 保持器是什么| 肚子胀气吃什么好| 睚眦什么意思| 除湿是什么意思| 肺心病吃什么药| 慢性肾炎是什么原因引起的| 肾阳虚吃什么中药| 怀孕吃什么好| 十月二十是什么星座| 想呕吐是什么原因| 2002年属什么生肖| 6月12号是什么星座| 梭织是什么意思| 手脱皮用什么药膏| 味淋可以用什么代替| 机翻是什么意思| 干碟是什么| 春眠不觉晓的晓是什么意思| 用什么泡脚去湿气寒气| 什么叫元素| 培育是什么意思| 潴留囊肿是什么意思| 孕妇感冒了对胎儿有什么影响| 刺激什么意思| 什么的舞姿| 蚊子除了吸血还吃什么| 吃什么药头脑立刻清醒| 不完全性右束支阻滞是什么意思| 高锰酸钾加什么会爆炸| 塌方是什么意思| 护照拍照穿什么衣服| 孕晚期呕吐是什么原因| 健康证是什么| 五行中金代表什么| 赫拉是什么神| 胎位 头位是什么意思| 赛能是什么药| 荷花是什么形状的| 长期喝咖啡有什么好处和坏处| 已归档是什么意思| 武则天什么朝代| 流鼻涕吃什么药好| 加湿器有什么作用| 什么七什么八| 孙悟空被压在什么山下| 省长是什么级别干部| 玫瑰花和什么一起泡水喝好| 2018年属什么| 中暑吃什么水果好| 透骨草治什么病最有效| 985211是什么意思| 激光脱毛挂什么科| 胆囊壁毛糙吃什么药| 做爱什么感觉| 学杂费包括什么| 前置胎盘是什么原因引起的| 五行代表什么意思| 为什么发动文化大革命| 四月二十六是什么星座| 血糖高了会有什么危害| 高钙血症是什么意思| 什么的飞翔| 什么叫慢性萎缩性胃炎| 灬是什么意思| 外阴白斑是什么症状| 爬山虎是什么茎| 下肢浮肿是什么原因引起的| 训练有素是什么意思| 双鱼座最配什么星座| 额头上长痘是什么原因| 燃烧卡路里是什么意思| 粘连是什么意思| 女生学什么专业好| 肺炎吃什么水果好| 农历五月二十是什么星座| 亚硝酸盐是什么| 大拇指指甲凹凸不平是什么原因| 金字塔里面有什么| 梦见狼是什么意思| 1111是什么意思| 暴殄天物是什么生肖| 红斑狼疮复发的症状是什么| 酮症酸中毒什么原因引起的| 绿油油的什么| 曲克芦丁片治什么病| 紫癜是什么原因引起的| 氮质血症是什么意思| 吃海鲜忌什么| 男性更年期吃什么药| 李连杰为什么不娶丁岚| 一天吃一个苹果有什么好处| 45岁属什么的生肖| 肝气犯胃吃什么中成药| 什么是风象星座| 地球是什么意思| 什么是邮箱地址应该怎么填写| 羟基维生素d是什么| 锁骨下面的骨头叫什么| 低血糖吃什么药| vape是什么意思| 户籍地填什么| 子宫内膜薄吃什么| 云雾茶属于什么茶| 大便稀溏是什么意思| 211大学是什么意思| 土地兼并是什么意思| 尿频繁吃什么药最见效| 一国两制是什么时候提出的| 蓝莓吃了有什么好处| 泳帽的作用是什么| 消症是什么意思| 三和大神什么意思| 微腺瘤是什么| 角化棘皮瘤是什么病| 心肌缺血吃什么药| 0中间有一横是什么字体| 医院附近适合做什么生意| 失眠为什么开奥氮平片| 减肥晚上吃什么| 什么原因导致高血压| 风光秀丽的什么| 乙肝病毒核心抗体阳性是什么意思| pms是什么意思| 龟头有点痒擦什么药| 五指毛桃煲汤配什么| 六畜兴旺是什么生肖| 枇杷不能和什么一起吃| 乙肝小二阳是什么意思| 只欠东风的上一句是什么| 这是什么呀| 为什么会高反| 细小是什么病| 空心菜又叫什么菜| 床上什么虫子夜间咬人| 体外射精是什么| 1月30日什么星座| 过梁是什么| 什么叫质子| 有氧运动和无氧运动有什么区别| 吃完桃子不能吃什么| 脚气是什么菌| 红馆是什么地方| 马冲什么生肖| 皮疹长什么样| 袖珍是什么意思| 高血压喝什么茶最好| 磨蹭是什么意思| 无花果是什么季节的水果| 农历6月28日是什么星座| 嘴唇白是什么原因| 睡前一杯牛奶有什么好处| 狒狒是什么动物| 霖字五行属什么| 直肠窝积液是什么意思| 什么叫原研药| 公开遴选公务员是什么意思| 抗酸杆菌是什么| 女人矜持是什么意思| 四柱是什么意思| 胖次是什么意思| 什么的拳头| 什么叫增强ct| 为什么脚会有酸臭味| 闲云野鹤指什么生肖| 儿童腮腺炎吃什么药| 色斑是什么原因引起的| 古代广东叫什么| 降血压喝什么茶| 铁剂不能与什么同服| 溺水是什么感觉| 6月11日是什么星座| 凭什么我买单| 再接再厉后面接什么好| 血糖高早饭吃什么最好| 吃什么升血小板快| 鸡杂是什么| 三千大千世界什么意思| 自媒体是什么| 儿加一笔是什么字| 山药什么季节成熟| 脚背有痣代表什么| 喝酒前吃什么不会醉| 症结是什么意思| 梦见大风大雨预示什么| 吃完榴莲后不能吃什么| 怔忡是什么意思| kenwood是什么牌子| 豆奶不能和什么一起吃| 机化是什么意思| ige是什么意思| 硫脲是什么| 肾虚吃什么中药| 尤物是什么意思| 见人说人话见鬼说鬼话是什么意思| 什么水果助消化| 高血压吃什么药效果好| thenorthface是什么牌子| 为什么男的叫鸭子| 菩提树是什么树| 胃动力不足吃什么中成药| 反应性细胞改变是什么意思| 脑白质脱髓鞘是什么意思| 屏幕总成带框和不带框有什么区别| young是什么意思| 1961年属什么| 坎宅是什么意思| 鸡叫是什么时辰| 精子是什么味道| 生理盐水和食用盐水有什么区别| 曲奇是什么意思| 肛门溃烂用什么药膏| 慢性盆腔炎吃什么药| 23年属什么| 陈皮不能和什么一起吃| 42天产后复查都查什么| 怀孕6个月吃什么好| 恢弘是什么意思| 平扫是什么意思| 三点水加一个心读什么| 舛是什么意思| 受虐倾向是什么| 什么是宫腔镜检查| 早晨起床手肿胀是什么原因| 呼风唤雨的动物是什么生肖| 关节疼痛吃什么药| 吃什么补红细胞最快| 无忧什么意思| 针眼是什么样子的图片| 胸闷气短看什么科| 羊胡子疮用什么药膏| 断掌什么意思| 什么极了| w是什么意思| 同型半胱氨酸是什么意思| 七月18日是什么星座| 瑄字五行属什么| 胃炎吃什么最好| 百度

Book Search

Download this chapter in PDF format

Chapter28.pdf

Table of contents

How to order your own hardcover copy

Wouldn't you rather have a bound book instead of 640 loose pages?
Your laser printer will thank you!
Order from Amazon.com.

Chapter 28: Digital Signal Processors

Fixed versus Floating Point
百度 “没有国资改革的成功,也不可能有国企改革的成功。

Digital Signal Processing can be divided into two categories, fixed point and floating point. These refer to the format used to store and manipulate numbers within the devices. Fixed point DSPs usually represent each number with a minimum of 16 bits, although a different length can be used. For instance, Motorola manufactures a family of fixed point DSPs that use 24 bits. There are four common ways that these 216 = 65536 possible bit patterns can represent a number. In unsigned integer, the stored number can take on any integer value from 0 to 65,535. Similarly, signed integer uses two's complement to make the range include negative numbers, from -32,768 to 32,767. With unsigned fraction notation, the 65,536 levels are spread uniformly between 0 and 1. Lastly, the signed fraction format allows negative numbers, equally spaced between -1 and 1.

In comparison, floating point DSPs typically use a minimum of 32 bits to store each value. This results in many more bit patterns than for fixed point, 232 = 4,294,967,296 to be exact. A key feature of floating point notation is that the represented numbers are not uniformly spaced. In the most common format (ANSI/IEEE Std. 754-1985), the largest and smallest numbers are ±3.4×1038 and ?1.2?10-38, respectively. The represented values are unequally spaced between these two extremes, such that the gap between any two numbers is about ten-million times smaller than the value of the numbers. This is important because it places large gaps between large numbers, but small gaps between small numbers. Floating point notation is discussed in more detail in Chapter 4.

All floating point DSPs can also handle fixed point numbers, a necessity to implement counters, loops, and signals coming from the ADC and going to the DAC. However, this doesn't mean that fixed point math will be carried out as quickly as the floating point operations; it depends on the internal architecture. For instance, the SHARC DSPs are optimized for both floating point and fixed point operations, and executes them with equal efficiency. For this reason, the SHARC devices are often referred to as "32-bit DSPs," rather than just "Floating Point."

Figure 28-6 illustrates the primary trade-offs between fixed and floating point DSPs. In Chapter 3 we stressed that fixed point arithmetic is much

faster than floating point in general purpose computers. However, with DSPs the speed is about the same, a result of the hardware being highly optimized for math operations. The internal architecture of a floating point DSP is more complicated than for a fixed point device. All the registers and data buses must be 32 bits wide instead of only 16; the multiplier and ALU must be able to quickly perform floating point arithmetic, the instruction set must be larger (so that they can handle both floating and fixed point numbers), and so on. Floating point (32 bit) has better precision and a higher dynamic range than fixed point (16 bit) . In addition, floating point programs often have a shorter development cycle, since the programmer doesn't generally need to worry about issues such as overflow, underflow, and round-off error.

On the other hand, fixed point DSPs have traditionally been cheaper than floating point devices. Nothing changes more rapidly than the price of electronics; anything you find in a book will be out-of-date before it is printed. Nevertheless, cost is a key factor in understanding how DSPs are evolving, and we need to give you a general idea. When this book was completed in 1999, fixed point DSPs sold for between $5 and $100, while floating point devices were in the range of $10 to $300. This difference in cost can be viewed as a measure of the relative complexity between the devices. If you want to find out what the prices are today, you need to look today.

Now let's turn our attention to performance; what can a 32-bit floating point system do that a 16-bit fixed point can't? The answer to this question is signal-to-noise ratio. Suppose we store a number in a 32 bit floating point format. As previously mentioned, the gap between this number and its adjacent neighbor is about one ten-millionth of the value of the number. To store the number, it must be round up or down by a maximum of one-half the gap size. In other words, each time we store a number in floating point notation, we add noise to the signal.

The same thing happens when a number is stored as a 16-bit fixed point value, except that the added noise is much worse. This is because the gaps between adjacent numbers are much larger. For instance, suppose we store the number 10,000 as a signed integer (running from -32,768 to 32,767). The gap between numbers is one ten-thousandth of the value of the number we are storing. If we want to store the number 1000, the gap between numbers is only one one-thousandth of the value.

Noise in signals is usually represented by its standard deviation. This was discussed in detail in Chapter 2. For here, the important fact is that the standard deviation of this quantization noise is about one-third of the gap size. This means that the signal-to-noise ratio for storing a floating point number is about 30 million to one, while for a fixed point number it is only about ten-thousand to one. In other words, floating point has roughly 30,000 times less quantization noise than fixed point.

This brings up an important way that DSPs are different from traditional microprocessors. Suppose we implement an FIR filter in fixed point. To do this, we loop through each coefficient, multiply it by the appropriate sample from the input signal, and add the product to an accumulator. Here's the problem. In traditional microprocessors, this accumulator is just another 16 bit fixed point variable. To avoid overflow, we need to scale the values being added, and will correspondingly add quantization noise on each step. In the worst case, this quantization noise will simply add, greatly lowering the signal-to-noise ratio of the system. For instance, in a 500 coefficient FIR filter, the noise on each output sample may be 500 times the noise on each input sample. The signal-to-noise ratio of ten-thousand to one has dropped to a ghastly twenty to one. Although this is an extreme case, it illustrates the main point: when many operations are carried out on each sample, it's bad, really bad. See Chapter 3 for more details.

DSPs handle this problem by using an extended precision accumulator. This is a special register that has 2-3 times as many bits as the other memory locations. For example, in a 16 bit DSP it may have 32 to 40 bits, while in the SHARC DSPs it contains 80 bits for fixed point use. This extended range virtually eliminates round-off noise while the accumulation is in progress. The only round-off error suffered is when the accumulator is scaled and stored in the 16 bit memory. This strategy works very well, although it does limit how some algorithms must be carried out. In comparison, floating point has such low quantization noise that these techniques are usually not necessary.

In addition to having lower quantization noise, floating point systems are also easier to develop algorithms for. Most DSP techniques are based on repeated multiplications and additions. In fixed point, the possibility of an overflow or underflow needs to be considered after each operation. The programmer needs to continually understand the amplitude of the numbers, how the quantization errors are accumulating, and what scaling needs to take place. In comparison, these issues do not arise in floating point; the numbers take care of themselves (except in rare cases).

To give you a better understanding of this issue, Fig. 28-7 shows a table from the SHARC user manual. This describes the ways that multiplication can be carried out for both fixed and floating point formats. First, look at how floating point numbers can be multiplied; there is only one way! That

is, Fn = Fx * Fy, where Fn, Fx, and Fy are any of the 16 data registers. It could not be any simpler. In comparison, look at all the possible commands for fixed point multiplication. These are the many options needed to efficiently handle the problems of round-off, scaling, and format.

In Fig. 28-7, Rn, Rx, and Ry refer to any of the 16 data registers, and MRF and MRB are 80 bit accumulators. The vertical lines indicate options. For instance, the top-left entry in this table means that all the following are valid commands: Rn = Rx * Ry, MRF = Rx * Ry, and MRB = Rx * Ry. In other words, the value of any two registers can be multiplied and placed into another register, or into one of the extended precision accumulators. This table also shows that the numbers may be either signed or unsigned (S or U), and may be fractional or integer (F or I). The RND and SAT options are ways of controlling rounding and register overflow.

There are other details and options in the table, but they are not important for our present discussion. The important idea is that the fixed point programmer must understand dozens of ways to carry out the very basic task of multiplication. In contrast, the floating point programmer can spend his time concentrating on the algorithm.

Given these tradeoffs between fixed and floating point, how do you choose which to use? Here are some things to consider. First, look at how many bits are used in the ADC and DAC. In many applications, 12-14 bits per sample is the crossover for using fixed versus floating point. For instance, television and other video signals typically use 8 bit ADC and DAC, and the precision of fixed point is acceptable. In comparison, professional audio applications can sample with as high as 20 or 24 bits, and almost certainly need floating point to capture the large dynamic range.

The next thing to look at is the complexity of the algorithm that will be run. If it is relatively simple, think fixed point; if it is more complicated, think floating point. For example, FIR filtering and other operations in the time domain only require a few dozen lines of code, making them suitable for fixed point. In contrast, frequency domain algorithms, such as spectral analysis and FFT convolution, are very detailed and can be much more difficult to program. While they can be written in fixed point, the development time will be greatly reduced if floating point is used.

Lastly, think about the money: how important is the cost of the product, and how important is the cost of the development? When fixed point is chosen, the cost of the product will be reduced, but the development cost will probably be higher due to the more difficult algorithms. In the reverse manner, floating point will generally result in a quicker and cheaper development cycle, but a more expensive final product.

Figure 28-8 shows some of the major trends in DSPs. Figure (a) illustrates the impact that Digital Signal Processors have had on the embedded market. These are applications that use a microprocessor to directly operate and control some larger system, such as a cellular telephone, microwave oven, or automotive instrument display panel. The name "microcontroller" is often used in referring to these devices, to distinguish them from the microprocessors used in personal computers. As shown in (a), about 38% of embedded designers have already started using DSPs, and another 49% are considering the switch. The high throughput and computational power of DSPs often makes them an ideal choice for embedded designs.

As illustrated in (b), about twice as many engineers currently use fixed point as use floating point DSPs. However, this depends greatly on the application. Fixed point is more popular in competitive consumer products where the cost of the electronics must be kept very low. A good example of this is cellular telephones. When you are in competition to sell millions of your product, a cost difference of only a few dollars can be the difference between success and failure. In comparison, floating point is more common when greater performance is needed and cost is not important. For

instance, suppose you are designing a medical imaging system, such a computed tomography scanner. Only a few hundred of the model will ever be sold, at a price of several hundred-thousand dollars each. For this application, the cost of the DSP is insignificant, but the performance is critical. In spite of the larger number of fixed point DSPs being used, the floating point market is the fastest growing segment. As shown in (c), over one-half of engineers using 16-bits devices plan to migrate to floating point at some time in the near future.

Before leaving this topic, we should reemphasize that floating point and fixed point usually use 32 bits and 16 bits, respectively, but not always. For instance, the SHARC family can represent numbers in 32-bit fixed point, a mode that is common in digital audio applications. This makes the 232 quantization levels spaced uniformly over a relatively small range, say, between -1 and 1. In comparison, floating point notation places the 232 quantization levels logarithmically over a huge range, typically ±3.4×1038. This gives 32-bit fixed point better precision, that is, the quantization error on any one sample will be lower. However, 32-bit floating point has a higher dynamic range, meaning there is a greater difference between the largest number and the smallest number that can be represented.

Next Section: C versus Assembly
母亲吃什么退婴儿黄疸 尼特族是什么意思 身先士卒是什么意思 肠梗阻是什么意思 杰五行属性是什么
38岁属什么的生肖 财大气粗是什么意思 鼻梁痛什么原因引起的 小苏打有什么作用 心绞痛什么症状
血小板压积是什么意思 bk病毒是什么 一个雨一个亏念什么 谦虚什么意思 游离甲状腺素是什么
脸上有癣用什么药膏好 翘楚是什么意思 孟夏是什么意思 减肥最好的办法是什么 怎么知道自己对什么过敏
枫字五行属什么hanqikai.com 导弹是什么意思hcv9jop6ns9r.cn 什么玉好xinmaowt.com 什么是忧郁症hcv8jop7ns8r.cn 怀孕一个月内有什么反应shenchushe.com
宫颈囊肿是什么原因hcv8jop0ns0r.cn 淋菌性尿道炎吃什么药hcv7jop6ns5r.cn 过什么意思0735v.com 下属是什么意思hcv8jop5ns0r.cn 壮的偏旁叫什么名字tiangongnft.com
毛巾为什么会臭clwhiglsz.com 春节在什么时候hcv7jop5ns1r.cn 沙门是什么意思hcv9jop6ns9r.cn cin3是什么意思hcv8jop7ns1r.cn 尿酸高吃什么降的快hcv8jop9ns7r.cn
九华山求什么最灵验bjhyzcsm.com 孕妇血糖高吃什么hcv9jop6ns5r.cn 八月十五是什么星座hcv9jop3ns9r.cn 白头发缺什么维生素hcv9jop1ns3r.cn 梦到捡菌子是什么意思hcv8jop0ns9r.cn
百度