System and method for simulation and testing of multiple virtual ECUs
Systems and methods for simulation and testing of multiple virtual electronic control units (VECUs). A method ( 1000 ) includes executing, by one or more computer systems ( 101 ), a first VECU ( 502 ). The method includes executing a virtual bus ( 510 ), the virtual bus ( 510 ) associated with the first VECU ( 502 ). The method includes executing at least one second VECU. The method includes simulating a multiple-VECU system by managing communications, using the virtual bus ( 510 ), between the first VECU ( 502 ) and the at least one second VECU.
1 . A method comprising:
executing, by one or more computer systems, a first virtual electronic control unit (VECU) and at least one second VECU;
executing, by the one or more computer systems, a virtual bus associated with the first VECU and the at least one second VECU, wherein the virtual bus includes a data exchange channel and a synchronization channel configured to enable communication between the first VECU and the at least one second VECU;
simulating, by the one or more computer systems, a multiple-VECU system by managing communications, using the virtual bus, between the first VECU and the at least one second VECU;
synchronizing, by the one or more computer systems, execution of the first VECU and the at least one second VECU using the virtual bus by sending a synchronization message from the first VECU over the synchronization channel of the virtual bus to the at least one second VECU, causing the at least one second VECU to advance execution by a predetermined virtual simulation time, wherein, in response to receiving the synchronization message over the synchronization channel of the virtual bus, the at least one second VECU transmits an acknowledgement message over the synchronization channel of the virtual bus to the first VECU, wherein the acknowledgement message confirms the at least one second VECU received the synchronization message from the first VECU, and wherein the first VECU advances execution to synchronize with the at least one second VECU in response to receiving the acknowledgement message from the at least one second VECU; and
after the first VECU has been synchronized with the at least one second VECU in response to the synchronization message and the acknowledgment message, transmitting, by the one or more computing systems, messages from the first VECU and the at least one second VECU over the data exchange channel of the virtual bus, wherein the virtual bus is configured to simulate collisions between the transmitted messages and arbitrate between the messages having collided.
2 . The method of claim 1 , wherein the first VECU and the at least one second VECU together represent a portion of an automobile control system.
3 . The method of claim 1 , wherein the virtual bus converts communications in a first protocol from the first VECU using a protocol manager and transmits the communications to the at least one second VECU using an inter-process communication (IPC) channel.
4 . The method of claim 3 , wherein the communications are transmitted in a carrier on the IPC channel, the carrier having a pilot field, a first-in-first-out (FIFO) field, and an acknowledgement (ACK) field.
5 . The method of claim 4 , wherein the pilot field includes an identifier field, a frame definition field that defines a frame type and size of the FIFO field, and protocol field that identifies a protocol type of the FIFO field, and wherein the protocol type corresponds to the first protocol.
6 . The method of claim 1 , further comprising arbitrating, by the virtual bus, between a message sent by the first VECU and a message sent by a third VECU.
7 . One or more computer systems, each comprising:
a processor; and
an accessible memory, the one or more computer systems together configured to:
execute a first virtual electronic control unit (VECU) and at least one second VECU;
execute a virtual bus, the virtual bus associated with the first VECU and the at least one second VECU, wherein the virtual bus includes a data exchange channel and a synchronization channel configured to enable communication between the first VECU and the at least one second VECU;
simulate a multiple-VECU system by managing communications, using the virtual bus, between the first VECU and the at least one second VECU;
synchronize execution of the first VECU and the at least one second VECU using the virtual bus by sending a synchronization message from the first VECU over the synchronization channel of the virtual bus to the at least one second VECU, causing the at least one second VECU to advance execution by a predetermined virtual simulation time, wherein, in response to receiving the synchronization message over the synchronization channel of the virtual bus, the at least one second VECU transmits an acknowledgement message over the synchronization channel of the virtual bus to the first VECU, wherein the acknowledgement message confirms the at least one second VECU received the synchronization message from the first VECU, and wherein the first VECU advances execution to synchronize with the at least one second VECU in response to receiving the acknowledgement message from the at least one second VECU; and
after the first VECU has been synchronized with the at least one second VECU in response to the synchronization message and the acknowledgment message, transmit messages from the first VECU and the at least one second VECU over the data exchange channel of the virtual bus, wherein the virtual bus is configured to simulate collisions between the transmitted messages and arbitrate between the messages having collided.
8 . The one or more computer systems of claim 7 , wherein the first VECU and the at least one second VECU together represent a portion of an automobile control system.
9 . The one or more computer systems of claim 7 , wherein the virtual bus converts communications in a first protocol from the first VECU using a protocol manager and transmits the communications to the at least one second VECU using an inter-process communication (IPC) channel.
10 . The one or more computer systems of claim 9 , wherein the communications are transmitted in a carrier on the IPC channel, the carrier having a pilot field, a first-in-first-out (FIFO) field, and an acknowledgement (ACK) field.
11 . The one or more computer systems of claim 7 , wherein the pilot field includes an identifier field, a frame definition field that defines a frame type and size of the FIFO field, and protocol field that identifies a protocol type of the FIFO field, and wherein the protocol type corresponds to the first protocol.
12 . An apparatus comprising a non-transitory computer-readable medium storing executable instructions that, when executed, cause one or more computer systems to:
execute a first virtual electronic control unit (VECU) and at least one second VECU;
execute a virtual bus, the virtual bus associated with the first VECU and the at least one second VECU, wherein the virtual bus includes a data exchange channel and a synchronization channel configured to enable communication between the first VECU and the at least one second VECU;
simulate a multiple-VECU system by managing communications, using the virtual bus, between the first VECU and the at least one second VECU;
synchronize execution of the first VECU and the at least one second VECU using the virtual bus by sending a synchronization message from the first VECU over the synchronization channel of the virtual bus to the at least one second VECU, causing the at least one second VECU to advance execution by a predetermined virtual simulation time, wherein, in response to receiving the synchronization message over the synchronization channel of the virtual bus, the at least one second VECU transmits an acknowledgement message over the synchronization channel of the virtual bus to the first VECU, wherein the acknowledgement message confirms the at least one second VECU received the synchronization message from the first VECU, and wherein the first VECU advances execution to synchronize with the at least one second VECU in response to receiving the acknowledgement message from the at least one second VECU; and
after the first VECU has been synchronized with the at least one second VECU in response to the synchronization message and the acknowledgment message, transmit messages from the first VECU and the at least one second VECU over the data exchange channel of the virtual bus, wherein the virtual bus is configured to simulate collisions between the transmitted messages and arbitrate between the messages having collided.
13 . The apparatus of claim 12 , wherein the first VECU and the at least one second VECU together represent a portion of an automobile control system.