Embedded Systems 简明教程
Embedded Systems - Processors
处理器是一个嵌入式系统的核心。它是接收输入并处理数据后产生输出的基本单元。对于嵌入式系统设计人员而言,有必要了解微处理器和微控制器。
Processor is the heart of an embedded system. It is the basic unit that takes inputs and produces an output after processing the data. For an embedded system designer, it is necessary to have the knowledge of both microprocessors and microcontrollers.
Processors in a System
一个处理器有两个基本单元:
A processor has two essential units −
-
Program Flow Control Unit (CU)
-
Execution Unit (EU)
CU 包含一个从内存中获取指令的获取单元。EU 有用于实现与数据传输操作和数据从一种形式转换到另一种形式有关的指令的电路。
The CU includes a fetch unit for fetching instructions from the memory. The EU has circuits that implement the instructions pertaining to data transfer operation and data conversion from one form to another.
EU 包含算术和逻辑单元 (ALU),还包含执行程序控制任务的指令的电路,例如中断,或跳至另一组指令。
The EU includes the Arithmetic and Logical Unit (ALU) and also the circuits that execute instructions for a program control task such as interrupt, or jump to another set of instructions.
一个处理器按从内存中获取的相同顺序运行获取循环并执行指令。
A processor runs the cycles of fetch and executes the instructions in the same sequence as they are fetched from memory.
Types of Processors
处理器可以划分为以下类别:
Processors can be of the following categories −
-
General Purpose Processor (GPP) MicroprocessorMicrocontrollerEmbedded ProcessorDigital Signal ProcessorMedia Processor
-
Application Specific System Processor (ASSP)
-
Application Specific Instruction Processors (ASIPs)
-
GPP core(s) or ASIP core(s) on either an Application Specific Integrated Circuit (ASIC) or a Very Large Scale Integration (VLSI) circuit.
Microprocessor
微处理器是具有 CPU 的单个 VLSI 芯片。此外,它还可能具有其他单元,例如缓存、浮点处理算术单元和流水线单元,这些单元有助于更快地处理指令。
A microprocessor is a single VLSI chip having a CPU. In addition, it may also have other units such as coaches, floating point processing arithmetic unit, and pipelining units that help in faster processing of instructions.
早期的微处理器取指执行周期由大约 1 MHz 的时钟频率控制。现在的处理器以 2GHz 的时钟频率工作
Earlier generation microprocessors’ fetch-and-execute cycle was guided by a clock frequency of order of ~1 MHz. Processors now operate at a clock frequency of 2GHz
Microcontroller
微控制器是个单芯片 VLSI 单元(也称为 microcomputer ),虽然计算能力有限,但具备增强的输入/输出能力和许多片上功能单元。
A microcontroller is a single-chip VLSI unit (also called microcomputer) which, although having limited computational capabilities, possesses enhanced input/output capability and a number of on-chip functional units.
CPU |
RAM |
ROM |
I/O Port |
Timer |
Serial COM Port |
微控制器尤其用于实时控制应用的嵌入式系统,具有片上程序内存和设备。
Microcontrollers are particularly used in embedded systems for real-time control applications with on-chip program memory and devices.
Microprocessor vs Microcontroller
下面我们来看一看微处理器和微控制器之间最显著的区别。
Let us now take a look at the most notable differences between a microprocessor and a microcontroller.
Microprocessor |
Microcontroller |
Microprocessors are multitasking in nature. Can perform multiple tasks at a time. For example, on computer we can play music while writing text in text editor. |
Single task oriented. For example, a washing machine is designed for washing clothes only. |
RAM, ROM, I/O Ports, and Timers can be added externally and can vary in numbers. |
RAM, ROM, I/O Ports, and Timers cannot be added externally. These components are to be embedded together on a chip and are fixed in numbers. |
Designers can decide the number of memory or I/O ports needed. |
Fixed number for memory or I/O makes a microcontroller ideal for a limited but specific task. |
External support of external memory and I/O ports makes a microprocessor-based system heavier and costlier. |
Microcontrollers are lightweight and cheaper than a microprocessor. |
External devices require more space and their power consumption is higher. |
A microcontroller-based system consumes less power and takes less space. |