There is nothing that cannot be embedded, only imagination can be used. Popular Science of Embedded Systems
[Copy link]
Nowadays, the development of IoT, AI, and 5G cannot be separated from embedded systems. It is like a Lego puzzle. As long as you know how to "play", unexpected performance will occur. So what exactly is an embedded system? Let's give you a popular science introduction.
To understand its composition, you must first know how it grows.
The first microprocessor was born in the early 1970s. It was the 4004CPU launched by Intel, which was established three years ago. It was a 4-bit microprocessor with a 10-micron process. Today, the development of embedded systems has a history of 50 years and has generally gone through four stages:
1. No operating system stage
Based on the initial single-chip microcomputer, most of them appeared in the form of programmed controllers. During this period, there was generally no operating system related support, and the system could only be directly controlled through assembly language. Of course, the memory would be cleared after the related operation was completed.
The main characteristics are: the system structure and functions are relatively simple, the processing efficiency is low, the storage capacity is small, and there is almost no user interface. Due to the above characteristics, it was once widely recognized by the industrial field.
2. Simple operating system stage
High reliability, low energy consumption embedded CPU.
Features: The embedded operating system is relatively simple, but it has initially acquired a certain degree of compatibility and scalability, and plays a certain role in controlling system load and monitoring the operation of application programs.
3. Real-time operating system stage
Driven by the huge demand for digital communications and information appliances, and with the increasing requirements for hardware real-time performance, the software scale of embedded systems has also been expanding. During this period, the feasibility of operating systems has been greatly improved.
Features: It can achieve highly modular and scalable operation on different types of microprocessors, making the development of application software easier.
4. Internet-oriented stage
The perfect combination of embedded devices and the Internet is the real future of embedded technology. In this information age and digital age, it brings huge opportunities for the development of embedded systems, but also new challenges for embedded system providers.
Embedded system composition: small but complete
According to the book definition, embedded means that the software is burned directly into the hardware, rather than installed on an external storage medium. The IEEE (Institute of Electrical and Electronics Engineers) defines embedded systems as: "Embedded systems are application-centric, based on computer technology, with customizable software and hardware, suitable for special-purpose computer systems with strict requirements on functionality, reliability, cost, size, and power consumption."
With applications as the core, embedded systems have clear practical uses. Based on computer technology, it is actually a special kind of computer. The software and hardware can be customized, which means it has strong flexibility and customizability.
What does "special" mean in a special-purpose computer system? Let's talk about "general-purpose" first, which refers to the personal PCs, laptops, and data center servers that we commonly use, which can be used for a variety of purposes, that is, "general-purpose computer systems." So what are the specific "special" directions in which embedded systems are used?
Embedded products that are close to daily life include smart phones, smart refrigerators, elevators, car navigation, etc.; some high-end products include Google Glass, digital TV, smart medical care, smart watches, etc. Of course, there are many more.
An embedded system is a multi-module system with a processor (CPU) as the core and connected by a bus:
An embedded system can be roughly divided into:
Hardware System
Middle Layer
Software System
Application Layer
This diagram covers the basic components of an embedded system:
The hardware layer is mainly divided into: embedded processors, memory, analog circuits, power supplies, interface controllers, connectors, etc.
Its core is an embedded microprocessor.
The biggest difference between embedded microprocessors and general-purpose CPUs is that embedded microprocessors mostly work in systems designed specifically for specific user groups. They integrate many tasks that are performed by general-purpose CPUs on the board into the chip, which is conducive to the miniaturization of embedded systems during design, while also having high efficiency and reliability.
The architecture of embedded microprocessors can adopt the von Neumann architecture [1] or the Harvard architecture; the instruction system can be a reduced instruction set (RISC) or a complex instruction set (CISC). RISC is currently the most popular. This architecture only contains the most useful instructions, ensuring that the data channel can quickly execute each instruction, thereby improving execution efficiency and making the CPU hardware structure design simpler. Embedded microprocessors have various architectures. Even within the same architecture, they may have different clock frequencies and data bus widths, or integrate different peripherals and interfaces. At present, there are more than 1,000 embedded microprocessors in the world, with more than 30 series of architectures, among which the mainstream architectures include ARM, MIPS, PowerPC, X86 and SH.
In the embedded field, ARM architecture processors occupy half of the market, but it does not produce any processors, but only provides IP.
Embedded microprocessors have the following characteristics:
1) It has strong support for real-time multitasking, can complete multitasking and has a short interrupt response time, thereby reducing the execution time of internal code and real-time core to a minimum.
2) It has a powerful storage area protection function. This is because the software structure of the embedded system has been modularized. In order to avoid the cross-effect of errors between software modules, a powerful storage area protection function needs to be designed, which is also conducive to software diagnosis.
3) Scalable processor architecture to quickly develop the highest performance embedded microprocessor that meets the application needs.
4) Embedded microprocessors must have very low power consumption, especially for battery-powered embedded systems used in portable wireless and mobile computing and communication devices, which must consume only mW or even μW of power.
Are you confusing microcontrollers with embedded processors?
There is also an embedded microcontroller MCU, which integrates ROM/RAM, bus logic, timer/counter, watchdog, I/O, serial port, A/D, D/A, FLASH, etc. Typical representatives are 8051, 8096, C8051F, etc.
In fact, MCU is the so-called single-chip microcomputer. A single-chip microcomputer integrates CPU, memory, timer counter, I/O interface circuit, etc. on a single chip. It is small in size and low in power consumption. It is called a single-chip microcomputer. Because the single-chip microcomputer is very small, it can be implanted in any tiny device or instrument. It is widely used as the controller of these tiny devices and instruments, so the single-chip microcomputer can also be called an embedded microcontroller.
Typical products: 51 MCU, STM32
Embedded systems are a large category, and single-chip microcomputers are an important subcategory. An embedded system is like a complete computer, while a single-chip microcomputer is more like a computer without peripherals. Now all kinds of hardware functions can be built into single-chip microcomputers. Therefore, the hardware difference between embedded systems and single-chip microcomputers is getting smaller and smaller, and the dividing line is becoming more and more blurred.
The biggest difference between MCU and embedded processor
The storage space of a single-chip microcomputer is not at the same level as that of an embedded processor. A single-chip microcomputer usually has only a few KB of on-chip storage, and due to peripheral limitations, it is unlikely to increase the number of peripheral embedded multimedia controllers (EMMCs) on a large scale, while embedded processors usually have hundreds of megabytes of RAM. Such a huge difference makes it almost impossible for a single-chip microcomputer to run an operating system like an embedded processor, and even the TCP/IP protocol stack and USB protocol stack cannot run. Some high-end single-chip microcomputers, such as ST's STM32 series, may be able to run some lightweight system OSs and embedded network protocol stacks, such as the IwIP protocol stack.
In addition, the rich and powerful performance of the embedded processor determines that it can complete more applications that the single-chip microcomputer cannot complete, such as network communication functions, video transmission processing functions, etc. When the peripheral storage is increased, the embedded processor can easily run various Linux systems and graphical GUI interfaces.
Other parts
Memory: Embedded systems require memory to store and execute code, including cache, main memory (ROM and RAM) and auxiliary memory.
Embedded peripheral hardware devices: serial port, Ethernet interface, USB, audio interface, LCD display, camera, etc.
In addition, there are embedded DSP processors (Digital Signal Processor) and embedded system-on-chip SoC specifically for signal processing.
The following figure is a physical example of an embedded system:
In the upper left corner is the CPU, in the middle is the RAM, and then there are ROM, network card, serial port, power supply, etc. It can be seen that the embedded system is small but complete.
Software Layer
The software layer is easy to understand. It is a widely used system software, which consists of real-time multitasking operating system (RTOS), file system, graphical user interface, network system and common component modules. RTOS is the foundation and development platform of embedded application software. The main ones are: embedded real-time operating system C/OS-II, embedded Linux, Windows, VxWorks, etc., as well as Android, iOS, etc. used in smartphones and tablets.
Embedded middle layer
The so-called middle layer is the interface layer between the software layer and the hardware layer, also known as the Hardware Abstract Layer (HAL) or the Board Support Package (BSP). It separates the upper-level software of the system from the underlying hardware, making the underlying driver of the system independent of the hardware. Upper-level software developers do not need to care about the specific situation of the underlying hardware and can develop according to the interface provided by the BSP layer.
[1] Von Neumann architecture is a computer design concept that stores programs (a collection of instruction sequences) and data at different addresses in the same memory.
Harvard structure: a structure that stores programs and data separately.
|