Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

Hardware

Embedded system hardware and software


With the development of computer technology, the application fields of embedded systems are constantly expanding, ranging from automatic navigation systems of space shuttles to mobile phones and smart home appliances. Embedded system is a typical hybrid system of software and hardware, and current products generally include embedded microprocessor and corresponding control software.


1. Introduction to the collaborative development of embedded systems and hardware and software


Early microprocessors were both 4-bit and 8-bit. With the continuous development of manufacturing technology, integrated 8-bit microcontrollers began to appear, and 16-bit microprocessors began to be used in more complex embedded systems, 32-bit structured devices and highly integrated microcontrollers gradually occupied market for high-end applications. Still, more powerful microprocessors did not replace earlier microprocessors, but simply gave embedded system designers a wider range of choices in choosing the right microprocessor based on functionality, features, availability, and price. processor products.


In the early days, due to the single function of the system, the embedded software part was composed of codes independently designed by the manufacturer, so it was very simple. However, with the expansion of applications, the system becomes more and more complex, especially for high-end embedded microprocessor systems, multi-task models are widely used in software development, and many manufacturers also choose third-party commercial embedded real-time operating system products ( RTOS). The hardware resource environment in embedded systems is generally harsh, and the memory is generally not large. To complete complex functions under such tight resources, it is required that the software part of the embedded system must be as compact, stable and efficient as possible.


2.The general method of software and hardware joint design


The software-hardware joint design method is proposed in the design process of the software-hardware hybrid digital system, aiming at the defect that the traditional design method separates the software and hardware development process. It means that the software and hardware use a unified design method and adopt a consistent Design tools for synthesis, verification, and simulation of design methods.


The main steps of the software-hardware joint design are as follows: (1) System-level modeling description: build a complete system description to verify the behavior of the system without considering the implementation details, driving functional verification and hardware-software partition; (2) Combined hardware and software synthesis: including software and hardware partitioning and scheduling, constrained code generation, hardware and interface synthesis. (3) Software-hardware joint simulation, debugging and verification: Model the behavior of the system on the basis of the known behavior of software and hardware components, and verify the function of the system and evaluate the performance of the system.


3. The application and development of software and hardware joint design method


As mentioned earlier, an embedded system is a typical mixed system of hardware and software. At the beginning of the design, the designer needs to divide the system into hardware and software. The software and hardware here can be not only separate components, but also different abstraction levels of the same physical component. In both cases, the interdependencies between hardware and software lead to compromises in their respective implementation methods. At the same time, due to the great changes in the application requirements of embedded systems and the strong requirements for performance, real-time and flexibility, the initial design and division have a great impact on the design quality of the entire system; and due to the complexity of high-end products, many problems in the It will be exposed during the software and hardware integration process. All of these put forward the demand for joint synthesis and joint simulation. Therefore, it is necessary and urgent to introduce the method of joint design of software and hardware in the design of embedded systems.


From the perspective of methodology, the joint design of software and hardware of embedded systems follows the above general methods and rules. With the development of microelectronics technology and embedded system itself, its design method will show some new characteristics.


1. Software and hardware division


Like the design of other mixed hardware and software systems, hardware and software partitioning is a very critical step in embedded system design. How to improve the efficiency of the partition algorithm and reduce the time complexity is the focus of research. Existing research results have improved the effectiveness of partitioning from many aspects. In addition to the most basic simulated annealing algorithm, methods based on compiler guidance, graph-based minimum cost algorithm, software and hardware pipeline, and interactive partitioning have also been proposed.


2. The impact of standardization and high integration of commercial components on software and hardware design


With the development of microelectronics technology, more standard commercial components are put on the market, while highly integrated devices reduce the number of chips. Many designers are now more than happy to use microprocessors and microcontrollers that incorporate more functionality. Correspondingly, the design of the software has also changed. The workload of software development has increased dramatically, often reaching 70% to 80% of all work. In order to shorten the development cycle, along with the trend of hardware standardization, the software content has also shifted from self-designed to using products with intellectual property rights as much as possible. Utilizing portable code and standard real-time operating system has become the direction of designing embedded system application software. Of course, for embedded system developers, decisions involving the integration of standard components and the selection of intellectual property are also complex decisions that must be faced now and in the future.


From the above changes, it can be seen that with the increasing abundance of standardized software and hardware components, the granularity of software and hardware division in embedded system design increases, so that the system description is relatively clear, the software and hardware design work is significantly simplified, and more emphasis is placed on interface design. And overall performance, design space flexibility and diversity are greatly increased. These changes have put forward new requirements for existing design methods and related technologies, such as how to refine the partition algorithm so that it does not need to consider unnecessary details, and further improve the abstraction level of joint simulation and verification, shorten the development cycle, etc. question.


3. "United" and "decentralized" in embedded system design


In the traditional design method, the software design often lags behind the hardware, and the joint simulation technology and virtual prototype technology adopted in the software-hardware joint design method are just to make up for this gap. Therefore, software and hardware design engineers work together to become A trend of development. Through co-design, and specifically co-verification techniques, software engineers are able to test on real hardware as early as possible, and hardware engineers are able to verify their designs early in the prototyping cycle. To achieve this goal, an integrated development environment must be provided, in which software and hardware modeling, joint simulation and evaluation can be completed. Some solutions exist, such as instruction set emulators and standard low-cost commercial evaluation boards. In addition, low-cost master-target computer connection technology has been widely used.


Another feature of the development of embedded systems is that more and more developers are needed. In order to effectively manage the development team, some proprietary technologies must be encapsulated so that they can be used by non-specialists in a safe, reliable and straightforward manner. Therefore, object-oriented thinking should also be introduced in the design of embedded systems. In many large companies, the software development team is not simply growing, but is being dispersed, with members working in different regions or countries. This situation has led to the emergence of "Technology Centers" where the use of "Software Parts" is becoming more and more realistic.


4. Brief introduction of software and hardware collaboration in SOPC embedded system


With the rapid development of semiconductor technology, the scale of integrated circuits continues to increase, and the emergence of large-scale programmable logic devices makes it possible to integrate the entire system on a single chip and realize in-system programming. This is the on-chip programmable system SOPC (System on a Programmable Chip). It supports parallel SOPC technology with flexible design methods: it can be cut, expanded, and upgraded, and it has in-system programmable functions of software and hardware.


FPGA (Field-Programmable Gate Array, Field Programmable Gate Array)-based SOPC design has shown rapid growth in the semiconductor field in recent years and has become the first choice for system-level designers. However, as the system scale continues to The increase makes the design of the whole system very difficult, and the system development cycle is getting longer and longer, and today's embedded electronic products are very sensitive to the system development cycle, so a fast and efficient design method is worth exploring and research question. For these problems in embedded system design, the researchers proposed a new method of software-hardware co-design.


SOPC system is a complex of software and hardware. Many functional modules in the system can be completed by hardware or software. Hardware implementation is characterized by high performance and speed, but high cost and poor flexibility; while software implementation is characterized by good flexibility and low cost, but poor performance. Therefore, how to take into account the system's function and performance (such as power consumption, cost, area, etc.) requirements in the design and implementation process so that they can achieve an optimal combination is the main problem to be solved by the software-hardware co-design method.


5. Traditional electronic design methods


At present, domestic and foreign enterprises generally adopt the traditional embedded system design method. The steps of this method are to first define the requirements description of the system, and then divide the software and hardware of the system. After the division is completed, the hardware and software design will be carried out separately. If errors are found in the hardware and software design, it will directly return to the software and hardware. division.


The disadvantages of this approach are as follows:


1) The parallelism between software design and hardware design of the system is low, and the design cycle is long. This design flow uses the hardware design first, followed by the software design. That is, after the hardware is designed, the software is designed on the basis of the hardware. In this serialized design method, when the hardware design is completed and the software is debugged, if an error is found in the hardware design, it will cost a lot of manpower and material resources to correct the error. The software and hardware of the system cannot be co-verified, which leads to a substantial increase in the number of repetitive design tasks and increases the design cost.


2) The level of system design is low. System-level design relies on manual work. The large-scale design exceeds the ability of designers. The development process of system software and hardware lacks communication and coordination, resulting in a decrease in design efficiency.


3) It does not support customized embedded processors, which are fixed modules and do not support design reusability.


6. Characteristics of software and hardware co-design method


Because of these shortcomings of traditional embedded system design methods, people began to explore new design methods to adapt to the high-speed development of embedded systems, this method is the software-hardware co-design method. As early as 1993, it has become a research direction and hotspot in the field of system-level design in embedded systems.


The characteristics of the software-hardware co-design method are as follows:


1) The software-hardware collaborative design technology adopts the idea of parallel design and collaborative design, which shortens the design and development cycle and greatly improves the design efficiency.


2) Software-hardware collaborative design adopts a unified tool and representation method, reasonably divides software and hardware, allocates system functions reasonably, weighs cost, performance, power consumption and other aspects, and obtains the most optimized design as much as possible.


3) Software-hardware co-design adopts the method of software-hardware co-simulation to conduct global design verification on the whole system.


Software-hardware co-design has greatly improved the abstraction level of the design, and broadened the coverage of the design. It can make the design of embedded systems more efficient and faster. Software-hardware co-design is a new design method and idea. It is not just a design technology, it is to link the design of software and hardware, so as to avoid the premature independence of these two parts of design. Software-hardware co-design technology is now in the development stage, and many theories are not yet mature. However, this technology has greatly improved the design efficiency of embedded systems, and has great research value and social significance.


7. The development process of software and hardware co-design


The main tasks of embedded system design include: system task description, system modeling, used to realize the functional requirements of the system; appropriate software and hardware division of the system to meet performance requirements, reduce cost and power consumption; system synergy And simulate the system implementation and specification. The purpose of software-hardware co-design is to make the various influencing factors of the system coordinate with each other to complete the system function.


1. System task description


To design an SOPC system, the first step is to clarify the requirements of the system, that is, the performance of the system and the functions to be realized, and then to model the system. The models of SOPC system mainly include finite state machine model, data flow graph model, task flow graph model, discrete event model, Petri net model and so on. Establish a common system function description method for software and hardware to solve the problem of unified description of the system. At present, the method of system description language is usually used. In this way, after the software and hardware are divided, it can be compiled and mapped into a hardware description language and a software implementation language, which provides a strong guarantee for the system's software and hardware to work together.


2. System hardware and software division


In the traditional embedded design method, the development process of software and hardware is separated, and there is a lack of communication between them. This makes the design efficiency of the system very low. Aiming at this shortcoming, a method of software-hardware co-design is proposed. In this method, the division of software-hardware system is one of the key steps in software-hardware co-design. The hardware implementation part of the system has a decisive effect on the performance of the system. Usually, the hardware implementation part is faster, but cost control also plays a decisive role in this part. The software implementation part of the system usually has great flexibility, which determines the flexibility of the system configuration, but it takes a certain amount of FPGA logic units and takes a certain amount of time. As shown in Table 1. Table 1 points out whether the system is implemented by hardware or software, which affects the chip area, power consumption, performance, and manpower and time resource requirements. A reasonable software-hardware co-design scheme plays an important role in the design of embedded systems. Reasonable division of software and hardware, on the basis of satisfying system functions, can give full play to the characteristics of fast hardware processing and flexible software control.


Influence factors of software and hardware design on the system


The result of the software and hardware division is to improve the system speed, reduce the area, reduce the cost and reduce the power consumption. However, software and hardware partitioning is usually a traditional problem. Since the partitioning problem itself is very difficult, and SOPC has a huge search space, the situation is even more severe. Today's automatic partitioning algorithms still cannot replace experienced designers. The method of division basically starts from two aspects: one is software-oriented, and the requirements of timing are met from software to hardware; the other is hardware-oriented, and costs are reduced from hardware to software. When dividing, it is necessary to consider various factors such as the architecture, granularity, and cost of hardware and software implementation of the entire target system. After the division is completed, the divided interface of the software and hardware system is generated, which is provided to the software and hardware for communication, verification and testing. Commonly used software and hardware cooperative partition algorithms include simulated annealing algorithm and genetic algorithm. The genetic algorithm and the simulated annealing algorithm are relatively complementary. The genetic annealing algorithm formed by combining the two algorithms will inherit the advantages of the two, and the performance in the division of software and hardware is very good. Now this intelligent algorithm is a software It is a research hotspot in the field of hardware partitioning algorithm.


3. Software and hardware synergy synthesis steps


After the software and hardware division is completed, the design and implementation of the software system and hardware system are carried out respectively. The stage of designing the partitioned system is called synthesis. The main task of this step is to convert the description of the partitioned system into a synthesizable hardware description and a compilable software program. Build a design translation process that includes implementation structure descriptions for software and hardware. For example, the divided description can be translated into Verilog HDL (hardware module) and C (software module). Software-hardware co-synthesis consists of the following three steps:


1) Allocation of processing units, which determines which processors, DSPs, and special hardware and other architecture-level units of the embedded system are composed;


2) Task assignment, which determines which functions in the system are implemented by the hardware processing unit, and which functions are implemented by the processor using software;


3) Task scheduling, which determines the start time and execution sequence of tasks assigned to each processing unit.


4. Software and hardware co-simulation


Software-hardware co-simulation verification is an evaluation stage for the correctness of the entire system design and the determination of performance indicators. In each stage of embedded system design, simulation verification can be divided into system-level simulation, behavior-level simulation, register transfer level (RTL level) simulation and gate-level simulation. System-level simulation is generally used to evaluate the overall function of the system and verify the correctness of the algorithm; behavior-level simulation can simulate the designed logic, but does not consider the characteristics of the target device, such as capacity, delay, etc., behavior Level simulation can use advanced statements, such as error statements, file read and write statements, floating point format, etc., but these statements are usually not implemented in the target device; register transfer level simulation checks whether the logic functions of each module are correct, and then , integrate the simulated modules together, and perform functional simulation of the entire system. The simulation at this stage does not include the time information of the hardware circuit, so the design can only be verified from the logic function; the gate-level simulation will use Synthesize the gate-level netlist generated after software synthesis or the gate-level model generated after implementation for simulation, without adding the simulation of the delay file.


Typical hardware-software co-simulation is usually run under Quartus II under the development environment of CPLD or FPGA. If some resources such as the IP core used by the system have been independently verified, the simulation verification of its gate level or RTL level can be omitted.


8.Embedded system hardware and software collaborative design summary


The software-hardware collaborative design method based on SOPC can grasp the complex system macroscopically, overcome the shortcomings of traditional design methods, fully tap the synergy between software and hardware, correctly divide the software and hardware of the system, and select the appropriate IP, establish a system design platform and verification platform, promote parallel development of software and hardware, reduce design risk, shorten the development cycle, and play an important role in the design of embedded systems. With the support of logic design and EDA tools, SOPC-based software-hardware co-design technology plays an increasingly important role in the design of embedded application systems, and will be the core technology in the field of IP-SOPC design in the future.


Embedded system has strong vitality, broad market and far-reaching application prospect make its development change with each passing day. In order to develop various embedded applications more quickly and effectively, it is of great academic and commercial value to study software-hardware co-design methods. Technologies such as system modeling, software and hardware division, and virtual prototypes are still key issues in embedded system design, and are constantly supplemented and developed with the development of microelectronics technology and computing technology.


The above is the joint design method of software and hardware for embedded systems introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have software and hardware function development needs for smart electronic products, you can rest assured to entrust them to us. We have rich experience in customized development of electronic products, and can evaluate the development cycle and IC price as soon as possible, and can also calculate PCBA quotations. We are a number of chip agents at home and abroad, including MCU, voice IC, Bluetooth IC and modules, wifi modules. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth wifi development, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS solutions, the development of Bluetooth audio, the development of children's toys, and the development of electronic education products.

  • TOP