introduction
With the rapid development of computer technology, network technology and communication technology, the current information society has entered the post-PC era from the traditional personal computer era; and the main feature of the post-PC era is the widespread application and development of embedded systems.
Although there are many definitions of embedded systems, the one that is generally accepted in China is [1]: a special-purpose computer system that is application-centric, based on computer technology, with customizable hardware and software to suit the application system's requirements for functionality, reliability, cost, size, and power consumption.
Embedded systems mainly use micro-chips and their solidified software, which are embedded in other systems to achieve the purpose of intelligent or information-based real-time control of other systems.
At present, embedded systems have been widely used in industrial control, aerospace, national defense, information appliances and other fields, and have played an important role. In addition, more and more fields are in urgent need of the support of embedded systems. However, due to the great differences in hardware, software, and application environment of embedded systems, the time and energy of currently limited embedded technicians are mainly spent on familiarizing themselves with different hardware, software and code development. This not only makes the efficiency and quality of embedded system development unguaranteed, but also seriously restricts embedded technicians from conducting higher-level research and development. These have become bottlenecks for the rapid development of increasingly complex embedded systems.
1 Feasibility of Introducing UML into Embedded Systems
In the 1960s and 1970s, the software industry encountered a crisis. The reason was that software became larger and more complex, while the quality and productivity of software became lower and lower. This promoted the birth of software engineering, which greatly improved the standardization and efficiency of software development. In the 1990s, with the development of object-oriented technology, software engineering developed in the direction of automation and intelligence, and its prominent sign was the emergence and development of the UML standard. Subsequently, many software and hardware manufacturers have successively developed many CASE tools based on the UML standard. From then on, software development can use UML's CASE tools to complete a series of software engineering processes from software analysis, design, implementation to testing, which greatly improves the reusability and efficiency of software development and reduces the rework rate in the software development process.
The outstanding feature of UML is that it analyzes and designs the developed system from an object-oriented point of view. It regards each function of the system as a module (represented by a "class"). In UML, the use case view, logical view, component view, concurrency view and expansion view are used to implement the software requirements analysis, design, implementation, integration and testing processes respectively; and each view includes a series of diagrams for specific implementation. The above 5 types of views include use case diagrams, class diagrams, object diagrams, state diagrams, sequence diagrams, collaboration diagrams, activity diagrams, component diagrams and expansion diagrams. Among them, the use case diagram, class diagram, object diagram, component diagram and expansion diagram are static diagrams, which analyze and model the system from a static aspect; while the state diagram, sequence diagram, collaboration diagram and activity diagram analyze the system from a dynamic aspect and simulate the dynamic interaction of the system.
In 2001, the release of UML2.0 marked the further maturity of UML technology, and it also gained the support of more and more hardware and software manufacturers, which also made the development prospects of UML broader. In the face of the great achievements of UML based on software engineering in the software field, can UML be introduced into embedded system development to change the current situation of low efficiency of embedded system development? Through research and analysis, it is found that there are mainly the following difficulties in applying UML to embedded systems:
① Embedded systems consist of hardware and software. Hardware from different manufacturers varies greatly. Software that can run correctly on a certain embedded chip may not run properly on another embedded hardware platform.
② Embedded system software platforms also vary greatly, and their development requirements vary greatly.
③ Most embedded systems have strict real-time requirements.
④ Software for embedded platforms is generally not developed in object-oriented languages, but mainly written in C language or even assembly language.
All these characteristics make it difficult to build UML models in actual embedded systems. Even if the model is built, its correctness and real-time performance are difficult to verify and guarantee.
Nevertheless, researchers and developers from various countries have made unremitting efforts to introduce UML into embedded systems and have achieved some results, mainly including:
① In order to verify the correctness of the established model, some people proposed to use formal methods. For example, William and HC Cheng used VHDL as the formal description language of the model, and obtained the VHDL description of the embedded system by analyzing the class diagram and state diagram in the UML model, determined the structure and behavior of the system, and performed model verification [2]. Other scholars used finite state automata in combination with UML to complete the analysis, design and verification of the system [3].
② For real-time requirements, the solutions provided mainly include: using standard UML and its structural concepts to design real-time systems [4], and expanding UML or modifying UML to meet the requirements of real-time systems [5].
③ For language issues, there are mainly two solutions: one is to use object-oriented C++ language development, such as SystemC [6]; the other is to use a UML development environment that can be combined with C language, such as Rhapsody launched by ILogix in the United States.
From the above three solutions, we can see that the problems of verifiability, real-time performance and language generated by the application of UML in embedded systems can be solved. Therefore, it is possible to widely use UML to analyze, design and guide embedded system development to solve the problem of low efficiency in embedded system development. [page]
2 An Improved UML Solution for General Embedded Systems
Since the current research on the application of UML in embedded systems often focuses on solving a certain aspect of embedded systems, it is not universal and it is difficult to become a standard for embedded system modeling. In order to solve the modeling problem of UML in embedded systems, this paper proposes a universal UML embedded system design solution.
To model an embedded system the following aspects must be considered:
◆ Time. Describe time and its constraints in sequence diagrams.
◆ Concurrency. Use activity classes to describe concurrency. The attributes of activity classes (such as priority) can be defined as class tag values, which can be mapped to the implementation environment through component classes ﹤﹤Process﹥﹥ and ﹤﹤Thread﹥﹥.
◆ Asynchronous communication. UML supports sending asynchronous messages between threads.
◆ Synchronous communication. Define classes/classes of semaphores, monitors, or critical areas to describe synchronization.
From this, we can conclude that the general process of embedded system modeling is as follows:
① First, determine the system requirements. At this stage, we do not consider which part is software or hardware. We only obtain the functions that the system should have based on research and communication with users, and express them through the relationship between roles and use cases, so as to obtain the use case diagram and the final system requirements.
② Enter the system design stage, that is, design the class diagram according to the requirements obtained from the use case diagram. At this stage, we need to determine which functions are completed by hardware and which functions are completed by software. The design of the software class diagram is basically the same as the pure software modeling method, so I will not repeat it here. The processing of hardware is generally implemented by hardware wrapper classes, which provide interfaces for accessing hardware. These hardware wrapper classes handle the communication with the device and the interrupts generated by the device. Through such hardware classes, the details of the low-level protocol can be hidden, and the low-level interrupts can be easily and quickly converted into high-level events in the rest of the system. Whether the wrapper class is an active or static class depends mainly on the properties of the hardware.
③ If the software class or hardware class described in the class diagram is complex and difficult to describe clearly, then an object diagram can be used to refine it to make it more specific and clear.
④ For real-time requirements, it is necessary to define and describe them in the sequence diagram; if you want to know the links between different objects and how to send messages between linked objects, you can create a collaboration diagram; by creating a state diagram, you can understand all the states that an object can reach and the impact of the events received by the object on the state of the object, etc.
⑤ Finally, use component diagrams and expansion diagrams to achieve system integration and verification.
The above process can be implemented in the Rhapsody software environment, because the software can generate C language commonly used in embedded systems, which is closer to the usual embedded development environment.
3 Example Analysis and Discussion
Here we take an alarm system as an example to illustrate how to use UML to design embedded systems. An alarm system is generally composed of sensors (including sound sensors, image sensors and thermal sensors), alarms (including sound alarms, telephone alarms and light alarms), keyboards, LCD displays, system processors, and memory for storing system configuration information and log information.
When the sensor receives a signal, it sends the information to the system processor through analog/digital conversion. The system processor determines whether an alarm is needed based on the set configuration information conditions. If necessary, an alarm command will be sent to the alarm. The keyboard and LCD display are used for human-computer dialogue, and the alarm conditions and methods can be set according to actual needs.
The sequence diagram of the system is shown in Figure 1. As can be seen from Figure 1, the system requires that the time interval from the sensor returning information to the alarm being issued is less than 3 seconds. This is an example of the time requirement for an embedded real-time system in a sequence diagram.
In the class diagram, the system processor is designed as an active class, responsible for handling the interaction with the user through the control panel with LCD display. Through the control panel, the system can be configured, activated and shut down. All configuration changes are saved in the system configuration information class. The system processor receives the information from the sensor and compares it with the system configuration information to decide whether to alarm. In order to query and understand the historical information of the alarm system, the system processor saves all events in the log. The simple relationship of the class diagram of the system processor, sensor and alarm is shown in Figure 2.
Figure 1 Alarm system sequence diagram
Figure 2 Class diagram of alarm system components
Conclusion
Introducing a universal and complete UML technology for embedded systems will definitely have a positive impact on the research and development of the current rapidly developing embedded systems. The ideas and methods proposed in this article have played a useful role in exploring and suggesting ways to get rid of the dilemma of UML technology in the embedded field
.
[1] Wang Tianmiao. Embedded System Design and Example Development - Based on ARM Microprocessor and μC/OSII Real-time Operating System [M]. 2nd Edition. Beijing: Tsinghua University Press, 2003:530.
[2] William E McUmber, Betty HC Cheng. UML-Based Analysis of Embedded Systems Using a Mapping to VHDL [J]. IEEE High Assurance Software Engineering, 1999 (11):5663.
[3] Shi Keyang, Fu Min, Hu Guanrong. Research on the Model Verification Mechanism of Embedded Systems Based on UML [J]. Computer Engineering and Applications, 2001, 37(23):13111.
[4] He Hai, Zhong Yifang, Cai Chilan. Complex embedded system modeling method based on UMLRT and its application [J]. Computer Applications, 2005, 25(6):14271429.
[5] Bikander M. Graphical Programming Using UML and SDL [J]. IEEE Computer, 2000(12):3035.
[6] Shi Ke. Research on embedded system integrated development based on UML and SystemC [J]. High Technology Communications, 2003(11):4447.
Previous article:Application of Power Logic Devices in Embedded Systems
Next article:Graphical interface support system for real-time embedded systems
Recommended ReadingLatest update time:2024-11-16 15:49
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- PCB short circuit problem
- Fanuc PLC help newbie
- MFIA Impedance Analyzer Free Trial Application
- What exactly is massive MIMO?
- F28379D dual-core program burning
- Texas Instruments micro devices bring five major changes to engineers
- Some experience summary on AD conversion design
- How to conduct standard ZigBee testing and certification of products
- [Zero-knowledge ESP8266 tutorial] Quick Start 12- Making a flame alarm
- Ask: MOS tube switch circuit