【深入理解计算机系统】 六:AVR架构和运行环境

6.1. The Execution Environment

The architecture of a microprocessor consists of several modules that allow the execution of the instructions in its machine language. These circuits are too complex to be studied in detail. To give an idea about this complexity, the generic microprocessors used in personal computers in the year in 1974 had around 6000 transistors, and in 2004 they contained approximately 50 million transistors. These microprocessors are now designed over periods of several years and by large teams of designers. The following figure shows an image of an 8 bit microcontroller manufactured by Atmel Corporation similar to the one used in the Arduino platform.

By ZeptoBars CC-BY-3.0 (Links to an external site.), via Wikimedia Commons

The chip of the previous figure has a size of 2855 x 2795µm, (one meter has 1,000,000 µm). That mean, in a square meter you can fit almost 125,000 of these circuits. The complexity of designing one of these circuits can be managed with the help of sophisticated technology that supports the whole cycle, from initial design to the required ultra-high level of component integration. The final product is a chip ready to be used in a circuit board as shown in the following figure.

The term architecture is used to denote a generic description of a set of microcontrollers that are capable of executing the same machine instructions but that may differ in some characteristics such as the size of the memory, speed, etc. The AVR architecture refers to a family of microcontrollers that process most of their data in sizes of 8 bits, and it has a reduced set of instructions with fixed format.

In this document we will describe the basic elements of what is known as the AVR architecture. An in-depth study of this architecture is required to design advanced applications that make use of this chip. In that case, the most important source of information is the known as the datasheet containing the description of all the aspects of the chip. You may check the Atmel 8-bit Microcontroller datasheet to see the type of information included in these documents. Section 7 of that document contains a block diagram of the CPU, the description of the register file, the stack, and how are the instructions executed.

In this section we will present a summary of this architecture to understand how the most common instructions are executed.

The execution environment of an AVR microcontroller refers to the elements used to execute instructions: type of data managed, data and status registers, available memory, etc. The units of information manipulated by a circuit are usually denoted by the following terms:

Name Bits Bytes
Byte 8 bits 1 byte
Word 16 bits 2 bytes
Doubleword 32 bits 4 bytes
Quadword 64 bits 8 bytes
Double Quadword 128 bits 16 bytes

The following figure shows the relative sizes of these units of information and the nomenclature used to refer to their bytes. Bits are numbered starting at zero.

Information Sizes and Names

6.1.1. The Data-path

The main blocks of the AVR architecture are illustrated in the following figure.

Block Diagram of the AVR Architecture

You may download the Block Diagram of the AVR Architecture

Preview the document
.

The blocks are all interconnected through an 8-bit data bus through which data can be exchanged between all the modules. The modules shown below the bus are in charge of executing the machine language, whereas those above the bus execute other tasks such as input/output, interruptions, timer events, etc.

6.1.2. Program and Data Memories

The AVR architecture contains two types of memory to store programs and data. Programs are stored in the Program Memory and the data that these programs manipulate is stored in

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值