This application is based on Japanese Patent Application No. 2022-166941 filed on Oct. 18, 2022, the disclosure of which is incorporated herein by reference.
The present disclosure relates to a time synchronization communication system, a time synchronization end station, and a message transmission control program.
A related art discloses a time synchronization communication system in which a time synchronization protocol based on IEEE 802.1 AS is applied to a data communication system for a vehicle.
According to one aspect of the present disclosure, a time synchronization end station includes a first time recording section that records a time measured by a first timer at the time of transmission and reception of a message and a message transmission control section that controls transmission of the message. A time synchronization bridge includes a second time recording section that records a time measured by a second timer at the time of transmission and reception of a message and a time holding section that holds a time recorded by the second time recording section, and relays a message transmitted to and received from the time synchronization end station.
The objects, features and advantages of the present disclosure will be more clearly understood from the following detailed description with reference to the accompanying drawings. In the accompanying drawings,
For example, in a data communication system for a vehicle mounted on a vehicle, in order to implement an advanced driver assistance system (ADAS) and automated driving, a wide variety of devices such as cameras and sensors are connected to electronic control units (referred to as “ECUs”) arranged in various places of the vehicle. In order to grasp data of these cameras, sensors, and the like in time series, it is necessary to perform time synchronization among a plurality of ECUs connected via a communication network. As a method of performing time synchronization, a time synchronization protocol based on IEEE 1588 (Precision Time Protocol) or IEEE 802.1 AS (gPTP (Generalized Precision Time Protocol)) is being adopted for in-vehicle use.
In a configuration in which a time synchronization master and a time synchronization slave serving as time synchronization end stations perform time synchronization via, for example, Ethernet (registered trademark), a time synchronization bridge compatible with a timestamp of the gPTP standard is disposed between the time synchronization master and the time synchronization slave. The time synchronization bridge has a function of relaying a message transmitted and received between the time synchronization master and the time synchronization slave and transmitting a timestamp indicating the time when the message is transmitted and received to a time synchronization end station. However, in order to implement the function, it is necessary for the time synchronization bridge to have a computation core, software executed by the computation core, dedicated hardware, and the like, and the cost of development and manufacturing of the software and the hardware becomes a problem. In response to such a problem, a method of remotely controlling a time synchronization bridge using a computation core built in a time synchronization end station is specified by AUTOSAR.
In the above configuration, the message transmission and reception timestamps are held in the register of the time synchronization bridge. Here, in the time synchronization bridge, when a message is received from the time synchronization end station, the reception timestamp of the received message is held in the register, and when a new message is subsequently received from the time synchronization end station, the reception timestamp of the received new message is also held in the register. That is, the reception timestamp of the preceding message is overwritten with the reception timestamp of the subsequent message.
In this case, if the time synchronization end station acquires the reception timestamp of the preceding message before the reception timestamp of the preceding message is overwritten with the reception timestamp of the subsequent message, no trouble occurs in time management of messages. However, if the time synchronization end station does not acquire the reception timestamp of the preceding message before the reception timestamp of the preceding message is overwritten with the reception timestamp of the subsequent message, the time synchronization end station cannot acquire the reception timestamp of the preceding message after being overwritten with the reception timestamp of the subsequent message. As a result, a trouble occurs in the time management of messages, and a problem that transmission and reception of messages cannot be appropriately performed newly occurs.
An object of the present disclosure is to provide a time synchronization communication system, a time synchronization end station, and a message transmission control program capable of appropriately transmitting and receiving messages while solving the problem of the cost of development and manufacturing of software and hardware.
According to a first aspect of the present disclosure, a time synchronization end station includes a first time recording section that records a time measured by a first timer at the time of transmission and reception of a message and a message transmission control section that controls transmission of the message. A time synchronization bridge includes a second time recording section that records a time measured by a second timer at the time of transmission and reception of a message and a time holding section that holds a time recorded by the second time recording section, and relays a message transmitted to and received from the time synchronization end station.
The time synchronization end station remotely controls the time synchronization bridge. after transmitting a first message to the time synchronization bridge, the message transmission control section transmits a second message to the time synchronization bridge on condition that the time synchronization end station has acquired, from the time synchronization bridge, a time held in the time holding section as the first message is received by the time synchronization bridge.
In the configuration in which the time synchronization end station remotely controls the time synchronization bridge, after transmitting a first message to the time synchronization bridge, the time synchronization end station transmits a second message to the time synchronization bridge on condition that the time synchronization end station has acquired, from the time synchronization bridge, the time held in the time holding section as the first message is received by the time synchronization bridge. By transmitting the second message to the time synchronization bridge on condition that the time synchronization end station has acquired the time held in the time holding section from the time synchronization bridge, it is possible to avoid the occurrence of the trouble in the time management of messages in advance. With the configuration in which the time synchronization end station remotely controls the time synchronization bridge, it is possible to appropriately transmit and receive messages while solving the problem of the cost of development and manufacturing of software and hardware.
Hereinafter, a plurality of embodiments will be described with reference to the drawings. In subsequent embodiments, descriptions of parts common to the preceding embodiments will be omitted.
A first embodiment will be described with reference to
The first ECU 21 includes a microcomputer 51 and an Ethernet switch 61. The microcomputer 51 is a node that distributes a reference time in the time synchronization communication system 11, and functions as a time synchronization master. The Ethernet switch 61 is a node that relays a message in the time synchronization communication system 11, and functions as a time synchronization bridge. The microcomputer 51 corresponds to “time synchronization station”.
The microcomputer 51 is configured by interconnecting a computation core 52 (corresponding to “transmission control section”), a ROM 53, a RAM 54, a general-purpose IO 55, and an Ethernet controller 56 via a bus 57. The computation core 52 controls the overall operation of the first ECU 21 by performing computation processing. By executing a propagation delay time calculation program, the computation core 52 calculates the propagation delay time between the time synchronization master and the time synchronization bridge, which will be described later. By executing a message transmission control program, the computation core 52 controls the transmission of a message, which will be described later. The ROM 53 is a storage area for storing various data. The RAM 54 is a storage area that functions as a work area when the computation core 52 performs the computation processing. The general-purpose IO 55 performs data communication conforming to a general-purpose communication protocol such as a serial peripheral interface (SP1) with a general-purpose IO to be described later of the Ethernet switch 61.
The Ethernet controller 56 is configured by interconnecting a timestamp section 58 (corresponding to “first time recording section”) and a communication port P0 via a bus 59. The timestamp section 58 includes a timer that measures a clock tm, and records the time measured by the timer. The computation core 52 accesses the timestamp section 58 via the buses 57 and 59, reads the time recorded by the timestamp section 58, and stores the read time in the RAM 54. The Ethernet controller 56 may be configured to transfer the time recorded by the timestamp section 58 to the RAM 54 by a built-in direct memory access (DMA) and store the time. The communication port P0 is connected to a communication port P1, which will be described later, of the Ethernet switch 61 via Ethernet 12. The communication port P0 performs data communication conforming to the Ethernet communication protocol with the communication port P1.
The Ethernet switch 61 is configured by interconnecting a general-purpose IO 62, a timestamp section 63 (corresponding to “second time recording section”), a register 64 (corresponding to “time holding section”), and communication ports P1, P2, and P3 via a bus 65. The general-purpose IO 62 performs data communication conforming to a general-purpose communication protocol with the general-purpose IO 55 of the microcomputer 51. The timestamp section 63 includes a timer that measures a clock tbr, and records the time measured by the timer. The register 64 holds the timestamp recorded by the timestamp section 63.
The communication port P1 performs data communication conforming to the Ethernet communication protocol with the communication port P0 of the microcomputer 51. The communication port P2 is connected to a communication port P4, which will be described later, of the second ECU 31 via Ethernet 13. The communication port P2 performs data communication conforming to the Ethernet communication protocol with the communication port P4. The communication port P3 is connected to a communication port P5, which will be described later, of the third ECU 41 via Ethernet 14. The communication port P3 performs data communication conforming to the Ethernet communication protocol with the communication port P5.
The Ethernet switch 61 does not have a computation core and operates under the control of the computation core 52 of the microcomputer 51. That is, the microcomputer 51 functioning as a time synchronization master writes and reads data to and from the register 64 by the data communication between the general-purpose IOs 55 and 62, and remotely controls the Ethernet switch 61 functioning as a time synchronization bridge.
As illustrated in
The Ethernet controller 75 is configured by interconnecting a timestamp section 77 and the communication port P4 via a bus 78. The timestamp section 77 includes a timer that measures a clock ts, and records the time measured by the timer. The computation core 72 accesses the timestamp section 77 via the buses 76 and 78, reads the time recorded by the timestamp section 77, and stores the read time in the RAM 74. The Ethernet controller 75 may be configured to transfer the time recorded by the timestamp section 77 to the RAM 74 by a built-in DMA and store the time. The communication port P4 performs data communication conforming to the Ethernet communication protocol with the communication port P2 of the Ethernet switch 61.
The third ECU 41 has a configuration similar to the second ECU 31, and includes a microcomputer 81. The microcomputer 81 is a node that synchronizes with the reference time distributed from the time synchronization master in the time synchronization communication system 11, and functions as a time synchronization slave 2. The microcomputer 81 is configured by interconnecting a computation core 82, a ROM 83, a RAM 84, and an Ethernet controller 85 via a bus 86. The computation core 82 controls the overall operation of the third ECU 41 by performing computation processing. The ROM 83 is a storage area for storing various data. The RAM 84 is a storage area that functions as a work area when the computation core 82 performs the computation processing.
The Ethernet controller 85 is configured by interconnecting a timestamp section 87 and the communication port P5 via a bus 88. The timestamp section 87 includes a timer that measures a clock ts′, and records the time measured by the timer. The computation core 82 accesses the timestamp section 87 via the buses 86 and 88, reads the time recorded by the timestamp section 87, and stores the read time in the RAM 84. The Ethernet controller 85 may be configured to transfer the time recorded by the timestamp section 87 to the RAM 84 by a built-in DMA and store the time. The communication port P5 performs data communication conforming to the Ethernet communication protocol with the communication port P3 of the Ethernet switch 61.
In the above configuration, the time required for the message to pass through the Ethernet 12 between the time synchronization master and the time synchronization bridge, the time required for the message to pass through the Ethernet 13 between the time synchronization slave 1 and the time synchronization bridge, and the time required for the message to pass through the Ethernet 14 between the time synchronization slave 2 and the time synchronization bridge are generated as the propagation delay time. The measurement of the propagation delay time and the distribution of the reference time will be described below. In
(1-1) Measurement of Propagation Delay Time
The measurement of the propagation delay time will be described with reference to
The time synchronization master, the time synchronization slave, and the time synchronization bridge transmit and receive, as messages for measuring the propagation delay time, a propagation delay measurement request message, a first propagation delay measurement response message, and a second propagation delay measurement response message. The individual messages are as follows.
The propagation delay measurement request message: a message transmitted by the time synchronization slave or the time synchronization bridge to an upper time synchronization bridge or the time synchronization master in order to measure the propagation delay of Ethernet to which the time synchronization slave or the time synchronization bridge is connected. In
The first propagation delay measurement response message: a message in which the time synchronization master that has received the propagation delay measurement request message stores a reception timestamp indicating the time when the propagation delay measurement request message is received by the time synchronization bridge, and that is transmitted to the transmission source of the propagation delay measurement request message. In
The second propagation delay measurement response message: a message in which the time synchronization master that has transmitted the first propagation delay measurement response message stores a transmission timestamp indicating the time when the first propagation delay measurement response message is transmitted from the time synchronization bridge, and that is transmitted to the transmission source of the propagation delay measurement request message. In
As illustrated in
Ts1: a transmission timestamp indicating the time when the propagation delay measurement request message is transmitted from the communication port P4.
Tbr1: a reception timestamp indicating the time when the propagation delay measurement request message passes through the communication port P2 and the time when the propagation delay measurement request message is received by the communication port P2.
Tbr2: a transmission timestamp indicating the time when the propagation delay measurement request message passes through the communication port P1 and the time when the propagation delay measurement request message is transmitted from the communication port P1.
Tm1: a reception timestamp indicating the time when the propagation delay measurement request message is received by the communication port P0.
Tm2: a transmission timestamp indicating the time when the first propagation delay measurement response message is transmitted from the communication port P0.
Tbr3: a reception timestamp indicating the time when the first propagation delay measurement response message passes through the communication port P1 and the time when the first propagation delay measurement response message is received by the communication port P1.
Tbr4: a transmission timestamp indicating the time when the first propagation delay measurement response message passes through the communication port P2 and the time when the first propagation delay measurement response message is transmitted from the communication port P2.
Ts2: a reception timestamp indicating the time when the first propagation delay measurement response message is received by the communication port P4.
D1: the time from Ts1 to Tbr1, and the propagation delay time between the time synchronization slave 1 and the time synchronization bridge.
D2: the time from Tbr2 to Tm1, and the propagation delay time between the time synchronization master and the time synchronization bridge.
D3: the time from Tm2 to Tbr3, and the propagation delay time between the time synchronization master and the time synchronization bridge.
D4: the time from Tbr4 to Ts2, and the propagation delay time between the time synchronization slave 1 and the time synchronization bridge.
In this case, for the propagation delay time between the time synchronization slave 1 and the time synchronization bridge,
The time synchronization slave 1 acquires Ts1 and Ts2 by itself. Since Tbr1 is stored in the first propagation delay measurement response message received from the time synchronization master via the time synchronization bridge, when receiving the first propagation delay measurement response message, the time synchronization slave 1 extracts and acquires Tbr1 from the received first propagation delay measurement response message. Since Tbr4 is stored in the second propagation delay measurement response message received from the time synchronization master via the time synchronization bridge, when receiving the second propagation delay measurement response message, the time synchronization slave 1 extracts and acquires Tbr4 from the received second propagation delay measurement response message. The time synchronization slave 1 acquires Ts1, Ts2, Tbr1, and Tbr4, and calculates D1 (=D4) by arithmetic expression 1.
Furthermore, for the propagation delay time between the time synchronization master and the time synchronization bridge,
The time synchronization master acquires Tm1 and Tm2 by itself. The time synchronization master acquires Tbr2 and Tbr3 from the time synchronization bridge by the data communication between the general-purpose IOs 55 and 62. The time synchronization master acquires Tm1, Tm2, Tbr2, and Tbr3, and calculates D2 (=D3) by arithmetic expression 2.
(1-2) Distribution of Reference Time
The distribution of the reference time will be described with reference to
The time synchronization master, the time synchronization slave, and the time synchronization bridge transmit and receive a first synchronization message and a second synchronization message as messages for distributing the reference time. The individual messages are as follows.
The first synchronization message: a message transmitted by the time synchronization master to a lower time synchronization bridge or time synchronization slave in order to distribute the reference time of the time synchronization master. In
The second synchronization message: a message in which the time synchronization master stores the transmission time of the first synchronization message, the propagation delay time between the time synchronization master and the time synchronization bridge, and the residence time of the first synchronization message in the time synchronization bridge, and that is transmitted to the lower time synchronization bridge or time synchronization slave. In
As illustrated in
Tm3: a transmission timestamp indicating the time when the first synchronization message is transmitted from the communication port P0.
Tbr5: a reception timestamp indicating the time when the first synchronization message passes through the communication port P1 and the time when the first synchronization message is received by the communication port P1.
Tbr6: a transmission timestamp indicating the time when the first synchronization message passes through the communication port P2 and the time when the first synchronization message is transmitted from the communication port P2.
Ts3: a reception timestamp indicating the time when the first synchronization message is received by the communication port P4.
R1: the time from Tbr5 to Tbr6, the time required for the first synchronization message to pass through the time synchronization bridge, and the residence time of the first synchronization message in the time synchronization bridge.
Assuming that the time difference between the clock tm of the time synchronization master and the clock is of the time synchronization slave 1 is denoted by “C”,
The time synchronization slave 1 acquires Ts3 by itself. Since Tm3 and D2+R1 are stored in the second synchronization message received from the time synchronization master via the time synchronization bridge, when receiving the second synchronization message, the time synchronization slave 1 extracts and acquires Tm3 and D2+R1 from the received second synchronization message. Tm3 and D2+R1 are stored in different fields of the second synchronization message. The time synchronization slave 1 acquires Ts3, Tm3, and D2+R1, and estimates the clock tm of the time synchronization master by arithmetic expression 4.
As described above, in the configuration in which the time synchronization bridge transmits the message received from the time synchronization master to the time synchronization slave, the transmission and reception timestamps recorded by the timestamp section 63 are held in the register 64. As illustrated in
As illustrated in
If the time synchronization master acquires the reception timestamp Tbr5 of the preceding message before the reception timestamp Tbr5 of the preceding message is overwritten with the reception timestamp Tbr5′ of the subsequent message, no trouble occurs in the time management of messages. However, if the time synchronization master does not acquire the reception timestamp Tbr5 of the preceding message before the reception timestamp Tbr5 of the preceding message is overwritten with the reception timestamp Tbr5′ of the subsequent message, the time synchronization master cannot acquire the reception timestamp of the preceding message after being overwritten with the reception timestamp Tbr5′ of the subsequent message, which causes a trouble in the time management of messages. Not only in the case where the time synchronization master transmits the first synchronization message, but also in the case where the time synchronization master transmits the first propagation delay measurement response message, a trouble also occurs in the time management of messages.
In this regard, in the time synchronization master, the computation core 52 controls the transmission of a message from the communication port P0, and avoids a trouble caused by overwriting the reception timestamp of the register 64. Specifically, as illustrated in
The computation core 52 prohibits the transmission of the message while the P0 down counter is counting, and permits the transmission of the message while the P0 down counter stops counting. When the message transmission request event is established, the computation core 52 sets the predetermined time in the P0 down counter, causes the P0 down counter to start counting, and transmits the message from the time synchronization master to the time synchronization bridge.
The computation core 52 waits for the establishment of a new message transmission request event after starting the counting of the P0 down counter, but does not transmit the new message from the time synchronization master to the time synchronization bridge as long as the counting of the P0 down counter is continued even if the new message transmission request event is established. When the P0 down counter terminates counting, if the new message transmission request event is established, the computation core 52 starts the counting of the P0 down counter again, and transmits the new message from the time synchronization master to the time synchronization bridge. The computation core 52 repeats the processing. An up counter may be used instead of the down counter.
Next, the operation of the above configuration will be described with reference to
(1-11) Initialization Processing Performed by Time Synchronization Master (see
In the time synchronization master, when the initialization processing is started, the computation core 52 activates the Ethernet controller 56 and starts counting the clock tm (A1). The computation core 52 outputs an initialization command from the general-purpose IO 55 to the Ethernet switch 61, and shifts to the initialization processing of the time synchronization bridge (A2).
When the initialization processing of the time synchronization bridge is started, the computation core 52 sets a transfer rule (A3). The computation core 52 sets the register 64 so as to transfer the message related to time synchronization received from the communication port P2 or the communication port P3 to the communication port P0. The message related to time synchronization is a propagation delay measurement request message, a first propagation delay measurement response message, a second propagation delay measurement response message, a first synchronization message, or a second synchronization message.
The computation core 52 sets the transmission port designation function of the register 64 to be enabled (A4). When transmitting the message related to time synchronization from the communication port P2 or the communication port P3, the computation core 52 assigns transmission port information designating the communication port to the Ethernet frame storing the message related to time synchronization. In a case where the transmission port designation function of the register 64 is enabled, the Ethernet switch 61 identifies the transmission port information assigned to the message related to time synchronization received from the communication port P1, and transmits the Ethernet frame from which the identified transmission port information has been deleted from the communication port indicated by the transmission port information.
The computation core 52 sets the reception port specification function of the register 64 to be enabled (A5). In a case where the reception port specification function of the register 64 is enabled, the Ethernet switch 61 assigns reception port information indicating the communication port having received to the Ethernet frame that stores the message related to time synchronization received from the communication port P2 or the communication port P3, and transmits the Ethernet frame from the communication port 1. The computation core 52 specifies the time synchronization slave as the transmission source from the reception port information.
(1-12) Initialization Processing Performed by Time Synchronization Slave 1 (see
In the time synchronization slave 1, when the initialization processing is started, the computation core 72 activates the Ethernet controller 75, starts counting the clock is (B1), and terminates the initialization processing.
(1-13) Down-Count Processing Performed by Time Synchronization Master (see
In the time synchronization master, the computation core 52 performs down-count processing every predetermined cycle (for example, one millisecond) determined in advance. When the down-count processing is started, the computation core 52 determines whether or not the count value of the P0 down counter exceeds “0” (A11). When determining that the count value of the P0 down counter does not exceed “0” (A11: NO), that is, when determining that the counting of the P0 down counter is being stopped, the computation core 52 terminates the down-count processing.
When determining that the count value of the P0 down counter exceeds “0” (A11: YES), that is, when determining that the counting of the P0 down counter is being performed, the computation core 52 decrements the count value of the P0 down count (A12), and terminates the down-count processing. In a case where the P0 down counter is implemented by a hardware timer, the down-count processing performed by the computation core 52 is unnecessary. In addition, in a case where an up counter is used instead of the down counter, the computation core 52 increments the count value of the P0 up counter when determining that the counting of the P0 up counter is being performed.
(1-14) Propagation Delay Time Measurement Processing Performed by Time Synchronization Slave 1 (See
In the time synchronization slave 1, the computation core 72 performs propagation delay time measurement processing every transmission cycle (for example, one second) of the propagation delay measurement request message determined in advance. When the propagation delay time measurement processing is started, the computation core 72 generates a propagation delay measurement request message on the RAM 74 (B11). The computation core 72 transmits the propagation delay measurement request message to the time synchronization bridge (B12). The computation core 72 stores the transmission timestamp Ts1 of the propagation delay measurement request message in the RAM 74 (B13). The computation core 72 waits for receiving the first propagation delay measurement response message from the time synchronization bridge (B14).
When determining that the first propagation delay measurement response message is received from the time synchronization bridge (B14: YES), the computation core 72 stores the reception timestamp Ts2 of the first propagation delay measurement response message in the RAM 74 (B15). The computation core 72 extracts the reception timestamp Tbr1 when the propagation delay measurement request message is received by the communication port P2 from the first propagation delay measurement response message and stores the reception timestamp Tbr1 in the RAM 74 (B16). The computation core 72 waits for receiving the second propagation delay measurement response message from the time synchronization bridge (B17).
When determining that the second propagation delay measurement response message is received from the time synchronization bridge (B17: YES), the computation core 72 extracts the transmission timestamp Tbr4 when the first propagation delay measurement response message is transmitted from the communication port P2 from the second propagation delay measurement response message and stores the transmission timestamp Tbr4 in the RAM 74 (B18). The computation core 72 reads Ts1, Ts2, Tbr1, and Tbr4 stored in the RAM 74, calculates D1 (=D4) by arithmetic expression 1, stores D1 (=D4) in the RAM 74 (B19), and terminates the propagation delay time measurement processing.
(1-15) Propagation Delay Time Measurement Processing Performed by Time Synchronization Master (See
In the time synchronization master, the computation core 52 performs propagation delay time measurement processing every reception determination cycle (for example, one millisecond) of the propagation delay measurement request message determined in advance by interruption. When the propagation delay time measurement processing is started, the computation core 52 determines whether the propagation delay measurement request message is received from the time synchronization bridge (A21). When determining that the propagation delay measurement request message is not received from the time synchronization bridge (A21: NO), the computation core 52 terminates the propagation delay time measurement processing.
When determining that the propagation delay measurement request message is received from the time synchronization bridge (A21: YES), the computation core 52 identifies that the reception port information assigned to the propagation delay measurement request message is the communication port P2 (A22). The computation core 52 acquires the reception timestamp Tbr1 when the propagation delay measurement request message is received by the communication port P2 and the transmission timestamp Tbr2 when the propagation delay measurement request message is transmitted from the communication port P1 by the data communication between the general-purpose IOs 55 and 62, and stores the timestamps in the RAM 54 (A23). The computation core 52 stores the reception timestamp Tm1 of the propagation delay measurement request message in the RAM 54 (A24).
The computation core 52 determines whether or not the count value of the P0 down counter is “0” (A25). When determining that the count value of the P0 down counter is not “0” (A25: NO), the computation core 52 stands by until the count value of the P0 down counter reaches “0”. When determining that the count value of the P0 down counter is “0” (A25: YES), the computation core 52 sets the count value of the P0 down counter to the predetermined time (A26).
The computation core 52 generates the first propagation delay measurement response message on the RAM 54 (A27). The computation core 52 stores the reception timestamp Tbr1 of the propagation delay measurement request message in the first propagation delay measurement response message (A28). The computation core 52 assigns the communication port P2 to the first propagation delay measurement response message as transmission port information (A29). The computation core 52 transmits the first propagation delay measurement response message to the time synchronization bridge (A30, corresponding to “first message transmission procedure”).
The computation core 52 acquires the reception timestamp Tbr3 when the first propagation delay measurement response message is received by the communication port P1 and the transmission timestamp Tbr4 when the first propagation delay measurement response message is transmitted from the communication port P2 by the data communication between the general-purpose IOs 55 and 62, and stores the timestamps in the RAM 54 (A31). The computation core 52 stores the transmission timestamp Tm2 of the first propagation delay measurement response message in the RAM 54 (A32).
The computation core 52 determines whether or not the count value of the P0 down counter is “0” (A33). When determining that the count value of the P0 down counter is not “0” (A33: NO), the computation core 52 stands by until the count value of the P0 down counter reaches “0”. When determining that the count value of the P0 down counter is “0” (A33: YES), the computation core 52 sets the count value of the P0 down counter to the predetermined time (A34).
The computation core 52 generates the second propagation delay measurement response message on the RAM 54 (A35). The computation core 52 stores the transmission timestamp Tbr4 of the first propagation delay measurement response message in the second propagation delay measurement response message (A36). The computation core 52 assigns the communication port P2 to the second propagation delay measurement response message as the transmission port information (A37). The computation core 52 transmits the second propagation delay measurement response message to the time synchronization bridge (A38, corresponding to “second message transmission procedure”). That is, the computation core 52 transmits the second propagation delay measurement response message to the time synchronization bridge on condition that the time synchronization master has acquired the reception timestamps of all the time synchronization messages including the first propagation delay measurement response message held in the register 64 from the time synchronization bridge.
The computation core 52 reads Tm1, Tm2, Tbr2, and Tbr3 stored in the RAM 54, calculates D2 (=D3) by arithmetic expression 2, stores D2 (=D3) in the RAM 54 (A39), and terminates the propagation delay time measurement processing.
(1-16) Reference Time Distribution Processing Performed by Time Synchronization Master (See
In the time synchronization master, the computation core 52 performs the reference time distribution processing every transmission cycle (for example, 125 milliseconds) of the first synchronization message determined in advance. When the reference time distribution processing is started, the computation core 52 determines whether or not the count value of the P0 down counter is “0” (A41). When determining that the count value of the P0 down counter is not “0” (A41: NO), the computation core 52 stands by until the count value of the P0 down counter reaches “0”. When determining that the count value of the P0 down counter is “0” (A41: YES), the computation core 52 sets the count value of the P0 down counter to the predetermined time (A42).
The computation core 52 generates the first synchronization message on the RAM 54 (A43). The computation core 52 assigns the communication port P2 to the first synchronization message as the transmission port information (A44). The computation core 52 transmits the first synchronization message to the time synchronization bridge (A45, corresponding to “first message transmission procedure”).
The computation core 52 acquires the reception timestamp Tbr5 when the first synchronization message is received by the communication port P1 and the transmission timestamp Tbr6 when the first synchronization message is transmitted from the communication port P2 by the data communication between the general-purpose IOs 55 and 62, calculates the residence time R1 of the first synchronization message in the time synchronization bridge, and stores the residence time R1 in the RAM 54 (A46). The computation core 52 stores the transmission timestamp Tm3 of the first synchronization message in the RAM 54 (A47).
The computation core 52 determines whether or not the count value of the P0 down counter is “0” (A48). When determining that the count value of the P0 down counter is not “0” (A48: NO), the computation core 52 stands by until the count value of the P0 down counter reaches “0”. When determining that the count value of the P0 down counter is “0” (A48: YES), the computation core 52 sets the count value of the P0 down counter to the predetermined time (A49).
The computation core 52 generates the second synchronization message on the RAM 54 (A50). The computation core 52 stores the transmission timestamp Tm3 of the first synchronization message in the second synchronization message (A51). The computation core 52 stores the sum of the propagation delay time D2 and the residence time R1 as the correction time in the second synchronization message (A52). The computation core 52 assigns the communication port P2 to the second synchronization message as the transmission port information (A53). The computation core 52 transmits the second synchronization message to the time synchronization bridge (A54, corresponding to “second message transmission procedure”), and terminates the reference time distribution processing. That is, the computation core 52 transmits the second synchronization message to the time synchronization bridge on condition that the time synchronization master has acquired the reception timestamps of all the time synchronization messages including the first synchronization message held in the register 64 from the time synchronization bridge.
(1-17) Processing of Computing Time Difference of Time Synchronization Master Clock Performed by Time Synchronization Slave 1 (See
In the time synchronization slave 1, the computation core 72 performs the processing of computing the time difference of the time synchronization master clock every reception determination cycle (for example, one millisecond) of the first synchronization message determined in advance or by interruption. When the processing of computing the time difference of the time synchronization master clock is started, the computation core 72 determines whether the first synchronization message is received from the time synchronization bridge (B21). When determining that the first synchronization message is not received from the time synchronization bridge (B21: NO), the computation core 72 terminates the processing of estimating the time synchronization master clock.
When determining that the first synchronization message is received from the time synchronization bridge (B21: YES), the computation core 72 stores the reception timestamp Ts3 of the first synchronization message in the RAM 74 (B22). The computation core 72 waits for receiving the second synchronization message from the time synchronization bridge (B23).
When determining that the second synchronization message is received from the time synchronization bridge (B23: YES), the computation core 72 extracts the transmission timestamp Tm3 of the first synchronization message, the propagation delay time D2, and the residence time R1 from the second synchronization message and stores them in the RAM 74 (B24).
The computation core 72 reads Ts3, Tm3, D2+R1, and D1 stored in the RAM 74, calculates the time difference C between the clock tm of the time synchronization master and the clock ts of the time synchronization slave 1 by arithmetic expression 3 (B25), and terminates the processing of computing the time difference of the time synchronization master clock.
(1-17) Processing of Estimating Current Time of Time Synchronization Master Clock Performed by Time Synchronization Slave 1 (See
In the time synchronization slave 1, the computation core 72 performs the processing of estimating the current time of the time synchronization master clock by calling the current time of the clock tm from an application used for control, for example. When the processing of estimating the current time of the time synchronization master clock is started, the computation core 72 reads the current time of the clock ts of the time synchronization slave 1 and stores the current time in the RAM 74 (B31). The computation core 72 estimates the clock tm of the time synchronization master by arithmetic expression 4 from the time difference C between the clock tm of the time synchronization master and the clock ts of the time synchronization slave 1 and the current time of the clock ts of the time synchronization slave 1, discloses the clock tm to the caller (B32), and terminates the processing of estimating the current time of the time synchronization master clock.
As a comparison target, as illustrated in
In the configuration of the comparison target illustrated in
As described above, according to the first embodiment, the following operational effects can be obtained. In the time synchronization communication system 11, the time synchronization master is configured to remotely control the time synchronization bridge, and after the preceding message is transmitted to the time synchronization bridge, the subsequent message is transmitted to the time synchronization bridge on condition that the time synchronization master has acquired the reception timestamp held in the register 64 as the preceding message is received by the time synchronization bridge from the time synchronization bridge. By transmitting the subsequent message to the time synchronization bridge on condition that the time synchronization master has acquired the time held in the register 64 from the time synchronization bridge, it is possible to avoid the occurrence of the trouble in the time management of messages in advance. With the configuration in which the time synchronization master remotely controls the time synchronization bridge, it is possible to appropriately transmit and receive messages while solving the problem of the cost of development and manufacturing of software and hardware.
By using the down counter, it can be easily achieved by adding a software or hardware down counter. In addition, by appropriately changing the predetermined time measured by the down counter depending on the data communication speed, connection form, or the like between the time synchronization master and the time synchronization bridge, it is possible to flexibly cope with changes in system specifications and the like.
Although the configuration in which the Ethernet switch 61 is disposed separately from the microcomputer 51 in the first ECU 51 has been described above, the Ethernet switch 61 may be built in the microcomputer 51.
A second embodiment will be described with reference to
As illustrated in
The computation core 52 waits for the establishment of a new message transmission request event after setting the P0 transmission permission flag to not-transmittable, but does not transmit the new message from the time synchronization master to the time synchronization bridge as long as the setting of not-transmittable is continued even if the new message transmission request event is established. The computation core 52 monitors whether or not the reception timestamp held in the register 64 is acquired, and when the reception timestamp held in the register 64 is acquired, sets the P0 transmission permission flag to transmittable. When a new message transmission request event is established, the computation core 52 sets the P0 transmission permission flag to not-transmittable again and transmits the new message from the time synchronization master to the time synchronization bridge. The computation core 52 repeats the processing.
Next, the operation of the above configuration will be described with reference to
(2-11) Initialization Processing Performed by Time Synchronization Master (see
In the time synchronization master, when the initialization processing is started, the computation core 52 performs steps A1 to A6, sets the P0 transmission permission flag to transmittable (A61), and terminates the initialization processing.
(2-12) Initialization Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the initialization processing performed by the time synchronization slave 1 described in the first embodiment.
(2-13) Propagation Delay Time Measurement Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the propagation delay time measurement processing performed by the time synchronization slave 1 described in the first embodiment.
(2-14) Propagation Delay Time Measurement Processing Performed by Time Synchronization Master (see
When the propagation delay time measurement processing is started, the computation core 52 performs steps A21 to A24 and determines whether or not the P0 transmission permission flag is set to transmittable (A71). When determining that the P0 transmission permission flag is not set to transmittable (A71: NO), the computation core 52 stands by until the P0 transmission permission flag is set to transmittable. When determining that the P0 transmission permission flag is set to transmittable (A71: YES), the computation core 52 sets the P0 transmission permission flag to not-transmittable (A72).
The computation core 52 performs steps A27 to A32, sets the P0 transmission permission flag to transmittable (A73), and determines whether or not the P0 transmission permission flag is set to transmittable (A74). When determining that the P0 transmission permission flag is not set to transmittable (A74: NO), the computation core 52 stands by until the P0 transmission permission flag is set to transmittable. When determining that the P0 transmission permission flag is set to transmittable (A74: YES), the computation core 52 sets the P0 transmission permission flag to not-transmittable (A75). The computation core 52 performs steps A35 to A39, sets the P0 transmission permission flag to transmittable (A76), and terminates the propagation delay time measurement processing.
(2-15) Reference Time Distribution Processing Performed by Time Synchronization Master (See
In the time synchronization master, the computation core 52 performs the reference time distribution processing every transmission cycle (for example, 125 milliseconds) of the first synchronization message determined in advance. When the reference time distribution processing is started, the computation core 52 determines whether or not the P0 transmission permission flag is set to transmittable (A81). When determining that the P0 transmission permission flag is not set to transmittable (A81: NO), the computation core 52 stands by until the P0 transmission permission flag is set to transmittable. When determining that the P0 transmission permission flag is set to transmittable (A81: YES), the computation core 52 sets the P0 transmission permission flag to not-transmittable (A82).
The computation core 52 performs steps A43 to A46 and sets the P0 transmission permission flag to transmittable (A83). The computation core 52 performs step A47 and determines whether or not the P0 transmission permission flag is set to transmittable (A84). When determining that the P0 transmission permission flag is not set to transmittable (A84: NO), the computation core 52 stands by until the P0 transmission permission flag is set to transmittable. When determining that the P0 transmission permission flag is set to transmittable (A84: YES), the computation core 52 sets the P0 transmission permission flag to not-transmittable (A85). The computation core 52 performs steps A50 to A54, sets the P0 transmission permission flag to transmittable (A86), and terminates the reference time distribution processing.
(2-16) Processing of Computing Time Difference of Time Synchronization Master Clock Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the processing of computing the time difference of the time synchronization master clock described in the first embodiment.
(2-17) Processing of Estimating Current Time of Time Synchronization Master Clock Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the processing of estimating the current time of the time synchronization master clock described in the first embodiment.
As described above, according to the second embodiment, the following operational effects can be obtained. As in the first embodiment, after the preceding message is transmitted to the time synchronization bridge, the subsequent message is transmitted to the time synchronization bridge on condition that the time synchronization master has acquired the reception timestamp held in the register 64 as the preceding message is received by the time synchronization bridge from the time synchronization bridge. By transmitting the second message to the time synchronization bridge on condition that the time synchronization master has acquired the time held in the register 64 from the time synchronization bridge, it is possible to avoid the occurrence of the trouble in the time management of messages in advance.
By using the transmission permission flag, it can be easily achieved without adding a software or hardware down counter.
A third embodiment will be described with reference to
As illustrated in
Next, the operation of the above configuration will be described with reference to
(3-11) Initialization Processing Performed by Time Synchronization Master (see
In the time synchronization master, when the initialization processing is started, the computation core 52 performs steps A1 to A6, sets the P0-Sync down counter to “0” (A111), sets the P0-Pdelay_Resp down counter to “0” (A112), and terminates the initialization processing.
(3-12) Initialization Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the initialization processing performed by the time synchronization slave 1 described in the first embodiment.
(3-13) Down-Count Processing Performed by Time Synchronization Master (see
In the time synchronization master, the computation core 52 performs down-count processing every predetermined cycle (for example, one millisecond) determined in advance. When the down-count processing is started, the computation core 52 determines whether or not the count value of the P0-Sync down counter exceeds “0” (A121). When determining that the count value of the P0-Sync down counter does not exceed “0” (A121: NO), that is, when determining that the counting of the P0-Sync down counter is being stopped, the computation core 52 performs step A123.
When determining that the count value of the P0-Sync down counter exceeds “0” (A121: YES), that is, when determining that the counting of the P0-Sync down counter is being performed, the computation core 52 decrements the count value of the P0-Sync down count (A122), and performs step A123.
The computation core 52 determines whether or not the count value of the P0-Pdelay_Resp down counter exceeds “0” (A123). When determining that the count value of the P0-Pdelay_Resp down counter does not exceed “0” (A123: NO), that is, when determining that the counting of the P0-Pdelay_Resp down counter is being stopped, the computation core 52 terminates the down-count processing.
When determining that the count value of the P0-Pdelay_Resp down counter exceeds “0” (A123: YES), that is, when determining that the counting of the P0-Pdelay_Resp down counter is being performed, the computation core 52 decrements the count value of the P0-Pdelay_Resp down counter (A124), and terminates the down-count processing.
(3-14) Propagation Delay Time Measurement Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the propagation delay time measurement processing performed by the time synchronization slave 1 described in the first embodiment.
(3-15) Propagation Delay Time Measurement Processing Performed by Time Synchronization Master (See
When the propagation delay time measurement processing is started, the computation core 52 performs steps A21 to A24 and determines whether or not the count value of the P0-Pdelay_Resp down counter is “0” (A131). When determining that the count value of the P0-Pdelay_Resp down counter is not “0” (A131: NO), the computation core 52 stands by until the count value of the P0-Pdelay_Resp reaches “0”. When determining that the count value of the P0-Pdelay_Resp is “0” (A131: YES), the computation core 52 sets the count value of the P0-Pdelay_Resp down counter to a predetermined time (A132). The computation core 52 performs steps A27 to A32 and steps A35 to A39, and terminates the propagation delay time measurement processing.
(3-16) Reference Time Distribution Processing Performed by Time Synchronization Master (See
In the time synchronization master, the computation core 52 performs the reference time distribution processing every transmission cycle (for example, 125 milliseconds) of the first synchronization message determined in advance. When the reference time distribution processing is started, the computation core 52 determines whether or not the count value of the P0-Sync down counter is “0” (A141). When determining that the count value of the P0-Sync down counter is not “0” (A141: NO), the computation core 52 stands by until the count value of the P0-Sync down counter reaches “0”. When determining that the count value of the P0-Sync down counter is “0” (A141: YES), the computation core 52 sets the count value of the P0-Sync down counter to a predetermined time (A142). The computation core 52 performs steps A43 to A47 and steps A50 to A54, and terminates the reference time distribution processing.
(3-17) Time Synchronization Master Clock Estimation Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the time synchronization master clock estimation processing described in the first embodiment.
As described above, according to the third embodiment, the following operational effects can be obtained. As in the first embodiment, after the preceding message is transmitted to the time synchronization bridge, the subsequent message is transmitted to the time synchronization bridge on condition that the time synchronization master has acquired the reception timestamp held in the register 64 as the preceding message is received by the time synchronization bridge from the time synchronization bridge. It is possible to prevent the reception timestamp of the first synchronization message addressed to the time synchronization slave 1 from being overwritten with the reception timestamp of the first synchronization message addressed to the time synchronization slave 2.
A fourth embodiment will be described with reference to
As illustrated in
Next, the operation of the above configuration will be described with reference to
(4-11) Initialization Processing Performed by Time Synchronization Master (see
In the time synchronization master, when the initialization processing is started, the computation core 52 performs steps A1 to A6, sets the P0-Sync transmission permission flag to transmittable (A151), sets the P0-Pdelay_Resp transmission permission flag to transmittable (A152), and terminates the initialization processing.
(4-12) Initialization Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the initialization processing performed by the time synchronization slave 1 described in the first embodiment.
(4-13) Propagation Delay Time Measurement Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the propagation delay time measurement processing performed by the time synchronization slave 1 described in the first embodiment.
(4-14) Propagation Delay Time Measurement Processing Performed by Time Synchronization Master (See
When the propagation delay time measurement processing is started, the computation core 52 performs steps A21 to A24 and determines whether or not the P0-Pdelay_Resp transmission permission flag is set to transmittable (A161). When determining that the P0-Pdelay_Resp transmission permission flag is not set to transmittable (A161: NO), the computation core 52 stands by until the P0-Pdelay_Resp transmission permission flag is set to transmittable. When determining that the P0-Pdelay_Resp transmission permission flag is set to transmittable (A161: YES), the computation core 52 sets the P0-Pdelay_Resp transmission permission flag to not-transmittable (A162).
The computation core 52 performs steps A27 to A32 and steps A35 to A39, and terminates the propagation delay time measurement processing.
(4-15) Reference Time Distribution Processing Performed by Time Synchronization Master (See
In the time synchronization master, the computation core 52 performs the reference time distribution processing every transmission cycle (for example, 125 milliseconds) of the first synchronization message determined in advance. When the reference time distribution processing is started, the computation core 52 determines whether or not the P0-Sync transmission permission flag is set to transmittable (A171). When determining that the P0-Sync transmission permission flag is not set to transmittable (A171: NO), the computation core 52 stands by until the P0-Sync transmission permission flag is set to transmittable. When determining that the P0-Sync transmission permission flag is set to transmittable (A171: YES), the computation core 52 sets the P0-Sync transmission permission flag to not-transmittable (A172). The computation core 52 performs steps A43 to A46, sets the P0-Sync transmission permission flag to transmittable (A173), performs step A47 and steps A50 to A54, and terminates the reference time distribution processing.
(4-16) Time Synchronization Master Clock Estimation Processing Performed by Time Synchronization Slave 1
In the time synchronization slave 1, the computation core 72 performs processing similar to the time synchronization master clock estimation processing described in the first embodiment.
As described above, according to the fourth embodiment, the following operational effects can be obtained. As in the first embodiment, after the preceding message is transmitted to the time synchronization bridge, the subsequent message is transmitted to the time synchronization bridge on condition that the time synchronization master has acquired the reception timestamp held in the register 64 as the preceding message is received by the time synchronization bridge from the time synchronization bridge. It is possible to prevent the reception timestamp of the first synchronization message addressed to the time synchronization slave 1 from being overwritten with the reception timestamp of the first synchronization message addressed to the time synchronization slave 2.
Next, a fifth embodiment will be described with reference to
As illustrated in
The first ECU 121 includes a microcomputer 151 and an Ethernet switch 161. The microcomputer 151 is a node that synchronizes with the reference time distributed from the time synchronization master in the time synchronization communication system 111, and functions as a time synchronization slave 1. The Ethernet switch 161 is a node that relays a message in the time synchronization communication system 111, and functions as a time synchronization bridge. The microcomputer 151 corresponds to a time synchronization end station.
The microcomputer 151 is configured by interconnecting a computation core 152 (corresponding to “transmission control section”), a ROM 153, a RAM 154, a general-purpose IO 155, and an Ethernet controller 156 via a bus 157. The computation core 152 controls the overall operation of the first ECU 121 by performing computation processing. By executing a propagation delay time calculation program, the computation core 152 calculates the propagation delay time between the time synchronization slave 1 and the time synchronization bridge, which will be described later. The ROM 153 is a storage area for storing various data. The RAM 154 is a storage area that functions as a work area when the computation core 152 performs the computation processing. The general-purpose IO 155 performs data communication conforming to a general-purpose communication protocol such as SPI with a general-purpose IO to be described later of the Ethernet switch 161.
The Ethernet controller 156 is configured by interconnecting a timestamp section 158 (corresponding to “first time recording section”) and the communication port P0 via a bus 159. The timestamp section 158 includes a timer that measures the clock ts, and records the time measured by the timer. The computation core 152 accesses the timestamp section 158 via the buses 157 and 159, reads the time recorded by the timestamp section 158, and stores the read time in the RAM 154. The communication port P0 is connected to the communication port P1, which will be described later, of the Ethernet switch 161 via Ethernet 112. The communication port P0 performs data communication conforming to the Ethernet communication protocol with the communication port P1.
The Ethernet switch 161 has a configuration similar to the Ethernet switch 61 described in the first embodiment, and is configured by interconnecting a general-purpose IO 162, a timestamp section 163 (corresponding to “second time recording section”), a register 164 (corresponding to “time holding section”), and the communication ports P1, P2, and P3 via a bus 165. The general-purpose IO 162 performs data communication conforming to a general-purpose communication protocol such as SPI with the general-purpose IO 155 of the microcomputer 151. The timestamp section 163 includes a timer that measures the clock tbr, and records the time measured by the timer. The register 164 holds the timestamp recorded by the timestamp section 163.
The communication port P1 performs data communication conforming to the Ethernet communication protocol with the communication port P0 of the microcomputer 151. The communication port P2 is connected to the communication port P4, which will be described later, of the second ECU 131 via the Ethernet 113. The communication port P2 performs data communication conforming to the Ethernet communication protocol with the communication port P4. The communication port P3 is connected to the communication port P5, which will be described later, of the third ECU 141 via the Ethernet 114. The communication port P3 performs data communication conforming to the Ethernet communication protocol with the communication port P5.
The Ethernet switch 161 does not have a computation core and operates under the control of the computation core 152 of the microcomputer 151. That is, the microcomputer 151 functioning as a time synchronization slave 1 writes and reads data to and from the register 164 by the data communication between the general-purpose IOs 155 and 162, and remotely controls the Ethernet switch 161 functioning as a time synchronization bridge.
As illustrated in
The Ethernet controller 175 is configured by interconnecting a timestamp section 177 and the communication port P4 via a bus 178. The timestamp section 177 includes a timer that measures the clock tm, and records the time measured by the timer. The computation core 172 accesses the timestamp section 177 via the buses 176 and 178, reads the time recorded by the timestamp section 177, and stores the read time in the RAM 174. The communication port P4 performs data communication conforming to the Ethernet communication protocol with the communication port P2 of the Ethernet switch 161.
The third ECU 141 has a configuration similar to the third ECU 41 described in the first embodiment, and includes a microcomputer 181. The microcomputer 181 is a node that synchronizes with the reference time distributed from the time synchronization master in the time synchronization communication system 11, and functions as a time synchronization slave 2. The microcomputer 181 is configured by interconnecting a computation core 182, a ROM 183, a RAM 184, and an Ethernet controller 185 via a bus 186. The computation core 182 controls the overall operation of the third ECU 141 by performing computation processing. The ROM 183 is a storage area for storing various data. The RAM 184 is a storage area that functions as a work area when the computation core 182 performs the computation processing.
The Ethernet controller 185 is configured by interconnecting a timestamp section 187 and the communication port P5 via a bus 188. The timestamp section 187 includes a timer that measures a clock ts′, and records the time measured by the timer. The computation core 182 accesses the timestamp section 187 via the buses 186 and 188, reads the time recorded by the timestamp section 187, and stores the read time in the RAM 184. The communication port P5 performs data communication conforming to the Ethernet communication protocol with the communication port P3 of the Ethernet switch 161.
In the configuration in which the time synchronization master remotely controls the time synchronization bridge, the transmission control is executed using the down counter and the transmission permission flag in a case where the time synchronization master transmits the propagation delay measurement response message and the synchronization message. On the other hand, in the configuration in which the time synchronization slave remotely controls the time synchronization bridge, the transmission control is executed using the down counter and the transmission permission flag in a case where the time synchronization slave transmits the time synchronization message. In this case, for example, the delay measurement request message transmitted from the time synchronization slave corresponds to the first message and the second message.
As described above, according to the fifth embodiment, the following operational effects can be obtained. Even in the configuration in which the time synchronization slave remotely controls the time synchronization bridge in the time synchronization communication system 111, the time synchronization slave acquires the timestamp of the preceding message held in the register 164 from the time synchronization bridge before the timestamp of the subsequent message is held in the register 164, so that it is possible to avoid the occurrence of the trouble in the time management of messages in advance.
Although the configuration in which the Ethernet switch 161 is disposed separately from the microcomputer 151 in the first ECU 151 has been described above, the Ethernet switch 161 may be built in the microcomputer 151.
A sixth embodiment will be described with reference to
As illustrated in
The communication port P0 of the microcomputer 251 and the communication port P1 of the Ethernet switch 261 are connected via Ethernet 212. The communication port P2 of the Ethernet switch 261 and the communication port P4 of the microcomputer 271 are connected via Ethernet 213. The communication port P3 of the Ethernet switch 261 and the communication port P5 of the microcomputer 281 are connected via Ethernet 214.
As described above, according to the sixth embodiment, the following operational effects can be obtained. Even in the configuration in which the time synchronization master, the time synchronization bridge, and the time synchronization slaves 1 and 2 are disposed in the same ECU 221 in the time synchronization communication system 211, the time synchronization slave acquires the timestamp of the preceding message held in the register 64 from the time synchronization bridge before the timestamp of the subsequent message is held in the register 64, so that it is possible to avoid the occurrence of the trouble in the time management of messages in advance.
Although the configuration in which both the time synchronization slave 1 and the time synchronization slave 2 are disposed in the ECU 221 together with the time synchronization master and the time synchronization bridge has been exemplified above, either one of the time synchronization slave 1 and the time synchronization slave 2 may be disposed in the ECU 221 together with the time synchronization master and the time synchronization bridge. That is, some of the plurality of time synchronization slaves may be disposed in another ECU.
In addition, although the configuration in which the time synchronization master remotely controls the time synchronization bridge has been exemplified, the same applies to the configuration in which the time synchronization slave remotely controls the time synchronization bridge described in the fifth embodiment. That is, the microcomputer 151, the Ethernet switch 161, and the microcomputers 171 and 181 may be disposed in the same ECU.
A seventh embodiment will be described with reference to
As illustrated in
As described above, according to the seventh embodiment, the following operational effects can be obtained. Even in the configuration in which the general-purpose IO is omitted from the time synchronization master and the time synchronization bridge in the time synchronization communication system 311, the time synchronization slave acquires the timestamp of the preceding message held in the register 64 from the time synchronization bridge before the timestamp of the subsequent message is held in the register 64, so that it is possible to avoid the occurrence of the trouble in the time management of messages in advance.
Although the configuration in which the time synchronization master remotely controls the time synchronization bridge has been exemplified, the same applies to the configuration in which the time synchronization slave remotely controls the time synchronization bridge described in the fifth embodiment. That is, the general-purpose IO 155 may be omitted from the microcomputer 151 and the general-purpose IO 162 may be omitted from the Ethernet switch 161, unlike the fifth embodiment.
An eighth embodiment will be described with reference to
As illustrated in
The communication port P0 of the microcomputer 451 and the communication port P1 of the Ethernet switch 461 are connected via Ethernet 412. The communication port P3 of the Ethernet switch 461 and a communication port P1″ of the Ethernet switch 462 are connected in cascade via Ethernet 413. The communication port P2 of the Ethernet switch 461 and the communication port P4 of the microcomputer 471 are connected via Ethernet 414. A communication port P2′ of the Ethernet switch 462 and the communication port P5 of the microcomputer 481 are connected via Ethernet 415. A communication port P3′ of the Ethernet switch 462 and a communication port P6 of the microcomputer 501 are connected via Ethernet 416.
The microcomputer 451 functioning as a time synchronization master remotely controls the Ethernet switch 461 functioning as a time synchronization bridge 1 and remotely controls the Ethernet switch 462 functioning as a time synchronization bridge 2. In the above configuration, the propagation delay time between the time synchronization master and the time synchronization bridge 1, the propagation delay time between the time synchronization slave 1 and the time synchronization bridge 1, the propagation delay time between the time synchronization slaves 2 and 3 and the time synchronization bridge 2, and the propagation delay time between the time synchronization bridge 1 and the time synchronization bridge 2 are calculated.
As described above, according to the eighth embodiment, the following operational effects can be obtained. Even in the configuration in which the plurality of time synchronization bridges are arranged in the time synchronization communication system 411, the time synchronization slave acquires the timestamp of the preceding message held in the register 64 from the time synchronization bridge before the timestamp of the subsequent message is held in the register 64, so that it is possible to avoid the occurrence of the trouble in the time management of messages in advance.
Although the configuration in which the time synchronization master remotely controls the time synchronization bridges 1 and 2 has been exemplified, the same applies to the configuration in which the time synchronization slave remotely controls the plurality of time synchronization bridges described in the fifth embodiment. That is, the first ECU 121 described in the fifth embodiment may include the time synchronization slave 1 and the time synchronization bridges 1 and 2, and the time synchronization bridges 1 and 2 may be connected in cascade.
A ninth embodiment will be described with reference to
As illustrated in
The third ECU 541 includes an Ethernet switch 581 and microcomputers 582 and 583. The Ethernet switch 581 includes a timestamp section 584 that records the time by a timer that measures a clock tbr′, and functions as the time synchronization bridge 2. The microcomputer 582 includes a timestamp section 585 that records the time by a timer that measures the clock ts′, and functions as the time synchronization slave 2. The microcomputer 583 includes a timestamp section 586 that records the time by a timer that measures the clock ts″, and functions as the time synchronization slave 3.
The communication port P0 of the microcomputer 551 and the communication port P1 of the Ethernet switch 561 are connected via Ethernet 512. The communication port P2 of the Ethernet switch 561 and the communication port P4 of the microcomputer 571 are connected via Ethernet 513. The communication port P3 of the Ethernet switch 561 and the communication port P5 of the Ethernet switch 581 are connected via Ethernet 514. The communication port P6 of the Ethernet switch 581 and a communication port P8 of the microcomputer 582 are connected via Ethernet 515. A communication port P7 of the Ethernet switch 581 and a communication port P9 of the microcomputer 583 are connected via Ethernet 516.
The time synchronization master does not recognize the presence of the time synchronization slaves 2 and 3 and handles the time synchronization bridge 2 as a time synchronization slave, thereby distributing the reference time to the time synchronization bridge 2. The time synchronization bridge 2 acts as the time synchronization master in the third ECU 541 to distribute the reference time distributed from the time synchronization master to the time synchronization slaves 2 and 3.
As described above, according to the ninth embodiment, the following operational effects can be obtained. Even in the configuration in which the time synchronization bridges 1 and 2 are arranged in different ECUs in the time synchronization communication system 511, the time synchronization slave acquires the timestamp of the preceding message held in the register 64 from the time synchronization bridge before the timestamp of the subsequent message is held in the register 64, so that it is possible to avoid the occurrence of the trouble in the time management of messages in advance.
Although the present disclosure has been described in accordance with examples, it is understood that the present disclosure is not limited to the examples and structures. The present disclosure also includes various modifications and modifications within an equivalent range. In addition, various combinations and modes, and other combinations and modes including only one element, more elements, or less elements are also within the scope and idea of the present disclosure.
In the configuration in which the time synchronization master remotely controls the time synchronization bridge, transmission control may be executed using time synchronization messages other than the propagation delay measurement response message and the time synchronization message transmitted by the time synchronization master as the first message and the second message. In the configuration in which the time synchronization slave remotely controls the time synchronization bridge, transmission control may be executed using time synchronization messages other than the propagation delay measurement request message transmitted by the time synchronization slave as the first message and the second message.
Although the configuration in which the time synchronization master or the time synchronization slave and the time synchronization bridge are connected via Ethernet has been exemplified, a communication network other than Ethernet may be adopted, and the time synchronization master or the time synchronization slave and the time synchronization bridge may be connected via, for example, a controller area network (CAN) (registered trademark) or FlexLay (registered trademark). Alternatively, a plurality of Ethernet, CAN, and FlexLay may be combined.
The data communication system for a vehicle mounted on a vehicle is exemplified, and the microcomputer or the Ethernet switch built in the ECU is exemplified as a node. However, the present disclosure may be applied to a data communication system other than in-vehicle use.
The control section and the method thereof described in the present disclosure may be implemented by a dedicated computer provided by configuring a processor and a memory programmed to execute one or a plurality of functions embodied by a computer program. Alternatively, the control section and the method thereof described in the present disclosure may be implemented by a dedicated computer provided by configuring a processor with one or more dedicated hardware logic circuits. Alternatively, the control section and the method thereof described in the present disclosure may be implemented by one or more dedicated computers configured by a combination of a processor and a memory programmed to execute one or a plurality of functions and a processor configured with one or more hardware logic circuits. The computer program may be stored in a computer-readable non-transition tangible recording medium as an instruction executed by a computer.
Number | Date | Country | Kind |
---|---|---|---|
2022-166941 | Oct 2022 | JP | national |