Embedded system has been used in general computer software, e-commerce, Internet and distributed computing environment. However, in some other fields, such as embedded system, the application of CBD is still very limited. Due to the different requirements and hardware platforms of different embedded systems, it is extremely difficult to develop general components suitable for all systems. At present, we can only research and develop applicable components for specific application fields and platforms. Because of the contradiction between the difference and specialization of embedded system and the universality of component technology, it is necessary to adopt applicable component technology and system development methods in order to use components for embedded software development.
This paper mainly introduces the general principles of component-oriented software engineering and its application in embedded system. By analyzing the requirements of components in embedded system and the differences of general component technology, this paper puts forward the design principles of embedded components, and puts forward a component-oriented embedded software system development method based on the characteristics of embedded components. It shows that although there are great differences between embedded system and general computing platform, component technology can still be successfully applied to embedded field.
1. Embedded system and component technology
1.1 embedded system
Embedded system is a small computer system to meet special needs. For example, an on-board control system, an industrial control system, a mobile phone, or a sensing control system. The scope of embedded system is very wide, from micro computing equipment to complex large-scale monitoring equipment. Real time is the characteristic of most embedded systems and an important concept to be considered in system design. For real-time requirements, different embedded systems can be divided into soft time system and hard time system. Embedded systems generally require good stability and reliability. Due to the specific function, diverse requirements and miniaturization of the system, it requires the low cost of the system, which limits the hardware performance of the system. Due to the resource constraints and real-time requirements of embedded systems, software developers are often unable to make use of advanced general software engineering technology, but must use some informal methods and efficient programming languages. With the increasing complexity of the system, new requirements are put forward for the system requirements analysis, model design, early error detection, development cycle, maintainability and so on. Therefore, it promotes the transfer of advanced software engineering methods to the field of embedded development.
1.2 component technology
Component technology is an advanced technology in software engineering. Components can be considered as self-contained components or subsystems that can be used to build large systems. In software engineering, a component is similar to a micro application, that is, it is binary code that has been compiled, linked and can be used. The application is packaged by multiple such components. When the application needs to be modified or improved, you only need to replace one of the components constituting the application with a new version. In this way, the system using component technology has good flexibility and portability. In addition, the powerful component library can provide developers with rich component support, so as to greatly shorten the software development cycle. The advantages of using components are directly related to applications that can dynamically insert or remove them. In order to realize this function, all components must meet two conditions: first, components must be dynamically linked; Second, they must hide their internal implementation details. In addition, using components can help developers predict and verify the functional characteristics of the system according to the component functions used. It is because of many advantages of component that component-based development technology has been widely used in the field of software engineering, and it has been gradually introduced into the rapidly developing field of embedded software development.
2. Design principles of embedded system components
2.1 interface design principles
Components suitable for embedded systems follow most general component design principles, especially the packaging feature that the interface and implementation of components are separated. The interface of components is the embodiment of component functions. Other parts or components in the system use the functions provided by components through interfaces. However, for embedded systems, some additional system characteristics or constraints are as important as system functions (truthfulness), so the interface only includes the functional characteristics of the component itself is not complete, and it must also include additional system characteristics, that is, add constraints. In this way, in the system design stage, using components for design can not only verify the functional requirements, but also predict and analyze the system characteristic requirements.
2.2 component binding and publishing principles
In the design of general components, the interface is implemented as a polymorphic object interface supporting runtime binding. Components are completely bound in dynamic form, independent of the definition of the interface. This provides strong flexibility for component reuse and system upgrade. However, this flexibility will bring performance degradation and risk rise in embedded systems, and affect the real-time and stability of the system. Because all components are bound at run time, this will inevitably increase redundant code and make the system behavior unpredictable. Therefore, the dynamic characteristics of general components are not feasible in embedded systems, especially in small systems. Due to the limitation of real-time and hardware resources, it is better to link and combine components statically in the system design period rather than dynamically in the running period. Static binding of components can generate an overall view of a component-based system design through the system modeling tool, which can better predict and optimize the system performance. Therefore, the form of components should no longer be published in the form of binary executable files in general components, but should be defined in high-level language or more abstract modeling language (such as UML), so that components can bind links during compilation or early design, rather than late binding like general components.
2.3 component principles in large embedded systems
With the continuous development of embedded technology, many large-scale embedded systems with complex functions also appear. For these systems, hardware resources and real-time performance are not the primary considerations. How to effectively control the system complexity and reduce the high development cost has become the most important problem. Therefore, for such a large embedded system, general components can play a role in the system almost without obstacles, which greatly simplifies the development difficulty and reduces the development workload and development cycle. For example, Microsoft’s embedded system Windows CE is a successful application of this technology. The system functions and application functions are completely listed in the form of components. Developers can add or remove a complex function to or from the system image simply by adding and deleting, and support the powerful COM component library, which provides a very convenient tool for application development. Of course, those large-scale embedded systems that require strong real-time should not use general component technology, but should use simplified version for system development according to specific system characteristics.
3. System development process for embedded components
It can be seen from the above analysis that due to the functional and performance requirements of the embedded system, as well as the limitations of hardware resources and complexity control requirements, the components suitable for the embedded software system embody the characteristics of interface definition constraints, static binding and the release form of abstract language. Because of the existence of these characteristics, the software development method suitable for general components can not be directly applied to the embedded software development process, but needs a system development method suitable for the characteristics of embedded components. The following describes the development process for embedded components, which can effectively use and reflect the characteristics of embedded components.
According to the two basic development ideas of composition and decomposition, abstract and concrete, a two-dimensional coordinate system is established, and the abscissa is abstract and concrete; The ordinates are decomposition and combination. The two coordinate axes divide the whole development space into four parts, that is, the four basic steps of the modeling process: decomposition, materialization, combination and confirmation.
Break down the entire development process, starting in the upper left corner of Figure 1. The black box represents the original system to be implemented, that is, the system model established by the developer through requirement analysis. Through the division of system functional domain, the system is decomposed, and each functional domain contains all logical components related to the function. Each logical component is decomposed recursively as a subsystem until the component reaches the granularity of reusable components. The decomposition process only determines the functional form of components from the perspective of abstraction and logic.
Materialization materializes logical components that cannot be decomposed with the smallest granularity. Since these logical components have clear functions or are directly existing components, they can be easily transformed into actual components, as shown in the black thick line box in the lower right corner of Figure 1.
Combining the actual components that will be reused or implemented through the component interface according to the abstract model is the inverse process of decomposition.
Verify that the system built after materialization is compared with the original system to be implemented, and use the function and constraint characteristics of components to predict the function and performance of the whole system, so as to verify the correctness of the system design.
The whole process of embedded component development is embodied in a tree structure, which is equivalent to a component tree. Each leaf of the tree represents a component, and each component can be regarded as a subtree and use the development process recursively. The whole process always uses the combination of existing components or clearly realizable small-scale components to verify the design. Because the component interface and implementation have been statically bound, the function of each component at runtime can be fully determined in the design period, which can help developers find design defects in the earliest time and modify the design in time.
Nowadays, embedded system has been widely used in all aspects of life. CBD technology will undoubtedly play an important role in the development of embedded field. Through in-depth analysis of the design principles of general components and the characteristic requirements of embedded system, this paper puts forward the component design principles and development methods suitable for embedded system, so that the advantages of component technology are well reflected in embedded system, and provides an effective way for the transfer of CBD technology to embedded field.
Of course, in order to make full use of CBD technology in embedded system, there are still some problems to be promoted and solved. For example, there is still a lack of widely used component technology standards suitable for embedded systems, and most component technologies can not support the definition and analysis of embedded system performance characteristics (truthfulness and timeliness), Moreover, the component composition method applied to embedded systems with specific system performance requirements and the function prediction and verification means in system design need to be developed. In addition, embedded system developers need the help of modeling, verification and further analysis.
Source: China Electronics Network