Architectures and elements
The architecture of an embedded control system consists of hardware and software elements (Figure 1.1). The hardware architecture provides interconnection for all hardware components. The software architecture allocates sequences of programs to specific general-purpose microprocessors. The architecture configuration largely depends upon the ingenuity of the architect. One factor impacting performance is whether a given function of the controlled system is implemented as hardware or software. In an embedded control system, especially in a distributed embedded system, the hardware and software are divided into several groups that run multiple processes concurrently; we define each of these groups as a module.
(1) The hardware architecture of embedded control systems
Embedded control systems are generally developed on the customer’s hardware, and often require high quality and reliability, and compatibility with real-time controls. Many use distributed architectures, on which a large number of processes are able to run concurrently. Such systems will commonly have several different types of general-purpose microprocessors, microcontrollers and application-specific integrated circuits (ASIC), all interconnected with communication links to work with embedded
software. It is crucial that each process can be executed with a variety of hardware modules and software programs.
The core of an embedded control system is a microprocessor, designed to operate a set of machine instructions, including firmware and boot-code, which are stored in the hardware memory. Another important hardware component is the microcontroller, typically a CPU core for the processing functions, together with a bus interface for communication with memory components and external or peripheral devices.
To provide flexibility, an embedded control system normally has some ASIC chips in addition to the microprocessor. An ASIC chip is designed for a specific application, rather than being a general-purpose CPU, since it does not incur the overhead of fetching and interpreting instruc- tions stored in memory. ASIC chips can be based on standard cells, gate arrays, field-programmable gate arrays (FPGAs), or complex programmable logic devices (CPLDs). Embedded control systems employing reconfigurable hardware such as FPGA and CPLD are referred to as reconfigurable embedded systems. Reconfigurable systems can provide higher performance and flexibility to adapt to changing system needs at lower cost. Dynamically reconfigurable embedded control systems exploit the reconfiguration ability of programmable devices at run-time to obtain further cost saving.
An embedded control system should have storage elements; typically software executed by microprocessors or microcontrollers. For data storage, the microprocessor or microcontroller can include various types of memories, such as random access memory (RAM), read-only memory (ROM) or flash memory. Flash memory can be erased and reprogrammed in blocks instead of being pro- grammed one byte at a time.
For transmitting and receiving data between devices and components, the microprocessor, microcontroller, ASIC and other devices may utilize various types of serial interfaces, parallel interfaces or buffers. Buffers are used by microprocessor to store operating data temporarily.
(2) The software architecture of embedded control systems
Many embedded control systems are required to fit real-time or multiple-process environments. Real- time or multiple-process operating systems are defined in the software, allowing the system to perform in a general-purpose control environment. Real-time operating systems, in comparison with non-real- time operating systems, offer much shorter response times. In multiple-process non-real-time operating systems, each process restarts the running of other processes of the same or lower priority level, and the response time can be much longer.
An embedded control system normally executes software in which the user interface is used as a system interface. A program package for application software is a necessary component of embedded control system software architecture. This application software runs under the control of a real-time operating system (RTOS) and is partitioned into one or more threads or tasks. A thread or task is an independent object of executable software that shares the control of the microprocessor with other defined threads or tasks within the embedded control system.
Embedded system software exists in many forms; such as software in a network router, or system software in a controlled device. Implementing a particular function in software provides flexibility, since it is more easily modified than hardware. Implementing a particular function in hardware, however, is generally performs faster. Hardware implementation may also reduce demand on microprocessors and, so speed up software execution.
The firmware and boot-code are also important parts of embedded system software, since they contain its configuration parameters. These allow an embedded control system to access and configure the system by setting its values. Different processes can run in different modules, which can work together if the configuration parameters of this system are properly set. In run-time, the behaviors of an individual module are governed by the values of the corresponding configuration parameters. The collection of configuration parameters from the whole system comprises a current configuration database, which determines the overall behavior of the entire system. This configuration database is included in the firmware and boot-code, so to improve system performance it is just necessary to upgrade the firmware and boot-code, or change this configuration database.
In distributed embedded control systems, communication protocols are encoded in software. The software that is responsible for communications between different components is sometimes called communication software.
Most of the software of embedded control systems is a special package working as system routines. These provide information to the user about how to use, configure, diagnose, and trouble-shoot a device. Some embedded control systems also contain calibration routines in software and hardware to check and correct system working parameters.