Electronic control unit

The system addresses the inefficiencies in CAN communication by prioritizing frame transmission based on determined priorities rather than IDs, ensuring high-speed processing and efficient transmission of critical frames.

JP7726134B2Active Publication Date: 2025-08-20DENSO CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2022095780
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2025-08-20
Estimated Expiration
2042-06-14

Smart Images

  • Figure 0007726134000001
    Figure 0007726134000001
  • Figure 0007726134000002
    Figure 0007726134000002
  • Figure 0007726134000003
    Figure 0007726134000003
Patent Text Reader

Abstract

To appropriately prioritize and transmit frames with high transmission priority without hindering high-speed processing of a large amount of frames.SOLUTION: An electronic control device 1 includes: a transmission FIFO group 7 having a plurality of transmission FIFOs capable of storing frames; a transmission unit group 8 that corresponds to the transmission FIFO group and has a plurality of transmission units capable of storing the frames; a transmission priority determination unit 9 that determines transmission priority given to a frame for which a transmission request is made; a frame storage unit 10 that distributes the frame to one of the plurality of transmission FIFOs and stores it based on a determination result of the transmission priority determination unit; a frame storage unit 11 that copies and stores the frame stored in the transmission FIFO in the corresponding transmission unit when the corresponding transmission unit is empty; and a frame transmission control unit 12 that causes the transmission unit to transmit the frame stored in the transmission unit.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an electronic control device. [Background technology]

[0002] As a connection configuration for an in-vehicle electronic control unit (hereinafter referred to as an ECU (Electronic Control Unit)), a configuration is provided in which the ECU is connected to other ECUs via a CAN (Controller Area Network) (registered trademark) bus so that data communication is possible (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

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

[0004] In data communications that comply with the CAN communications protocol, an ID is assigned to frames containing data, and the frames are transmitted according to a priority order based on the assigned ID. In other words, frames with smaller ID values are transmitted with higher priority than frames with larger ID values. In this case, if IDs are assigned in ascending order of transmission priority, frames can be transmitted in order of increasing transmission priority, and frames with higher transmission priority can be transmitted with higher priority.

[0005] However, for example, changes in requirements after mass production can reverse the combination of transmission priority and ID, resulting in frames with high transmission priority being assigned a high ID value and frames with low transmission priority being assigned a low ID value. This can prevent frames with high transmission priority from being transmitted preferentially. Furthermore, a method of transmitting frames according to ID-based priorities requires a process to compare the ID of the frame for which a transmission request has been made with the ID of other frames to determine which is larger or smaller each time a frame transmission request is made. This increases the amount of calculations, which may hinder high-speed processing of large numbers of frames.

[0006] The present invention has been made in consideration of the above-mentioned circumstances, and its purpose is to provide an electronic control device that can appropriately prioritize and transmit frames with high transmission priority without interfering with high-speed processing of large numbers of frames. [Means for solving the problem]

[0007] According to the invention recited in claim 1, frames can be transmitted according to a priority order based on an ID assigned to a frame containing data. A transmission FIFO group (7) has a plurality of transmission FIFOs capable of storing frames. A transmission unit group (8) has a plurality of transmission units corresponding to the transmission FIFO group and capable of storing frames. A transmission priority determination unit (9) determines the transmission priority assigned to a frame for which a transmission request has occurred. A frame storage unit (10) allocates and stores frames among a plurality of transmission FIFOs based on the determination result of the transmission priority determination unit. A frame storage unit (11) copies a frame stored in a transmission FIFO and stores it in the corresponding transmission unit if the corresponding transmission unit is empty. A frame transmission control unit (12) causes the transmission units to transmit the frames stored therein. A transmission request completion flag setting unit (22) sets a transmission request completion flag for a frame identical to the stored frame after the frame stored in the transmission FIFO is copied and stored in the corresponding transmission unit by the frame storage unit. If there is no storage area for the frame in the transmission FIFO, the frame storage unit overwrites the frame for which the transmission request has occurred with the frame for which the transmission request completion flag has been set, and stores the frame in the transmission FIFO.

[0008] The system provides multiple transmission FIFOs and transmitters, and allocates and stores frames among multiple transmission FIFOs based on the results of determining the transmission priority assigned to a frame for which a transmission request has been issued. If a frame stored in a transmission FIFO is empty, the frame is copied and stored in the corresponding transmitter, and the stored frame is transmitted. By assigning transmission priority to frames to be transmitted, a frame for which a transmission request has been issued can be transmitted according to a priority different from the priority based on the ID assigned to that frame. In this case, it is sufficient to determine the transmission priority assigned to the frame, eliminating the need for a process to compare the ID of a frame for which a transmission request has been issued with the IDs of other frames to determine which is larger. This allows frames with high transmission priority to be transmitted with appropriate priority without impeding the high-speed processing of a large number of frames. [Brief explanation of the drawings]

[0009] [Figure 1] Functional block diagram showing the first embodiment [Figure 2] Flowchart showing frame accumulation processing [Figure 3] Flowchart showing frame storage processing [Figure 4] Flowchart showing frame transmission processing [Figure 5] Functional block diagram showing a second embodiment [Figure 6] Flowchart showing frame accumulation processing [Figure 7] Flowchart showing frame accumulation processing [Figure 8] Flowchart showing frame transmission processing DETAILED DESCRIPTION OF THE INVENTION

[0010] Hereinafter, several embodiments will be described with reference to the drawings. In the following embodiments, the description of parts common to the preceding embodiments will be omitted.

[0011] (First embodiment) A first embodiment will be described with reference to Figures 1 to 4. As shown in Figure 1, ECU 1 is, for example, an in-vehicle ECU, and is a device that controls a drive system, a device that controls an ADAS (Advanced Driving Assistant System), a device that controls a multimedia system, or the like. ECU 1 is connected to ECUs 3 and 4 via a CAN bus 2 so as to be able to communicate data in accordance with the CAN communication protocol. In this embodiment, two ECUs 3 and 4 are connected to ECU 1 via the CAN bus 2, but the number of ECUs connected to ECU 1 via the CAN bus 2 is not limited to two, and may be any number equal to or greater than one.

[0012] The ECU 1 includes a control unit 5 and an input interface unit 6. The control unit 5 controls the operation of the ECU 1 by executing software processing by having a CPU execute a computer program stored in a non-transient tangible storage medium and by performing hardware processing using a dedicated electronic circuit.

[0013] The input interface unit 6 receives an input signal from an external device. When an input signal from, for example, a sensor is input to the input interface unit 6, the control unit 5 internally processes the input signal to control the operation of the ECU 1. Furthermore, when the control unit 5 needs to transmit the input signal to an external device, the control unit 5 stores the internally processed input signal in a data area of a frame and transmits the frame storing the input signal from the CAN controller 8 to the CAN bus 2. For example, in the case of an engine ECU that controls an engine, when input signals such as an engine rotation pulse, a vehicle speed pulse, and a shift position signal are input to the input interface unit 6, the control unit 5 performs engine control and automatic transmission control, and also transmits a frame storing engine rotation speed data calculated based on the engine rotation pulse from the CAN controller 8 to the CAN bus 2. When the frame storing the engine rotation speed data is transmitted from the engine ECU to the meter ECU via the CAN bus 2, information related to the engine rotation speed is displayed on the meter ECU. The data stored in the frame may be an input signal input to the input interface unit 6 from an external device or data generated within the ECU 1.

[0014] The control unit 5 has internal functions realized by software, etc., including a transmission FIFO (First In First Out) group 7, a CAN controller 8 (corresponding to a transmission unit group), a transmission priority determination unit 9, a frame accumulation unit 10, a frame storage unit 11, a frame transmission control unit 12, and a frame erasure unit 13.

[0015] The transmission FIFO group 7 includes a first transmission FIFO 7a, a second transmission FIFO 7b, and a third transmission FIFO 7c. The first transmission FIFO 7a, the second transmission FIFO 7b, and the third transmission FIFO 7c are each independent and can store multiple frames. The number of frames that can be stored in the first transmission FIFO 7a, the second transmission FIFO 7b, and the third transmission FIFO 7c may be the same or different. Priority is assigned in the order of first transmission FIFO 7a, second transmission FIFO 7b, and third transmission FIFO 7c.

[0016] The CAN controller 8 includes a driver circuit, which controls the transmission and reception of frames to and from the CAN bus 2. The frames transmitted and received to and from the CAN bus 2 are data frames conforming to the CAN communication protocol and may be in either a standard format or an extended format. Note that frames are sometimes called messages.

[0017] The CAN controller 8 includes a first transmitter 8a, a second transmitter 8b, and a third transmitter 8c. The first transmitter 8a, the second transmitter 8b, and the third transmitter 8c are independent of each other and can store one frame each. The first transmission FIFO 7a corresponds to the first transmitter 8a, the second transmission FIFO 7b corresponds to the second transmitter 8b, and the third transmission FIFO 7c corresponds to the third transmitter 8c. That is, since the priority is assigned in the order of first transmission FIFO 7a, second transmission FIFO 7b, and third transmission FIFO 7c, the priority is assigned in the order of first transmission unit 8a, second transmission unit 8b, and third transmission unit 8c. Frames stored in the first transmission FIFO 7a are copied and stored in the first transmitter 8a. Frames stored in the second transmission FIFO 7b are copied and stored in the second transmitter 8b. The frames accumulated in the third transmission FIFO 7c are copied and stored in the third transmission unit 8c.

[0018] When a frame transmission request is generated, the transmission priority determination unit 9 determines the transmission priority assigned to the frame for which the transmission request is generated. The transmission priority is set, for example, when the ECU 1 is manufactured, and a frame containing data with high importance or urgency is assigned a low transmission priority value, and a frame containing data with low importance or urgency is assigned a high transmission priority value. The transmission priority is set in stages corresponding to the number of transmission FIFOs 7a to 7c in the transmission FIFO group 7 and the number of transmitters 8a to 8c in the CAN controller 8, and in this embodiment, it is set in three stages: "1," "2," and "3."

[0019] When the transmission priority determination unit 9 determines the transmission priority assigned to a frame for which a transmission request has been issued, the frame accumulation unit 10 allocates and accumulates the frame among the transmission FIFOs 7a to 7c based on the determination result. If the transmission priority assigned to the frame for which a transmission request has been issued is "1," the frame accumulation unit 10 accumulates the frame for which a transmission request has been issued in the first transmission FIFO 7a. If the transmission priority assigned to the frame for which a transmission request has been issued is "2," the frame accumulation unit 10 accumulates the frame for which a transmission request has been issued in the second transmission FIFO 7b. If the transmission priority assigned to the frame for which a transmission request has been issued is "3," the frame accumulation unit 10 accumulates the frame for which a transmission request has been issued in the third transmission FIFO 7c.

[0020] The frame storage unit 11 copies and stores the frame with the highest output priority among the frames stored in the transmission FIFOs 7a to 7c into the corresponding transmission unit 8a to 8c when the corresponding transmission unit 8a to 8c is empty.

[0021] When the frame with the highest output priority among the frames accumulated in the transmission FIFOs 7a to 7c is copied and stored in the corresponding transmission unit 8a to 8c by the frame storage unit 11, the frame transmission control unit 12 causes the stored frame to be transmitted from the corresponding transmission unit 8a to 8c to the CAN bus 2.

[0022] When the frame with the highest output priority among the frames accumulated in the transmission FIFOs 7a to 7c is duplicated and stored in the corresponding transmitter 8a to 8c by the frame storage unit 11, the frame erasing unit 13 erases the same frame from the transmission FIFOs 7a to 7c. By the frame erasing unit 13 erasing frames from the transmission FIFOs 7a to 7c, the frame accumulation unit 10 can repeatedly store frames for which a transmission request has occurred in the transmission FIFOs 7a to 7c.

[0023] That is, if there is a frame storage area in the transmission FIFO 7a-7c corresponding to the transmission priority, the frame storage unit 10 will quickly store the frame for which the transmission request has occurred in the transmission FIFO 7a-7c, but if there is no frame storage area in the transmission FIFO 7a-7c corresponding to the transmission priority, the frame storage unit 10 will wait for the frame for which the transmission request has occurred to be stored in the transmission FIFO 7a-7c.As soon as a frame identical to the frame stored in the transmitter 8a-8c is erased from the transmission FIFO 7a-7c by the frame erasure unit 13 and a frame storage area becomes available, the frame storage unit 10 will accumulate the frame that was waiting to be stored in the transmission FIFO 7a-7c in the transmission FIFO 7a-7c.

[0024] Next, the operation of the above-described configuration will be described with reference to Figures 2 to 4. In this case, as the processes performed by the control unit 5, the frame accumulation process, frame storage process, and frame transmission process will be described in order.

[0025] (1-1) Frame accumulation process (see Figure 2) The frame accumulation process is a process of accumulating frames in the transmission FIFO group 7. When a frame transmission request is generated and a start condition for the frame accumulation process is met, the control unit 5 starts the frame accumulation process, determines the transmission priority assigned to the frame for which the transmission request is generated, and determines whether the transmission priority is "1" (S1). When the control unit 5 determines that the transmission priority is "1" (S1: YES), it determines whether a frame accumulation area exists in the first transmission FIFO 7a corresponding to the transmission priority of "1" (S2).

[0026] If the control unit 5 determines that there is a storage area for a frame in the first transmission FIFO 7a (S2: YES), it stores the frame for which the transmission request has occurred in the first transmission FIFO 7a (S3), ends the frame storage process, and waits for the start condition for the next frame storage process to be met.If the control unit 5 determines that there is no storage area for a frame in the first transmission FIFO 7a (S2: NO), it waits for the frame for which the transmission request has occurred to be stored in the first transmission FIFO 7a.

[0027] When the control unit 5 determines that a frame storage area exists in the first transmission FIFO 7a due to the deletion of the frame with the highest output priority among the frames stored in the first transmission FIFO 7a (S2: YES), it stores the frame for which a transmission request has been issued in the first transmission FIFO 7a (S3), terminates the frame storage process, and waits for the start condition for the next frame storage process to be met.

[0028] If the control unit 5 determines that the transmission priority is not "1" (S1: NO), it determines whether or not the transmission priority is "2" (S4). If the control unit 5 determines that the transmission priority is "2" (S4: YES), it determines whether or not there is a frame accumulation area in the second transmission FIFO 7b corresponding to the transmission priority of "2" (S5).

[0029] If the control unit 5 determines that there is a storage area for the frame in the second transmission FIFO 7b (S5: YES), it stores the frame for which the transmission request has occurred in the second transmission FIFO 7b (S6), ends the frame storage process, and waits for the start condition for the next frame storage process to be met.If the control unit 5 determines that there is no storage area for the frame in the second transmission FIFO 7b (S5: NO), it waits for the frame for which the transmission request has occurred to be stored in the second transmission FIFO 7b.

[0030] When the control unit 5 determines that frame storage space exists in the second transmission FIFO 7b due to the deletion of the frame with the highest output priority among the frames stored in the second transmission FIFO 7b (S5: YES), it stores the frame for which a transmission request has been issued in the second transmission FIFO 7b (S6), terminates the frame storage process, and waits for the start condition for the next frame storage process to be met.

[0031] When the control unit 5 determines that the transmission priority is not "2" (S4: NO), it determines whether or not there is a frame accumulation area in the third transmission FIFO 7c corresponding to the transmission priority of "3" (S7).

[0032] If the control unit 5 determines that there is a storage area for the frame in the third transmission FIFO 7c (S7: YES), it stores the frame for which the transmission request has occurred in the third transmission FIFO 7c (S8), ends the frame storage process, and waits for the start condition for the next frame storage process to be met.If the control unit 5 determines that there is no storage area for the frame in the third transmission FIFO 7c (S7: NO), it waits for the frame for which the transmission request has occurred to be stored in the third transmission FIFO 7c.

[0033] When the control unit 5 determines that a frame storage area exists in the third transmission FIFO 7c due to the deletion of the frame with the highest output priority among the frames stored in the third transmission FIFO 7c (S7: YES), it stores the frame for which a transmission request has been issued in the third transmission FIFO 7c (S8), terminates the frame storage process, and waits for the start condition for the next frame storage process to be met.

[0034] (1-2) Frame storage process (see Figure 3) The frame storage process is a process of storing a frame in the CAN controller 8. When the start condition of the frame storage process is met by completing the frame accumulation process, the control unit 5 starts the frame storage process and determines whether or not a frame is stored in the first transmission FIFO 7a (S11).

[0035] When the control unit 5 determines that a frame is stored in the first transmission FIFO 7a (S11: YES), it determines whether the first transmission unit 8a is empty (S12).When the control unit 5 determines that the first transmission unit 8a is empty (S12: YES), it copies the frame with the highest output priority among the frames stored in the first transmission FIFO 7a and stores it in the first transmission unit 8a (S13).

[0036] The control unit 5 deletes the same frame as the frame stored in the first transmission unit 8a, i.e., the frame with the highest output priority, from the first transmission FIFO 7a (S14). Having deleted the frame with the highest output priority from the first transmission FIFO 7a, the control unit 5 moves up the output priority of the remaining frames stored in the first transmission FIFO 7a by one, terminates the frame storage process, and waits for the start condition for the next frame storage process to be met. On the other hand, if the control unit 5 determines that the first transmission unit 8a is not empty (S12: NO), it terminates the frame storage process and waits for the start condition for the next frame storage process to be met.

[0037] When the control unit 5 determines that no frames are stored in the first transmission FIFO 7a (S11: NO), it determines whether or not a frame is stored in the second transmission FIFO 7b (S15). When the control unit 5 determines that a frame is stored in the second transmission FIFO 7b (S15: YES), it determines whether or not the second transmission unit 8b is empty (S16). When the control unit 5 determines that the second transmission unit 8b is empty (S16: YES), it copies the frame with the highest output priority among the frames accumulated in the second transmission FIFO 7b and stores it in the second transmission unit 8b (S17).

[0038] The control unit 5 deletes the same frame as the frame stored in the second transmission unit 8b, i.e., the frame with the highest output priority, from the second transmission FIFO 7b (S18). Having deleted the frame with the highest output priority from the second transmission FIFO 7b, the control unit 5 moves up the output priority of the remaining frames stored in the second transmission FIFO 7b by one, terminates the frame storage process, and waits for the start condition for the next frame storage process to be met. On the other hand, if the control unit 5 determines that the second transmission unit 8b is not empty (S16: NO), it terminates the frame storage process and waits for the start condition for the next frame storage process to be met.

[0039] When the control unit 5 determines that no frames are stored in the second transmission FIFO 7b (S15: NO), it determines whether or not a frame is stored in the third transmission FIFO 7c (S19). When the control unit 5 determines that a frame is stored in the third transmission FIFO 7c (S19: YES), it determines whether or not the third transmission unit 8c is empty (S20). When the control unit 5 determines that the third transmission unit 8c is empty (S20: YES), it copies the frame with the highest output priority among the frames accumulated in the third transmission FIFO 7c and stores it in the third transmission unit 8c (S21).

[0040] The control unit 5 deletes the same frame as the frame stored in the third transmission unit 8c, i.e., the frame with the highest output priority, from the third transmission FIFO 7c (S22). Having deleted the frame with the highest output priority from the third transmission FIFO 7c, the control unit 5 moves up the output priority of the remaining frames stored in the third transmission FIFO 7c by one position, terminates the frame storage process, and waits for the start condition for the next frame storage process to be met. On the other hand, if the control unit 5 determines that the third transmission unit 8c is not empty (S20: NO), it terminates the frame storage process and waits for the start condition for the next frame storage process to be met. If the control unit 5 determines that no frames are stored in the third transmission FIFO 7c (S19: NO), it terminates the frame storage process and waits for the start condition for the next frame storage process to be met.

[0041] (1-3) Frame transmission process (see Figure 4) When the start condition for the frame transmission process is met by completing the frame storage process, the control unit 5 starts the frame transmission process and determines whether or not a frame is stored in the first transmission unit 8a (S31). When the control unit 5 determines that a frame is stored in the first transmission unit 8a (S31: YES), it causes the first transmission unit 8a to transmit the frame to the CAN bus 2 (S32), ends the frame transmission process, and waits for the start condition for the next frame transmission process to be met.

[0042] When the control unit 5 determines that a frame is not stored in the first transmission unit 8a (S31: NO), it determines whether a frame is stored in the second transmission unit 8b (S33).When the control unit 5 determines that a frame is stored in the second transmission unit 8b (S33: YES), it causes the second transmission unit 8b to transmit the frame to the CAN bus 2 (S34), ends the frame transmission process, and waits for the start condition for the next frame transmission process to be met.

[0043] When the control unit 5 determines that a frame is not stored in the second transmission unit 8b (S33: NO), it determines whether a frame is stored in the third transmission unit 8c (S35). When the control unit 5 determines that a frame is stored in the third transmission unit 8c (S35: YES), it causes the third transmission unit 8c to transmit the frame to the CAN bus 2 (S36), ends the frame transmission process, and waits for the start condition for the next frame transmission process to be met. When the control unit 5 determines that a frame is not stored in the third transmission unit 8c (S35: NO), it ends the frame transmission process and waits for the start condition for the next frame transmission process to be met.

[0044] Although the above example illustrates a configuration in which the transmission FIFO group 7 includes three transmission FIFOs 7a to 7c and the CAN controller 8 includes three transmitters 8a to 8c, the numbers of transmission FIFOs and transmitters may be any numbers equal to or greater than 2. Furthermore, although the above example illustrates a configuration in which the transmission priority is set in stages corresponding to the number of transmission FIFOs 7a to 7c in the transmission FIFO group 7 and the number of transmitters 8a to 8c in the CAN controller 8, the transmission priority may be set in stages greater than the number of transmission FIFOs 7a to 7c in the transmission FIFO group 7 and the number of transmitters 8a to 8c in the CAN controller 8. For example, in a configuration in which the transmission FIFO group 7 includes three transmission FIFOs 7a to 7c and the CAN controller 8 includes three transmitters 8a to 8c, if the transmission priority is set to one of five levels: "1," "2," "3," "4," and "5," frames with a transmission priority of "1" may be stored in the second transmission FIFO 7a, frames with a transmission priority of "2" may be stored in the second transmission FIFO 7b, and the remaining frames with transmission priorities of "3," "4," and "5" may be stored together in the third transmission FIFO 7c.

[0045] As described above, according to the first embodiment, the following advantageous effects can be obtained. In the ECU 1, frames are stored in the transmission FIFOs 7a-7c based on the determination result of the transmission priority assigned to the frame for which a transmission request has been issued. If the corresponding transmitter 8a-8c is empty, the frame stored in the transmission FIFO 7a-7c is copied and stored in the corresponding transmitter 8a-8c, and the stored frame is transmitted to the CAN bus 2. By assigning a transmission priority to the frame to be transmitted, the frame for which a transmission request has been issued can be transmitted according to a priority different from the priority based on the ID assigned to the frame. In this case, it is sufficient to determine the transmission priority assigned to the frame, and there is no need to compare the ID of the frame for which a transmission request has been issued with the IDs of other frames to determine which is larger. This allows frames with high transmission priority to be transmitted appropriately and preferentially without impeding high-speed processing of a large number of frames.

[0046] Furthermore, when the frame with the highest output priority among the frames accumulated in each of the transmission FIFOs 7a to 7c is copied and stored in the transmitters 8a to 8c, the same frame as the frame stored in the transmitters 8a to 8c is deleted from the transmission FIFOs 7a to 7c. By deleting frames from the transmission FIFOs 7a to 7c, it is possible to repeat the process of transmitting a frame for which a transmission request has occurred according to a priority different from the priority based on the ID assigned to that frame.

[0047] Furthermore, the conventional process of transmitting frames in accordance with a priority order based on the ID assigned to the frame and the process of transmitting frames in accordance with the transmission priority described above may be used together and used appropriately. For example, data to be transmitted may be divided into a first group in which the combination of transmission priority and ID is not reversed, and a second group in which the combination of transmission priority and ID is reversed, and the conventional process of transmitting frames in accordance with a priority order based on the ID may be applied to the first group, and the process of transmitting frames in accordance with a priority order based on the transmission priority may be applied to the second group.

[0048] (Second embodiment) The second embodiment will be described with reference to Fig. 5 to Fig. 8. As shown in Fig. 5, the ECU 21 includes a transmission request completion flag setting unit 22 instead of the frame erasure unit 13 described in the first embodiment. When the frame storage unit 11 copies and stores a frame with the highest output priority among the frames accumulated in the transmission FIFOs 7a to 7c in the corresponding transmitters 8a to 8c, the transmission request completion flag setting unit 22 sets a transmission request completion flag for the same frame as the stored frame. By the transmission request completion flag setting unit 22 setting the transmission request completion flag for the frame, the frame accumulation unit 10 can repeatedly store frames for which a transmission request has occurred in the transmission FIFOs 7a to 7c.

[0049] That is, if there is a frame storage area in the transmission FIFOs 7a to 7c corresponding to the transmission priority, the frame storage unit 10 quickly stores the frame for which the transmission request has occurred in the transmission FIFOs 7a to 7c, but if there is no frame storage area in the transmission FIFOs 7a to 7c corresponding to the transmission priority and there is a frame for which the transmission request has been made, the frame storage unit 10 overwrites the frame for which the transmission request has been made on the frame for which the transmission request has been made and stores the frame in the transmission FIFOs 7a to 7c.

[0050] Next, the operation of the above-mentioned configuration will be described with reference to Figures 6 to 8. In this case as well, the frame accumulation process, frame storage process, and frame transmission process performed by the control unit 5 will be described in order.

[0051] (2-1) Frame accumulation process (see Figures 6 and 7) The control unit 5 determines that the transmission priority assigned to the frame for which a transmission request has been issued is "1" (S1: YES), and if it determines that there is a frame storage area in the first transmission FIFO 7a corresponding to the transmission priority of "1" (S2: YES), it stores the frame for which a transmission request has been issued in the first transmission FIFO 7a (S3), terminates the frame storage process, and waits for the start condition for the next frame storage process to be met.

[0052] When the control unit 5 determines that there is no frame storage area in the first transmission FIFO 7a corresponding to the transmission priority "1" (S2: NO), it determines whether or not there is a frame for which a transmission request has been set (S41). When the control unit 5 determines that there is a frame for which a transmission request has been set (S41: YES), it overwrites the frame for which the transmission request has been issued with the frame for which the transmission request has been set and stores it in the first transmission FIFO 7a (S42), ends the frame storage process, and waits for the start condition for the next frame storage process to be met. When the control unit 5 determines that there is no frame for which a transmission request has been set (S41: NO), it waits for the frame for which the transmission request has been issued to be stored in the first transmission FIFO 7a.

[0053] The control unit 5 determines that the transmission priority assigned to the frame for which a transmission request has been issued is "2" (S4: YES), and if it determines that there is a frame storage area in the second transmission FIFO 7b corresponding to the transmission priority of "2" (S5: YES), it stores the frame for which a transmission request has been issued in the second transmission FIFO 7b (S6), terminates the frame storage process, and waits for the start condition for the next frame storage process to be met.

[0054] If the control unit 5 determines that there is no frame storage area in the second transmission FIFO 7b corresponding to the transmission priority "2" (S5: NO), it determines whether or not there is a frame for which a transmission request has been set (S43). If the control unit 5 determines that there is a frame for which a transmission request has been set (S43: YES), it overwrites the frame for which the transmission request has been issued over the frame for which the transmission request has been set and stores it in the second transmission FIFO 7b (S44), ends the frame storage process, and waits for the start condition for the next frame storage process to be met. If the control unit 5 determines that there is no frame for which a transmission request has been set (S43: NO), it waits for the frame for which the transmission request has been issued to be stored in the second transmission FIFO 7b.

[0055] When the control unit 5 determines that the transmission priority assigned to the frame for which a transmission request has been issued is not "2" (S4: NO), and determines that there is a frame storage area in the third transmission FIFO 7c corresponding to a transmission priority of "3" (S7: YES), it stores the frame for which a transmission request has been issued in the third transmission FIFO 7c (S8), terminates the frame storage process, and waits for the start condition for the next frame storage process to be met.

[0056] If the control unit 5 determines that there is no frame storage area in the third transmission FIFO 7c corresponding to the transmission priority "3" (S7: NO), it determines whether or not there is a frame for which a transmission request has been set (S45). If the control unit 5 determines that there is a frame for which a transmission request has been set (S45: YES), it overwrites the frame for which the transmission request has been issued with the frame for which the transmission request has been set and stores it in the third transmission FIFO 7c (S46), ends the frame storage process, and waits for the start condition for the next frame storage process to be met. If the control unit 5 determines that there is no frame for which a transmission request has been set (S45: NO), it waits for the frame for which the transmission request has been issued to be stored in the third transmission FIFO 7c.

[0057] (2-2) Frame storage process (see Figure 8) When the control unit 5 copies and stores in the transmitters 8a-8c the frame with the highest output priority among the frames accumulated in the transmission FIFOs 7a-7c (S13, S17, S21), it sets a transmission request completion flag on the same frame as the frame stored in the transmitters 8a-8c, i.e., the frame with the highest output priority (S51-S53). Having set the transmission request completion flag on the frame with the highest output priority, the control unit 5 moves up the output priority of the remaining frames accumulated in the transmission FIFOs 7a-7c by one, terminates the frame storage process, and waits for the start condition for the next frame storage process to be met.

[0058] (2-3) Frame transmission process The frame transmission process is the same as the frame transmission process (S31 to S36) described in FIG. 4 of the first embodiment.

[0059] As described above, according to the second embodiment, the following advantageous effects can be obtained. In the ECU 21, the same effects as those of the first embodiment can be obtained, and frames with high transmission priority can be transmitted with appropriate priority without interfering with high-speed processing of a large number of frames.

[0060] Furthermore, when the highest-ranked frame among the frames stored in the transmission FIFOs 7a to 7c is copied and stored in the transmitters 8a to 8c, a transmission request completion flag is set for the same frame as the frame stored in the transmitters 8a to 8c. By setting the transmission request completion flag, it is possible to repeat the process of transmitting a frame for which a transmission request has occurred according to a priority different from the priority based on the ID assigned to that frame.

[0061] (Other embodiments) Although the present disclosure has been described with reference to the embodiments, it is understood that the present disclosure is not limited to the embodiments or structures. The present disclosure also encompasses various modifications and modifications within the scope of equivalents. In addition, various combinations and forms, as well as other combinations and forms including only one element, more than one element, or less than one element, are also within the scope and spirit of the present disclosure.

[0062] The control unit and the method described herein may be implemented by a special-purpose computer configured by configuring a processor and memory programmed to perform one or more functions embodied in a computer program. Alternatively, the control unit and the method described herein may be implemented by a special-purpose computer configured by configuring a processor with one or more dedicated hardware logic circuits. Alternatively, the control unit and the method described herein may be implemented by one or more special-purpose computers configured by combining a processor and memory programmed to perform one or more functions with a processor configured with one or more hardware logic circuits. Furthermore, the computer program may be stored as instructions executed by a computer on a computer-readable non-transitory tangible storage medium. [Explanation of symbols]

[0063] In the drawing, 1 and 21 are electronic control devices, 5 is a control unit, 7 is a transmission FIFO group, 8 is a CAN controller (transmission unit group), 9 is a transmission priority determination unit, 10 is a frame accumulation unit, 11 is a frame storage unit, 12 is a frame transmission control unit, 13 is a frame erasure unit, and 22 is a transmission request completion flag setting unit.

Claims

[Claim 1] An electronic control device capable of transmitting frames containing data in accordance with a priority order based on an ID assigned to the frames, a transmission FIFO group (7) having a plurality of transmission FIFOs capable of storing the frames; a group of transmitting units (8) corresponding to the group of transmitting FIFOs and having a plurality of transmitting units capable of storing the frames; a transmission priority determination unit (9) for determining a transmission priority assigned to the frame for which a transmission request has occurred; a frame storage unit (10) that allocates and stores the frames to the plurality of transmission FIFOs based on the determination result of the transmission priority determination unit; a frame storage unit (11) that copies and stores the frames stored in the transmission FIFO in the corresponding transmission unit when the corresponding transmission unit is empty; a frame transmission control unit (12) that transmits the frames stored in the transmission unit; a transmission request completion flag setting unit (22) that sets a transmission request completion flag for a frame identical to the stored frame after the frame stored in the transmission FIFO is copied and stored in the corresponding transmission unit by the frame storage unit, The frame storage unit, when there is no storage area for the frame in the transmission FIFO, overwrites the frame for which a transmission request has been issued over the frame for which the transmission request completion flag is set and stores it in the transmission FIFO.

Citation Information

Patent Citations

  • Data transmission equipment

    JP1997200234A

  • Control unit for automobile

    JP2006273261A

  • Transmission apparatus and packet control method

    JP2016208241A