An article to understand what is embedded?

1. Definition of Embedded

How to understand embedded? What work we do can be understood as embedded work?
Embedded is an embedded system, which is defined by IEEE (Institute of Electrical and Electronics Engineers) as a device used to control, monitor or assist the operation of machines and equipment, and is a special computer system; the definition of an embedded system generally recognized in China It is a special computer system that is application-centered, based on computer technology, can be tailored to software and hardware, and adapts to the strict requirements of the application system on functions, reliability, cost, volume, power consumption, etc.; from the definition of application objects, embedded The system is a combination of software and hardware, and can also cover auxiliary devices such as machinery. An embedded system is a part of a device or device, which is an embedded processor control board whose control program is stored in ROM. In fact, all devices with digital interfaces, such as watches, microwave ovens, video recorders, cars, etc., use embedded systems, and some embedded systems also contain an operating system, but most embedded systems are controlled by a single program. logic.

2. Four stages of embedded system development:

嵌入式系统发展:分为四个阶段

   1)单片微型计算机(SCM)阶段,即单片机时代:系统功能由汇编语言实现。
      这一时代系统硬件:单片机。软件:无操作系统。
     主要特点:系统结构相对单一,处理效率低,存储容量十分有限,几乎无用户
     接口。
    2)微控制器(MUC)阶段,:主要技术方向:不断扩展对象系统要求的各种外围电路
    和接口电路,突显其对象的智能化控制能力
    这一阶段基础:嵌入式微处理器。这一阶段核心:简单操作系统。
    主要特点:硬件使用嵌入式微处理器,微处理器的种类繁多,通用性弱;系统开销小,效率较高。
    3)片上系统(SOC):主要特点:嵌入式系统能够运行于各种不同的微处理器上,
    兼容性好,操作系统的内核小,效果好。
    4)internet为标志的嵌入式系统:嵌入式网络化主要表现:一方面是嵌入式
    处理器集成了网络接口
      另一方面是嵌入式设备应用于网络环境中。 

**

3. The composition of the embedded system

insert image description hereinsert image description here

1. The hardware layer includes 1. Embedded microprocessor
2. Memory (SDRAM, ROM, Flash, etc.)
3. General device interface and I/O interface (A/D, D/A, I/O, etc.)

embedded in one piece The power supply circuit, clock circuit and memory circuit are added on the basis of the type processor to form an embedded core control module. That is what we call a single- chip microcomputer, in which both the operating system and the application program can be solidified in the ROM.
(1) Embedded microprocessor: the core of the
hardware layer The core of the hardware layer of the embedded system
is the embedded microprocessor . The biggest difference between embedded microprocessors and general-purpose CPUs is that most embedded microprocessors are designed for specific user groups. In the system, it integrates many tasks completed by the board card in the general-purpose CPU (such as 51 single-chip microcomputer) inside the chip, which is conducive to the miniaturization of the embedded system in the design, and also has high efficiency and reliability. This can be understood as the difference between the STM32 microcontroller and the 51 microcontroller. The architecture
of the embedded microprocessor can adopt the von Neumann system or the Harvard system ;

1) Von Neumann Architecture: Also known as Princeton architecture, it is a memory structure that combines program instruction memory and data memory. Instruction fetching and operand fetching are performed on the same bus by time-division multiplexing; the disadvantage is that at high speed, instruction fetching and operand fetching cannot be achieved at the same time, thus forming a bottleneck in the transmission process. Since the program instruction storage address and the data storage address point to different physical locations in the same memory, the program instructions and data have the same width. For example, the program instructions and data of Intel's 8086 CPU are both 16-bit wide.
insert image description hereinsert image description here

The instruction system can choose a reduced instruction system (Reduced Instruction Set Computer, RISC ) and a complex instruction system CISC (Complex Instruction Set Computer, CISC ). RISC computers only contain the most useful instructions in the channel, ensuring that the data channel executes each instruction quickly, thereby improving the execution efficiency and simplifying the design of the CPU hardware structure. Embedded microprocessors come in various architectures, and even within the same architecture may have different clock frequencies and data bus widths, or integrate different peripherals and interfaces. According to incomplete statistics, there are more than 1,000 kinds of embedded microprocessors in the world, and there are more than 30 series of advanced architectures, among which the mainstream systems are ARM, MIPS, PowerPC, X86 and SH. **However, unlike the global PC market, no single embedded microprocessor can dominate the market. In terms of 32-bit products alone, there are more than 100 embedded microprocessors. The choice of embedded microprocessor is determined according to the specific application.
(2) Memory: Embedded systems need memory to store and execute code.
The memory of embedded system includes Cache, main memory and auxiliary memory.
1. Cache
Cache is a small-capacity, high-speed memory array. It is located between the main memory and the embedded microprocessor core, and stores the program codes and data most used by the microprocessor for a period of time. When a data read operation is required, the microprocessor reads data from the Cache as much as possible, rather than from the main memory, which greatly improves the performance of the system and improves the relationship between the microprocessor and the main memory. data transfer rate. The main goal of Cache is to reduce the memory access bottleneck caused by memory (such as main memory and auxiliary memory) to the microprocessor core, so that the processing speed is faster and the real-time performance is stronger. In the embedded system, the Cache is all integrated in the embedded microprocessor, which can be divided into data Cache, instruction Cache or mixed Cache. The size of the Cache depends on different processors. Generally, the Cache is integrated into the high-end embedded microprocessors.
2. Main memory
Main memory is a register that can be accessed directly by embedded microprocessors, and is used to store system and user programs and data. It can be located inside or outside the microprocessor, and its capacity is 256KB~1GB, depending on the specific application. Generally, the on-chip memory capacity is small, the speed is fast, and the off-chip memory capacity is large. The memories commonly used as main memory are: ROM type: NOR Flash, EPROM and PROM, etc. RAM class: SRAM, DRAM, and SDRAM, etc. Among them, NOR Flash has been widely used in the embedded field due to its advantages of many times of rewriting and writing, fast storage speed, large storage capacity and low price.
3. Auxiliary memory
Auxiliary memory is used to store program code or information with large amount of data. Its capacity is large, but the reading speed is much slower than that of main memory, and it is used to store user information for a long time. Commonly used external storage in embedded systems are: hard disk, NAND Flash, CF card, MMC and SD card.
(3) General device interface and I/O interface
The interaction between the embedded system and the outside world requires a certain form of general device interface, such as A/D, D/A, I/O, etc. connection to realize the input/output functions of the microprocessor.
Each peripheral usually has a single function, which can be off-chip or on-chip.
Common device interfaces commonly used in embedded systems include A/D (analog/digital conversion interface), D/A (digital/analog conversion interface), and I/O interfaces include RS-232 interface (serial communication interface), Ethernet ( Ethernet interface), USB (universal serial bus interface), audio interface, VGA video output interface, I2C (field bus), SPI (serial peripheral device interface) and IrDA (infrared interface), etc.

Second, the middle layer: the middle
layer between the hardware layer and the software layer , also known as the hardware abstraction layer (Hardware Abstract Layer, HAL) or board support package (Board Support Package, BSP), which connects the upper-layer software of the system with the underlying hardware Separation makes the underlying driver of the system independent of hardware, and the upper-level software developers do not need to care about the specific conditions of the underlying hardware, and can develop according to the interface provided by the BSP layer. This layer generally includes initialization of related underlying hardware, data input/output operations and configuration functions of hardware devices . BSP has the following two characteristics: 1. Hardware dependency : Because the hardware environment of the embedded real-time system is application-dependent, and as the interface between the upper-layer software and the hardware platform, the BSP needs to provide the operating system with the ability to operate and control specific hardware. method. 2. Operating system dependencies : Different operating systems have their own software hierarchies, therefore, different operating systems have specific hardware interface forms. In fact, BSP is a software layer between the operating system and the underlying hardware, including most of the software modules in the system that are closely related to the hardware. Designing a complete BSP needs to complete two parts: the hardware initialization of the embedded system and the BSP function, and the design of hardware-related device drivers.



3. System software layer:
It consists of Real-time Operation System (RTOS), file system, Graphic User Interface (GUI), network system and general component modules

Guess you like

Origin blog.csdn.net/jinanhezhuang/article/details/109838718