WO2009088005A1 - 車載用の中継接続ユニット - Google Patents

車載用の中継接続ユニット Download PDF

Info

Publication number
WO2009088005A1
WO2009088005A1 PCT/JP2009/050064 JP2009050064W WO2009088005A1 WO 2009088005 A1 WO2009088005 A1 WO 2009088005A1 JP 2009050064 W JP2009050064 W JP 2009050064W WO 2009088005 A1 WO2009088005 A1 WO 2009088005A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
communication line
transmission
reception
time
Prior art date
Application number
PCT/JP2009/050064
Other languages
English (en)
French (fr)
Inventor
Yoshikazu Isoyama
Shigeo Hayashi
Original Assignee
Autonetworks Technologies, Ltd.
Sumitomo Wiring Systems, Ltd.
Sumitomo Electric Industries, Ltd.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Autonetworks Technologies, Ltd., Sumitomo Wiring Systems, Ltd., Sumitomo Electric Industries, Ltd. filed Critical Autonetworks Technologies, Ltd.
Priority to US12/745,587 priority Critical patent/US8284821B2/en
Priority to DE112009000087.8T priority patent/DE112009000087B8/de
Publication of WO2009088005A1 publication Critical patent/WO2009088005A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/4013Management of data rate on the bus
    • H04L12/40136Nodes adapting their rate to the physical link properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • H04L12/4625Single bridge functionality, e.g. connection of two networks over a single bridge
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Definitions

  • the present invention relates to an in-vehicle relay connection unit, and more particularly, when the transmission speed of a communication line connected to the relay connection unit is different and the transmission speed on the transmission side is faster than the transmission speed on the reception side, the entire message is displayed. It is intended to enable reliable and efficient transmission.
  • an electronic control unit (Electronic Control Unit: ECU) that controls a vehicle-mounted device is connected by a communication line, and the communication lines are connected to each other via a relay connection unit (gateway device) to belong to different communication lines.
  • An in-vehicle communication system that relays messages transmitted and received between the relay connection units is employed.
  • the relay connection unit When the relay connection unit receives a message from the ECU connected to the communication line, the relay connection unit relays the message to another communication line that is a relay transmission destination of the message.
  • the relay connection unit includes a routing map that describes the correspondence between the message identifier of the received message and the communication line connected to the transmission destination ECU for relay transmission.
  • the relay connection unit receives the message, reads the message identifier, refers to the routing map, determines the destination communication line corresponding to the message identifier, and transmits the message to the identified destination communication line. .
  • a cut-through method is known as described in JP-A-9-162917 (Patent Document 1).
  • the cut-through method as shown in FIG. 8, when the relay connection unit receives a message from the communication line (reception source bus) and receives up to the arbitration field (ID) in which the message identifier is written in the message tb
  • ID the arbitration field
  • a routing destination communication line (transmission destination bus) corresponding to the message identifier is identified with reference to the routing map, and transmission to the communication line is started. Since transmission to the communication line is started without receiving the message to the end, transmission starts after message reception is started, compared to the store and forward method which starts transmission after receiving the message to the end. The time until this is shortened, and the relay processing can be speeded up.
  • the relay connection unit when the relay connection unit is performing message relay processing by the cut-through method, for example, as shown in FIG. 9, the relay connection unit has received from the communication line (bus) of the reception source at a transmission rate of 250 kpbs.
  • the message receiving speed is slower than the sending speed, so the data of the message to be sent cannot be received, There is a problem that there is a state where there is no data to be transmitted.
  • the relay connection unit interrupts the relay process as an error, and an error occurs on the bus, which becomes a problem.
  • the present invention has been made in view of the above problems, and a message received from a communication line on the reception side by the relay connection unit is cut to a transmission line on the transmission side that is faster than the communication line on the reception side. It is an object to prevent the occurrence of a state where there is no data to be transmitted when relaying, and to efficiently transmit a message.
  • the present invention is configured to connect a message received from an electronic control unit connected to each of a plurality of first CAN communication lines to a second CAN communication line having a higher transmission speed than the first CAN communication line.
  • An in-vehicle relay connection unit that relays to an electronic control unit by a cut-through method, A transmission / reception unit connected to the first CAN communication line and the second CAN communication line; A relay processing unit connected to the transmission / reception unit; In the relay processing unit, with respect to messages received simultaneously from the plurality of first CAN communication lines, reception of the control field is completed between the message that has completed the reception of the control field earliest among these messages and another message.
  • An in-vehicle relay connection unit is provided that is relayed to the second CAN communication line first.
  • the relay processing unit first performs the second CAN communication line.
  • the relay of the message to the second CAN communication line is started after the transmission waiting time elapses after the reception of the control field of the message to be relayed to is completed.
  • the transmission waiting time is (reception time necessary for completing reception of the remaining number of bits of each message-transmission time necessary for transmitting the total number of bits of the message to the second CAN communication line).
  • the relay connection unit completes the reception of the message from the first CAN communication line, the transmission of the message to the second CAN communication line is not completed. For this reason, when the relay connection unit relays the message received from the first CAN communication line to the second CAN communication line having a higher transmission speed than the first CAN communication line by the cut-through method, there is no data to be transmitted. It can be prevented from occurring.
  • the relay connection unit since the relay connection unit simultaneously receives messages from the plurality of first CAN communication lines and relays these messages to the second CAN communication line, which of the received messages has priority over the second CAN. It is necessary to determine whether to transmit to the communication line. Generally, the transmission order is determined according to the order in which the relay connection unit receives the messages and the priority order determined for each message. However, when a message having a transmission latency longer than that of other messages is first transmitted to the second CAN communication line from the time when reception of the control field is completed, the message having a shorter transmission latency is the transmission latency. The transmission waiting time may be wasted because transmission must be waited until the elapse of time.
  • the control field reception completion time t1 of the message that has completed the reception of the control field earliest to the completion of reception of the control field of another message In addition to obtaining the time difference, the transmission waiting time from the completion of reception of the control field is obtained for each message. Further, a sum of the transmission waiting time and the time difference at the completion of the reception, which is a time necessary for starting the transmission of the message with reference to the reception completion time t1, is obtained for each message, and a message having a small sum of the time differences is firstly Relay transmission to the second CAN communication line.
  • the message having the shortest time required for the start of message transmission is relayed and transmitted to the second CAN communication line first with reference to the reception completion time t1 of the control field of the message whose control field has been received earliest.
  • the relay connection unit since there is no waste of transmission waiting time, when the relay connection unit receives messages from a plurality of first CAN communication lines at the same time, relay transmission of all messages to the second CAN communication line can be completed quickly. And relaying with improved time efficiency can be performed.
  • the relay processing unit obtains the sum of the transmission waiting time and the time difference at the completion of reception for each message.
  • the transmission waiting time is a negative value
  • the transmission waiting time is set to zero, and the sum of the transmission waiting time and the time difference at the completion of reception is obtained.
  • the time difference at the completion of reception is zero for the message whose reception of the control field is completed earliest.
  • the transmission speed of the first CAN communication line or the second CAN communication line is 125 kbps, 250 kbps, 500 kbps, and 1 Mbps. These are transmission rates generally used in CAN.
  • the relay connection unit of the present invention when the relay connection unit receives messages from a plurality of first CAN communication lines at the same time and the relay destination of these messages is the second CAN communication line, the reception is performed. Among the messages being transmitted, the messages in the transmission order are started to be transmitted after being delayed by the transmission waiting time from the time when reception of the control field is completed. Thereby, when the relay connection unit completes the reception of the message from the first CAN communication line, the message transmission to the second CAN communication line is not completed, and the relay connection unit has received from the first CAN communication line.
  • the second CAN communication line which has a higher transmission speed than the first CAN communication line, by a cut-through method, it is possible to prevent a situation where there is no data to be transmitted.
  • (B) is explanatory drawing in the case of starting relay transmission in the order which received the message. is there. It is the figure which showed the number X of transmission waiting bits with respect to transmission rate ratio and the data length of a data field.
  • the in-vehicle relay connection unit 10 is connected to the first communication line 31A, the first communication line 31B, and the second communication line 32
  • the ECU 30A is connected to the first communication line 31A
  • the ECU 30B is connected to the first communication line 31B
  • the communication system 20 is configured by connecting the ECU 30C to the two communication lines 32, and relays the message m transmitted and received between the ECUs 30 belonging to different communication lines.
  • the communication protocol is CAN (Controller Area Network).
  • the transmission speed of the second communication line 32 is higher than that of the first communication line 31A and the first communication line 31B. In this embodiment, the transmission speeds of the first communication line 31A and the first communication line 31B are the same. Yes. The transmission speeds of the first communication line 31A and the first communication line 31B may be different.
  • the relay connection unit 10 receives the message mA from the ECU 30A connected to the first communication line 31A and the message mB from the ECU 30B connected to the first communication line 31B at the same time, and receives these messages mA and mB as the second communication line. 32 is relayed by the cut-through method.
  • the relay connection unit 10 includes a relay processing unit 11, transmission / reception units 12A, 12B, and 12C, and a storage unit 13.
  • the relay processing unit 11 is connected to the transmission / reception units 12A, 12B, and 12C and to the storage unit 13.
  • the identifier ID
  • the second communication line 32 which is the relay transmission destination of the message m is determined from the ID using a routing map.
  • the relay processing unit 11 obtains the transmission waiting time TX from the transmission waiting bit number X described later for the messages mA and mB received at the same time, and receives the control field 43 earliest among these messages mA and mB.
  • a time difference Tdiff when the reception of the control field 43 is completed is obtained between the completed message m and another message m. Further, which of the messages mA and mB is to be transmitted to the second communication line 32 first is determined from the time difference Tdiff and the transmission waiting time TX. How to determine the message m to be transmitted will be described later.
  • the transmission waiting bit number X is counted at the transmission speed of the communication line 31 that has received the message m. Relay transmission of message m has started. The remaining messages m of the messages mA and mB are transmitted after the transmission of the previously transmitted message m is completed.
  • the storage unit 13 stores a table T in which the number X of transmission waiting bits is described.
  • the table T includes a transmission speed ratio R, that is, (transmission speed of the second communication line 32 / transmission speed of the first communication line 31A) or (transmission speed of the second communication line 32 / transmission of the first communication line 31B). Speed) and the transmission wait bit number X with respect to the data length of the data field 44 of the message m. Details of the table T will be described later.
  • the storage unit 13 stores a routing map for relay processing of the relay processing unit 11.
  • the transmission / reception unit 12A is connected to the first communication line 31A
  • the transmission / reception unit 12B is connected to the first communication line 31B
  • the transmission / reception unit 12C is connected to the second communication line 32.
  • the transmission / reception unit 12 transmits / receives the message m via each communication line.
  • the relay connection unit 10 includes a microcomputer (not shown) and a CAN controller (not shown).
  • the microcomputer CPU constitutes the relay processing unit 11
  • the microcomputer ROM or RAM constitutes the storage unit 13.
  • the CAN controller constitutes a transmission / reception unit 12.
  • the relay processing unit 11 may be configured by hardware such as a relay connection unit LSI.
  • the frame of the message m has a start of frame (SOF) field 41 indicating the start of the message frame, an arbitration field 42 storing a message m identifier (ID), and a data field 44 from the upper bits.
  • the control field 43 stores the data length (DLC) and the data field 44 indicating the content (data) of the message m to be transmitted / received.
  • the message m conforms to the CAN protocol and has a standard format. Therefore, the arbitration field 42 is defined as 12 bits, the control field 43 is defined as 6 bits, and the SOF field 41 is defined as 1 bit, and the data length of the data field 44 is different for each message m.
  • the control field 43 stores the data length of the data field 44 in units of bytes.
  • the relay connection unit 10 has completed reception of the arbitration field 42 and the control field 43, and the data field 44 is continuously received.
  • the relay processing unit 11 receives the second communication line from the time when the transmission waiting bit number X has elapsed at the transmission speed of the first communication line 31A from the completion of reception of the control field 43, that is, after the transmission waiting time TX has elapsed.
  • transmission of the message m is started.
  • the transmission waiting bit number X is set so that the transmission of the message m to the second communication line 32 is not completed at t2. ing. That is, the transmission waiting bit number X is set so that the reception time t2 of the message m received from the first communication line 31A is earlier than the transmission time t3 of the message m transmitted to the second communication line 32.
  • the number X of transmission waiting bits means that, as shown in FIG. 3, the relay connection unit 10 receives the message mA from the first communication line 31A and the second communication line 32 from t1 when the reception of the control field 43 is completed. The number of bits X until the relay of the message m is started.
  • the relay processing unit 11 counts the transmission waiting bit number XA by counting the number of bits of the message mA received from the first communication line 31A. For example, when the transmission waiting bit number XA is 10 bits, the relay processing unit 11 counts 10 bits of the message m received from the first communication line 31A from the time t1 when reception of the control field 43 is completed as shown in FIG. After that, the relay of the message mA on the second communication line 32 is started.
  • the transmission waiting time TXA is defined as the time during which the transmission waiting bit number XA elapses at the transmission speed of the first communication line 31A. When the transmission waiting time becomes a negative value, the transmission waiting time is set to zero.
  • the relay connection unit 10 receives the message mB from the first communication line 31B, and the bit number X from the time t1 when the reception of the control field 43 is completed until the relay of the message mB to the second communication line 32 is started.
  • a transmission waiting bit number XB is assumed, and a transmission waiting time TXB is a time during which the transmission waiting bit number XB elapses at the transmission speed of the first communication line 31B.
  • the completion time t1 of the reception of the control field 43 of the message mA from the first communication line 31A is earlier than the completion time ta of the reception of the control field 43 of the message mB from the first communication line 31B.
  • the completion time t1 of the reception of the control field 43 of the message mA from the first communication line 31A is earlier than the completion time ta of the reception of the control field 43 of the message mB from the first communication line 31B.
  • the relay processing unit 11 calculates the transmission waiting time TXA of the message mA received from the first communication line 31A after the completion of reception of the control field 43 of the message mA t1.
  • the transmission waiting time TXA is obtained by (number of transmission waiting bits XA of the message mA / transmission speed of the first communication line 31A).
  • a transmission waiting time TXB is calculated after completion of reception ta of the control field 43 of the message mB from the first communication line 31B.
  • the transmission waiting time TXB is obtained by (number of transmission waiting bits XB of the message mB / transmission speed of the first communication line 31B).
  • a time difference Tdiff at the time when reception of the control field is completed is obtained between the message that has completed reception of the control field earliest and another message.
  • the reception time difference Tdiff is calculated from the time t1 when the reception of the control field 43 of the message mA is completed and the time ta when the reception of the control field 43 of the message mB is completed.
  • the time required to transmit the message (transmission waiting time TX + reception time difference Tdiff) is obtained with reference to the completion time t1 of reception of the control field 43 of the message mA. Since the message mA received from the first communication line 31A is a message for which reception of the control field has been completed earlier, the reception time difference Tdiff becomes zero, and relaying to the second communication line 32 can be started after the transmission waiting time TXA. On the other hand, the message mB received from the first communication line 31B can start relaying after (transmission waiting time TXB + reception time difference Tdiff). At this time, the length of (transmission waiting time TXA ⁇ reception time difference Tdiff) is compared with the length of the transmission waiting time TXB.
  • the message mB When the message mB is transmitted to the second communication line 32 first, and the transmission waiting time TXB is longer than (transmission waiting time TXA ⁇ reception time difference Tdiff), the message mA is preceded by the message mB. Send to. Further, the length of (transmission waiting time TXB + reception time difference Tdiff) is compared with the length of the transmission waiting time TXA. If the (transmission waiting time TXB + reception time difference Tdiff) is longer than the transmission waiting time TXA, the message mA is sent to the second communication line 32 before the message mB. Also good.
  • the relay connection unit 10 when the relay connection unit 10 is simultaneously receiving the message m from the first communication line 31A and the first communication line 31B, the time when the reception of the control field 43 is completed sooner of any message m is determined. Based on the reference time, the time required from the reference time until each message m can be relayed to the second communication line 32 is calculated, and the relay starts from the message m with the short time.
  • FIG. 5A is an explanatory diagram for transmitting the message mB to the second communication line 32 before the message mA when the transmission waiting time TXB is shorter than (transmission waiting time TXA ⁇ reception time difference Tdiff).
  • FIG. 5B is an explanatory diagram when the messages are transmitted to the second communication line 32 in the order in which the relay processing unit 11 receives the messages, regardless of the present method.
  • the case where the messages are received in the order of the message mA of the first communication line A and the message mB of the first communication line B is described.
  • the relay processing unit 11 transmits the transmission waiting time TXB from the time ta when reception of the control field 43 of the message mB is completed, that is, from the time t1 when reception of the control field 43 of the message mA is completed (transmission).
  • the message mB is transmitted to the second communication line 32 after the waiting time TXB + reception time difference Tdiff).
  • the total delay time from the time t2 when the reception of the message mA from the first communication line 31A is completed to the time t4 when the relay transmission of the message mA and the message mB to the second communication line 32 is completed is shown in FIG. ) From the time t2 when the reception is completed to the time t5, and the relay transmission of the message m is completed earlier.
  • a method of obtaining the number X of transmission waiting bits will be described by taking as an example a case where the message mA received from the first communication line 31A is relayed to the second communication line 32.
  • the transmission waiting bit number X is set so that the time t2 when the message m received from the first communication line 31A is completed is earlier than the time t3 when the message m transmitted to the second communication line 32 is completed. It is set. Therefore, (the time TA required to receive the data field 44) should be smaller than (the transmission time TX + the time TB required to transmit the total number of bits of the message m to the second communication line 32). .
  • the time TA required to receive the data field 44 is obtained by the number of bits of the data field 44 / the transmission speed of the first communication line 31A.
  • the transmission waiting time TX is determined by the number of transmission waiting bits X / the transmission speed of the first communication line 31A, considering the transmission speed of the first communication line 31A as a reference.
  • the time TB required to transmit the total number of bits of the message m to the second communication line 32 is obtained by the total number of bits of the message m / the transmission rate of the second communication line 32.
  • the transmission rate ratio R is the transmission rate of the second communication line 32 / the transmission rate of the first communication line 31A.
  • the data length (number of bits) of the data field 44 is read from the control field 43. Since the data length is expressed in bytes and one byte is 8 bits, when the read value is n, the data length (number of bits) of the data field 44 is 8 ⁇ n bits.
  • the total number of bits of the message m is the sum of the number of bits in the SOF field 41, the arbitration (ID) field 42, the control (DLC) field 43, and the data field 44.
  • the arbitration field 42 is defined as 12 bits
  • the control field 43 is defined as 6 bits
  • the SOF is defined as 1 bit
  • the total is 19 bits
  • the data length of the data field 44 is 8 ⁇ n bits. Therefore, the total number of bits of the message m is (19 + 8 ⁇ n) bits.
  • the transmission speed of the first communication line 31A and the second communication line 32 is any one of 125 kbps, 250 kbps, 500 kbps, and 1 Mbps, and the first communication line 31A has a transmission speed slower than that of the second communication line 32.
  • the transmission rate ratio R is any one of 2, 4, and 8.
  • stuff bits are also inserted into the arbitration field 42 and the control field 43.
  • the total number of bits of the message m is increased, the total number of bits of the message m transmitted to the second communication line 32 is increased, and the message m is transmitted to the second communication line 32 of the relay connection unit 10.
  • t3 is further delayed.
  • the time t2 when the reception of the message m received from the first communication line 31A is completed is set to be earlier than the time t3 when the transmission of the message m transmitted to the second communication line 32 is completed.
  • the total number of bits becomes long, the calculation of the transmission waiting bit number X is not affected. Therefore, in the present embodiment, only stuff bits inserted in the data field 44 are considered.
  • the number X of transmission waiting bits is (the number of bits in the data field 44 ⁇ the total number of bits of the message m / the transmission rate ratio R), and is represented by the equation (1).
  • X (8 ⁇ n ⁇ S) ⁇ (19 + 8 ⁇ n ⁇ S) / R
  • the transmission wait bit number X is a function of the transmission rate ratio R and the number of bits in the data field 44.
  • the transmission rate ratio R has a value of 2, 4, or 8, and the data length of the data field 44 is represented by 8 ⁇ n bits, that is, n bytes.
  • the data field 44 takes a value from 0 to 8 bytes. Therefore, when the transmission waiting bit number X is calculated from the transmission rate ratio R and the number of bytes of the data length of the data field 44, a table T shown in FIG.
  • the waiting bit number X is 10 bits from FIG.
  • the table T is calculated in advance and stored in the storage unit 13.
  • the transmission speed ratio RB obtained by (speed / transmission speed of the first communication line 31B) is obtained by the equation (1).
  • the relay connection unit 10 receives the messages mA and mB simultaneously from the first communication line 31A and the first communication line 31B.
  • the relay processing unit 11 reads the ID of the message m and refers to the routing map in the storage unit 13 to determine the relay transmission destination communication line.
  • the second communication line 32 is the transmission destination for both the messages mA and mB.
  • the transmission speed ratio RA is obtained from the transmission speed of the first communication line 31A as the reception source and the transmission speed of the second communication line 32 as the transmission destination.
  • the transmission rate ratio RB is obtained from the transmission rate of the first communication line 31B as the reception source and the transmission rate of the second communication line 32 as the transmission destination.
  • Each transmission rate ratio RA, RB may be stored in advance, or the transmission rate of each communication line may be stored and calculated each time the message m is received.
  • the relay processing unit 11 refers to the table T of the storage unit 13 and reads the transmission waiting bit number XA from the number of bytes n of the data field 44 and the transmission rate ratio RA, and (the transmission waiting bit number XA / number of message mA).
  • the transmission waiting time TXA is calculated from the transmission speed of one communication line 31A.
  • the relay processing unit 11 When the reception of the control field 43 of the message mB is completed, the relay processing unit 11 reads the number of bytes n that is the data length of the data field 44 from the control field 43, refers to the table T of the storage unit 13, and The number XB of transmission waiting bits is read from the number of bytes n and the transmission rate ratio RB, and the transmission waiting time TXB is calculated from (the number of transmission waiting bits XB of the message mB / the transmission rate of the first communication line 31B).
  • the relay processing unit 11 calculates a reception time difference Tdiff from the completion time t1 of reception of the control field 43 of the message mA and the completion time ta of reception of the control field 43 of the message mA, and (the transmission waiting time TXA ⁇ reception of the message mA) Time difference Tdiff) is obtained.
  • the arithmetic processing unit compares (transmission waiting time TXA ⁇ reception time difference Tdiff) with the transmission waiting time TXB of the message mB.
  • transmission waiting time TXA ⁇ reception time difference Tdiff When (transmission waiting time TXA ⁇ reception time difference Tdiff) is shorter, the relay processing unit 11 transmits the message mA from the first communication line 31A from the time t1 when reception of the control field 43 of the message mA is completed. After counting the number XA, the relay of the message mA on the second communication line 32 is started. Note that (message mB transmission waiting time TXB + reception time difference Tdiff) may be calculated and compared with the message mA transmission waiting time TXA.
  • the message mA is transmitted to the second communication line 32 before the message mB.
  • the relay transmission of the message mB is started.
  • the relay processing unit 11 determines whether or not the waiting time from when the reception of the control field 43 of the message mB is completed until the actual transmission of the message mB starts exceeds the transmission waiting time TXB of the message mB. Is checking. If not exceeded, relaying is started after elapse of the transmission waiting time TXB.
  • the relay processing unit 11 transmits the message mB from the first communication line 31B from the time ta when the reception of the control field 43 of the message mB is completed for the transmission waiting bit number XB. After counting, relaying of the message mB to the second communication line 32 is started. After the relay transmission of the message mB is completed, the waiting time from the time t1 when the reception of the control field 43 of the message mA is completed to the actual transmission of the message mA exceeds the transmission waiting time TXA of the message mA. Whether the message mA is relayed or not is started.
  • the relay connection unit 10 when the relay connection unit 10 simultaneously receives the message m from the plurality of first communication lines 31 and the relay destination of these messages m is the second communication line 32, The message m, which is the transmission order, is started to be transmitted after being delayed by the transmission waiting time TX from the time when reception of the control field 43 is completed.
  • the relay connection unit 10 completes the reception of the message m from the first communication line 31, the transmission of the message m to the second communication line 32 is not completed, and the relay connection unit 10 To prevent a situation in which there is no data to be transmitted when the message m received from the communication line 31 is relayed to the second communication line 32 having a higher transmission speed than the first communication line 31 by the cut-through method. Can do.
  • the message m is transmitted with reference to the reception completion time t1 of the control field 43 of the message m that has been received first from the plurality of first communication lines 31 at the same time.
  • the message m is simultaneously received from the two first communication lines 31A and 31B whose transmission speed is slower than that of the second communication line 32.
  • the message m is simultaneously received from three or more first communication lines 31.
  • the message m may be received.
  • the reception of the control field 43 of the message mC is completed if no message has been transmitted yet, it is determined whether the message mA or the message mC is transmitted first, and the message By determining which of mB and message mC is transmitted first, the transmission order of messages mA, mB, and mC is determined. If transmission of any one of the messages mA or mB has already started, it is determined which of the messages mA and mB is to be transmitted first.
  • the table T may not be stored in the storage unit 13, and the transmission waiting bit number X may be calculated from the number of bytes in the data field 44 and the transmission rate ratio R every time the message m is received.
  • the storage unit 13 does not have the table T, and every time the relay processing unit 11 receives the message m, the second communication line 32 indicates the time TA necessary for receiving the data field 44 and the total number of bits of the message m.
  • the transmission waiting time TX is obtained from the time TB required for transmission to the transmission field, and the transmission waiting time TX corresponding to the number X of transmission waiting bits at the transmission speed of the first communication line 31A has elapsed since the reception of the control field 43 is completed. After that, the relay of the message m may be started on the second communication line 32.
  • the CAN message m is a standard format, but an extended format may be used.
  • the arbitration field 42 is defined as 32 bits
  • the control field 43 is defined as 6 bits
  • the SOF field is defined as 1 bit.
  • Number / transmission rate ratio R) (8 ⁇ n ⁇ S) ⁇ (39 + 8 ⁇ n ⁇ S) / R.
  • the transmission waiting bit number X is calculated from the transmission rate ratio R and the number of bytes in the data field 44, a table T shown in FIG.
  • symbol is attached

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Small-Scale Networks (AREA)

Abstract

 受信元の通信線よりも伝送速度の速い送信先の通信線にカットスルー方式でメッセージを中継するときに、送信すべきデータが無い状態が発生することを防き、効率良くメッセージを中継送信する。複数の第1CAN通信線31A,31Bから受信したメッセージmを、第1CAN通信線よりも伝送速度の速い第2CAN通信線32にカットスルー方式で中継する車載用の中継接続ユニット10であって、中継処理部11では、第1CAN通信線から同時に受信したメッセージについて、最も早くコントロールフィールド43の受信が完了したメッセージと他のメッセージとの間でコントロールフィールド受信完了時の時間差Tdiffと、各メッセージについてコントロールフィールドの受信が完了した時点からの送信待ち時間TXとを求め、送信待ち時間と受信完了時の時間差の和が小さいメッセージを最初に第2CAN通信線へ中継開始させる。

Description

車載用の中継接続ユニット
 本発明は、車載用の中継接続ユニットに関し、詳しくは、中継接続ユニットに接続された通信線の伝送速度が相違し、受信側の伝送速度より送信側の伝送速度が早い場合に、メッセージ全体を確実に且つ効率よく送信ができるようにするものである。
 従来、車両搭載機器を制御する電子制御ユニット(Electronic Control Unit:ECU)を通信線で接続し、該通信線同士を中継接続ユニット(ゲートウェイ装置)を介して接続して、異なる通信線に属するECU間で送受信されるメッセージを該中継接続ユニットで中継する車載用通信システムが採用されている。
 中継接続ユニットは、通信線に接続されたECUからのメッセージを受信すると、該メッセージの中継送信先である他の通信線にメッセージを中継している。
 詳細には、中継接続ユニットは、該受信したメッセージのメッセージ識別子と中継送信する送信先のECUを接続した通信線との対応を記載したルーティングマップを備えている。中継接続ユニットはメッセージを受信してメッセージ識別子を読み込み、前記ルーティングマップを参照して該メッセージ識別子と対応する送信先の通信線を判別し、特定した送信先の通信線にメッセージを送信している。
 前記中継接続ユニットの中継処理の方法として、例えば、特開平9-162917号公報(特許文献1)に記載されているように、カットスルー方式が知られている。
 カットスルー方式は、図8に示すように、中継接続ユニットが、通信線(受信元バス)からメッセージを受信し、メッセージのうちメッセージ識別子が書き込まれたアービトレーションフィールド(ID)までを受信した時点tbで、ルーティングマップを参照して該メッセージ識別子に対応する中継先の通信線(送信先バス)を判別し、該通信線に送信を開始する方式である。メッセージを最後まで受信せずに通信線に送信を開始しているので、メッセージを最後まで受信してから送信を開始するストア&フォワード方式に比べて、メッセージの受信を開始してから送信を開始するまでの時間が短くなり、中継処理を高速化することができる。
 しかし、中継接続ユニットがカットスルー方式でメッセージの中継処理を行っている場合に、例えば、図9に示すように、中継接続ユニットが250kpbsの伝送速度で受信元の通信線(バス)から受信したメッセージを、500kbpsの伝送速度で送信先の通信線(バス)に送信しているときには、メッセージを受信する速度が送信する速度よりも遅いため、送信すべきメッセージのデータが受信できておらず、送信すべきデータが無い状態が発生するという問題がある。
 このように送信すべきデータが無い状態が発生すると、中継接続ユニットはエラーとして中継処理を中断し、バス上にエラーが発生し、問題となる。
特開平9-162917号公報
 本発明は、前記問題に鑑みてなされたもので、中継接続ユニットが受信側の通信線から受信したメッセージを、受信側の通信線よりも伝送速度の速い送信側の通信線にカットスルー方式で中継するときに、送信すべきデータが無い状態が発生することを防ぐと共に、効率よくメッセージの送信を行うことを課題としている。
 前記課題を解決するため、本発明は、複数の第1CAN通信線に夫々接続された電子制御ユニットから受信したメッセージを、前記第1CAN通信線よりも伝送速度の速い第2CAN通信線に接続された電子制御ユニットにカットスルー方式で中継する車載用の中継接続ユニットであって、
 前記第1CAN通信線と第2CAN通信線と接続された送受信部と、
 前記送受信部と接続した中継処理部を備え、
 前記中継処理部では、前記複数の第1CAN通信線から同時に受信したメッセージについては、これらのメッセージのうちで最も早くコントロールフィールドの受信が完了したメッセージと他のメッセージとの間のコントロールフィールドの受信完了時の時間差と、メッセージ毎にコントロールフィールドの受信が完了した時点からの送信待ち時間から、各メッセージについて前記送信待ち時間と前記受信完了時の時間差の和を求め、該時間差の和が小さいメッセージを最初に前記第2CAN通信線へ中継させることを特徴とする車載用の中継接続ユニットを提供している。
 前記構成によれば、中継接続ユニットが複数の第1CAN通信線から同時にメッセージを受信し、これらメッセージの中継送信先が第2CAN通信線の場合、前記中継処理部は、最初に前記第2CAN通信線へ中継させる前記メッセージのコントロールフィールドの受信が完了した時点から前記送信待ち時間経過後に、該メッセージの前記第2CAN通信線への中継を開始させる。
 送信待ち時間は、(前記各メッセージの残りのビット数の受信を完了するために必要な受信時間―前記メッセージの全ビット数を前記第2CAN通信線に送信するために必要な送信時間)としている。
 これにより、中継接続ユニットが第1CAN通信線からメッセージの受信を完了した時点では、第2CAN通信線へのメッセージの送信は完了していない状態となる。
 このため、中継接続ユニットは、第1CAN通信線から受信したメッセージを、第1CAN通信線よりも伝送速度の速い第2CAN通信線にカットスルー方式で中継するときに、送信すべきデータが無い状態が発生することを防ぐことができる。
 このとき、中継接続ユニットが複数の第1CAN通信線から同時にメッセージを受信し、これら複数のメッセージを第2CAN通信線に中継送信するため、受信しているメッセージのうちどのメッセージを優先して第2CAN通信線に送信するかを定める必要がある。
 一般的には、中継接続ユニットがメッセージを受信した順や、メッセージ毎に定められた優先順位に従って送信順序が定められる。
 しかし、コントロールフィールドの受信が完了した時点からの送信待ち時間が他のメッセージより長いメッセージが最初に第2CAN通信線に送信されるような場合には、送信待ち時間が短いメッセージは該送信待ち時間が経過するまで送信を待たねばならず、送信待ち時間が無駄となることがある。
 本発明では、複数の第1CAN通信線から同時に受信したメッセージのうち、最も早くコントロールフィールドの受信が完了したメッセージのコントロールフィールドの受信完了時点t1から、他のメッセージのコントロールフィールドの受信完了時との時間差を求めると共に、メッセージ毎にコントロールフィールドの受信完了時からの送信待ち時間を求める。さらに受信完了時t1を基準としてメッセージの送信開始までに必要な時間である、前記送信待ち時間と前記受信完了時の時間差の和をメッセージ毎に求め、該時間差の和が小さいメッセージを最初に前記第2CAN通信線へ中継送信する。
 このように、最も早くコントロールフィールドの受信が完了したメッセージのコントロールフィールドの受信完了時点t1を基準として、メッセージの送信開始までに必要な時間が最も短いメッセージを最初に第2CAN通信線へ中継送信することで、送信待ち時間の無駄が発生することを防ぐことができる。
 また、送信待ち時間の無駄がないため、中継接続ユニットが複数の第1CAN通信線からメッセージを同時に受信している場合に、全てのメッセージの第2CAN通信線への中継送信を早く完了させることができ、時間的効率を高めた中継を行うことができる。
 前記中継処理部は、メッセージ毎に前記送信待ち時間と前記受信完了時の時間差の和を求めている。前記送信待ち時間が負の値となる場合には、前記送信待ち時間をゼロとして前記送信待ち時間と前記受信完了時の時間差の和を求めている。
 また、最も早くコントロールフィールドの受信が完了したメッセージについては、受信完了時の時間差はゼロとなる。
 前記第1CAN通信線または第2CAN通信線の伝送速度は、125kbps、250kbps、500kbps、1Mbpsである。これらはCANで一般的に使用されている伝送速度である。
 前述したように、本発明の車載用の中継接続ユニットによれば、中継接続ユニットが複数の第1CAN通信線から同時にメッセージを受信し、これらメッセージの中継送信先が第2CAN通信線の場合、受信しているメッセージのうち送信順序であるメッセージは、コントロールフィールドの受信が完了した時点から、該送信待ち時間だけ遅らせてメッセージの送信を開始している。これにより、中継接続ユニットが第1CAN通信線からメッセージの受信を完了した時点では、第2CAN通信線へのメッセージの送信は完了していない状態となり、中継接続ユニットは、第1CAN通信線から受信したメッセージを、第1CAN通信線よりも伝送速度の速い第2CAN通信線にカットスルー方式で中継するときに、送信すべきデータが無い状態が発生することを防ぐことができる。
 また、本発明では、複数の第1CAN通信線から同時に受信したメッセージのうち最も早くコントロールフィールドの受信が完了したメッセージのコントロールフィールドの受信完了時点t1を基準として、メッセージの送信開始までに必要な時間が最も短いメッセージを最初に第2CAN通信線へ中継送信することで、送信待ち時間の無駄が発生することを防ぐことができる。
本発明である中継接続ユニットを接続した通信システムの構成図である。 メッセージのフォーマットの説明図である。 送信待ち時間の説明図である。 複数の第1通信線から受信するメッセージの送信待ち時間と、コントロールフィールド受信完了時の時間差の説明図である。 (A)時間差と送信待ち時間の和が小さいメッセージを先に第2通信線に中継送信する場合の説明図であり、(B)はメッセージを受信した順に中継送信を開始する場合の説明図である。 伝送速度比とデータフィールドのデータ長に対する送信待ちビット数Xを示した図である。 拡張フォーマット時の伝送速度比とデータフィールドのデータ長に対する送信待ちビット数Xを示した図である。 カットスルー方式の説明図である。 送信すべきデータがない状態を示す図である。
符号の説明
10 中継接続ユニット
11 中継処理部
12 送受信部
13 記憶部
30 電子制御ユニット(ECU)
31A 第1通信線
31B 第1通信線
32 第2通信線
42 アービトレーションフィールド
43 コントロールフィールド
X(XA,XB) 送信待ちビット数
TX(TXA,TXB) 送信待ち時間
T テーブル
R(RA,RB) 伝送速度比
m(mA,mB) メッセージ
 本発明の実施形態を図面を参照して説明する。
 図1乃至図7に本発明の第1実施形態を示す。
 車載用の中継接続ユニット10は、第1通信線31A、第1通信線31B、第2通信線32と接続していると共に、第1通信線31AにECU30A、第1通信線31BにECU30B、第2通信線32にECU30Cを接続して通信システム20を構成しており、異なる通信線に属する前記ECU30間で送受信するメッセージmを中継するものである。通信プロトコルはCAN(Controller Area Network)である。
 第2通信線32の伝送速度は第1通信線31A,第1通信線31Bよりも速い速度としており、また、本実施形態では第1通信線31Aと第1通信線31Bの伝送速度は同じとしている。なお、第1通信線31Aと第1通信線31Bの伝送速度は異なっていてもよい。
 中継接続ユニット10は、第1通信線31Aに接続されたECU30AからメッセージmA、第1通信線31Bに接続されたECU30BからメッセージmBを同時に受信しており、これらメッセージmA,mBを第2通信線32にカットスルー方式で中継送信している。
 中継接続ユニット10は、中継処理部11と、送受信部12A、12B、12Cと、記憶部13を備えている。
 中継処理部11は、送受信部12A、12B、12Cと接続すると共に記憶部13と接続している。第1通信線31A、31Bに接続されたECU30A,30Bからのメッセージmを送受信部12A、12Bを介して受信すると、メッセージmのアービトレーションフィールド42から識別子(ID)を読み出している。さらに、該IDからルーティングマップを用いて該メッセージmの中継送信先である第2通信線32を判別している。
 中継処理部11は、同時に受信しているメッセージmA,mBについて、後述する送信待ちビット数Xから送信待ち時間TXを求めると共に、これらのメッセージmA,mBのうちで最も早くコントロールフィールド43の受信が完了したメッセージmと他のメッセージmとの間でコントロールフィールド43受信完了時の時間差Tdiffとを求めている。さらに、該時間差Tdiffと送信待ち時間TXとからメッセージmA,mBのうちどちらのメッセージmを先に第2通信線32に送信するかを定めている。送信するメッセージmの定め方については後述する。
 メッセージmA,mBのうち、先に送信するメッセージmについては、コントロールフィールド43の受信が完了した時点から、該メッセージmを受信した通信線31の伝送速度で送信待ちビット数Xを数えた後、メッセージmの中継送信を開始している。
 メッセージmA,mBの残りのメッセージmについては、先に送信されたメッセージmの送信完了後に送信している。
 記憶部13は、送信待ちビット数Xを記載したテーブルTを記憶している。テーブルTには、伝送速度比R、即ち、(第2通信線32の伝送速度/第1通信線31Aの伝送速度)または、(第2通信線32の伝送速度/第1通信線31Bの伝送速度)と、メッセージmのデータフィールド44のデータ長に対する、送信待ちビット数Xが記載されている。テーブルTの詳細は後述する。
 また、記憶部13は中継処理部11の中継処理のためのルーティングマップを記憶している。
 送受信部12Aは第1通信線31Aと接続しており、送受信部12Bは第1通信線31Bと接続しており、送受信部12Cは第2通信線32と接続している。送受信部12は各通信線を介してメッセージmの送受信を行っている。
 中継接続ユニット10は、マイコン(図示せず)とCANコントローラ(図示せず)で構成しており、マイコンのCPUは中継処理部11を構成し、マイコンのROMまたはRAMは記憶部13を構成している。また、CANコントローラは送受信部12を構成している。なお、中継処理部11を中継接続ユニット用LSI等のハードウェアで構成してもよい。
 次に、中継接続ユニット10が送受信するメッセージmのフォーマットについて説明する。図2に示すように、メッセージmのフレームは、上位ビットより、メッセージフレームの開始を示すスタートオブフレーム(SOF)フィールド41と、メッセージm識別子(ID)を格納したアービトレーションフィールド42と、データフィールド44のデータ長(DLC)を格納したコントロールフィールド43と、送受信されるメッセージmの内容(データ)を示すデータフィールド44とを備えている。
 メッセージmはCANプロトコルに準拠しており、標準フォーマットである。従って、アービトレーションフィールド42は12ビット、コントロールフィールド43は6ビット、SOFフィールド41は1ビットと定められており、データフィールド44のデータ長はメッセージm毎に異なる。コントロールフィールド43にはデータフィールド44のデータ長がバイト単位で格納されている。
 次に、送信待ちビット数X及び送信待ち時間TXについて、第1通信線31Aから受信したメッセージmを第2通信線32に中継する場合を例に説明する。
 図3に示すように、第1通信線31Aのメッセージmのコントロールフィールド43の受信の完了時t1においては、中継接続ユニット10はアービトレーションフィールド42及びコントロールフィールド43の受信を完了しており、データフィールド44を続けて受信する。
 中継処理部11は、コントロールフィールド43の受信の完了時t1から、第1通信線31Aの伝送速度において送信待ちビット数Xが経過した時点、即ち送信待ち時間TXの経過後から、第2通信線32にメッセージmの送信を開始する。
 このとき、中継接続ユニット10が第1通信線31Aからメッセージmの受信を完了した時t2では、第2通信線32へのメッセージmの送信が完了しないように、送信待ちビット数Xを設定している。即ち、第1通信線31Aから受信するメッセージmの受信完了時t2が、第2通信線32に送信するメッセージmの送信完了時t3よりも早くなるように、送信待ちビット数Xを設定している。
 従って、送信待ちビット数Xとは、図3に示すように、中継接続ユニット10が第1通信線31AからメッセージmAを受信し、コントロールフィールド43の受信の完了時t1から、第2通信線32にメッセージmの中継を開始するまでのビット数Xである。
 中継処理部11は第1通信線31Aから受信するメッセージmAのビット数を数えることで、該送信待ちビット数XAを数えている。例えば、送信待ちビット数XAが10ビットの場合、図3に示すように中継処理部11はコントロールフィールド43の受信の完了時t1から、第1通信線31Aから受信するメッセージmを10ビット分数えたのち、第2通信線32にメッセージmAの中継を開始している。
 第1通信線31Aの伝送速度において送信待ちビット数XAが経過する時間を送信待ち時間TXAとする。
 なお、送信待ち時間が負の値となった場合には、前記送信待ち時間をゼロとする。
 同様に、中継接続ユニット10が第1通信線31BからメッセージmBを受信し、コントロールフィールド43の受信の完了時t1から、第2通信線32にメッセージmBの中継を開始するまでのビット数Xを送信待ちビット数XBとし、第1通信線31Bの伝送速度において送信待ちビット数XBが経過する時間を送信待ち時間TXBとする。
 次に、中継接続ユニット10が第1通信線31A及び第1通信線31Bから同時にメッセージmを受信している場合に、第2通信線32に優先的に送信するメッセージmを定める方法について説明する。
 図4に示すように、第1通信線31AからのメッセージmAのコントロールフィールド43の受信の完了時t1が、第1通信線31BからのメッセージmBのコントロールフィールド43の受信の完了時taよりも早いとした場合を例とする。
 このとき、中継処理部11は、メッセージmAのコントロールフィールド43の受信の完了時t1後に、第1通信線31Aから受信したメッセージmAの送信待ち時間TXAを演算する。送信待ち時間TXAは、(メッセージmAの送信待ちビット数XA/第1通信線31Aの伝送速度)で求められる。
 また、第1通信線31BからのメッセージmBのコントロールフィールド43の受信の完了時ta後に送信待ち時間TXBを演算する。送信待ち時間TXBは、(メッセージmBの送信待ちビット数XB/第1通信線31Bの伝送速度)で求められる。
 さらに、最も早くコントロールフィールドの受信が完了したメッセージと他のメッセージとの間でコントロールフィールド受信完了時の時間差Tdiffを求める。メッセージmAのコントロールフィールド43の受信の完了時t1とメッセージmBのコントロールフィールド43の受信の完了時taから受信時間差Tdiffを演算する。
 ここで、メッセージmAのコントロールフィールド43の受信の完了時t1を基準として、メッセージを送信するまでに必要な時間である(送信待ち時間TX+受信時間差Tdiff)を求める。
 第1通信線31Aから受信したメッセージmAは、早くコントロールフィールドの受信が完了したメッセージであるため受信時間差Tdiffがゼロとなり、送信待ち時間TXA後に第2通信線32に中継開始が可能である。一方、第1通信線31Bから受信したメッセージmBは(送信待ち時間TXB+受信時間差Tdiff)後に中継開始が可能である。
 このとき、(送信待ち時間TXA-受信時間差Tdiff)と送信待ち時間TXBの長さを比べ、送信待ち時間TXBが(送信待ち時間TXA-受信時間差Tdiff)よりも短い場合には、メッセージmAよりもメッセージmBを先に第2通信線32に送信し、送信待ち時間TXBが(送信待ち時間TXA-受信時間差Tdiff)よりも長い場合には、メッセージmBよりもメッセージmAを先に第2通信線32に送信する。
 また、(送信待ち時間TXB+受信時間差Tdiff)と送信待ち時間TXAの長さを比べ、(送信待ち時間TXB+受信時間差Tdiff)が送信待ち時間TXAよりも短い場合には、メッセージmAよりもメッセージmBを先に第2通信線32に送信し、(送信待ち時間TXB+受信時間差Tdiff)が送信待ち時間TXAよりも長い場合には、メッセージmBよりもメッセージmAを先に第2通信線32に送信してもよい。
 このように、中継接続ユニット10が第1通信線31A及び第1通信線31Bから同時にメッセージmを受信している場合には、いずれかのメッセージmの早くコントロールフィールド43の受信が完了した時点を基準時とし、該基準時から各メッセージmの第2通信線32への中継が可能となるまでに要する時間を演算し、該時間が短いメッセージmから中継を開始する。
 図5(A)は送信待ち時間TXBが(送信待ち時間TXA-受信時間差Tdiff)よりも短い場合に、メッセージmAよりもメッセージmBを先に第2通信線32に送信する説明図であり、図5(B)は、本方式によらず、中継処理部11がメッセージを受信した順に第2通信線32にメッセージを送信したときの説明図である。ここでは第1通信線AのメッセージmA、第1通信線BのメッセージmBの順にメッセージを受信した場合を記載している。
 図5(A)では、中継処理部11はメッセージmBのコントロールフィールド43の受信が完了した時点taから送信待ち時間TXB後、即ち、メッセージmAのコントロールフィールド43の受信が完了した時点t1から(送信待ち時間TXB+受信時間差Tdiff)後にメッセージmBを第2通信線32に送信している。
 このとき、第1通信線31AからのメッセージmAの受信完了時t2から、第2通信線32にメッセージmAとメッセージmBの中継送信が完了した時点t4までの全体の遅れ時間は、図5(B)の受信完了時t2から時点t5に比べて短くなり、メッセージmの中継送信が早く完了している。
 送信待ちビット数Xの求め方について、第1通信線31Aから受信したメッセージmAを第2通信線32に中継する場合を例に説明する。
 前述したように、送信待ちビット数Xは、第1通信線31Aから受信するメッセージmの受信完了時t2が、第2通信線32に送信するメッセージmの送信完了時t3よりも早くなるように設定している。
 従って、(データフィールド44を受信するために必要な時間TA)が、(送信待ち時間TX+メッセージmの全ビット数を第2通信線32に送信するために必要な時間TB)よりも小さければよい。
 データフィールド44を受信するために必要な時間TAは、データフィールド44のビット数/第1通信線31Aの伝送速度で求められる。なお、データフィールド44のデータ長とは、データフィールド44のビット数を表している。
 送信待ち時間TXは、第1通信線31Aの伝送速度を基準として考えると、送信待ちビット数X/第1通信線31Aの伝送速度で求められる。
 メッセージmの全ビット数を第2通信線32に送信するために必要な時間TBは、メッセージmの全ビット数/第2通信線32の伝送速度で求められる。
 上記より、送信待ちビット数Xを求めると、(データフィールド44のビット数-メッセージmの全ビット数/伝送速度比R)となる。ここで、伝送速度比Rとは第2通信線32の伝送速度/第1通信線31Aの伝送速度である。
 詳細には、データフィールド44のデータ長(ビット数)は、コントロールフィールド43より読み出している。データ長はバイト単位で表されており1バイトは8ビットなので、読み出した値がnの場合、データフィールド44のデータ長(ビット数)は8×nビットである。
 メッセージmの全ビット数は、SOFフィールド41、アービトレーション(ID)フィールド42、コントロール(DLC)フィールド43、データフィールド44のビット数の和である。前述したようにアービトレーションフィールド42は12ビット、コントロールフィールド43は6ビット、SOFは1ビットと定められているため、計19ビットとなり、データフィールド44のデータ長は8×nビットである。従って、メッセージmの全ビット数は(19+8×n)ビットとなる。
 また、第1通信線31A及び第2通信線32の伝送速度は125kbps、250kbps、500kbps、1Mbpsのいずれかであり、また、第1通信線31Aは第2通信線32よりも伝送速度が遅いため、伝送速度比Rは2、4、8のいずれかの値となる。
 さらに、スタッフビットを考慮する。CANプロトコルによる通信システムでは、ECU30及び中継接続ユニット10は6ビット以上連続して同じ値のビットを受信することができず、連続して5ビット同じ値のビットが続いた場合には1ビットのスタッフビットが挿入される。このため、データフィールド44のビット数は、最大で8×n×6/5となる。6/5をビットスタッフ率Sと称す。
 なお、アービトレーションフィールド42、コントロールフィールド43にもスタッフビットは挿入される。しかし、メッセージmの全ビット数が長くなる場合には、第2通信線32に送信されるメッセージmの全ビット数が大きくなり、中継接続ユニット10の第2通信線32へのメッセージmの送信完了時t3がさらに遅くなる。本発明では、第1通信線31Aから受信するメッセージmの受信完了時t2が、第2通信線32に送信するメッセージmの送信完了時t3よりも早くなるように設定しており、メッセージmの全ビット数が長くなる場合には、送信待ちビット数Xの演算には影響を与えない。そこで、本実施形態では、データフィールド44に挿入されるスタッフビットのみを考慮している。
 従って、送信待ちビット数Xは、(データフィールド44のビット数-メッセージmの全ビット数/伝送速度比R)であり、式(1)で表される。
X=(8×n×S)-(19+8×n×S)/R  式(1)
 式1より、送信待ちビット数Xは、伝送速度比Rとデータフィールド44のビット数の関数となる。前述したように、伝送速度比Rは2、4、8のいずれかの値となり、データフィールド44のデータ長は8×nビット、即ちnバイトで表される。CANのメッセージmでは、データフィールド44は0バイトから8バイトの値を取る。
 このため、伝送速度比Rとデータフィールド44のデータ長のバイト数から送信待ちビット数Xを演算すると、図6に示すテーブルTとなる。例えば、第1通信線31Aの伝送速度が250kbps、第2通信線32の伝送速度が500kbps、データフィールド44のバイト数nが4バイトの場合、伝送速度比Rは500/250=2なので、送信待ちビット数Xは図6より10ビットとなる。
 テーブルTは予め算出して記憶部13に記憶される。
 同様に、第1通信線31Bから受信したメッセージmBを第2通信線32に中継する場合の送信待ちビット数XBについても、メッセージmBのデータ長のバイト数と、(第2通信線32の伝送速度/第1通信線31Bの伝送速度)で求められる伝送速度比RBからテーブルTを参照して式(1)により求めている。
 次に、中継接続ユニット10の動作について説明する。
 中継接続ユニット10は、第1通信線31Aと第1通信線31Bから同時にメッセージmA,mBを受信する。メッセージmのアービトレーションフィールド42を受信すると、中継処理部11はメッセージmのIDを読み出し、記憶部13のルーティングマップを参照して中継送信先の通信線を判別する。ここでは、メッセージmA,mBともに第2通信線32を送信先とする。
 次に、受信元である第1通信線31Aの伝送速度と、送信先の第2通信線32の伝送速度から伝送速度比RAを求める。また、受信元である第1通信線31Bの伝送速度と、送信先の第2通信線32の伝送速度から伝送速度比RBを求める。各伝送速度比RA,RBは予め記憶させておいてもよいし、各通信線の伝送速度を記憶しておき、メッセージmの受信毎に演算してもよい。
 メッセージmAのコントロールフィールド43の受信完了時がメッセージmBのコントロールフィールド43の受信完了時よりも早いとした場合を考える。このとき、メッセージmAのコントロールフィールド43の受信が完了すると、コントロールフィールド43からデータフィールド44のデータ長であるバイト数nを読み出す。
 さらに、中継処理部11は記憶部13のテーブルTを参照して、データフィールド44のバイト数nと伝送速度比RAから送信待ちビット数XAを読み出し、(メッセージmAの送信待ちビット数XA/第1通信線31Aの伝送速度)から送信待ち時間TXAを演算する。
 中継処理部11はメッセージmBのコントロールフィールド43の受信が完了すると、コントロールフィールド43からデータフィールド44のデータ長であるバイト数nを読み出し、記憶部13のテーブルTを参照して、データフィールド44のバイト数nと伝送速度比RBから送信待ちビット数XBを読み出し、(メッセージmBの送信待ちビット数XB/第1通信線31Bの伝送速度)から送信待ち時間TXBを演算する。
 また、中継処理部11はメッセージmAのコントロールフィールド43の受信の完了時t1とメッセージmBのコントロールフィールド43の受信の完了時taから受信時間差Tdiffを演算し、(メッセージmAの送信待ち時間TXA-受信時間差Tdiff)を求める。
 演算処理部は、(送信待ち時間TXA-受信時間差Tdiff)と、メッセージmBの送信待ち時間TXBを比較する。
 (送信待ち時間TXA-受信時間差Tdiff)のほうが短い場合には、中継処理部11は、メッセージmAのコントロールフィールド43の受信が完了した時点t1から第1通信線31AからのメッセージmAを送信待ちビット数XA分数えた後、第2通信線32にメッセージmAの中継を開始する。
 なお、(メッセージmBの送信待ち時間TXB+受信時間差Tdiff)を演算して、メッセージmAの送信待ち時間TXAと比較してもよい。この場合、(送信待ち時間TXB+受信時間差Tdiff)が送信待ち時間TXAよりも長い場合には、メッセージmBよりもメッセージmAを先に第2通信線32に送信する。
 メッセージmAの中継送信が完了した後に、メッセージmBの中継送信を開始する。このとき、中継処理部11はメッセージmBのコントロールフィールド43の受信が完了した時点taから実際にメッセージmBの送信が開始されるまでの待機時間が、メッセージmBの送信待ち時間TXBを超えているか否かをチェックしている。超えていない場合は送信待ち時間TXBの経過後に中継を開始する。
 メッセージmBの送信待ち時間TXBのほうが短い場合には、中継処理部11は、メッセージmBのコントロールフィールド43の受信が完了した時点taから第1通信線31BからのメッセージmBを送信待ちビット数XB分数えた後、第2通信線32にメッセージmBの中継を開始する。メッセージmBの中継送信が完了した後に、メッセージmAのコントロールフィールド43の受信が完了した時点t1から実際にメッセージmAの送信が開始されるまでの待機時間が、メッセージmAの送信待ち時間TXAを超えているか否かをチェックして、メッセージmAの中継送信を開始する。
 本発明によれば、中継接続ユニット10が複数の第1通信線31から同時にメッセージmを受信し、これらメッセージmの中継送信先が第2通信線32の場合、受信しているメッセージmのうち送信順序であるメッセージmは、コントロールフィールド43の受信が完了した時点から、該送信待ち時間TXだけ遅らせてメッセージmの送信を開始している。これにより、中継接続ユニット10が第1通信線31からメッセージmの受信を完了した時点では、第2通信線32へのメッセージmの送信は完了しないようになり、中継接続ユニット10は、第1通信線31から受信したメッセージmを、第1通信線31よりも伝送速度の速い第2通信線32にカットスルー方式で中継するときに、送信すべきデータが無い状態が発生することを防ぐことができる。
 また、本発明では、複数の第1通信線31から同時に受信したメッセージmのうち最も早くコントロールフィールド43の受信が完了したメッセージmのコントロールフィールド43の受信完了時点t1を基準として、メッセージmの送信開始までに必要な時間が最も短いメッセージmを最初に第2通信線32へ中継送信することで、送信待ち時間TXの無駄が発生することを防いでいる。
 なお、本実施形態では、第2通信線32よりも伝送速度の遅い2本の第1通信線31A、31Bから同時にメッセージmを受信しているが、3本以上の第1通信線31から同時にメッセージmを受信していてもよい。
 例えば、3つのメッセージを、メッセージmA,mB,mCの順で受信した場合、メッセージmAのコントロールフィールド43の受信が完了した時点t1を基準とし、メッセージmBのコントロールフィールド43の受信が完了した時点taで、メッセージmAとmBのどちらを先に送信するかを判定する。さらに、メッセージmCのコントロールフィールド43の受信が完了した時点で、まだ、いずれのメッセージも送信されていない場合には、メッセージmAとメッセージmCのどちらを先に送信するかを判定し、また、メッセージmBとメッセージmCのどちらを先に送信するかを判定することで、メッセージmA,mB,mCの送信順序を定める。
 すでにメッセージmAまたはmBのいずれか1つ送信が開始されていれば、残っているメッセージとの間でどちらを先に送信するかの判定を行う。
 また、テーブルTを記憶部13に記憶せず、送信待ちビット数Xを、データフィールド44のバイト数と伝送速度比Rからメッセージmの受信毎に演算して求めてもよい。
 さらに、記憶部13にテーブルTを持たず、中継処理部11はメッセージmを受信する毎に、データフィールド44を受信するために必要な時間TAとメッセージmの全ビット数を第2通信線32に送信するために必要な時間TBから送信待ち時間TXを求め、コントロールフィールド43の受信が完了した時点から、第1通信線31Aの伝送速度で送信待ちビット数X分の送信待ち時間TXが経過したのち、第2通信線32にメッセージmの中継を開始してもよい。
 また、本実施形態ではCANメッセージmは標準フォーマットとしたが、拡張フォーマットを用いてもよい。
 拡張フォーマットの場合、アービトレーションフィールド42は32ビット、コントロールフィールド43は6ビット、SOFフィールドは1ビットと定められており、送信待ちビット数Xは、(データフィールド44のビット数-メッセージmの全ビット数/伝送速度比R)=(8×n×S)-(39+8×n×S)/Rで表される。
 拡張フォーマットの場合に、伝送速度比Rとデータフィールド44のバイト数から送信待ちビット数Xを演算すると、図7に示すテーブルTとなる。
 なお、他の構成および作用効果は第1実施形態と同様のため、同一の符号を付して説明を省略する。

Claims (5)

  1.  複数の第1CAN通信線に夫々接続された電子制御ユニットから受信したメッセージを、前記第1CAN通信線よりも伝送速度の速い第2CAN通信線に接続された電子制御ユニットにカットスルー方式で中継する車載用の中継接続ユニットであって、
     前記第1CAN通信線と第2CAN通信線と接続された送受信部と、
     前記送受信部と接続した中継処理部を備え、
     前記中継処理部では、前記複数の第1CAN通信線から同時に受信したメッセージについては、これらのメッセージのうちで最も早くコントロールフィールドの受信が完了したメッセージと他のメッセージとの間のコントロールフィールドの受信完了時の時間差と、メッセージ毎にコントロールフィールドの受信が完了した時点からの送信待ち時間から、各メッセージについて前記送信待ち時間と前記受信完了時の時間差の和を求め、該時間差の和が小さいメッセージを最初に前記第2CAN通信線へ中継させることを特徴とする車載用の中継接続ユニット。
  2.  各メッセージ毎に演算される前記送信待ち時間は、(前記各メッセージの残りのビット数の受信を完了するために必要な受信時間―前記メッセージの全ビット数を前記第2CAN通信線に送信するために必要な送信時間)である請求項1に記載の車載用の中継接続ユニット。
  3.  前記中継処理部は、前記送信待ち時間が負の値となる場合には、前記送信待ち時間をゼロとして前記送信待ち時間と前記受信完了時の時間差の和を求める請求項1または請求項2に記載の車載用の中継接続ユニット。
  4.  前記中継処理部は、最初に前記第2CAN通信線へ中継させる前記メッセージのコントロールフィールドの受信が完了した時点から前記送信待ち時間経過後に、該メッセージの前記第2CAN通信線への中継を開始させる請求項1乃至請求項3のいずれか1項に記載の車載用の中継接続ユニット。
  5.  前記第1CAN通信線または第2CAN通信線の伝送速度は、125kbps、250kbps、500kbps、1Mbpsである請求項1乃至請求項4のいずれか1項に記載の車載用の中継接続ユニット。
PCT/JP2009/050064 2008-01-09 2009-01-07 車載用の中継接続ユニット WO2009088005A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US12/745,587 US8284821B2 (en) 2008-01-09 2009-01-07 Vehicle-mounted relay connection unit
DE112009000087.8T DE112009000087B8 (de) 2008-01-09 2009-01-07 Fahrzeug-Weiterleitungs-Verbindungseinheit

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008-002273 2008-01-09
JP2008002273A JP4917557B2 (ja) 2008-01-09 2008-01-09 車載用の中継接続ユニット

Publications (1)

Publication Number Publication Date
WO2009088005A1 true WO2009088005A1 (ja) 2009-07-16

Family

ID=40853118

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/050064 WO2009088005A1 (ja) 2008-01-09 2009-01-07 車載用の中継接続ユニット

Country Status (4)

Country Link
US (1) US8284821B2 (ja)
JP (1) JP4917557B2 (ja)
DE (1) DE112009000087B8 (ja)
WO (1) WO2009088005A1 (ja)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8874813B2 (en) * 2008-04-02 2014-10-28 Autonetworks Technologies, Ltd. Vehicle communication system
DE102011080476A1 (de) * 2011-08-05 2013-02-07 Robert Bosch Gmbh Verfahren und Vorrichtung zur Verbesserung der Datenübertragungssicherheit in einer seriellen Datenübertragung mit flexibler Nachrichtengröße
JP6200779B2 (ja) * 2013-10-31 2017-09-20 日立オートモティブシステムズ株式会社 通信制御装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002368786A (ja) * 2001-06-07 2002-12-20 Matsushita Electric Ind Co Ltd パケット転送方法及びパケット転送装置
JP2003244180A (ja) * 2002-02-21 2003-08-29 Denso Corp データ中継装置および多重通信システム

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09162917A (ja) 1995-12-06 1997-06-20 Hitachi Cable Ltd スイッチングハブ
US7042891B2 (en) * 2001-01-04 2006-05-09 Nishan Systems, Inc. Dynamic selection of lowest latency path in a network switch
JP3750636B2 (ja) * 2002-07-11 2006-03-01 株式会社デンソー データ中継装置および多重通信システム
US7602712B2 (en) * 2004-06-08 2009-10-13 Sun Microsystems, Inc. Switch method and apparatus with cut-through routing for use in a communications network
JP2007235211A (ja) * 2006-02-27 2007-09-13 Fujitsu Ltd データ送受信装置、データ送受信方法およびデータ送受信プログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002368786A (ja) * 2001-06-07 2002-12-20 Matsushita Electric Ind Co Ltd パケット転送方法及びパケット転送装置
JP2003244180A (ja) * 2002-02-21 2003-08-29 Denso Corp データ中継装置および多重通信システム

Also Published As

Publication number Publication date
JP4917557B2 (ja) 2012-04-18
US8284821B2 (en) 2012-10-09
DE112009000087T5 (de) 2011-02-03
JP2009165014A (ja) 2009-07-23
US20100303133A1 (en) 2010-12-02
DE112009000087B4 (de) 2013-11-21
DE112009000087B8 (de) 2014-04-03

Similar Documents

Publication Publication Date Title
US8179918B2 (en) Relay connection unit for vehicle
JP5222002B2 (ja) 車載用の中継接続ユニット
JP6500123B2 (ja) 車載ゲートウェイ装置、及び車載ネットワークシステム
US10153825B2 (en) Vehicle-mounted control device
JP5050653B2 (ja) 電子制御装置
US8885478B2 (en) System and method for transferring data packets through a communication system
JP6029763B2 (ja) メッシュ通信ネットワークにおいて資源を割り当てる方法、コンピュータプログラム、情報記憶手段およびノード装置
US7307994B2 (en) Controller area network (CAN) based communication system with multiple bus connected nodes
KR101676353B1 (ko) 이종 네트워크 상의 메시지 제어 방법 및 장치
JP4917557B2 (ja) 車載用の中継接続ユニット
JP6200779B2 (ja) 通信制御装置
JP2018046509A (ja) ゲートウェイ装置
US20110167188A1 (en) Subscriber node of a communication system having a functionally separate transmission event memory
EP3641230B1 (en) Control apparatus
JP4999668B2 (ja) 車載用の中継接続ユニット
EP3739820B9 (en) Establishing communication at optimized time instances
JP2008244719A (ja) 車載用中継接続ユニット
JP2006319670A (ja) 通信システム及び中継装置
JP2007135107A (ja) 中継接続ユニット
JP6137033B2 (ja) 車載ネットワークシステム及び車載中継装置
JP5082420B2 (ja) データ中継装置
JP5019936B2 (ja) 車載用中継接続ユニット
JP2006319671A (ja) 中継装置及び通信システム
JP4577670B2 (ja) 通信装置およびデータ送信制御方法
JP4959484B2 (ja) 中継接続ユニット

Legal Events

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

Ref document number: 09701034

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 12745587

Country of ref document: US

RET De translation (de og part 6b)

Ref document number: 112009000087

Country of ref document: DE

Date of ref document: 20110203

Kind code of ref document: P

122 Ep: pct application non-entry in european phase

Ref document number: 09701034

Country of ref document: EP

Kind code of ref document: A1