Method and system for testing an electronic control device on a simulator and simulator
By mapping the hardware and software configurations of electronic control devices onto a simulator, and utilizing the data transfer function of the simulator's computing unit and virtual sub-computing units, the testing challenges of control devices with complex hardware structures are solved, achieving an automated and efficient testing process.
Patent Information
- Application Number
- CN202310945041.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-09-23
- Filing Date
- 2023-07-28
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-07-28
AI Technical Summary
Existing technologies are insufficient for effectively testing electronic control devices with complex hardware structures, especially those containing multiple different types of computing units, which complicates software development and testing.
By mapping the hardware and software configurations of electronic control devices onto a simulator, the data transfer function of the simulator's computing unit is used to replace the external interface function of the actual control device, and different types of computing units are mapped to virtual sub-computing units to achieve automated testing.
It enables automated testing of electronic control devices with complex hardware structures, reduces reliance on the actual control device structure, and improves testing efficiency and accuracy.
Smart Images

Figure CN117762051B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The invention relates to a method for testing at least one electronic control device as a virtual control device on a simulator having at least one simulator arithmetic unit, wherein the electronic control device has a hardware configuration comprising the at least one arithmetic unit and an external interface for exchanging data and a software configuration assigned to the hardware configuration, the software configuration comprising internal functions and external interface functions, the electronic control device being mapped to a virtual control device in such a way that the internal functions of the software configuration of the electronic control device assume the internal functions of the software configuration of the virtual control device and in such a way that the external interface functions of the electronic control device are replaced by data transfer functions of a software configuration of the simulator arithmetic unit, the software configuration of the virtual control device being translated into executable code for the simulator arithmetic unit and executed on the simulator. Furthermore, the invention also relates to a system for testing at least one electronic control device as a virtual control device on a simulator, wherein the system comprises a simulator and a hardware configuration of the electronic control device and a software configuration assigned to the hardware configuration, the simulator comprising the at least one simulator arithmetic unit, the hardware configuration of the electronic control device comprising at least one arithmetic unit and an external interface for exchanging data, the software configuration comprising internal functions and external interface functions, the electronic control device being mapped to a virtual control device by the simulator in such a way that the internal functions of the software configuration of the electronic control device assume the internal functions of the software configuration of the virtual control device and in such a way that the external interface functions of the electronic control device are replaced by data transfer functions of a software configuration of the simulator arithmetic unit, the software configuration of the virtual control device being translated into executable code for the simulator arithmetic unit and executed on the simulator in the operating state of the simulator. Furthermore, the invention also relates to a corresponding simulator and a computer program relating thereto. BACKGROUND
[0002] The method and system of the aforementioned type are used in the field of control device development, more precisely in the field of development and testing of the software of control devices. A control device is a small computer with an external interface, via which the control device is operatively connected to a technical-physical process and / or also to other control devices; from the perspective of the control device, data can then be exchanged in both the sending and the receiving direction via the external interface. The external interface can be a very simple process interface for exchanging measurement data only (for example an analog current interface or a digital PWM interface), but also a high-level communication interface, for example implementing a (field) bus protocol (for example CAN, TTP, FlexRay, Ethernet). The external interface can have several of the mentioned interface functions. The operation of the hardware- configured external interface takes place in accordance with the software- configured external interface function of the control device.
[0003] The received signals or messages are pre-processed, analyzed by the arithmetic unit of the control device, further processed, for example, by control-technical algorithms, and the corresponding calculated variables are then output as control device output variables via the external interface. This function of the software- configured control device is referred to here as an internal function, which is essentially related to the function implemented by the arithmetic unit. The field of application of electronic control devices is very diverse, for example in the automotive sector, in aerospace and generally in industrial applications (for example in the process industry). The arithmetic unit in electronic control devices that are still widely used today is usually a microcontroller, a digital signal processor, sometimes also a programmable circuit structure (for example in the form of a field programmable gate (FPGA)).
[0004] The software development for control devices is often mapped in a so-called V-cycle. In the V-cycle, different development phases are experienced: starting from functional tests (model in the loop) on control algorithms, for example, without reference to later control device hardware; via the testing of program codes for later series control devices, which are of interest here, where the series control device does not yet exist but is only mapped as a virtual control device in software (software in the loop, SIL); via the testing of physically existing series control devices with series control device program codes in a completely or partially simulated environment (hardware in the loop, HIL); up to the last testing of series control devices in the actual physical environment. This is a chain of development steps that is created and applied as a standard in industry, which has proven to reliably develop and intensively test the software for electronic control devices.
[0005] The applicant supports the different phases of the V-cycle by corresponding hardware and software tools. The method, system and simulator considered here relate to the application case of software-in-the-loop testing, which the applicant supports with the VEOS environment (see product brochure "VEOS Platform for PC-based simulation of models and ECU network communication", February 2020, dSPACE GmbH).
[0006] The electronic control device is mapped onto the virtual control device in such a way that the internal functions of the software configuration of the electronic control device take over as internal functions of the software configuration of the virtual control device: That is, the program code considered for the electronic control device is actually tested in the scope of the test of the virtual control device by executing the program code on the simulator computing unit after the program code has been compiled for the simulator computing unit.
[0007] Furthermore, the external interface functions of the electronic control device, which are then related to the external interface of the electronic control device, are replaced by data transfer functions of the software configuration of the simulator computing unit, wherein the software configuration of the virtual control device is translated into executable code for the simulator computing unit and the code is executed on the simulator. This can mean, for example: The sending of a CAN bus message, that is, the invocation of an external interface function of the electronic control device, is replaced by a corresponding writing of an instruction into a region of a shared memory, which is accessible not only to the virtual control device on the simulator computing unit but also to a (also software-implemented) communication partner, which is not further explored here. This means: The invocation of a driver component for the external interface on the real electronic control device is not passed on to the virtual control device on the simulator, but is replaced by a data transfer function of the software configuration of the simulator computing unit.
[0008] If a plurality of electronic control devices are to be tested, for example because they jointly form an in-vehicle electrical system of a motor vehicle that is of interest and here influence one another, then each of the control devices is described by a hardware configuration and a software configuration, that is to say simply by describing the existing hardware components and the software components that are provided for them. Each of the electronic control devices is then mapped onto a virtual control device on the simulator. In terms of software, the different virtual control devices themselves form a unit each on the simulator, but they can still be executed for example all on the same simulator arithmetic unit of the simulator. It is also possible that different virtual control devices are calculated on different simulator arithmetic units of the simulator if the simulator has a plurality of arithmetic units (for example a plurality of processor modules, a plurality of cores of one processor). Depending on the technical implementation, the data transfer functions also vary with which different virtual control devices can exchange information with one another on the simulator. This approach has different advantages, in particular because the structure of the combination of electronic control devices to be tested in the real world is retained in the virtual world of the simulator and in the virtual control devices implemented here.
[0009] Increasingly, control devices are being applied that have a significantly more complex structure in terms of hardware, which have for example not only a microcontroller or a digital signal processor and external interfaces, but also a plurality of different arithmetic units that are based on completely different technologies and are also usually implemented integrally as a system on a chip (SoC). SUMMARY
[0010] The task of the present application is to provide an automatic testing possibility for such electronic control devices having different types of different arithmetic units, which enables the handling of complex hardware structures and the transfer of the structure to a simulator in a simple and automatic manner.
[0011] The task is solved in the method described at the outset for testing at least one electronic control device as a virtual control device on a simulator having at least one simulator arithmetic unit, in that the hardware configuration of the electronic control device has at least a first arithmetic unit and a second arithmetic unit of different types and the software configuration comprises at least internal functions for the first arithmetic unit and the second arithmetic unit, wherein at least the internal functions of the first arithmetic unit call internal functions of the internal functions of the second arithmetic unit. Important in this application is that the different arithmetic units of an electronic control device utilize one another, that is to say that the arithmetic units use and call internal functions provided by the respective arithmetic unit.
[0012] For example, it is possible that the first arithmetic unit is a "normal" CPU (for example an ARM-CPU of the Cortex A type). This CPU utilizes the internal functionality of the second arithmetic unit, in which for example a matrix accelerator is involved. In this respect there are then two arithmetic units of different types. In other words, this means that there is a data exchange between the first arithmetic unit and the second arithmetic unit, the first arithmetic unit informs the second arithmetic unit for example: which data the second arithmetic unit should utilize to execute which function, and the second arithmetic unit provides the result of this application of its internal functionality back to the first arithmetic unit as a result.
[0013] According to the application it is furthermore provided that a description of the hardware configuration and the software configuration of the electronic control device is provided, which description includes the assignment of internal functionalities to the arithmetic units and the internal functionalities themselves. This simply means that the description generally names the components of the hardware configuration of the control device; and the description also names the software configuration in the form of internal functionalities on the respective arithmetic units of the hardware configuration of the control device, so that it is clear which components of the hardware configuration and which components of the software configuration or rather which internal functionalities are there provided for execution.
[0014] The method according to the design of the application furthermore provides that each arithmetic unit of each type with the assigned internal functionalities is mapped onto a virtual sub-arithmetic unit of the respective type by means of the analysis of the description of the electronic control device, wherein the internal functionalities of the mapped arithmetic unit are transferred into the executable internal functionalities of the virtual sub-arithmetic unit on the simulator arithmetic unit. By the term "virtual sub-arithmetic unit" it is clarified that from the user's point of view the electronic control device is furthermore transferred by the method onto a unique virtual control device, but the virtual control device has virtual sub-arithmetic units, which take into account the case that the electronic control device has multiple arithmetic units. The aim is therefore pursued that even if the electronic control device with multiple arithmetic units is complex in structure, the user is nevertheless provided with the same construction of the mapping on the simulator.
[0015] According to the design of the method according to the application, it is furthermore provided that by means of the analysis of the provided internal functions of the first and second arithmetic units it is determined which arithmetic units exchange data with one another by accessing internal functions of another arithmetic unit, and the access to the internal functions of the other arithmetic unit is replaced by a data transfer function configured by the software of the simulator arithmetic unit. The prerequisite for this is that in the analysis step it is known which internal functions the different arithmetic units essentially have. Depending on the type of arithmetic unit, in the analysis step the respective syntax of the respective arithmetic unit configured by the software must be known. Depending on the format in which the software configuration of the respective arithmetic unit is present, in the analysis the syntax of the internal functions must be known on the level of the high-level programming language or, if necessary, also in the binary code, etc.
[0016] In the system described at the outset the task is accordingly solved by the fact that the hardware configuration of the electronic control device has at least a first arithmetic unit and a second arithmetic unit of different types, the software configuration of the electronic control device comprises at least internal functions for the first and second arithmetic units, wherein at least the internal functions of the first arithmetic unit call internal functions of the internal functions of the second arithmetic unit, the simulator obtains a description of the hardware configuration and the software configuration of the electronic control device, which description comprises the assignment of the internal functions of the software configuration of the electronic control device to the arithmetic units of the electronic control device and the internal functions of the arithmetic units of the electronic control device themselves, the simulator maps each arithmetic unit of each type of the electronic control device having the assigned internal functions onto a virtual sub-arithmetic unit of the respective type by means of the analysis of the description of the electronic control device, the internal functions of the electronic control device of the mapped arithmetic unit are transferred into the executable internal functions of the virtual sub-arithmetic unit on the simulator arithmetic unit, and the simulator determines which arithmetic units of the electronic control device exchange data with one another by accessing internal functions of another arithmetic unit of the electronic control device by means of the analysis of the provided internal functions of the first arithmetic unit of the electronic control device and the second arithmetic unit of the electronic control device, and in the virtual control device the access to the internal functions of the other arithmetic unit is replaced by a data transfer function configured by the software of the simulator arithmetic unit.
[0017] Accordingly, the application is solved by means of the simulator of the system which executes the described method.
[0018] As a result, it is possible with the implementation of the method, the system and the simulator according to the invention to automatically map a control device having a complex hardware configuration comprising a plurality of arithmetic units onto a virtual control device having a complex internal structure comprising a plurality of virtual sub-arithmetic units, wherein the user of the automatically implemented method does not have to take care of the complex internal structure of the real control device onto the corresponding components of the virtual control device himself, which is time-consuming and also prone to errors. With the method it is possible to check whether a program code, i.e. exactly the program code which implements the internal functions of the electronic control device, has the expected functionality and the expected behavior in the case where the electronic control device does not actually exist. In a further method step, the behavior of the internal functions on the virtual sub-arithmetic units can be compared with the expected behavior, and in the case of a deviation of the actual behavior from the expected behavior, the deviation is signaled outwardly by the simulator and, if necessary, also recorded by protocol.
[0019] The different types of arithmetic units of the real control device can be, for example, processors (CPU), microcontrollers (µC), graphics processors (GPU), programmable logic gates (FPGA), neural network accelerators (NNA), matrix accelerators (MACC) and security chips (e.g. functions for encryption, key database, etc.).
[0020] A preferred design of the method, the system and the simulator is characterized in that a plurality of arithmetic units of the same type of the electronic control device are mapped onto exactly one virtual sub-arithmetic unit of this type, in particular all arithmetic units of the same type of the electronic control device are mapped onto exactly one virtual sub-arithmetic unit of this type. This means, for example, that a plurality of graphics processors of the electronic control device are mapped onto one virtual sub-arithmetic unit, which contributes to improving the clarity of the structure of the entire virtual control device, but can also contribute to more economically implementing the virtual control device (smaller code size, fewer required simulation modules).
[0021] In a further preferred design of the method, system and simulator it is provided that the internal function transfer of the mapped arithmetic unit of the electronic control device into the executable internal function of the virtual sub-arithmetic unit on the simulator arithmetic unit comprises for the mapped arithmetic unit of the electronic control device the use of a simulation module which is executable on the simulator arithmetic unit. Here, for example, simulation modules can be involved which are frequently provided by the manufacturer of the real arithmetic unit of the electronic control device, for example in the scope of a software development environment (software development kit, SDK) for the respective arithmetic unit. It is precisely in this case that it is then provided that a plurality of arithmetic units of the same type of the electronic control device are mapped onto exactly one virtual sub-arithmetic unit of this type, so that a plurality of instances of the simulation module must not be run in parallel (and if necessary also purchased and licensed).
[0022] A further extension of the method, system and simulator is characterized in that the internal function of the internal function of the second arithmetic unit called by the internal function of the first arithmetic unit involves a loading of data from a memory area of the second arithmetic unit or a storing of data into this memory area.
[0023] A preferred design of the method, system and simulator furthermore provides that the analysis of the provided internal functions of the first and second arithmetic units is implemented on the basis of a binary code executable on the electronic control device of the internal functions and / or on the basis of a high-level language source code of the internal functions. The analysis is automatically implemented by a corresponding syntax analysis of the corresponding binary code or high-level language source code.
[0024] In a further preferred design of the method, system and simulator, each virtual sub-arithmetic unit is represented as a block, i.e. as a block of a signal flow diagram in the form of a block diagram, for a computer-based graphical simulation environment, in particular for the computer-based graphical simulation environment of the simulator.
[0025] In connection with the representation of the virtual sub-arithmetic units as blocks, it is provided in a further preferred design of the method, system and simulator that the blocks of the virtual arithmetic units are represented with data transfer ports on the respective blocks, whose arithmetic units have been identified as being connected to one another for data exchange, wherein the data transfer is represented by signal lines connecting the data transfer ports of the virtual arithmetic units. Thereby, an intuitive understanding of the action relationships between the different virtual sub-arithmetic units is produced, as the user is accustomed to seeing from block diagram sketches.
[0026] The task is also solved by a computer program comprising instructions which, when the program is executed by a simulator operating unit of a simulator, cause the simulator operating unit to perform the previously described method for testing a virtual control device. BRIEF DESCRIPTION OF DRAWINGS
[0027] In detail, there are now various possibilities to design and improve the method according to the invention, the system according to the invention and the simulator according to the invention. For this purpose, reference is made to the following description of embodiments in connection with the drawings. In the drawings:
[0028] Figure 1 The method, the system and the simulator for testing electronic control devices as virtual control devices are shown schematically, wherein each electronic control device has only one operating unit;
[0029] Figure 2 The method, the system and the simulator for testing electronic control devices as virtual control devices according to the invention are shown schematically, wherein the electronic control devices have multiple operating units and are automatically mapped onto the virtual control devices in a hold structure;
[0030] Figure 3 A complex electronic control device with different types of operating units is shown schematically;
[0031] Figure 4 The mapping of an electronic control device according to Figure 3 onto a virtual control device is shown schematically; and
[0032] Figure 5 The combination of five virtual control devices is shown schematically, one of the virtual control devices having multiple virtual sub-operating units. DETAILED DESCRIPTION
[0033] In Figures 1 to 5 , the method 1 for testing at least one electronic control device 2 as a virtual control device 3 on a simulator 4 having at least one simulator operating unit 5 is shown in its entirety or also only in different aspects, respectively. Likewise and in the sense, the corresponding system 4, 6, 7 and the corresponding simulator 4 are mapped. Everything that is implemented in the following with regard to the method 1 applies likewise and in the sense also to the system 4, 6, 7 and the simulator 4.
[0034] The method 1 comprises not only testing the virtual control device 3 on the simulator 4, but also previous steps in order to obtain the real electronic control device 2 as a virtual control device 3 in general. The aim is to test the software of the real electronic control device 2 at least partially on the simulator 4, which is generally independent of the hardware of the control device 2; the simulator 4 can be a PC in the simplest case. However, the interesting feature of the test method 1 described here is that the software of the series of control devices 2, which can only exist at a much later point in time, can be tested in advance even without the original hardware of the control device 2.
[0035] In any case, the electronic control device 2 has a hardware configuration 6 comprising an arithmetic unit 6a and an external interface 6b for exchanging data with communication partners outside the control device 2 and a software configuration 7 which is assigned to the hardware configuration 6. The hardware configuration 6 and the assigned software configuration 7 are thus hardware-related and software-related equipment features of the electronic control device 2.
[0036] Figure 1 A simple case is shown, the two electronic control devices 2 shown each having only one arithmetic unit 6a. It is pointed out here that further control devices 2 can also be present, as is common for example in control device combinations in motor vehicles. The control devices 2 themselves and the components of the control devices 2 are each denoted by the same reference signs, but this is unimportant here, the relevant meanings emerging without problems.
[0037] The software configuration 7 comprises an internal function 7a and an external interface function 7b. The two electronic control devices 2 are communicatively connected to one another via their respective external interfaces 6b.
[0038] The electronic control device 2 is mapped onto the virtual control device 3 (dashed line running from left to right in Figure 1 ), in such a way that the internal function 7a of the software configuration 7 of the electronic control device 2 takes over as the internal function 8a of the software configuration 8 of the virtual control device 3. If the arithmetic unit 6a of the control device 2 is a microcontroller, its internal function 7a (for example a control algorithm) exists in C code, and the simulator arithmetic unit 5 of the simulator 4 is an x86 processor, it is possible to complete the C code of the control device 2 in such a way, namely to compile the C code for the target hardware, namely the x86 processor of the simulator 4, so that the internal function 7a of the control device 2 can actually be tested with the virtual control device 3 without changes.
[0039] Furthermore, the electronic control device 2 is mapped onto the virtual control device 3 in such a way that the external interface function 7b of the electronic control device 2 is replaced by a data transfer function 9a of the software configuration 10 of the simulator arithmetic unit 5, wherein the software configuration 8 of the virtual control device 3 is translated into executable code for the simulator arithmetic unit 5 and executed on the simulator 4. In the case shown in Figure 1 the external interface function 7b of the electronic control device 2 is a driver function of a serial field bus according to the CAN (Controller Area Network) standard. This function is not transferred onto the simulator 4, since the hardware equipment of the simulator does not have features relevant to this. Instead, a means for data exchange is used, which is present on the simulator 4: this is the data transfer function 9a of the software configuration 10 of the simulator arithmetic unit 5, which uses a shared memory solution here, see Figure 1 the right.
[0040] The translation of the software configuration 8 of the virtual control device 3 into executable code for the simulator arithmetic unit 5 and the execution of this code on the simulator 4 enables the internal functions 7a of the test control device 2 to be tested in any case, without the control device 2 actually having to be present. The results achieved on the simulator 4 when the code is executed can be compared with the expected behaviour and thus deficiencies in the internal functions 7a of the software configuration 7 of the electronic control device 2 can be revealed (even automatically).
[0041] In Figure 2 a more complex and particularly interesting case is now shown in which the hardware configuration 6 of the electronic control device 2 has at least a first arithmetic unit 6a1, a second arithmetic unit 6a2 and a third arithmetic unit 6a3 of different types; it is important only that more than one arithmetic unit is present. This is increasingly the case in modern control device architectures, the trend being to concentrate the arithmetic power on one circuit board, and even often on one complex chip (so-called SoC solutions). When testing, the user of the method 1 for testing complex electronic control devices 2 still wants to run, regardless of how complex the internal structure of the electronic control device 2 or how complex the hardware configuration 6 is, only "the" electronic control device 2, the outer boundary of which is in the form of the external interface 6b.
[0042] The plurality of arithmetic units 6a1, 6a2, 6a3 of the electronic control device 2 means that the software configuration 7 of the electronic control device 2 comprises at least internal functions 7a1, 7a2, 7a3 for the first arithmetic unit 6a1 and the second arithmetic unit 6a2 and, of course, also for the third arithmetic unit 6a3, wherein at least the internal functions 7a1 of the first arithmetic unit 6a1 call 11 internal functions f_i of the internal functions 7a2 of the second arithmetic unit 6a2. There is then no longer only a data exchange with external communication partners of the control device 2, but also a data exchange between the plurality of arithmetic units 6a1, 6a2 of the control device 2.
[0043] It is further provided in the method 1 that a description 12 of the hardware configuration 6 and the software configuration 7 of the electronic control device 2 is provided 15, which description comprises the assignment 13 of the internal functions 7a1, 7a2, 7a3 of the software configuration 7 of the electronic control device 2 to the arithmetic units 6a1, 6a2, 6a3 of the electronic control device 2; and that the internal functions 7a1, 7a2, 7a3 of the arithmetic units 6a1, 6a2, 6a3 of the electronic control device 2 themselves are also provided 15.
[0044] It is further provided in the method 1 that a description 12 of the hardware configuration 6 and the software configuration 7 of the electronic control device 2 is provided 15, which description comprises the assignment 13 of the internal functions 7a1, 7a2, 7a3 of the software configuration 7 of the electronic control device 2 to the arithmetic units 6a1, 6a2, 6a3 of the electronic control device 2; and that the internal functions 7a1, 7a2, 7a3 of the arithmetic units 6a1, 6a2, 6a3 of the electronic control device 2 themselves are also provided 15.
[0045] Finally, it is determined by means of the analysis processing 14 of the provided internal functions 7a1, 7a2, 7a3 of the first arithmetic unit 6a1 of the electronic control device 2 and of the second arithmetic unit 6a2 of the electronic control device 2 (and also of the third arithmetic unit 6a3 of the electronic control device 2 in the example according to Figure 2 which arithmetic units 6a1, 6a2, 6a3 of the electronic control device 2 exchange data with one another by accessing internal functions f_i of another arithmetic unit 6a1, 6a2, 6a3 of the electronic control device 2. The access 11 to the internal functions f_i of another arithmetic unit 6a1, 6a2, 6a3 in the virtual control device 3 is replaced by the (internal) data transfer function 9b of the software configuration 7 of the simulator arithmetic unit 5.
[0046] As a result, even in the case of a complex control device 2, a corresponding virtual control device 3 is now generated by an automatic method, which has sub-computation units 13.1, 13.2, 13.3 with (internal) data transfer functions 9b of the software configuration 7 of the simulator computation unit 5, but the user does not have to actively concern himself with the implementation.
[0047] In Figure 3 a complex electronic control device 2 is shown with different types of computation units 6a, in this case this is a processor (CPU), a microcontroller (µC), a graphics processor (GPU), a programmable logic gate (FPGA), a neural network accelerator (NNA), a matrix accelerator (MACC). Furthermore, the control device 2 has a plurality of external interfaces 6b in the form of an Ethernet interface (ETH), which provide a corresponding bandwidth, so that a high data transfer from and to the computation units 6a, if necessary, can be mastered.
[0048] Figure 3 and 4 a variant of the method 1 is shown, in which the electronic control device 2 according to Figure 3 is transferred to the corresponding virtual control device 3. The peculiarity here is that a plurality of computation units 6a of the same type of the electronic control device 2, namely a processor (CPU), a microcontroller (µC), a graphics processor (GPU), a programmable logic gate (FPGA), a neural network accelerator (NNA) and a matrix accelerator (MACC), are mapped to exactly one virtual sub-computation unit 13.1, 13.2, 13.3, 13.4, 13.5 and 13.6 of this type, in fact all computation units 6a of the same type of the electronic control device 2 have been mapped to exactly one virtual sub-computation unit 13 of this type. Figure 3 According to the dashed boxes it is shown: Which computation units 6a of the same type of the electronic control device 2 are mapped to which virtual sub-computation units 13.
[0049] Figure 4 The generated virtual control device 3 is shown. For reasons of clarity, the internal functions of the electronic control device 2 and the internal functions of the virtual control device 3 are not explicitly shown. In Figure 4 it can be seen that which sub-computation units 13.1 and 13.3 and 13.1 and 13.4 exchange data via (internal) data transfer functions 9b.
[0050] Figure 4It is further shown that the internal functionality of such type of mapped operation units 6a of the electronic control device 2, i.e. graphic processors (GPU) and programmable logic gates (FPGA), is transferred into the executable internal functionality of the virtual sub-operation units 13.3, 13.4 on the simulator operation unit 5, including the use of simulation modules 17.1, 17.2 executable on the simulator operation unit 5 for such type of mapped operation units of the electronic control device 2, i.e. graphic processors (GPU) and programmable logic gates (FPGA). The code for programming such special chips cannot easily be transferred onto the simulator operation unit 5 or cannot be implemented with the mechanisms of the software configuration 10 of the simulator operation unit 5. The manufacturers of special types of operation units often provide simulators for standard computers, which enable the execution of the code of the special type of operation unit on the standard computer. Such tools are applied here as the mentioned simulation modules 17.1, 17.2.
[0051] What happens in the implementation of method 1 is that an internal function f_i of the internal functionality 7a2 of the second operation unit 6a2, which is called by the internal functionality 7a1 of the first operation unit 6a1, involves a loading of data from or a storing of data into a memory area of the second operation unit 6a2 (see generally Figure 2 ). If the first operation unit 6a1 is for example a processor (CPU) and the second operation unit 6a2 is for example an acceleration module of any type (accelerator), the call can look like the following in pseudo code:
[0052] First operation unit 6a1 (CPU):
[0053] …
[0054] / / Release the data to be processed "Source"
[0055] CopyToAccelerator(Source[])
[0056] / / Start the internal functionality (kernel) on the second operation unit
[0057] / / (accelerator) specify the result location "Target"
[0058] RunAccelerator(Target[], kernel)
[0059] …
[0060] / * Release control * /
[0061] …
[0062] listenOrWaitFor accelerator
[0063] / / Copy result from Target for further use in first arithmetic unit 6a1
[0064] CopyFromAccelerator(Target)
[0065] second arithmetic unit 6a2 (accelerator):
[0066] / / Function "kernel" on accelerator
[0067] function kernel(in,out):
[0068] do something with (in)
[0069] assign result to out
[0070] The instructions used on the first arithmetic unit 6a1, i.e. on the CPU, for accessing the function of the second arithmetic unit 6a2 are often provided by the software development environment of the manufacturer of the second arithmetic unit 6a2, here then the accelerator. The data exchange between the arithmetic units can be implemented, for example, by means of a shared memory, which both arithmetic units 6a1, 6a2 can access.
[0071] An example of the interaction between the different arithmetic units 6a1, 6a2 according to the pseudo code is meaningful, since this makes it possible to understand that the method 1 carries out the analysis process 14 of the provided internal functions 7a1, 7a2, 7a3 of the first arithmetic unit 6a1 and the second arithmetic unit 6a2 and the third arithmetic unit 6a3 on the basis of the binary code of the internal functions 7a1, 7a2, 7a3 which are able to run on the electronic control device 2 and / or on the basis of the high-level language source code of the internal functions 7a1, 7a2, 7a3. In the example shown, the analysis process 14 is implemented with an analysis tool which analyses the source code. This automatic analysis tool knows the respective functions which cause the data transfer or the call of the internal functions 7a1, 7a2, 7a3 in the arithmetic units 6a1, 6a2, 6a3. In the example above, the analysis tool which implements the analysis process 14 has to search the source code, i.e. in addition the instructions "CopyToAccelerator" and "runAccelerator".
[0072] Figure 5It is shown that in the method 1 and the simulator 4 it is particularly provided that each virtual sub-operation unit 13.1, 13.2, 13.3, 13.4, 13.5 is represented as a block 18 for the computer-based graphical simulation environment 21, in particular for the computer-based graphical simulation environment of the simulator 4, as is known from the block diagram illustration.
[0073] Figure 5 It is shown that the combination comprises five virtual control devices 3, of which the centrally shown virtual control device 3 has a plurality of virtual sub-operation units 13.1, 13.2, 13.3, 13.4, 13.5. In Figure 5 It is also shown in the Figure 5 that each block 18 of the virtual sub-operation units 13.1, 13.2, 13.3, 13.4, 13.5 is represented with a data transfer port 19 on the respective block 18, which virtual sub-operation units 13.1, 13.2, 13.3, 13.4, 13.5 have been identified as being connected to one another for data exchange, wherein the data transfer is represented by a signal line 20 connecting the data transfer ports 19 of the virtual sub-operation units 13.1, 13.2, 13.3, 13.4, 13.5.
[0074] List of reference signs
[0075] 1 Method
[0076] 2 Electronic control device
[0077] 3 Virtual control device
[0078] 4 Simulator
[0079] 5 Simulator operation unit
[0080] 6 Hardware configuration of the electronic control device
[0081] 6a Operation unit of the electronic control device
[0082] 6a1 First operation unit of the electronic control device
[0083] 6a2 Second operation unit of the electronic control device
[0084] 6b External interface of the electronic control device
[0085] 7 Software configuration of the electronic control device
[0086] 7a Internal functions of the software configuration of the electronic control device
[0087] 7b External interface functions of the software configuration of the electronic control device
[0088] 8 Software configuration of the virtual control device
[0089] 8a internal function of the software configuration of the virtual control device
[0090] 9a, 9b data transfer function (external, internal) of the software configuration of the simulator arithmetic unit
[0091] 10 software configuration of the simulator arithmetic unit
[0092] 11 internal function calling the internal function of the second arithmetic unit
[0093] 12 description of the hardware configuration and the software configuration of the electronic control device
[0094] 13.1, 13.2 virtual subarithmetic unit of the virtual control device
[0095] 14 analysis of the internal function of the arithmetic unit of the electronic control device
[0096] 15 providing a description of the hardware configuration and the software configuration of the electronic control device
[0097] 16 mapping of the arithmetic unit of the electronic control device onto a virtual arithmetic unit
[0098] 17 simulation module executable on the simulator arithmetic unit
[0099] 18 block
[0100] 19 data transfer port
[0101] 20 signal line
[0102] 21 computer-based graphical simulation environment 21
[0103] f_i internal function of the internal function of the second arithmetic unit
Claims
1. Method (1) for testing at least one electronic control device (2) as a virtual control device (3) on a simulator (4) having at least one simulator arithmetic unit (5), wherein The electronic control device (2) has a hardware configuration (6) comprising at least one arithmetic unit (6a) and an external interface (6b) for exchanging data and a software configuration assigned to the hardware configuration (6), which software configuration comprises internal functions (7a) and external interface functions (7b), the electronic control device (2) being mapped onto a virtual control device (3) in such a way that the internal functions (7a) of the software configuration of the electronic control device (2) assume the internal functions (8a) of the software configuration of the virtual control device (3) and in such a way that the external interface functions (7b) of the electronic control device (2) are replaced by data transfer functions (9a) of the software configuration of the simulator arithmetic unit (5), the software configuration of the virtual control device (3) being converted into executable code for the simulator arithmetic unit (5) and being executed on the simulator (4), characterized in that the hardware configuration (6) of the electronic control device (2) has at least a first arithmetic unit (6a1) and a second arithmetic unit (6a2) of different types, the software configuration of the electronic control device (2) comprising at least internal functions for the first arithmetic unit (6a1) and the second arithmetic unit (6a2), the internal functions of at least the first arithmetic unit (6a1) calling (11) internal functions (f_i) of the internal functions of the second arithmetic unit (6a2); a description (12) of the hardware configuration (6) and the software configuration of the electronic control device (2) is provided (15), the description comprising the assignment (13) of the internal functions of the software configuration of the electronic control device (2) to the arithmetic units of the electronic control device (2) and the internal functions of the arithmetic units of the electronic control device (2) themselves; each arithmetic unit of each type of the electronic control device (2) having the assigned internal functions is mapped (16) onto a virtual sub-arithmetic unit (13.1, 13.2) of the corresponding type by means of an analytical processing of the description (12) of the electronic control device (2), the internal functions of the electronic control device (2) of the mapped arithmetic units being transferred into the executable internal functions of the virtual sub-arithmetic units (13.1, 13.2) on the simulator arithmetic unit (5); and it is determined by means of an analytical processing (14) of the provided internal functions of the first arithmetic unit (6a1) of the electronic control device (2) and the second arithmetic unit (6a2) of the electronic control device (2) which arithmetic units of the electronic control device (2) exchange data with one another by accessing internal functions (f_i) of another arithmetic unit of the electronic control device (2) and the access to the internal functions (f_i) of another arithmetic unit in the virtual control device (3) is replaced by data transfer functions (9b) of the software configuration of the simulator arithmetic unit (5).
2. The method (1) according to claim 1, characterized in that, Different types of arithmetic units of the electronic control device (2) are: processor (CPU), microcontroller (µC), graphic processor (GPU), programmable logic gate (FPGA), neural network accelerator (NNA), matrix accelerator (MACC), security chip.
3. The method (1) according to claim 1 or 2, characterized in that, A plurality of arithmetic units (6a) of the same type of the electronic control device (2) is mapped onto exactly one virtual sub-arithmetic unit of this type.
4. The method (1) according to claim 3, characterized in that, All arithmetic units (6a) of the same type of the electronic control device (2) are mapped onto exactly one virtual sub-arithmetic unit of this type.
5. The method (1) according to claim 1 or 2, characterized in that, The internal functions (8a1, 8a2, 8a3) of the mapped arithmetic units of the electronic control device (2) are transferred into the executable internal functions (8a1, 8a2, 8a3) of the virtual sub-arithmetic units on the simulator arithmetic unit (5) including for the mapped arithmetic units of the electronic control device (2) the use of simulation modules (17, 17.1, 17.2) executable on the simulator arithmetic unit (5).
6. The method (1) according to claim 1 or 2, characterized in that, An internal function (f_i) of the internal functions of the second arithmetic unit (6a2) called by the internal functions of the first arithmetic unit (6a1) involves loading data from or storing data into a memory area of the second arithmetic unit (6a2).
7. The method (1) according to claim 1 or 2, characterized in that, The analysis process (14) of the provided internal functions of the first arithmetic unit (6a1) and the second arithmetic unit (6a2) of the electronic control device (2) is implemented based on the binary code executable on the electronic control device (2) of the internal functions and / or based on the high-level language source code of the internal functions.
8. The method (1) according to claim 1 or 2, characterized in that, Each virtual sub-arithmetic unit is represented as a block (18) for the computer-based graphical simulation environment (21).
9. The method (1) according to claim 8, characterized in that, Each virtual sub-arithmetic unit is represented as a block (18) for the computer-based graphical simulation environment of the simulator (4).
10. The method (1) according to claim 8, characterized in that, The blocks (18) of the virtual sub-arithmetic units are represented with data transfer ports (19) on the respective blocks (18), the virtual sub-arithmetic units having been identified as being connected to each other for data exchange, wherein the data transfer is represented by signal lines (20) connecting the data transfer ports (19) of the virtual sub-arithmetic units.
11. System for testing at least one electronic control device (2) as a virtual control device (3) on a simulator (4), wherein The system comprises a simulator (4) comprising the at least one simulator arithmetic unit (5), a hardware configuration (6) of the electronic control device (2) comprising at least one arithmetic unit (6a) and an external interface (6b) for exchanging data, and a software configuration comprising internal functions (7a) and external interface functions (7b), the electronic control device (2) being mapped by the simulator (4) onto a virtual control device (3) in such a way that the internal functions (7a) of the software configuration of the electronic control device (2) are assumed as internal functions (8a) of the software configuration of the virtual control device (3) and in such a way that the external interface functions (7b) of the electronic control device (2) are replaced by data transfer functions (9a) of the software configuration of the simulator arithmetic unit (5), the software configuration of the virtual control device (3) being converted into executable code for the simulator arithmetic unit (5) and executed on the simulator (4) in the running state of the simulator (4), characterized in that the hardware configuration (6) of the electronic control device (2) has at least a first arithmetic unit (6a1) and a second arithmetic unit (6a2) of different types, the software configuration of the electronic control device (2) comprising at least internal functions for the first arithmetic unit (6a1) and the second arithmetic unit (6a2), at least the internal functions of the first arithmetic unit (6a1) calling (11) internal functions (f_i) of the internal functions of the second arithmetic unit (6a2); the simulator (4) obtains a description (12) of the hardware configuration (6) and the software configuration of the electronic control device (2), the description comprising the assignment (13) of the internal functions of the software configuration of the electronic control device (2) to the arithmetic units of the electronic control device (2) and the internal functions of the arithmetic units of the electronic control device (2) themselves; the simulator (4) maps (16) each arithmetic unit of each type of the electronic control device (2) having the assigned internal functions onto a corresponding type of virtual sub-arithmetic unit (13.1, 13.2) by means of an analysis of the description (12) of the electronic control device (2), wherein the internal functions of the electronic control device (2) of the arithmetic unit to be mapped are transferred into the executable internal functions of the virtual sub-arithmetic unit (13.1, 13.2) on the simulator arithmetic unit (5); and the simulator (4) determines, by means of an analytical processing (14) of the provided internal functions of the first arithmetic unit (6a1) of the electronic control device (2) and of the second arithmetic unit (6a2) of the electronic control device (2), which arithmetic units of the electronic control device (2) exchange data with one another by accessing the internal functions (f_i) of another arithmetic unit of the electronic control device (2), and the access to the internal functions (f_i) of another arithmetic unit in the virtual control device (3) is replaced by a data transfer function (9b) of the software configuration of the simulator arithmetic unit (5).
12. The system of claim 11, wherein, The simulator arithmetic unit (5) of the simulator (4) is programmed with a program such that the simulator arithmetic unit, when executing the program, carries out the method (1) according to one of claims 2 to 10.
13. Simulator (4) according to the simulator (4) of the system according to claim 11 or 12, comprising a simulator arithmetic unit (5) for testing the electronic control device (2) as virtual control device (3), wherein The simulator (4) has a data transfer function (9a) and a software configuration of the simulator arithmetic unit (5), which is programmed with a program such that the simulator arithmetic unit, when executing the program, carries out the method (1) according to one of claims 1 to 10.
14. Computer program product, which comprises instructions which, when executed by a simulator arithmetic unit (5) of a simulator (4), prompt the simulator arithmetic unit to carry out the method (1) according to one of claims 1 to 10.
Citation Information
Patent Citations
Apparatus and method for verifying interoperability between application software and autosar service
US20130103379A1
Modifying and simulating the operating software of a technical system
US20180052698A1