
Hello everyone, I am Xuanyuan. We are learning about software architecture design through a series of content. This article focuses on learning aboutembedded systems and related content.
1.1 Overview of Embedded Systems(★★)
1.1.1 Definition of Embedded Systems
An embedded system is a computer system specifically designed for a particular application, where the software architecture design is closely related to the hardware architecture.
Five Stages of Embedded System Development
(Master the development context in chronological order)
|
Stage |
Key Technologies |
Characteristics |
|
First Stage |
Microcontroller(SCM) |
Assembly programming, single function, low efficiency |
|
Second Stage |
Microcontroller(MCU) |
Simple OS, interface expansion, efficiency improvement |
|
Third Stage |
System on Chip(SoC) |
Small core, good compatibility, high efficiency |
|
Fourth Stage |
Networked Embedded |
Integrated network interface, networked applications |
|
Fifth Stage |
Intelligent, Cloud Technology |
High integration, low power consumption, intelligent service direction |
1.1.2 Hardware Architecture of Embedded Systems
(1) Typical Hardware Components
· Microprocessor (MPU/MCU/DSP/GPU/SoC)
· Memory (RAM/ROM)
· I/O Interfaces (Serial, Network, USB, JTAG)
· Timers, Watchdog, Peripherals (UART, LED, etc.)
(2) Classification of Embedded Processors (Key to Remember)(★★)
|
Name |
Type |
Characteristics |
Typical Applications/Products |
|
Microprocessor (Micro Processor Unit, MPU) |
MPU |
General-purpose microprocessor, requires peripherals |
ARM, PowerPC, MIPS |
|
Microcontroller (Micro Control Unit, MCU) |
MCU |
Single-chip integration, low power consumption |
8051, MCS-251, ARM Cortex-M |
|
Signal Processor (Digital Signal Processor, DSP) |
DSP |
Suitable for digital signal processing |
TI TMS320, Freescale DSP56000 |
|
Graphics Processor (Graphics Processing Unit, GPU) |
GPU |
Graphics computation, 3D acceleration |
NVIDIA, AMD GPUs, etc. |
|
System on Chip(System on Chip, SoC) |
SoC |
Highly integrated system on chip |
Commonly used in mobile phones, smart hardware, etc. |
(3) Processor Grade Classification
Civilian Grade: 0~70℃
Industrial Grade: -40~85℃
Military Grade: -55~150℃
(4) Classification of Embedded System Memory
RAM (Random Access Memory)
Volatile, requires continuous power supply
Classification:
DRAM: Low cost, needs refreshing, used as main memory
SRAM: Fast, used for caching
VRAM: Video memory, used for image output
FPM DRAM, EDO DRAM, etc.: Improved types of DRAM
ROM (Read-Only Memory)
Non-volatile, commonly used for program storage
Classification:
PROM: One-time programmable
EPROM: Ultraviolet erasable
EEPROM: Electrically erasable, reprogrammable
Flash ROM: Fast writing, commonly used in embedded systems
(5) Internal (External) Bus Logic
Bus Definition: A common communication channel for transmitting information between various functional components of a computer, mainly including:
· Data Bus: Transmits data (e.g., CPU ↔ RAM)
· Address Bus: Specifies memory addresses
· Control Bus: Transmits control signals
Type Classification:
By Topology: Star, Tree, Ring, Bus, Crossbar, etc.
By Connected Components:
· On-chip Bus: Communication between components within the CPU chip (e.g., ALU, registers)
· System Bus: Communication between major components like CPU, memory, I/O interfaces (also known as internal bus)
· Local Bus: Data exchange between a few components (e.g., CPU ↔ Northbridge)
· Communication Bus: Connects external devices or other systems (also known as external bus)
Common Bus Protocols: Interbus, Mbus, PCI, cPCI, PCMCIA, I2C, SCI, CAN, VXI, IEEE 1394, MIL-STD-1553B, etc.
(6) Watchdog Circuit(★★)
Function: Used to force a restart during system anomalies, enhancing system robustness and reliability
Basic Principle: The watchdog timer counts automatically when functioning normally, and the program flow periodically resets it. If the system hangs or runs away, the timer will overflow, triggering an interrupt. Within the set time interval, the system can retain critical data before resetting and restarting.
I/O Interfaces
Role: A bridge for data exchange between the computer and external devices, usually programmable.
Common Types:
· Serial Interface;
· Parallel Interface;
· Direct Data Transfer Interface;
· Interrupt Control Interface;
· Timer/Counter Interface;
· Discrete Interface;
· Digital/Analog Interfaces, etc.
External Devices
Definition: Input, output, and debugging devices other than the host in a computer system.
Common Peripherals:
· Input Devices: Keyboard, Mouse, Pen Input, Scanner
· Output Devices: Monitor, Printer
· Storage Devices: USB Drive, External Hard Drive, etc.
· Debugging Tools: JTAG Debugger, etc.
1.1.3 Software Architecture of Embedded Systems
(1) Development History of Embedded Software Architecture
|
Stage |
Characteristics |
Architecture Form |
|
Mid-1980s (Microcontroller Era) |
Mainly control systems, simple functions, small scale (tens of KB) |
Using assembly language, monitor program(Monitor) + Application Software, two-layer architecture |
|
After 1990s |
Expanded application range, increased complexity of hardware and software |
Introduction of embedded operating systems (RTOS), using high-level languages, architecture begins to take shape |
|
Current Stage (Intelligent Stage) |
Integration of IoT, cloud computing, intelligent manufacturing, and other technologies |
Architecture tends to be complex, supporting reuse, containers, virtualization, merging traditional and modern architectural styles (such as microservices, EDA) |
The architecture begins to focus on module reuse, decoupling, and maintainability
Transitioning from traditional monolithic to layered architecture, component-based architecture, service architecture development
(2) Typical Types of Embedded Software Architecture(★★)
|
Architecture Type |
Description |
Type |
|
Hierarchical Model Architecture |
Divides system responsibilities by layered structure, commonly found in RTOS embedded systems |
Closed Type: Upper layers can only call the next layer’s interface Open Type: Upper layers can call interfaces of the same layer or any lower layer |
|
Recursive Model Architecture |
System nesting, components can be repeatedly called, emphasizing modularity and distributed logic reuse |
Top-Down: Starting from the overall system structure, gradually refining into subsystems Bottom-Up: First determining key classes and object relationships in the domain |
(3) GOA (General Open Architecture) Defined by SAE AS4893(★★)
GOA is an embedded system architecture standard defined by the Society of Automotive Engineers (SAE), reflecting the ideas of openness, generality, and portability.
Core Features of the Architecture
Adopts hierarchical structure as the main style
Clearly defines key components and interface definitions
Emphasizes openness, configurability, and cross-platform deployment capabilities
Types of Interfaces
4 types of direct interfaces: direct calls between upper and lower layers (e.g., function calls)
4 types of logical interfaces: communication between modules at the same layer based on message mechanisms
(4) Advantages of GOA Architecture(★★)
|
Feature |
Description |
|
Portability |
Software can migrate between different model systems |
|
Interoperability |
System components/nodes can collaborate and share resources |
|
Scalability |
Software functions can be scaled up or down based on hardware capabilities |
|
Accessibility |
Software/module sources are open, not reliant on a single vendor |
I hope the content shared above is helpful to everyone. Thank you for your long-term support. If you have any questions or want to learn more aboutarchitecture, system division, high-level projects, and software design, feel free to message me directly. Let’s progress together! For software examination study, please follow the public account and join the group by adding WeChatMessage: architecture, system division, high-level projects, software design