Automobile intelligent cabin hardware simulation method and equipment based on simulator
Through the simulation method based on the simulation method, the problems of long development cycle and safety hazards are solved, and an efficient and safe development process is achieved.
Patent Information
- Application Number
- CN202510434148.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, the development cycle of automobile smart cockpit hardware is long, the development efficiency is low, and the actual hardware environment poses safety risks.
Through a simulator-based method, the simulation data of the peripheral device is generated using the simulator interface process, and sent to the simulation process through the communication framework, the control unit is instantiated and the read and write callback function of the peripheral is registered, so as to realize the data transmission and processing between the simulator interface process and the simulation process.
Improve development efficiency, ensure the safety of developers, and reduce the danger of the hardware environment.
Smart Images

Figure CN120449295A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software simulation technology, and in particular to a simulator-based automobile intelligent cockpit hardware simulation method, apparatus, device, and computer-readable storage medium. Background Art
[0002] With the rapid development of intelligent vehicles, the smart cockpit has become a key area for enhancing the driving experience. Smart cockpits integrate multiple advanced technologies, such as human-machine interaction systems, infotainment systems, and intelligent driver assistance systems. The development and testing of these programs is crucial to ensuring the stability, reliability, and user experience of cockpit functionality. Current smart cockpit program development and testing processes rely heavily on the actual cockpit hardware environment. Cockpit hardware includes complex components such as various sensors, displays, and controllers. This hardware is not only expensive but also limited in quantity. When developing and testing programs, developers need to use actual cockpit hardware to simulate real-world operating scenarios and verify program functionality and performance. However, due to the limited availability of cockpit hardware, developers have to use it in rotation, significantly lengthening the development cycle and reducing development efficiency.
[0003] Furthermore, the actual cockpit hardware environment presents certain risks. For one thing, the hardware systems within the vehicle cockpit involve electrical safety issues such as high voltage and high current. If developers accidentally touch hazardous areas during operation, personal injury could occur. Furthermore, when testing certain specialized functions, such as automated driving assistance systems, program failures or hardware anomalies could lead to serious safety incidents such as vehicle loss of control. Therefore, a method for simulating intelligent cockpit hardware is urgently needed. Summary of the Invention
[0004] The present application provides a simulator-based automotive intelligent cockpit hardware simulation method, device, equipment and computer-readable storage medium, which can solve the technical problems in the existing technology that the development cycle is greatly prolonged, the development efficiency is reduced, and the actual cockpit hardware environment has certain risks.
[0005] In a first aspect, an embodiment of the present application provides a vehicle intelligent cockpit hardware simulation method based on a simulator, characterized by comprising:
[0006] Acquire a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate a control unit;
[0007] Generate simulation data of peripheral devices through the simulator interface process and send it to the simulation process through the communication framework;
[0008] Instantiate the control unit through the simulation process and register the read and write callback functions of the peripherals;
[0009] transmitting data between the simulator interface process and the simulation process via the communication framework;
[0010] The analog data of the peripheral device is processed according to the read / write callback function and returned to the control unit program.
[0011] In conjunction with the first aspect, in one embodiment, generating simulation data of the peripheral device through the simulator interface process and sending it to the simulation process through the communication framework includes:
[0012] Start the peripheral device simulation module in the simulator interface process;
[0013] Subscribe to messages published by peripherals in the simulation process through the peripheral device simulation module;
[0014] Generate simulation data of peripheral devices according to preset configuration information;
[0015] Publishing simulation data of the peripheral device to the simulation process through the communication framework;
[0016] Determining whether a message issued by a peripheral device in the simulation process is received;
[0017] If the message is received, the message is decoded and processed.
[0018] In combination with the first aspect, in one embodiment, instantiating a control unit through the simulation process and registering a read / write callback function of a peripheral device includes:
[0019] Start the simulation process and create the control unit object;
[0020] Instantiating a peripheral object of the control unit through the simulation process;
[0021] A read callback function and a write callback function are called for the peripheral object to register the peripheral register address, wherein the read callback function is used to subscribe to the simulation data of the peripheral device in the simulator interface process, and the write callback function is used to publish the data written by the control unit program to the simulator interface process to enter the main loop of the simulation process to execute the translation and operation of the control unit program.
[0022] In conjunction with the first aspect, in one embodiment, transmitting data between the simulator interface process and the simulation process through the communication framework includes:
[0023] Define a message format for a communication framework, wherein the message format includes a device identifier, an operation command identifier, a reserved field, a data length, and a data payload;
[0024] encoding the simulation data of the peripheral device according to a preset configuration through the simulator interface process;
[0025] sending the encoded simulation data to the simulation process via the communication framework;
[0026] receiving and decoding the encoded simulation data through the simulation process;
[0027] Generate and encode response data according to the control unit program through the simulation process;
[0028] The response data is sent to the simulator interface process through the communication framework.
[0029] In combination with the first aspect, in one embodiment, processing the analog data of the peripheral device according to the read / write callback function and returning the data to the control unit program includes:
[0030] Detect whether the control unit program accesses the peripheral register address during the simulation process;
[0031] If access to the peripheral register address is detected, the read and write callback function is called;
[0032] receiving analog data of the peripheral device from the communication framework through the read callback function;
[0033] Returning the analog data of the peripheral device to the control unit program through the read callback function;
[0034] Acquire the data written by the control unit program through the write callback function;
[0035] The written data is published to the simulator interface process through the communication framework.
[0036] In conjunction with the first aspect, in one embodiment, obtaining the simulator interface process and the simulation process includes:
[0037] Start the simulator interface process and load the preset cockpit model configuration;
[0038] The image file and program file run by the simulator interface process configuration control unit;
[0039] Generate startup parameters of the simulation process through the simulator interface process;
[0040] Creating a simulation process through the simulator interface process according to the startup parameters;
[0041] Loading the image file and program file through the simulation process;
[0042] The running status of the simulation process is managed through the simulator interface process.
[0043] In combination with the first aspect, in one embodiment, instantiating a control unit through the simulation process and registering a read / write callback function of a peripheral device includes:
[0044] Create multiple instances of the control unit through the simulation process;
[0045] For each control unit instance, instantiate the corresponding peripheral object;
[0046] Subscribe to data published by other control unit instance peripherals through the communication framework;
[0047] Register the register address of each peripheral through the read and write callback function;
[0048] Publishing data of each control unit instance to other control unit instances via the communication framework;
[0049] The coordinated operation of multiple control unit programs is performed through the main loop of the simulation process.
[0050] In a second aspect, an embodiment of the present application provides a simulator-based vehicle intelligent cockpit hardware simulation device, the simulator-based vehicle intelligent cockpit hardware simulation device comprising:
[0051] An acquisition module, configured to acquire a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate a control unit;
[0052] A generating and sending module, configured to generate simulation data of peripheral devices through the simulator interface process and send the data to the simulation process through a communication framework;
[0053] An instance and registration module, for instantiating a control unit through the simulation process and registering read and write callback functions of peripherals;
[0054] A transmission module, configured to transmit data between the simulator interface process and the simulation process via the communication framework;
[0055] The processing and returning module is used to process the analog data of the peripheral device according to the read and write callback function and return the data to the control unit program.
[0056] In the third aspect, an embodiment of the present application provides a simulator-based automobile smart cockpit hardware simulation device, which includes a processor, a memory, and a simulator-based automobile smart cockpit hardware simulation program stored on the memory and executable by the processor. When the simulator-based automobile smart cockpit hardware simulation program is executed by the processor, the steps of the simulator-based automobile smart cockpit hardware simulation method as described above are implemented.
[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which is stored a simulator-based automobile intelligent cockpit hardware simulation program. When the simulator-based automobile intelligent cockpit hardware simulation program is executed by a processor, the steps of the simulator-based automobile intelligent cockpit hardware simulation method as described above are implemented.
[0058] The beneficial effects of the technical solutions provided in the embodiments of the present application include:
[0059] By obtaining a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate a control unit; the simulation data of peripheral devices are generated through the simulator interface process and sent to the simulation process through a communication framework; the control unit is instantiated through the simulation process and the read and write callback functions of the peripheral devices are registered; data is transmitted between the simulator interface process and the simulation process through the communication framework; the simulation data of the peripheral devices are processed according to the read and write callback functions and returned to the control unit program, the technical problems in related technologies such as a greatly lengthened development cycle, reduced development efficiency, and certain dangers in the actual cockpit hardware environment are solved, thereby ensuring the personal safety of developers and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a flowchart of the first embodiment of the simulator-based vehicle intelligent cockpit hardware simulation method of the present application;
[0061] Figure 2 For this application Figure 1 Detailed flow chart of step S20;
[0062] Figure 3 This is a functional module diagram of an embodiment of the simulator-based vehicle intelligent cockpit hardware simulation device of the present application;
[0063] Figure 4 This is a schematic diagram of the hardware structure of the simulator-based automotive intelligent cockpit hardware simulation device involved in the embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] First, some technical terms in this application are explained to facilitate those skilled in the art to understand this application.
[0066] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0067] In a first aspect, an embodiment of the present application provides a method for simulating automobile intelligent cockpit hardware based on a simulator.
[0068] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the vehicle intelligent cockpit hardware simulation method based on the simulator of this application. Figure 1 As shown in the figure, the simulator-based automotive intelligent cockpit hardware simulation method includes:
[0069] Step S10: Acquire a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate a control unit;
[0070] Exemplarily, upon receiving a user's instruction, the UI interactive interface program of the simulator is started, thereby obtaining a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate the control unit.
[0071] Specifically, obtaining the simulator interface process and the simulation process includes: starting the simulator interface process and loading a preset cockpit model configuration; configuring the image file and program file run by the control unit through the simulator interface process; generating startup parameters of the simulation process through the simulator interface process; creating a simulation process through the simulator interface process according to the startup parameters; loading the image file and program file through the simulation process; and managing the running status of the simulation process through the simulator interface process.
[0072] Exemplarily, upon receiving a user's instruction, the simulator's UI interactive interface program is started. In the UI interactive interface, the vehicle's intelligent cockpit hardware configuration information is obtained, including the preset cockpit model configuration, the kernel running on the SoC, the file system, the application image file, and the program file running on the MCU. A QEMU startup command is generated based on the configuration information, the QEMU startup command including parameters such as machine and kernel. A first QEMU process simulating the SoC and a second QEMU process simulating the MCU are created based on the QEMU startup command. The preset cockpit model configuration, the kernel running on the SoC, the file system, and the application image file are loaded through the first QEMU process, and the preset cockpit model configuration and the program file running on the MCU are loaded through the second QEMU process. The running status of the first and second QEMU processes is managed through the simulator interface process, and QEMU child processes are created sequentially. For example, in the UI interactive interface, start the "Startup Management Module"; the "Startup Management Module" subscribes to the status message published by the GPIO peripheral of the MCU in the simulator. The "Startup Management Module" polls the pin status published by the GPIO peripheral of the MCU. If the pin corresponding to the soc_A startup (assuming the third bit) is in the state 1, the qemu subprocess simulating soc_a is started. The "Startup Management Module" polls the pin status published by the GPIO peripheral of the MCU. If the pin corresponding to the soc_B startup (assuming the fourth bit) is in the state 1, the qemu subprocess simulating soc_b is started.
[0073] Step S20: Generate simulation data of peripheral devices through the simulator interface process and send it to the simulation process through the communication framework;
[0074] Exemplarily, simulation data of peripheral devices are generated based on a preset cockpit model configuration through a simulator interface process, and sent to a simulation process through a communication framework, wherein the communication framework publishes the simulation data of peripheral devices to the simulation process, and the peripheral device simulation module subscribes to messages published by peripheral devices in the simulation process through the communication framework.
[0075] In one embodiment, referring to Figure 2 , Figure 2 For this application Figure 1 The detailed flow chart of step S20 is as follows: Figure 2 As shown, step S20 includes:
[0076] Step S21: starting the peripheral device simulation module in the simulator interface process;
[0077] Step S22: subscribing to messages published by peripheral devices in the simulation process through the peripheral device simulation module;
[0078] Step S23: Generate simulation data of peripheral devices according to preset configuration information;
[0079] Step S24: publishing the simulation data of the peripheral device to the simulation process through the communication framework;
[0080] Step S25: determining whether a message issued by the peripheral device in the simulation process is received;
[0081] Step S26: If the message is received, the message is decoded and processed.
[0082] Exemplarily, in the GPS module interface within the UI interactive interface process, GPS simulation data is generated based on the configuration and published to the serial port controller peripheral of SoC_A, and the data published by the serial port controller peripheral of SoC_A is subscribed to. For example, the GPS simulation module is started within the UI interactive interface process. The GPS simulation module is initialized and subscribes to messages published by the serial port peripheral of soc_A in qemu. A publication topic for the GPS simulation module to publish GPS data is created. A polling loop for messages and UI configuration is entered. In the loop, the following steps are performed: Determine whether GPS simulation data is configured. If so, GPS data is published to the serial port peripheral of SoC_A in qemu; determine whether a message published by the serial port peripheral of SoC_A in qemu has been received. If received, the message is decoded and processed; and finally, determine whether to exit the polling loop. If not, determine whether GPS simulation data is configured.
[0083] Step S30: instantiating a control unit through the simulation process and registering a read and write callback function of the peripheral device;
[0084] Exemplarily, the first QEMU process and the second QEMU process are started, and the soc and mcu objects will be instantiated. When the soc and mcu objects are instantiated, the object_initialize_child function will be called to instantiate the peripheral objects of soc and mcu. In the instantiation of the peripheral object (such as the serial port controller), memory_region_init_io will be called to complete the registration of the read and write callback functions corresponding to the addresses of the peripheral registers. After qemu completes the initialization, it enters the main thread loop. Each virtual cpu has an independent thread to perform the tcg translation task. When the tcg (Tiny Code Generator, a module for translating machine code, such as translating aarch64 machine code into x86_64 machine code) process detects that the guest machine code (the machine code corresponding to the soc and mcu programs) accesses the register address of the peripheral, it enters the registered callback function.
[0085] In the registered callback function, in the register read callback function, subscribe to the messages of the simulated peripheral device in the UI interaction interface. In the register write callback function, publish the data written by the guest code for the simulated peripheral device to receive. The message format is defined as follows:
[0086] device_id: It is used to describe the id of the peripheral device. Each peripheral device will have a unique id.
[0087] opcode: corresponds to the operation command identifier of the peripheral device, such as read, write and other actions.
[0088] Reserve: The field is reserved for subsequent expansion.
[0089] Length: The length of the message payload.
[0090] Data: message payload.
[0091] Specifically, the instantiation of the control unit and registration of the read and write callback functions of the peripherals through the simulation process includes: starting the simulation process and creating a control unit object; instantiating the peripheral object of the control unit through the simulation process; calling the read callback function and the write callback function of the peripheral register address for the peripheral object, wherein the read callback function is used to subscribe to the simulation data of the peripheral device in the simulator interface process, and the write callback function is used to publish the data written by the control unit program to the simulator interface process, so as to enter the main loop of the simulation process to execute the translation and operation of the control unit program.
[0092] For example, start the QEMU emulator simulating SoC_A. Create and instantiate the SoC_A serial peripheral object. During the SoC_A serial peripheral initialization phase, subscribe to messages sent by the simulated GPS module. During the SoC_A serial peripheral initialization phase, create a publish topic for SoC_A serial port data transmission (from soc_a). Then enter the TCG loop, which reads the guest machine code and determines whether the guest machine code accesses a peripheral. If the guest machine code reads a peripheral register, the registered read callback function receives the simulated GPS data sent from the GPS module and returns the value to the TCG simulation. This is then returned to the guest program. If the guest machine code writes to the peripheral register, the registered write callback function publishes the written value to the GPS module via a message. For example, configure the GPS sensor and data transmission frequency, translate the guest machine code into host machine code, and execute the program. Determine whether to exit. If not, re-read the guest machine code.
[0093] Step S40: transmitting data between the simulator interface process and the simulation process through the communication framework;
[0094] Exemplarily, the peripheral device simulation data is configured in the UI interactive interface through the communication framework and sent to the soc and mcu peripherals simulated by qemu.
[0095] Specifically, the data transmission between the simulator interface process and the simulation process through the communication framework includes: defining a message format of the communication framework, wherein the message format includes a device identifier, an operation command identifier, a reserved field, a data length, and a data payload; encoding the simulation data of the peripheral device according to a preset configuration through the simulator interface process; sending the encoded simulation data to the simulation process through the communication framework; receiving and decoding the encoded simulation data through the simulation process; generating and encoding response data according to a control unit program through the simulation process; and sending the response data to the simulator interface process through the communication framework.
[0096] As an example, add a message. On the simulated ecu interface (the peripheral device interface is designed according to the different device forms, such as the steering wheel will design the steering wheel interface), click the message add button to configure the message device_id, opcode, reserve, length and other fields. To add a signal, click the Add Signal button on the created message. Configure the signal, length, start bit, data type, default value and other information in the message. After completing the signal configuration, you can click on the created message, layout to view the layout of the configured signal and confirm whether it is correct. In the register read callback function of the SoC peripheral object and the MCU peripheral object, subscribe to the peripheral device simulation data published by the simulator UI interaction interface process; in the register write callback function of the SoC peripheral object and the MCU peripheral object, publish the data written by the SoC program and the MCU program to the simulator UI interaction interface process.
[0097] Step S50: Processing the analog data of the peripheral device according to the read / write callback function and returning the data to the control unit program.
[0098] Exemplarily, data interaction between the first QEMU process, the second QEMU process and the simulator UI interaction interface process is implemented according to the publish-subscribe communication framework, completing the collaborative simulation operation of the SoC program and the MCU program.
[0099] Specifically, the processing of the simulation data of the peripheral device according to the read-write callback function and returning it to the control unit program includes: detecting whether the control unit program accesses the peripheral register address in the simulation process; if access to the peripheral register address is detected, calling the read-write callback function; receiving the simulation data of the peripheral device from the communication framework through the read callback function; returning the simulation data of the peripheral device to the control unit program through the read callback function; obtaining the data written by the control unit program through the write callback function; and publishing the written data to the simulator interface process through the communication framework.
[0100] Exemplarily, multiple control unit instances are created through a simulation process; corresponding peripheral objects are instantiated for each control unit instance; data published by peripherals of other control unit instances are subscribed to through a communication framework; the register address of each peripheral is registered through a read-write callback function; data of each control unit instance is published to other control unit instances through a communication framework; and the collaborative operation of multiple control unit programs is executed through the main loop of the simulation process.
[0101] In this embodiment, by obtaining a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate a control unit; the simulation data of peripheral devices are generated by the simulator interface process and sent to the simulation process through a communication framework; the control unit is instantiated by the simulation process and the read and write callback functions of the peripherals are registered; data is transmitted between the simulator interface process and the simulation process through the communication framework; the simulation data of the peripheral devices are processed according to the read and write callback functions and returned to the control unit program, thereby solving the technical problems in related technologies that the development cycle is greatly lengthened, the development efficiency is reduced, and the actual cockpit hardware environment has certain risks, thereby ensuring the personal safety of developers and improving development efficiency.
[0102] In a second aspect, an embodiment of the present application also provides a vehicle intelligent cockpit hardware simulation device based on a simulator.
[0103] In one embodiment, referring to Figure 3 , Figure 3 This is a functional module diagram of an embodiment of the vehicle intelligent cockpit hardware simulation device based on the simulator of this application. Figure 3 As shown in the figure, the simulator-based automotive intelligent cockpit hardware simulation device includes:
[0104] An acquisition module 10 is configured to acquire a simulator interface process and a simulation process, wherein the simulator interface process is configured to generate simulation data of peripheral devices, and the simulation process is configured to simulate a control unit;
[0105] A generating and sending module 20 is used to generate simulation data of peripheral devices through the simulator interface process and send it to the simulation process through the communication framework;
[0106] An instantiation and registration module 30, configured to instantiate a control unit through the simulation process and register read and write callback functions of peripherals;
[0107] A transmission module 40, configured to transmit data between the simulator interface process and the simulation process via the communication framework;
[0108] The processing and returning module 50 is used to process the analog data of the peripheral device according to the read and write callback function and return the data to the control unit program.
[0109] Furthermore, in one embodiment, the generating and sending module 20 is configured to:
[0110] Start the peripheral device simulation module in the simulator interface process;
[0111] Subscribe to messages published by peripherals in the simulation process through the peripheral device simulation module;
[0112] Generate simulation data of peripheral devices according to preset configuration information;
[0113] Publishing simulation data of the peripheral device to the simulation process through the communication framework;
[0114] Determining whether a message issued by a peripheral device in the simulation process is received;
[0115] If the message is received, the message is decoded and processed.
[0116] Furthermore, in one embodiment, the instance and registration module 30 is used to:
[0117] Start the simulation process and create the control unit object;
[0118] Instantiating a peripheral object of the control unit through the simulation process;
[0119] A read callback function and a write callback function are called for the peripheral object to register the peripheral register address, wherein the read callback function is used to subscribe to the simulation data of the peripheral device in the simulator interface process, and the write callback function is used to publish the data written by the control unit program to the simulator interface process to enter the main loop of the simulation process to execute the translation and operation of the control unit program.
[0120] Furthermore, in one embodiment, the transmission module 40 is configured to:
[0121] Define a message format for a communication framework, wherein the message format includes a device identifier, an operation command identifier, a reserved field, a data length, and a data payload;
[0122] encoding the simulation data of the peripheral device according to a preset configuration through the simulator interface process;
[0123] sending the encoded simulation data to the simulation process via the communication framework;
[0124] receiving and decoding the encoded simulation data through the simulation process;
[0125] Generate and encode response data according to the control unit program through the simulation process;
[0126] The response data is sent to the simulator interface process through the communication framework.
[0127] Furthermore, in one embodiment, the processing and returning module 50 is configured to:
[0128] Detect whether the control unit program accesses the peripheral register address during the simulation process;
[0129] If access to the peripheral register address is detected, the read and write callback function is called;
[0130] receiving analog data of the peripheral device from the communication framework through the read callback function;
[0131] Returning the analog data of the peripheral device to the control unit program through the read callback function;
[0132] Acquire the data written by the control unit program through the write callback function;
[0133] The written data is published to the simulator interface process through the communication framework.
[0134] Furthermore, in one embodiment, the acquisition module 10 is configured to:
[0135] Start the simulator interface process and load the preset cockpit model configuration;
[0136] The image file and program file run by the simulator interface process configuration control unit;
[0137] Generate startup parameters of the simulation process through the simulator interface process;
[0138] Creating a simulation process through the simulator interface process according to the startup parameters;
[0139] Loading the image file and program file through the simulation process;
[0140] The running status of the simulation process is managed through the simulator interface process.
[0141] Furthermore, in one embodiment, the instance and registration module 30 is used to:
[0142] Create multiple instances of the control unit through the simulation process;
[0143] For each control unit instance, instantiate the corresponding peripheral object;
[0144] Subscribe to data published by other control unit instance peripherals through the communication framework;
[0145] Register the register address of each peripheral through the read and write callback function;
[0146] Publishing data of each control unit instance to other control unit instances via the communication framework;
[0147] The coordinated operation of multiple control unit programs is performed through the main loop of the simulation process.
[0148] Among them, the functional implementation of each module in the above-mentioned simulator-based automobile intelligent cockpit hardware simulation device corresponds to the various steps in the above-mentioned simulator-based automobile intelligent cockpit hardware simulation method embodiment, and its functions and implementation process will not be repeated here one by one.
[0149] On the third aspect, an embodiment of the present application provides a simulator-based automotive intelligent cockpit hardware simulation device. The simulator-based automotive intelligent cockpit hardware simulation device can be a personal computer (PC), a laptop, a server, or other device with data processing capabilities.
[0150] Reference Figure 4 , Figure 4 The hardware structure diagram of the simulator-based intelligent cockpit hardware simulation device for automobiles involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the simulator-based intelligent cockpit hardware simulation device for automobiles may include a processor, a memory, a communication interface, and a communication bus.
[0151] The communication bus may be of any type and is used to interconnect the processor, memory, and communication interface.
[0152] Communication interfaces include input / output (I / O), physical, and logical interfaces, used to interconnect components within the simulator-based intelligent cockpit hardware simulation device. They also connect the simulator-based intelligent cockpit hardware simulation device to other devices (such as other computing devices or user devices). Physical interfaces can include Ethernet, fiber, or ATM interfaces; user devices can include displays and keyboards.
[0153] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0154] The processor may be a general-purpose processor, which may call a simulator-based intelligent vehicle cockpit hardware simulation program stored in a memory and execute the simulator-based intelligent vehicle cockpit hardware simulation method provided in an embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the simulator-based intelligent vehicle cockpit hardware simulation program is called may refer to the various embodiments of the simulator-based intelligent vehicle cockpit hardware simulation method of the present application, and will not be repeated here.
[0155] Those skilled in the art will understand that Figure 4 The hardware structure shown in the figure does not constitute a limitation to the present application and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0156] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0157] The computer-readable storage medium of the present application stores a simulator-based automobile smart cockpit hardware simulation program, wherein when the simulator-based automobile smart cockpit hardware simulation program is executed by a processor, the steps of the simulator-based automobile smart cockpit hardware simulation method as described above are implemented.
[0158] Among them, the method implemented when the simulator-based automobile intelligent cockpit hardware simulation program is executed can refer to the various embodiments of the simulator-based automobile intelligent cockpit hardware simulation method of this application, and will not be repeated here.
[0159] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0160] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit the "first", "second" and "third" to different types.
[0161] In the description of the embodiments of this application, the words "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary," "for example," or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.
[0162] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0163] In some processes described in the embodiments of the present application, multiple operations or steps are included that appear in a specific order. However, it should be understood that these operations or steps may not be performed in the order in which they appear in the embodiments of the present application or may be performed in parallel. The sequence numbers of the operations are only used to distinguish between different operations, and the sequence numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations or steps may be performed in sequence or in parallel, and these operations or steps may be combined.
[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device to execute the methods described in each embodiment of the present application.
[0165] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A vehicle intelligent cockpit hardware simulation method based on a simulator, characterized in that: include: Acquire a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate a control unit; Generate simulation data of peripheral devices through the simulator interface process and send it to the simulation process through the communication framework; Instantiate the control unit through the simulation process and register the read and write callback functions of the peripherals; transmitting data between the simulator interface process and the simulation process via the communication framework; The analog data of the peripheral device is processed according to the read / write callback function and returned to the control unit program.
2. The vehicle intelligent cockpit hardware simulation method based on a simulator according to claim 1, characterized in that: The generating of simulation data of the peripheral device through the simulator interface process and sending the simulation data to the simulation process through the communication framework includes: Start the peripheral device simulation module in the simulator interface process; Subscribe to messages published by peripherals in the simulation process through the peripheral device simulation module; Generate simulation data of peripheral devices according to preset configuration information; Publishing simulation data of the peripheral device to the simulation process through the communication framework; Determining whether a message issued by a peripheral device in the simulation process is received; If the message is received, the message is decoded and processed.
3. The vehicle intelligent cockpit hardware simulation method based on a simulator according to claim 1, characterized in that: The instantiating of the control unit through the simulation process and registering the read and write callback functions of the peripherals include: Start the simulation process and create the control unit object; Instantiating a peripheral object of the control unit through the simulation process; A read callback function and a write callback function are called for the peripheral object to register the peripheral register address, wherein the read callback function is used to subscribe to the simulation data of the peripheral device in the simulator interface process, and the write callback function is used to publish the data written by the control unit program to the simulator interface process to enter the main loop of the simulation process to execute the translation and operation of the control unit program.
4. The vehicle intelligent cockpit hardware simulation method based on a simulator according to claim 1, characterized in that: The transmitting of data between the simulator interface process and the simulation process through the communication framework includes: Define a message format for a communication framework, wherein the message format includes a device identifier, an operation command identifier, a reserved field, a data length, and a data payload; encoding the simulation data of the peripheral device according to a preset configuration through the simulator interface process; sending the encoded simulation data to the simulation process via the communication framework; receiving and decoding the encoded simulation data through the simulation process; Generate and encode response data according to the control unit program through the simulation process; The response data is sent to the simulator interface process through the communication framework.
5. The vehicle intelligent cockpit hardware simulation method based on a simulator according to claim 1, characterized in that: The processing of the analog data of the peripheral device according to the read / write callback function and returning the data to the control unit program includes: Detect whether the control unit program accesses the peripheral register address during the simulation process; If access to the peripheral register address is detected, the read and write callback function is called; receiving analog data of the peripheral device from the communication framework through the read callback function; Returning the analog data of the peripheral device to the control unit program through the read callback function; Acquire the data written by the control unit program through the write callback function; The written data is published to the simulator interface process through the communication framework.
6. The vehicle intelligent cockpit hardware simulation method based on a simulator according to claim 1, characterized in that: The obtaining of the simulator interface process and the simulation process includes: Start the simulator interface process and load the preset cockpit model configuration; The image file and program file run by the simulator interface process configuration control unit; Generate startup parameters of the simulation process through the simulator interface process; Creating a simulation process through the simulator interface process according to the startup parameters; Loading the image file and program file through the simulation process; The running status of the simulation process is managed through the simulator interface process.
7. The vehicle intelligent cockpit hardware simulation method based on a simulator according to claim 1, characterized in that: The instantiating of the control unit through the simulation process and registering the read and write callback functions of the peripherals include: Create multiple instances of the control unit through the simulation process; For each control unit instance, instantiate the corresponding peripheral object; Subscribe to data published by other control unit instance peripherals through the communication framework; Register the register address of each peripheral through the read and write callback function; Publishing data of each control unit instance to other control unit instances via the communication framework; The coordinated operation of multiple control unit programs is performed through the main loop of the simulation process.
8. A vehicle intelligent cockpit hardware simulation device based on a simulator, characterized in that: The simulator-based automobile intelligent cockpit hardware simulation device includes: An acquisition module, configured to acquire a simulator interface process and a simulation process, wherein the simulator interface process is used to generate simulation data of peripheral devices, and the simulation process is used to simulate a control unit; A generating and sending module, configured to generate simulation data of peripheral devices through the simulator interface process and send the data to the simulation process through a communication framework; An instance and registration module, for instantiating a control unit through the simulation process and registering read and write callback functions of peripherals; A transmission module, configured to transmit data between the simulator interface process and the simulation process via the communication framework; The processing and returning module is used to process the analog data of the peripheral device according to the read and write callback function and return the data to the control unit program.
9. A vehicle intelligent cockpit hardware simulation device based on a simulator, characterized in that: The simulator-based automobile intelligent cockpit hardware simulation device includes a processor, a memory, and a simulator-based automobile intelligent cockpit hardware simulation program stored on the memory and executable by the processor. When the simulator-based automobile intelligent cockpit hardware simulation program is executed by the processor, the steps of the simulator-based automobile intelligent cockpit hardware simulation method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a simulator-based automobile intelligent cockpit hardware simulation program, wherein when the simulator-based automobile intelligent cockpit hardware simulation program is executed by a processor, the steps of the simulator-based automobile intelligent cockpit hardware simulation method as described in any one of claims 1 to 7 are implemented.