WO2022190870A1 - On-board apparatus, information processing method, and computer program - Google Patents

On-board apparatus, information processing method, and computer program Download PDF

Info

Publication number
WO2022190870A1
WO2022190870A1 PCT/JP2022/007441 JP2022007441W WO2022190870A1 WO 2022190870 A1 WO2022190870 A1 WO 2022190870A1 JP 2022007441 W JP2022007441 W JP 2022007441W WO 2022190870 A1 WO2022190870 A1 WO 2022190870A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication data
virtual
storage area
flag
ecu
Prior art date
Application number
PCT/JP2022/007441
Other languages
French (fr)
Japanese (ja)
Inventor
健 古戸
拓也 小林
Original Assignee
株式会社オートネットワーク技術研究所
住友電装株式会社
住友電気工業株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社オートネットワーク技術研究所, 住友電装株式会社, 住友電気工業株式会社 filed Critical 株式会社オートネットワーク技術研究所
Publication of WO2022190870A1 publication Critical patent/WO2022190870A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/167Interprocessor communication using a common memory, e.g. mailbox
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present disclosure relates to an in-vehicle device, an information processing method, and a computer program.
  • This application claims priority based on Japanese application No. 2021-040293 filed on March 12, 2021, and incorporates all the descriptions described in the Japanese application.
  • Patent Document 1 An electronic control device that is mounted on a vehicle and performs information processing related to control of equipment mounted on the vehicle and control of vehicle-external communication and travel control such as automatic driving is known (for example, Patent Document 1).
  • the electronic control device of Patent Document 1 includes a multi-core CPU (Central Processing Unit) having a plurality of cores.
  • a plurality of program systems operate on the multi-core CPU.
  • a hypervisor is installed in the above electronic control unit as a component of functions realized by executing a program.
  • the above electronic control unit creates a plurality of virtual devices on the multi-core CPU by the hypervisor, operates them in parallel, and operates an OS (Operation System) on the created virtual devices.
  • OS Operating System
  • An in-vehicle device includes a control unit that executes a plurality of programs, and a storage unit that stores a virtualized operating system activated by the control unit, and activates the virtualized operating system.
  • the storage unit includes a communication data storage area in which communication data exchanged in communication between the plurality of virtual devices is written, and A communication data storage area is provided with a write flag associated with the communication data and indicating that the communication data is being written, and a read flag associated with the communication data and indicating whether or not the communication data needs to be read,
  • the virtual device When communicating with another virtual device, the virtual device writes the communication data to the other virtual device into the communication data storage area, and the other virtual device writes the data when the write flag is off. and when the read flag is on, the communication data from the virtual device is read from the communication data storage area, and after the communication data is read, the read flag is turned off.
  • FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system according to Embodiment 1;
  • FIG. 2 is a block diagram illustrating the physical configuration of an in-vehicle ECU;
  • FIG. It is a block diagram which illustrates the logical structure of vehicle-mounted ECU.
  • 4 is a conceptual diagram illustrating the contents of a transmission/reception table;
  • FIG. 7 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU performed by a virtual ECU; 7 is a flowchart illustrating processing related to reception of communication data from another virtual ECU performed by a virtual ECU;
  • 11 is a schematic diagram illustrating the configuration of a transmission buffer according to Embodiment 3; 10 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU performed by the virtual ECU of the third embodiment; 14 is a flowchart illustrating processing related to synchronization of communication data in a transmission buffer and a reception table performed by a communication data management unit according to the third embodiment;
  • communication may be performed between a plurality of virtual devices via a storage unit such as a memory included in the electronic control device.
  • the transmission source virtual device writes the communication data to the storage unit
  • the transmission destination virtual device reads the communication data written in the storage unit. Data is exchanged.
  • communication data may be read out while the communication data is being written to the storage unit, or a so-called access conflict may occur, which may hinder efficient communication between multiple virtual devices. be.
  • the present disclosure has been made in view of such circumstances, and aims to provide an in-vehicle device or the like capable of efficiently exchanging communication data between a plurality of virtual devices.
  • An in-vehicle device includes a control unit that executes a plurality of programs, and a storage unit that stores a virtualization operating system activated by the control unit. By activating the system, a plurality of virtual devices are generated as an operating environment for the program, and the storage unit has a communication data storage area in which communication data exchanged in communication between the plurality of virtual devices is written.
  • the communication data storage area includes a write flag associated with the communication data and indicating that the communication data is being written; and a read flag associated with the communication data and indicating whether or not the communication data should be read.
  • the virtual device When communicating with another virtual device, the virtual device writes the communication data to the other virtual device into the communication data storage area, and the other virtual device is in the off state of the write flag.
  • the read flag When the read flag is on, the communication data from the virtual device is read from the communication data storage area, and after the communication data is read, the read flag is turned off.
  • a plurality of virtual devices are generated by the control unit activating the virtualization operating system.
  • one of the plurality of virtual devices writes communication data to be transmitted to another virtual communication in the communication data storage area.
  • communication data to be written is associated with a write flag and a read flag. If the write flag is on, the communication data associated with the write flag is being written to the communication data storage area. When the write flag is in the OFF state, the communication data associated with the write flag has not been written. If the read flag is in the ON state, it is necessary to read the communication data associated with that read flag. If the read flag is in the off state, it is not necessary to read the communication data associated with that read flag.
  • the communication data destination virtual device reads the communication data from the communication data storage area when the write flag is off and the read flag is on. Since the communication data whose write flag is in the OFF state is read, the communication data is not written when the communication data is read. Since there is no contention between writing and reading communication data to and from the communication data storage area, communication data can be efficiently exchanged between a plurality of virtual devices. In other words, communication between multiple virtual devices can be performed efficiently. After reading the communication data, the virtual device changes the read flag associated with the communication data from the ON state to the OFF state, so that it is possible to prevent the same communication data from being erroneously read again.
  • the read flag is provided for the virtual device that reads the communication data.
  • the communication data written by the virtual machine to the communication data storage area is read by one or two or more other virtual machines out of a plurality of virtual machines other than the own virtual machine.
  • a read flag associated with the communication data in the communication data storage area is provided for the virtual device reading the communication data. For example, if the communication data is read by two virtual devices, that is, if the destination of the communication data is two virtual devices, a read flag is provided for each of the two virtual devices.
  • the above communication data is associated with two read flags in the communication data storage area. When the write flag is OFF and the read flag provided for the virtual device is ON, the virtual device reads the communication data whose read flag is ON. After reading the communication data, the virtual device turns off the read flag.
  • the virtual device can appropriately transmit the communication data to the destination virtual device of the communication data. Even if a plurality of virtual devices are destinations of communication data, each of the plurality of destination virtual devices can read the communication data from the communication data storage area based on the read flag provided for the virtual device. can be done. Even in the above case, communication data can be efficiently exchanged between a plurality of virtual devices.
  • the virtual device turns on the write flag before writing the communication data to the communication data storage area, and writes the communication data to the communication data storage area. After writing to the communication data storage area, the write flag is turned off, and the read flag associated with the communication data written to the communication data storage area is turned on.
  • the virtual device turns on the write flag associated with the communication data before writing the communication data to the communication data storage area.
  • the virtual device changes the write flag associated with the communication data from the ON state to the OFF state, and further sets the read flag associated with the communication data to the ON state. Since the write flag is on while the communication data is being written by the virtual device, it is possible to prevent the communication data being written from being read. Since the write flag and the read flag are updated as described above after the communication data is written, communication data can be exchanged between a plurality of virtual devices without contention between the writing and reading of communication data in the communication data storage area. be able to.
  • the communication data storage area is provided for each of the plurality of virtual devices, and the virtual device writes the communication data to the other virtual device. and a second storage area to which the communication data read by the virtual device is written, wherein the write flag indicates that the communication data is being written to the second storage area.
  • a management unit that includes a flag and manages transmission and reception of the communication data between the plurality of virtual devices writes the communication data written in the first storage area to the second storage area with the second storage area write flag.
  • the communication data storage area includes a first storage area and a second storage area.
  • a first storage area is provided for each of the plurality of virtual devices.
  • the control unit also functions as a management unit that manages transmission and reception of communication data between a plurality of virtual devices.
  • One of the plurality of virtual devices writes communication data to be transmitted to another virtual device into a first storage area provided for one virtual device.
  • the management unit writes communication data written in the first storage area to the second storage area.
  • the communication data is associated with a second storage area write flag and a read flag.
  • the management unit turns on the second storage area write flag of the communication data before writing the communication data to the second storage area.
  • the management unit After writing the communication data to the second storage area, the management unit changes the second storage area write flag of the communication data from the ON state to the OFF state, and further turns the communication data read flag to the ON state.
  • the other virtual device to which the communication data is sent reads the communication data with the read flag in the ON state from the second storage area. Since the first storage area is provided for each virtual device, multiple virtual devices do not write communication data to the same first storage area. Even if communication data is being written by another virtual machine, the virtual machine can write communication data to the first storage area provided for its own virtual machine without waiting for the end of the writing. can. A virtual machine can write communication data to the first storage area provided for its own virtual machine even when another virtual machine is reading communication data from the second storage area.
  • the virtual device writes a plurality of the communication data to the first storage area, and writes the number of the communication data written to the first storage area. Increase the number.
  • the virtual device writes a plurality of pieces of communication data to the first storage area provided for its own virtual device.
  • the virtual device increases the write count indicating the number of pieces of communication data written to the first storage area according to the number of pieces of communication data written to the first storage area.
  • the management unit can efficiently write a plurality of pieces of communication data written in the first storage area to the second storage area without omission.
  • the virtual device When a virtual device can write only one piece of communication data to the first storage area, and a plurality of pieces of communication data are to be sent to other virtual devices, the virtual device writes one piece of communication data to the management It is necessary to notify the department that the communication data has been written. Since the virtual device can write a plurality of pieces of communication data to the first storage area, it is possible to reduce the frequency of communication between the virtual device and the management unit. Communication between multiple virtual devices can be made more efficient.
  • An information processing method generates a plurality of virtual devices that serve as operating environments for a plurality of programs in an in-vehicle device, and when the virtual device communicates with another virtual device, to a communication data storage area in which the communication data exchanged in communication between the plurality of virtual machines is written, and is associated with the communication data in the communication data storage area,
  • a write flag indicating that data is being written is in an off state
  • a read flag associated with the communication data in the communication data storage area and indicating whether or not to read the communication data is in an on state the virtual The communication data from the device is read from the communication data storage area, and after the communication data is read, the read flag is turned off.
  • a computer program is a computer program that causes a computer mounted on a vehicle to execute processing, generates a plurality of virtual devices that serve as operating environments for a plurality of programs, and communicates with another virtual device, writes communication data to the other virtual device into a communication data storage area in which the communication data exchanged in communication between the plurality of said virtual devices is written; a write flag associated with the communication data in the data storage area and indicating that the communication data is being written is in an off state; causes the computer to read the communication data from the virtual device from the communication data storage area and turn off the read flag after reading the communication data when the read flag indicated by the virtual device is on.
  • the computer can function as an in-vehicle device of one aspect of the present disclosure.
  • FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system S according to the first embodiment.
  • the in-vehicle system S includes a plurality of in-vehicle ECUs 2 mounted on the vehicle C. As shown in FIG.
  • An in-vehicle device 3 is connected to the in-vehicle ECU 2 .
  • the plurality of in-vehicle ECUs 2 includes an integrated in-vehicle ECU 2 (integrated ECU) that controls the entire vehicle C, and an individual in-vehicle ECU 2 that is communicably connected to the integrated in-vehicle ECU 2 and directly connected to the in-vehicle device 3.
  • the ECU 2 (individual ECU) may be included.
  • the integrated in-vehicle ECU 2 may be communicably connected to an external server (not shown) connected to an external network such as the Internet via an external communication device (not shown).
  • the in-vehicle ECU 2 corresponds to an in-vehicle device.
  • the integrated vehicle ECU 2 and a plurality of individual vehicle ECUs 2 are communicably connected by the vehicle network 4 forming a star-shaped network topology.
  • the integrated in-vehicle ECU 2 is provided at the center of a star-shaped network topology.
  • the network topology in the in-vehicle system S is not limited to the above examples.
  • the in-vehicle system S may have a configuration in which adjacent individual in-vehicle ECUs 2 are connected to form a loop-shaped network topology, enabling two-way communication and achieving redundancy.
  • Individual vehicle-mounted ECUs 2 are arranged in each area of vehicle C and connected to a plurality of vehicle-mounted devices 3 .
  • the individual vehicle-mounted ECU 2 transmits and receives signals or data to and from the vehicle-mounted device 3 to which it is connected.
  • separate vehicle-mounted ECU2 communicates with comprehensive vehicle-mounted ECU2.
  • the individual in-vehicle ECU 2 is an in-vehicle relay device such as a gateway or ether switch that relays communication between a plurality of in-vehicle devices 3 connected to the individual in-vehicle ECU 2, or communication between the in-vehicle device 3 and another in-vehicle ECU 2.
  • the individual vehicle-mounted ECU 2 may also function as a power distribution device that distributes and relays power output from a power storage device (not shown) and supplies the power to the vehicle-mounted device 3 connected to its own ECU.
  • the in-vehicle device 3 includes, for example, actuators 30 such as door opening/closing devices and motor devices, and various sensors 31 such as LiDAR (Light Detection and Ranging), light sensors, CMOS cameras, and infrared sensors.
  • actuators 30 such as door opening/closing devices and motor devices
  • sensors 31 such as LiDAR (Light Detection and Ranging), light sensors, CMOS cameras, and infrared sensors.
  • the in-vehicle device 3 is not limited to the above example, and may be a switch such as a door SW (switch) and a lamp SW, or may be a lamp.
  • the integrated in-vehicle ECU 2 is, for example, a central control unit such as a vehicle computer.
  • the integrated vehicle-mounted ECU 2 generates and outputs control signals to individual vehicle-mounted devices 3 based on data from the vehicle-mounted devices 3 relayed via other vehicle-mounted ECUs 2 such as individual vehicle-mounted ECUs 2 .
  • the integrated in-vehicle ECU 2 generates a control signal for controlling the actuator 30, which is the target of the request signal, based on information or data such as a request signal output from another in-vehicle ECU 2, and outputs the generated control signal. It outputs to other in-vehicle ECU2.
  • the in-vehicle system S is configured by the integrated in-vehicle ECU 2 and the individual in-vehicle ECU 2, but the in-vehicle system S is not limited to the configuration of the integrated in-vehicle ECU 2 and the individual in-vehicle ECU 2.
  • the in-vehicle system S may be composed of a plurality of in-vehicle ECUs 2 connected peer-to-peer by a relay device such as a CAN (Controller Area Network) gateway or Ethernet switch.
  • FIG. 2 is a block diagram illustrating the physical configuration of the in-vehicle ECU 2.
  • the in-vehicle ECU 2 includes a control section 20 , a storage section 21 and an in-vehicle communication section 22 .
  • the control unit 20 is configured by an arithmetic processing device such as a CPU or an MPU (Micro Processing Unit).
  • the control unit 20 reads out and executes a control program P and data stored in advance in the storage unit 21, thereby performing various control processing, arithmetic processing, and the like.
  • the control unit 20 includes, for example, a single-core single CPU, a single-core multi-CPU, a multi-core single CPU, and a multi-core multi-CPU.
  • the control unit 20 is not limited to a software processing unit that performs software processing such as a CPU, but includes a hardware processing unit that performs various control processing and arithmetic processing by hardware processing such as FPGA, ASIC, or SOC. may be
  • the control unit 20 includes an arithmetic device 200 configured by, for example, one core of a CPU. In this embodiment, an example in which the control unit 20 is a quad-core CPU will be described. Since the control unit 20 is a quad-core, it has four cores.
  • the control unit 20 includes a first arithmetic unit 201 configured with a first core, a second arithmetic unit 202 configured with a second core, a third arithmetic unit 203 configured with a third core, It includes four processing units 200 with a fourth processing unit 204 configured by a fourth core. Note that the number of arithmetic units 200 is not limited to four.
  • the storage unit 21 is composed of a volatile memory element such as RAM (Random Access Memory) or a non-volatile memory element such as ROM (Read Only Memory), EEPROM (Electrically Erasable Programmable ROM), or flash memory.
  • the storage unit 21 may be configured by a combination of storage devices such as the above volatile memory elements and nonvolatile memory elements.
  • the storage unit 21 stores in advance the control program P and data to be referred to during processing.
  • the control program P includes, for example, a plurality of programs such as a program for controlling various vehicle-mounted devices 3, or a program for performing target recognition for automated driving based on output data from a LiDAR or CMOS camera. These programs are also called applications.
  • storage part 21 of vehicle-mounted ECU2 is memorize
  • the control program P stored in the storage unit 21 may be the control program P read from the recording medium A readable by the in-vehicle ECU 2 .
  • the control program P may be downloaded from an external computer (not shown) connected to a communication network (not shown) and stored in the storage unit 21 .
  • the control program P corresponds to a computer program.
  • the in-vehicle communication unit 22 is, for example, an input/output interface using a CAN (Controller Area Network) or Ethernet (Ethernet/registered trademark) communication protocol. Communicate with other in-vehicle ECUs 2 that are installed.
  • CAN Controller Area Network
  • Ethernet Ethernet/registered trademark
  • FIG. 3 is a block diagram illustrating the logical configuration of the in-vehicle ECU 2.
  • the storage unit 21 of the in-vehicle ECU 2 stores, for example, a virtualization operating system such as Hypervisor, VMware, or Xen.
  • the control part 20 of vehicle-mounted ECU2 can construct
  • a program for controlling various vehicle-mounted devices 3 is executed using one of the plurality of virtual ECUs 5 as an operating environment. That is, these programs are executed on one of the virtual ECUs 5 .
  • the virtual ECU 5 executes the program, single or multiple tasks are generated according to the processing contents of the program. A more subdivided or partitioned unit of processing is executed by the task.
  • the virtualization method is a hypervisor method in which hardware resources such as the control unit 20 are accessed directly by the virtualization operating system.
  • the virtualization method may be a host OS method in which an operating system such as Linux (registered trademark) intervenes between the virtualized operating system and hardware resources.
  • the virtualization method may use a container-based virtualization operating system.
  • the in-vehicle ECU 2 activated using the virtualized operating system can construct a plurality of virtual ECUs 5 using the functions of the virtualized operating system.
  • Hardware resources such as the control part 20 and the memory
  • the virtual ECU 5 includes a virtual control unit 5a assigned to the control unit 20, a virtual storage unit 5b assigned to the storage unit 21, and a virtual in-vehicle communication unit (not shown) assigned to the in-vehicle communication unit 22.
  • the virtual ECU 5 corresponds to a virtual device.
  • the guest OS may be a different kind of OS depending on each virtual ECU 5 . Since the entity of the virtual storage unit 5b is the storage area of the storage unit 21 allocated to each virtual ECU 5 as described above, it goes without saying that the guest OS is also stored in the storage unit 21 in the same manner as the virtualized operating system. stomach.
  • a guest OS may be eliminated, a container may be generated on the virtualized operating system, and a program may be executed on the container. In this case, the container corresponds to the virtual ECU5.
  • a plurality of virtual ECUs 5 are generated in the control unit 20 of the in-vehicle ECU 2 activated using the virtualized operating system.
  • the control unit 20 of FIG. 3 four virtual ECUs 5 of a first virtual ECU 51, a second virtual ECU 52, a third virtual ECU 53, and a fourth virtual ECU 54 are generated.
  • the control unit 20 is time-divided and periodically performs virtual control of the first virtual ECU 51, the second virtual ECU 52, the third virtual ECU 53, and the fourth virtual ECU 54. assigned to section 5a.
  • the first virtual ECU 51 is periodically generated in the first arithmetic unit 201.
  • the virtual control unit 5 a of the generated first virtual ECU 51 is assigned to the first arithmetic unit 201 .
  • the first arithmetic device 201 functions as the first virtual ECU 51 .
  • the second virtual ECU 52 is periodically generated in the second arithmetic unit 202 .
  • the virtual control unit 5 a of the generated second virtual ECU 52 is assigned to the second arithmetic unit 202 .
  • the second arithmetic device 202 functions as the second virtual ECU 52 .
  • the third virtual ECU 53 and the fourth virtual ECU 54 are generated by alternately switching periodically.
  • the virtual control unit 5 a of the generated third virtual ECU 53 is assigned to the third arithmetic unit 203 .
  • the virtual control unit 5 a of the generated fourth virtual ECU 54 is assigned to the third arithmetic unit 203 .
  • the third arithmetic device 203 functions as the generated third virtual ECU 53 .
  • the third arithmetic unit 203 also functions as the generated fourth virtual ECU 54 .
  • the fact that the virtual ECU 5 is generated in the arithmetic device 200 and the fact that the arithmetic device 200 functions as the virtual ECU 5 generated by the arithmetic device 200 are also referred to as that the arithmetic device 200 generates the virtual ECU 5 .
  • the fourth arithmetic unit 204 executes a virtual ECU management program that manages all virtual ECUs 5 .
  • the fourth arithmetic unit 204 functions as a control panel of the virtualized operating system by executing the virtual ECU management program.
  • the fourth arithmetic unit 204 functions as the virtual ECU management unit 10 that manages the plurality of virtual ECUs 5 by executing the virtual ECU management program.
  • the virtual ECU management unit 10 refers to the allocation time information stored in the storage unit 21, for example, to determine the utilization time of the first arithmetic unit 201, the utilization time of the second arithmetic unit 202, or the virtual ECU 5. 3. Perform processing for allocating the usage time of the arithmetic unit 203, that is, so-called scheduling.
  • the allocation time information includes the cycle of generating the first virtual ECU 51 and the time allocated to the first virtual ECU 51 and the cycle of generating the second virtual ECU 52 and the time allocated to the second virtual ECU 52 .
  • the allocation time information includes the cycle of generating the third virtual ECU 53 and the time allocated to the third virtual ECU 53 and the cycle of generating the fourth virtual ECU 54 and the time allocated to the fourth virtual ECU 54 .
  • the virtual ECU management unit 10 performs scheduling and starts the operations of the first virtual ECU 51, the second virtual ECU 52, the third virtual ECU 53, and the fourth virtual ECU 54, respectively.
  • the virtual ECU management unit 10 performs switching of the virtual ECU 5 for the first arithmetic device 201, switching of the virtual ECU 5 for the second arithmetic device 202, and switching of the virtual ECU 5 for the third arithmetic device 203 by scheduling.
  • the virtual ECU 5 is switched between an active state in which the virtual control unit 5a of the virtual ECU 5 is assigned to the arithmetic unit 200 and an active state in which the virtual control unit 5a of the virtual ECU 5 is not assigned to the arithmetic unit 200.
  • the active state is a state in which the virtual ECU 5 including the virtual control unit 5a assigned to the arithmetic unit 200 executes processing.
  • the inactive state is a state in which the virtual ECU 5 is resting.
  • transitioning the virtual ECU 5 from the inactive state to the active state is also referred to as activation. Transitioning the virtual ECU 5 from the active state to the inactive state is also referred to as deactivation.
  • the virtual ECU management unit 10 causes the first arithmetic device 201 to periodically generate (activate) the first virtual ECU 51 by switching the virtual ECU 5 for the first arithmetic device 201 .
  • the first virtual ECU 51 is generated again in the first arithmetic device 201 .
  • the first arithmetic unit 201 is assigned to the virtual control unit 5a of the regenerated first virtual ECU 51 described above. In other words, by switching the virtual ECU 5 with respect to the first arithmetic unit 201, the first virtual ECU 51 is deactivated and activated after being deactivated.
  • the virtual ECU management unit 10 causes the second arithmetic device 202 to periodically generate the second virtual ECU 52 by switching the virtual ECU 5 for the second arithmetic device 202 .
  • the second virtual ECU 52 is generated again in the second arithmetic device 202.
  • the second arithmetic unit 202 is assigned to the virtual control unit 5a of the second virtual ECU 52 generated again. In other words, by switching the virtual ECU 5 with respect to the second arithmetic unit 202, the second virtual ECU 52 is deactivated and activated after being deactivated.
  • the virtual ECU management unit 10 causes the third arithmetic device 203 to generate the third virtual ECU 53 and the fourth virtual ECU 54 alternately and periodically.
  • the virtual ECU 5 for the third arithmetic device 203 the virtual ECU 5 generated in the third arithmetic device 203 is switched from one of the third virtual ECU 53 and the fourth virtual ECU 54 to the other of the third virtual ECU 53 and the fourth virtual ECU 54. .
  • the other of the third virtual ECU 53 and the fourth virtual ECU 54 is generated in the third arithmetic unit 203 .
  • the third arithmetic unit 203 is assigned to the other virtual control unit 5 a of the third virtual ECU 53 and the fourth virtual ECU 54 .
  • one of the third virtual ECU 53 and the fourth virtual ECU 54 is deactivated by switching the virtual ECU 5 with respect to the third arithmetic unit 203 .
  • the other of the third virtual ECU 53 and the fourth virtual ECU 54 is activated.
  • the arithmetic device 200 functioning as the virtual ECU 5 and the arithmetic device 200 functioning as the virtual ECU management unit 10 are different, but the same arithmetic device 200 functions as the virtual ECU 5 and virtual ECU management is performed. functioning as the unit 10; In this case, the same arithmetic unit 200 described above periodically switches between, for example, a period of functioning as the virtual ECU 5 and a period of functioning as the virtual ECU management unit 10 .
  • the virtual ECU 5 executes the program as described above.
  • the virtual ECU 5 stores the result of processing by the executed program in the virtual storage unit 5b of its own virtual ECU.
  • Information such as processing results stored in the virtual storage unit 5b is retained in the virtual storage unit 5b allocated in the storage unit 21 even when the generation of the virtual ECU 5 including the virtual storage unit 5b is completed.
  • the case where the generation of the virtual ECU 5 has ended includes the case where the virtual ECU 5 is in an inactive state.
  • the storage unit 21 includes a communication data storage area 6 in which communication data exchanged in communication between a plurality of virtual ECUs 5 is written. Each virtual ECU 5 can access the communication data storage area 6 for writing and reading communication data. Hereinafter, reading communication data from the communication data storage area 6 is also referred to as receiving communication data.
  • the communication data storage area 6 in FIG. 3 includes a transmission/reception table 60 in which communication data is stored in association with write flags and read flags, which will be described later.
  • FIG. 4 is a conceptual diagram illustrating the contents of the transmission/reception table 60. As shown in FIG.
  • the transmission/reception table 60 includes an identifier string, a data length string, a communication data string, a write flag string, and a read flag string for each virtual ECU 5 .
  • Communication data is stored in the communication data string.
  • the identifier column stores identifiers of communication data, such as message IDs. Specifically, identifiers of all communication data exchanged between a plurality of virtual ECUs 5 are stored in advance in the identifier string. Communication data exchanged between the plurality of virtual ECUs 5 includes, for example, messages exchanged between the plurality of virtual ECUs 5 . Identifiers are not limited to message IDs, and may be port numbers, for example. For example, the identifier of the communication data transmitted from one virtual ECU5 and the identifier of the communication data transmitted from other virtual ECU5 do not overlap.
  • the data length column stores the amount of communication data, the so-called data length.
  • the write flag string stores a write flag indicating that communication data is being written.
  • the communication data, the identifier of the communication data, the data length of the communication data, and the write flag are stored in association with each other.
  • the write flag indicates that communication data is being written to the transmission/reception table 60.
  • a write flag includes an ON state and an OFF state. When the write flag is on, the communication data associated with the write flag is being written to the transmission/reception table 60 . In other words, while the communication data is being written, the write flag associated with the communication data is set to the ON state. When the write flag is in the OFF state, writing of communication data associated with the write flag to the transmission/reception table 60 is not performed.
  • the read flag string for each virtual ECU 5 includes the reception information string and read flag string of the first virtual ECU 51 and the reception information string and read flag string of the second virtual ECU 52 . Further, the read flag string for each virtual ECU 5 includes the reception information string and read flag string of the third virtual ECU 53 and the reception information string and read flag string of the fourth virtual ECU 54 . That is, the read flag string for each virtual ECU 5 includes a reception information string provided for each virtual ECU 5 and a read flag string.
  • Each received information string stores received information indicating whether or not communication data is to be received by the virtual ECU 5 in association with an identifier, data length, communication data, and write flag.
  • reception information associated with an identifier of communication data to be received by the virtual ECU 5 is indicated as a reception target.
  • Received information associated with the identifier of communication data that is not subject to reception by the virtual ECU 5 is indicated as out of scope.
  • the communication data of the identifier associated with the reception information of the first virtual ECU 51 is the reception target of the first virtual ECU 51.
  • the first virtual ECU 51 is the virtual ECU 5 to which the communication data of the identifier associated with the reception information of the first virtual ECU 51 to be received is transmitted.
  • the first virtual ECU 51 reads from the transmission/reception table 60 the communication data of the identifier associated with the reception information of the first virtual ECU 51 to be received. That is, the first virtual ECU 51 receives the above communication data. Readout of communication data from the transmission/reception table 60 by the virtual ECU 5 will be described later.
  • the communication data of the identifier associated with the reception information of the first virtual ECU 51 that is out of scope is not subject to reception by the first virtual ECU 51 .
  • the first virtual ECU 51 is not the virtual ECU 5 that is the destination of the communication data with the identifier associated with the received information of the first virtual ECU 51 that is excluded.
  • the first virtual ECU 51 does not read out from the transmission/reception table 60 the communication data of the identifier associated with the reception information of the first virtual ECU 51 that is excluded.
  • Each read flag string stores a read flag indicating whether or not it is necessary to read communication data in association with the reception information to be received. More specifically, the read flag of each read flag string is associated with the reception information, which is the reception target, among the reception information of the corresponding reception information string. For example, the received information string corresponding to the readout flag string of the first virtual ECU 51 is the received information string of the first virtual ECU 51 .
  • the read flag is also associated with the identifier, data length, communication data, and write flag associated with the received information to be received. Specifically, in the transmission/reception table 60, the read flag is associated with the identifier, the data length, the communication data, and the write flag, and stored in the read column of the virtual ECU 5 that receives the communication data. Since the read flags are provided for the virtual ECUs 5 that read the communication data, the same number of read flags as the number of the virtual ECUs 5 that read the one communication data are associated with the identifier of one communication data in the transmission/reception table 60. It is
  • the read flags associated with the identifiers of the communication data read by the two virtual ECUs 5, ie, the first virtual ECU 51 and the third virtual ECU 53 are the read flag string of the first virtual ECU 51 and the read flag string of the third virtual ECU 53. stored in The communication data identifier is associated with two read flags.
  • the read flag includes an ON state and an OFF state. When the read flag is on, it is necessary to read the communication data of the identifier associated with the read flag. If the read flag is in the OFF state, it is unnecessary to read the communication data of the identifier associated with the read flag.
  • Communication among the plurality of virtual ECUs 5 is performed by exchanging communication data between the plurality of virtual ECUs 5 via the communication data storage area 6 . Transfer of communication data between a plurality of virtual ECUs 5 will be described below. First, processing for writing communication data to the transmission/reception table 60 by the virtual ECU 5 that is the transmission source of the communication data will be described. This processing is processing for the virtual ECU 5 to transmit communication data to another virtual ECU 5 to which the communication data is transmitted.
  • the virtual ECU 5 that is the transmission source of the communication data specifies in the transmission/reception table 60 the same identifier as the identifier of the communication data to the other virtual ECU 5 that is the transmission destination of the communication data.
  • the virtual ECU 5 determines whether the write flag associated with the specified identifier in the transmission/reception table 60 is locked. Locking the write flag is to make it impossible to change the write flag from other programs at the same time by exclusive control. When the write flag is locked, the state of the write flag cannot be changed from one of the ON state and the OFF state to the other of the ON state and the OFF state by exclusive control except for the program that performed the lock control.
  • any program can change the state of the write flag from one of the on and off states to the other of the on and off states. Note that the program is executed by the virtual ECU 5 as described above. Hereinafter, switching from a state in which the write flag is locked to a state in which the write flag is not locked is also referred to as unlocking.
  • the virtual ECU 5 locks the write flag and turns on the write flag.
  • the virtual ECU 5 After turning on the write flag, the virtual ECU 5 writes the communication data to the other virtual ECU 5 in the transmission/reception table 60 in association with the identifier of the communication data and the write flag and read flag associated with the identifier. .
  • the above communication data is associated with an identifier identical to the identifier of the above communication data among the identifiers stored in advance in the transmission/reception table 60, and the write flag and read flag associated with the same identifier. , is written in the communication data column of the transmission/reception table 60 .
  • the virtual ECU 5 when the virtual ECU 5 writes new communication data to the transmission/reception table 60, the communication data having the same identifier as the identifier of the new communication data has already been written to the transmission/reception table 60 in association with the write flag and the read flag. is assumed. In such a case, the virtual ECU 5 overwrites the already written communication data with the new communication data. In other words, communication data with the same identifier in the transmission/reception table 60 is updated.
  • the virtual ECU 5 After writing the communication data to the transmission/reception table 60, the virtual ECU 5 turns on the read flag associated with the written communication data. For example, when the number of virtual ECUs 5 that receive the written communication data is plural, the virtual ECU 5 turns on a plurality of read flags associated with the written communication data. For example, the virtual ECU 5 writes communication data to be received by the first virtual ECU 51 and the second virtual ECU 52 into the transmission/reception table 60 . The virtual ECU 5 turns ON the read flag associated with the written communication data among the read flags stored in the read column of the first virtual ECU 51 and the read column of the second virtual ECU 52 in the transmission/reception table 60 .
  • the virtual ECU 5 changes the write flag associated with the written communication data from the ON state to the OFF state, and unlocks the write flag.
  • the virtual ECU 5 when the write flag is locked, the virtual ECU 5 does not write communication data to the transmission/reception table 60 .
  • the virtual ECU 5 writes the communication data to the transmission/reception table 60 in the next period.
  • the virtual ECU 5 is deactivated by switching the virtual ECU 5 by the virtual ECU management unit 10 .
  • the virtual ECU 5 is activated after being deactivated, performs the above-described processing, and writes the communication data to the transmission/reception table 60 .
  • the arithmetic unit 200 finishes generating the virtual ECU 5 and generates the virtual ECU 5 again, the virtual ECU 5 writes the communication data to the transmission/reception table 60 as described above.
  • the virtual ECU 5 When the write flag is locked, the virtual ECU 5 performs standby processing until the write flag is unlocked, and after the read flag is unlocked, writes the communication data to the transmission/reception table 60 as described above. It's okay.
  • This processing is processing for the virtual ECU 5 to receive communication data.
  • the virtual ECU 5 selects communication data associated with the ON state read flag among the read flags stored in the read flag column of the own virtual ECU, which is communication data associated with the OFF state write flag. , from the transmission/reception table 60 .
  • the virtual ECU 5 refers to the transmission/reception table 60 and determines whether or not the read flag of its own virtual ECU is on.
  • the virtual ECU 5 does not read communication data unless the read flag of its own virtual ECU is turned on. Note that the case where the read flag of the virtual ECU 5 is not in the ON state means that all the read flags stored in the read flag row of the virtual ECU 5 in the transmission/reception table 60 are in the OFF state.
  • the virtual ECU 5 performs the following processing when the read flag of its own virtual ECU is on.
  • the virtual ECU 5 determines whether or not the write flag associated with the read flag in the ON state among the read flags stored in the read flag string of the own virtual ECU is in the OFF state.
  • the case where the read flag of the virtual ECU 5 is on means that at least one of the read flags stored in the read flag column of the virtual ECU 5 in the transmission/reception table 60 is on.
  • the virtual ECU 5 locks the write flag. For example, when the virtual ECU 5 locks the write flag, it is assumed that the write flag has already been locked by another virtual ECU 5 . In this case, the virtual ECU 5 fails to lock the write flag. If the virtual ECU 5 fails to lock the write flag, it ends the process. When the virtual ECU 5 fails to lock the write flag, it may attempt to lock the write flag again.
  • the virtual ECU 5 After locking the write flags as described above, the virtual ECU 5 reads from the transmission/reception table 60 the communication data associated with the read flags in the ON state among the read flags stored in the read flag row of its own virtual ECU. In other words, the virtual ECU 5 reads the communication data associated with the locked write flag from the transmission/reception table 60 . By locking the write flag, communication data being read can be prevented from being updated.
  • the virtual ECU 5 When the write flag associated with the read flag in the ON state is ON, the communication data is being written, so the virtual ECU 5 does not read the communication data from the transmission/reception table 60 .
  • the virtual ECU 5 reads the communication data from the transmission/reception table 60 in the next period. Specifically, the virtual ECU 5 is deactivated by switching the virtual ECU 5 by the virtual ECU management unit 10 . Furthermore, the virtual ECU 5 is activated after being deactivated, performs the above-described processing, and reads communication data from the transmission/reception table 60 .
  • the arithmetic unit 200 finishes generating the virtual ECU 5 and generates the virtual ECU 5 again, the virtual ECU 5 reads the communication data from the transmission/reception table 60 as described above.
  • the virtual ECU 5 When the above write flag is in the ON state, the virtual ECU 5 performs standby processing until the write flag is in the OFF state. May be read.
  • the virtual ECU 5 sets the communication data associated with each of the read flags in the ON state as described above. to read from the transmission/reception table 60.
  • the virtual ECU 5 After reading the communication data from the transmission/reception table 60, the virtual ECU 5 changes the read flags associated with the read communication data out of the read flags stored in the read flag row of its own virtual ECU from the ON state to the OFF state. Further, the virtual ECU 5 unlocks the write flag associated with the read communication data. That is, the virtual ECU 5 unlocks the write flag locked by itself.
  • the communication data written in the transmission/reception table 60 may be read by one virtual ECU 5 or may be read by two or more virtual ECUs 5 .
  • the first virtual ECU 51 and the third virtual ECU 53 perform the following processing.
  • the first virtual ECU 51 turns off the read flag stored in the read flag string of the first virtual ECU 51 and associated with the read communication data.
  • the third virtual ECU 53 turns off the read flag stored in the read flag string of the third virtual ECU 53 and associated with the read communication data.
  • FIG. 5 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU 5 performed by the virtual ECU 5 .
  • the virtual ECU 5 performs the following processing when generated or activated.
  • the step is abbreviated as S.
  • the virtual ECU 5 identifies in the transmission/reception table 60 the same identifier as the identifier of the communication data to be transmitted to the other virtual ECU 5, and determines whether or not the write flag associated with the identified identifier in the transmission/reception table 60 is unlocked. (S11). If the write flag associated with the specified identifier is unlocked (S11: YES), the virtual ECU 5 attempts to lock the write flag (S12), and determines whether the write flag was successfully locked. is determined (S13). If the virtual ECU 5 fails to lock the write flag (S13: NO), that is, if it fails to lock the write flag, it ends the process. When the virtual ECU 5 fails to lock the write flag, it may attempt to lock the write flag again. For example, the virtual ECU 5 terminates the process when it fails to lock the write flag a predetermined number of times.
  • the virtual ECU 5 When the virtual ECU 5 successfully locks the write flag (S13: YES), that is, when the write flag is locked, the virtual ECU 5 turns on the locked write flag (S14). In other words, the write flag changes to the ON state after being locked.
  • the virtual ECU 5 writes communication data to another virtual ECU 5 in the transmission/reception table 60 in association with the identifier of the communication data and the write flag and read flag associated with the identifier (S15).
  • the communication data is updated in the transmission/reception table 60 .
  • the virtual ECU 5 turns on the read flag associated with the communication data written in the transmission/reception table 60 (S16). Further, the virtual ECU 5 turns off the write flag associated with the communication data written in the transmission/reception table 60 (S17), and unlocks the write flag (S18). The virtual ECU 5 ends the processing.
  • the virtual ECU 5 ends the process.
  • the virtual ECU 5 When the virtual ECU 5 is regenerated (activated), it performs processing related to transmission of communication data to another virtual ECU 5, and writes the communication data in the transmission/reception table as described above. If the write flag is not unlocked, the virtual ECU 5 may perform loop processing to perform the determination of S11 again. The virtual ECU 5 may perform standby processing for a predetermined time before performing the above loop processing. In other words, the virtual ECU 5 may perform the standby process until the write flag is unlocked, and perform the process of S12 when the write flag is unlocked.
  • FIG. 6 is a flowchart illustrating processing related to reception of communication data from another virtual ECU 5 performed by the virtual ECU 5 .
  • the virtual ECU 5 performs the following processing when generated or activated.
  • the virtual ECU 5 refers to the transmission/reception table 60 and determines whether or not the read flag of its own virtual ECU is ON (S21). If the read flag of the own virtual ECU is not on (S21: NO), the virtual ECU 5 ends the process.
  • the virtual ECU 5 When the read flag of its own virtual ECU is ON (S21: YES), the virtual ECU 5 performs the following processing. In the transmission/reception table 60, the virtual ECU 5 tries to lock the write flag associated with the read flag in the ON state among the read flags stored in the read flag row of the own virtual ECU (S22), and succeeds in locking the write flag. (S23). When the virtual ECU 5 fails to lock the write flag (S23: NO), that is, when it fails to lock the write flag, it ends the process. When the virtual ECU 5 fails to lock the write flag, it may attempt to lock the write flag again. For example, the virtual ECU 5 terminates the process when it fails to lock the write flag a predetermined number of times.
  • the virtual ECU 5 When the virtual ECU 5 successfully locks the write flag (S23: YES), that is, when the write flag is locked, the virtual ECU 5 determines whether the locked write flag is off (S24). If the above write flag is in the off state (S24: YES), the virtual ECU 5 sends communication data associated with the read flag in the on state among the read flags stored in the read flag column of the own virtual ECU to the transmission/reception table 60. (S25). That is, the virtual ECU 5 retrieves from the transmission/reception table 60 the communication data associated with the off-state write flags and the communication data associated with the on-state read flags among the read flags stored in the read flag string of the own virtual ECU. read out.
  • the virtual ECU 5 turns off the read flags associated with the communication data read from the transmission/reception table 60 among the read flags stored in the read flag string of its own virtual ECU (S26).
  • the virtual ECU 5 unlocks the write flag associated with the communication data read from the transmission/reception table 60 (S27), and ends the process.
  • the virtual ECU 5 ends the process.
  • the virtual ECU 5 When the virtual ECU 5 is regenerated (activated), it performs processing related to reception of communication data from another virtual ECU 5 and reads the communication data from the transmission/reception table 60 as described above. If the above write flag is not in the off state, the virtual ECU 5 may perform loop processing to perform the determination of S24 again.
  • the virtual ECU 5 may perform standby processing for a predetermined time before performing the above loop processing. In other words, the virtual ECU 5 may perform the standby process until the write flag is turned off, and perform the process of S25 when the write flag is turned off.
  • a plurality of virtual ECUs 5 are generated by the control unit 20 activating the virtualized operating system.
  • the virtual operating system is an operating system for constructing the virtual ECU 5, such as Hypervisor.
  • Communication among the plurality of virtual ECUs 5 is performed by exchanging communication data between the plurality of virtual ECUs 5 via the communication data storage area 6 .
  • the virtual ECU 5 that is the transmission source of the communication data writes the communication data to be transmitted to the other virtual ECU 5 that is the transmission destination of the communication data in the transmission/reception table 60 included in the communication data storage area 6 .
  • Communication data to be written is associated with a write flag and a read flag in the transmit/receive table 60 .
  • the virtual ECU 5 to which the communication data is sent After reading the communication data, the virtual ECU 5 to which the communication data is sent changes the read flag associated with the communication data from the ON state to the OFF state, thereby preventing the same communication data from being erroneously read again. be able to.
  • the communication data written in the transmission/reception table 60 is read by one virtual ECU 5 or two or more virtual ECUs 5 .
  • a read flag associated with the communication data in the transmission/reception table 60 is provided for the virtual ECU 5 that reads the communication data.
  • the virtual ECU 5 reads the communication data whose read flag is on from the transmission/reception table 60 .
  • the virtual ECU 5 turns off the read flag.
  • Virtual ECU5 can appropriately transmit communication data to virtual ECU5 of the transmission destination of communication data.
  • each of the plurality of virtual ECUs 5 as transmission destinations can read the communication data from the transmission/reception table 60 based on the corresponding read flag. Even in the above case, communication data can be efficiently exchanged between the plurality of virtual ECUs 5 .
  • the destination virtual ECU 5, that is, the receiving side virtual ECU 5 can specify the communication data that it should receive, so it is possible to omit the process of reading communication data that is not addressed to itself.
  • the virtual ECU 5 Before writing the communication data to the transmission/reception table 60, the virtual ECU 5 turns on the write flag associated with the communication data. After writing the communication data to the transmission/reception table 60, the virtual ECU 5 changes the write flag associated with the communication data from the ON state to the OFF state, and further sets the read flag associated with the communication data to the ON state. Since the write flag is on while the virtual ECU 5 is writing the communication data, it is possible to prevent the communication data being written from being read. Since the write flag and the read flag are updated as described above after the communication data is written, the communication data can be exchanged between the plurality of virtual ECUs 5 without competing in the writing and reading of the communication data in the transmission/reception table 60. can be done.
  • the communication data is written in the transmission/reception table 60 included in the communication data storage area 6 in association with the identifier, data length, write flag, and read flag.
  • the in-vehicle ECU 2 may be configured such that a plurality of pieces of communication data associated with the identifier, data length, write flag, and read flag are distributed and written in the communication data storage area 6 .
  • FIG. 7 is a block diagram illustrating the logical configuration of the in-vehicle ECU 2 of the second embodiment.
  • the same components as in the first embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted.
  • Embodiment 2 relates to an in-vehicle ECU 2 in which communication data is exchanged between a plurality of virtual ECUs 5 via a communication data storage area 6 including a transmission buffer 61 and a reception table 62 which will be described later.
  • the in-vehicle ECU 2 of Embodiment 2 includes a control section 20 and a storage section 21 .
  • the control unit 20 includes four arithmetic devices 200 including a first arithmetic device 201 , a second arithmetic device 202 , a third arithmetic device 203 and a fourth arithmetic device 204 .
  • the first virtual ECU 51 is periodically generated in the first computing device 201 .
  • the virtual control unit 5 a of the generated first virtual ECU 51 is assigned to the first arithmetic unit 201 . That is, the first arithmetic unit 201 functions as the generated first virtual ECU 51 .
  • the second virtual ECU 52 is periodically generated in the second arithmetic unit 202 .
  • the second arithmetic unit 202 functions as the generated second virtual ECU 52 .
  • the third virtual ECU 53 and the fourth virtual ECU 54 are alternately and periodically generated in the third arithmetic unit 203 .
  • the third arithmetic unit 203 functions as the generated third virtual ECU 53 .
  • the third arithmetic unit 203 functions as the generated fourth virtual ECU 54 .
  • the fourth arithmetic unit 204 functions as the virtual ECU management unit 10 as in the first embodiment. Furthermore, the fourth arithmetic unit 204 functions as a communication data management unit 11 that manages communication data transfer between a plurality of virtual ECUs 5 including the first virtual ECU 51, the second virtual ECU 52, the third virtual ECU 53, and the fourth virtual ECU 54. do. Processing performed by the communication data management unit 11 will be described later.
  • the communication data management section 11 corresponds to a management section.
  • the storage unit 21 includes a communication data storage area 6.
  • the communication data storage area 6 includes a transmission buffer 61 in which communication data transmitted by the virtual ECU 5 to other virtual ECUs 5 is written, and a reception table 62 in which communication data received by the virtual ECU 5 is written. include.
  • a transmission buffer 61 is provided for each virtual ECU 5 .
  • the communication data storage area 6 includes four transmission buffers 61 , a first transmission buffer 611 , a second transmission buffer 612 , a third transmission buffer 613 and a fourth transmission buffer 614 .
  • the first transmission buffer 611 corresponds to the first virtual ECU 51 .
  • the first virtual ECU 51 writes communication data to the first transmission buffer 611 .
  • the second transmission buffer 612 corresponds to the second virtual ECU 52 .
  • the second virtual ECU 52 writes communication data to the second transmission buffer 612 .
  • the third transmission buffer 613 corresponds to the third virtual ECU 53 .
  • the third virtual ECU 53 writes communication data to the third transmission buffer 613 .
  • a fourth transmission buffer 614 corresponds to the fourth virtual ECU 54 .
  • the fourth virtual ECU 54 writes communication data to the fourth transmission buffer 614 .
  • FIG. 8 is a schematic diagram illustrating the configuration of the transmission buffer 61.
  • the transmission buffer 61 stores one piece of communication data, the identifier of the communication data, and the data length of the communication data in association with each other. The data length may be omitted in the transmission buffer 61 .
  • FIG. 9 is a conceptual diagram illustrating the contents of the reception table 62.
  • the reception table 62 includes an identifier string, a data length string, a communication data string, a synchronization flag string, and a read flag string for each virtual ECU 5 .
  • Communication data is stored in the communication data string.
  • the identifier column stores identifiers of communication data. Specifically, in the identifier string, the identifiers of all communication data exchanged between the plurality of virtual ECUs 5 are stored in advance, similarly to the identifier string of the transmission/reception table 60 of the first embodiment. For example, the identifier of the communication data transmitted from one virtual ECU5 and the identifier of the communication data transmitted from other virtual ECU5 do not overlap.
  • the data length column stores the data length of the communication data.
  • a synchronization flag indicating that synchronization of communication data in the transmission buffer 61 and the reception table 62 is being performed is stored in the synchronization flag string. Synchronization of communication data in the transmission buffer 61 and reception table 62 will be described later.
  • a sync flag includes an ON state and an OFF state. When the synchronization flag is on, communication data in the transmission buffer 61 and the reception table 62 are synchronized. When the synchronization flag is off, synchronization of communication data in the transmission buffer 61 and the reception table 62 is not performed.
  • the communication data, the identifier of the communication data, the data length of the communication data, and the synchronization flag are stored in association with each other.
  • the read flag string for each virtual ECU 5 includes a reception information string and a read flag string provided for each virtual ECU 5, similar to the transmission/reception table 60 of the first embodiment.
  • Each received information string stores received information associated with an identifier, data length, communication data, and an update flag.
  • reception information associated with communication data to be received by the virtual ECU 5 is indicated as a reception target.
  • Received information associated with communication data that is not subject to reception by the virtual ECU 5 is indicated as excluded.
  • read flags are recorded and stored in association with reception information indicating reception targets, identifiers, data lengths, communication data, and update flags, as in the transmission/reception table 60 of the first embodiment. ing.
  • a transmission state including a busy state in which communication data is read from and written to the transmission buffer 61 and a ready state in which communication data is not read from and written to the transmission buffer 61 is stored. It is stored for each transmission buffer 61 . That is, the transmission state is stored in the communication data storage area 6 for each virtual ECU 5 .
  • the place where the transmission state is stored is not limited to the communication data storage area 6 as long as it is a place accessible by the virtual ECU 5 and the communication data management unit 11 , for example, the storage unit 21 .
  • the transmission status may be stored in transmission buffer 61 .
  • the virtual ECU 5 sets the transmission state of the transmission buffer 61 corresponding to its own virtual ECU to the ready state when it acquires a synchronization end signal, which will be described later, output from the communication data management unit 11 .
  • the virtual ECU 5 that is the transmission source of the communication data determines whether or not the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is in the ready state.
  • the virtual ECU 5 performs standby processing until the transmission state becomes the ready state. In other words, the virtual ECU 5 performs standby processing until it acquires the synchronization end signal output from the communication data management unit 11 .
  • the virtual ECU 5 When the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is in the ready state, the virtual ECU 5 changes the transmission state of the transmission buffer 61 from the ready state to the busy state.
  • the virtual ECU 5 writes the communication data to be transmitted to the other virtual ECU 5 in association with the identifier and data length of the communication data in the transmission buffer 61 corresponding to its own virtual ECU.
  • the virtual ECU 5 writing the communication data to the transmission buffer 61 also refers to the communication data, the identifier, and the data length being associated with each other and written to the transmission buffer 61 .
  • the reception table 62 corresponds to the first storage area.
  • the virtual ECU 5 writes the communication data, the identifier and the data length to the transmission buffer 61, the communication data, the identifier and the data length have already been written to the transmission buffer 61.
  • the virtual ECU 5 overwrites the already written communication data, identifier and data length with the newly written communication data, identifier and data length in the transmission buffer 61 .
  • the virtual ECU 5 updates the communication data in the transmission buffer 61 corresponding to its own virtual ECU.
  • the virtual ECU 5 After writing the communication data to the transmission buffer 61 corresponding to its own virtual ECU, the virtual ECU 5 outputs write completion information indicating that the communication data has been written to the transmission buffer 61 to the communication data management unit 11 .
  • the communication data management unit 11 is notified that the communication data has been written to the transmission buffer 61 .
  • the write completion information is distinguished for each virtual ECU 5 that outputs the write completion information. Therefore, by acquiring the output write completion information, the communication data management unit 11 can identify to which transmission buffer 61 of the four transmission buffers 61 the communication data has been written.
  • the communication data management unit 11 When the above write completion information output from the virtual ECU 5 is acquired, the communication data management unit 11 writes the communication data written in the transmission buffer 61 corresponding to the virtual ECU 5 to the reception table 62 . Specifically, before the communication data management unit 11 writes the communication data written in the transmission buffer 61 to the reception table 62, the synchronization flag associated with the identifier of the communication data and the reception table 62 is unlocked. Determine whether or not
  • the communication data management unit 11 locks the synchronization flag and turns on the locked synchronization flag.
  • the communication data management unit 11 associates the communication data written in the transmission buffer 61 with the identifier of the communication data in the reception table 62 and writes them in the reception table 62 .
  • the communication data associated with the above communication data identifier in the reception table 62 is updated.
  • the communication data written in the transmission buffer 61 and part of the communication data written in the reception table 62 are the same communication data. In other words, synchronization of communication data in the transmission buffer 61 and reception table 62 is performed.
  • the communication data management unit 11 After writing the communication data to the reception table 62, the communication data management unit 11 turns on the read flag associated with the identifier of the communication data in the reception table 62. Further, the communication data management unit 11 changes the synchronization flag associated with the communication data identifier from the ON state to the OFF state, and unlocks the changed synchronization flag. In other words, after writing the communication data to the reception table 62 , the communication data management unit 11 updates the synchronization flag and read flag associated with the identifier of the written communication data in the reception table 62 .
  • the communication data management unit 11 After updating the update flag and the read flag, the communication data management unit 11 outputs a synchronization end signal to the virtual ECU 5 corresponding to the transmission buffer 61 in which the synchronized communication data is written.
  • the synchronization end signal indicates that synchronization of communication data in the transmission buffer 61 and the reception table 62 has ended.
  • the virtual ECU 5 corresponding to the transmission buffer 61 in which the synchronized communication data is written is the virtual ECU 5 that outputs the write completion information.
  • the synchronization flag indicates that synchronization of communication data in the transmission buffer 61 and the reception table 62 is being performed.
  • the synchronous flag indicates that communication data is being written to the reception table 62 .
  • the synchronization flag is ON, communication data has been written to the reception table 62 .
  • the synchronization flag is off, writing of communication data to the reception table 62 has not been performed.
  • the reception table 62 is written with communication data read by the destination virtual ECU 5 .
  • the reception table 62 corresponds to the second storage area.
  • the synchronization flag corresponds to the second storage area write flag.
  • the communication data management unit 11 does not synchronize the communication data in the transmission buffer 61 and the reception table 62, and outputs the synchronization end signal and the write completion information to the virtual ECU 5 Output to Note that the end of synchronization includes the fact that synchronization was not performed.
  • the virtual ECU 5 to which the communication data is sent is the communication data associated with the synchronization flag in the OFF state, and is associated with the read flag in the ON state among the read flags stored in the read flag column of the own virtual ECU.
  • Communication data is read from the reception table 62 . That is, the virtual ECU 5 reads the communication data from the reception table 62 when the synchronization flag is off and the read flag is on.
  • the virtual ECU 5 refers to the reception table 62 and determines whether or not the read flag of its own virtual ECU is on.
  • the virtual ECU 5 does not read communication data unless the read flag of its own virtual ECU is turned on.
  • the case where the read flag of the virtual ECU 5 is not in the ON state means that all the read flags stored in the read flag column of the virtual ECU 5 in the reception table 62 are in the OFF state.
  • the virtual ECU 5 performs the following processing when the read flag of its own virtual ECU is on.
  • the virtual ECU 5 locks the synchronization flag associated with the ON-state read flag among the read flags stored in the read flag row of the own virtual ECU.
  • the case where the read flag of the virtual ECU 5 is ON means that at least one of the read flags stored in the read flag column of the virtual ECU 5 in the reception table 62 is in the ON state.
  • the virtual ECU 5 determines whether or not the locked synchronization flag is off. Virtual ECU5 performs the following processes, when the locked synchronous flag is in an OFF state.
  • the virtual ECU 5 reads from the reception table 62 the communication data associated with the ON-state read flags among the read flags stored in the read flag string of its own virtual ECU. In other words, the virtual ECU 5 reads communication data associated with the locked synchronization flag from the reception table 62 .
  • the virtual ECU 5 sets the communication data associated with each of the read flags in the ON state as described above. to read from the reception table 62.
  • the virtual ECU 5 After reading the communication data from the reception table 62, the virtual ECU 5 changes the read flag associated with the read communication data from the on state to the off state among the read flags stored in the read flag row of the own virtual ECU. Furthermore, the virtual ECU 5 unlocks the synchronization flag associated with the read communication data.
  • the virtual ECU 5 does not read communication data from the reception table 62 when the locked synchronization flag is on.
  • the virtual ECU 5 reads communication data from the reception table 62 in the next cycle.
  • the synchronization flag is ON, the virtual ECU 5 performs standby processing until the synchronization flag is turned OFF, and after the synchronization flag is turned OFF, the communication data is transferred from the reception table 62 as described above. May be read.
  • FIG. 10 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU 5 performed by the virtual ECU 5 of the second embodiment.
  • the virtual ECU 5 performs the following processing when generated or activated.
  • the virtual ECU 5 that is the transmission source of the communication data determines whether or not the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is ready (S31). If the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is not ready (S31: NO), that is, if the transmission state is busy, the virtual ECU 5 performs loop processing to perform the processing of S31 again. In other words, the virtual ECU 5 performs standby processing until the transmission state of the transmission buffer 61 corresponding to its own virtual ECU reaches the ready state.
  • the virtual ECU 5 When the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is in the ready state (S31: YES), the virtual ECU 5 changes the transmission state of the transmission buffer 61 from the ready state to the busy state (S32). As described above, the virtual ECU 5 writes the communication data to be transmitted to the other virtual ECU 5 in association with the identifier and data length of the communication data in the transmission buffer 61 corresponding to its own virtual ECU. In other words, the virtual ECU 5 updates the communication data, the identifier and the data length in the transmission buffer 61 corresponding to its own virtual ECU (S33).
  • the virtual ECU 5 After writing the communication data, the identifier and the data length to the transmission buffer 61 corresponding to its own virtual ECU 5, the virtual ECU 5 outputs the write completion information to the communication data management unit 11 (S34), and ends the process.
  • the write completion information output to the communication data management unit 11 is a so-called interrupt notification to the communication data management unit 11 .
  • the virtual ECU 5 may perform the process of S31 instead of ending the process.
  • FIG. 11 is a flowchart illustrating processing related to communication data synchronization in the transmission buffer 61 and the reception table 62 performed by the communication data management unit 11 .
  • the fourth arithmetic unit 204 functions as the communication data management unit 11 when an IG (ignition) switch of the vehicle changes from a stopped state to an activated state.
  • the communication data management part 11 performs the following processes, when the above-mentioned write completion information output from virtual ECU5 is acquired.
  • the communication data management unit 11 determines whether or not the identifier of the communication data written in the transmission buffer 61 corresponding to the virtual ECU 5 that has output the write completion information and the synchronization flag associated in the reception table 62 are unlocked. (S41). If the synchronization flag is not unlocked (S41: NO), that is, if the synchronization flag is locked, the communication data management unit 11 performs the process of S49, which will be described later.
  • the communication data management unit 11 attempts to lock the synchronization flag (S42), and determines whether or not the synchronization flag has been successfully locked. (S43). If the synchronization flag is not successfully locked (S43: NO), that is, if the synchronization flag is not successfully locked, the communication data management unit 11 performs the process of S49, which will be described later. When the communication data management unit 11 fails to lock the synchronization flag, it may attempt to lock the synchronization flag again. For example, the communication data management unit 11 performs the process of S49 when the locking of the synchronization flag fails a predetermined number of times.
  • the communication data management unit 11 When the synchronization flag is successfully locked (S43: YES), that is, when the synchronization flag is locked, the communication data management unit 11 turns on the locked synchronization flag (S44).
  • the communication data management unit 11 associates the communication data written in the transmission buffer 61 with the identifier of the communication data in the reception table 62, and writes them in the reception table 62 (S45).
  • Communication data in the transmission buffer 61 and the reception table 62 are synchronized. In other words, the communication data are updated in the reception table 62 .
  • the communication data management unit 11 turns on the read flag associated with the communication data identifier in the reception table 62 (S46). Furthermore, the communication data management unit 11 turns off the synchronization flag associated with the communication data identifier (S47), and unlocks the synchronization flag that has been turned off (S48).
  • the communication data management unit 11 outputs a synchronization end signal to the virtual ECU 5 that has output the write completion information (S49), and terminates the process.
  • the virtual ECU 5 changes the transmission state of the transmission buffer 61 of its own virtual ECU to the ready state by acquiring the output synchronization end signal.
  • the synchronization end signal output to the virtual ECU 5 is a so-called interrupt notification to the virtual ECU 5 .
  • FIG. 12 is a flowchart illustrating processing related to reception of communication data from another virtual ECU 5 performed by the virtual ECU 5 of the second embodiment.
  • the virtual ECU 5 performs the following processing when generated or activated.
  • the virtual ECU 5 refers to the reception table 62 and determines whether or not the read flag of its own virtual ECU is on (S51). If the read flag of the own virtual ECU is not on (S51: NO), the virtual ECU 5 ends the process.
  • Virtual ECU5 performs the following processes, when the read-out flag of self virtual ECU is an ON state (S51:YES).
  • the virtual ECU 5 tries to lock the synchronization flag associated with the read flag in the ON state among the read flags stored in the read flag string of its own virtual ECU (S52), and succeeds in locking the synchronization flag. (S53).
  • the virtual ECU 5 fails to lock the synchronization flag (S53: NO), that is, when it fails to lock the synchronization flag, it ends the process.
  • the virtual ECU 5 fails to lock the synchronization flag, it may attempt to lock the synchronization flag again. For example, the virtual ECU 5 terminates the process when it fails to lock the synchronization flag a predetermined number of times.
  • the virtual ECU 5 determines whether the locked synchronization flag is off (S54). If the synchronization flag is OFF (S54: YES), the virtual ECU 5 receives the communication data associated with the ON read flag among the read flags stored in the read flag column of the virtual ECU. (S55). That is, the virtual ECU 5 retrieves from the transmission/reception table 60 the communication data associated with the ON-state read flag among the read flags stored in the read flag string of the virtual ECU 5, which is communication data associated with the OFF-state synchronization flag. read out.
  • the virtual ECU 5 turns off the read flag associated with the communication data read from the reception table 62 among the read flags stored in the read flag string of its own virtual ECU (S56).
  • the virtual ECU 5 unlocks the synchronization flag associated with the communication data read from the reception table 62 (S57), and ends the process.
  • the virtual ECU 5 ends the process.
  • the virtual ECU 5 When the virtual ECU 5 is regenerated (activated), it performs processing related to receiving communication data from another virtual ECU 5, and reads the communication data from the reception table 62 as described above. If the synchronization flag is not in the OFF state, the virtual ECU 5 may perform loop processing to perform the determination of S54 again.
  • the virtual ECU 5 may perform standby processing for a predetermined time before performing the above loop processing. In other words, the virtual ECU 5 may perform the standby process until the synchronization flag is turned off, and perform the process of S55 when the synchronization flag is turned off.
  • the communication data storage area 6 includes a transmission buffer 61 provided for each of the plurality of virtual ECUs 5 and a reception table 62 accessible by each virtual ECU 5 and the communication data management unit 11 .
  • the virtual ECU 5 writes communication data to be transmitted to the other virtual ECUs 5 into the transmission buffer 61 corresponding to its own virtual ECU.
  • the communication data management unit 11 writes the communication data written in the first storage area to the second storage area. Before writing the communication data written in the transmission buffer 61 to the reception table 62 , the communication data management unit 11 turns on the synchronization flag associated with the communication data in the reception table 62 .
  • the communication data management unit 11 After writing the communication data to the reception table 62, the communication data management unit 11 changes the synchronization flag associated with the communication data from the ON state to the OFF state in the reception table 62, and further changes the read flag associated with the communication data. turn on.
  • the virtual ECU 5 to which the communication data is to be sent has the synchronization flag turned off and the read flag corresponding to the own virtual ECU is turned on, the synchronization flag is turned off and the read flag is turned on
  • the communication data indicating the state is read from the reception table 62 . Since the transmission buffer 61 is provided for each of the multiple virtual ECUs 5 , the multiple virtual ECUs 5 do not write the communication data to the same transmission buffer 61 .
  • the virtual ECU 5 can write the communication data into its own transmission buffer corresponding to its own virtual ECU without waiting for the end of the writing.
  • the virtual ECU 5 can write communication data to the transmission buffer 61 corresponding to its own virtual ECU even when another virtual ECU 5 is reading communication data from the reception table 62 .
  • the arithmetic device 200 functioning as the virtual ECU management unit 10 and the arithmetic device 200 functioning as the communication data management unit 11 are the same virtual ECU 5 .
  • the arithmetic device 200 functioning as the virtual ECU management unit 10 and the arithmetic device 200 functioning as the communication data management unit 11 may be different virtual ECUs 5 .
  • the same virtual ECU 5 may function both as the virtual ECU 5 and as the communication data management unit 11 .
  • FIG. 13 is a schematic diagram illustrating the configuration of the transmission buffer 61 according to the third embodiment.
  • the same components as those in Embodiment 2 are denoted by the same reference numerals, and detailed description thereof will be omitted.
  • Embodiment 3 relates to an in-vehicle ECU 2 in which communication data is exchanged between a plurality of virtual ECUs 5 via a communication data storage area 6 including a transmission buffer 61 into which a plurality of communication data can be written.
  • the communication data storage area 6 of Embodiment 3 includes a transmission buffer 61 into which multiple pieces of communication data can be written.
  • the transmission buffer 61 is provided for each of the multiple virtual ECUs 5, as in the second embodiment.
  • the transmission buffer 61 stores communication data, an identifier of the communication data, and a data length of the communication data in association with each other.
  • the transmission buffer 61 is configured so that a plurality of pieces of communication data can be written in association with identifiers, data lengths, and count values.
  • the transmission buffer 61 in FIG. 13 has N stages and has N stages. Note that N is a natural number.
  • One piece of communication data is written in association with the identifier and data length of the communication data in one stage. Therefore, up to N pieces of communication data, identifiers, and data lengths can be written in association with each other in the transmission buffer 61 of FIG.
  • the virtual ECU 5 can write a plurality of pieces of communication data to the transmission buffer 61 corresponding to its own virtual ECU.
  • the number of writes indicating the number of pieces of communication data written in the transmission buffer 61 is stored for each transmission buffer 61.
  • the virtual ECU 5 Before writing the first communication data out of the N pieces of communication data, the virtual ECU 5 sets the number of writes to 0 in the transmission buffer 61 corresponding to its own virtual ECU.
  • the virtual ECU 5 increases the number of data written in the transmission buffer 61 corresponding to the own virtual ECU by one.
  • the virtual ECU 5 associates the first communication data with the identifier and data length of the communication data, and writes them to the first stage of the transmission buffer 61 corresponding to the own virtual ECU.
  • the virtual ECU 5 may increase the number of writes by 1 before writing the communication data to the transmission buffer 61 or may increase the number of writes by 1 after writing the communication data to the transmission buffer 61 .
  • the virtual ECU 5 When writing the second communication data to the transmission buffer, the virtual ECU 5 increments the number of writes in the transmission buffer 61 corresponding to its own virtual ECU by one.
  • the virtual ECU 5 associates the second communication data with the identifier and data length of the communication data, and writes them to the second stage of the transmission buffer 61 corresponding to the own virtual ECU.
  • the virtual ECU 5 repeats incrementing the number of writes in the transmission buffer 61 corresponding to its own virtual ECU by 1, associating communication data with the identifier and data length of the communication data, and writing the communication data in the transmission buffer 61 .
  • the virtual ECU 5 When writing the N-th communication data to the transmission buffer, the virtual ECU 5 increments the number of writes in the transmission buffer 61 corresponding to its own virtual ECU by one.
  • the virtual ECU 5 associates the N-th communication data with the identifier and data length of the communication data, and writes them to the N-th stage of the transmission buffer 61 corresponding to the own virtual ECU. All communication data scheduled to be transmitted from the virtual ECU 5 to another virtual ECU 5 are written in the transmission buffer 61 .
  • the virtual ECU 5 outputs write completion information to the communication data management unit 11 after writing all the communication data to be transmitted to the other virtual ECU 5 in the transmission buffer 61 .
  • the virtual ECU 5 When writing new communication data to the transmission buffer 61, if the communication data has already been written to the transmission buffer 61, the virtual ECU 5 writes the new communication data to the already written communication data, as in the second embodiment. Overwrite. For example, when the number of pieces of communication data already written in the transmission buffer 61 is greater than the number of pieces of communication data newly written by the virtual ECU 5, the virtual ECU 5 updates the communication data in the transmission buffer 61 as follows. good too. The virtual ECU 5 stores the new communication data, the identifier and the data length of the new communication data, part of the communication data already written in the transmission buffer 61, and the part of the communication data. Overwrite the identifier and data length.
  • the virtual ECU 5 deletes the remaining communication data and the identifier and data length of the remaining communication data from the communication data already written in the transmission buffer 61 .
  • the virtual ECU 5 may delete all communication data, identifiers and data lengths already written in the transmission buffer 61 and write new communication data, identifiers and data lengths in the transmission buffer 61 .
  • the virtual ECU 5 increases by 1 the number of writes in the transmission buffer 61 into which the communication data is written each time one piece of communication data is written into the transmission buffer 61 .
  • the virtual ECU 5 updates the number of writes each time one piece of communication data is written in the transmission buffer 61 .
  • the number of pieces written in the first transmission buffer 611 is set to N.
  • the virtual ECU 5 increases the number of written data by 1 each time it writes one piece of communication data to the transmission buffer 61, but the method of increasing the number of written data is not limited to the above method.
  • the virtual ECU 5 may increase the number of pieces of data written in the transmission buffer 61 according to the number of pieces of communication data written in the transmission buffer 61 corresponding to its own virtual ECU. For example, after writing a plurality of pieces of communication data in the transmission buffer 61, the virtual ECU 5 may set the number of pieces of communication data written in the transmission buffer 61 to the number of pieces of written communication data.
  • the communication data storage area 6 stores, for each transmission buffer 61, the number of synchronizations indicating the number of pieces of communication data that have been synchronized in the transmission buffer 61 and the reception table 62. That is, the number of synchronizations is stored in the communication data storage area 6 for each virtual ECU 5 .
  • the communication data management unit 11 When the communication data management unit 11 acquires the write completion information output from the virtual ECU 5, it performs the following processing.
  • the communication data management unit 11 refers to the communication data storage area 6 and acquires the number of writes in the transmission buffer 61 corresponding to the virtual ECU 5 that has output the acquired write completion information. In the above example, the number of writes in the transmission buffer 61 is N.
  • the communication data management unit 11 sets the number of synchronous data in the transmission buffer 61 to zero.
  • the communication data management unit 11 reads the first communication data from the transmission buffer 61 and writes the read communication data to the reception table 62 in the same manner as in the second embodiment. In other words, the first communication data is synchronized in the transmission buffer 61 and reception table 62 .
  • the first communication data is communication data in the first stage of the transmission buffer 61 described above.
  • the communication data management unit 11 After writing the first communication data read from the transmission buffer 61 to the reception table 62, the communication data management unit 11 increases the synchronization number of the transmission buffer 61 by one. The communication data management unit 11 compares the obtained number of written data in the transmission buffer 61 with the synchronous number of data in the transmission buffer 61 .
  • the communication data management unit 11 When the synchronous number is smaller than the written number, that is, when the written number and the synchronous number do not match, the communication data management unit 11 reads the second communication data from the transmission buffer 61 and executes the read communication data. Write to the reception table 62 in the same manner as in form 2.
  • the second communication data is communication data in the second stage of the transmission buffer 61 described above. After writing the second communication data to the reception table 62, the communication data management unit 11 increases the number of synchronization data in the transmission buffer 61 by one. Furthermore, the communication data management unit 11 compares the number of writes in the transmission buffer 61 and the number of synchronizations.
  • the communication data management unit 11 writes communication data to the reception table 62 and increments the number of synchronizations in the transmission buffer 61 by 1 until the number of writings in the transmission buffer 61 and the number of synchronizations in the transmission buffer 61 match. repeat. In the above example, the communication data management unit 11 repeats writing communication data to the reception table 62 and increasing the number of synchronizations in the transmission buffer 61 by 1 until the number of synchronizations in the transmission buffer 61 reaches N. .
  • the location where the number of writes and the number of synchronizations are stored is not limited to the communication data storage area 6 as long as it is accessible by the virtual ECU 5 and the communication data management unit 11, such as the storage unit 21.
  • the number of writes and the number of synchronizations may be stored in the transmission buffer 61 .
  • the communication data management unit 11 when communication data with an identifier associated with a locked synchronization flag in the reception table 62 is written in the transmission buffer 61, the communication data management unit 11 performs the following processing.
  • the communication data management unit 11 increases the number of synchronizations in the transmission buffer 61 by 1 without synchronizing the communication data in the transmission buffer 61 and the reception table 62 .
  • the communication data management unit 11 compares the number of writes in the transmission buffer 61 and the number of synchronizations. When the number of synchronizations is smaller than the number of writings, the communication data management unit 11 synchronizes the transmission buffer 61 and the reception table 62 as described above for the next communication data of the above communication data.
  • the virtual ECU 5 to which the communication data is sent reads the communication data from the reception table 62 in the same manner as in the second embodiment.
  • FIG. 14 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU 5 performed by the virtual ECU 5 of the third embodiment.
  • the virtual ECU 5 performs the following processing when generated or activated.
  • the virtual ECU 5 sets the number of writes in the transmission buffer 61 corresponding to its own virtual ECU to 0 (S61).
  • the virtual ECU 5 determines whether or not there is unsent communication data (S62).
  • Communication data that has not been transmitted is communication data that is not written in the transmission buffer 61 among communication data scheduled to be transmitted to another virtual ECU 5 .
  • the virtual ECU 5 If there is unsent communication data (S62: YES), the virtual ECU 5 writes the unsent communication data and the identifier and data length of the communication data to the transmission buffer 61 corresponding to the own virtual ECU as described above. (S63). For example, the virtual ECU 5 writes one piece of communication data among the unsent communication data, and the identifier and data length of the communication data in the transmission buffer 61 corresponding to the own virtual ECU as described above. As described above, the virtual ECU 5 increases the number of writes in the transmission buffer 61 corresponding to its own virtual ECU (S64). For example, the virtual ECU 5 increases the number of data written in the transmission buffer 61 by one when writing one communication data in the transmission buffer 61 . The virtual ECU 5 performs the process of S62.
  • the virtual ECU 5 If there is no unsent communication data (S62: NO), the virtual ECU 5 outputs write completion information to the communication data management unit 11 (S65), and ends the process.
  • FIG. 15 is a flowchart illustrating processing related to communication data synchronization in the transmission buffer 61 and the reception table 62 performed by the communication data management unit 11 of the third embodiment.
  • the communication data management part 11 performs the following processes, when the above-mentioned write completion information output from virtual ECU5 is acquired.
  • the communication data management unit 11 acquires the number of writes in the transmission buffer 61 corresponding to the virtual ECU 5 that has output the acquired write completion information (S71).
  • the communication data management unit 11 sets the number of synchronization data in the transmission buffer 61 to 0 (S72).
  • the communication data management unit 11 determines whether or not the number of synchronizations is smaller than the acquired number of writes (S73).
  • the communication data management unit 11 performs the process of S74. Since the processing of S74 is the same as the processing of S41 of the second embodiment, detailed description thereof will be omitted. If the synchronization flag is not unlocked (S74: NO), that is, if the synchronization flag is locked, the communication data management unit 11 performs the process of S82, which will be described later.
  • the communication data management unit 11 performs the processes of S75 and S76. Since the processes of S75 and S76 are the same as the processes of S42 and S43 of the second embodiment, detailed description thereof will be omitted. If the synchronization flag is not successfully locked (S76: NO), that is, if the synchronization flag is not successfully locked, the communication data management unit 11 performs the process of S82, which will be described later. When the communication data management unit 11 fails to lock the synchronization flag, it may attempt to lock the synchronization flag again. For example, the communication data management unit 11 performs the process of S82 when the locking of the synchronization flag fails a predetermined number of times.
  • the communication data management unit 11 When the synchronization flag is successfully locked (S76: YES), that is, when the synchronization flag is locked, the communication data management unit 11 performs the processes of S77, S78, S79, S80 and S81. Since the processes of S77, S78, S79, S80 and S81 are the same as the processes of S44, S45, S46, S47 and S48 of the second embodiment, detailed description thereof will be omitted. As described above, the communication data management unit 11 increases the number of synchronized data in the transmission buffer 61 (S82), and performs the process of S73. For example, the communication data management unit 11 increases the number of synchronizations in the transmission buffer 61 by 1 as described above.
  • the communication data management unit 11 terminates the process.
  • a flow chart illustrating processing related to reception of communication data from another virtual ECU 5 performed by the virtual ECU 5 of the third embodiment is omitted because it is the same as that of the second embodiment.
  • the virtual ECU 5 can write a plurality of pieces of communication data to the transmission buffer 61 corresponding to its own virtual ECU.
  • the virtual ECU 5 increases the number of pieces of data written in the transmission buffer 61 according to the number of pieces of communication data written in the transmission buffer 61 corresponding to its own virtual ECU.
  • a plurality of pieces of communication data written in the transmission buffer 61 can be efficiently written in the reception table 62 without omission based on the number of pieces written in the communication data management unit 11 . Since the virtual ECU 5 can write a plurality of pieces of communication data to the transmission buffer 61 , it is not necessary to output write completion information to the communication data management unit 11 every time one piece of communication data is written to the transmission buffer 61 .
  • the frequency of communication between the virtual ECU 5 and the communication data management unit 11 can be reduced. Communication between multiple virtual ECUs can be performed more efficiently.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mechanical Engineering (AREA)
  • Small-Scale Networks (AREA)

Abstract

This an on-board apparatus comprises: a control unit that generates a plurality of virtual devices that form an operating environment of a computer program; and a storage unit that includes a communication data storage area to which is written communication data that is sent and received in communication among the plurality of virtual devices. The communication data storage area includes a write flag that is associated with the communication data and indicates that communication data is being written, and a read flag that is associated with the communication data and indicates whether reading of the communication data is required. A virtual device, when communicating with another virtual device, writes the communication data for the other virtual device to the communication data storage area, and the other virtual device, if the write flag is in the off state and the read flag is in the on state, reads the communication data from the communication data storage area. After the communication data is read, the read flag is set to the off state.

Description

車載装置、情報処理方法、及びコンピュータプログラムIn-vehicle device, information processing method, and computer program
 本開示は、車載装置、情報処理方法、及びコンピュータプログラムに関する。
 本出願は、2021年3月12日出願の日本出願第2021-040293号に基づく優先権を主張し、前記日本出願に記載された全ての記載内容を援用するものである。
The present disclosure relates to an in-vehicle device, an information processing method, and a computer program.
This application claims priority based on Japanese application No. 2021-040293 filed on March 12, 2021, and incorporates all the descriptions described in the Japanese application.
 車両に搭載され、当該車両に搭載された機器の制御と、車外通信及び自動運転等の走行制御とに関する情報処理を行う電子制御装置が知られている(例えば特許文献1)。特許文献1の電子制御装置は、複数のコアを有するマルチコアCPU(Central Processing Unit)を備える。マルチコアCPU上で複数のプログラムシステムが動作する。上記の電子制御装置には、プログラムが実行されることによって実現される機能の構成要素として、ハイパーバイザが搭載されている。上記の電子制御装置は、当該ハイパーバイザにより、マルチコアCPU上で複数の仮想装置を作成して並列に動作させ、作成された仮想装置上でOS(Operation System)を動作させる。 An electronic control device that is mounted on a vehicle and performs information processing related to control of equipment mounted on the vehicle and control of vehicle-external communication and travel control such as automatic driving is known (for example, Patent Document 1). The electronic control device of Patent Document 1 includes a multi-core CPU (Central Processing Unit) having a plurality of cores. A plurality of program systems operate on the multi-core CPU. A hypervisor is installed in the above electronic control unit as a component of functions realized by executing a program. The above electronic control unit creates a plurality of virtual devices on the multi-core CPU by the hypervisor, operates them in parallel, and operates an OS (Operation System) on the created virtual devices.
特開2019-179397号公報JP 2019-179397 A
 本開示の一態様に係る車載装置は、複数のプログラムを実行する制御部と、該制御部によって起動される仮想化オペレーティングシステムが記憶されている記憶部とを備え、前記仮想化オペレーティングシステムを起動することにより、前記プログラムの動作環境となる複数の仮想装置が生成され、前記記憶部は、複数の前記仮想装置の間の通信において授受される通信データが書き込まれる通信データ記憶領域を含み、前記通信データ記憶領域には、前記通信データと関連付けられ、前記通信データの書き込み中を示す書き込みフラグと、前記通信データと関連付けられ、前記通信データの読み出しの要否を示す読み出しフラグとが設けられ、前記仮想装置は、他の仮想装置と通信する際に、該他の仮想装置への前記通信データを前記通信データ記憶領域に書き込み、前記他の仮想装置は、前記書き込みフラグがオフ状態であって、前記読み出しフラグがオン状態である場合に、前記仮想装置からの前記通信データを前記通信データ記憶領域から読み出し、前記通信データの読み出し後、前記読み出しフラグをオフ状態にする。 An in-vehicle device according to an aspect of the present disclosure includes a control unit that executes a plurality of programs, and a storage unit that stores a virtualized operating system activated by the control unit, and activates the virtualized operating system. By doing so, a plurality of virtual devices that serve as operating environments for the program are generated, the storage unit includes a communication data storage area in which communication data exchanged in communication between the plurality of virtual devices is written, and A communication data storage area is provided with a write flag associated with the communication data and indicating that the communication data is being written, and a read flag associated with the communication data and indicating whether or not the communication data needs to be read, When communicating with another virtual device, the virtual device writes the communication data to the other virtual device into the communication data storage area, and the other virtual device writes the data when the write flag is off. and when the read flag is on, the communication data from the virtual device is read from the communication data storage area, and after the communication data is read, the read flag is turned off.
実施形態1に係る車載システムの構成を例示する模式図である。1 is a schematic diagram illustrating the configuration of an in-vehicle system according to Embodiment 1; FIG. 車載ECUの物理構成を例示するブロック図である。2 is a block diagram illustrating the physical configuration of an in-vehicle ECU; FIG. 車載ECUの論理構成を例示するブロック図である。It is a block diagram which illustrates the logical structure of vehicle-mounted ECU. 送受信テーブルの内容を例示する概念図である。4 is a conceptual diagram illustrating the contents of a transmission/reception table; FIG. 仮想ECUが行う他の仮想ECUへの通信データの送信に係る処理を例示するフローチャートである。7 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU performed by a virtual ECU; 仮想ECUが行う他の仮想ECUからの通信データの受信に係る処理を例示するフローチャートである。7 is a flowchart illustrating processing related to reception of communication data from another virtual ECU performed by a virtual ECU; 実施形態2の車載ECUの論理構成を例示するブロック図である。FIG. 7 is a block diagram illustrating the logical configuration of an in-vehicle ECU of Embodiment 2; 送信バッファの構成を例示する模式図である。4 is a schematic diagram illustrating the configuration of a transmission buffer; FIG. 受信テーブルの内容を例示する概念図である。4 is a conceptual diagram illustrating contents of a reception table; FIG. 実施形態2の仮想ECUが行う他の仮想ECUへの通信データの送信に係る処理を例示するフローチャートである。9 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU performed by the virtual ECU of the second embodiment; 通信データ管理部が行う送信バッファ及び受信テーブルにおける通信データの同期に係る処理を例示するフローチャートである。7 is a flowchart illustrating processing related to synchronization of communication data in a transmission buffer and a reception table performed by a communication data management unit; 実施形態2の仮想ECUが行う他の仮想ECUからの通信データの受信に係る処理を例示するフローチャートである。9 is a flowchart illustrating processing related to reception of communication data from another virtual ECU performed by the virtual ECU of the second embodiment; 実施形態3の送信バッファの構成を例示する模式図である。FIG. 11 is a schematic diagram illustrating the configuration of a transmission buffer according to Embodiment 3; 実施形態3の仮想ECUが行う他の仮想ECUへの通信データの送信に係る処理を例示するフローチャートである。10 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU performed by the virtual ECU of the third embodiment; 実施形態3の通信データ管理部が行う送信バッファ及び受信テーブルにおける通信データの同期に係る処理を例示するフローチャートである。14 is a flowchart illustrating processing related to synchronization of communication data in a transmission buffer and a reception table performed by a communication data management unit according to the third embodiment;
[本開示が解決しようとする課題]
 特許文献1の電子制御装置においては、電子制御装置が備えるメモリ等の記憶部を介して、複数の仮想装置の間の通信が行われる場合がある。上記の通信において、送信元の仮想装置が記憶部へ通信データを書き込みことと、送信先の仮想装置が記憶部に書き込まれた通信データを読み出すこととによって、複数の仮想装置の間にて通信データの授受が行われる。このとき、記憶部への通信データの書き込み中に当該通信データの読み出しが行われること、いわゆるアクセスの競合が発生することによって、複数の仮想装置の間の通信が効率的に行われないおそれがある。
[Problems to be Solved by the Present Disclosure]
In the electronic control device of Patent Document 1, communication may be performed between a plurality of virtual devices via a storage unit such as a memory included in the electronic control device. In the above communication, the transmission source virtual device writes the communication data to the storage unit, and the transmission destination virtual device reads the communication data written in the storage unit. Data is exchanged. At this time, communication data may be read out while the communication data is being written to the storage unit, or a so-called access conflict may occur, which may hinder efficient communication between multiple virtual devices. be.
 本開示は斯かる事情に鑑みてなされたものであり、複数の仮想装置の間において、効率的に通信データの授受を行うことができる車載装置等を提供することを目的とする。 The present disclosure has been made in view of such circumstances, and aims to provide an in-vehicle device or the like capable of efficiently exchanging communication data between a plurality of virtual devices.
[本開示の効果]
 本開示の一態様によれば、複数の仮想装置の間において、効率的に通信データの授受を行うことができる。
[Effect of the present disclosure]
According to one aspect of the present disclosure, it is possible to efficiently exchange communication data between a plurality of virtual devices.
[本開示の実施形態の説明]
 最初に本開示の実施態様を列挙して説明する。また、以下に記載する実施形態の少なくとも一部を任意に組み合わせてもよい。
[Description of Embodiments of the Present Disclosure]
First, embodiments of the present disclosure are enumerated and described. Moreover, at least part of the embodiments described below may be combined arbitrarily.
(1)本開示の一態様に係る車載装置は、複数のプログラムを実行する制御部と、該制御部によって起動される仮想化オペレーティングシステムが記憶されている記憶部とを備え、前記仮想化オペレーティングシステムを起動することにより、前記プログラムの動作環境となる複数の仮想装置が生成され、前記記憶部は、複数の前記仮想装置の間の通信において授受される通信データが書き込まれる通信データ記憶領域を含み、前記通信データ記憶領域には、前記通信データと関連付けられ、前記通信データの書き込み中を示す書き込みフラグと、前記通信データと関連付けられ、前記通信データの読み出しの要否を示す読み出しフラグとが設けられ、前記仮想装置は、他の仮想装置と通信する際に、該他の仮想装置への前記通信データを前記通信データ記憶領域に書き込み、前記他の仮想装置は、前記書き込みフラグがオフ状態であって、前記読み出しフラグがオン状態である場合に、前記仮想装置からの前記通信データを前記通信データ記憶領域から読み出し、前記通信データの読み出し後、前記読み出しフラグをオフ状態にする。 (1) An in-vehicle device according to an aspect of the present disclosure includes a control unit that executes a plurality of programs, and a storage unit that stores a virtualization operating system activated by the control unit. By activating the system, a plurality of virtual devices are generated as an operating environment for the program, and the storage unit has a communication data storage area in which communication data exchanged in communication between the plurality of virtual devices is written. the communication data storage area includes a write flag associated with the communication data and indicating that the communication data is being written; and a read flag associated with the communication data and indicating whether or not the communication data should be read. When communicating with another virtual device, the virtual device writes the communication data to the other virtual device into the communication data storage area, and the other virtual device is in the off state of the write flag. When the read flag is on, the communication data from the virtual device is read from the communication data storage area, and after the communication data is read, the read flag is turned off.
 本態様にあたっては、制御部が仮想化オペレーティングシステムを起動することにより、複数の仮想装置は生成される。複数の仮想装置が通信を行う際、複数の仮想装置のうち、仮想装置は、他の仮想通信へ送信する通信データを通信データ記憶領域に書き込む。通信データ記憶領域において、書き込まれる通信データは、書き込みフラグ及び読み出しフラグと関連付けられる。書き込みフラグがオン状態である場合、当該書き込みフラグと関連付けられる通信データは通信データ記憶領域に書き込み中である。書き込みフラグがオフ状態である場合、当該書き込みフラグと関連付けられる通信データの書き込みは行われていない。読み出しフラグがオン状態である場合、当該読み出しフラグと関連付けられる通信データの読み出しが必要である。読み出しフラグがオフ状態である場合、当該読み出しフラグと関連付けられる通信データの読み出しは不要である。通信データの送信先の仮想装置は、書き込みフラグがオフ状態であって、読み出しフラグがオン状態である場合に、通信データを通信データ記憶領域から読み出す。書き込みフラグがオフ状態である通信データが読み出されるので、通信データの読み出しの際に、当該通信データの書き込みは行われていない。通信データ記憶領域に対する通信データ書き込み及び読み出しは競合しないので、複数の仮想装置の間において、効率的に通信データの授受を行うことができる。言い換えると、複数の仮想装置の間の通信を効率的に行うことができる。仮想装置は通信データの読み出し後、当該通信データと関連付けられた読み出しフラグをオン状態からオフ状態に変更するので、誤って同一の通信データを再度読み出してしまうことを防止することができる。 In this aspect, a plurality of virtual devices are generated by the control unit activating the virtualization operating system. When a plurality of virtual devices communicate, one of the plurality of virtual devices writes communication data to be transmitted to another virtual communication in the communication data storage area. In the communication data storage area, communication data to be written is associated with a write flag and a read flag. If the write flag is on, the communication data associated with the write flag is being written to the communication data storage area. When the write flag is in the OFF state, the communication data associated with the write flag has not been written. If the read flag is in the ON state, it is necessary to read the communication data associated with that read flag. If the read flag is in the off state, it is not necessary to read the communication data associated with that read flag. The communication data destination virtual device reads the communication data from the communication data storage area when the write flag is off and the read flag is on. Since the communication data whose write flag is in the OFF state is read, the communication data is not written when the communication data is read. Since there is no contention between writing and reading communication data to and from the communication data storage area, communication data can be efficiently exchanged between a plurality of virtual devices. In other words, communication between multiple virtual devices can be performed efficiently. After reading the communication data, the virtual device changes the read flag associated with the communication data from the ON state to the OFF state, so that it is possible to prevent the same communication data from being erroneously read again.
(2)本開示の一態様に係る車載装置は、前記読み出しフラグは、前記通信データを読み出す前記仮想装置に対して設けられる。 (2) In the in-vehicle device according to one aspect of the present disclosure, the read flag is provided for the virtual device that reads the communication data.
 本態様にあたっては、仮想装置によって通信データ記憶領域に書き込まれる通信データは、自仮想装置を除く複数の仮想装置のうち、1つの他の仮想装置又は2つ以上の他の仮想装置によって読み出される。通信データ記憶領域において通信データと関連付けられる読み出しフラグは、当該通信データを読み出す仮想装置に対して設けられる。例えば通信データが2つの仮想装置によって読み出される場合、即ち通信データの送信先が2つの仮想装置である場合、当該2つの仮想装置それぞれに対して、読み出しフラグは設けられる。上記の通信データは、通信データ記憶領域において2つの読み出しフラグと関連付けられる。仮想装置は、書き込みフラグがオフ状態であって、自仮想装置に対して設けられた読み出しフラグがオン状態である場合に、当該読み出しフラグがオン状態である通信データを読み出す。仮想装置は通信データの読み出し後、上記の読み出しフラグをオフ状態にする。仮想装置は、通信データの送信先の仮想装置へ通信データを適切に送信することができる。複数の仮想装置が通信データの送信先である場合であっても、送信先の複数の仮想装置それぞれは、仮想装置に対して設けられた読み出しフラグに基づき通信データを通信データ記憶領域から読み出すことができる。上記の場合であっても、複数の仮想装置の間において、効率的に通信データの授受を行うことができる。 In this aspect, the communication data written by the virtual machine to the communication data storage area is read by one or two or more other virtual machines out of a plurality of virtual machines other than the own virtual machine. A read flag associated with the communication data in the communication data storage area is provided for the virtual device reading the communication data. For example, if the communication data is read by two virtual devices, that is, if the destination of the communication data is two virtual devices, a read flag is provided for each of the two virtual devices. The above communication data is associated with two read flags in the communication data storage area. When the write flag is OFF and the read flag provided for the virtual device is ON, the virtual device reads the communication data whose read flag is ON. After reading the communication data, the virtual device turns off the read flag. The virtual device can appropriately transmit the communication data to the destination virtual device of the communication data. Even if a plurality of virtual devices are destinations of communication data, each of the plurality of destination virtual devices can read the communication data from the communication data storage area based on the read flag provided for the virtual device. can be done. Even in the above case, communication data can be efficiently exchanged between a plurality of virtual devices.
(3)本開示の一態様に係る車載装置は、前記仮想装置は、前記通信データを前記通信データ記憶領域に書き込む前に、前記書き込みフラグをオン状態にし、前記通信データの前記通信データ記憶領域への書き込み後に、前記書き込みフラグをオフ状態にし、更に、前記通信データ記憶領域に書き込んだ前記通信データと関連付けられる前記読み出しフラグをオン状態にする。 (3) In an in-vehicle device according to an aspect of the present disclosure, the virtual device turns on the write flag before writing the communication data to the communication data storage area, and writes the communication data to the communication data storage area. After writing to the communication data storage area, the write flag is turned off, and the read flag associated with the communication data written to the communication data storage area is turned on.
 本態様にあたっては、仮想装置は、通信データ記憶領域に通信データを書き込む前に、当該通信データと関連付けられる書き込みフラグをオン状態にする。仮想装置は、通信データ記憶領域への通信データの書き込み後、当該通信データと関連付けられる書き込みフラグをオン状態からオフ状態に変更し、更に上記の通信データと関連付けられる読み出しフラグをオン状態にする。仮想装置による通信データの書き込み中において書き込みフラグはオン状態であるので、書き込み中の通信データを読み出すことを防止することができる。通信データの書き込み後に書き込みフラグ及び読み出しフラグは上述のように更新されるので、通信データ記憶領域に対する通信データの書き込み及び読み出しが競合することなく、複数の仮想装置の間における通信データの授受を行うことができる。 In this aspect, the virtual device turns on the write flag associated with the communication data before writing the communication data to the communication data storage area. After writing the communication data to the communication data storage area, the virtual device changes the write flag associated with the communication data from the ON state to the OFF state, and further sets the read flag associated with the communication data to the ON state. Since the write flag is on while the communication data is being written by the virtual device, it is possible to prevent the communication data being written from being read. Since the write flag and the read flag are updated as described above after the communication data is written, communication data can be exchanged between a plurality of virtual devices without contention between the writing and reading of communication data in the communication data storage area. be able to.
(4)本開示の一態様に係る車載装置は、前記通信データ記憶領域は、複数の前記仮想装置それぞれに対して設けられ、前記仮想装置が前記他の仮想装置への前記通信データを書き込む第1記憶領域と、前記仮想装置によって読み出される前記通信データが書き込まれる第2記憶領域とを含み、前記書き込みフラグは、前記第2記憶領域への前記通信データの書き込み中を示す第2記憶領域書き込みフラグを含み、複数の前記仮想装置の間における前記通信データの授受を管理する管理部は、前記第1記憶領域に書き込まれる前記通信データを前記第2記憶領域に、前記第2記憶領域書き込みフラグ、及び前記読み出しフラグと関連付けて書き込み、前記通信データの前記第2記憶領域への書き込み前に、前記第2記憶領域書き込みフラグをオン状態にし、前記通信データの前記第2記憶領域への書き込み後に、前記第2記憶領域書き込みフラグをオフ状態にし、更に、前記第2記憶領域に書き込んだ前記通信データと関連付けられる前記読み出しフラグをオン状態にし、前記仮想装置は、前記第2記憶領域書き込みフラグがオフ状態であって、前記読み出しフラグがオン状態である場合に前記第2記憶領域から前記通信データを読み出す。 (4) In the in-vehicle device according to an aspect of the present disclosure, the communication data storage area is provided for each of the plurality of virtual devices, and the virtual device writes the communication data to the other virtual device. and a second storage area to which the communication data read by the virtual device is written, wherein the write flag indicates that the communication data is being written to the second storage area. A management unit that includes a flag and manages transmission and reception of the communication data between the plurality of virtual devices writes the communication data written in the first storage area to the second storage area with the second storage area write flag. , and writing in association with the read flag, turning on the second storage area write flag before writing the communication data to the second storage area, and after writing the communication data to the second storage area , the second storage area write flag is turned off, and the read flag associated with the communication data written to the second storage area is turned on, and the virtual device turns on the second storage area write flag The communication data is read from the second storage area when the read flag is in the off state and the read flag is in the on state.
 本態様にあたっては、通信データ記憶領域は第1記憶領域と第2記憶領域とを含む。第1記憶領域は、複数の仮想装置それぞれに対して設けられている。制御部は、複数の仮想装置の間における通信データの授受を管理する管理部としても機能する。複数の仮想装置のうち、一の仮想装置は他の仮想装置へ送信する通信データを、一の仮想装置に対して設けられた第1記憶領域に書き込む。管理部は、第1記憶領域に書き込まれる通信データを第2記憶領域に書き込む。第2記憶領域において、通信データは第2記憶領域書き込みフラグ及び読み出しフラグと関連付けられる。管理部は、通信データを第2記憶領域に書き込む前に、当該通信データの第2記憶領域書き込みフラグをオン状態にする。管理部は、通信データの第2記憶領域への書き込み後に、当該通信データの第2記憶領域書き込みフラグをオン状態からオフ状態に変更し、更に上記の通信データの読み出しフラグをオン状態にする。通信データの送信先である他の仮想装置は、自仮想装置と対応する読み出しフラグがオン状態である場合、当該読み出しフラグがオン状態である通信データを第2記憶領域から読み出す。第1記憶領域は仮想装置それぞれに対して設けられているので、複数の仮想装置が通信データを同一の第1記憶領域に書き込むことはない。仮想装置は、他の仮想装置による通信データの書き込みが行われている場合でも、当該書き込みの終了を待つことなく、自仮想装置に対して設けられた第1記憶領域に通信データを書き込むことができる。仮想装置は、他の仮想装置が第2記憶領域から通信データを読み出している際にも、自仮想装置に対して設けられた第1記憶領域に通信データを書き込むことができる。 In this aspect, the communication data storage area includes a first storage area and a second storage area. A first storage area is provided for each of the plurality of virtual devices. The control unit also functions as a management unit that manages transmission and reception of communication data between a plurality of virtual devices. One of the plurality of virtual devices writes communication data to be transmitted to another virtual device into a first storage area provided for one virtual device. The management unit writes communication data written in the first storage area to the second storage area. In the second storage area, the communication data is associated with a second storage area write flag and a read flag. The management unit turns on the second storage area write flag of the communication data before writing the communication data to the second storage area. After writing the communication data to the second storage area, the management unit changes the second storage area write flag of the communication data from the ON state to the OFF state, and further turns the communication data read flag to the ON state. When the read flag corresponding to the own virtual device is in the ON state, the other virtual device to which the communication data is sent reads the communication data with the read flag in the ON state from the second storage area. Since the first storage area is provided for each virtual device, multiple virtual devices do not write communication data to the same first storage area. Even if communication data is being written by another virtual machine, the virtual machine can write communication data to the first storage area provided for its own virtual machine without waiting for the end of the writing. can. A virtual machine can write communication data to the first storage area provided for its own virtual machine even when another virtual machine is reading communication data from the second storage area.
(5)本開示の一態様に係る車載装置は、前記仮想装置は、複数の前記通信データを前記第1記憶領域に書き込み、前記第1記憶領域に書き込まれた前記通信データの個数を示す書き込み個数を増加させる。 (5) In the in-vehicle device according to an aspect of the present disclosure, the virtual device writes a plurality of the communication data to the first storage area, and writes the number of the communication data written to the first storage area. Increase the number.
 本態様にあたっては、仮想装置は自仮想装置に対して設けられた第1記憶領域に複数の通信データを書き込む。仮想装置は第1記憶領域に書き込んだ通信データの個数に応じて、第1記憶領域に書き込まれた通信データの個数を示す書き込み個数を増加させる。管理部は、書き込み個数を参照することによって、第1記憶領域に書き込まれた複数の通信データを漏れなく、効率的に第2記憶領域に書き込むことができる。仮想装置が第1記憶領域に1つの通信データしか書き込むことができない場合であって、複数の通信データを他の仮想装置へ送信する場合、仮想装置は、1つの通信データを書き込むごとに、管理部へ通信データを書き込んだ旨を通知する必要がある。仮想装置が第1記憶領域に複数の通信データを書き込むことができるので、仮想装置及び管理部の間における通信の頻度を少なくすることができる。複数の仮想装置の間における通信を、より効率的に行うことができる。 In this aspect, the virtual device writes a plurality of pieces of communication data to the first storage area provided for its own virtual device. The virtual device increases the write count indicating the number of pieces of communication data written to the first storage area according to the number of pieces of communication data written to the first storage area. By referring to the number of writes, the management unit can efficiently write a plurality of pieces of communication data written in the first storage area to the second storage area without omission. When a virtual device can write only one piece of communication data to the first storage area, and a plurality of pieces of communication data are to be sent to other virtual devices, the virtual device writes one piece of communication data to the management It is necessary to notify the department that the communication data has been written. Since the virtual device can write a plurality of pieces of communication data to the first storage area, it is possible to reduce the frequency of communication between the virtual device and the management unit. Communication between multiple virtual devices can be made more efficient.
(6)本開示の一態様に係る情報処理方法は、複数のプログラムの動作環境となる複数の仮想装置を車載装置において生成し、前記仮想装置が他の仮想装置と通信する際に、該他の仮想装置への通信データを、複数の前記仮想装置の間の通信において授受される前記通信データが書き込まれる通信データ記憶領域に書き込み、前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの書き込み中を示す書き込みフラグがオフ状態であって、前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの読み出しの要否を示す読み出しフラグがオン状態である場合に、前記仮想装置からの前記通信データを前記通信データ記憶領域から読み出し、前記通信データの読み出し後、前記読み出しフラグをオフ状態にする。 (6) An information processing method according to an aspect of the present disclosure generates a plurality of virtual devices that serve as operating environments for a plurality of programs in an in-vehicle device, and when the virtual device communicates with another virtual device, to a communication data storage area in which the communication data exchanged in communication between the plurality of virtual machines is written, and is associated with the communication data in the communication data storage area, When a write flag indicating that data is being written is in an off state, and a read flag associated with the communication data in the communication data storage area and indicating whether or not to read the communication data is in an on state, the virtual The communication data from the device is read from the communication data storage area, and after the communication data is read, the read flag is turned off.
 本態様にあたっては、態様(1)と同様に、通信データ記憶領域に対する通信データ書き込み及び読み出しは競合しないので、複数の仮想装置の間の通信を効率的に行うことができる。 In this aspect, as in the case of aspect (1), there is no contention between writing and reading communication data to and from the communication data storage area, so communication between a plurality of virtual devices can be performed efficiently.
(7)本開示の一態様に係るコンピュータプログラムは、車両に搭載されるコンピュータに処理を実行させるコンピュータプログラムであって、複数のプログラムの動作環境となる複数の仮想装置を生成し、前記仮想装置が他の仮想装置と通信する際に、該他の仮想装置への通信データを、複数の前記仮想装置の間の通信において授受される前記通信データが書き込まれる通信データ記憶領域に書き込み、前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの書き込み中を示す書き込みフラグがオフ状態であって、前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの読み出しの要否を示す読み出しフラグがオン状態である場合に、前記仮想装置からの前記通信データを前記通信データ記憶領域から読み出し、前記通信データの読み出し後、前記読み出しフラグをオフ状態にする処理をコンピュータに実行させる。 (7) A computer program according to an aspect of the present disclosure is a computer program that causes a computer mounted on a vehicle to execute processing, generates a plurality of virtual devices that serve as operating environments for a plurality of programs, and communicates with another virtual device, writes communication data to the other virtual device into a communication data storage area in which the communication data exchanged in communication between the plurality of said virtual devices is written; a write flag associated with the communication data in the data storage area and indicating that the communication data is being written is in an off state; causes the computer to read the communication data from the virtual device from the communication data storage area and turn off the read flag after reading the communication data when the read flag indicated by the virtual device is on.
 本態様にあたっては、コンピュータを、本開示の一態様の車載装置として機能させることができる。 In this aspect, the computer can function as an in-vehicle device of one aspect of the present disclosure.
[本開示の実施形態の詳細]
 本開示をその実施形態を示す図面に基づいて具体的に説明する。本開示の実施形態に係る車載装置を、以下に図面を参照しつつ説明する。なお、本開示はこれらの例示に限定されるものではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。
[Details of Embodiments of the Present Disclosure]
The present disclosure will be specifically described based on the drawings showing the embodiments thereof. An in-vehicle device according to an embodiment of the present disclosure will be described below with reference to the drawings. The present disclosure is not limited to these examples, but is indicated by the scope of the claims, and is intended to include all modifications within the meaning and scope of equivalents of the scope of the claims.
 (実施形態1)
 以下、実施の形態について図面に基づいて説明する。図1は、実施形態1に係る車載システムSの構成を例示する模式図である。車載システムSは、車両Cに搭載される複数の車載ECU2を含む。車載ECU2には車載機器3が接続される。
(Embodiment 1)
Embodiments will be described below with reference to the drawings. FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system S according to the first embodiment. The in-vehicle system S includes a plurality of in-vehicle ECUs 2 mounted on the vehicle C. As shown in FIG. An in-vehicle device 3 is connected to the in-vehicle ECU 2 .
 複数の車載ECU2は、車両Cの全体を制御する統合的な車載ECU2(統合ECU)、及び当該統合的な車載ECU2と通信可能に接続され、車載機器3と直接、接続される個別的な車載ECU2(個別ECU)を含むものであってもよい。統合的な車載ECU2は、図示しない車外通信装置を介して、インターネット等の外部ネットワークに接続される図示しない外部サーバと、通信可能に接続されるものであってもよい。車載ECU2は車載装置に相当する。 The plurality of in-vehicle ECUs 2 includes an integrated in-vehicle ECU 2 (integrated ECU) that controls the entire vehicle C, and an individual in-vehicle ECU 2 that is communicably connected to the integrated in-vehicle ECU 2 and directly connected to the in-vehicle device 3. The ECU 2 (individual ECU) may be included. The integrated in-vehicle ECU 2 may be communicably connected to an external server (not shown) connected to an external network such as the Internet via an external communication device (not shown). The in-vehicle ECU 2 corresponds to an in-vehicle device.
 図1において、統合的な車載ECU2と、複数の個別的な車載ECU2とは、スター状のネットワークトポロジーを形成する車載ネットワーク4によって通信可能に接続される。当該統合的な車載ECU2は、スター状のネットワークトポロジーの中心に位置して設けられている。車載システムSにおけるネットワークトポロジーは上記の例に限定されない。車載システムSは、隣接する個々の個別的な車載ECU2同士が接続され、ループ状のネットワークトポロジーを構成し、双方向通信を可能として冗長化を図る構成であってもよい。 In FIG. 1, the integrated vehicle ECU 2 and a plurality of individual vehicle ECUs 2 are communicably connected by the vehicle network 4 forming a star-shaped network topology. The integrated in-vehicle ECU 2 is provided at the center of a star-shaped network topology. The network topology in the in-vehicle system S is not limited to the above examples. The in-vehicle system S may have a configuration in which adjacent individual in-vehicle ECUs 2 are connected to form a loop-shaped network topology, enabling two-way communication and achieving redundancy.
 個別的な車載ECU2は、車両Cにおける各エリアに配置され、複数の車載機器3と接続される。個別的な車載ECU2は、接続される車載機器3と信号又はデータを送受信する。また個別的な車載ECU2は、統合的な車載ECU2と通信を行う。個別的な車載ECU2は、当該個別的な車載ECU2に接続される複数の車載機器3間の通信、又は車載機器3と他の車載ECU2との通信を中継するゲートウェイ又はイーサスイッチ等の車載中継装置として機能する中継制御ECUであってもよい。個別的な車載ECU2は、通信に関する中継に加え、図示しない蓄電装置から出力された電力を分配及び中継し、自ECUに接続される車載機器3に供給する電力分配装置としても機能してよい。 Individual vehicle-mounted ECUs 2 are arranged in each area of vehicle C and connected to a plurality of vehicle-mounted devices 3 . The individual vehicle-mounted ECU 2 transmits and receives signals or data to and from the vehicle-mounted device 3 to which it is connected. Moreover, separate vehicle-mounted ECU2 communicates with comprehensive vehicle-mounted ECU2. The individual in-vehicle ECU 2 is an in-vehicle relay device such as a gateway or ether switch that relays communication between a plurality of in-vehicle devices 3 connected to the individual in-vehicle ECU 2, or communication between the in-vehicle device 3 and another in-vehicle ECU 2. It may be a relay control ECU that functions as a In addition to relaying communication, the individual vehicle-mounted ECU 2 may also function as a power distribution device that distributes and relays power output from a power storage device (not shown) and supplies the power to the vehicle-mounted device 3 connected to its own ECU.
 車載機器3は例えば、ドア開閉装置、及びモータ装置等のアクチュエータ30と、LiDAR(Light Detection and Ranging)、ライトセンサ、CMOSカメラ、及び赤外線センサ等の各種センサ31とを含む。車載機器3は上記の例に限定されず、ドアSW(スイッチ)、及びランプSW等のスイッチでもよく、ランプでもよい。 The in-vehicle device 3 includes, for example, actuators 30 such as door opening/closing devices and motor devices, and various sensors 31 such as LiDAR (Light Detection and Ranging), light sensors, CMOS cameras, and infrared sensors. The in-vehicle device 3 is not limited to the above example, and may be a switch such as a door SW (switch) and a lamp SW, or may be a lamp.
 統合的な車載ECU2は、例えばヴィークルコンピュータ等の中央制御装置である。統合的な車載ECU2は、個別的な車載ECU2等の他の車載ECU2を介して中継された車載機器3からのデータに基づき、個々の車載機器3への制御信号を生成及び出力する。統合的な車載ECU2は、他の車載ECU2から出力される要求信号等の情報又はデータに基づき、当該要求信号の対象となるアクチュエータ30を制御するための制御信号を生成し、生成した制御信号を他の車載ECU2に出力する。本実施形態において車載システムSは、統合的な車載ECU2及び個別的な車載ECU2によって構成されるが、車載システムSは、統合的な車載ECU2及び個別的な車載ECU2による構成に限定されない。車載システムSは、例えばCAN(Controller Area Network)ゲートウェイ又はイーサスイッチ等の中継装置によってピアツーピアに接続された複数の車載ECU2によって構成されるものであってもよい。 The integrated in-vehicle ECU 2 is, for example, a central control unit such as a vehicle computer. The integrated vehicle-mounted ECU 2 generates and outputs control signals to individual vehicle-mounted devices 3 based on data from the vehicle-mounted devices 3 relayed via other vehicle-mounted ECUs 2 such as individual vehicle-mounted ECUs 2 . The integrated in-vehicle ECU 2 generates a control signal for controlling the actuator 30, which is the target of the request signal, based on information or data such as a request signal output from another in-vehicle ECU 2, and outputs the generated control signal. It outputs to other in-vehicle ECU2. In this embodiment, the in-vehicle system S is configured by the integrated in-vehicle ECU 2 and the individual in-vehicle ECU 2, but the in-vehicle system S is not limited to the configuration of the integrated in-vehicle ECU 2 and the individual in-vehicle ECU 2. The in-vehicle system S may be composed of a plurality of in-vehicle ECUs 2 connected peer-to-peer by a relay device such as a CAN (Controller Area Network) gateway or Ethernet switch.
 図2は、車載ECU2の物理構成を例示するブロック図である。車載ECU2は、制御部20、記憶部21及び車内通信部22を含む。制御部20は、CPU、又はMPU(Micro Processing Unit)等の演算処理装置によって構成される。制御部20は、記憶部21に予め記憶された制御プログラムP及びデータを読み出して実行することにより、種々の制御処理及び演算処理等を行うようにしてある。制御部20は、例えば、シングルコアのシングルCPU、シングルコアのマルチCPU、マルチコアのシングルCPU、及びマルチコアのマルチCPUを含む。制御部20は、CPU等のソフトウェア処理を行うソフトウェア処理部のみに限定されず、FPGA、ASIC又はSOC等のハードウェア処理にて種々の制御処理及び演算処理等を行うハードウェア処理部を含むものであってもよい。 FIG. 2 is a block diagram illustrating the physical configuration of the in-vehicle ECU 2. As shown in FIG. The in-vehicle ECU 2 includes a control section 20 , a storage section 21 and an in-vehicle communication section 22 . The control unit 20 is configured by an arithmetic processing device such as a CPU or an MPU (Micro Processing Unit). The control unit 20 reads out and executes a control program P and data stored in advance in the storage unit 21, thereby performing various control processing, arithmetic processing, and the like. The control unit 20 includes, for example, a single-core single CPU, a single-core multi-CPU, a multi-core single CPU, and a multi-core multi-CPU. The control unit 20 is not limited to a software processing unit that performs software processing such as a CPU, but includes a hardware processing unit that performs various control processing and arithmetic processing by hardware processing such as FPGA, ASIC, or SOC. may be
 制御部20は、例えばCPUの1つのコアによって構成される演算装置200を含む。本実施形態においては、制御部20がクアッドコアのCPUである例を説明する。制御部20はクアッドコアなので4つのコアを有する。制御部20は、第1のコアによって構成される第1演算装置201と、第2のコアによって構成される第2演算装置202と、第3のコアによって構成される第3演算装置203と、第4のコアによって構成される第4演算装置204との4つの演算装置200を含む。なお演算装置200の個数は4つに限定されない。 The control unit 20 includes an arithmetic device 200 configured by, for example, one core of a CPU. In this embodiment, an example in which the control unit 20 is a quad-core CPU will be described. Since the control unit 20 is a quad-core, it has four cores. The control unit 20 includes a first arithmetic unit 201 configured with a first core, a second arithmetic unit 202 configured with a second core, a third arithmetic unit 203 configured with a third core, It includes four processing units 200 with a fourth processing unit 204 configured by a fourth core. Note that the number of arithmetic units 200 is not limited to four.
 記憶部21は、RAM(Random Access Memory)等の揮発性のメモリ素子又は、ROM(Read Only Memory)、EEPROM(Electrically Erasable Programmable ROM)若しくはフラッシュメモリ等の不揮発性のメモリ素子によって構成される。記憶部21は、上記の揮発性のメモリ素子及び不揮発性のメモリ素子等の記憶デバイスの組み合わせにより構成されてもよい。記憶部21には、制御プログラムP及び処理時に参照するデータが予め記憶してある。当該制御プログラムPは、例えば、各種の車載機器3を制御するためのプログラム、又はLiDAR又はCMOSカメラからの出力データ基づき自動化運転を行うための物標認識を行うプログラム等の複数のプログラムを含む。これらのプログラムはアプリケーションとも称される。更に、車載ECU2の記憶部21には、例えば、Hypervisor、VMware又はXen等の仮想化オペレーティングシステムが記憶されている。 The storage unit 21 is composed of a volatile memory element such as RAM (Random Access Memory) or a non-volatile memory element such as ROM (Read Only Memory), EEPROM (Electrically Erasable Programmable ROM), or flash memory. The storage unit 21 may be configured by a combination of storage devices such as the above volatile memory elements and nonvolatile memory elements. The storage unit 21 stores in advance the control program P and data to be referred to during processing. The control program P includes, for example, a plurality of programs such as a program for controlling various vehicle-mounted devices 3, or a program for performing target recognition for automated driving based on output data from a LiDAR or CMOS camera. These programs are also called applications. Furthermore, the memory|storage part 21 of vehicle-mounted ECU2 is memorize|stored virtualization operating systems, such as Hypervisor, VMware, or Xen, for example.
 なお記憶部21に記憶された制御プログラムPは、車載ECU2が読み取り可能な記録媒体Aから読み出された制御プログラムPを記憶したものであってもよい。また、図示しない通信網に接続されている図示しない外部コンピュータから制御プログラムPをダウンロードし、記憶部21に記憶させたものであってもよい。制御プログラムPは、コンピュータプログラムに相当する。 The control program P stored in the storage unit 21 may be the control program P read from the recording medium A readable by the in-vehicle ECU 2 . Alternatively, the control program P may be downloaded from an external computer (not shown) connected to a communication network (not shown) and stored in the storage unit 21 . The control program P corresponds to a computer program.
 車内通信部22は、例えばCAN(Controller Area Network)又はイーサネット(Ethernet/登録商標)の通信プロトコルを用いた入出力インターフェイスであり、制御部20は、車内通信部22を介して車載ネットワーク4に接続されている他の車載ECU2と相互に通信する。 The in-vehicle communication unit 22 is, for example, an input/output interface using a CAN (Controller Area Network) or Ethernet (Ethernet/registered trademark) communication protocol. Communicate with other in-vehicle ECUs 2 that are installed.
 図3は、車載ECU2の論理構成を例示するブロック図である。上述のように車載ECU2の記憶部21には、例えば、Hypervisor、VMware又はXen等の仮想化オペレーティングシステムが記憶されている。車載ECU2の制御部20は、仮想化オペレーティングシステムを用いて起動することにより、仮想化オペレーティングシステム上にて複数の仮想ECU5を構築することができる。各種の車載機器3を制御するためのプログラムは、これら複数の仮想ECU5のうちのいずれかの仮想ECU5を動作環境として、実行される。すなわち、これらプログラムは、いずれかの仮想ECU5上にて、実行されるものとなる。仮想ECU5がプログラムを実行することにより、当該プログラムの処理内容に応じて単一又は複数のタスクが生成される。当該タスクによって、より細分化又は区分化された処理単位が実行されるものとなる。 FIG. 3 is a block diagram illustrating the logical configuration of the in-vehicle ECU 2. As shown in FIG. As described above, the storage unit 21 of the in-vehicle ECU 2 stores, for example, a virtualization operating system such as Hypervisor, VMware, or Xen. The control part 20 of vehicle-mounted ECU2 can construct|assemble several virtual ECU5 on a virtualization operating system by starting using a virtualization operating system. A program for controlling various vehicle-mounted devices 3 is executed using one of the plurality of virtual ECUs 5 as an operating environment. That is, these programs are executed on one of the virtual ECUs 5 . When the virtual ECU 5 executes the program, single or multiple tasks are generated according to the processing contents of the program. A more subdivided or partitioned unit of processing is executed by the task.
 本実施形態においては、仮想化の方式が、仮想化オペレーティングシステムによって直接的に制御部20等のハードウェアリソースにアクセスするハイパーバイザ方式である例を説明するが、仮想化の方式はハイパーバイザ方式に限定されない。例えば仮想化の方式は、仮想化オペレーティングシステムとハードウェアリソースとの間にLinux(登録商標)等のオペレーティングシステムが介在するホストOS方式であってもよい。また仮想化の方式は、コンテナ方式の仮想化オペレーティングシステムを用いるものであってもよい。 In this embodiment, an example will be described in which the virtualization method is a hypervisor method in which hardware resources such as the control unit 20 are accessed directly by the virtualization operating system. is not limited to For example, the virtualization method may be a host OS method in which an operating system such as Linux (registered trademark) intervenes between the virtualized operating system and hardware resources. Also, the virtualization method may use a container-based virtualization operating system.
 仮想化オペレーティングシステムを用いて起動した車載ECU2は、仮想化オペレーティングシステムの機能により、複数の仮想ECU5を構築することができる。複数の仮想ECU5には、車載ECU2が備える制御部20及び記憶部21等のハードウェアリソースが割り当てられる。例えば仮想ECU5は、制御部20に割り当てられる仮想制御部5aと、記憶部21に割り当てられる仮想記憶部5bと、車内通信部22に割り当てられる図示しない仮想車内通信部とを含む。仮想ECU5は、仮想装置に相当する。 The in-vehicle ECU 2 activated using the virtualized operating system can construct a plurality of virtual ECUs 5 using the functions of the virtualized operating system. Hardware resources, such as the control part 20 and the memory|storage part 21 with which vehicle-mounted ECU2 is provided, are allocated to several virtual ECU5. For example, the virtual ECU 5 includes a virtual control unit 5a assigned to the control unit 20, a virtual storage unit 5b assigned to the storage unit 21, and a virtual in-vehicle communication unit (not shown) assigned to the in-vehicle communication unit 22. The virtual ECU 5 corresponds to a virtual device.
 仮想ECU5それぞれの仮想記憶部5bそれぞれには、例えばUbuntu(登録商標)等のゲストOSが記憶され、仮想ECU5それぞれはゲストOSを起動し、当該ゲストOSの上でプログラムを実行する。当該ゲストOSは、個々の仮想ECU5に応じて、異なる種類のOSであってもよい。上述のごとく仮想記憶部5bの実体は、仮想ECU5それぞれに割り当てられた記憶部21の記憶領域であるため、ゲストOSも仮想化オペレーティングシステムと同様に記憶部21に記憶されていることは、言うまでもない。コンテナ方式の仮想化オペレーティングシステムを用いる場合、ゲストOSを不要とし、当該仮想化オペレーティングシステムの上でコンテナを生成し、当該コンテナ上にてプログラムを実行するものであってもよい。この場合、コンテナは仮想ECU5に相当する。 A guest OS such as Ubuntu (registered trademark), for example, is stored in the virtual storage unit 5b of each virtual ECU 5, and each virtual ECU 5 starts up the guest OS and executes a program on the guest OS. The guest OS may be a different kind of OS depending on each virtual ECU 5 . Since the entity of the virtual storage unit 5b is the storage area of the storage unit 21 allocated to each virtual ECU 5 as described above, it goes without saying that the guest OS is also stored in the storage unit 21 in the same manner as the virtualized operating system. stomach. When using a container-based virtualized operating system, a guest OS may be eliminated, a container may be generated on the virtualized operating system, and a program may be executed on the container. In this case, the container corresponds to the virtual ECU5.
 仮想化オペレーティングシステムを用いて起動した車載ECU2の制御部20においては、複数の仮想ECU5が生成される。図3の制御部20においては、第1仮想ECU51、第2仮想ECU52、第3仮想ECU53、及び第4仮想ECU54の4つの仮想ECU5が生成される。制御部20は時分割されて周期的に、第1仮想ECU51の仮想制御部5a、第2仮想ECU52の仮想制御部5a、第3仮想ECU53の仮想制御部5a、及び第4仮想ECU54の仮想制御部5aに割り当てられる。 A plurality of virtual ECUs 5 are generated in the control unit 20 of the in-vehicle ECU 2 activated using the virtualized operating system. In the control unit 20 of FIG. 3, four virtual ECUs 5 of a first virtual ECU 51, a second virtual ECU 52, a third virtual ECU 53, and a fourth virtual ECU 54 are generated. The control unit 20 is time-divided and periodically performs virtual control of the first virtual ECU 51, the second virtual ECU 52, the third virtual ECU 53, and the fourth virtual ECU 54. assigned to section 5a.
 図3の例においては、第1演算装置201において第1仮想ECU51が周期的に生成される。第1演算装置201には、生成された第1仮想ECU51の仮想制御部5aが割り当てられる。言い換えると第1演算装置201は、第1仮想ECU51として機能する。第2演算装置202において第2仮想ECU52が周期的に生成される。第2演算装置202には、生成された第2仮想ECU52の仮想制御部5aが割り当てられる。言い換えると第2演算装置202は、第2仮想ECU52として機能する。 In the example of FIG. 3, the first virtual ECU 51 is periodically generated in the first arithmetic unit 201. The virtual control unit 5 a of the generated first virtual ECU 51 is assigned to the first arithmetic unit 201 . In other words, the first arithmetic device 201 functions as the first virtual ECU 51 . The second virtual ECU 52 is periodically generated in the second arithmetic unit 202 . The virtual control unit 5 a of the generated second virtual ECU 52 is assigned to the second arithmetic unit 202 . In other words, the second arithmetic device 202 functions as the second virtual ECU 52 .
 第3演算装置203において、第3仮想ECU53、及び第4仮想ECU54が周期的に交互に切り替わって生成される。第3演算装置203には、生成された第3仮想ECU53の仮想制御部5aが割り当てられる。また第3演算装置203には、生成された第4仮想ECU54の仮想制御部5aが割り当てられる。言い換えると第3演算装置203は、生成された第3仮想ECU53として機能する。また第3演算装置203は、生成された第4仮想ECU54として機能する。以下、演算装置200において仮想ECU5が生成されることと、当該演算装置200が生成された仮想ECU5として機能することとを、演算装置200が仮想ECU5を生成するとも称する。 In the third arithmetic unit 203, the third virtual ECU 53 and the fourth virtual ECU 54 are generated by alternately switching periodically. The virtual control unit 5 a of the generated third virtual ECU 53 is assigned to the third arithmetic unit 203 . The virtual control unit 5 a of the generated fourth virtual ECU 54 is assigned to the third arithmetic unit 203 . In other words, the third arithmetic device 203 functions as the generated third virtual ECU 53 . The third arithmetic unit 203 also functions as the generated fourth virtual ECU 54 . Hereinafter, the fact that the virtual ECU 5 is generated in the arithmetic device 200 and the fact that the arithmetic device 200 functions as the virtual ECU 5 generated by the arithmetic device 200 are also referred to as that the arithmetic device 200 generates the virtual ECU 5 .
 第4演算装置204は、全ての仮想ECU5を管理する仮想ECU管理プログラムを実行する。第4演算装置204は、仮想ECU管理プログラムを実行することにより、仮想化オペレーティングシステムのコントロールパネルとして機能する。言い換えると第4演算装置204は、仮想ECU管理プログラムを実行することにより、複数の仮想ECU5を管理する仮想ECU管理部10として機能する。 The fourth arithmetic unit 204 executes a virtual ECU management program that manages all virtual ECUs 5 . The fourth arithmetic unit 204 functions as a control panel of the virtualized operating system by executing the virtual ECU management program. In other words, the fourth arithmetic unit 204 functions as the virtual ECU management unit 10 that manages the plurality of virtual ECUs 5 by executing the virtual ECU management program.
 仮想ECU管理部10は、例えば記憶部21に記憶されている割当時間情報を参照することにより、仮想ECU5に対し、第1演算装置201の利用時間、第2演算装置202の利用時間、又は第3演算装置203の利用時間を割り当てる処理、いわゆるスケジューリングを行う。例えば割当時間情報は、第1仮想ECU51が生成される周期及び第1仮想ECU51が割り当てられる時間と、第2仮想ECU52が生成される周期及び第2仮想ECU52が割り当てられる時間とを含む。更に割当時間情報は、第3仮想ECU53が生成される周期及び第3仮想ECU53が割り当てられる時間と、第4仮想ECU54が生成される周期及び第4仮想ECU54が割り当てられる時間とを含む。 The virtual ECU management unit 10 refers to the allocation time information stored in the storage unit 21, for example, to determine the utilization time of the first arithmetic unit 201, the utilization time of the second arithmetic unit 202, or the virtual ECU 5. 3. Perform processing for allocating the usage time of the arithmetic unit 203, that is, so-called scheduling. For example, the allocation time information includes the cycle of generating the first virtual ECU 51 and the time allocated to the first virtual ECU 51 and the cycle of generating the second virtual ECU 52 and the time allocated to the second virtual ECU 52 . Further, the allocation time information includes the cycle of generating the third virtual ECU 53 and the time allocated to the third virtual ECU 53 and the cycle of generating the fourth virtual ECU 54 and the time allocated to the fourth virtual ECU 54 .
 仮想ECU管理部10はスケジューリングを行い、第1仮想ECU51、第2仮想ECU52、第3仮想ECU53、及び第4仮想ECU54それぞれの動作を開始させる。言い換えると仮想ECU管理部10はスケジューリングによって、第1演算装置201に対する仮想ECU5の切り替えと、第2演算装置202に対する仮想ECU5の切り替えと、第3演算装置203に対する仮想ECU5の切り替えとを行う。仮想ECU5の切り替えは、演算装置200に対して仮想ECU5の仮想制御部5aの割り当てが行われている活性状態と、演算装置200に対して仮想ECU5の仮想制御部5aの割り当てが行われていない非活性状態との切り替えを含む。例えば活性状態とは、演算装置200に対して割り当てられる仮想制御部5aを備える仮想ECU5が処理を実行する状態のことである。例えば非活性状態とは、仮想ECU5が休止している状態のことである。以下、仮想ECU5を非活性状態から活性状態へと遷移させることを活性化とも称する。仮想ECU5を活性状態から非活性状態へと遷移させることを非活性化とも称する。 The virtual ECU management unit 10 performs scheduling and starts the operations of the first virtual ECU 51, the second virtual ECU 52, the third virtual ECU 53, and the fourth virtual ECU 54, respectively. In other words, the virtual ECU management unit 10 performs switching of the virtual ECU 5 for the first arithmetic device 201, switching of the virtual ECU 5 for the second arithmetic device 202, and switching of the virtual ECU 5 for the third arithmetic device 203 by scheduling. The virtual ECU 5 is switched between an active state in which the virtual control unit 5a of the virtual ECU 5 is assigned to the arithmetic unit 200 and an active state in which the virtual control unit 5a of the virtual ECU 5 is not assigned to the arithmetic unit 200. Including switching to and from the inactive state. For example, the active state is a state in which the virtual ECU 5 including the virtual control unit 5a assigned to the arithmetic unit 200 executes processing. For example, the inactive state is a state in which the virtual ECU 5 is resting. Hereinafter, transitioning the virtual ECU 5 from the inactive state to the active state is also referred to as activation. Transitioning the virtual ECU 5 from the active state to the inactive state is also referred to as deactivation.
 仮想ECU管理部10は、第1演算装置201に対する仮想ECU5の切り替えを行うことによって、第1演算装置201に第1仮想ECU51を周期的に生成(活性化)させる。第1演算装置201に対する仮想ECU5の切り替えによって、第1演算装置201において第1仮想ECU51は、再度、生成される。また、第1演算装置201は、再度生成された上記の第1仮想ECU51の仮想制御部5aに割り当てられる。言い換えると、第1演算装置201に対する仮想ECU5の切り替えによって、第1仮想ECU51は、非活性化され、非活性化された後に活性化される。 The virtual ECU management unit 10 causes the first arithmetic device 201 to periodically generate (activate) the first virtual ECU 51 by switching the virtual ECU 5 for the first arithmetic device 201 . By switching the virtual ECU 5 for the first arithmetic device 201 , the first virtual ECU 51 is generated again in the first arithmetic device 201 . Also, the first arithmetic unit 201 is assigned to the virtual control unit 5a of the regenerated first virtual ECU 51 described above. In other words, by switching the virtual ECU 5 with respect to the first arithmetic unit 201, the first virtual ECU 51 is deactivated and activated after being deactivated.
 仮想ECU管理部10は、第2演算装置202に対する仮想ECU5の切り替えを行うことによって、第2演算装置202に第2仮想ECU52を周期的に生成させる。第2演算装置202に対する仮想ECU5の切り替えによって、第2演算装置202において第2仮想ECU52は、再度、生成される。また、第2演算装置202は、再度生成された上記の第2仮想ECU52の仮想制御部5aに割り当てられる。言い換えると、第2演算装置202に対する仮想ECU5の切り替えによって、第2仮想ECU52は、非活性化され、非活性化された後に活性化される。 The virtual ECU management unit 10 causes the second arithmetic device 202 to periodically generate the second virtual ECU 52 by switching the virtual ECU 5 for the second arithmetic device 202 . By switching the virtual ECU 5 for the second arithmetic device 202, the second virtual ECU 52 is generated again in the second arithmetic device 202. FIG. In addition, the second arithmetic unit 202 is assigned to the virtual control unit 5a of the second virtual ECU 52 generated again. In other words, by switching the virtual ECU 5 with respect to the second arithmetic unit 202, the second virtual ECU 52 is deactivated and activated after being deactivated.
 仮想ECU管理部10は、第3演算装置203に対する仮想ECU5の切り替えを行うことによって、第3演算装置203に第3仮想ECU53、及び第4仮想ECU54を周期的に交互に生成させる。第3演算装置203に対する仮想ECU5の切り替えによって、第3演算装置203において生成される仮想ECU5は、第3仮想ECU53及び第4仮想ECU54の一方から第3仮想ECU53及び第4仮想ECU54の他方へ切り替わる。第3演算装置203において、第3仮想ECU53及び第4仮想ECU54の他方が生成される。第3演算装置203は、第3仮想ECU53及び第4仮想ECU54の他方の仮想制御部5aに割り当てられる。言い換えると、第3演算装置203に対する仮想ECU5の切り替えによって、第3仮想ECU53及び第4仮想ECU54の一方は非活性化される。また、第3仮想ECU53及び第4仮想ECU54の他方は活性化される。 By switching the virtual ECU 5 for the third arithmetic device 203, the virtual ECU management unit 10 causes the third arithmetic device 203 to generate the third virtual ECU 53 and the fourth virtual ECU 54 alternately and periodically. By switching the virtual ECU 5 for the third arithmetic device 203, the virtual ECU 5 generated in the third arithmetic device 203 is switched from one of the third virtual ECU 53 and the fourth virtual ECU 54 to the other of the third virtual ECU 53 and the fourth virtual ECU 54. . The other of the third virtual ECU 53 and the fourth virtual ECU 54 is generated in the third arithmetic unit 203 . The third arithmetic unit 203 is assigned to the other virtual control unit 5 a of the third virtual ECU 53 and the fourth virtual ECU 54 . In other words, one of the third virtual ECU 53 and the fourth virtual ECU 54 is deactivated by switching the virtual ECU 5 with respect to the third arithmetic unit 203 . Also, the other of the third virtual ECU 53 and the fourth virtual ECU 54 is activated.
 本実施形態においては、仮想ECU5として機能する演算装置200と、仮想ECU管理部10として機能する演算装置200とは異なるが、同一の演算装置200が、仮想ECU5として機能することと、仮想ECU管理部10として機能することとを行ってもよい。この場合、上記の同一の演算装置200は、例えば仮想ECU5として機能する期間と仮想ECU管理部10として機能する期間とを周期的に切り替える。 In the present embodiment, the arithmetic device 200 functioning as the virtual ECU 5 and the arithmetic device 200 functioning as the virtual ECU management unit 10 are different, but the same arithmetic device 200 functions as the virtual ECU 5 and virtual ECU management is performed. functioning as the unit 10; In this case, the same arithmetic unit 200 described above periodically switches between, for example, a period of functioning as the virtual ECU 5 and a period of functioning as the virtual ECU management unit 10 .
 上述のように仮想ECU5はプログラムを実行する。例えば仮想ECU5は、実行したプログラムによる処理の結果を、自仮想ECUの仮想記憶部5bに記憶する。仮想記憶部5bに記憶される処理結果等の情報は、当該仮想記憶部5bを含む仮想ECU5の生成が終了した場合においても、記憶部21において割り当てられる上記の仮想記憶部5bに保持される。仮想ECU5の生成が終了した場合は、仮想ECU5が非活性状態である場合を含む。 The virtual ECU 5 executes the program as described above. For example, the virtual ECU 5 stores the result of processing by the executed program in the virtual storage unit 5b of its own virtual ECU. Information such as processing results stored in the virtual storage unit 5b is retained in the virtual storage unit 5b allocated in the storage unit 21 even when the generation of the virtual ECU 5 including the virtual storage unit 5b is completed. The case where the generation of the virtual ECU 5 has ended includes the case where the virtual ECU 5 is in an inactive state.
 記憶部21は、複数の仮想ECU5の間の通信において授受される通信データが書き込まれる通信データ記憶領域6を含む。通信データ記憶領域6に対しては、各仮想ECU5が通信データの書き込み及び読み出し等のアクセスを行うことができる。以下、通信データ記憶領域6に対する通信データの読み出しを、通信データの受信とも称する。 The storage unit 21 includes a communication data storage area 6 in which communication data exchanged in communication between a plurality of virtual ECUs 5 is written. Each virtual ECU 5 can access the communication data storage area 6 for writing and reading communication data. Hereinafter, reading communication data from the communication data storage area 6 is also referred to as receiving communication data.
 図3の通信データ記憶領域6は、通信データが後述の書き込みフラグ及び読み出しフラグと関連付けられて格納される送受信テーブル60を含む。図4は、送受信テーブル60の内容を例示する概念図である。送受信テーブル60は、識別子列と、データ長列と、通信データ列と、書き込みフラグ列と、仮想ECU5ごとの読み出しフラグ列とを含む。 The communication data storage area 6 in FIG. 3 includes a transmission/reception table 60 in which communication data is stored in association with write flags and read flags, which will be described later. FIG. 4 is a conceptual diagram illustrating the contents of the transmission/reception table 60. As shown in FIG. The transmission/reception table 60 includes an identifier string, a data length string, a communication data string, a write flag string, and a read flag string for each virtual ECU 5 .
 通信データ列には、通信データが記憶される。識別子列には、通信データの識別子、例えばメッセージIDが記憶される。詳しくは識別子列には、複数の仮想ECU5の間において授受される全ての通信データの識別子が予め記憶されている。複数の仮想ECU5の間において授受される通信データは、例えば複数の仮想ECU5の間において送受信されるメッセージを含む。識別子は、メッセージIDに限定されず、例えばポート番号でもよい。例えば一の仮想ECU5から送信される通信データの識別子と、他の仮想ECU5から送信される通信データの識別子とは、重複しない。 Communication data is stored in the communication data string. The identifier column stores identifiers of communication data, such as message IDs. Specifically, identifiers of all communication data exchanged between a plurality of virtual ECUs 5 are stored in advance in the identifier string. Communication data exchanged between the plurality of virtual ECUs 5 includes, for example, messages exchanged between the plurality of virtual ECUs 5 . Identifiers are not limited to message IDs, and may be port numbers, for example. For example, the identifier of the communication data transmitted from one virtual ECU5 and the identifier of the communication data transmitted from other virtual ECU5 do not overlap.
 データ長列には、通信データのデータ量、いわゆるデータ長が記憶される。書き込みフラグ列には、通信データの書き込み中を示す書き込みフラグが記憶される。送受信テーブル60において、通信データと、当該通信データの識別子と、当該通信データのデータ長と、書き込みフラグとが関連付けられて記憶される。 The data length column stores the amount of communication data, the so-called data length. The write flag string stores a write flag indicating that communication data is being written. In the transmission/reception table 60, the communication data, the identifier of the communication data, the data length of the communication data, and the write flag are stored in association with each other.
 書き込みフラグは、送受信テーブル60への通信データの書き込み中を示す。書き込みフラグはオン状態とオフ状態とを含む。書き込みフラグがオン状態である場合、送受信テーブル60への当該書き込みフラグと関連付けられた通信データの書き込みは、行われている。言い換えると通信データの書き込み中において、当該通信データと関連付けられる書き込みフラグはオン状態に設定されている。書き込みフラグがオフ状態である場合、送受信テーブル60への当該書き込みフラグと関連付けられる通信データの書き込みは、行われていない。 The write flag indicates that communication data is being written to the transmission/reception table 60. A write flag includes an ON state and an OFF state. When the write flag is on, the communication data associated with the write flag is being written to the transmission/reception table 60 . In other words, while the communication data is being written, the write flag associated with the communication data is set to the ON state. When the write flag is in the OFF state, writing of communication data associated with the write flag to the transmission/reception table 60 is not performed.
 仮想ECU5ごとの読み出しフラグ列は、第1仮想ECU51の受信情報列、及び読み出しフラグ列と、第2仮想ECU52の受信情報列、及び読み出しフラグ列とを含む。更に仮想ECU5ごとの読み出しフラグ列は、第3仮想ECU53の受信情報列、及び読み出しフラグ列と、第4仮想ECU54の受信情報列、及び読み出しフラグ列とを含む。即ち仮想ECU5ごとの読み出しフラグ列は、仮想ECU5ごとに設けられた受信情報列、及び読み出しフラグ列を含む。 The read flag string for each virtual ECU 5 includes the reception information string and read flag string of the first virtual ECU 51 and the reception information string and read flag string of the second virtual ECU 52 . Further, the read flag string for each virtual ECU 5 includes the reception information string and read flag string of the third virtual ECU 53 and the reception information string and read flag string of the fourth virtual ECU 54 . That is, the read flag string for each virtual ECU 5 includes a reception information string provided for each virtual ECU 5 and a read flag string.
 それぞれの受信情報列には、通信データが仮想ECU5による受信の対象であるか否かを示す受信情報が、識別子、データ長、通信データ及び書き込みフラグと関連付けられて記憶されている。図4の送受信テーブル60においては、仮想ECU5による受信の対象である通信データの識別子と関連付けられる受信情報は、受信対象と示してある。仮想ECU5による受信の対象でない通信データの識別子と関連付けられる受信情報は、対象外と示してある。 Each received information string stores received information indicating whether or not communication data is to be received by the virtual ECU 5 in association with an identifier, data length, communication data, and write flag. In the transmission/reception table 60 of FIG. 4, reception information associated with an identifier of communication data to be received by the virtual ECU 5 is indicated as a reception target. Received information associated with the identifier of communication data that is not subject to reception by the virtual ECU 5 is indicated as out of scope.
 例えば、受信対象という第1仮想ECU51の受信情報と関連付けられている識別子の通信データは、第1仮想ECU51による受信の対象である。言い換えると、第1仮想ECU51は、受信対象という第1仮想ECU51の受信情報と関連付けられている識別子の通信データの送信先の仮想ECU5である。第1仮想ECU51は、受信対象という第1仮想ECU51の受信情報と関連付けられている識別子の通信データを、送受信テーブル60から読み出す。即ち第1仮想ECU51は上記の通信データを受信する。仮想ECU5による送受信テーブル60からの通信データの読み出しについては後述する。 For example, the communication data of the identifier associated with the reception information of the first virtual ECU 51, which is the reception target, is the reception target of the first virtual ECU 51. In other words, the first virtual ECU 51 is the virtual ECU 5 to which the communication data of the identifier associated with the reception information of the first virtual ECU 51 to be received is transmitted. The first virtual ECU 51 reads from the transmission/reception table 60 the communication data of the identifier associated with the reception information of the first virtual ECU 51 to be received. That is, the first virtual ECU 51 receives the above communication data. Readout of communication data from the transmission/reception table 60 by the virtual ECU 5 will be described later.
 例えば、対象外という第1仮想ECU51の受信情報と関連付けられている識別子の通信データは、第1仮想ECU51による受信の対象でない。言い換えると、第1仮想ECU51は、対象外という第1仮想ECU51の受信情報と関連付けられている識別子の通信データの送信先の仮想ECU5でない。第1仮想ECU51は、対象外という第1仮想ECU51の受信情報と関連付けられている識別子の通信データを、送受信テーブル60から読み出さない。 For example, the communication data of the identifier associated with the reception information of the first virtual ECU 51 that is out of scope is not subject to reception by the first virtual ECU 51 . In other words, the first virtual ECU 51 is not the virtual ECU 5 that is the destination of the communication data with the identifier associated with the received information of the first virtual ECU 51 that is excluded. The first virtual ECU 51 does not read out from the transmission/reception table 60 the communication data of the identifier associated with the reception information of the first virtual ECU 51 that is excluded.
 それぞれの読み出しフラグ列には、通信データの読み出しの要否を示す読み出しフラグが、受信対象という受信情報と関連付けられて記憶されている。詳しくは各読み出しフラグ列の読み出しフラグは、対応する受信情報列の受信情報のうち、受信対象という受信情報と関連付けられている。例えば第1仮想ECU51の読み出しフラグ列と対応する受信情報列は、第1仮想ECU51の受信情報列である。 Each read flag string stores a read flag indicating whether or not it is necessary to read communication data in association with the reception information to be received. More specifically, the read flag of each read flag string is associated with the reception information, which is the reception target, among the reception information of the corresponding reception information string. For example, the received information string corresponding to the readout flag string of the first virtual ECU 51 is the received information string of the first virtual ECU 51 .
 読み出しフラグは、受信対象という受信情報と関連付けられている識別子、データ長、通信データ及び書き込みフラグとも関連付けられている。詳しくは、送受信テーブル60において読み出しフラグは、識別子、データ長、通信データ及び書き込みフラグと関連付けられて、通信データを受信する仮想ECU5の読み出し列に記憶される。読み出しフラグは通信データを読み出す仮想ECU5に対して設けられるので、1つの通信データの識別子に対して、当該1つの通信データを読み出す仮想ECU5の個数と同じ個数の読み出しフラグが、送受信テーブル60において関連付けられている。 The read flag is also associated with the identifier, data length, communication data, and write flag associated with the received information to be received. Specifically, in the transmission/reception table 60, the read flag is associated with the identifier, the data length, the communication data, and the write flag, and stored in the read column of the virtual ECU 5 that receives the communication data. Since the read flags are provided for the virtual ECUs 5 that read the communication data, the same number of read flags as the number of the virtual ECUs 5 that read the one communication data are associated with the identifier of one communication data in the transmission/reception table 60. It is
 例えば、仮想ECU5が第1仮想ECU51及び第3仮想ECU53の2つの仮想ECU5が読み出す通信データの識別子と関連付けられる読み出しフラグは、第1仮想ECU51の読み出しフラグ列と第3仮想ECU53の読み出しフラグ列とに記憶されている。上記の通信データの識別子は2つの読み出しフラグと関連付けられている。 For example, the read flags associated with the identifiers of the communication data read by the two virtual ECUs 5, ie, the first virtual ECU 51 and the third virtual ECU 53, are the read flag string of the first virtual ECU 51 and the read flag string of the third virtual ECU 53. stored in The communication data identifier is associated with two read flags.
 読み出しフラグはオン状態とオフ状態とを含む。読み出しフラグがオン状態である場合、当該読み出しフラグと関連付けられる識別子の通信データの読み出しを行う必要がある。読み出しフラグがオフ状態である場合、当該読み出しフラグと関連付けられる識別子の通信データの読み出しは不要である。 The read flag includes an ON state and an OFF state. When the read flag is on, it is necessary to read the communication data of the identifier associated with the read flag. If the read flag is in the OFF state, it is unnecessary to read the communication data of the identifier associated with the read flag.
 複数の仮想ECU5が通信データ記憶領域6を介して、通信データを授受することによって、複数の仮想ECU5の通信は行われる。以下、複数の仮想ECU5の間における通信データの授受について説明する。まず、通信データの送信元の仮想ECU5が送受信テーブル60へ通信データを書き込む処理を説明する。この処理は、仮想ECU5が通信データの送信先の他の仮想ECU5へ通信データを送信するための処理である。 Communication among the plurality of virtual ECUs 5 is performed by exchanging communication data between the plurality of virtual ECUs 5 via the communication data storage area 6 . Transfer of communication data between a plurality of virtual ECUs 5 will be described below. First, processing for writing communication data to the transmission/reception table 60 by the virtual ECU 5 that is the transmission source of the communication data will be described. This processing is processing for the virtual ECU 5 to transmit communication data to another virtual ECU 5 to which the communication data is transmitted.
 通信データの送信元の仮想ECU5は、通信データの送信先の他の仮想ECU5への通信データの識別子と同一の識別子を送受信テーブル60において特定する。仮想ECU5は、送受信テーブル60において特定した識別子と関連付けられる書き込みフラグがロックされているか否かを判定する。書き込みフラグのロックは、排他制御によって、同時に他のプログラムから書き込みフラグを変更できない状態にすることである。書き込みフラグがロックされている場合、排他制御によって、ロック制御を行ったプログラム以外からは書き込みフラグの状態を、オン状態及びオフ状態の一方からオン状態及びオフ状態の他方へ変更することができない。書き込みフラグがロックされていない場合、書き込みフラグの状態を、どのプログラムからもオン状態及びオフ状態の一方からオン状態及びオフ状態の他方へ変更することができる。なおプログラムは上述のように仮想ECU5によって実行される。以下、書き込みフラグがロックされている状態から書き込みフラグがロックされていない状態へ切り替えることを、ロックを解除するとも称する。 The virtual ECU 5 that is the transmission source of the communication data specifies in the transmission/reception table 60 the same identifier as the identifier of the communication data to the other virtual ECU 5 that is the transmission destination of the communication data. The virtual ECU 5 determines whether the write flag associated with the specified identifier in the transmission/reception table 60 is locked. Locking the write flag is to make it impossible to change the write flag from other programs at the same time by exclusive control. When the write flag is locked, the state of the write flag cannot be changed from one of the ON state and the OFF state to the other of the ON state and the OFF state by exclusive control except for the program that performed the lock control. If the write flag is not locked, any program can change the state of the write flag from one of the on and off states to the other of the on and off states. Note that the program is executed by the virtual ECU 5 as described above. Hereinafter, switching from a state in which the write flag is locked to a state in which the write flag is not locked is also referred to as unlocking.
 仮想ECU5は、特定した識別子と関連付けられる書き込みフラグがロックされていない場合、即ち書き込みフラグのロックが解除されている場合、上記の書き込みフラグをロックし、当該書き込みフラグをオン状態にする。 When the write flag associated with the specified identifier is not locked, that is, when the write flag is unlocked, the virtual ECU 5 locks the write flag and turns on the write flag.
 仮想ECU5は、書き込みフラグをオン状態にした後、他の仮想ECU5への通信データを、当該通信データの識別子と、当該識別子と関連付けられた書き込みフラグ及び読み出しフラグと関連付けて、送受信テーブル60に書き込む。詳しくは上記の通信データは、送受信テーブル60に予め記憶された識別子のうち、上記の通信データの識別子と同一の識別子と、当該同一の識別子と関連付けられた書き込みフラグ及び読み出しフラグとに関連付けられて、送受信テーブル60の通信データ列に書き込まれる。例えば仮想ECU5が新たな通信データを送受信テーブル60に書き込む際、新たな通信データの識別子と同一の識別子の通信データが、既に送受信テーブル60に書き込みフラグ及び読み出しフラグと関連付けられて書き込まれている場合が想定される。このような場合、仮想ECU5は、新たな通信データを、既に書き込まれている通信データに上書きする。言い換えると送受信テーブル60において同一の識別子の通信データは更新される。 After turning on the write flag, the virtual ECU 5 writes the communication data to the other virtual ECU 5 in the transmission/reception table 60 in association with the identifier of the communication data and the write flag and read flag associated with the identifier. . Specifically, the above communication data is associated with an identifier identical to the identifier of the above communication data among the identifiers stored in advance in the transmission/reception table 60, and the write flag and read flag associated with the same identifier. , is written in the communication data column of the transmission/reception table 60 . For example, when the virtual ECU 5 writes new communication data to the transmission/reception table 60, the communication data having the same identifier as the identifier of the new communication data has already been written to the transmission/reception table 60 in association with the write flag and the read flag. is assumed. In such a case, the virtual ECU 5 overwrites the already written communication data with the new communication data. In other words, communication data with the same identifier in the transmission/reception table 60 is updated.
 仮想ECU5は、通信データを送受信テーブル60に書き込んだ後、書き込んだ通信データと関連付けられる読み出しフラグをオン状態にする。例えば、仮想ECU5は、書き込んだ通信データが受信対象である仮想ECU5の個数が複数である場合、書き込んだ通信データと関連付けられる複数の読み出しフラグをオン状態にする。例えば仮想ECU5は、第1仮想ECU51及び第2仮想ECU52の受信対象である通信データが送受信テーブル60に書き込む。仮想ECU5は、送受信テーブル60において、第1仮想ECU51の読み出し列と第2仮想ECU52の読み出し列とに記憶された読み出しフラグのうち、書き込んだ通信データと関連付けられる読み出しフラグをオン状態にする。 After writing the communication data to the transmission/reception table 60, the virtual ECU 5 turns on the read flag associated with the written communication data. For example, when the number of virtual ECUs 5 that receive the written communication data is plural, the virtual ECU 5 turns on a plurality of read flags associated with the written communication data. For example, the virtual ECU 5 writes communication data to be received by the first virtual ECU 51 and the second virtual ECU 52 into the transmission/reception table 60 . The virtual ECU 5 turns ON the read flag associated with the written communication data among the read flags stored in the read column of the first virtual ECU 51 and the read column of the second virtual ECU 52 in the transmission/reception table 60 .
 更に仮想ECU5は、通信データを送受信テーブル60に書き込んだ後、書き込んだ通信データと関連付けられる書き込みフラグをオン状態からオフ状態に変更し、当該書き込みフラグのロックを解除する。 Furthermore, after writing the communication data to the transmission/reception table 60, the virtual ECU 5 changes the write flag associated with the written communication data from the ON state to the OFF state, and unlocks the write flag.
 例えば、書き込みフラグがロックされている場合、仮想ECU5は、送受信テーブル60へ通信データを書き込まない。仮想ECU5は、次の周期において送受信テーブル60へ通信データを書き込む。詳しくは仮想ECU管理部10による仮想ECU5の切り替えによって、仮想ECU5は非活性化される。更に仮想ECU5は、非活性化された後に活性化され、上述の処理を行って、送受信テーブル60へ通信データを書き込む。言い換えると、演算装置200が仮想ECU5の生成を終了し、再度、当該仮想ECU5を生成した際、仮想ECU5は、通信データを上述のようにして送受信テーブル60に書き込む。 For example, when the write flag is locked, the virtual ECU 5 does not write communication data to the transmission/reception table 60 . The virtual ECU 5 writes the communication data to the transmission/reception table 60 in the next period. Specifically, the virtual ECU 5 is deactivated by switching the virtual ECU 5 by the virtual ECU management unit 10 . Furthermore, the virtual ECU 5 is activated after being deactivated, performs the above-described processing, and writes the communication data to the transmission/reception table 60 . In other words, when the arithmetic unit 200 finishes generating the virtual ECU 5 and generates the virtual ECU 5 again, the virtual ECU 5 writes the communication data to the transmission/reception table 60 as described above.
 書き込みフラグがロックされている場合、仮想ECU5は、当該書き込みフラグのロックが解除されるまで待機処理を行い、読み出しフラグのロックが解除された後に通信データを上述のようにして送受信テーブル60に書き込んでもよい。 When the write flag is locked, the virtual ECU 5 performs standby processing until the write flag is unlocked, and after the read flag is unlocked, writes the communication data to the transmission/reception table 60 as described above. It's okay.
 次に、通信データの送信先の仮想ECU5が送受信テーブル60から通信データを読み出す処理を説明する。この処理は、仮想ECU5が通信データを受信するための処理である。仮想ECU5は、送受信テーブル60において、オフ状態の書き込みフラグと関連付けられる通信データであって、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる通信データを、送受信テーブル60から読み出す。 Next, the process of reading communication data from the transmission/reception table 60 by the virtual ECU 5, which is the transmission destination of the communication data, will be described. This processing is processing for the virtual ECU 5 to receive communication data. In the transmission/reception table 60, the virtual ECU 5 selects communication data associated with the ON state read flag among the read flags stored in the read flag column of the own virtual ECU, which is communication data associated with the OFF state write flag. , from the transmission/reception table 60 .
 例えば仮想ECU5は、送受信テーブル60を参照し、自仮想ECUの読み出しフラグがオン状態であるか否かを判定する。仮想ECU5は、自仮想ECUの読み出しフラグがオン状態でない場合、通信データの読み出しを行わない。なお仮想ECU5の読み出しフラグがオン状態でない場合とは、送受信テーブル60において上記の仮想ECU5の読み出しフラグ列に記憶される読み出しフラグの全てがオフ状態である場合である。 For example, the virtual ECU 5 refers to the transmission/reception table 60 and determines whether or not the read flag of its own virtual ECU is on. The virtual ECU 5 does not read communication data unless the read flag of its own virtual ECU is turned on. Note that the case where the read flag of the virtual ECU 5 is not in the ON state means that all the read flags stored in the read flag row of the virtual ECU 5 in the transmission/reception table 60 are in the OFF state.
 仮想ECU5は、自仮想ECUの読み出しフラグがオン状態である場合、以下の処理を行う。仮想ECU5は送受信テーブル60において、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる書き込みフラグが、オフ状態であるか否かを判定する。なお仮想ECU5の読み出しフラグがオン状態である場合とは、送受信テーブル60において上記の仮想ECU5の読み出しフラグ列に記憶される読み出しフラグの少なくとも1つがオン状態である場合である。 The virtual ECU 5 performs the following processing when the read flag of its own virtual ECU is on. In the transmission/reception table 60, the virtual ECU 5 determines whether or not the write flag associated with the read flag in the ON state among the read flags stored in the read flag string of the own virtual ECU is in the OFF state. The case where the read flag of the virtual ECU 5 is on means that at least one of the read flags stored in the read flag column of the virtual ECU 5 in the transmission/reception table 60 is on.
 上記のオン状態の読み出しフラグと関連付けられる書き込みフラグがオフ状態である場合、仮想ECU5は、当該書き込みフラグをロックする。例えば仮想ECU5が書き込みフラグのロックを行う際に、当該書き込みフラグが他の仮想ECU5によって既にロックされている場合が想定される。この場合、仮想ECU5は書き込みフラグのロックに失敗する。仮想ECU5は書き込みフラグのロックに失敗した場合、処理を終了する。仮想ECU5は書き込みフラグのロックに失敗した場合、再度、書き込みフラグのロックを試みてもよい。 When the write flag associated with the on-state read flag is in the off state, the virtual ECU 5 locks the write flag. For example, when the virtual ECU 5 locks the write flag, it is assumed that the write flag has already been locked by another virtual ECU 5 . In this case, the virtual ECU 5 fails to lock the write flag. If the virtual ECU 5 fails to lock the write flag, it ends the process. When the virtual ECU 5 fails to lock the write flag, it may attempt to lock the write flag again.
 仮想ECU5は上述のように書き込みフラグをロックした後、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる通信データを送受信テーブル60から読み出す。言い換えると仮想ECU5は、ロックした書き込みフラグと関連付けられる通信データを送受信テーブル60から読み出す。書き込みフラグをロックすることによって、読み出し中の通信データが更新されることを防止することができる。 After locking the write flags as described above, the virtual ECU 5 reads from the transmission/reception table 60 the communication data associated with the read flags in the ON state among the read flags stored in the read flag row of its own virtual ECU. In other words, the virtual ECU 5 reads the communication data associated with the locked write flag from the transmission/reception table 60 . By locking the write flag, communication data being read can be prevented from being updated.
 上記のオン状態の読み出しフラグと関連付けられる書き込みフラグがオン状態である場合、通信データの書き込み中なので、仮想ECU5は、送受信テーブル60から通信データを読み出さない。仮想ECU5は、次の周期において送受信テーブル60から通信データを読み出す。詳しくは仮想ECU管理部10による仮想ECU5の切り替えによって、仮想ECU5は非活性化される。更に仮想ECU5は、非活性化された後に活性化され、上述の処理を行って、送受信テーブル60から通信データを読み出す。演算装置200が仮想ECU5の生成を終了し、再度、当該仮想ECU5を生成した際に、仮想ECU5は、通信データを上述のようにして送受信テーブル60から読み出す。 When the write flag associated with the read flag in the ON state is ON, the communication data is being written, so the virtual ECU 5 does not read the communication data from the transmission/reception table 60 . The virtual ECU 5 reads the communication data from the transmission/reception table 60 in the next period. Specifically, the virtual ECU 5 is deactivated by switching the virtual ECU 5 by the virtual ECU management unit 10 . Furthermore, the virtual ECU 5 is activated after being deactivated, performs the above-described processing, and reads communication data from the transmission/reception table 60 . When the arithmetic unit 200 finishes generating the virtual ECU 5 and generates the virtual ECU 5 again, the virtual ECU 5 reads the communication data from the transmission/reception table 60 as described above.
 上記の書き込みフラグがオン状態である場合、仮想ECU5は、当該書き込みフラグがオフ状態になるまで待機処理を行い、書き込みフラグがオフ状態になった後に通信データを上述のようにして送受信テーブル60から読み出してもよい。 When the above write flag is in the ON state, the virtual ECU 5 performs standby processing until the write flag is in the OFF state. May be read.
 仮想ECU5は、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグの個数が複数である場合、当該オン状態の読み出しフラグそれぞれと関連付けられる通信データを上述のようにして送受信テーブル60から読み出す。 If there are a plurality of read flags in the ON state among the read flags stored in the read flag string of the virtual ECU 5, the virtual ECU 5 sets the communication data associated with each of the read flags in the ON state as described above. to read from the transmission/reception table 60.
 仮想ECU5は、送受信テーブル60から通信データを読み出した後、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、読み出した通信データと関連付けられる読み出しフラグをオン状態からオフ状態に変更する。更に仮想ECU5は、読み出した通信データと関連付けられる書き込みフラグのロックを解除する。即ち、仮想ECU5は自身がロックした書き込みフラグのロックを解除する。 After reading the communication data from the transmission/reception table 60, the virtual ECU 5 changes the read flags associated with the read communication data out of the read flags stored in the read flag row of its own virtual ECU from the ON state to the OFF state. Further, the virtual ECU 5 unlocks the write flag associated with the read communication data. That is, the virtual ECU 5 unlocks the write flag locked by itself.
 送受信テーブル60に書き込まれる通信データは、1つの仮想ECU5によって読み出されてもよく、2つ以上の仮想ECU5によって読み出されてもよい。例えば通信データが第1仮想ECU51及び第3仮想ECU53の2つの仮想ECU5によって読み出される場合、第1仮想ECU51及び第3仮想ECU53は以下の処理を行う。第1仮想ECU51は、上述のようにして通信データを読み出した後、第1仮想ECU51の読み出しフラグ列に記憶され、読み出した通信データと関連付けられる読み出しフラグをオフ状態にする。第3仮想ECU53は、上述のようにして通信データを読み出した後、第3仮想ECU53の読み出しフラグ列に記憶され、読み出した通信データと関連付けられる読み出しフラグをオフ状態にする。 The communication data written in the transmission/reception table 60 may be read by one virtual ECU 5 or may be read by two or more virtual ECUs 5 . For example, when communication data is read by two virtual ECUs 5, the first virtual ECU 51 and the third virtual ECU 53, the first virtual ECU 51 and the third virtual ECU 53 perform the following processing. After reading the communication data as described above, the first virtual ECU 51 turns off the read flag stored in the read flag string of the first virtual ECU 51 and associated with the read communication data. After reading the communication data as described above, the third virtual ECU 53 turns off the read flag stored in the read flag string of the third virtual ECU 53 and associated with the read communication data.
 図5は、仮想ECU5が行う他の仮想ECU5への通信データの送信に係る処理を例示するフローチャートである。例えば、仮想ECU5は生成、又は活性化された際に以下の処理を行う。以下、ステップをSと省略する。 FIG. 5 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU 5 performed by the virtual ECU 5 . For example, the virtual ECU 5 performs the following processing when generated or activated. Hereinafter, the step is abbreviated as S.
 仮想ECU5は、他の仮想ECU5へ送信する通信データの識別子と同一の識別子を送受信テーブル60において特定し、送受信テーブル60において特定した識別子と関連付けられる書き込みフラグのロックが解除されているか否かを判定する(S11)。特定された識別子と関連付けられる書き込みフラグのロックが解除されている場合(S11:YES)、仮想ECU5は、上記の書き込みフラグのロックを試み(S12)、当該書き込みフラグのロックに成功したか否かを判定する(S13)。仮想ECU5は、上記の書き込みフラグのロックに成功しなかった場合(S13:NO)、即ち書き込みフラグのロックに失敗した場合、処理を終了する。仮想ECU5は書き込みフラグのロックに失敗した場合、再度、書き込みフラグのロックを試みてもよい。例えば仮想ECU5は、書き込みフラグのロックに所定回数失敗した際、処理を終了する。 The virtual ECU 5 identifies in the transmission/reception table 60 the same identifier as the identifier of the communication data to be transmitted to the other virtual ECU 5, and determines whether or not the write flag associated with the identified identifier in the transmission/reception table 60 is unlocked. (S11). If the write flag associated with the specified identifier is unlocked (S11: YES), the virtual ECU 5 attempts to lock the write flag (S12), and determines whether the write flag was successfully locked. is determined (S13). If the virtual ECU 5 fails to lock the write flag (S13: NO), that is, if it fails to lock the write flag, it ends the process. When the virtual ECU 5 fails to lock the write flag, it may attempt to lock the write flag again. For example, the virtual ECU 5 terminates the process when it fails to lock the write flag a predetermined number of times.
 仮想ECU5は、上記の書き込みフラグのロックに成功した場合(S13:YES)、即ち書き込みフラグをロックした場合、ロックした書き込みフラグをオン状態にする(S14)。言い換えると、書き込みフラグはロックされた後にオン状態に変化する。 When the virtual ECU 5 successfully locks the write flag (S13: YES), that is, when the write flag is locked, the virtual ECU 5 turns on the locked write flag (S14). In other words, the write flag changes to the ON state after being locked.
 仮想ECU5は上述のように、他の仮想ECU5への通信データを、当該通信データの識別子と、当該識別子と関連付けられた書き込みフラグ及び読み出しフラグとに関連付けて、送受信テーブル60に書き込む(S15)。送受信テーブル60において通信データは更新される。 As described above, the virtual ECU 5 writes communication data to another virtual ECU 5 in the transmission/reception table 60 in association with the identifier of the communication data and the write flag and read flag associated with the identifier (S15). The communication data is updated in the transmission/reception table 60 .
 仮想ECU5は上述のように、送受信テーブル60に書き込んだ通信データと関連付けられる読み出しフラグをオン状態にする(S16)。更に仮想ECU5は、送受信テーブル60に書き込んだ通信データと関連付けられる書き込みフラグをオフ状態にし(S17)、当該書き込みフラグのロックを解除する(S18)。仮想ECU5は処理を終了する。 As described above, the virtual ECU 5 turns on the read flag associated with the communication data written in the transmission/reception table 60 (S16). Further, the virtual ECU 5 turns off the write flag associated with the communication data written in the transmission/reception table 60 (S17), and unlocks the write flag (S18). The virtual ECU 5 ends the processing.
 特定された識別子と関連付けられる書き込みフラグのロックが解除されていない場合(S11:NO)、仮想ECU5は処理を終了する。当該仮想ECU5は、再度生成(活性化)された際に、他の仮想ECU5への通信データの送信に係る処理を行い、上述のようにして通信データを送受信テーブルに書き込む。上記の書き込みフラグのロックが解除されていない場合、仮想ECU5は、再度S11の判定を行うべくループ処理を行ってもよい。仮想ECU5は、上記のループ処理を行うにあたって、所定時間の待機処理を実行してもよい。言い換えると仮想ECU5は、書き込みフラグのロックが解除されるまで待機処理を行い、書き込みフラグのロックが解除された際にS12の処理を行ってもよい。 If the write flag associated with the specified identifier is not unlocked (S11: NO), the virtual ECU 5 ends the process. When the virtual ECU 5 is regenerated (activated), it performs processing related to transmission of communication data to another virtual ECU 5, and writes the communication data in the transmission/reception table as described above. If the write flag is not unlocked, the virtual ECU 5 may perform loop processing to perform the determination of S11 again. The virtual ECU 5 may perform standby processing for a predetermined time before performing the above loop processing. In other words, the virtual ECU 5 may perform the standby process until the write flag is unlocked, and perform the process of S12 when the write flag is unlocked.
 図6は、仮想ECU5が行う他の仮想ECU5からの通信データの受信に係る処理を例示するフローチャートである。例えば、仮想ECU5は生成、又は活性化された際に以下の処理を行う。 FIG. 6 is a flowchart illustrating processing related to reception of communication data from another virtual ECU 5 performed by the virtual ECU 5 . For example, the virtual ECU 5 performs the following processing when generated or activated.
 仮想ECU5は上述のように、送受信テーブル60を参照し、自仮想ECUの読み出しフラグがオン状態であるか否かを判定する(S21)。仮想ECU5は、自仮想ECUの読み出しフラグがオン状態でない場合(S21:NO)、処理を終了する。 As described above, the virtual ECU 5 refers to the transmission/reception table 60 and determines whether or not the read flag of its own virtual ECU is ON (S21). If the read flag of the own virtual ECU is not on (S21: NO), the virtual ECU 5 ends the process.
 仮想ECU5は、自仮想ECUの読み出しフラグがオン状態である場合(S21:YES)、以下の処理を行う。仮想ECU5は送受信テーブル60において、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる書き込みフラグのロックを試み(S22)、当該書き込みフラグのロックに成功したか否かを判定する(S23)。仮想ECU5は、書き込みフラグのロックに成功しなかった場合(S23:NO)、即ち書き込みフラグのロックに失敗した場合、処理を終了する。仮想ECU5は、書き込みフラグのロックに失敗した場合、再度、書き込みフラグのロックを試みてもよい。例えば仮想ECU5は、書き込みフラグのロックに所定回数失敗した際、処理を終了する。 When the read flag of its own virtual ECU is ON (S21: YES), the virtual ECU 5 performs the following processing. In the transmission/reception table 60, the virtual ECU 5 tries to lock the write flag associated with the read flag in the ON state among the read flags stored in the read flag row of the own virtual ECU (S22), and succeeds in locking the write flag. (S23). When the virtual ECU 5 fails to lock the write flag (S23: NO), that is, when it fails to lock the write flag, it ends the process. When the virtual ECU 5 fails to lock the write flag, it may attempt to lock the write flag again. For example, the virtual ECU 5 terminates the process when it fails to lock the write flag a predetermined number of times.
 仮想ECU5は、書き込みフラグのロックに成功した場合(S23:YES)、即ち書き込みフラグをロックした場合、ロックした書き込みフラグがオフ状態であるか否かを判定する(S24)。上記の書き込みフラグがオフ状態である場合(S24:YES)、仮想ECU5は、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる通信データを送受信テーブル60から読み出す(S25)。即ち仮想ECU5は、オフ状態の書き込みフラグと関連付けられる通信データであって、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる通信データを送受信テーブル60から読み出す。 When the virtual ECU 5 successfully locks the write flag (S23: YES), that is, when the write flag is locked, the virtual ECU 5 determines whether the locked write flag is off (S24). If the above write flag is in the off state (S24: YES), the virtual ECU 5 sends communication data associated with the read flag in the on state among the read flags stored in the read flag column of the own virtual ECU to the transmission/reception table 60. (S25). That is, the virtual ECU 5 retrieves from the transmission/reception table 60 the communication data associated with the off-state write flags and the communication data associated with the on-state read flags among the read flags stored in the read flag string of the own virtual ECU. read out.
 仮想ECU5は、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、送受信テーブル60から読み出した通信データと関連付けられる読み出しフラグをオフ状態にする(S26)。仮想ECU5は、送受信テーブル60から読み出した通信データと関連付けられる書き込みフラグのロックを解除し(S27)、処理を終了する。 The virtual ECU 5 turns off the read flags associated with the communication data read from the transmission/reception table 60 among the read flags stored in the read flag string of its own virtual ECU (S26). The virtual ECU 5 unlocks the write flag associated with the communication data read from the transmission/reception table 60 (S27), and ends the process.
 上記の書き込みフラグがオフ状態でない場合(S24:NO)、即ち当該書き込みフラグがオン状態である場合、仮想ECU5は、処理を終了する。当該仮想ECU5は、再度生成(活性化)された際に、他の仮想ECU5からの通信データの受信に係る処理を行い、上述のようにして通信データを送受信テーブル60から読み出す。上記の書き込みフラグがオフ状態でない場合、仮想ECU5は、再度S24の判定を行うべくループ処理を行ってもよい。仮想ECU5は、上記のループ処理を行うにあたって、所定時間の待機処理を実行してもよい。言い換えると仮想ECU5は、書き込みフラグがオフ状態になるまで待機処理を行い、書き込みフラグがオフ状態になった際にS25の処理を行ってもよい。 If the write flag is not off (S24: NO), that is, if the write flag is on, the virtual ECU 5 ends the process. When the virtual ECU 5 is regenerated (activated), it performs processing related to reception of communication data from another virtual ECU 5 and reads the communication data from the transmission/reception table 60 as described above. If the above write flag is not in the off state, the virtual ECU 5 may perform loop processing to perform the determination of S24 again. The virtual ECU 5 may perform standby processing for a predetermined time before performing the above loop processing. In other words, the virtual ECU 5 may perform the standby process until the write flag is turned off, and perform the process of S25 when the write flag is turned off.
 本態様において、制御部20が仮想化オペレーティングシステムを起動することにより、複数の仮想ECU5は生成される。なお仮想化オペレーティングシステムは、仮想ECU5を構築するためのオペレーティングシステムであり、例えばHypervisorである。複数の仮想ECU5が通信データ記憶領域6を介して通信データの授受を行うことによって、複数の仮想ECU5の間の通信は行われる。通信データの送信元の仮想ECU5は、通信データの送信先である他の仮想ECU5へ送信する通信データを通信データ記憶領域6に含まれる送受信テーブル60に書き込む。書き込まれる通信データは、送受信テーブル60において書き込みフラグ及び読み出しフラグと関連付けられる。通信データの送信先の仮想ECU5は、書き込みフラグがオフ状態であって、読み出しフラグがオン状態である場合に、通信データを送受信テーブル60から読み出す。書き込みフラグがオフ状態である通信データが読み出されるので、通信データの読み出しの際に、当該通信データの書き込みは行われていない。送受信テーブル60に対する通信データ書き込み及び読み出しは競合しないので、複数の仮想ECU5の間において、効率的に通信データの授受を行うことができる。言い換えると、複数の仮想ECU5の間の通信を効率的に行うことができる。 In this aspect, a plurality of virtual ECUs 5 are generated by the control unit 20 activating the virtualized operating system. Note that the virtual operating system is an operating system for constructing the virtual ECU 5, such as Hypervisor. Communication among the plurality of virtual ECUs 5 is performed by exchanging communication data between the plurality of virtual ECUs 5 via the communication data storage area 6 . The virtual ECU 5 that is the transmission source of the communication data writes the communication data to be transmitted to the other virtual ECU 5 that is the transmission destination of the communication data in the transmission/reception table 60 included in the communication data storage area 6 . Communication data to be written is associated with a write flag and a read flag in the transmit/receive table 60 . The virtual ECU 5, which is the transmission destination of the communication data, reads the communication data from the transmission/reception table 60 when the write flag is in the off state and the read flag is in the on state. Since the communication data whose write flag is in the OFF state is read, the communication data is not written when the communication data is read. Since communication data writing and reading to/from the transmission/reception table 60 do not compete, communication data can be efficiently exchanged between the plurality of virtual ECUs 5 . In other words, communication between the virtual ECUs 5 can be efficiently performed.
 通信データの送信先の仮想ECU5は通信データの読み出し後、当該通信データと関連付けられた読み出しフラグをオン状態からオフ状態に変更するので、誤って同一の通信データを再度読み出してしまうことを防止することができる。 After reading the communication data, the virtual ECU 5 to which the communication data is sent changes the read flag associated with the communication data from the ON state to the OFF state, thereby preventing the same communication data from being erroneously read again. be able to.
 送受信テーブル60に書き込まれる通信データは、1つの仮想ECU5又は2つ以上の仮想ECU5によって読み出される。送受信テーブル60において通信データと関連付けられる読み出しフラグは、当該通信データを読み出す仮想ECU5に対して設けられる。仮想ECU5は、書き込みフラグがオフ状態であって、自仮想ECUと対応する読み出しフラグがオン状態である場合に、当該読み出しフラグがオン状態である通信データを送受信テーブル60から読み出す。仮想ECU5は通信データの読み出し後、上記の読み出しフラグをオフ状態にする。仮想ECU5は通信データの送信先の仮想ECU5へ通信データを適切に送信することができる。複数の仮想ECU5が通信データの送信先である場合であっても、送信先の複数の仮想ECU5それぞれは、対応する読み出しフラグに基づき通信データを送受信テーブル60から読み出すことができる。上記の場合であっても、複数の仮想ECU5の間において、効率的に通信データの授受を行うことができる。 The communication data written in the transmission/reception table 60 is read by one virtual ECU 5 or two or more virtual ECUs 5 . A read flag associated with the communication data in the transmission/reception table 60 is provided for the virtual ECU 5 that reads the communication data. When the write flag is off and the read flag corresponding to the own virtual ECU is on, the virtual ECU 5 reads the communication data whose read flag is on from the transmission/reception table 60 . After reading the communication data, the virtual ECU 5 turns off the read flag. Virtual ECU5 can appropriately transmit communication data to virtual ECU5 of the transmission destination of communication data. Even if a plurality of virtual ECUs 5 are transmission destinations of the communication data, each of the plurality of virtual ECUs 5 as transmission destinations can read the communication data from the transmission/reception table 60 based on the corresponding read flag. Even in the above case, communication data can be efficiently exchanged between the plurality of virtual ECUs 5 .
 送受信テーブル60において、送信先の仮想ECU5、即ち受信側の仮想ECU5は、自身が受信すべき通信データを特定できるので、自身宛でない通信データを読み出す処理を省略することができる。 In the transmission/reception table 60, the destination virtual ECU 5, that is, the receiving side virtual ECU 5, can specify the communication data that it should receive, so it is possible to omit the process of reading communication data that is not addressed to itself.
 仮想ECU5は、送受信テーブル60に通信データを書き込む前に、当該通信データと関連付けられる書き込みフラグをオン状態にする。仮想ECU5は、送受信テーブル60への通信データの書き込み後、当該通信データと関連付けられる書き込みフラグをオン状態からオフ状態に変更し、更に上記の通信データと関連付けられる読み出しフラグをオン状態にする。仮想ECU5による通信データの書き込み中において書き込みフラグはオン状態であるので、書き込み中の通信データを読み出すことを防止することができる。通信データの書き込み後に書き込みフラグ及び読み出しフラグは上述のように更新されるので、送受信テーブル60に対する通信データの書き込み及び読み出しが競合することなく、複数の仮想ECU5の間における通信データの授受を行うことができる。 Before writing the communication data to the transmission/reception table 60, the virtual ECU 5 turns on the write flag associated with the communication data. After writing the communication data to the transmission/reception table 60, the virtual ECU 5 changes the write flag associated with the communication data from the ON state to the OFF state, and further sets the read flag associated with the communication data to the ON state. Since the write flag is on while the virtual ECU 5 is writing the communication data, it is possible to prevent the communication data being written from being read. Since the write flag and the read flag are updated as described above after the communication data is written, the communication data can be exchanged between the plurality of virtual ECUs 5 without competing in the writing and reading of the communication data in the transmission/reception table 60. can be done.
 本実施形態において通信データは、識別子、データ長、書き込みフラグ、及び読み出しフラグと関連付けられて、通信データ記憶領域6に含まれる送受信テーブル60に書き込まれる。車載ECU2は、識別子、データ長、書き込みフラグ、及び読み出しフラグと関連付けられる複数の通信データが通信データ記憶領域6において分散されて書き込まれる構成でもよい。 In this embodiment, the communication data is written in the transmission/reception table 60 included in the communication data storage area 6 in association with the identifier, data length, write flag, and read flag. The in-vehicle ECU 2 may be configured such that a plurality of pieces of communication data associated with the identifier, data length, write flag, and read flag are distributed and written in the communication data storage area 6 .
 (実施形態2)
 図7は、実施形態2の車載ECU2の論理構成を例示するブロック図である。実施形態2に係る構成の内、実施形態1と同様な構成部については同じ符号を付し、その詳細な説明を省略する。実施形態2は、後述の送信バッファ61及び受信テーブル62を含む通信データ記憶領域6を介して、複数の仮想ECU5の間における通信データの授受が行われる車載ECU2に関する。
(Embodiment 2)
FIG. 7 is a block diagram illustrating the logical configuration of the in-vehicle ECU 2 of the second embodiment. In the configuration according to the second embodiment, the same components as in the first embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted. Embodiment 2 relates to an in-vehicle ECU 2 in which communication data is exchanged between a plurality of virtual ECUs 5 via a communication data storage area 6 including a transmission buffer 61 and a reception table 62 which will be described later.
 実施形態2の車載ECU2は、制御部20及び記憶部21を備える。制御部20は、第1演算装置201、第2演算装置202、第3演算装置203及び第4演算装置204を含む4つの演算装置200を備える。 The in-vehicle ECU 2 of Embodiment 2 includes a control section 20 and a storage section 21 . The control unit 20 includes four arithmetic devices 200 including a first arithmetic device 201 , a second arithmetic device 202 , a third arithmetic device 203 and a fourth arithmetic device 204 .
 実施形態1と同様に、第1演算装置201において第1仮想ECU51が周期的に生成される。生成される第1仮想ECU51の仮想制御部5aが第1演算装置201に割り当てられる。即ち、第1演算装置201は生成される第1仮想ECU51として機能する。第2演算装置202において第2仮想ECU52が周期的に生成される。第2演算装置202は生成される第2仮想ECU52として機能する。第3演算装置203において第3仮想ECU53及び第4仮想ECU54が交互に周期的に生成される。第3演算装置203は生成される第3仮想ECU53として機能する。また、第3演算装置203は生成される第4仮想ECU54として機能する。 As in the first embodiment, the first virtual ECU 51 is periodically generated in the first computing device 201 . The virtual control unit 5 a of the generated first virtual ECU 51 is assigned to the first arithmetic unit 201 . That is, the first arithmetic unit 201 functions as the generated first virtual ECU 51 . The second virtual ECU 52 is periodically generated in the second arithmetic unit 202 . The second arithmetic unit 202 functions as the generated second virtual ECU 52 . The third virtual ECU 53 and the fourth virtual ECU 54 are alternately and periodically generated in the third arithmetic unit 203 . The third arithmetic unit 203 functions as the generated third virtual ECU 53 . Also, the third arithmetic unit 203 functions as the generated fourth virtual ECU 54 .
 第4演算装置204は、実施形態1と同様に仮想ECU管理部10として機能する。更に第4演算装置204は、第1仮想ECU51、第2仮想ECU52、第3仮想ECU53及び第4仮想ECU54を含む複数の仮想ECU5の間における通信データの授受を管理する通信データ管理部11として機能する。通信データ管理部11が行う処理については後述する。通信データ管理部11は、管理部に相当する。 The fourth arithmetic unit 204 functions as the virtual ECU management unit 10 as in the first embodiment. Furthermore, the fourth arithmetic unit 204 functions as a communication data management unit 11 that manages communication data transfer between a plurality of virtual ECUs 5 including the first virtual ECU 51, the second virtual ECU 52, the third virtual ECU 53, and the fourth virtual ECU 54. do. Processing performed by the communication data management unit 11 will be described later. The communication data management section 11 corresponds to a management section.
 記憶部21は、通信データ記憶領域6を含む。実施形態2の車載ECU2において、通信データ記憶領域6は、仮想ECU5が他の仮想ECU5へ送信する通信データを書き込む送信バッファ61と、仮想ECU5によって受信される通信データが書き込まれる受信テーブル62とを含む。 The storage unit 21 includes a communication data storage area 6. In the in-vehicle ECU 2 of the second embodiment, the communication data storage area 6 includes a transmission buffer 61 in which communication data transmitted by the virtual ECU 5 to other virtual ECUs 5 is written, and a reception table 62 in which communication data received by the virtual ECU 5 is written. include.
 送信バッファ61は、仮想ECU5ごとに設けられている。本実施形態において、通信データ記憶領域6は、第1送信バッファ611、第2送信バッファ612、第3送信バッファ613、及び第4送信バッファ614の4つの送信バッファ61を含む。第1送信バッファ611は第1仮想ECU51と対応している。第1仮想ECU51は第1送信バッファ611に通信データを書き込む。第2送信バッファ612は第2仮想ECU52と対応している。第2仮想ECU52は第2送信バッファ612に通信データを書き込む。第3送信バッファ613は第3仮想ECU53と対応している。第3仮想ECU53は第3送信バッファ613に通信データを書き込む。第4送信バッファ614は第4仮想ECU54と対応している。第4仮想ECU54は第4送信バッファ614に通信データを書き込む。 A transmission buffer 61 is provided for each virtual ECU 5 . In this embodiment, the communication data storage area 6 includes four transmission buffers 61 , a first transmission buffer 611 , a second transmission buffer 612 , a third transmission buffer 613 and a fourth transmission buffer 614 . The first transmission buffer 611 corresponds to the first virtual ECU 51 . The first virtual ECU 51 writes communication data to the first transmission buffer 611 . The second transmission buffer 612 corresponds to the second virtual ECU 52 . The second virtual ECU 52 writes communication data to the second transmission buffer 612 . The third transmission buffer 613 corresponds to the third virtual ECU 53 . The third virtual ECU 53 writes communication data to the third transmission buffer 613 . A fourth transmission buffer 614 corresponds to the fourth virtual ECU 54 . The fourth virtual ECU 54 writes communication data to the fourth transmission buffer 614 .
 図8は、送信バッファ61の構成を例示する模式図である。送信バッファ61には、1つの通信データと、当該通信データの識別子と、当該通信データのデータ長とが関連付けられて記憶される。送信バッファ61においてデータ長は省略されてもよい。 FIG. 8 is a schematic diagram illustrating the configuration of the transmission buffer 61. As shown in FIG. The transmission buffer 61 stores one piece of communication data, the identifier of the communication data, and the data length of the communication data in association with each other. The data length may be omitted in the transmission buffer 61 .
 図9は、受信テーブル62の内容を例示する概念図である。受信テーブル62は、識別子列と、データ長列と、通信データ列と、同期フラグ列と、仮想ECU5ごとの読み出しフラグ列とを含む。 FIG. 9 is a conceptual diagram illustrating the contents of the reception table 62. FIG. The reception table 62 includes an identifier string, a data length string, a communication data string, a synchronization flag string, and a read flag string for each virtual ECU 5 .
 通信データ列には、通信データが記憶される。識別子列には、通信データの識別子が記憶される。詳しくは識別子列には、実施形態1の送受信テーブル60の識別子列と同様に、複数の仮想ECU5の間において授受される全ての通信データの識別子が予め記憶されている。例えば一の仮想ECU5から送信される通信データの識別子と、他の仮想ECU5から送信される通信データの識別子とは、重複しない。 Communication data is stored in the communication data string. The identifier column stores identifiers of communication data. Specifically, in the identifier string, the identifiers of all communication data exchanged between the plurality of virtual ECUs 5 are stored in advance, similarly to the identifier string of the transmission/reception table 60 of the first embodiment. For example, the identifier of the communication data transmitted from one virtual ECU5 and the identifier of the communication data transmitted from other virtual ECU5 do not overlap.
 データ長列には、通信データのデータ長が記憶される。同期フラグ列には、送信バッファ61及び受信テーブル62における通信データの同期が行われている最中である旨を示す同期フラグが記憶される。送信バッファ61及び受信テーブル62における通信データの同期については後述する。同期フラグはオン状態とオフ状態とを含む。同期フラグがオン状態である場合、送信バッファ61及び受信テーブル62における通信データの同期は行われている。同期フラグがオフ状態である場合、送信バッファ61及び受信テーブル62における通信データの同期は行われていない。送受信テーブル60において、通信データと、当該通信データの識別子と、当該通信データのデータ長と、同期フラグとが関連付けられて記憶される。 The data length column stores the data length of the communication data. A synchronization flag indicating that synchronization of communication data in the transmission buffer 61 and the reception table 62 is being performed is stored in the synchronization flag string. Synchronization of communication data in the transmission buffer 61 and reception table 62 will be described later. A sync flag includes an ON state and an OFF state. When the synchronization flag is on, communication data in the transmission buffer 61 and the reception table 62 are synchronized. When the synchronization flag is off, synchronization of communication data in the transmission buffer 61 and the reception table 62 is not performed. In the transmission/reception table 60, the communication data, the identifier of the communication data, the data length of the communication data, and the synchronization flag are stored in association with each other.
 仮想ECU5ごとの読み出しフラグ列は、実施形態1の送受信テーブル60と同様に、仮想ECU5ごとに設けられた受信情報列、及び読み出しフラグ列を含む。それぞれの受信情報列には、受信情報が、識別子、データ長、通信データ及び更新フラグと関連付けられて記憶されている。図9の受信テーブル62においては、仮想ECU5による受信の対象である通信データと関連付けられる受信情報は、受信対象と示してある。仮想ECU5による受信の対象でない通信データと関連付けられる受信情報は、対象外と示してある。 The read flag string for each virtual ECU 5 includes a reception information string and a read flag string provided for each virtual ECU 5, similar to the transmission/reception table 60 of the first embodiment. Each received information string stores received information associated with an identifier, data length, communication data, and an update flag. In the reception table 62 of FIG. 9, reception information associated with communication data to be received by the virtual ECU 5 is indicated as a reception target. Received information associated with communication data that is not subject to reception by the virtual ECU 5 is indicated as excluded.
 それぞれの読み出しフラグ列には、実施形態1の送受信テーブル60と同様に、読み出しフラグが、受信対象という受信情報と、識別子と、データ長と、通信データと、更新フラグと関連付けられて記記憶されている。 In each read flag string, read flags are recorded and stored in association with reception information indicating reception targets, identifiers, data lengths, communication data, and update flags, as in the transmission/reception table 60 of the first embodiment. ing.
 例えば、通信データ記憶領域6には、送信バッファ61に対する通信データの読み出し及び書き込みが行われるビジー状態と、送信バッファ61に対する通信データの読み出し及び書き込みが行われない準備状態とを含む送信状態が、送信バッファ61ごとに記憶される。即ち通信データ記憶領域6には、送信状態が、仮想ECU5ごとに記憶される。送信状態が記憶される場所は、仮想ECU5及び通信データ管理部11がアクセス可能な場所、例えば記憶部21であればよく、通信データ記憶領域6に限定されない。例えば送信状態は送信バッファ61に記憶されていてもよい。仮想ECU5は、通信データ管理部11から出力される後述の同期終了信号を取得した場合、自仮想ECUと対応する送信バッファ61の送信状態を、準備状態に設定する。 For example, in the communication data storage area 6, a transmission state including a busy state in which communication data is read from and written to the transmission buffer 61 and a ready state in which communication data is not read from and written to the transmission buffer 61 is stored. It is stored for each transmission buffer 61 . That is, the transmission state is stored in the communication data storage area 6 for each virtual ECU 5 . The place where the transmission state is stored is not limited to the communication data storage area 6 as long as it is a place accessible by the virtual ECU 5 and the communication data management unit 11 , for example, the storage unit 21 . For example, the transmission status may be stored in transmission buffer 61 . The virtual ECU 5 sets the transmission state of the transmission buffer 61 corresponding to its own virtual ECU to the ready state when it acquires a synchronization end signal, which will be described later, output from the communication data management unit 11 .
 以下、実施形態2の複数の仮想ECU5の間における通信データの授受について説明する。通信データの送信元の仮想ECU5は、自仮想ECUと対応する送信バッファ61の送信状態が準備状態であるか否かを判定する。仮想ECU5は、自仮想ECUと対応する送信バッファ61の送信状態が準備状態でない場合、即ち送信状態がビジー状態である場合、送信状態が準備状態になるまで待機処理を行う。言い換えると仮想ECU5は、通信データ管理部11から出力される同期終了信号を取得するまで待機処理を行う。 Transmission and reception of communication data between a plurality of virtual ECUs 5 according to the second embodiment will be described below. The virtual ECU 5 that is the transmission source of the communication data determines whether or not the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is in the ready state. When the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is not in the ready state, that is, when the transmission state is in the busy state, the virtual ECU 5 performs standby processing until the transmission state becomes the ready state. In other words, the virtual ECU 5 performs standby processing until it acquires the synchronization end signal output from the communication data management unit 11 .
 仮想ECU5は、自仮想ECUと対応する送信バッファ61の送信状態が準備状態である場合、上記の送信バッファ61の送信状態を準備状態からビジー状態に変更する。仮想ECU5は自仮想ECUと対応する送信バッファ61に、他の仮想ECU5へ送信する通信データと、当該通信データの識別子及びデータ長とを関連付けて書き込む。以下、仮想ECU5が通信データと、識別子及びデータ長とを関連付けて送信バッファ61に書き込むことを、仮想ECU5が通信データを送信バッファ61に書き込むとも称する。受信テーブル62は、第1記憶領域に相当する。 When the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is in the ready state, the virtual ECU 5 changes the transmission state of the transmission buffer 61 from the ready state to the busy state. The virtual ECU 5 writes the communication data to be transmitted to the other virtual ECU 5 in association with the identifier and data length of the communication data in the transmission buffer 61 corresponding to its own virtual ECU. Hereinafter, the virtual ECU 5 writing the communication data to the transmission buffer 61 also refers to the communication data, the identifier, and the data length being associated with each other and written to the transmission buffer 61 . The reception table 62 corresponds to the first storage area.
 仮想ECU5が送信バッファ61に通信データ、識別子及びデータ長を書き込む際に、既に送信バッファ61に通信データ、識別子及びデータ長が書き込まれている場合が想定される。このような場合、仮想ECU5は送信バッファ61において、新たに書き込む通信データ、識別子及びデータ長を、既に書き込まれている通信データ、識別子及びデータ長に上書きする。言い換えると仮想ECU5は自仮想ECUと対応する送信バッファ61において、通信データを更新する。 It is assumed that when the virtual ECU 5 writes the communication data, the identifier and the data length to the transmission buffer 61, the communication data, the identifier and the data length have already been written to the transmission buffer 61. In such a case, the virtual ECU 5 overwrites the already written communication data, identifier and data length with the newly written communication data, identifier and data length in the transmission buffer 61 . In other words, the virtual ECU 5 updates the communication data in the transmission buffer 61 corresponding to its own virtual ECU.
 仮想ECU5は、自仮想ECUと対応する送信バッファ61に通信データを書き込んだ後、送信バッファ61に通信データが書き込まれた旨を示す書き込み完了情報を、通信データ管理部11へ出力する。通信データ管理部11に対して、送信バッファ61に通信データが書き込まれた旨が通知される。書き込み完了情報は、書き込み完了情報を出力する仮想ECU5ごとに区別されている。従って、通信データ管理部11は、出力された書き込み完了情報を取得することによって、4つの送信バッファ61のうち、いずれの送信バッファ61に通信データが書き込まれたのかを識別可能である。 After writing the communication data to the transmission buffer 61 corresponding to its own virtual ECU, the virtual ECU 5 outputs write completion information indicating that the communication data has been written to the transmission buffer 61 to the communication data management unit 11 . The communication data management unit 11 is notified that the communication data has been written to the transmission buffer 61 . The write completion information is distinguished for each virtual ECU 5 that outputs the write completion information. Therefore, by acquiring the output write completion information, the communication data management unit 11 can identify to which transmission buffer 61 of the four transmission buffers 61 the communication data has been written.
 通信データ管理部11は、仮想ECU5から出力される上述の書き込み完了情報を取得した場合、上記の仮想ECU5と対応する送信バッファ61に書き込まれた通信データを、受信テーブル62に書き込む。詳しくは、通信データ管理部11は上記の送信バッファ61に書き込まれた通信データを受信テーブル62に書き込む前に、上記の通信データの識別子と受信テーブル62にて関連付けられる同期フラグのロックが解除されているか否かを判定する。 When the above write completion information output from the virtual ECU 5 is acquired, the communication data management unit 11 writes the communication data written in the transmission buffer 61 corresponding to the virtual ECU 5 to the reception table 62 . Specifically, before the communication data management unit 11 writes the communication data written in the transmission buffer 61 to the reception table 62, the synchronization flag associated with the identifier of the communication data and the reception table 62 is unlocked. Determine whether or not
 上記の同期フラグのロックが解除されている場合、通信データ管理部11は、上記の同期フラグをロックし、ロックした同期フラグをオン状態にする。通信データ管理部11は上記の送信バッファ61に書き込まれた通信データを、受信テーブル62において上記の通信データの識別子と関連付けて、受信テーブル62に書き込む。受信テーブル62において上記の通信データの識別子と関連付けられる通信データが更新される。送信バッファ61に書き込まれた通信データと、受信テーブル62に書き込まれた一部の通信データとが同一の通信データになる。言い換えると送信バッファ61及び受信テーブル62における通信データの同期が行われる。 When the synchronization flag is unlocked, the communication data management unit 11 locks the synchronization flag and turns on the locked synchronization flag. The communication data management unit 11 associates the communication data written in the transmission buffer 61 with the identifier of the communication data in the reception table 62 and writes them in the reception table 62 . The communication data associated with the above communication data identifier in the reception table 62 is updated. The communication data written in the transmission buffer 61 and part of the communication data written in the reception table 62 are the same communication data. In other words, synchronization of communication data in the transmission buffer 61 and reception table 62 is performed.
 通信データ管理部11は通信データの受信テーブル62への書き込み後、受信テーブル62において、上記の通信データの識別子と関連付けられる読み出しフラグをオン状態にする。更に通信データ管理部11は、上記の通信データの識別子と関連付けられる同期フラグをオン状態からオフ状態に変更し、変更した同期フラグのロックを解除する。言い換えると通信データ管理部11は、通信データの受信テーブル62への書き込み後、受信テーブル62において、書き込んだ通信データの識別子と関連付けられる同期フラグ及び読み出しフラグを更新する。 After writing the communication data to the reception table 62, the communication data management unit 11 turns on the read flag associated with the identifier of the communication data in the reception table 62. Further, the communication data management unit 11 changes the synchronization flag associated with the communication data identifier from the ON state to the OFF state, and unlocks the changed synchronization flag. In other words, after writing the communication data to the reception table 62 , the communication data management unit 11 updates the synchronization flag and read flag associated with the identifier of the written communication data in the reception table 62 .
 通信データ管理部11は更新フラグ及び読み出しフラグを更新した後、同期終了信号を、同期された通信データが書き込まれている送信バッファ61と対応する仮想ECU5へ出力する。同期終了信号は、送信バッファ61及び受信テーブル62における通信データの同期が終了した旨を示す。同期された通信データが書き込まれている送信バッファ61と対応する仮想ECU5は、書き込み完了情報を出力した仮想ECU5である。 After updating the update flag and the read flag, the communication data management unit 11 outputs a synchronization end signal to the virtual ECU 5 corresponding to the transmission buffer 61 in which the synchronized communication data is written. The synchronization end signal indicates that synchronization of communication data in the transmission buffer 61 and the reception table 62 has ended. The virtual ECU 5 corresponding to the transmission buffer 61 in which the synchronized communication data is written is the virtual ECU 5 that outputs the write completion information.
 上述のように同期フラグは、送信バッファ61及び受信テーブル62における通信データの同期が行われている最中である旨を示す。言い換えると同期フラグは、受信テーブル62への通信データの書き込み中を示す。同期フラグがオン状態である場合、受信テーブル62への通信データの書き込みは行われている。同期フラグがオフ状態である場合、受信テーブル62への通信データの書き込みは行われていない。受信テーブル62には、送信先の仮想ECU5によって読み出される通信データが書き込まれる。受信テーブル62は、第2記憶領域に相当する。同期フラグは、第2記憶領域書き込みフラグに相当する。 As described above, the synchronization flag indicates that synchronization of communication data in the transmission buffer 61 and the reception table 62 is being performed. In other words, the synchronous flag indicates that communication data is being written to the reception table 62 . When the synchronization flag is ON, communication data has been written to the reception table 62 . When the synchronization flag is off, writing of communication data to the reception table 62 has not been performed. The reception table 62 is written with communication data read by the destination virtual ECU 5 . The reception table 62 corresponds to the second storage area. The synchronization flag corresponds to the second storage area write flag.
 上記の同期フラグのロックが解除されていない場合、通信データ管理部11は、送信バッファ61及び受信テーブル62における通信データの同期を行わずに、同期終了信号を、書き込み完了情報を出力した仮想ECU5へ出力する。なお同期の終了は、同期が行われなかったことを含む。 If the synchronization flag is not unlocked, the communication data management unit 11 does not synchronize the communication data in the transmission buffer 61 and the reception table 62, and outputs the synchronization end signal and the write completion information to the virtual ECU 5 Output to Note that the end of synchronization includes the fact that synchronization was not performed.
 通信データの送信先の仮想ECU5は、オフ状態である同期フラグと関連付けられる通信データであって、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態である読み出しフラグと関連付けられる通信データを受信テーブル62から読み出す。即ち仮想ECU5は、同期フラグがオフ状態であって、読み出しフラグがオン状態である場合に受信テーブル62から通信データを読み出す。 The virtual ECU 5 to which the communication data is sent is the communication data associated with the synchronization flag in the OFF state, and is associated with the read flag in the ON state among the read flags stored in the read flag column of the own virtual ECU. Communication data is read from the reception table 62 . That is, the virtual ECU 5 reads the communication data from the reception table 62 when the synchronization flag is off and the read flag is on.
 例えば仮想ECU5は、受信テーブル62を参照し、自仮想ECUの読み出しフラグがオン状態であるか否かを判定する。仮想ECU5は、自仮想ECUの読み出しフラグがオン状態でない場合、通信データの読み出しを行わない。仮想ECU5の読み出しフラグがオン状態でない場合とは、受信テーブル62において上記の仮想ECU5の読み出しフラグ列に記憶される読み出しフラグの全てがオフ状態である場合である。 For example, the virtual ECU 5 refers to the reception table 62 and determines whether or not the read flag of its own virtual ECU is on. The virtual ECU 5 does not read communication data unless the read flag of its own virtual ECU is turned on. The case where the read flag of the virtual ECU 5 is not in the ON state means that all the read flags stored in the read flag column of the virtual ECU 5 in the reception table 62 are in the OFF state.
 仮想ECU5は、自仮想ECUの読み出しフラグがオン状態である場合、以下の処理を行う。仮想ECU5は受信テーブル62において、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる同期フラグをロックする。なお仮想ECU5の読み出しフラグがオン状態である場合とは、受信テーブル62において上記の仮想ECU5の読み出しフラグ列に記憶される読み出しフラグの少なくとも1つがオン状態である場合である。 The virtual ECU 5 performs the following processing when the read flag of its own virtual ECU is on. In the reception table 62, the virtual ECU 5 locks the synchronization flag associated with the ON-state read flag among the read flags stored in the read flag row of the own virtual ECU. The case where the read flag of the virtual ECU 5 is ON means that at least one of the read flags stored in the read flag column of the virtual ECU 5 in the reception table 62 is in the ON state.
 仮想ECU5は、ロックした同期フラグがオフ状態であるか否かを判定する。仮想ECU5は、ロックした同期フラグがオフ状態である場合、以下の処理を行う。仮想ECU5は、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる通信データを受信テーブル62から読み出す。言い換えると仮想ECU5は、ロックした同期フラグと関連付けられる通信データを受信テーブル62から読み出す。 The virtual ECU 5 determines whether or not the locked synchronization flag is off. Virtual ECU5 performs the following processes, when the locked synchronous flag is in an OFF state. The virtual ECU 5 reads from the reception table 62 the communication data associated with the ON-state read flags among the read flags stored in the read flag string of its own virtual ECU. In other words, the virtual ECU 5 reads communication data associated with the locked synchronization flag from the reception table 62 .
 仮想ECU5は、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグの個数が複数である場合、当該オン状態の読み出しフラグそれぞれと関連付けられる通信データを上述のようにして受信テーブル62から読み出す。 If there are a plurality of read flags in the ON state among the read flags stored in the read flag string of the virtual ECU 5, the virtual ECU 5 sets the communication data associated with each of the read flags in the ON state as described above. to read from the reception table 62.
 仮想ECU5は、受信テーブル62から通信データを読み出した後、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、読み出した通信データと関連付けられる読み出しフラグをオン状態からオフ状態に変更する。更に仮想ECU5は、読み出した通信データと関連付けられる同期フラグのロックを解除する。 After reading the communication data from the reception table 62, the virtual ECU 5 changes the read flag associated with the read communication data from the on state to the off state among the read flags stored in the read flag row of the own virtual ECU. Furthermore, the virtual ECU 5 unlocks the synchronization flag associated with the read communication data.
 仮想ECU5は、ロックした同期フラグがオン状態である場合、受信テーブル62から通信データを読み出さない。仮想ECU5は、次の周期において受信テーブル62から通信データを読み出す。上記の同期フラグがオン状態である場合、仮想ECU5は、当該同期フラグがオフ状態になるまで待機処理を行い、同期フラグがオフ状態になった後に通信データを上述のようにして受信テーブル62から読み出してもよい。 The virtual ECU 5 does not read communication data from the reception table 62 when the locked synchronization flag is on. The virtual ECU 5 reads communication data from the reception table 62 in the next cycle. When the synchronization flag is ON, the virtual ECU 5 performs standby processing until the synchronization flag is turned OFF, and after the synchronization flag is turned OFF, the communication data is transferred from the reception table 62 as described above. May be read.
 図10は、実施形態2の仮想ECU5が行う他の仮想ECU5への通信データの送信に係る処理を例示するフローチャートである。例えば、仮想ECU5は生成、又は活性化された際に以下の処理を行う。 FIG. 10 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU 5 performed by the virtual ECU 5 of the second embodiment. For example, the virtual ECU 5 performs the following processing when generated or activated.
 通信データの送信元の仮想ECU5は、自仮想ECUと対応する送信バッファ61の送信状態が準備状態であるか否かを判定する(S31)。仮想ECU5は、自仮想ECUと対応する送信バッファ61の送信状態が準備状態でない場合(S31:NO)、即ち送信状態がビジー状態である場合、再度S31の処理を行うべくループ処理を行う。言い換えると仮想ECU5は、自仮想ECUと対応する送信バッファ61の送信状態が準備状態になるまで待機処理を行う。 The virtual ECU 5 that is the transmission source of the communication data determines whether or not the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is ready (S31). If the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is not ready (S31: NO), that is, if the transmission state is busy, the virtual ECU 5 performs loop processing to perform the processing of S31 again. In other words, the virtual ECU 5 performs standby processing until the transmission state of the transmission buffer 61 corresponding to its own virtual ECU reaches the ready state.
 仮想ECU5は、自仮想ECUと対応する送信バッファ61の送信状態が準備状態である場合(S31:YES)、上記の送信バッファ61の送信状態を準備状態からビジー状態に変更する(S32)。仮想ECU5は上述のように、自仮想ECUと対応する送信バッファ61に、他の仮想ECU5へ送信する通信データと、当該通信データの識別子及びデータ長とを関連付けて書き込む。言い換えると仮想ECU5は、自仮想ECUと対応する送信バッファ61にて、通信データ、識別子及びデータ長を更新する(S33)。 When the transmission state of the transmission buffer 61 corresponding to its own virtual ECU is in the ready state (S31: YES), the virtual ECU 5 changes the transmission state of the transmission buffer 61 from the ready state to the busy state (S32). As described above, the virtual ECU 5 writes the communication data to be transmitted to the other virtual ECU 5 in association with the identifier and data length of the communication data in the transmission buffer 61 corresponding to its own virtual ECU. In other words, the virtual ECU 5 updates the communication data, the identifier and the data length in the transmission buffer 61 corresponding to its own virtual ECU (S33).
 仮想ECU5は、自仮想ECUと対応する送信バッファ61に通信データ、識別子及びデータ長を書き込んだ後、書き込み完了情報を通信データ管理部11へ出力し(S34)、処理を終了する。通信データ管理部11へ出力される書き込み完了情報は、いわゆる通信データ管理部11への割り込み通知である。仮想ECU5は処理を終了する代わりに、S31の処理を行ってもよい。 After writing the communication data, the identifier and the data length to the transmission buffer 61 corresponding to its own virtual ECU 5, the virtual ECU 5 outputs the write completion information to the communication data management unit 11 (S34), and ends the process. The write completion information output to the communication data management unit 11 is a so-called interrupt notification to the communication data management unit 11 . The virtual ECU 5 may perform the process of S31 instead of ending the process.
 図11は、通信データ管理部11が行う送信バッファ61及び受信テーブル62における通信データの同期に係る処理を例示するフローチャートである。例えば、車両のIG(イグニッション)スイッチが停止状態から起動状態へ遷移した際に、第4演算装置204が通信データ管理部11として機能する。通信データ管理部11は、仮想ECU5から出力される上述の書き込み完了情報を取得した場合、以下の処理を行う。 FIG. 11 is a flowchart illustrating processing related to communication data synchronization in the transmission buffer 61 and the reception table 62 performed by the communication data management unit 11 . For example, the fourth arithmetic unit 204 functions as the communication data management unit 11 when an IG (ignition) switch of the vehicle changes from a stopped state to an activated state. The communication data management part 11 performs the following processes, when the above-mentioned write completion information output from virtual ECU5 is acquired.
 通信データ管理部11は、書き込み完了情報を出力した仮想ECU5と対応する送信バッファ61に書き込まれた通信データの識別子と、受信テーブル62において関連付けられる同期フラグのロックが解除されているか否かを判定する(S41)。上記の同期フラグのロックが解除されていない場合(S41:NO)、即ち同期フラグがロックされている場合、通信データ管理部11は、後述のS49の処理を行う。 The communication data management unit 11 determines whether or not the identifier of the communication data written in the transmission buffer 61 corresponding to the virtual ECU 5 that has output the write completion information and the synchronization flag associated in the reception table 62 are unlocked. (S41). If the synchronization flag is not unlocked (S41: NO), that is, if the synchronization flag is locked, the communication data management unit 11 performs the process of S49, which will be described later.
 上記の同期フラグのロックが解除されている場合(S41:YES)、通信データ管理部11は、上記の同期フラグのロックを試み(S42)、当該同期フラグのロックに成功したか否かを判定する(S43)。通信データ管理部11は、同期フラグのロックに成功しなかった場合(S43:NO)、即ち同期フラグのロックに失敗した場合、後述のS49の処理を行う。通信データ管理部11は、同期フラグのロックに失敗した場合、再度、同期フラグのロックを試みてもよい。例えば通信データ管理部11は、同期フラグのロックに所定回数失敗した際、S49の処理を行う。 If the synchronization flag is unlocked (S41: YES), the communication data management unit 11 attempts to lock the synchronization flag (S42), and determines whether or not the synchronization flag has been successfully locked. (S43). If the synchronization flag is not successfully locked (S43: NO), that is, if the synchronization flag is not successfully locked, the communication data management unit 11 performs the process of S49, which will be described later. When the communication data management unit 11 fails to lock the synchronization flag, it may attempt to lock the synchronization flag again. For example, the communication data management unit 11 performs the process of S49 when the locking of the synchronization flag fails a predetermined number of times.
 通信データ管理部11は、同期フラグのロックに成功した場合(S43:YES)、即ち同期フラグをロックした場合、ロックした同期フラグをオン状態にする(S44)。通信データ管理部11は上記の送信バッファ61に書き込まれた通信データを、受信テーブル62において上記の通信データの識別子と関連付けて、受信テーブル62に書き込む(S45)。送信バッファ61及び受信テーブル62における通信データの同期が行われる。言い換えると受信テーブル62において通信データが更新される。 When the synchronization flag is successfully locked (S43: YES), that is, when the synchronization flag is locked, the communication data management unit 11 turns on the locked synchronization flag (S44). The communication data management unit 11 associates the communication data written in the transmission buffer 61 with the identifier of the communication data in the reception table 62, and writes them in the reception table 62 (S45). Communication data in the transmission buffer 61 and the reception table 62 are synchronized. In other words, the communication data are updated in the reception table 62 .
 上述のように通信データ管理部11は受信テーブル62において、上記の通信データの識別子と関連付けられる読み出しフラグをオン状態にする(S46)。更に通信データ管理部11は、上記の通信データの識別子と関連付けられる同期フラグをオフ状態にし(S47)、オフ状態にした同期フラグのロックを解除する(S48)。通信データ管理部11は、書き込み完了情報を出力した仮想ECU5へ同期終了信号を出力し(S49)、処理を終了する。仮想ECU5は、出力された同期終了信号を取得することによって、自仮想ECUの送信バッファ61の送信状態を準備状態にする。仮想ECU5へ出力される同期終了信号は、いわゆる仮想ECU5への割り込み通知である。 As described above, the communication data management unit 11 turns on the read flag associated with the communication data identifier in the reception table 62 (S46). Furthermore, the communication data management unit 11 turns off the synchronization flag associated with the communication data identifier (S47), and unlocks the synchronization flag that has been turned off (S48). The communication data management unit 11 outputs a synchronization end signal to the virtual ECU 5 that has output the write completion information (S49), and terminates the process. The virtual ECU 5 changes the transmission state of the transmission buffer 61 of its own virtual ECU to the ready state by acquiring the output synchronization end signal. The synchronization end signal output to the virtual ECU 5 is a so-called interrupt notification to the virtual ECU 5 .
 図12は、実施形態2の仮想ECU5が行う他の仮想ECU5からの通信データの受信に係る処理を例示するフローチャートである。例えば、仮想ECU5は生成、又は活性化された際に以下の処理を行う。 FIG. 12 is a flowchart illustrating processing related to reception of communication data from another virtual ECU 5 performed by the virtual ECU 5 of the second embodiment. For example, the virtual ECU 5 performs the following processing when generated or activated.
 仮想ECU5は、受信テーブル62を参照し、自仮想ECUの読み出しフラグがオン状態であるか否かを判定する(S51)。仮想ECU5は、自仮想ECUの読み出しフラグがオン状態でない場合(S51:NO)、処理を終了する。仮想ECU5は、自仮想ECUの読み出しフラグがオン状態である場合(S51:YES)、以下の処理を行う。仮想ECU5は受信テーブル62において、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる同期フラグのロックを試み(S52)、当該同期フラグのロックに成功したか否かを判定する(S53)。仮想ECU5は、同期フラグのロックに成功しなかった場合(S53:NO)、即ち同期フラグのロックに失敗した場合、処理を終了する。仮想ECU5は、同期フラグのロックに失敗した場合、再度、同期フラグのロックを試みてもよい。例えば仮想ECU5は、同期フラグのロックに所定回数失敗した際、処理を終了する。 The virtual ECU 5 refers to the reception table 62 and determines whether or not the read flag of its own virtual ECU is on (S51). If the read flag of the own virtual ECU is not on (S51: NO), the virtual ECU 5 ends the process. Virtual ECU5 performs the following processes, when the read-out flag of self virtual ECU is an ON state (S51:YES). In the reception table 62, the virtual ECU 5 tries to lock the synchronization flag associated with the read flag in the ON state among the read flags stored in the read flag string of its own virtual ECU (S52), and succeeds in locking the synchronization flag. (S53). When the virtual ECU 5 fails to lock the synchronization flag (S53: NO), that is, when it fails to lock the synchronization flag, it ends the process. When the virtual ECU 5 fails to lock the synchronization flag, it may attempt to lock the synchronization flag again. For example, the virtual ECU 5 terminates the process when it fails to lock the synchronization flag a predetermined number of times.
 仮想ECU5は、同期フラグのロックに成功した場合(S53:YES)、即ち同期フラグをロックした場合、ロックした同期フラグがオフ状態であるか否かを判定する(S54)。上記の同期フラグがオフ状態である場合(S54:YES)、仮想ECU5は、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる通信データを受信テーブル62から読み出す(S55)。即ち仮想ECU5は、オフ状態の同期フラグと関連付けられる通信データであって、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、オン状態の読み出しフラグと関連付けられる通信データを送受信テーブル60から読み出す。 When the synchronization flag is successfully locked (S53: YES), that is, when the synchronization flag is locked, the virtual ECU 5 determines whether the locked synchronization flag is off (S54). If the synchronization flag is OFF (S54: YES), the virtual ECU 5 receives the communication data associated with the ON read flag among the read flags stored in the read flag column of the virtual ECU. (S55). That is, the virtual ECU 5 retrieves from the transmission/reception table 60 the communication data associated with the ON-state read flag among the read flags stored in the read flag string of the virtual ECU 5, which is communication data associated with the OFF-state synchronization flag. read out.
 仮想ECU5は、自仮想ECUの読み出しフラグ列に記憶される読み出しフラグのうち、受信テーブル62から読み出した通信データと関連付けられる読み出しフラグをオフ状態にする(S56)。仮想ECU5は、受信テーブル62から読み出した通信データと関連付けられる同期フラグのロックを解除し(S57)、処理を終了する。 The virtual ECU 5 turns off the read flag associated with the communication data read from the reception table 62 among the read flags stored in the read flag string of its own virtual ECU (S56). The virtual ECU 5 unlocks the synchronization flag associated with the communication data read from the reception table 62 (S57), and ends the process.
 上記の同期フラグがオフ状態でない場合(S54:NO)、即ち当該同期フラグがオン状態である場合、仮想ECU5は、処理を終了する。当該仮想ECU5は、再度生成(活性化)された際に、他の仮想ECU5からの通信データの受信に係る処理を行い、上述のようにして通信データを受信テーブル62から読み出す。上記の同期フラグがオフ状態でない場合、仮想ECU5は、再度S54の判定を行うべくループ処理を行ってもよい。仮想ECU5は、上記のループ処理を行うにあたって、所定時間の待機処理を実行してもよい。言い換えると仮想ECU5は、同期フラグがオフ状態になるまで待機処理を行い、同期フラグがオフ状態になった際にS55の処理を行ってもよい。 If the synchronization flag is not off (S54: NO), that is, if the synchronization flag is on, the virtual ECU 5 ends the process. When the virtual ECU 5 is regenerated (activated), it performs processing related to receiving communication data from another virtual ECU 5, and reads the communication data from the reception table 62 as described above. If the synchronization flag is not in the OFF state, the virtual ECU 5 may perform loop processing to perform the determination of S54 again. The virtual ECU 5 may perform standby processing for a predetermined time before performing the above loop processing. In other words, the virtual ECU 5 may perform the standby process until the synchronization flag is turned off, and perform the process of S55 when the synchronization flag is turned off.
 本実施形態においては、通信データ記憶領域6は、複数の仮想ECU5それぞれに対して設けられる送信バッファ61と、各仮想ECU5、及び通信データ管理部11がアクセス可能な受信テーブル62とを含む。仮想ECU5は他の仮想ECU5へ送信する通信データを、自仮想ECUと対応する送信バッファ61に書き込む。通信データ管理部11は、第1記憶領域に書き込まれる通信データを第2記憶領域に書き込む。通信データ管理部11は、送信バッファ61に書き込まれた通信データを受信テーブル62に書き込む前に、受信テーブル62において当該通信データと関連付けられる同期フラグをオン状態にする。通信データ管理部11は通信データの受信テーブル62への書き込み後に、受信テーブル62において、当該通信データと関連付けられる同期フラグをオン状態からオフ状態に変更し、更に上記の通信データと関連付けられる読み出しフラグをオン状態にする。通信データの送信先の仮想ECU5は、同期フラグがオフ状態であって、自仮想ECUと対応する読み出しフラグがオン状態である場合に、同期フラグがオフ状態であって、上記の読み出しフラグがオン状態である通信データを受信テーブル62から読み出す。送信バッファ61は複数の仮想ECU5それぞれに対して設けられているので、複数の仮想ECU5が通信データを同一の送信バッファ61に書き込むことはない。仮想ECU5は、他の仮想ECU5による通信データの書き込みが行われている場合でも、当該書き込みの終了を待つことなく、自仮想ECUと対応する自送信バッファに通信データを書き込むことができる。仮想ECU5は、他の仮想ECU5が受信テーブル62から通信データを読み出している際にも、自仮想ECUと対応する送信バッファ61に通信データを書き込むことができる。 In this embodiment, the communication data storage area 6 includes a transmission buffer 61 provided for each of the plurality of virtual ECUs 5 and a reception table 62 accessible by each virtual ECU 5 and the communication data management unit 11 . The virtual ECU 5 writes communication data to be transmitted to the other virtual ECUs 5 into the transmission buffer 61 corresponding to its own virtual ECU. The communication data management unit 11 writes the communication data written in the first storage area to the second storage area. Before writing the communication data written in the transmission buffer 61 to the reception table 62 , the communication data management unit 11 turns on the synchronization flag associated with the communication data in the reception table 62 . After writing the communication data to the reception table 62, the communication data management unit 11 changes the synchronization flag associated with the communication data from the ON state to the OFF state in the reception table 62, and further changes the read flag associated with the communication data. turn on. The virtual ECU 5 to which the communication data is to be sent has the synchronization flag turned off and the read flag corresponding to the own virtual ECU is turned on, the synchronization flag is turned off and the read flag is turned on The communication data indicating the state is read from the reception table 62 . Since the transmission buffer 61 is provided for each of the multiple virtual ECUs 5 , the multiple virtual ECUs 5 do not write the communication data to the same transmission buffer 61 . Even if another virtual ECU 5 is writing communication data, the virtual ECU 5 can write the communication data into its own transmission buffer corresponding to its own virtual ECU without waiting for the end of the writing. The virtual ECU 5 can write communication data to the transmission buffer 61 corresponding to its own virtual ECU even when another virtual ECU 5 is reading communication data from the reception table 62 .
 本実施形態においては、仮想ECU管理部10として機能する演算装置200と、通信データ管理部11として機能する演算装置200とは、同一の仮想ECU5である。仮想ECU管理部10として機能する演算装置200と、通信データ管理部11として機能する演算装置200とは、異なる仮想ECU5であってもよい。同一の仮想ECU5が、仮想ECU5として機能することと、通信データ管理部11として機能することとを行ってもよい。 In this embodiment, the arithmetic device 200 functioning as the virtual ECU management unit 10 and the arithmetic device 200 functioning as the communication data management unit 11 are the same virtual ECU 5 . The arithmetic device 200 functioning as the virtual ECU management unit 10 and the arithmetic device 200 functioning as the communication data management unit 11 may be different virtual ECUs 5 . The same virtual ECU 5 may function both as the virtual ECU 5 and as the communication data management unit 11 .
 (実施形態3)
 図13は、実施形態3の送信バッファ61の構成を例示する模式図である。実施形態3に係る構成の内、実施形態2と同様な構成部については同じ符号を付し、その詳細な説明を省略する。実施形態3は、複数の通信データを書き込み可能な送信バッファ61を含む通信データ記憶領域6を介して、複数の仮想ECU5の間における通信データの授受が行われる車載ECU2に関する。
(Embodiment 3)
FIG. 13 is a schematic diagram illustrating the configuration of the transmission buffer 61 according to the third embodiment. In the configuration according to Embodiment 3, the same components as those in Embodiment 2 are denoted by the same reference numerals, and detailed description thereof will be omitted. Embodiment 3 relates to an in-vehicle ECU 2 in which communication data is exchanged between a plurality of virtual ECUs 5 via a communication data storage area 6 including a transmission buffer 61 into which a plurality of communication data can be written.
 実施形態3の通信データ記憶領域6は、複数の通信データを書き込み可能な送信バッファ61を含む。送信バッファ61は、実施形態2と同様に、複数の仮想ECU5それぞれに対して設けられている。送信バッファ61には、通信データと、当該通信データの識別子と、当該通信データのデータ長とが関連付けられて記憶される。送信バッファ61は、複数の通信データを、識別子、データ長及びカウント値と関連付けて書き込むことができる構成である。図13の送信バッファ61は、段数がNであり、N個の段を有する。なおNは自然数である。1つの段に、1つの通信データと、当該通信データの識別子及びデータ長とが関連付けて書き込まれる。従って、図13の送信バッファ61には、最大でN個の通信データと識別子及びデータ長とを関連付けて書き込むことができる。 The communication data storage area 6 of Embodiment 3 includes a transmission buffer 61 into which multiple pieces of communication data can be written. The transmission buffer 61 is provided for each of the multiple virtual ECUs 5, as in the second embodiment. The transmission buffer 61 stores communication data, an identifier of the communication data, and a data length of the communication data in association with each other. The transmission buffer 61 is configured so that a plurality of pieces of communication data can be written in association with identifiers, data lengths, and count values. The transmission buffer 61 in FIG. 13 has N stages and has N stages. Note that N is a natural number. One piece of communication data is written in association with the identifier and data length of the communication data in one stage. Therefore, up to N pieces of communication data, identifiers, and data lengths can be written in association with each other in the transmission buffer 61 of FIG.
 上述のように仮想ECU5は、自仮想ECUと対応する送信バッファ61に複数の通信データを書き込むことができる。通信データ記憶領域6には、送信バッファ61に書き込まれた通信データの個数を示す書き込み個数が、送信バッファ61ごとに記憶される。即ち通信データ記憶領域6には、書き込み個数が、仮想ECU5ごとに記憶される。 As described above, the virtual ECU 5 can write a plurality of pieces of communication data to the transmission buffer 61 corresponding to its own virtual ECU. In the communication data storage area 6, the number of writes indicating the number of pieces of communication data written in the transmission buffer 61 is stored for each transmission buffer 61. FIG. That is, the number of writes is stored in the communication data storage area 6 for each virtual ECU 5 .
 以下、仮想ECU5が自仮想ECUと対応する送信バッファ61にN個の通信データを書き込む例を説明する。仮想ECU5は、N個の通信データのうち、1つ目の通信データを書き込む前に、自仮想ECUと対応する送信バッファ61の書き込み個数を0に設定する。仮想ECU5は、1つ目の通信データを送信バッファに書き込む際、自仮想ECUと対応する送信バッファ61の書き込み個数を1増加させる。仮想ECU5は、1つ目の通信データと当該通信データの識別子及びデータ長とを関連付けて、自仮想ECUと対応する送信バッファ61の1段目に書き込む。なお仮想ECU5は、送信バッファ61への通信データの書き込みの前に書き込み個数を1増加させてもよく、送信バッファ61への通信データの書き込みの後に書き込み個数を1増加させてもよい。 An example in which the virtual ECU 5 writes N pieces of communication data to the transmission buffer 61 corresponding to its own virtual ECU will be described below. Before writing the first communication data out of the N pieces of communication data, the virtual ECU 5 sets the number of writes to 0 in the transmission buffer 61 corresponding to its own virtual ECU. When the virtual ECU 5 writes the first communication data to the transmission buffer, the virtual ECU 5 increases the number of data written in the transmission buffer 61 corresponding to the own virtual ECU by one. The virtual ECU 5 associates the first communication data with the identifier and data length of the communication data, and writes them to the first stage of the transmission buffer 61 corresponding to the own virtual ECU. The virtual ECU 5 may increase the number of writes by 1 before writing the communication data to the transmission buffer 61 or may increase the number of writes by 1 after writing the communication data to the transmission buffer 61 .
 仮想ECU5は、2つ目の通信データを送信バッファに書き込む際、自仮想ECUと対応する送信バッファ61の書き込み個数を1増加させる。仮想ECU5は、2つ目の通信データと当該通信データの識別子及びデータ長とを関連付けて、自仮想ECUと対応する送信バッファ61の2段目に書き込む。仮想ECU5は、自仮想ECUと対応する送信バッファ61の書き込み個数を1増加させることと、通信データと当該通信データの識別子及びデータ長とを関連付けて送信バッファ61に書き込むこととを繰り返す。 When writing the second communication data to the transmission buffer, the virtual ECU 5 increments the number of writes in the transmission buffer 61 corresponding to its own virtual ECU by one. The virtual ECU 5 associates the second communication data with the identifier and data length of the communication data, and writes them to the second stage of the transmission buffer 61 corresponding to the own virtual ECU. The virtual ECU 5 repeats incrementing the number of writes in the transmission buffer 61 corresponding to its own virtual ECU by 1, associating communication data with the identifier and data length of the communication data, and writing the communication data in the transmission buffer 61 .
 仮想ECU5は、N個目の通信データを送信バッファに書き込む際、自仮想ECUと対応する送信バッファ61の書き込み個数を1増加させる。仮想ECU5は、N個目の通信データと当該通信データの識別子及びデータ長とを関連付けて、自仮想ECUと対応する送信バッファ61のN段目に書き込む。仮想ECU5から他の仮想ECU5へ送信される予定の全ての通信データが送信バッファ61に書き込まれる。仮想ECU5は、他の仮想ECU5へ送信する予定の全ての通信データを送信バッファ61に書き込んだ後、通信データ管理部11へ書き込み完了情報を出力する。 When writing the N-th communication data to the transmission buffer, the virtual ECU 5 increments the number of writes in the transmission buffer 61 corresponding to its own virtual ECU by one. The virtual ECU 5 associates the N-th communication data with the identifier and data length of the communication data, and writes them to the N-th stage of the transmission buffer 61 corresponding to the own virtual ECU. All communication data scheduled to be transmitted from the virtual ECU 5 to another virtual ECU 5 are written in the transmission buffer 61 . The virtual ECU 5 outputs write completion information to the communication data management unit 11 after writing all the communication data to be transmitted to the other virtual ECU 5 in the transmission buffer 61 .
 仮想ECU5は、送信バッファ61に新たに通信データを書き込む際、送信バッファ61に既に通信データが書き込まれていた場合、実施形態2と同様に、新たな通信データを既に書き込まれていた通信データに上書きする。例えば、既に送信バッファ61に書き込まれていた通信データの個数が、仮想ECU5が新たに書き込む通信データの個数よりも多い場合、仮想ECU5は以下のようにして送信バッファ61の通信データを更新してもよい。仮想ECU5は新たな通信データと、当該新たな通信データの識別子及びデータ長とを、既に送信バッファ61に書き込まれていた通信データのうち、一部の通信データと、当該一部の通信データの識別子及びデータ長とに上書きする。仮想ECU5は、既に送信バッファ61に書き込まれていた通信データのうち、残りの通信データと、残りの通信データの識別子及びデータ長とを削除する。仮想ECU5は、既に送信バッファ61に書き込まれていた全ての通信データ、識別子及びデータ長を削除し、新たな通信データ、識別子及びデータ長を送信バッファ61に書き込んでもよい。 When writing new communication data to the transmission buffer 61, if the communication data has already been written to the transmission buffer 61, the virtual ECU 5 writes the new communication data to the already written communication data, as in the second embodiment. Overwrite. For example, when the number of pieces of communication data already written in the transmission buffer 61 is greater than the number of pieces of communication data newly written by the virtual ECU 5, the virtual ECU 5 updates the communication data in the transmission buffer 61 as follows. good too. The virtual ECU 5 stores the new communication data, the identifier and the data length of the new communication data, part of the communication data already written in the transmission buffer 61, and the part of the communication data. Overwrite the identifier and data length. The virtual ECU 5 deletes the remaining communication data and the identifier and data length of the remaining communication data from the communication data already written in the transmission buffer 61 . The virtual ECU 5 may delete all communication data, identifiers and data lengths already written in the transmission buffer 61 and write new communication data, identifiers and data lengths in the transmission buffer 61 .
 上述のように仮想ECU5は、1つの通信データを送信バッファ61に書き込むごとに、通信データを書き込んだ送信バッファ61の書き込み個数を1増加させる。言い換えると仮想ECU5は、1つの通信データを送信バッファ61に書き込むごとに、書き込み個数を更新する。例えば第1仮想ECU51がN個の通信データを第1送信バッファ611に書き込んだ場合、第1送信バッファ611の書き込み個数はNに設定されている。 As described above, the virtual ECU 5 increases by 1 the number of writes in the transmission buffer 61 into which the communication data is written each time one piece of communication data is written into the transmission buffer 61 . In other words, the virtual ECU 5 updates the number of writes each time one piece of communication data is written in the transmission buffer 61 . For example, when the first virtual ECU 51 writes N pieces of communication data to the first transmission buffer 611, the number of pieces written in the first transmission buffer 611 is set to N.
 本実施形態において仮想ECU5は、1つの通信データを送信バッファ61に書き込むごとに書き込み個数を1増加させるが、書き込み個数を増加させる方法は、上記の方法に限定されない。仮想ECU5は、自仮想ECUと対応する送信バッファ61に書き込んだ通信データの個数に応じて、上記の送信バッファ61の書き込み個数を増加させればよい。例えば仮想ECU5は、複数の通信データを送信バッファ61に書き込んだ後に、通信データを書き込んだ送信バッファ61の書き込み個数を、書き込んだ通信データの個数に設定してもよい。 In this embodiment, the virtual ECU 5 increases the number of written data by 1 each time it writes one piece of communication data to the transmission buffer 61, but the method of increasing the number of written data is not limited to the above method. The virtual ECU 5 may increase the number of pieces of data written in the transmission buffer 61 according to the number of pieces of communication data written in the transmission buffer 61 corresponding to its own virtual ECU. For example, after writing a plurality of pieces of communication data in the transmission buffer 61, the virtual ECU 5 may set the number of pieces of communication data written in the transmission buffer 61 to the number of pieces of written communication data.
 通信データ記憶領域6には、送信バッファ61及び受信テーブル62における通信データの同期が行われた通信データの個数を示す同期個数が、送信バッファ61ごとに記憶される。即ち、通信データ記憶領域6には、同期個数が仮想ECU5ごとに記憶される。 The communication data storage area 6 stores, for each transmission buffer 61, the number of synchronizations indicating the number of pieces of communication data that have been synchronized in the transmission buffer 61 and the reception table 62. That is, the number of synchronizations is stored in the communication data storage area 6 for each virtual ECU 5 .
 通信データ管理部11は、仮想ECU5から出力される書き込み完了情報を取得した場合、以下の処理を行う。通信データ管理部11は、通信データ記憶領域6を参照し、取得した書き込み完了情報を出力した仮想ECU5と対応する送信バッファ61の書き込み個数を取得する。上記の例において、送信バッファ61の書き込み個数はNである。通信データ管理部11は、上記の送信バッファ61の同期個数を0に設定する。通信データ管理部11は、上記の送信バッファ61から1つ目の通信データを読み出し、読み出した通信データを、実施形態2と同様にして、受信テーブル62に書き込む。言い換えると1つ目の通信データが、送信バッファ61及び受信テーブル62において同期される。例えば1つ目の通信データは、上記の送信バッファ61の1段目の通信データである。 When the communication data management unit 11 acquires the write completion information output from the virtual ECU 5, it performs the following processing. The communication data management unit 11 refers to the communication data storage area 6 and acquires the number of writes in the transmission buffer 61 corresponding to the virtual ECU 5 that has output the acquired write completion information. In the above example, the number of writes in the transmission buffer 61 is N. The communication data management unit 11 sets the number of synchronous data in the transmission buffer 61 to zero. The communication data management unit 11 reads the first communication data from the transmission buffer 61 and writes the read communication data to the reception table 62 in the same manner as in the second embodiment. In other words, the first communication data is synchronized in the transmission buffer 61 and reception table 62 . For example, the first communication data is communication data in the first stage of the transmission buffer 61 described above.
 通信データ管理部11は、上記の送信バッファ61から読み出した1つ目の通信データを受信テーブル62に書き込んだ後、上記の送信バッファ61の同期個数を1増加させる。通信データ管理部11は、取得した上記の送信バッファ61の書き込み個数と、上記の送信バッファ61の同期個数とを比較する。 After writing the first communication data read from the transmission buffer 61 to the reception table 62, the communication data management unit 11 increases the synchronization number of the transmission buffer 61 by one. The communication data management unit 11 compares the obtained number of written data in the transmission buffer 61 with the synchronous number of data in the transmission buffer 61 .
 同期個数が書き込み個数よりも少ない場合、即ち書き込み個数及び同期個数が一致しない場合、通信データ管理部11は、上記の送信バッファ61から2つ目の通信データを読み出し、読み出した通信データを、実施形態2と同様にして、受信テーブル62に書き込む。例えば2つ目の通信データは、上記の送信バッファ61の2段目の通信データである。通信データ管理部11は、2つ目の通信データを受信テーブル62に書き込んだ後、上記の送信バッファ61の同期個数を1増加させる。更に通信データ管理部11は、上記の送信バッファ61の書き込み個数及び同期個数を比較する。 When the synchronous number is smaller than the written number, that is, when the written number and the synchronous number do not match, the communication data management unit 11 reads the second communication data from the transmission buffer 61 and executes the read communication data. Write to the reception table 62 in the same manner as in form 2. For example, the second communication data is communication data in the second stage of the transmission buffer 61 described above. After writing the second communication data to the reception table 62, the communication data management unit 11 increases the number of synchronization data in the transmission buffer 61 by one. Furthermore, the communication data management unit 11 compares the number of writes in the transmission buffer 61 and the number of synchronizations.
 通信データ管理部11は、上記の送信バッファ61の書き込み個数と上記の送信バッファ61の同期個数とが一致するまで、受信テーブル62への通信データの書き込みと、送信バッファ61の同期個数を1増加させることとを繰り返す。上記の例において通信データ管理部11は、上記の送信バッファ61の同期個数がNになるまで、受信テーブル62への通信データの書き込みと、送信バッファ61の同期個数を1増加させることとを繰り返す。 The communication data management unit 11 writes communication data to the reception table 62 and increments the number of synchronizations in the transmission buffer 61 by 1 until the number of writings in the transmission buffer 61 and the number of synchronizations in the transmission buffer 61 match. repeat. In the above example, the communication data management unit 11 repeats writing communication data to the reception table 62 and increasing the number of synchronizations in the transmission buffer 61 by 1 until the number of synchronizations in the transmission buffer 61 reaches N. .
 なお書き込み個数、及び同期個数が記憶される場所は、仮想ECU5及び通信データ管理部11がアクセス可能な場所、例えば記憶部21であればよく、通信データ記憶領域6に限定されない。例えば書き込み個数、及び同期個数は送信バッファ61に記憶されていてもよい。 The location where the number of writes and the number of synchronizations are stored is not limited to the communication data storage area 6 as long as it is accessible by the virtual ECU 5 and the communication data management unit 11, such as the storage unit 21. For example, the number of writes and the number of synchronizations may be stored in the transmission buffer 61 .
 例えばロックされている同期フラグと受信テーブル62において関連付けられる識別子の通信データが、送信バッファ61に書き込まれている場合、通信データ管理部11は、以下の処理を行う。通信データ管理部11は、上記の通信データに対して送信バッファ61及び受信テーブル62における同期を行わずに、送信バッファ61の同期個数を1増加させる。通信データ管理部11は、上記の送信バッファ61の書き込み個数及び同期個数を比較する。同期個数が書き込み個数よりも少ない場合、通信データ管理部11は、上記の通信データの次の通信データに対して、上述のようにして送信バッファ61及び受信テーブル62における同期を行う。 For example, when communication data with an identifier associated with a locked synchronization flag in the reception table 62 is written in the transmission buffer 61, the communication data management unit 11 performs the following processing. The communication data management unit 11 increases the number of synchronizations in the transmission buffer 61 by 1 without synchronizing the communication data in the transmission buffer 61 and the reception table 62 . The communication data management unit 11 compares the number of writes in the transmission buffer 61 and the number of synchronizations. When the number of synchronizations is smaller than the number of writings, the communication data management unit 11 synchronizes the transmission buffer 61 and the reception table 62 as described above for the next communication data of the above communication data.
 通信データの送信先の仮想ECU5は、実施形態2と同様にして、受信テーブル62から通信データを読み出す。 The virtual ECU 5 to which the communication data is sent reads the communication data from the reception table 62 in the same manner as in the second embodiment.
 図14は、実施形態3の仮想ECU5が行う他の仮想ECU5への通信データの送信に係る処理を例示するフローチャートである。例えば、仮想ECU5は生成、又は活性化された際に以下の処理を行う。 FIG. 14 is a flowchart illustrating processing related to transmission of communication data to another virtual ECU 5 performed by the virtual ECU 5 of the third embodiment. For example, the virtual ECU 5 performs the following processing when generated or activated.
 仮想ECU5は、自仮想ECUと対応する送信バッファ61の書き込み個数を0に設定する(S61)。仮想ECU5は、未送信の通信データがあるか否かを判定する(S62)。未送信の通信データは、他の仮想ECU5へ送信予定の通信データのうち、送信バッファ61に書き込まれていない通信データである。 The virtual ECU 5 sets the number of writes in the transmission buffer 61 corresponding to its own virtual ECU to 0 (S61). The virtual ECU 5 determines whether or not there is unsent communication data (S62). Communication data that has not been transmitted is communication data that is not written in the transmission buffer 61 among communication data scheduled to be transmitted to another virtual ECU 5 .
 未送信の通信データがある場合(S62:YES)、仮想ECU5は、未送信の通信データと、当該通信データの識別子及びデータ長とを自仮想ECUと対応する送信バッファ61に上述のように書き込む(S63)。例えば仮想ECU5は、未送信の通信データのうち、1つの通信データと、当該通信データの識別子及びデータ長とを自仮想ECUと対応する送信バッファ61に上述のように書き込む。仮想ECU5は上述のように、自仮想ECUと対応する送信バッファ61の書き込み個数を増加させる(S64)。例えば仮想ECU5は、上記の送信バッファ61に1つの通信データを書き込んだ際、上記の送信バッファ61の書き込み個数を1増加させる。仮想ECU5はS62の処理を行う。 If there is unsent communication data (S62: YES), the virtual ECU 5 writes the unsent communication data and the identifier and data length of the communication data to the transmission buffer 61 corresponding to the own virtual ECU as described above. (S63). For example, the virtual ECU 5 writes one piece of communication data among the unsent communication data, and the identifier and data length of the communication data in the transmission buffer 61 corresponding to the own virtual ECU as described above. As described above, the virtual ECU 5 increases the number of writes in the transmission buffer 61 corresponding to its own virtual ECU (S64). For example, the virtual ECU 5 increases the number of data written in the transmission buffer 61 by one when writing one communication data in the transmission buffer 61 . The virtual ECU 5 performs the process of S62.
 未送信の通信データがない場合(S62:NO)、仮想ECU5は、書き込み完了情報を通信データ管理部11へ出力し(S65)、処理を終了する。 If there is no unsent communication data (S62: NO), the virtual ECU 5 outputs write completion information to the communication data management unit 11 (S65), and ends the process.
 図15は、実施形態3の通信データ管理部11が行う送信バッファ61及び受信テーブル62における通信データの同期に係る処理を例示するフローチャートである。通信データ管理部11は、仮想ECU5から出力される上述の書き込み完了情報を取得した場合、以下の処理を行う。 FIG. 15 is a flowchart illustrating processing related to communication data synchronization in the transmission buffer 61 and the reception table 62 performed by the communication data management unit 11 of the third embodiment. The communication data management part 11 performs the following processes, when the above-mentioned write completion information output from virtual ECU5 is acquired.
 通信データ管理部11は、取得した書き込み完了情報を出力した仮想ECU5と対応する送信バッファ61の書き込み個数を取得する(S71)。通信データ管理部11は、上記の送信バッファ61の同期個数を0に設定する(S72)。通信データ管理部11は、上記の同期個数が取得された書き込み個数よりも少ないか否かを判定する(S73)。 The communication data management unit 11 acquires the number of writes in the transmission buffer 61 corresponding to the virtual ECU 5 that has output the acquired write completion information (S71). The communication data management unit 11 sets the number of synchronization data in the transmission buffer 61 to 0 (S72). The communication data management unit 11 determines whether or not the number of synchronizations is smaller than the acquired number of writes (S73).
 上記の同期個数が取得された書き込み個数よりも少ない場合(S73:YES)、通信データ管理部11は、S74の処理を行う。S74の処理は実施形態2のS41の処理と同様であるため、詳細な説明は省略する。同期フラグのロックが解除されていない場合(S74:NO)、即ち同期フラグがロックされている場合、通信データ管理部11は、後述のS82の処理を行う。 If the number of synchronizations is less than the number of writes acquired (S73: YES), the communication data management unit 11 performs the process of S74. Since the processing of S74 is the same as the processing of S41 of the second embodiment, detailed description thereof will be omitted. If the synchronization flag is not unlocked (S74: NO), that is, if the synchronization flag is locked, the communication data management unit 11 performs the process of S82, which will be described later.
 同期フラグのロックが解除されている場合(S74:YES)、通信データ管理部11は、S75及びS76の処理を行う。S75及びS76の処理は、実施形態2のS42及びS43の処理と同様であるため、詳細な説明は省略する。通信データ管理部11は、同期フラグのロックに成功しなかった場合(S76:NO)、即ち同期フラグのロックに失敗した場合、後述のS82の処理を行う。通信データ管理部11は、同期フラグのロックに失敗した場合、再度、同期フラグのロックを試みてもよい。例えば通信データ管理部11は、同期フラグのロックに所定回数失敗した際、S82の処理を行う。 If the synchronization flag is unlocked (S74: YES), the communication data management unit 11 performs the processes of S75 and S76. Since the processes of S75 and S76 are the same as the processes of S42 and S43 of the second embodiment, detailed description thereof will be omitted. If the synchronization flag is not successfully locked (S76: NO), that is, if the synchronization flag is not successfully locked, the communication data management unit 11 performs the process of S82, which will be described later. When the communication data management unit 11 fails to lock the synchronization flag, it may attempt to lock the synchronization flag again. For example, the communication data management unit 11 performs the process of S82 when the locking of the synchronization flag fails a predetermined number of times.
 通信データ管理部11は、同期フラグのロックに成功した場合(S76:YES)、即ち同期フラグをロックした場合、S77、S78、S79、S80及びS81の処理を行う。S77、S78、S79、S80及びS81の処理は、実施形態2のS44、S45、S46、S47及びS48の処理と同様であるため、詳細な説明は省略する。上述のように通信データ管理部11は、上記の送信バッファ61の同期個数を増加させ(S82)、S73の処理を行う。例えば通信データ管理部11は、上述のように送信バッファ61の同期個数を1増加させる。 When the synchronization flag is successfully locked (S76: YES), that is, when the synchronization flag is locked, the communication data management unit 11 performs the processes of S77, S78, S79, S80 and S81. Since the processes of S77, S78, S79, S80 and S81 are the same as the processes of S44, S45, S46, S47 and S48 of the second embodiment, detailed description thereof will be omitted. As described above, the communication data management unit 11 increases the number of synchronized data in the transmission buffer 61 (S82), and performs the process of S73. For example, the communication data management unit 11 increases the number of synchronizations in the transmission buffer 61 by 1 as described above.
 上記の同期個数が取得された書き込み個数よりも少なくない場合(S73:NO)、例えば同期個数及び書き込み個数が同一の値である場合、通信データ管理部11は処理を終了する。 If the synchronous number is not less than the acquired written number (S73: NO), for example, if the synchronous number and the written number are the same value, the communication data management unit 11 terminates the process.
 実施形態3の仮想ECU5が行う他の仮想ECU5からの通信データの受信に係る処理を例示するフローチャートは、実施形態2と同様なので省略する。 A flow chart illustrating processing related to reception of communication data from another virtual ECU 5 performed by the virtual ECU 5 of the third embodiment is omitted because it is the same as that of the second embodiment.
 本実施形態において、仮想ECU5は自仮想ECUと対応する送信バッファ61に複数の通信データを書き込むことができる。仮想ECU5は、自仮想ECUと対応する送信バッファ61に書き込んだ通信データの個数に応じて、上記の送信バッファ61の書き込み個数を増加させる。通信データ管理部11書き込み個数に基づき、送信バッファ61に書き込まれた複数の通信データを漏れなく、効率的に受信テーブル62に書き込むことができる。仮想ECU5は送信バッファ61に複数の通信データを書き込むことができるので、送信バッファ61に1つの通信データを書き込むごとに、通信データ管理部11へ書き込み完了情報を出力する必要がない。仮想ECU5及び通信データ管理部11の間における通信の頻度を少なくすることができる。複数の仮想ECUの間における通信をより効率的に行うことができる。 In this embodiment, the virtual ECU 5 can write a plurality of pieces of communication data to the transmission buffer 61 corresponding to its own virtual ECU. The virtual ECU 5 increases the number of pieces of data written in the transmission buffer 61 according to the number of pieces of communication data written in the transmission buffer 61 corresponding to its own virtual ECU. A plurality of pieces of communication data written in the transmission buffer 61 can be efficiently written in the reception table 62 without omission based on the number of pieces written in the communication data management unit 11 . Since the virtual ECU 5 can write a plurality of pieces of communication data to the transmission buffer 61 , it is not necessary to output write completion information to the communication data management unit 11 every time one piece of communication data is written to the transmission buffer 61 . The frequency of communication between the virtual ECU 5 and the communication data management unit 11 can be reduced. Communication between multiple virtual ECUs can be performed more efficiently.
 今回開示された実施形態はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。 The embodiments disclosed this time are illustrative in all respects and should be considered not restrictive. The scope of the present invention is indicated by the scope of the claims rather than the meaning described above, and is intended to include all changes within the meaning and scope equivalent to the scope of the claims.
 A   記録媒体
 C   車両
 P   制御プログラム
 10  仮想ECU管理部
 11  通信データ管理部(管理部)
 2   車載ECU(車載装置)
 20  制御部
 200 演算装置
 201 第1演算装置
 202 第2演算装置
 203 第3演算装置
 204 第4演算装置
 21  記憶部
 22  車内通信部
 3   車載機器
 30  アクチュエータ
 31  センサ
 4   車載ネットワーク
 5   仮想ECU(仮想装置)
 5a  仮想制御部
 5b  仮想記憶部
 51  第1仮想ECU
 52  第2仮想ECU
 53  第3仮想ECU
 54  第4仮想ECU
 6   通信データ記憶領域
 60  送受信テーブル
 61  送信バッファ(第1記憶領域)
 611 第1送信バッファ
 612 第2送信バッファ
 613 第3送信バッファ
 614 第4送信バッファ
 62  受信テーブル(第2記憶領域)
 
A recording medium C vehicle P control program 10 virtual ECU management section 11 communication data management section (management section)
2 In-vehicle ECU (in-vehicle device)
20 Control Unit 200 Arithmetic Device 201 First Arithmetic Device 202 Second Arithmetic Device 203 Third Arithmetic Device 204 Fourth Arithmetic Device 21 Storage Part 22 In-Vehicle Communication Unit 3 Vehicle Equipment 30 Actuator 31 Sensor 4 Vehicle Network 5 Virtual ECU (virtual device)
5a virtual control unit 5b virtual storage unit 51 first virtual ECU
52 second virtual ECU
53 third virtual ECU
54 fourth virtual ECU
6 communication data storage area 60 transmission/reception table 61 transmission buffer (first storage area)
611 first transmission buffer 612 second transmission buffer 613 third transmission buffer 614 fourth transmission buffer 62 reception table (second storage area)

Claims (7)

  1.  複数のプログラムを実行する制御部と、
     該制御部によって起動される仮想化オペレーティングシステムが記憶されている記憶部とを備え、
     前記仮想化オペレーティングシステムを起動することにより、前記プログラムの動作環境となる複数の仮想装置が生成され、
     前記記憶部は、複数の前記仮想装置の間の通信において授受される通信データが書き込まれる通信データ記憶領域を含み、
     前記通信データ記憶領域には、
      前記通信データと関連付けられ、前記通信データの書き込み中を示す書き込みフラグと、
      前記通信データと関連付けられ、前記通信データの読み出しの要否を示す読み出しフラグとが設けられ、
     前記仮想装置は、他の仮想装置と通信する際に、該他の仮想装置への前記通信データを前記通信データ記憶領域に書き込み、
     前記他の仮想装置は、
      前記書き込みフラグがオフ状態であって、前記読み出しフラグがオン状態である場合に、前記仮想装置からの前記通信データを前記通信データ記憶領域から読み出し、
      前記通信データの読み出し後、前記読み出しフラグをオフ状態にする
     車載装置。
    a control unit that executes a plurality of programs;
    a storage unit storing a virtualized operating system booted by the control unit;
    By activating the virtualization operating system, a plurality of virtual devices that serve as operating environments for the program are generated,
    the storage unit includes a communication data storage area in which communication data exchanged in communication between the plurality of virtual devices is written;
    In the communication data storage area,
    a write flag associated with the communication data and indicating that the communication data is being written;
    a read flag associated with the communication data and indicating whether or not to read the communication data;
    the virtual device writes the communication data to the other virtual device into the communication data storage area when communicating with the other virtual device;
    The other virtual device is
    reading the communication data from the virtual device from the communication data storage area when the write flag is in an off state and the read flag is in an on state;
    An in-vehicle device that turns off the read flag after reading the communication data.
  2.  前記読み出しフラグは、前記通信データを読み出す前記仮想装置に対して設けられる
     請求項1に記載の車載装置。
    The in-vehicle device according to claim 1, wherein the read flag is provided for the virtual device that reads the communication data.
  3.  前記仮想装置は、
      前記通信データを前記通信データ記憶領域に書き込む前に、前記書き込みフラグをオン状態にし、
      前記通信データの前記通信データ記憶領域への書き込み後に、前記書き込みフラグをオフ状態にし、
      更に、前記通信データ記憶領域に書き込んだ前記通信データと関連付けられる前記読み出しフラグをオン状態にする
     請求項1又は請求項2に記載の車載装置。
    The virtual device is
    turning on the write flag before writing the communication data to the communication data storage area;
    turning off the write flag after writing the communication data to the communication data storage area;
    3. The in-vehicle device according to claim 1, further turning on the read flag associated with the communication data written in the communication data storage area.
  4.  前記通信データ記憶領域は、
      複数の前記仮想装置それぞれに対して設けられ、前記仮想装置が前記他の仮想装置への前記通信データを書き込む第1記憶領域と、
      前記仮想装置によって読み出される前記通信データが書き込まれる第2記憶領域とを含み、
     前記書き込みフラグは、前記第2記憶領域への前記通信データの書き込み中を示す第2記憶領域書き込みフラグを含み、
     複数の前記仮想装置の間における前記通信データの授受を管理する管理部は、
      前記第1記憶領域に書き込まれる前記通信データを前記第2記憶領域に、前記第2記憶領域書き込みフラグ、及び前記読み出しフラグと関連付けて書き込み、
      前記通信データの前記第2記憶領域への書き込み前に、前記第2記憶領域書き込みフラグをオン状態にし、
      前記通信データの前記第2記憶領域への書き込み後に、前記第2記憶領域書き込みフラグをオフ状態にし、
      更に、前記第2記憶領域に書き込んだ前記通信データと関連付けられる前記読み出しフラグをオン状態にし、
     前記仮想装置は、前記第2記憶領域書き込みフラグがオフ状態であって、前記読み出しフラグがオン状態である場合に前記第2記憶領域から前記通信データを読み出す
     請求項1又は請求項2に記載の車載装置。
    The communication data storage area is
    a first storage area provided for each of the plurality of virtual devices, wherein the virtual device writes the communication data to the other virtual device;
    a second storage area in which the communication data read by the virtual device is written;
    the write flag includes a second storage area write flag indicating that the communication data is being written to the second storage area;
    A management unit that manages transmission and reception of the communication data between the plurality of virtual devices,
    writing the communication data to be written in the first storage area to the second storage area in association with the second storage area write flag and the read flag;
    turning on the second storage area write flag before writing the communication data to the second storage area;
    turning off the second storage area write flag after writing the communication data to the second storage area;
    Further, turning on the read flag associated with the communication data written in the second storage area,
    3. The virtual device according to claim 1, wherein said virtual device reads said communication data from said second storage area when said second storage area write flag is in an off state and said read flag is in an on state. In-vehicle device.
  5.  前記仮想装置は、
      複数の前記通信データを前記第1記憶領域に書き込み、
      前記第1記憶領域に書き込まれた前記通信データの個数を示す書き込み個数を増加させる
     請求項4に記載の車載装置。
    The virtual device is
    writing a plurality of said communication data to said first storage area;
    The in-vehicle device according to claim 4, further comprising increasing a written number indicating the number of said communication data written in said first storage area.
  6.  複数のプログラムの動作環境となる複数の仮想装置を車載装置において生成し、
     前記仮想装置が他の仮想装置と通信する際に、該他の仮想装置への通信データを、複数の前記仮想装置の間の通信において授受される前記通信データが書き込まれる通信データ記憶領域に書き込み、
     前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの書き込み中を示す書き込みフラグがオフ状態であって、前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの読み出しの要否を示す読み出しフラグがオン状態である場合に、前記仮想装置からの前記通信データを前記通信データ記憶領域から読み出し、
     前記通信データの読み出し後、前記読み出しフラグをオフ状態にする
     情報処理方法。
    generating a plurality of virtual devices that serve as operating environments for a plurality of programs in an in-vehicle device;
    When the virtual machine communicates with another virtual machine, the communication data for the other virtual machine is written to a communication data storage area in which the communication data exchanged in communication between the plurality of virtual machines is written. ,
    A write flag that is associated with the communication data in the communication data storage area and indicates that the communication data is being written is in an off state, and is associated with the communication data in the communication data storage area and has a request to read the communication data. reading the communication data from the virtual device from the communication data storage area when a read flag indicating no is on;
    An information processing method, wherein the read flag is turned off after reading the communication data.
  7.  車両に搭載されるコンピュータに処理を実行させるコンピュータプログラムであって、
     複数のプログラムの動作環境となる複数の仮想装置を生成し、
     前記仮想装置が他の仮想装置と通信する際に、該他の仮想装置への通信データを、複数の前記仮想装置の間の通信において授受される前記通信データが書き込まれる通信データ記憶領域に書き込み、
     前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの書き込み中を示す書き込みフラグがオフ状態であって、前記通信データ記憶領域において前記通信データと関連付けられ、前記通信データの読み出しの要否を示す読み出しフラグがオン状態である場合に、前記仮想装置からの前記通信データを前記通信データ記憶領域から読み出し、
     前記通信データの読み出し後、前記読み出しフラグをオフ状態にする
     処理をコンピュータに実行させるコンピュータプログラム。
     
    A computer program that causes a computer mounted on a vehicle to execute processing,
    Generate multiple virtual devices that serve as operating environments for multiple programs,
    When the virtual machine communicates with another virtual machine, the communication data for the other virtual machine is written to a communication data storage area in which the communication data exchanged in communication between the plurality of virtual machines is written. ,
    A write flag that is associated with the communication data in the communication data storage area and indicates that the communication data is being written is in an off state, and is associated with the communication data in the communication data storage area and has a request to read the communication data. reading the communication data from the virtual device from the communication data storage area when a read flag indicating no is on;
    A computer program that causes a computer to execute a process of turning off the read flag after reading the communication data.
PCT/JP2022/007441 2021-03-12 2022-02-24 On-board apparatus, information processing method, and computer program WO2022190870A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021040293A JP2022139769A (en) 2021-03-12 2021-03-12 On-vehicle device, information processing method, and computer program
JP2021-040293 2021-03-12

Publications (1)

Publication Number Publication Date
WO2022190870A1 true WO2022190870A1 (en) 2022-09-15

Family

ID=83227729

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/007441 WO2022190870A1 (en) 2021-03-12 2022-02-24 On-board apparatus, information processing method, and computer program

Country Status (2)

Country Link
JP (1) JP2022139769A (en)
WO (1) WO2022190870A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07262152A (en) * 1994-03-24 1995-10-13 Hitachi Ltd Computer system
JP2014146254A (en) * 2013-01-30 2014-08-14 Fujitsu Ltd Information processing device and control method of information processing device
JP2015103129A (en) * 2013-11-27 2015-06-04 日産自動車株式会社 On-vehicle information device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07262152A (en) * 1994-03-24 1995-10-13 Hitachi Ltd Computer system
JP2014146254A (en) * 2013-01-30 2014-08-14 Fujitsu Ltd Information processing device and control method of information processing device
JP2015103129A (en) * 2013-11-27 2015-06-04 日産自動車株式会社 On-vehicle information device

Also Published As

Publication number Publication date
JP2022139769A (en) 2022-09-26

Similar Documents

Publication Publication Date Title
JP4947441B2 (en) Multiprocessor system, system configuration method in multiprocessor system, and program thereof
CN103297456A (en) Method for accessing sharing resources in distributed system and distributed system
JPH03126158A (en) Method and apparatus for scheduling
AU604345B2 (en) Interrupting node for providing interrupt requests to a pended bus
JP2019084941A (en) Update system, electronic control device, update management device, and update management method
US7664900B2 (en) Multiprocessor system and method for processing memory access
JP5038062B2 (en) Communication system and communication method
JP7042138B2 (en) Processing equipment
CN102521028B (en) Transactional memory system under distributed environment
JPH0679305B2 (en) Device and method for responding to an interrupt using a hold bus
JP2009059310A (en) Program controller
JP5680466B2 (en) Parallel processing system and method of operating parallel processing system
WO2022190870A1 (en) On-board apparatus, information processing method, and computer program
CN105453056A (en) Methods and apparatus to manage cache memory in multi-cache environments
JP6774147B2 (en) Control device
JP5383564B2 (en) Data transfer circuit and method
US8126008B2 (en) Communication system and communication apparatus
WO2022181357A1 (en) On-vhicle apparatus, information processing method, and computer program
JP6856048B2 (en) Control system and control method
KR20220065072A (en) Transaction management methods, systems, network devices and readable storage media
JP7315214B2 (en) loosely coupled system
JP2870812B2 (en) Parallel processor
CN111919419A (en) Node, network system and data synchronization method
CN115244510A (en) In-vehicle information processing device, control method, and computer program
CN117112315A (en) Data synchronization method and system of redundant equipment, storage medium and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22765397

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22765397

Country of ref document: EP

Kind code of ref document: A1