| With the rapid development of new energy vehicles and autonomous driving technology,the automotive electronic and electrical architecture has also evolved.Centralized electronic and electrical architecture based on central computing and service-oriented software architecture have become the development trend.In the past,some distributed automotive electronic controllers were replaced by central processer,in which most of the software operation and logic control functions will be implemented.In the process of automobile software development,the simulator tool is usually used for verification and debugging.In this context,providing a set of simulation environment for centralized software architecture has practical significance for software development.In addition,the implementation of simulator based on virtualization technology can make the simulator independent of specific processor platform,and has good reliability,isolation and fault control mechanism.This paper designs and implements the vehicle simulation controller,including the simulator platform,VCU,VIU,ECU simulator.The simulator platform is based on arm-kvm virtual machine and provides the function of managing the simulator;VCU simulator is used to simulate the central processer and provide a simulation environment for running the software on the central processer;The VIU simulator is used to simulate the gateway and provide signal transmission protocol conversion and message forwarding functions;ECU simulator is used to simulate ECU behavior and send and receive can signal data.After building qemu/kvm virtual machine based on ARM processor,in order to improve the performance of the simulator platform,we first optimize the disk I/O performance,network I/O performance and real-time performance of KVM virtual machine.The optimized test results show that after the iothread mechanism is enabled,the disk I/O write performance of KVM is improved by about 21%,and the I/O read performance is improved by about 39%.After enabling Vhost,the network I/O transmission performance of KVM has been significantly improved.The number of transactions processed by UDP per second has increased by about 2.3 times,and the number of transactions processed by TCP per second has increased by about 3.8 times.After adding a real-time scheduler to the Linux kernel and improving the priority of processes in the client,the system delay time is significantly reduced.Then the simulator is implemented based on the optimized virtual machine platform to verify the signal data transmission between VCU simulator and ECU simulator,and test the CPU and memory utilization of the simulator under different data volumes to verify that it can meet the application requirements.Software developers can no longer rely entirely on the real central processer hardware,which is convenient for the early development and testing of software. |