This disclosure relates to automotive communication networks.
Rapid advances in electronics and communication technologies, driven by immense customer demand, have resulted in the widespread adoption of electronic devices in almost every environment. As one example, automobiles and other vehicles now include heterogeneous communication networks dedicated to different electronic ecosystems within the vehicle. The communication networks connect electronic devices ranging from discrete sensors to entire entertainment systems. Improvements in the automotive communication networks will drive further adoption and integration of vehicle electronics.
The in-vehicle network gateway described below provides hardware accelerated intercommunication between heterogeneous in-vehicle networks, in any given direction from one bus or network to another, the reverse direction, and more generally from any source in-vehicle bus or network to any destination in-vehicle bus or network. The gateway provides protocol conversion via message translation, message routing between networks, and error management in real time. The hardware acceleration dramatically reduces inter-protocol conversion latency, which allows the wide range of vehicle electronics control units to communicate with each other with less delay, thereby improving real-time behavior.
In
By way of example, the ECUs shown in
Any or all of the ECUs may be interconnected over an in-vehicle network or bus. Alternatively, any of the ECUs may be stand-alone, e.g., not connected to other ECUs over an in-vehicle network or bus. There may be multiple different types of physical networks or buses following multiple different types of protocols. Further complicating the architecture is that any number of ECUs may be connected to any number of the various different networks or buses, and these ECUs may need to exchange information. That is, ECUs on different, protocol-incompatible networks or buses may need to exchange information.
The in-vehicle networks and buses may be use any protocol, including an on-board diagnostic system (OBD) bus, an Emissions/Diagnostics bus, Mobile Media bus, or X-by-Wire bus. Other examples of in-vehicle network buses include a Controller Area Network (CAN) bus, serial bus, FlexRay bus, Ethernet bus, Local Interconnect Network (LIN) bus, or Media Oriented Systems Transport (MOST).
An in-vehicle network gateway 136 provides hardware accelerated protocol translation and intercommunication between the different in-vehicle networks. The in-vehicle network gateway 136 includes a type A network or bus interface 138, a type B network or bus interface 140, a type C network or bus interface 142, a type D network or bus interface 144, and a type E network or bus interface 146. Gateway circuitry 148, described in detail below, implements message filtering, message routing, protocol translation acceleration in hardware, message aggregation, and other features that facilitate ECU intercommunication across heterogeneous in-vehicle networks and buses.
The network and bus interfaces 138-146 include the interface circuitry for unidirectional or bidirectional communications over the corresponding in-vehicle network or bus. Any of the ECUs may receive and transmit messages including commands, data, or both over the in-vehicle networks to any other of the ECUs. The messages may include, for instance, a message header and payload.
Any of the network or bus interfaces 138-146 may include a physical “wired” medium (e.g., Ethernet cable or optical cable) transceiver, or a wireless transceiver. That is, the network or bus interfaces 138-146 may then transmit and receive messages without a wired connection. Any of the network or bus interfaces 138-146 may employ any wireless communication protocol such as Bluetooth, 802.11 b/g/n, WiGig, or other wireless communication standards.
In the in-vehicle network gateway 136, there are multiple different automotive network or bus interfaces 138-146. The network and bus interfaces may be of any type, including a protocol A automotive network or bus interface (e.g., a CAN bus interface) and a protocol B automotive network or bus interface (e.g., an Ethernet interface). The in-vehicle network gateway 136 includes one or more instances of buffer circuitry 202 for receiving messages 204 in the form, e.g., of data packets or CAN bus messages, arriving on the automotive network or bus interfaces (302). For example, there may be an instance of buffer circuitry for each different network or bus interface 138-146, e.g., for the CAN bus, defined within a CAN bus transceiver in the gateway circuitry 148.
The messages 204 may vary widely in format per protocol specification, and typically include a message header and a message payload. The message header may include, e.g., a message identifier 206, and the message payload carries the payload data 208. For instance, a CAN bus message may include an 11-bit message identifier or a 29-bit message identifier and payload data including up to 8 bytes of data and other fields, e.g., CRC, ACK, and EOF fields. A LIN message may include a 6-bit message identifier and up to 8 bytes of data and one byte checksum as a message payload. A FlexRay message may include an 11-bit message identifier and up to 254 bytes of payload with a three byte trailer segment as a message payload. An Ethernet message may include a media access control (MAC) header, Internet Protocol (IP) header, a Transmission Control Protocol (TCP) header, and a 42 to 1500 byte payload.
In some cases, the in-vehicle networks and buses communicate large volumes of messages; not all of the messages are destined for the gateway 136. Accordingly, the gateway circuitry 148 may implement a message filter 210. The message filter 210 drops or passes messages for further processing, e.g., to the routing table 211, translation table 212 and the control circuitry 214 (304). The message filter 210 passes the message for further processing when the message meets a filtering criterion (306). For instance, the message filter 210 may pass the message on for further processing when the message identifier is present in a pre-defined list 222 of message identifiers to process, e.g. a white-list. The filtering criteria may be implemented in many different ways, as another example as a time, date, recipient, destination, message type (e.g., ignore or drop error messages) or other criteria, or as a list of message to not process, e.g., a black-list, where all messages not on the list are passed on for further processing.
As an implementation option, when a message identifier does not match an entry in the white list, the message may be send up a software stack for processing. The software stack may include additional logic to decide whether the message should be dropped, or whether the message identifier should be added to the white list, e.g., when pre-determined criterion are met. That is, the message filter 210 may change dynamically to adapt the ongoing processing of the in-network gateway 136.
Additionally, the gateway 136 may implement, either in hardware or in a software stack, a mechanism for removing or replacing entries in the message filter 210. The removal or replacement process may be an aging-based process, for instance. That is, entries in the message filter 210 that exceed a pre-determined threshold age (whether expressed as a measure of time or number of messages processed) without being used may be deleted or marked for replacement. This mechanism may help clear up space in the message filter 210 for other entries, e.g., those dynamically added by the software stack as noted above.
The gateway circuitry 148 may further include a routing table 211 to decide on which network and interface the destination ECU resides on, and hence to which destination network interface the gateway circuitry 148 should forward the message to (307). After the routing table 211 decides the target network, the translation table 212 provides the header, as described below. The translation table 212 facilitates hardware acceleration of protocol conversion. The translation table 212 may provide a hardware lookup to map the received message to a pre-defined portion (e.g., pre-defined headers) of an outgoing message (308). The translation table 212 may store pointers 216 to any number of pre-defined headers 218-1 through 218-n, stored in a header memory 220. As one example, the gateway circuitry 148 may apply the translation table 212 when performing hardware assisted protocol translation of a message received on a first network or bus type (e.g., the CAN bus) that the control circuitry 214 decides to send as an outgoing message on a second network or bus type (e.g., the Ethernet network). Note that there may be multiple translation tables 212 defined in the gateway 136. The translation tables may be prepared in advance for any particular destination network interfaces. For instance, a translation table may be prepared in advance to provide Ethernet network headers for hardware accelerated translation of incoming messages (e.g., from a CAN bus) that are destined for an Ethernet network interface.
The translation table 212 extends over a pro-defined address space and is responsive to an index input. At each address in the address space, the translation table 212 may store a pointer (not necessarily unique) to a pre-defined header in the header memory 220. In other implementations, the translation table 212 stores the pre-defined headers, rather than pointers to the pre-defined headers.
In one particular implementation, the address space is 11-bits wide, or 2048 entries. The address space may thereby correspond to the entire space of possible 11-bit message identifiers for CAN messages and FlexRay messages, for example. This address space also covers the 6-bit space of LIN message identifiers. That is, the message identifier may be the index input, and for each possible message identifier, there may be a pointer in the translation table 212 that points to a pre-defined message header in the header memory 220. As such, the gateway circuitry 148 implements an extremely fast lookup (e.g., in hardware or firmware) for translating messages from one network or bus type to another. The pre-defined message headers may be prepared for any particular type of network or bus interface. When the pre-defined message headers are Ethernet headers, the pre-defined message headers may include any pre-defined set of header data, including one or more of Ethernet header data (e.g., source MAC address and destination MAC address), IP header data (e.g., source and destination address), and TCP or UDP header data (e.g., source and destination port).
In some implementations, as shown in the example 400 in
Other implementations may be enhanced by having the control circuitry 214 perform message aggregation. Aggregation may be employed when, for instance, network B has substantially higher throughput than network A, and/or the message overhead on the network B is substantially greater than the message payload. One example of such an instance are CAN bus messages flowing to the Ethernet network. For aggregation, the control circuitry 214 may be configured to aggregate the message payloads with additional subsequently received message payloads into a single outgoing message (e.g., a single Ethernet packet). Multiple message payloads associated with a given specific protocol (e.g., the CAN bus protocol) may be destined for a common recipient, e.g., as reflected by having a common pre-defined header determined from the individual message identifiers as received. The control circuitry 214 may aggregate these message payloads into a common outgoing message. The control circuitry 214 may perform aggregation, until a transmission criterion or criteria are satisfied. One example criterion is that the outgoing message reaches maximum length. Another example criterion is that a pre-defined maximum buffer latency has reached a threshold limit, and delaying messages for further aggregation will have adverse effect on the real-time system performance. The gateway may then implement an aggregation timer. The control circuitry 214 may start the aggregation timer when the first message payload is added to the outgoing message and continue aggregation until the maximum time is reached. Yet another example criterion is that a message payload with greater than a pre-defined threshold level of priority is received, and this may preempt low priority message aggregation.
Expressed another way, the in-vehicle network gateway 136 receives a message on a protocol A network or bus interface. The message includes a message identifier and a payload. The in-vehicle network gateway 136 performs message routing to determine if the gateway 136 needs to perform a translation of the message for transmission through a protocol B network or bus interface, where protocol A and protocol B are different automotive network communication protocols. The gateway 136 also determines whether or not to apply hardware acceleration to the translation.
When applying hardware acceleration, the in-vehicle network gateway 136 may perform a lookup in a translation table based on the message identifier to identify a pre-defined protocol B header for that message identifier. The in-vehicle network gateway 136 receives the pre-defined protocol B header, receives the message payload, and prepares a protocol B message including the pre-defined protocol B header and the message payload. The in-vehicle network gateway 136 transmits the protocol B message (e.g., an Ethernet packet) through the protocol B network or bus interface.
Hardware acceleration is optional, and may be enabled or disabled according to a global configuration parameter, or enabled or disabled on a message-by-message basis, e.g., in configuration settings stored in memory (see below).
The configuration settings 606 may be set by any authorized system operator. The configuration settings 606 may include an acceleration setting that indicates whether the in-vehicle network gateway 136 will execute hardware acceleration for protocol translation, including message filtering, pre-defined header lookup, and message aggregation. These three acceleration aspects may be enabled or disabled separately within the configuration settings 606.
The control circuitry 214 reads the configuration settings 606 (702). When the configuration settings 606 specify that hardware acceleration will not be applied (704), the control circuitry 214 may submit each received message to the software protocol stack 604 for processing (706). Otherwise, the gateway circuitry 148 may execute any of the hardware acceleration aspects described above. In some implementations, the message filter 210 may apply regardless of whether the configuration settings 606 indicate to use hardware acceleration. The software protocol stack 604 may be implemented as an automotive open system architecture (AutoSAR) compliant software stack, e.g., implementing AUTOSAR release 4.2.
A specific example shows the protocol conversion between a CAN message and an Ethernet message. The gateway circuitry 148 defines multiple different automotive network or bus interfaces, including a CAN automotive bus interface and an Ethernet protocol automotive network interface. Buffer circuitry coupled to the CAN automotive bus interface receives messages on the CAN automotive bus interface. The messages include an 11-bit or 29-bit message identifier and a message payload.
The message filter 210 determines which of the messages to pass for hardware accelerated protocol translation and which to discard or ignore. In this example, the message routing table 211 has determined that the target interface is the Ethernet interface. The translation table 212 defined for the Ethernet interface has an index input that receives a table index value and for each value of the index input, stores a pointer to a pre-defined Ethernet header.
The control circuitry 214 receives a particular message passed by the message filter. After routing the message, the control circuitry 214 also obtains a particular Ethernet header for the particular message through the translation table and generates an Ethernet packet comprising the particular Ethernet header and the data payload of the particular message. The control circuitry 214 transmits the Ethernet packet through the Ethernet protocol automotive network interface.
As just one example, the CPUs 814 may implement all or part of the control circuitry 214 discussed above, while the RAM 816 (alone or in combination with other memory types) may implement the memory system and store the routing table 211, translation table 212, pre-defined headers 218-1-218-n, the software protocol stack 604, and provide general purpose memory storage for the in-vehicle network gateway 136. The hardware acceleration circuitry 818 may include, e.g., buffers 822 for storing messages, message filters 824, the hash circuitry 826, and the routing tables 828 for determining the destination interface (e.g., as an alternative implementation to routing tables stored in the RAM 816).
The in-vehicle network gateway 136 handles both intra-protocol switching and inter-protocol switching, e.g., CAN-to-CAN traffic as well as CAN-to-Ethernet traffic. The in-vehicle network gateway 136 also handles speed mismatches between interfaces, e.g., traffic from Ethernet to CAN. In that regard, as will be described in more detail below, the in-vehicle network gateway 136 may use the packet buffers in the Ethernet switch 804 to store packets from the Ethernet interface and then shape the traffic out to the CAN (or other) interface. In some implementations, the in-vehicle network gateway 136 may provide priority handling of messages, e.g., prioritize high priority messages over low priority message. In this respect, the in-vehicle network gateway 136 may treat non-Ethernet interfaces as logical ports, and add different queues per non-Ethernet interface assigned to low and high priority traffic.
When the message is fully received, then at (3) the CPU reads the message and processes it. For instance, the CPU may execute the software protocol stack 604 to perform initial processing on the message to obtain the message identifier. At (4), the CPU uses the message identifier to perform a routing function and determine whether the message destination is another CAN bus, a LIN bus, a FlexRay bus, Ethernet network, or any combination of networks and buses. In the use case 900, it is assumed that the message will be sent out on a LIN bus. The CPU sends the message down the software protocol stack 604, which delivers the message at (5) to the corresponding LIN controller for transmission.
At (3), the CPU reads the message. At (4), the CPU uses the message identifier to perform a routing function and determine that the message destination in this example is an Ethernet port. In such cases, at (5) the index value (e.g., the 11-bit hash or received message identifier) is applied to the translation table (e.g., in the RAM 816) to look up the corresponding pre-configured Ethernet header. The pre-configured Ethernet header may include encapsulation, e.g., under IEEE 1722a for automotive related data streams.
At (6) the retrieved pre-configured header is pre-pended to the message payload and the resulting outgoing message is sent to the Ethernet switch 804 via the MAC 810. Note that if aggregation is enabled, the aggregation may result in multiple incoming message payloads placed into a single outgoing Ethernet packet. At (7), the outgoing message is queued as an Ethernet frame in the appropriate queue at the egress port (or ports). The queue may be selected responsive to class of service information present in the outgoing message (and specified, e.g., in the pre-configured header) and detected by processing circuitry in the ingress pipeline of the Ethernet switch 804. At (8), the outgoing message the Ethernet switch 804 schedules and transmits the outgoing message out of the destination port (or ports). Note that in the to-Ethernet direction, the Ethernet data rate (e.g., 100 Mbps) is typically much faster than the incoming data rate from CAN, LIN, or FlexRay (e.g., 1 Kbps to 10 Mbps). As a result, the Ethernet switch 804 can readily handle the incoming data flow.
Note that in the from-Ethernet direction, the incoming data rate is much faster than the outgoing data rate. For this reason, the gateway circuitry 802 shapes the switch queues to match the rate of the target network or bus interface. At (3), the MAC 810 receives the Ethernet frame, and the CPU 814 reads and processes the Ethernet frame. Note that the incoming Ethernet frame may include IEEE 1722a encapsulation that specifies a message identifier and other automotive data flow information. At (4), the CPU 814 reads the encapsulation information and performs a routing function and determines the destination, e.g., the CAN bus for the message identifier. At (5), the CPU passes the Ethernet frame down the software protocol stack 604, which converts the Ethernet frame to a CAN message protocol format, and sends the CAN message to the CAN controller for transmission.
In this example, responsive to the configuration settings 606, the CPU determines to bypass hardware acceleration. As a result, the CPU passes the received message back to the software protocol stack 604. The software protocol stack 604 prepares the outgoing Ethernet message and passes the outgoing message to the MAC 810. At (5), the MAC conveys the outgoing message from the system bus 812 to the Ethernet switch 804. The Ethernet switch 804 queues and transmits the outgoing message to the destination port, at (6). A similar message flow from Ethernet to CAN/LIN/FlexRay may occur using the software protocol stack 604 and bypassing the hardware acceleration.
The methods, devices, processing, modules, and logic described above may be implemented in many different ways and in many different combinations of hardware and software. For example, all or parts of the implementations may be circuitry that includes an instruction processor, such as a Central Processing Unit (CPU), microcontroller, or a microprocessor; an Application Specific Integrated Circuit (ASIC), Programmable Logic Device (PLD), or Field Programmable Gate Array (FPGA); or circuitry that includes discrete logic or other circuit components, including analog circuit components, digital circuit components or both; or any combination thereof. The circuitry may include discrete interconnected hardware components and/or may be combined on a single integrated circuit die, distributed among multiple integrated circuit dies, or implemented in a Multiple Chip Module (MCM) of multiple integrated circuit dies in a common package, as examples.
The circuitry may further include or access instructions for execution by the circuitry. The instructions may be stored in a tangible storage medium that is other than a transitory signal, such as a flash memory, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM); or on a magnetic or optical disc, such as a Compact Disc Read Only Memory (CDROM), Hard Disk Drive (HDD), or other magnetic or optical disk; or in or on another machine-readable medium. A product, such as a computer program product, may include a storage medium and instructions stored in or on the medium, and the instructions when executed by the circuitry in a device may cause the device to implement any of the processing described above or illustrated in the drawings.
The implementations may be distributed as circuitry among multiple system components, such as among multiple processors and memories, optionally including multiple distributed processing systems. Parameters, databases, and other data structures may be separately stored and managed, may be incorporated into a single memory or database, may be logically and physically organized in many different ways, and may be implemented in many different ways, including as data structures such as linked lists, hash tables, arrays, records, objects, or implicit storage mechanisms. Programs may be parts (e.g., subroutines) of a single program, separate programs, distributed across several memories and processors, or implemented in many different ways, such as in a library, such as a shared library (e.g., a Dynamic Link Library (DLL)). The DLL, for example, may store instructions that perform any of the processing described above or illustrated in the drawings, when executed by the circuitry.
Various implementations have been specifically described. However, many other implementations are also possible.
This application is a divisional application of U.S. application Ser. No. 14/923,996, filed Oct. 27, 2015, which claims priority to provisional application Ser. No. 62/218,218, filed Sep. 14, 2015, which is entirely incorporated by reference.
Number | Date | Country | |
---|---|---|---|
62218218 | Sep 2015 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 14923996 | Oct 2015 | US |
Child | 16238358 | US |