已阅读5页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
附录A科技文章摘译MICROPROCESSOR REPORTAtmel AVR Brings RISC to 8-Bit WorldBetter Performance Than Other 8-Bit Chips With Same Low CostBy Jim TurleyProving the adage that all technologies eventually filter down into commodity products, Atmel has brought RISC design philosophy to 8-bit micro-controllers. Dubbed AVR, this new architecture provides all the usual benefits of RISC: faster clock rates, better performance, and more efficient compiler optimization. Atmel also promises better code density and lower cost than comparable 8-bit micro-controllers.AVR competes with several well-established micro-controller dynasties such as the 6805, 68HC11, and 8051.Competition also comes from Microchips PIC family, a more modern design thats expanded rapidly in the past few years. Atmel hopes AVR will appeal to embedded designers who are willing to tackle a new architecture to get more performance than the entrenched micro-controller families can provide.AVR is the first in-house CPU design from Atmel, a billion-dollar company better known for its flash memory and E2PROM products. The company also sells a dozen flash-based derivatives of the popular 8051family, which it produces under license from Intel.Design Melds RISC and Micro-controller IdeasThe CPU resembles most RISC processors but has smaller registers. It was originally developed by a pair of researchers in Trondheim,Norway, before their consultancy was acquired by Atmel in 1995. Core CPU development still takes place in Norway, while memory and peripheral development is centered in Atmels San Jose (Calif.) facility. The core features 32 identical 8-bit registers, as Figure 1 shows. Any register can hold addresses or data. Since 8-bit address pointers are fairly worthless even in an 8-bit device, the last six registers can be used in pairs, as address pointers. Dubbed X, Y, and Z, these three meta-registers can be used for any load or store operation. The pointers can be post incremented or predecremented at the programmers option. Finally, a 6-bit displacement can be added to the contents of the pointer, a useful option for addressing array elements. This mode is not available for the X pointer; that op code is reserved for the LDI (load immediate constant) instruction.Figure 1. Unlike other 8-bit controllers, AVR has a set of 32 8-bit registers. The last six registers can be paired to form three address pointers.As with many low-end micro-controllers, the register file is mapped into the address space, and vice versa. The first 32 bytes of memory, 0x000x1F, correspond to registers R0R31. The chips status registerwhich contains the overflow, carry, sign, and other flagsas well as other “internal” registers are also memory mapped. This allows any register to be manipulated using standard memory references instead of special control-register instructions. For all intents and purposes, the CPU has no pipeline. It retrieves both source operands, executes the instruction, and stores the result in a single clock cycle. Branch latency is one clock for taken branches. All operations are register-to-register; the chip follows a strict load/store model. The great majority of AVR instructions are 16 bits long. Only four 32-bit instructions exist, allowing limited use of absolute 16-bit addressing. AVR separates the program and data spaces; although data pointers can be 16 bits, the PC (program counter) is only 12 bits wide, for 8K of code space.Instruction Set As Regular As PossibleThe compact instruction set necessarily forces some compromises, the first of which affects immediate values (literals). Very few instructions accept immediate values, and those that do (ADIW, SUBI, ORI, etc.) work only on the upper half (R16R31) of the register set, as Table 1 shows. Even after shaving a bit from the operand-specified field, these instructions sometimes have room for only 6-bit immediate values. Table 1. Atmels AVR 8-bit RISC instruction set follows a strict load/store model, with a few simple indirect addressing modes, including post increment and preferment. The architecture also includes a number of individual bit-manipulation instructions.The ADIW and SBIW instructions (add/subtract immediate from word) are even more restrictive, operating on only the last eight registers, R24R31. These instructions are meant primarily to add small offsets (063 bytes) to the X, Y, and Z pointers. There is a wealth of conditional branch instructions: namely, two for each of the eight flags in the status register. With little 7-bit offsets, these instructions can deflect execution only 64 instructions in either direction. For bigger displacements, RJMP can shift code by 2K, which is usually plenty, given the chips small code space. AVR also has a collection of interesting “skip” operations (SBRC, SBRS, SBIC, and SBIS) that skip over the next instruction if any bit in any register is set or clear. If the skipped instruction is a long-displacement jump, these skips can be used to effectively create conditional long-displacement branches. Alternatively, they can be used to skip a single arithmetic or logical operation in a string of operations, creating conditional operations somewhat similar to ARMs. None of the AVR chips has a native multiply operationmuch less a dividealthough one has been defined. As defined, MUL multiplies any two 8-bit registers and deposits the 16-bit result in R0 and R1.When implemented, MUL executes in just two clock cycles, which is five times faster than the 68HC11s 10 clocks; even Motorolas newer 68HC12 (see MPR 5/27/96, p. 1) needs 3 clocks. Atmel expects to deploy its multiplier in future AVR chips as clock speeds increase and the chips take on simple signal-processing tasks. Instructions Are Rich in Bit ManipulationAs with most micro-controllers, the AVR family has a host of bit-twiddling options, including 16 explicit instructions to set and clear every flag in its status register. This seems like a lopsided use of op code space; the same result could have been achieved with normal logical operations. For deeply embedded applications, however, this was probably the right choice. Masking operations use precious address pointers and one or more registers; the SEx/CLx instructions use neither. The chip can also set or clear any bit in any general purpose or I/O register; SER and CLR wipe the contents of an entire register at once. SBR and CBR, which set or clear multiple bits at a time, are aliases for ORI and ANDI, respectively. Initial Launch Includes Five PartsAtmel launched its AVR product line with four basic chips: the 90S1200, the 2313, the 4414, and the 8515. The latter three devices are very similar, differing mainly in the amount of memory on the chip: 2K, 4K, or 8K of flash, with the amount of on-chip SRAM and E2PROM also increasing. The runt of the litter, the 1200, has only 1K of flash memory, no SRAM, no peripherals, and a restricted instruction set. With neither SRAM nor an external bus, the 1200 must use on-chip flash for data storage, which will slow execution considerably unless programmers can get by with juggling the register set alone. The 1200 are also the only chip in the family currently in production. In 1,000-unit quantities, the 20-pin 90S1200 sells for a paltry $1.65. Its not often that the number of data bits outnumbers the pins on the package, but Atmel managed to get close with its 1220 device, an 8-pin version of the 1200. After power, ground, and crystal connections, only four pins are free for I/O. Most AVR chips come in 20-pin DIP or SOIC packages, which provide access to more I/O lines; only in a 40-pin package do the chips bond out their address and data buses for access to external memory. All the parts are fabricated on Atmels four 0.8-micron two-layer-metal fab lines in Colorado Springs and Rousset (France). This is the same memory process Atmel uses for its E2PROM and flash devices, and for its 8051 chips with integrated flash. The 1200 measure about 24mm2 overall, and as the die photo in Figure 2 shows, the chip is nearly all logic. Memory processes typically dont produce very compact (or fast) logic, but most AVR chips will be dominated by memory and peripherals, and clock speeds arent very high. Figure 2. The 90S1200 measures about 4.3 5.5 mm in Atmels 0.8-micron two-layer-metal flash-memory process. For Once, RISC Techniques Improve Code DensityIts sometimes hard to get excited about 8-bit processors, yet Atmels AVR design is as different from others in its class as the first RISC machine was from big systems more than a decade ago. With its large register file and orthogonal instruction set, AVR is far more modern than its competitors. Atmels new CPU will be particularly appealing to programmers moving down the microprocessor food chain from 32-bit or 16-bit chips and who are accustomed to flexible register sets. For programmers moving up from, say, the 8051, AVR will be a real eye-opener. For example, the 8051, 6805, and PIC all make do with a single accumulator; the68HC11 and HC12 have just two. This makes AVR easier to program at the assembly level and easier to optimize with a compiler. The big register set reduces dependence on memory, which improves speed and shrinks data-storage requirements. Counterintuitively, AVRs RISC-like instruction set also helps improve its code density over that of other 8-bitters, according to Atmel. Its CPI (compare immediate) instruction avoids the relatively awkward construct of loading, subtracting, and checking flags used on the 6805 and PIC. Adding two numbers on the 8051, 6805, or PIC usually involves shuffling both operands through the accumulator and storing the result; AVR simply adds two registers with one instruction in one cycle. AVR is not pure RISC-some instructions are longer than othersnor is it the first 8-bit micro-controller with a big register file. Zilogs ever-popular Z8 has 16 banks of 16 registers and a very orthogonal instruction set. But at 515 clocks per instruction, the Z8 cant match AVRs speed. Atmel Takes On Million SellersThe 6805, 8051, and 68HC11 are the top-selling 8-bit families in the world, shipping millions of units every month. Motorola, for example, shipped its two-billionth 68HC05 in April. While AVR will not instantly overthrow these titans, it does provide substantial advantages over the entrenched leaders and blurs the line between 8- and 16-bit performances. Although “high-performance” seems misplaced here, the AVR family should outperform other 8-bit micro-controllers and many 16-bit chips. At 20 MHz, its top clock rate is easily double that of other chips in its class. More important, almost all instructions execute in 1 or 2 clock cycles, versus 510 cycles for 8051, 6805, 68HC11, and PIC chips. There is no lack of alternatives for the 8-bit user looking for more speed. Motorolas 68HC12 is a step up from the HC11; Philips and Intel are enticing 8051 users with the 8051XA (see MPR 10/3/94, p. 17) or the 251 family. Of these, Intel offers the smoothest upgrade path, with complete binary compatibility between the 8051 and the 251. Philips and Motorola both tout substantial size and speed advantages for users willing to reassemble (or recompile) their code. The HC12, 8051XA, and 251 are more accurately 16- bit designs, with 16-bit internal data paths and 16-bit arithmetic operations, but they still require three or more clocks for even the simplest calculations and most basic register operations. Moreover, the clock rates of these parts are not substantially faster than Atmels and cant make up for inherently inefficient execution. In short, AVR offers 16-bit performance at an 8-bit price. For users who want on-chip memory but dont need 16-bit data types or binary compatibility with a previous generation, Atmel offers better price/performance for designers willing to let go of the older families apron strings.微处理器报告 吉姆泰罗随着所有技术渗入到日用品中,Atmel已经把精简指令集计算机设计原理变成8位微控制器。加上AVR,这种新的体系结构为我们提供了RISC所有普通性质:较快的时钟频率,较好的性能和更有效的编译最佳化。Atmel也承诺了比相应8位微控制器更好的集成度和更低成本。AVR与一些已有的微控制器相比较,例如:6805, 68HC11和8051。这种竞赛也来自于微型芯片的PIC,一种在过去几年里迅速发展起来的更时髦的设计方法。Atmel希望AVR能够吸引一些设计者,他们乐于应用新的体系结构得到比已有微控制器更多的优良性能。AVR是来自Atmel的第一个内部CPU设计,Atmel是一家以生产闪光存储器和E2PROM产品著名的十亿资产的公司。该公司也卖一些现行的8051家族的产品,它的生产得到Intel公司的许可。RISC和微控制器思想的混合设计CPU与大多数RISC处理器类似,但是它有更小的寄存器。CPU最初由挪威特隆赫姆的两个研究员提出,在1995年他们的工作得到Atmel的认可。CPU芯片的发展仍然出现在挪威,此时在Atmel的圣何塞(加利福尼亚州)是以生产存储器和外部设备为中心的。芯的特性32和8位计数器相同,如图1所示。任意寄存器都能存储地址或数据。自从8位地址指示字甚至在8位设备中已没什么用处,最后六个寄存器成对应用作为地址指示字。与X、Y、Z一起,这三种寄存器被用来做任意下载或存储操作。最后,6位转换增加到指示器中,成为地址阵中有用的元素。这种模式在X指令不可用,它的工作代码被用作LDI指令(快速连续下载)。0X00到0X1F,对应于R0到R31。芯片的位寄存器包括溢出,携带,签名和其他标记,它与其他内部寄存器都为内存印象图。这使得任意寄存器都能够用标准的存储器说明操作,而不必用特殊的程序计数器指令。CPU不能达到所有目的,但是它不仅能够找回源操作数、执行指令,而且可以在单一时钟周期中存储结果。所有操作都是寄存器到寄存器,芯片遵从严格的下载/存储模式。AVR指令的突出部分就是长16位,它只存在4个32位指令,允许16位绝对寻址。虽然数据指示器也为16位,但是AVR将数据和程序空间隔离,PC(程序计数器)只有12位宽,代码8K。尽可能规则的指令系统这些紧凑的指令造成了一些必要的压力,首先就是影响即时值。几乎没有指令允许即时值,有的(ADIW, SUBI, ORI等)也只是在寄存器组的上半部分(R16到R31)起作用。ADIW 和SBIW指令(文字及时增加/删除)限制更多,它们只能在最后8个寄存器里使用,即R24到R31。这些指令最初是在X, Y, Z指示器增加小便宜量(0-63字节)。这里也有许多条件转移指令,有7位偏移,指令能在任意方向上执行偏转操作。对于更大偏移,RJMP能移位码2K,这通常在芯片的小编码空间给出。AVR还有令人感兴趣的 “跳跃”指令(SBRC, SBRS, SBIC和SBIS),如果在任意寄存器里设置得话,它们能漏过下一个指令。如果跳跃指令为长跳转,它们就能作产生有效的长偏移条件转移。同时,它们也能在一串操作中跳过单一算法或逻辑操作,这种条件操作与ARM的方法有些类似。AVR芯片没有相乘操作,尽管其中的一种已经被定义。MUL(相乘)任意两个8位寄存器,这个16位的结果存放在R0和R1中。操作时,MUL在两个时钟周期中执行,这比68HC11的10时钟快5倍,连摩托罗拉最新的68HC12也需要3个时钟。Atmel希望在在未来的AVR芯片上生产时钟速度增加、信号处理任务简单化的乘法器。二进制处理指令。 对于大多数微控制器,AVR有许多二进制选择,包括16个在位寄存器中这支或删除的外在指令。这看起来像工作编码的不平衡运用,常规逻辑操作也能达到相同的结果。然而,为了深入运用,这也许是正确的选择。伪操作用到很珍贵的地址指示字和一个或更多的寄存器。SEx/CLx不用寄存器。芯片也能在普通目的或输入/输出寄存器中设置或清除任意位,SER 和CLR能立刻擦除整个寄存器。SBR和CBR,分别又称为ORI和ANDI,能设置或清除多位。包括五部分的初始发行。Atmel发行的AVR生产线包括四个基本芯片:90S1200, 2313,4414和8515。后三种比较相似,主要的区别在于内存的大小:2K, 4K或8K,同时,芯片上的SRAM和 E
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 汽车通讯协议书类型包括
- 宝坻劳动协议书纠纷
- 2014年乌克兰协议书
- 茶油销售框架协议书
- 2025年REITs扩募条件考核试卷
- 2025初级商业人像摄影师男性人像硬朗光效布光考核试卷
- 入股协议书是诈骗
- 不签署休战协议书国家
- 养殖黄鱼买卖协议书
- 2025年航天科技行业航天科技新技术应用研究报告及未来发展趋势预测
- 安徽省联考2025-2026学年高一上学期10月调研考试语文试卷(含答案)
- 2025-2026华为ICT大赛-基础软件赛道理论考试题库(核心500题)
- 电商公司招聘简章范文(25篇)
- 高效学习方法讲座-高效学习方法
- 2025首届电力低空经济发展大会:电力场景具身智能检修机器人技术及应用
- 2025年行政职业能力测验题库答案解析
- 2025年及未来5年中国黑胶唱片行业发展潜力分析及投资方向研究报告
- 新能源汽车火灾扑救课件
- 面神经炎的治疗与护理
- 叉车点检维护培训课件
- 浙江市场监管检查课件
评论
0/150
提交评论