Communication device and communication method

The communication device directs CAN messages to specific virtual machines, enhancing data storage accessibility and reducing software complexity by associating protocol processing units with virtual machines, thus enabling efficient use of CAN messages.

JP2025127630APending Publication Date: 2025-09-02RENESAS ELECTRONICS CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024024420
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-21
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

Existing CAN controller systems do not provide a method for enabling virtual machines to use CAN messages beyond using a DMA controller to store them in RAM, limiting the utilization of CAN messages by multiple virtual machines.

Method used

A communication device with multiple protocol processing units and received data storage areas, where CAN messages are directed to specific virtual machines, allowing each virtual machine to access its designated storage area, and access is controlled by an access controller.

Benefits of technology

Enables virtual machines to effectively use CAN messages by ensuring data storage accessibility and reducing software complexity through improved software reuse and reusability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025127630000001_ABST
    Figure 2025127630000001_ABST
Patent Text Reader

Abstract

To provide a new technique that, in a communication device on which multiple virtual machines run, causes a CAN (Controller Access Network) message received by the communication device to be used by a virtual machine that is the destination of the CAN message.SOLUTION: A communication device 100 includes a communication control unit 101. The communication control unit 101 includes a plurality of protocol processing units 104 and a plurality of received data storage areas 106. A received message 10, which is a CAN message received by the communication device 100, is input to the plurality of protocol processing units 104. When the destination of the received message 10 is a virtual machine 20 corresponding to its own unit, each protocol processing unit 104 stores the payload of the received message 10 in the received data storage area 106 accessible from the virtual machine 20 of the destination.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a technique for performing communication according to a CAN (Controller Area Network) protocol. [Background technology]

[0002] Systems that perform communication according to the CAN protocol (hereinafter referred to as CAN communication) have been developed. For example, Patent Document 1 discloses a technique for a CAN controller to transfer CAN messages to a virtual machine in a microcontroller on which multiple virtual machines run. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Publication No. 2022-123826 Summary of the Invention [Problem to be solved by the invention]

[0004] The CAN controller in Patent Document 1 uses a DMA (Direct Memory Access) controller to store CAN messages in the RAM (Random Access Memory) of a virtual machine. Patent Document 1 does not disclose any method for enabling a virtual machine to use CAN messages other than using a DMA controller to store CAN messages in the RAM of the virtual machine. Other issues and novel features will become apparent from the description of this specification and the accompanying drawings. [Means for solving the problem]

[0005] A communication device according to one embodiment includes a plurality of protocol processing units and a plurality of received data storage areas. CAN messages received by the communication device are input to the plurality of protocol processing units. When the destination of the CAN message is a virtual machine corresponding to the protocol processing unit, each protocol processing unit stores the payload of the CAN message in a received data storage area accessible from the virtual machine of the destination. [Effects of the Invention]

[0006] According to the present disclosure, a new technique is provided for a communication device on which multiple virtual machines are running, to allow a CAN message received by the communication device to be used by a virtual machine that is the destination of the CAN message. [Brief explanation of the drawings]

[0007] [Figure 1] FIG. 1 is a diagram illustrating an example of the configuration of a communication device according to the first embodiment. [Figure 2] FIG. 2 is a block diagram illustrating the hardware configuration of the protocol processing unit. [Figure 3] FIG. 3 is a flowchart illustrating a flow of a message receiving process in a communication device. [Figure 4] Figure 4 illustrates a case where a CAN ID is assigned to each application. [Figure 5] FIG. 5 is a diagram illustrating a configuration related to the transmission of a transmission message, among the configurations of a communication device. [Figure 6] FIG. 6 is a flowchart illustrating a flow of message transmission in a communication device. [Figure 7] FIG. 7 is a diagram illustrating a configuration in which a status signal is output from a protocol processing unit. [Figure 8] FIG. 8 is a diagram illustrating a configuration in which an individual receiving unit is provided for each protocol processing unit. [Figure 9] FIG. 9 is a diagram illustrating a configuration in which an individual transmission unit is provided for each protocol processing unit. [Figure 10] FIG. 10 is a diagram illustrating the hierarchical structure of a system having zone ECUs. [Figure 11] FIG. 11 is a diagram illustrating a configuration of a communication device according to the second embodiment. [Figure 12] FIG. 12 is a diagram illustrating the configuration of a communication device involved in the transmission of a transmission message. [Figure 13] FIG. 13 is a flowchart illustrating a flow of receiving a message by a communication device. [Figure 14] FIG. 14 is a flowchart illustrating a flow of message transmission by a communication device. DETAILED DESCRIPTION OF THE INVENTION

[0008] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. In each drawing, the same or corresponding elements are designated by the same reference numerals, and duplicate explanations will be omitted as necessary for clarity. Furthermore, unless otherwise specified, predetermined values ​​such as predetermined values ​​and threshold values ​​are stored in advance in a storage device accessible from a device that uses the values. Furthermore, unless otherwise specified, the storage unit is composed of one or any number of storage devices.

[0009] [Embodiment 1] <Summary> 1 is a diagram illustrating an example of the configuration of a communication device 100 according to the first embodiment. The communication device 100 transmits and receives CAN messages to and from an external communication device 200 in accordance with the CAN protocol. The communication device 100 is connected to the external communication device 200 via a CAN communication path 300. The CAN communication path 300 is a communication path, such as a bus, used for CAN communication between the communication device 100 and the external communication device 200.

[0010] For example, the communication device 100 is an integrated circuit provided inside an electronic control unit (ECU). A more specific example of the communication device 100 is an SoC (System on Chip) such as an MCU (Micro Control Unit). Like the communication device 100, the external communication device 200 is also an integrated circuit provided inside an ECU.

[0011] The communication device 100 includes a shared receiver 102, a communication control unit 101, an access controller 108, and a virtual machine execution unit 109. The shared receiver 102 is an interface in the communication device 100 to which a CAN message (hereinafter, a received message 10) transmitted from the external communication device 200 is input. The shared receiver 102 is configured to output the input received message 10 to the communication control unit 101. More specifically, the shared receiver 102 is configured to receive an input of a signal flowing through a CAN communication path 300 and to output the input signal to the communication control unit 101. The shared receiver 102 and the CAN communication path 300 are connected via any interface such as a CAN transceiver, as necessary.

[0012] The communication control unit 101 has a plurality of protocol processing units 104 and a plurality of received data storage units 106. The received data storage unit 106 is a storage area provided in any type of storage device (e.g., RAM, register, etc.). For example, the plurality of received data storage units 106 are configured as different partial storage areas included in one storage device (e.g., one RAM or register). Alternatively, for example, the plurality of received data storage units 106 may be storage areas included in different storage devices (e.g., different RAMs or registers).

[0013] Each of the plurality of received data storage units 106 includes a received data storage area 106D and an error notification storage area 106E. The received data storage area 106D stores received data included in the received message 10. The error notification storage area 106E stores an error notification related to communication.

[0014] The received data storage area 106D and the error notification storage area 106E included in each received data storage unit 106 may be different partial storage areas of a single storage device (for example, a single RAM or register). Alternatively, for example, the received data storage area 106D and the error notification storage area 106E may be configured in different storage devices. In this case, for example, the received data storage area 106D is configured as a partial storage area included in a single storage device (for example, a single RAM or register). On the other hand, the error notification storage area 106E is configured in a storage device (for example, a single RAM or register) separate from the storage device that includes the received data storage area 106D.

[0015] The virtual machine execution unit 109 operates a plurality of virtual machines (VMs) 20. For example, the virtual machine execution unit 109 operates a hypervisor for managing the virtual machines. The plurality of virtual machines 20 operate under the management of the hypervisor. Note that the plurality of virtual machines 20 may include a management virtual machine.

[0016] The multiple virtual machines 20 are configured to be able to access different received data storage units 106. Hereinafter, the received data storage unit 106 accessible by the virtual machines 20 is also referred to as the "received data storage unit 106 corresponding to the virtual machine 20."

[0017] The access controller 108 controls access from the virtual machine 20 to the received data storage unit 106. Specifically, if the received data storage unit 106 that the virtual machine 20 is attempting to access is the received data storage unit 106 that corresponds to the virtual machine 20, the access controller 108 permits the virtual machine 20 to access the received data storage unit 106. On the other hand, if the received data storage unit 106 that the virtual machine 20 is attempting to access is not the received data storage unit 106 that corresponds to the virtual machine 20, the access controller 108 does not permit the virtual machine 20 to access the received data storage unit 106. Note that the correspondence between the virtual machine 20 and the received data storage unit 106 is stored in advance in, for example, any storage area that can be accessed by the access controller 108.

[0018] The protocol processing unit 104 processes the received message 10 so that the virtual machine 20, which is the destination of the received message 10, can use the payload of the received message 10. The protocol processing unit 104 is also called a CAN protocol engine, etc. The multiple protocol processing units 104 are each associated with a different virtual machine 20.

[0019] Specifically, the protocol processing unit 104 extracts a payload and a CAN identifier (CAN ID) from the received message 10 in accordance with the CAN protocol. A reception filter (not shown in FIG. 1) determines whether the extracted payload should be stored in the received data storage area 106D. In other words, it is determined whether the received message 10 is a message used by the corresponding virtual machine 20. Based on the result of this determination, the extracted payload is stored in the received data storage area 106D corresponding to the virtual machine 20.

[0020] On the other hand, if the received message 10 is not to be used by the corresponding virtual machine 20, the payload of the received message 10 is not stored in the received data storage area 106D.

[0021] 1, the payload of the received message 10 is stored in one received data storage area 106D. The received data storage area 106D in which the payload of the received message 10 is stored is included in the received data storage unit 106 that is accessible from the virtual machine 20 that uses the received message 10. Therefore, the payload of the received message 10 is stored in the received data storage unit 106 so that it can be accessed only by the virtual machine 20 that uses the received message 10.

[0022] Here, the virtual machine 20 uses any method to know that data has been stored in the received data storage area 106D corresponding to itself. For example, the virtual machine 20 knows that new data has been stored in the received data storage area 106D by periodically checking the contents of the received data storage area 106D corresponding to itself. Alternatively, for example, in response to data being stored in the received data storage area 106D, a specific notification may be sent to the virtual machine 20 corresponding to that received data storage area 106. In this case, the virtual machine 20 knows that new data has been stored in the received data storage area 106D corresponding to itself by receiving the specific notification.

[0023] In addition, not only the payload extracted from the received message 10 by the protocol processing unit 104 but also the CAN ID may be stored in the received data storage area 106D.

[0024] <Examples of effects> According to the present disclosure, a new technique is provided for a communication device 100 that receives a CAN message, allowing a virtual machine that is the destination of the CAN message to use the payload of the CAN message. Specifically, in the communication device 100, a received message 10 is input to multiple protocol processing units 104. Furthermore, only the protocol processing unit 104 corresponding to the virtual machine 20 that is the destination of the received message 10 stores the payload of the received message 10 in the received data storage unit 106 corresponding to that virtual machine 20. Then, access by each virtual machine 20 to the received data storage unit 106 is controlled by an access controller 108.

[0025] In this way, according to the communication device 100, one protocol processing unit 104 and one received data storage unit 106 are associated with one virtual machine 20. This correspondence between one protocol processing unit 104 and one virtual machine 20 is the same as the correspondence between one protocol processing unit 104 and one physical machine (one OS) when a virtualization environment is not used. Therefore, compared to a case where one protocol processing unit 104 and one received data storage unit 106 handle multiple virtual machines 20, software reuse is improved.

[0026] For example, if multiple virtual machines 20 share one protocol processing unit 104 and one received data storage unit 106, the data used by the multiple virtual machines 20 will be stored in one received data storage unit 106. The fact that new data has been stored in the received data storage unit 106 is recognized only by the virtual machine 20 that is running at that time.

[0027] For example, suppose the first virtual machine 20 recognizes that new data has been stored in the received data storage unit 106. At this time, the data stored in the received data storage unit 106 is not necessarily data to be used by the first virtual machine. The first virtual machine 20 needs to confirm whether the data stored in the received data storage unit 106 is data to be used by the first virtual machine 20. If the data stored in the received data storage unit 106 is not data to be used by the first virtual machine 20 currently running, the first virtual machine 20 may need to notify the second virtual machine 20 that data to be used by the second virtual machine 20 has been stored in the received data storage unit 106. When multiple virtual machines 20 share one protocol processing unit 104 and one received data storage unit 106, software that takes such a situation into account needs to be prepared for each virtual machine 20.

[0028] On the other hand, according to the communication device 100, one protocol processing unit 104 and one received data storage unit 106 are assigned to each virtual machine 20 as described above. Therefore, the fact that data has been stored in the received data storage unit 106 assigned to the first virtual machine 20 can be easily recognized by the first virtual machine 20 that uses the data. In other words, the first virtual machine 20 only needs to know the data storage status in the received data storage unit 106 assigned to itself, and does not need to notify the other virtual machines 20 of the data storage status. This can increase the reusability of software related to communication processing of the virtual machines 20.

[0029] The communication device 100 of this embodiment will be described in more detail below.

[0030] <Example of Hardware Configuration of Communication Device 100> The communication device 100 is realized by an integrated circuit such as an MCU, as described above. The communication device 100 may be realized by an integrated circuit provided on a single substrate, or by connecting integrated circuits provided on multiple substrates. The communication device 100 may be realized by a dedicated integrated circuit designed for realizing the communication device 100, or may be realized by a general-purpose integrated circuit.

[0031] <<Example of Hardware Configuration of Virtual Machine Execution Unit 109>> 2 is a block diagram illustrating an example of the hardware configuration of the virtual machine execution unit 109. In the configuration of FIG. 2, the virtual machine execution unit 109 includes a bus 1020, a processor 1040, a main memory device 1060, and an auxiliary memory device 1080.

[0032] The bus 1020 is a communication path for the processor 1040, the main memory device 1060, and the auxiliary memory device 1080 to transmit and receive data to and from each other. The processor 1040 is any type of processor, such as a CPU (Central Processing Unit) or an FPGA (Field-Programmable Gate Array). The main memory device 1060 is a main memory device realized using RAM or the like. The auxiliary memory device 1080 is an auxiliary memory device realized using flash memory or the like.

[0033] The auxiliary storage device 1080 stores programs for implementing the virtual machine execution unit 109. The programs for implementing the virtual machine execution unit 109 include, for example, a program for implementing a hypervisor and programs executed on each virtual machine 20. The programs executed on the virtual machine 20 include, for example, an operating system (OS) running on the virtual machine 20 and application programs running on the OS. The processor 1040 reads these various programs into the main storage device 1060 and executes them to operate the hypervisor and each virtual machine 20.

[0034] The virtual machine execution unit 109 is connected to the access controller 108 via a bus 1020 .

[0035] The communication performed by the virtual machine execution unit 109 is not limited to CAN communication. When the virtual machine execution unit 109 performs communication other than CAN communication, the virtual machine execution unit 109 is connected to a control unit that controls the communication via a bus 1020. In Fig. 2, the virtual machine execution unit 109 is connected to a communication control unit 130. The communication control unit 130 is, for example, a control unit for Ethernet (registered trademark) communication.

[0036] In a virtualized environment, multiple virtual machines may share one physical hardware element (processor or storage device). Therefore, in the virtual machine execution unit 109, one physical hardware element may be shared by multiple virtual machines 20. For example, multiple virtual machines 20 may share one processor provided in the virtual machine execution unit 109.

[0037] However, the virtual machine execution unit 109 may be provided with the same type of physical hardware element for each virtual machine 20. In this case, for example, each of the multiple virtual machines 20 may use a different processor.

[0038] <Processing flow> 3 is a flowchart illustrating the flow of a message reception process in the communication device 100. The shared reception unit 102 outputs the received message 10 to each of the multiple protocol processing units 104 (S102).

[0039] S104 and S106 are executed by a plurality of protocol processing units 104. The protocol processing unit 104 determines whether the destination of the received message 10 input from the shared receiving unit 102 is the virtual machine 20 corresponding to itself (S104). If the destination of the received message 10 is the virtual machine 20 corresponding to itself (S104: YES), the protocol processing unit 104 stores the payload of the received message 10 in the received data storage unit 106 corresponding to itself (S106). On the other hand, if the destination of the received message 10 is not the virtual machine 20 corresponding to itself (S104: NO), the process of storing the payload of the received message 10 in the received data storage unit 106 is not performed.

[0040] <Regarding identifying the recipient of received message 10> The protocol processing unit 104 determines whether the destination of the received message 10 is the virtual machine 20 corresponding to itself (S104). To do so, the protocol processing unit 104 identifies the destination of the received message 10.

[0041] The destination of the received message 10 is represented, for example, by a CAN ID indicated in the header of the received message 10. In this case, the correspondence between the protocol processing unit 104 and the virtual machine 20 is represented by the correspondence between the protocol processing unit 104 and the CAN ID. Similarly, the correspondence between the received data storage unit 106 and the virtual machine 20 is represented by the correspondence between the received data storage unit 106 and the CAN ID.

[0042] Therefore, for example, information indicating the CAN ID corresponding to the protocol processing unit 104 and the received data storage unit 106 corresponding to that CAN ID is stored in any storage area accessible from the protocol processing unit 104. By referencing this information, the protocol processing unit 104 can identify the CAN ID corresponding to itself. Furthermore, by referencing this information, the protocol processing unit 104 can identify the received data storage unit 106 in which to store the payload of the received message 10.

[0043] The protocol processing unit 104 determines whether the CAN ID indicated in the header of the received message 10 is the CAN ID corresponding to itself. If the CAN ID indicated in the header of the received message 10 is the CAN ID corresponding to itself, the protocol processing unit 104 stores the received message 10 in the received data storage unit 106 corresponding to that CAN ID. On the other hand, if the CAN ID indicated in the header of the received message 10 is not the CAN ID corresponding to itself, the protocol processing unit 104 does not store the received message 10 in any of the received data storage units 106.

[0044] The CAN ID is assigned to, for example, the virtual machine 20. In this case, in order to represent the correspondence between the protocol processing unit 104 and the virtual machine 20, the protocol processing unit 104 is associated with the CAN ID assigned to the virtual machine 20 corresponding to that protocol processing unit 104.

[0045] Alternatively, for example, a CAN ID may be assigned to an application running on the virtual machine 20. In this case, to represent the correspondence between the protocol processing unit 104 and the virtual machine 20, the protocol processing unit 104 is associated with a CAN ID assigned to an application running on the virtual machine 20 corresponding to that protocol processing unit 104. When multiple applications run on the virtual machine 20, multiple CAN IDs may be associated with one protocol processing unit 104.

[0046] 4 is a diagram illustrating a case in which a CAN ID is assigned to each application. In the example of FIG. 4, the communication device 100 has two protocol processing units 104 (protocol processing unit 104-1 and protocol processing unit 104-2). The communication device 100 also has two received data storage units 106 (received data storage unit 106-1 and received data storage unit 106-2). Two virtual machines 20 (virtual machine 20-1 and virtual machine 20-2) are running in the virtual machine execution unit 109.

[0047] Two applications 22 (application 22-1 and application 22-2) are running on the virtual machine 20-1. The CAN ID assigned to the application 22-1 is CAN_ID_1, and the CAN ID assigned to the application 22-2 is CAN_ID_2.

[0048] The virtual machine 20-1 is associated with a protocol processing unit 104-1 and a received data storage unit 106-1. Therefore, the protocol processing unit 104-1 and the received data storage unit 106-1 are both associated with two CAN IDs, CAN_ID_1 and CAN_ID_2. The access controller 108 is configured to permit the virtual machine 20-1 to access the received data storage unit 106-1.

[0049] One application 22-3 is running on the virtual machine 20-2. The CAN ID assigned to the application 22-3 is CAN_ID_3. Therefore, the CAN ID associated with the protocol processing unit 104-2 is CAN_ID_3.

[0050] The virtual machine 20-2 is associated with a protocol processing unit 104-2 and a received data storage unit 106-2. Therefore, the protocol processing unit 104-2 and the received data storage unit 106-2 are both associated with a single CAN ID, CAN_ID_3. The access controller 108 is also configured to permit the virtual machine 20-2 to access the received data storage unit 106-2.

[0051] If the CAN ID indicated in the header of the received message 10 is CAN_ID_1 or CAN_ID_2, the protocol processing unit 104-1 stores the payload of the received message 10 in the received data storage unit 106-1. On the other hand, the protocol processing unit 104-2 does not store the payload of the received message 10 in the received data storage unit 106-2.

[0052] The virtual machine 20-1 can access the received data storage unit 106-1 corresponding to itself, so that both the application 22-1 and the application 22-2 running on the virtual machine 20-1 can obtain the payload of the received message 10-1 addressed to them from the received data storage unit 106-1.

[0053] If the CAN ID indicated in the header of received message 10 is CAN_ID_3, protocol processing unit 104-1 does not store the payload of received message 10 in received data storage unit 106-1, while protocol processing unit 104-2 stores the payload of received message 10 in received data storage unit 106-2.

[0054] The virtual machine 20-2 can access the received data storage unit 106-2 corresponding to itself, so the application 22-3 running on the virtual machine 20-2 can obtain the payload of the received message 10-3 addressed to itself from the received data storage unit 106-2.

[0055] Note that applications assigned the same CAN ID may run on two or more virtual machines 20. In this case, one received message 10 is stored in two or more received data storage units 106. Therefore, one received message 10 is used by multiple virtual machines 20.

[0056] 4, suppose that application 22 assigned a CAN ID of CAN_ID_1 is also running on virtual machine 20-2. In this case, received message 10 having CAN_ID_1 as its CAN ID is not only stored in received data storage unit 106-1 by protocol processing unit 104-1, but also stored in received data storage unit 106-2 by protocol processing unit 104-2.

[0057] <Error notification> The protocol processing unit 104 can provide various error notifications to the virtual machine 20 in addition to the received message 10. The error notification is, for example, a notification of an acknowledge error (Ack error) indicating that there is no node on the CAN communication path 300 that can correctly receive the transmitted message. Another example of the error notification is a notification of a bit error indicating that the data transmitted by the virtual machine itself differs from the data monitored on the CAN communication path 300.

[0058] The protocol processing unit 104 stores the error notification to be provided to the virtual machine 20 in the error notification storage area 106E of the received data storage unit 106 corresponding to that protocol processing unit 104. The virtual machine 20 can acquire the error notification sent from the protocol processing unit 104 by reading the error notification stored in the error notification storage area 106E of the received data storage unit 106 corresponding to itself. The method for determining that the error notification has been stored in the error notification storage area 106E of the received data storage unit 106 is the same as the method for determining that the payload of the received message 10 has been stored in the received data storage unit 106.

[0059] As described above, according to this embodiment, when checking an error notification, the virtual machine 20 simply checks the error notification storage area 106E in the received data storage unit 106 allocated to the virtual machine 20. This allows the virtual machine 20 to easily grasp the error notification related to its own processing. That is, it is possible to directly notify the virtual machine 20 that should receive the error notification of the error. Furthermore, the virtual machine 20 does not need to process an error notification related to the processing of another virtual machine 20, i.e., an error notification that is unrelated to its own processing. In other words, inter-virtual machine communication for error notification is not required. This makes it possible to improve the applicability of software control related to the communication processing of the virtual machine 20.

[0060] <Message Transmission by Communication Device 100> The communication device 100 may transmit a message to the external communication device 200. A message transmitted from the communication device 100 is called a transmitted message.

[0061] 5 is a diagram illustrating a configuration related to the transmission of a transmission message, among the configurations of the communication device 100. In FIG. 5, the shared receiving unit 102 and the received data storage unit 106 are omitted.

[0062] The communication control unit 101 has a plurality of transmission data storage units 114. A plurality of virtual machines 20 are configured to be able to access different transmission data storage units 114. Hereinafter, a transmission data storage unit 114 accessible by a virtual machine 20 will be referred to as a "transmission data storage unit 114 corresponding to a virtual machine 20."

[0063] The transmission data storage unit 114 is a storage area provided in any type of storage device (e.g., RAM, register, etc.). For example, multiple transmission data storage units 114 are configured as different partial storage areas included in one storage device (e.g., one RAM or register). Alternatively, for example, the multiple transmission data storage units 114 may be storage areas included in different storage devices (e.g., different RAMs or registers).

[0064] The access controller 108 controls access from the virtual machine 20 to the transmission data storage unit 114. Specifically, if the transmission data storage unit 114 that the virtual machine 20 is attempting to access is the transmission data storage unit 114 that corresponds to the virtual machine 20, the access controller 108 permits the virtual machine 20 to access the transmission data storage unit 114. On the other hand, if the transmission data storage unit 114 that the virtual machine 20 is attempting to access is not the transmission data storage unit 114 that corresponds to the virtual machine 20, the access controller 108 does not permit the virtual machine 20 to access the transmission data storage unit 114. Note that the correspondence between the virtual machine 20 and the transmission data storage unit 114 is stored in advance in, for example, an arbitrary storage area that can be accessed by the access controller 108.

[0065] The transmission message 30 includes a payload generated by the virtual machine 20. For example, an application running on the virtual machine 20 stores a pair of a CAN ID and a payload assigned to the application in the transmission data storage unit 114. When a CAN ID is assigned to the virtual machine 20, the application stores the CAN ID corresponding to the virtual machine 20 in the transmission data storage unit 114.

[0066] The transmission data storage unit 114 corresponding to a virtual machine 20 is associated with the protocol processing unit 104 corresponding to that virtual machine 20. As a result, the plurality of protocol processing units 104 are associated with different transmission data storage units 114, respectively.

[0067] The protocol processing unit 104 generates a transmission message 30 using a pair of a CAN ID and a payload stored in the transmission data storage unit 114 corresponding to the protocol processing unit 104. Furthermore, the protocol processing unit 104 outputs the generated transmission message 30 to a shared transmitter 110 provided in the communication device 100. The shared transmitter 110 is an interface for outputting a signal from the communication device 100 to an external device of the communication device 100. The signal representing the transmission message 30 is output from the shared transmitter 110 to the CAN communication path 300. Note that the shared transmitter 110 and the CAN communication path 300 may be connected via any interface such as a CAN transceiver, as necessary.

[0068] Here, the communication device 100 is configured so that outputs from each of the multiple protocol processing units 104 directed to the shared transmitting unit 110 are input to the shared transmitting unit 110 via a logical product circuit 112. The output from the logical product circuit 112 represents the logical product of the multiple input bits. Therefore, the output from the logical product circuit 112 is a product signal of the signals output from each protocol processing unit 104. This product signal is input to the shared transmitting unit 110. The shared transmitting unit 110 outputs the product signal output from the logical product circuit 112 to the CAN communication path 300.

[0069] In the CAN protocol, 0 is a dominant bit, and 0 takes precedence over 1. By using the AND circuit 112, 0 can be given priority over 1 in signals input from multiple protocol processing units 104 to the shared transmitting unit 110.

[0070] For this reason, by adopting a configuration in which a logical product signal of outputs from a plurality of protocol processing units 104 is input to the shared transmitting unit 110, it is possible to have a plurality of protocol processing units 104 share a single transmitting interface in accordance with the CAN protocol. In other words, the transmission of CAN messages to a CAN communication path by a plurality of protocol processing units 104 can be handled by a single transmitting interface.

[0071] The protocol processing unit 104 uses any method to determine that data has been stored in the corresponding transmission data storage unit 114. The method for determining that data has been stored in the transmission data storage unit 114 can be the same as the method for determining that data has been stored in the reception data storage unit 106.

[0072] <Processing flow> 6 is a flowchart illustrating a flow of message transmission in the communication device 100. A virtual machine 20 stores data to be transmitted to an external communication device 200 in a transmission data storage unit 114 corresponding to the virtual machine 20 (S202). A protocol processing unit 104 corresponding to the transmission data storage unit 114 in which the data has been stored by the virtual machine 20 generates a transmission message 30 based on the data (S204). The protocol processing unit 104 outputs the generated transmission message 30 to a logical product circuit 112 (S206). The logical product circuit 112 outputs a logical product signal of signals input from a plurality of protocol processing units 104 to the shared transmission unit 110 (S208). The shared transmission unit 110 outputs the product signal input from the logical product circuit 112 to the outside of the communication device 100 (S210).

[0073] <Dealing with collisions> Here, because the outputs from the multiple protocol processors 104 are combined by the AND circuit 112, if multiple protocol processors 104 simultaneously output a transmission message 30, a collision will occur within the communication device 100. Each protocol processor 104 handles the collision by performing collision detection and arbitration according to the CAN protocol.

[0074] Specifically, the protocol processing unit 104 performs collision detection according to the CAN protocol on signals input from the shared receiving unit 102 to the protocol processing unit 104. Here, the signal output from the shared transmitting unit 110 to the CAN communication path 300 is also input to each protocol processing unit 104 because the signal flowing through the CAN communication path 300 is also input to the shared receiving unit 102. Therefore, by performing collision detection according to the CAN protocol in the protocol processing unit 104, it is possible to detect collisions of transmission messages 30 transmitted from multiple protocol processing units 104. Furthermore, by each protocol processing unit 104 performing arbitration according to the CAN protocol, arbitration can be performed between multiple protocol processing units 104.

[0075] <Sharing of transmission status between protocol processing units 104> In CAN communications, when a node connected to the CAN communication path 300 receives a message correctly, it returns an acknowledge (Ack). This allows the sending node to confirm that the message has been received by other nodes. Furthermore, if the sending node does not receive an Ack from other nodes, i.e., if an Ack error occurs, the sending node can take measures such as resending the message. However, because the Ack does not contain information about the sender, the sending node cannot know which node sent the Ack.

[0076] In the communication device 100 having the configuration shown in FIG. 5 , one of the multiple virtual machines 20 is referred to as virtual machine 20-1, and another is referred to as virtual machine 20-2. Furthermore, one of the multiple protocol processing units 104 is referred to as protocol processing unit 104-1 corresponding to virtual machine 20-1, and another is referred to as protocol processing unit 104-2 corresponding to virtual machine 20-2. Assume that a transmission message created by the corresponding protocol processing unit 104-1 based on an instruction from virtual machine 20-1 is output to the external communication device 200 connected to the CAN communication channel 300. When the external communication device 200 correctly receives the transmission message on the CAN communication channel 300, it returns an Ack. Meanwhile, in the communication device 100, the protocol processing unit 104-2 corresponding to virtual machine 20-2 can receive the message on the CAN communication channel 300 via the shared receiving unit 102. When the protocol processing unit 104-2 correctly receives the message, it sends an Ack. Therefore, the protocol processor 104-2 provided in the communication device 100 can return an Ack in response to a message sent by the protocol processor 104-1 in the same communication device 100.

[0077] If an Ack for a transmission message 30 output from a certain protocol processing unit 104 is returned from another protocol processing unit 104 within the same communication device 100, the source protocol processing unit 104 will recognize that the transmitted message was correctly received even if the destination external communication device 200 is unable to receive the transmission message 30 for some reason and does not return an Ack. This makes it difficult for the source protocol processing unit 104 to confirm whether the destination external communication device 200 has received the transmission message 30.

[0078] Therefore, the communication device 100 is preferably configured so that one protocol processing unit 104 does not return an Ack in response to a transmission message 30 output from another protocol processing unit 104. Therefore, for example, each protocol processing unit 104 is configured to be able to detect that a transmission message 30 is being output by another protocol processing unit 104.

[0079] For example, each protocol processing unit 104 is configured to output a status signal indicating whether or not it is currently transmitting a transmit message 30. When each protocol processing unit 104 receives a CAN message, it checks the status signal to determine whether or not the other protocol processing units 104 are currently transmitting a message. If the status signal indicates that any of the protocol processing units 104 is currently transmitting a message, the protocol processing unit 104 does not return an Ack. On the other hand, if the status signal indicates that none of the protocol processing units 104 is currently transmitting a message, the protocol processing unit 104 returns an Ack.

[0080] 7 is a diagram illustrating a configuration in which a status signal is output from a protocol processing unit 104. In FIG. 7, the status signal output from each protocol processing unit 104 is input to a logical sum circuit 116. A signal representing the logical sum of the status signals input from each protocol processing unit 104 (hereinafter referred to as a status logical sum signal) is output from the logical sum circuit 116. The status logical sum signal is input to each protocol processing unit 104.

[0081] Here, if any one of the status signals output from each of the multiple protocol processors 104 indicates 1, the status logical sum signal becomes 1. Therefore, the status logical sum signal being 1 indicates that at least one protocol processor 104 is in the state of transmitting a message.

[0082] The protocol processing unit 104 is configured to return an Ack when the status logical sum signal indicates 0. The protocol processing unit 104 is also configured not to return an Ack when the status logical sum signal indicates 1.

[0083] More specifically, for example, the protocol processing unit 104 is configured to overwrite the Ack slot of the CAN message output from the protocol processing unit 104 to recessive while the status logical OR signal indicates 1. The Ack slot is a slot that is set to dominant only when an Ack is returned. Therefore, overwriting the Ack slot to recessive means that an Ack is not returned.

[0084] <Protocol processing unit 104 that does not share a receiving unit> The shared receiving unit 102 does not need to be shared by all of the protocol processing units 104 provided in the communication device 100. In other words, the communication device 100 may include a protocol processing unit 104 that does not use the shared receiving unit 102.

[0085] For example, the communication device 100 has an individual receiving unit (hereinafter referred to as an individual receiving unit) for each protocol processing unit 104, in addition to the shared receiving unit 102. The communication device 100 is configured so that it can be set for each protocol processing unit 104 whether the output from the shared receiving unit 102 or the output from the individual receiving unit is to be input.

[0086] 8 is a diagram illustrating a configuration in which an individual receiving unit is provided for each protocol processing unit 104. In this example, an individual receiving unit 118 and a selector 120 are provided for each protocol processing unit 104. Specifically, individual receiving units 118-1 to 118-N are provided corresponding to the protocol processing units 104-1 to 104-N, respectively. Also, selectors 120-1 to 120-N are provided corresponding to the protocol processing units 104-1 to 104-N, respectively. In the following description, for convenience, the individual receiving unit 118 will be referred to as any one of the individual receiving units 118-1 to 118-N. For convenience, the selector 120 will be referred to as any one of the selectors 120-1 to 120-N.

[0087] The individual receivers 118 are interfaces to which CAN messages are input from a CAN communication path 310 that is different from the CAN communication path 300. The individual receivers 118 are connected to different CAN communication paths 310. Specifically, the individual receivers 118-1 to 118-N are connected to the CAN communication paths 310-1 to 310-N, respectively. The individual receivers 118 and the CAN communication paths 310 are connected via any interface such as a CAN transceiver as needed.

[0088] The input interface of the selector 120 is connected to both the shared receiving unit 102 and the individual receiving unit 118. The output interface of the selector 120 is connected to the protocol processing unit 104 corresponding to that selector 120. The selector 120 can be set to output only one of the signal input from the shared receiving unit 102 and the signal input from the individual receiving unit 118.

[0089] It is assumed that the selector 120 corresponding to the protocol processing unit 104 is set to output a signal input from the shared receiving unit 102. In this case, the protocol processing unit 104 shares a receiving unit with other protocol processing units 104 and is connected to the CAN communication path 300. On the other hand, it is assumed that the selector 120 corresponding to the protocol processing unit 104 is set to output a signal input from the individual receiving unit 118. In this case, the protocol processing unit 104 does not share a receiving unit with other protocol processing units 104 and is connected to the corresponding CAN communication path 310.

[0090] 8, in order to facilitate the explanation of the individual receiving units 118, all of the individual receiving units 118 are connected to the CAN communication path 310. However, in actual operation, the individual receiving unit 118 connected to the CAN communication path 310 may be only the individual receiving unit 118 that is being used. In other words, when a certain selector 120 is set to output a signal input from the shared receiving unit 102, the individual receiving unit 118 corresponding to that selector 120 does not need to be connected to the CAN communication path 310.

[0091] 8, it is possible to easily set for each protocol processing unit 104 whether or not to share a receiving unit with other protocol processing units 104. In other words, it is possible to easily set for each protocol processing unit 104 whether to participate in the same CAN network as the other protocol processing units 104, or to participate in a CAN network different from that of the other protocol processing units 104.

[0092] <Protocol processing unit 104 that does not share a transmission unit> The shared transmitter 110 does not need to be shared by all of the protocol processors 104 provided in the communication device 100. In other words, the communication device 100 may include a protocol processor 104 that does not use the shared transmitter 110.

[0093] For example, the communication device 100 has an individual transmitter (hereinafter referred to as an individual transmitter) for each protocol processing unit 104, in addition to the shared transmitter 110. The communication device 100 is configured so that it can be set whether the output from each protocol processing unit 104 is input to the shared transmitter 110 or to the individual receiver.

[0094] 9 is a diagram illustrating a configuration in which an individual transmitter is provided for each protocol processing unit 104. In the example of FIG. 9, an individual transmitter 122 and a selector 124 are provided for each protocol processing unit 104. Specifically, individual transmitters 122-1 to 122-N are provided for protocol processing units 104-1 to 104-N, respectively. Also, selectors 124-1 to 124-N are provided for protocol processing units 104-1 to 104-N, respectively. In the following description, for convenience, the individual transmitter 122 will be referred to as any one of the individual transmitters 122-1 to 122-N. The selector 124 will be referred to as any one of the selectors 124-1 to 124-N, for convenience.

[0095] Each individual transmitter 122 is an interface for outputting a signal to the CAN communication path 310, not to the CAN communication path 300. The individual transmitters 122 are connected to different CAN communication paths 310. Specifically, the individual transmitters 122-1 to 122-N are connected to the CAN communication paths 310-1 to 310-N, respectively. The individual transmitters 122 and the CAN communication paths 300 may be connected via any interface such as a CAN transceiver, as necessary.

[0096] The selector 124 is configured to output the transmission message 30 input from the protocol processing unit 104 to either the shared transmission unit 110 or the individual transmission unit 122. To this end, the selector 124 has a first selector 125 and a second selector 126.

[0097] The first selector 125 is a selector used to send the output from the protocol processing unit 104 to the shared transmission unit 110. On the other hand, the second selector 126 is a selector used to send the output from the protocol processing unit 104 to the individual transmission unit 122.

[0098] The signal output from the protocol processing unit 104 and a signal that always indicates 1 (in other words, a signal that always indicates recessive) are input to an input interface of the first selector 125. The output interface of the first selector 125 is connected to the AND circuit 112.

[0099] The signal output from the protocol processing unit 104 and a signal that always indicates 1 (i.e., a signal that always indicates recessive) are also input to the input interface of the second selector 126. The individual transmission unit 122 is connected to the output interface of the second selector 126.

[0100] When the protocol processing unit 104 is made to use the shared transmission unit 110, the first selector 125 is set to output a signal input from the protocol processing unit 104, while the second selector 126 is set to always output a signal representing 1. When the protocol processing unit 104 is made to use the individual transmission unit 122, the first selector 125 is set to always output a signal representing 1, while the second selector 126 is set to output a signal input from the protocol processing unit 104.

[0101] 9, in order to facilitate the explanation of the individual transmission units 122, all of the individual transmission units 122 are connected to the CAN communication path 310. However, in actual operation, when a certain protocol processing unit 104 is made to use the shared transmission unit 110, the individual transmission unit 122 corresponding to that protocol processing unit 104 does not need to be connected to the CAN communication path 310.

[0102] 9, it is possible to easily set for each protocol processing unit 104 whether or not to share a transmission unit with other protocol processing units 104. In other words, it is possible to easily set for each protocol processing unit 104 whether to participate in the same CAN network as the other protocol processing units 104, or to participate in a CAN network different from that of the other protocol processing units 104.

[0103] <Example of use of communication device 100> For example, the communication device 100 is suitable for an ECU that implements multiple virtual ECUs (ECUs implemented by virtual machines), such as a zone ECU. FIG. 10 is a diagram illustrating a hierarchical structure of a system having zone ECUs. The zone ECUs have a routing function for transferring data received from a higher-level system to lower-level ECUs. For example, in FIG. 10, the zone ECU 510 executes routing to transfer data received from the higher-level ECU 500 to the lower-level ECU 530 or ECU 540 via a CAN communication path.

[0104] When multiple virtual machines are operated in one physical ECU, each of these virtual machines can be treated as a virtual ECU. For example, in the communication device 100, one of the multiple virtual machines 20 is used as a virtual ECU for routing.

[0105] Here, it is preferable that the protocol processing unit 104 corresponding to the routing virtual ECU is set to use the individual receiving unit 118 and the individual transmitting unit 122. This setting can reduce the influence that the routing of CAN messages by the routing virtual ECU has on the transmission and reception of CAN messages performed by other virtual ECUs.

[0106] If the virtual machine execution unit 109 includes multiple processors, it is preferable to assign a dedicated processor to the routing virtual ECU. By assigning a dedicated processor to the routing virtual ECU, the influence of the routing process on the processes of other virtual ECUs can be reduced.

[0107] [Embodiment 2] 11 is a diagram illustrating a configuration of a communication device according to embodiment 2. Similar to the communication device 100, the communication device 400 transmits and receives CAN messages to and from an external communication device 200 connected to a CAN communication path 300 in accordance with the CAN protocol. Similar to the communication device 100, the communication device 400 is an integrated circuit provided inside an ECU or the like, and more specifically, an SoC such as an MCU.

[0108] On the other hand, unlike the communication device 100, the communication device 400 controls the reception of CAN messages by multiple virtual machines using a communication control unit 401 having one protocol processing circuit. To this end, the communication device 400 has a receiving unit 402, a communication control unit 401, and an access controller 408. The communication control unit 401 has a protocol processing unit 404 and multiple received data storage units 406.

[0109] The receiving unit 402 is an interface that receives a message on the CAN communication path 300. The receiving unit 402 is configured to output the message received by the receiving unit 402, i.e., the received message 10, to the protocol processing unit 404. The receiving unit 402 is connected to the CAN communication path 300 via an arbitrary interface such as a CAN transceiver, as necessary.

[0110] The received data storage unit 406 is a storage area provided in any type of storage device, similar to the received data storage area 106D of the received data storage unit 106.

[0111] The virtual machine execution unit 409 operates a plurality of virtual machines 20, similar to the virtual machine execution unit 109. The plurality of virtual machines 20 are associated with different received data storage units 406, respectively.

[0112] Like the access controller 108, the access controller 408 controls access by the virtual machine 20 to the received data storage unit 406. That is, if the received data storage unit 406 that the virtual machine 20 is attempting to access is the received data storage unit 406 that corresponds to the virtual machine 20, the access controller 408 permits the virtual machine 20 to access the received data storage unit 406. On the other hand, if the received data storage unit 406 that the virtual machine 20 is attempting to access is not the received data storage unit 406 that corresponds to the virtual machine 20, the access controller 408 does not permit the virtual machine 20 to access the received data storage unit 406. Note that the correspondence between the virtual machine 20 and the received data storage unit 406 is stored in advance in, for example, any storage area accessible from the access controller 408.

[0113] The protocol processing unit 404 extracts the payload and the CAN ID from the received message 10 in accordance with the CAN protocol. A reception filter (not shown in Fig. 11) determines which received data storage unit 406 the extracted payload should be stored in. In other words, it is determined which virtual machine 20 the received message 10 is used for (which virtual machine 20 the message is destined for). Based on the determination result, the extracted payload is stored in the received data storage unit 406 corresponding to the virtual machine 20 that uses the payload.

[0114] As a result of the above processing, the payload of the received message 10 is stored in one received data storage unit 406. The received data storage unit 406 in which the payload of the received message 10 is stored is the received data storage unit 406 that is accessible from the virtual machine 20 that is the destination of the received message 10. Therefore, the payload of the received message 10 is stored in the received data storage unit 406 so that it can be accessed only by the virtual machine 20 that is the destination of the received message 10. Note that, similar to the first embodiment, the received data storage unit 406 can also store a CAN ID and the like in addition to the payload of the received message 10.

[0115] Furthermore, the communication device 400 controls the transmission of CAN messages by multiple virtual machines using one protocol processing unit 404. Fig. 12 is a diagram illustrating an example of the configuration of the communication device 400 related to the transmission of the transmission message 30. In Fig. 12, the receiving unit 402 and the received data storage unit 406 are omitted.

[0116] The communication control unit 401 has a transmitter 410 and multiple transmission data storage units 414. Similar to the transmission data storage unit 114, the transmission data storage unit 414 is a storage area provided in any type of storage device. The multiple virtual machines 20 are configured to be able to access different transmission data storage units 414. Hereinafter, the transmission data storage unit 414 accessible by the virtual machine 20 will be referred to as the transmission data storage unit 414 corresponding to the virtual machine 20.

[0117] The access controller 408 controls access from the virtual machine 20 to the transmission data storage unit 414 in a manner similar to the manner in which the access controller 108 controls access from the virtual machine 20 to the transmission data storage unit 114. Specifically, if the transmission data storage unit 414 that the virtual machine 20 is attempting to access is the transmission data storage unit 414 that corresponds to the virtual machine 20, the access controller 408 permits the virtual machine 20 to access the transmission data storage unit 414. On the other hand, if the transmission data storage unit 414 that the virtual machine 20 is attempting to access is not the transmission data storage unit 414 that corresponds to the virtual machine 20, the access controller 408 does not permit the virtual machine 20 to access the transmission data storage unit 414. Note that the correspondence between the virtual machine 20 and the transmission data storage unit 414 is stored in advance in, for example, an arbitrary storage area accessible from the access controller 408.

[0118] The virtual machine 20 of the second embodiment stores data (such as a payload and a CAN ID) to be transmitted to the external communication device 200 in a transmission data storage unit 414. When data is stored in any of the transmission data storage units 414, the protocol processing unit 404 generates a transmission message 30 using the data. The protocol processing unit 404 then outputs the generated transmission message 30 to the transmitting unit 410. The transmitting unit 410 outputs the transmission message 30 input from the protocol processing unit 404 to the CAN communication path 300.

[0119] <Examples of effects> Unlike the technology disclosed in Patent Document 1, the communication device 400 with the above-described configuration allows only the virtual machine 20 that is the destination of the received message 10 to use the payload of the received message 10. Therefore, each virtual machine 20 only needs to know whether data has been stored in the received data storage unit 406 assigned to it. Furthermore, there is no need to notify other virtual machines that a new message has been stored. In other words, it is possible to improve the applicability of software related to processing in multiple virtual machines.

[0120] Furthermore, according to the communication device 400, one protocol processing unit 104 can handle multiple virtual machines 20, so it is possible to reduce the number of protocol processing units 104 provided in the communication device 100. This has the advantage of reducing the manufacturing cost of the communication device 100 and the advantage of reducing the size of the communication device 100.

[0121] <Example of hardware configuration> The hardware configuration of the communication device 400 is the same as the hardware configuration of the communication device 100. That is, the hardware configuration of the virtual machine execution unit 409 is shown in FIG.

[0122] <Receiving flow> 13 is a flowchart illustrating the flow of message reception by the communication device 400. The receiving unit 402 outputs the received message 10 input from the CAN communication path 300 to the protocol processing unit 404 (S302). The protocol processing unit 404 stores the payload of the received message 10 in the received data storage unit 406 corresponding to the virtual machine 20 that is the destination of the received message 10 (S304).

[0123] <Transmission flow> 14 is a flowchart illustrating the flow of message transmission by the communication device 400. The virtual machine 20 stores data to be transmitted to the external communication device 200 in the transmission data storage unit 414 corresponding to that virtual machine 20 (S402). The protocol processing unit 404 generates a transmission message 30 based on the data stored in the transmission data storage unit 414 (S404). The protocol processing unit 404 outputs the generated transmission message 30 to the transmission unit 410 (S406). The transmission unit 410 outputs the transmission message 30 to the outside of the communication device 400 (S408).

[0124] The invention made by the inventor has been specifically described above based on an embodiment, but it goes without saying that the present invention is not limited to the above embodiment and can be modified in various ways without departing from the gist of the invention.

[0125] CAN also has standards called CAN FD (CAN with Flexible Data Rate) and CAN XL (CAN eXtra Large payload). In the above example, the message may be a message conforming to the CAN standard, the CAN FD standard, or the CAN XL standard.

[0126] In the above examples, the program includes instructions (or software code) that, when loaded into a computer, cause the computer to perform one or more functions described in the embodiments. The program may be stored in a non-transitory computer-readable medium or a tangible storage medium. By way of example and not limitation, computer-readable media or tangible storage media include RAM, ROM, flash memory, SSD or other memory technology, CD-ROM, digital versatile disc (DVD), Blu-ray (registered trademark) disc or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device. The program may also be transmitted on a transitory computer-readable medium or communication medium. By way of example and not limitation, transitory computer-readable media or communication media include electrical, optical, acoustic, or other forms of propagated signals. [Explanation of symbols]

[0127] 10 Received Messages 20 Virtual Machines 22 Applications 30 Outgoing Messages 100 Communication equipment 101 Communication control unit 102 Shared Receiving Unit 104 Protocol Processing Unit 106 Received data storage section 106D Received data storage area 106E Error notification storage area 108 Access Controller 109 Virtual Machine Execution Unit 110 Shared transmitter 112 AND Circuit 114 Transmission data storage section 116 OR circuit 118 Individual Receiving Unit 120 Selector 122 Individual Transmission Unit 124 Selectors 125 First Selector 126 Second Selector 130 Communication control unit 200 External communication device 300 CAN communication path 310 CAN communication channel 400 Communication Equipment 401 Communication control unit 402 Receiver 404 Protocol Processing Unit 408 Access Controller 409 Virtual Machine Execution Unit 410 Transmitter 414 Transmission data storage unit 1020 Bus 1040 processor 1060 Main storage 1080 auxiliary storage

Claims

1. A communication device, a virtual machine execution unit including at least one processor and a storage device and configuring a plurality of virtual machines; a first receiving unit that receives a message transmitted from outside the communication device; a communication control unit including a plurality of received data storage units assigned to the plurality of virtual machines, the communication control unit storing a received message that is a message received by the first receiving unit in the received data storage unit assigned to the virtual machine that uses the received message; an access controller configured to allow each of the plurality of virtual machines to access the associated received data storage unit.

2. The communication device according to claim 1 , wherein the received message is a Controller Area Network (CAN), a CAN with Flexible Data Rate (CAN FD), or a CAN eXtra Large payload (CAN XL) message.

3. the communication control unit has a plurality of protocol processing units each corresponding to a different virtual machine, the first receiving unit outputs the received message to each of the plurality of protocol processing units; 3. The communication device according to claim 2, wherein when the destination of the received message is the virtual machine corresponding to the protocol processing unit, the protocol processing unit stores the data included in the received message in the received data storage unit corresponding to the protocol processing unit.

4. Each of the virtual machines is assigned a different CAN identifier; the protocol processing unit is associated with a CAN identifier assigned to the virtual machine corresponding to the protocol processing unit; the received data storage unit is associated with a CAN identifier assigned to the virtual machine corresponding to the received data storage unit; The communication device according to claim 3, wherein, when a CAN identifier indicated in the received message is a CAN identifier corresponding to the protocol processing unit, the protocol processing unit stores the data contained in the received message in the received data storage unit corresponding to that CAN identifier.

5. One or more applications are running on each of the virtual machines; Each of said applications is assigned a different CAN identifier; the protocol processing unit is associated with a CAN identifier assigned to each of the one or more applications running on the virtual machine corresponding to the protocol processing unit; the received data storage unit is associated with a CAN identifier assigned to each of the one or more applications running on the virtual machine corresponding to the received data storage unit; The communication device according to claim 3, wherein, when a CAN identifier indicated in the received message is a CAN identifier corresponding to the protocol processing unit, the protocol processing unit stores the data contained in the received message in the received data storage unit corresponding to that CAN identifier.

6. a second receiving unit for receiving the received message from outside the communication device and outputting the received message to the protocol processing unit; 4. The communication device according to claim 3, further comprising a selector for each of the protocol processing units, which outputs either the signal input from the first receiving unit or the signal input from the second receiving unit to the corresponding protocol processing unit.

7. a plurality of transmission data storage units each corresponding to a different virtual machine; a logical product circuit that outputs a logical product signal representing a logical product of a plurality of signals input from the plurality of protocol processing units; a first transmitting unit that outputs the logical product signal input from the logical product circuit to an outside of the communication device, the access controller permits access from the virtual machine to the transmission data storage unit corresponding to the virtual machine; the virtual machine stores data to be sent to an outside of the communication device in the transmission data storage unit; 4. The communication device according to claim 3, wherein the protocol processing unit generates a transmission message that is a message to be transmitted outside the communication device based on data stored in the transmission data storage unit by the virtual machine corresponding to the protocol processing unit, and outputs the transmission message to the logical product circuit.

8. the protocol processing unit outputs a status signal indicating whether or not the transmission message is being output; a logical sum circuit that outputs a logical sum signal representing the logical sum of the status signals input from each of the plurality of protocol processing units to each of the protocol processing units; 8. The communication device according to claim 7, wherein the protocol processing unit does not return an acknowledgement when the logical sum signal indicates that the transmission message is being transmitted by at least one of the protocol processing units.

9. a second transmitting unit for outputting the transmission message output from each of the protocol processing units to an outside of the communication device; 8. The communication device according to claim 7, further comprising a selector for each of the protocol processing units, which outputs the transmission message input from the protocol processing unit to either the first transmission unit or the second transmission unit.

10. The communication device according to claim 3 , further comprising a plurality of error notification storage units assigned to the plurality of virtual machines, respectively.

11. 1. A communication method performed by a communication device, comprising: The communication device a virtual machine execution unit including at least one processor and a storage device and configuring a plurality of virtual machines; a first receiving unit that receives a message transmitted from outside the communication device; a communication control unit including a plurality of received data storage units assigned to the plurality of virtual machines, respectively; an access controller configured to allow each of the plurality of virtual machines to access the associated received data storage unit; the first receiving unit outputs a received message, which is the message received, to the communication control unit; The communication method includes the communication control unit storing the received message in the received data storage unit assigned to the virtual machine that uses the received message.

12. 12. The communication method according to claim 11, wherein the received message is a Controller Area Network (CAN), a CAN with Flexible Data Rate (CAN FD), or a CAN eXtra Large payload (CAN XL) message.

13. the communication control unit has a plurality of protocol processing units each corresponding to a different virtual machine, the first receiving unit outputs the received message to each of a plurality of protocol processing units; The communication method of claim 12, further comprising: each of the protocol processing units storing data contained in the received message in the received data storage unit corresponding to the protocol processing unit when the destination of the received message is the virtual machine corresponding to that protocol processing unit.

14. Each of the virtual machines is assigned a different CAN identifier; the protocol processing unit is associated with a CAN identifier assigned to the virtual machine corresponding to the protocol processing unit; the received data storage unit is associated with a CAN identifier assigned to the virtual machine corresponding to the received data storage unit; The communication method according to claim 13, further comprising the step of: when a CAN identifier indicated in the received message is a CAN identifier corresponding to the protocol processing unit, storing data included in the received message in the received data storage unit corresponding to that CAN identifier.

15. One or more applications are running on each of the virtual machines; Each of said applications is assigned a different CAN identifier; the protocol processing unit is associated with a CAN identifier assigned to each of the one or more applications running on the virtual machine corresponding to the protocol processing unit; The received data storage unit is associated with a CAN identifier assigned to each of the one or more applications running on the virtual machine corresponding to the received data storage unit; The communication method according to claim 13, further comprising the step of: when a CAN identifier indicated in the received message is a CAN identifier corresponding to the protocol processing unit, storing data included in the received message in the received data storage unit corresponding to that CAN identifier.

16. the communication device includes, for each of the protocol processing units, a second receiving unit to which the received message is input from outside the communication device, and a selector; the second receiving unit outputs the received message to the selector corresponding to the second receiving unit; 14. The communication method according to claim 13, further comprising the selector outputting either the signal input from the first receiving unit or the signal input from the second receiving unit to the protocol processing unit corresponding to the selector.

17. the communication device includes a plurality of transmission data storage units, each corresponding to a different virtual machine, a logical product circuit, and a first transmission unit; the access controller permits access from the virtual machine to the transmission data storage unit corresponding to the virtual machine; storing data to be sent by the virtual machine to an outside of the communication device in the transmission data storage unit; the protocol processing unit generates a transmission message, which is a message to be transmitted to an outside of the communication device, based on data stored in the transmission data storage unit by the virtual machine corresponding to the protocol processing unit, and outputs the transmission message to the logical product circuit; the logical product circuit outputs a logical product signal representing a logical product of a plurality of signals output from the plurality of protocol processing units; The communication method according to claim 13 , further comprising: the first transmitting unit outputting the logical product signal input from the logical product circuit to an outside of the communication device.

18. the communication device has a logical OR circuit; outputting a status signal indicating whether the protocol processing unit is in a state of outputting the transmission message; the logical sum circuit outputs a logical sum signal representing a logical sum of the status signals input from each of the plurality of protocol processing units to each of the protocol processing units; 18. The communication method according to claim 17, further comprising: when the logical sum signal indicates that the transmission message is being transmitted by at least one of the protocol processing units, the protocol processing unit does not return an acknowledgement.

19. the communication device includes, for each of the protocol processing units, a second transmission unit that outputs the transmission message output from the protocol processing unit to an outside of the communication device, and a selector; 18. The communication method according to claim 17, further comprising the selector outputting the transmission message input from the protocol processing unit corresponding to the selector to either the first transmission unit or the second transmission unit.

Citation Information

Patent Citations

  • Data processor and data processing system

    JP2022123826A