CN115460044B - Vehicle-mounted gateway based on SOC (system on chip), control method and vehicle-mounted device - Google Patents
Vehicle-mounted gateway based on SOC (system on chip), control method and vehicle-mounted device Download PDFInfo
- Publication number
- CN115460044B CN115460044B CN202211055769.4A CN202211055769A CN115460044B CN 115460044 B CN115460044 B CN 115460044B CN 202211055769 A CN202211055769 A CN 202211055769A CN 115460044 B CN115460044 B CN 115460044B
- Authority
- CN
- China
- Prior art keywords
- module
- data
- switching
- vehicle
- switching module
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/215—Flow control; Congestion control using token-bucket
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/6275—Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a vehicle-mounted gateway based on an SOC (system on chip), a control method and a vehicle-mounted device, wherein the vehicle-mounted gateway comprises an SOC core processing module, an Ethernet interface module, a CAN interface module, a storage module and a power management module, and the Ethernet interface module, the CAN interface module, the storage module, a USB (universal serial bus) module and the power management module are all connected with the SOC core processing module; the FPGA unit of the SOC core processing module adopts a two-layer switching network design and comprises a main switching module SW1, an auxiliary switching module SW2 and a switching module switching and redundancy control module, when the forward state of the SW1 is detected to be normal, the SW2 is controlled to discard received data, the data is not forwarded, when the forward state of the SW1 is detected to be abnormal, the SW1 is controlled not to forward the data, the data is switched to the SW2 for data receiving and transmitting, and meanwhile, the SW1 is reset. The invention carries out redundancy design on the Ethernet switching part of the core, enhances the reliability of the gateway and has strong data acquisition and processing capacity.
Description
Technical Field
The invention belongs to the technical field of vehicle-mounted communication, and particularly relates to a vehicle-mounted gateway based on an SOC (system on chip), a control method and a vehicle-mounted device.
Background
The vehicle-mounted gateway is an important part of the whole automobile, and network data such as a data exchange hub, CAN, LIN, MOST, flexRay and the like of the whole automobile network can be routed in different networks through the vehicle-mounted gateway. The utility model provides a vehicle-mounted gateway among the prior art, including control module, control module's link is connected with storage module, data acquisition module, information processing module, signal acquisition module, network module, data acquisition module, information processing module, signal acquisition module's output is connected at network module's link, data acquisition module's link is connected with CAN bus module, network module's link is connected with serial module, platform module and positioning module to under gateway module's synergism, convenience of customers arranges oneself's plan of riding in good time, thereby improves trip efficiency greatly. However, the vehicle-mounted gateway has low communication rate and poor reliability, and cannot meet the requirement of the centralized vehicle-mounted device of the domain controller.
Disclosure of Invention
The invention aims to overcome the defects and shortcomings of the prior art and provides a vehicle-mounted gateway, a control method and a vehicle-mounted device based on an SOC (system on chip), which improve the safety and reliability of the whole vehicle through the redundant design of an Ethernet exchange module.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a vehicle-mounted gateway based on an SOC chip, including an SOC core processing module, an ethernet interface module, a CAN interface module, a storage module, and a power management module, where the ethernet interface module, the CAN interface module, the storage module, the USB module, and the power management module are all connected to the SOC core processing module;
the SOC core processing module comprises a CPU unit and an FPGA unit, wherein the CPU unit is used for circuit monitoring, system configuration, power management, routing table maintenance and routing calculation; the FPGA unit adopts a two-layer switching network design and is used for realizing control of a switching mode, and comprises a main switching module SW1, an auxiliary switching module SW2 and a switching module switching and redundancy control module, when the vehicle-mounted gateway works normally, the main switching module SW1 completes data receiving and forwarding, the auxiliary switching module SW2 performs data receiving and checking, the forwarding state of the main switching module SW1 is detected, when the forwarding state of the main switching module SW1 is detected to be normal, the switching module switching and redundancy control module sends a first control instruction, the auxiliary switching module SW2 is controlled to discard received data, data forwarding is not performed, when the forwarding state of the main switching module SW1 is detected to be abnormal, the switching module switching and redundancy control module sends a second control instruction, the main switching module SW1 is controlled not to forward data, and is switched to the auxiliary switching module SW2 to perform data receiving and transmitting and receiving, and simultaneously the main switching module SW1 resets;
the Ethernet interface module is used for connecting an external network port through the main switching module SW1 and the auxiliary switching module SW 2;
the CAN interface module is used for carrying out internal communication with an executing element of the whole vehicle;
the storage module is used for storing configuration data, program data and whole vehicle operation memory data;
the power management module is used for providing electric energy for the SOC core processing module and the Ethernet interface module.
Further, the main switch module SW1 and the auxiliary switch module SW2 have the same structure and each include a MAC control module, a port scheduling module, a message parsing and classifying module, a packaging module, a data buffer module, a Hash table module, a data priority classifying module, an error detection control module, a packet splitting module, a token bucket scheduling module and a SW control module; the MAC control module is connected with the port scheduling module, the port scheduling module is connected with the packing module and the message analysis and classification module respectively, the packing module is connected with the packet distribution module, the packet distribution module is connected with the error detection control module, the error detection control is connected with the SW control module, the message analysis module classification module is connected with the data caching module and the Hash table module, the data caching module and the Hash table module are connected with the data priority classification module, the data priority classification module is connected with the token bucket scheduling module through a plurality of token buckets, and the token bucket scheduling module is connected with the error detection control module.
Further, the MAC control module is used for learning the MAC address of the data message, and then the port scheduling module forwards the data message according to the MAC address table;
the port scheduling module is used for controlling the receiving and transmitting of the data packet and determining a port for transmitting the data packet;
the message analysis and classification module is used for extracting the five-tuple of the message and shunting the five-tuple and the data packet; the five-tuple comprises a source IP address, a source port, a target IP address, a target port and a transport layer protocol;
the packaging module is used for packaging data and increasing the data message header and the MAC address;
the data caching module is used for caching the data messages received by each port, forming a data queue and sending the data queue to the priority classification module;
the Hash table module is used for inquiring the message priority and the security policy, outputting the data packet priority and the security policy and entering the priority classification module;
the data priority classification module is used for determining whether to open a token bucket according to whether the data packet is safe or not, the data packet which does not accord with the safety rule is not accepted, discarding the accepted data packet, and determining which token bucket the data packet goes to according to the priority;
the error detection control module is used for checking the data output by the token bucket, and if the data is discarded by an error, the data is continuously transmitted without the error;
the packet splitting module is used for determining two-layer forwarding or three-layer forwarding according to the type of the message, and the CPU unit receives the data message of the three layers and configures a message forwarding port;
the token bucket scheduling module is used for scheduling token buckets with priority and outputting data; the output data passes through the forwarding engine, is packed by the module, and enters the port scheduling module;
the SW control module is used for detecting the use condition of the received data buffer zone and controlling the port to send and receive data.
Further, the packaging module is connected with the packet distribution module through a two-layer engine and a three-layer engine, and the packet distribution module determines that the data output by the token bucket is forwarded in two layers or three layers according to the priority and the security policy; the two-layer engine realizes the function of a two-layer switch, and the three-layer engine realizes the function of a three-layer switch.
Furthermore, the main switch module SW1 and the auxiliary switch module SW2 further include a CPU configuration port, where the CPU configuration port is used for setting a Hash table module and reading parameters, setting a VLAN, an IP address, and an interface access, and implementing a three-layer forwarding function.
Further, the MAC control module includes a plurality of MAC units, and the plurality of MAC units are connected in parallel with the port scheduling module.
Further, the storage module comprises Flash, EEPROM and DDR;
and the CAN interface module reserves 2 CAN bus interfaces, and the 2 CAN bus interfaces are connected with the CPU unit through a CAN bus.
Further, the device also comprises an interface detection module JTAG, a USB module, a digital quantity input/output module and an analog quantity acquisition module; and the interface detection module JTAG, the USB module, the digital quantity input/output module and the analog quantity acquisition module are all connected with the SOC core processing module.
In a second aspect, an embodiment of the present invention further provides a control method of a vehicle gateway, applied to the vehicle gateway based on the SOC chip, where the control method includes the following steps:
the SOC core processing module is externally connected with network port equipment through an Ethernet interface to acquire the data flow of the network port equipment;
when the vehicle-mounted gateway works normally, the main switching module SW1 completes data receiving and forwarding, the auxiliary switching module SW2 performs data receiving and checking, and the forwarding state of the main switching module SW1 is detected;
when the forward state of the main switching module SW1 is detected to be normal, the switching module switching and redundancy control module sends a first control instruction to inform the auxiliary switching module SW2 to discard the received data, and the error detection control module discards the data message and does not forward the data;
when detecting that the forwarding state of the main switching module SW1 is abnormal, the switching module switching and redundancy control module sends a second control instruction to control the main switching module SW1 not to forward data any more, and the main switching module SW1 is switched to the auxiliary switching module SW2 to transmit and receive data, and the CPU unit resets the main switching module SW 1;
when the burst occurs in the data stream, the switching module and redundancy control module controls the auxiliary switching module SW2 to receive the data, the main switching module SW1 does not receive the data any more, only transmits the data, the auxiliary switching module SW2 finishes storing the received data, and after the main switching module SW1 finishes data forwarding of the buffer zone, the auxiliary switching module SW2 transmits the data again.
In a third aspect, an embodiment of the present invention further provides a vehicle-mounted device, including a device housing, where the vehicle-mounted gateway based on the SOC chip is disposed in the device housing.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the SOC core processing module adopts a two-layer switching network design, when the vehicle-mounted gateway works normally, the main switching module SW1 receives and forwards data, the auxiliary switching module SW2 receives and checks the data and detects the forwarding state of the main switching module SW1, when the forwarding state of the main switching module SW1 is detected to be normal, the switching module switching and redundancy control module sends out a first control instruction to control the auxiliary switching module SW2 to discard received data and not forward the data, and when the forwarding state of the main switching module SW1 is detected to be abnormal, the switching module switching and redundancy control module sends out a second control instruction to control the main switching module SW1 not to forward the data and switch to the auxiliary switching module SW2 to transmit and receive the data, and meanwhile, the main switching module SW1 resets. The main exchange module SW1 and the auxiliary exchange module SW2 monitor the state of the other party in real time, so as to prevent the communication interruption caused by the dead halt of the modules and influence the vehicle-mounted Ethernet communication; when the burst of the data quantity occurs, the data cache overflow can be reduced through the pipeline technology, the problem of cache overflow caused by the burst of the data quantity is solved, the reliability of the system is improved, and the probability of network errors is reduced. In addition, the invention adopts the integrated SOC chip, thereby reducing the volume of the gateway, reducing the power consumption and increasing the reliability of the system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a vehicle gateway based on an SOC chip in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a two-layer switching network structure of a vehicle-mounted Ethernet in an embodiment of the invention;
fig. 3 is a flowchart of a vehicle gateway control method in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an in-vehicle apparatus according to an embodiment of the present invention;
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.
Referring to fig. 1, in an embodiment of the present application, a vehicle gateway based on an SOC chip is provided, including an SOC core processing module, an ethernet interface module, a CAN interface module, a storage module, and a power management module, where the ethernet interface module, the CAN interface module, the storage module, the USB module, and the power management module are all connected to the SOC core processing module. In the embodiment, the Ethernet switching module and the hardware interface are designed and realized through hardware programming, and the CPU is realized by using a multi-core processor of the SOC chip; the Ethernet two-layer switching module is realized through hardware programming, and the redundancy design is realized by using two Ethernet two-layer switching modules, so that the reliability of the system is improved.
Further, the SOC core processing module includes a CPU unit and an FPGA unit, where the CPU unit is configured to perform circuit monitoring, system configuration, power management, maintenance of a routing table, and route calculation, and the FPGA unit is configured to implement control of a switching manner by using a two-layer switching network, and includes a main switching module SW1, an auxiliary switching module SW2, and a switching module switching and redundancy control module, and when the vehicle gateway normally works, the main switching module SW1 completes data receiving and forwarding, the auxiliary switching module SW2 performs data receiving and checking, and detects a forwarding state of the main switching module SW1, and when it is detected that the forwarding state of the main switching module SW1 is normal, the switching module switching and redundancy control module sends a first control instruction to control the auxiliary switching module SW2 to discard received data, and when it is detected that the forwarding state of the main switching module SW1 is abnormal, the switching module switching and redundancy control module sends a second control instruction to control the main switching module SW1 to no longer perform data forwarding, and switch to the auxiliary switching module SW2 to perform data receiving and resetting.
Further, referring to fig. 2, the main switch module SW1 and the auxiliary switch module SW2 have the same structure, and the main switch module SW1 is described below as an example, where the main switch module SW1 includes a MAC control module, a port scheduling module, a message parsing and classifying module, a packaging module, a data buffering module, a Hash table module, a data priority classifying module, an error detection control module, a packet splitting module, a token bucket scheduling module and a SW1 control module; the system comprises a packaging module, a packet distribution module, an error detection control module, a SW1 control module, a data buffer module, a Hash table module, a data priority classification module, a token bucket scheduling module and an error detection control module, wherein the packaging module is connected with the packet distribution module, the error detection control module is connected with the SW1 control module, the packet analysis module is connected with the data buffer module and the Hash table module, the data buffer module and the Hash table module are connected with the data priority classification module, the data priority classification module is connected with the token bucket scheduling module through a plurality of token buckets, and the token bucket scheduling module is connected with the error detection control module.
And the MAC control module is used for learning the MAC address of the data message, and then the port scheduling module forwards the data message according to the MAC address table.
The port scheduling module is used for receiving and transmitting the data packet and determining a port for transmitting the data packet.
The message analysis and classification module is used for extracting the five-tuple of the message and shunting the five-tuple and the data packet; the five-tuple comprises a source IP address, a source port, a target IP address, a target port and a transport layer protocol.
The packaging module is used for data packaging and increasing the data message header and the MAC address.
The data caching module is used for caching the data messages received by the ports, forming a data queue and sending the data queue to the priority classification module.
The Hash table module is used for inquiring the message priority and the security policy, outputting the data packet priority and the security policy and entering the priority classification module.
The data priority classification module is used for determining whether to open the token bucket according to whether the data packet is safe or not, the data packet which does not accord with the safety rule is not accepted, discarding is carried out, and the accepted data packet determines which token bucket the data packet goes to according to the priority.
And the error detection control module is used for checking the data output by the token bucket, and if the data is discarded by an error, the data is continuously transmitted without the error.
The packet splitting module is used for determining two-layer forwarding or three-layer forwarding according to the type of the message, and the CPU unit receives the data message of the three layers and configures a message forwarding port.
The token bucket scheduling module is used for scheduling token buckets with priority and outputting data; the output data passes through the forwarding engine, is packed by the module, and enters the port scheduling module.
The SW control module is used for detecting the use condition of the received data buffer zone and controlling the port to send and receive data.
It can be understood that the port scheduling module sends the scheduled data to the message parsing and classifying module by receiving the data sent by the packaging module on one hand and sending the scheduled data to the message parsing and classifying module on the other hand; the packet splitting module splits packet data to the packaging module through a two-layer engine or a three-layer engine, and the data of the packaging module is derived from the error detection control module.
Further, in this embodiment, the forwarding engines are hierarchically arranged and divided into two-layer engines and three-layer engines, and the packet splitting module determines that the data output by the token bucket is forwarded in two layers or three layers according to the priority and the security policy; the two-layer engine is utilized to realize the two-layer switch function, and the three-layer engine is utilized to realize the three-layer switch function.
It can be understood that, the data analyzed by the message analyzing and classifying module is stored in the data caching module according to different classifications, the other class is written in the Hash table module through the five-tuple shape, the data in the caching module and the Hash table module are sent to the priority classifying module through the priority and the security policy, and the priority classifying module is detected by the error detection control module after being processed by the token bucket scheduling module.
It is noted that the SW1 control module may directly control the data stored in the data buffer module, so as to more efficiently implement the data exchange operation.
The main switching module SW1 and the auxiliary switching module SW2 further comprise CPU configuration ports, and the CPU configuration ports are used for setting the Hash table module and reading parameters, setting VLAN, IP address and interface access, and realizing three-layer forwarding function.
The MAC control module comprises a plurality of MAC units, and the plurality of MAC units are connected with the port scheduling module in parallel; exemplary, the MAC control module of the present embodiment includes a MAC 0 -MAC 16 The 17 MAC units are all connected to the port scheduling module.
It can be understood that the structure and the working mode of the auxiliary switch module SW2 are the same as those of the main switch module SW1, the main switch module SW1 and the auxiliary switch module SW2 are connected with the switch module switching and redundancy control module, and the switch and redundancy control module is used for switching and controlling the working states of the main switch module SW1 and the auxiliary switch module SW2.
In addition, referring again to fig. 2, the auxiliary switch module SW2 also includes a MAC 0 -MAC 16 Wherein the MAC of the main switching module SW1 0 MAC with auxiliary switching module SW2 0 Connection, MAC of the main switching module SW1 1 MAC with auxiliary switching module SW2 1 Connection, and so on, the MAC of the main switch module SW1 16 MAC with auxiliary switching module SW2 16 And (5) connection.
In one embodiment, the ethernet interface module is configured to connect to an external network port through the main switch module SW1 and the auxiliary switch module SW2, where the external network port may be multiple and connected in parallel to the ethernet interface module, for example, the network port 1 and the network port 2 … network port n are arranged in parallel, and then connect to the main switch module SW1 and the auxiliary switch module SW2 through the ethernet interface module.
Further, the CAN interface module is used for carrying out internal communication with an executing element of the whole vehicle; the CAN interface module reserves 2 paths of CAN bus interfaces for communication of modules such as an automobile ECU, a sensor and an actuator, and the CAN interfaces are directly connected with a CPU unit of the SOC core processing module through the CAN bus, so that data acquisition and protocol conversion CAN be completed according to requirements, and edge calculation and data processing CAN be performed.
Further, the storage module is used for storing configuration data, program data and whole vehicle operation memory data; illustratively, the memory module includes Flash, EEPROM, DDR.
The power management module is used for providing electric energy for the SOC core processing module and the Ethernet interface module. Illustratively, the power management module provides a voltage of 12-36V.
In one embodiment, the vehicle gateway based on the SOC chip further includes a digital input/output module and an analog acquisition module, where the digital input/output module and the analog acquisition module include 4 paths of digital bright inputs, 4 paths of digital outputs, and 2 paths of analog input channels, and may be used for sensor edge data acquisition, an actuator, and power output control, for example. The analog quantity data acquisition adopts a 12-bit high-precision ADC, the digital quantity output adopts a relay for output, and the power supply and the output driving of an actuator can be performed.
In one embodiment, the vehicle-mounted gateway based on the SOC chip further comprises a serial port module, wherein the serial port module comprises an RS485/RS232 serial interface, and the serial interface is connected with a CPU of the SOC core processing module in a similar way. The serial port module can be used for debugging gateway equipment and upgrading programs, can also be used for accessing automobile sensors and controllers, and can be used for data acquisition and control.
In one embodiment, the on-board gateway based on the SOC chip further includes an interface detection module JTAG, and the SOC core processing module is detected by the interface detection module JTAG.
In one embodiment, the vehicle gateway based on the SOC chip further includes a USB module, through which an external USB device, such as a USB disk, may be connected. The USB module supports OTG application, and can be used for copying files and configuring equipment.
Referring to fig. 3, in another embodiment of the present application, a control method of a vehicle gateway is provided, where the control method includes the following steps:
s1, an SOC core processing module is externally connected with network port equipment through an Ethernet interface to acquire a data stream of the network port equipment;
s2, when the vehicle-mounted gateway works normally, the main switching module SW1 completes data receiving and forwarding, the auxiliary switching module SW2 performs data receiving and checking, and the forwarding state of the main switching module SW1 is detected;
s3, when detecting that the forwarding state of the main switching module SW1 is normal, the switching module switching and redundancy control module sends a first control instruction to inform the auxiliary switching module SW2 to discard the received data, and the error detection control module discards the data message and does not perform data forwarding
S4, when detecting that the forwarding state of the main switching module SW1 is abnormal, the switching module switching and redundancy control module sends a second control instruction to control the main switching module SW1 not to forward data any more, and the auxiliary switching module SW2 is switched to transmit and receive data, and the CPU unit resets the main switching module SW 1;
s5, when the burst occurs in the data stream, the switching module and redundancy control module controls the auxiliary switching module SW2 to receive the data, the main switching module SW1 does not receive the data any more, only transmits the data, the auxiliary switching module SW2 finishes storing the received data, and after the main switching module SW1 finishes data forwarding of the buffer zone, the auxiliary switching module SW2 transmits the data again.
The control method of the vehicle-mounted gateway of the embodiment completes a working mode of a production line and prevents data packet loss caused by cache overflow.
Referring to fig. 4, in another embodiment of the present application, a vehicle-mounted device is provided, including a device housing, in which the vehicle-mounted gateway based on an SOC chip is disposed, where the vehicle-mounted gateway includes an SOC core processing module, an ethernet interface module, a CAN interface module, a storage module, and a power management module, where the ethernet interface module, the CAN interface module, the storage module, the USB module, and the power management module are all connected to the SOC core processing module;
the SOC core processing module comprises a CPU unit and an FPGA unit, wherein the CPU unit is used for circuit monitoring, system configuration, power management, routing table maintenance and routing calculation; the FPGA unit adopts a two-layer switching network design and is used for realizing control of a switching mode, and comprises a main switching module SW1, an auxiliary switching module SW2 and a switching module switching and redundancy control module, when the vehicle-mounted gateway works normally, the main switching module SW1 completes data receiving and forwarding, the auxiliary switching module SW2 performs data receiving and checking, the forwarding state of the main switching module SW1 is detected, when the forwarding state of the main switching module SW1 is detected to be normal, the switching module switching and redundancy control module sends a first control instruction, the auxiliary switching module SW2 is controlled to discard received data, data forwarding is not performed, when the forwarding state of the main switching module SW1 is detected to be abnormal, the switching module switching and redundancy control module sends a second control instruction, the main switching module SW1 is controlled not to forward data, and is switched to the auxiliary switching module SW2 to perform data receiving and transmitting and receiving, and simultaneously the main switching module SW1 resets;
the Ethernet interface module is used for connecting an external network port through the main switching module SW1 and the auxiliary switching module SW 2;
the CAN interface module is used for carrying out internal communication with an executing element of the whole vehicle;
the storage module is used for storing configuration data, program data and whole vehicle operation memory data;
the power management module is used for providing electric energy for the SOC core processing module and the Ethernet interface module.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above examples, and any other changes, modifications, substitutions, combinations, and simplifications that do not depart from the spirit and principle of the present invention should be made in the equivalent manner, and the embodiments are included in the protection scope of the present invention.
Claims (10)
1. The vehicle-mounted gateway based on the SOC chip is characterized by comprising an SOC core processing module, an Ethernet interface module, a CAN interface module, a storage module and a power management module, wherein the Ethernet interface module, the CAN interface module, the storage module, the USB module and the power management module are all connected with the SOC core processing module;
the SOC core processing module comprises a CPU unit and an FPGA unit, wherein the CPU unit is used for circuit monitoring, system configuration, power management, routing table maintenance and routing calculation; the FPGA unit adopts a two-layer switching network design and is used for realizing control of a switching mode, and comprises a main switching module SW1, an auxiliary switching module SW2 and a switching module switching and redundancy control module, when the vehicle-mounted gateway works normally, the main switching module SW1 completes data receiving and forwarding, the auxiliary switching module SW2 performs data receiving and checking, the forwarding state of the main switching module SW1 is detected, when the forwarding state of the main switching module SW1 is detected to be normal, the switching module switching and redundancy control module sends a first control instruction to control the auxiliary switching module SW2 to discard received data, data forwarding is not performed, when the forwarding state of the main switching module SW1 is detected to be abnormal, the switching module switching and redundancy control module sends a second control instruction to control the main switching module SW1 not to forward data, the auxiliary switching module SW2 performs data receiving and transmitting, and the CPU unit resets the main switching module SW 1; when the burst occurs in the data stream, the switching module switching and redundancy control module controls the auxiliary switching module SW2 to receive the data, the main switching module SW1 does not receive the data any more, only transmits the data, the auxiliary switching module SW2 finishes storing the received data, and after the main switching module SW1 finishes forwarding the data in the buffer zone, the auxiliary switching module SW2 transmits the data again;
the Ethernet interface module is used for connecting an external network port through the main switching module SW1 and the auxiliary switching module SW 2;
the CAN interface module is used for carrying out internal communication with an executing element of the whole vehicle;
the storage module is used for storing configuration data, program data and whole vehicle operation memory data;
the power management module is used for providing electric energy for the SOC core processing module and the Ethernet interface module.
2. The SOC-based vehicle-mounted gateway of claim 1, wherein the main switch module SW1 and the auxiliary switch module SW2 have the same structure and each include a MAC control module, a port scheduling module, a packet parsing and classifying module, a packing module, a data caching module, a Hash table module, a data priority classifying module, an error detecting control module, a packet splitting module, a token bucket scheduling module and a SW control module; the MAC control module is connected with the port scheduling module, the port scheduling module is connected with the packing module and the message analysis and classification module respectively, the packing module is connected with the packet distribution module, the packet distribution module is connected with the error detection control module, the error detection control is connected with the SW control module, the message analysis and classification module is connected with the data caching module and the Hash table module, the data caching module and the Hash table module are connected with the data priority classification module, the data priority classification module is connected with the token bucket scheduling module through a plurality of token buckets, and the token bucket scheduling module is connected with the error detection control module.
3. The vehicle gateway based on the SOC chip of claim 2, wherein the MAC control module is used for learning the MAC address of the data message, and then the port scheduling module forwards the data message according to the MAC address table;
the port scheduling module is used for controlling the receiving and transmitting of the data packet and determining a port for transmitting the data packet;
the message analysis and classification module is used for extracting the five-tuple of the message and shunting the five-tuple and the data packet; the five-tuple comprises a source IP address, a source port, a target IP address, a target port and a transport layer protocol;
the packaging module is used for packaging data and increasing the data message header and the MAC address;
the data caching module is used for caching the data messages received by each port, forming a data queue and sending the data queue to the priority classification module;
the Hash table module is used for inquiring the message priority and the security policy, outputting the data packet priority and the security policy and entering the priority classification module;
the data priority classification module is used for determining whether to open a token bucket according to whether the data packet is safe or not, the data packet which does not accord with the safety rule is not accepted, discarding the accepted data packet, and determining which token bucket the data packet goes to according to the priority;
the error detection control module is used for checking the data output by the token bucket, and if the data is discarded by an error, the data is continuously transmitted without the error;
the packet splitting module is used for determining two-layer forwarding or three-layer forwarding according to the type of the message, and the CPU unit receives the data message of the three layers and configures a message forwarding port;
the token bucket scheduling module is used for scheduling token buckets with priority and outputting data; the output data passes through the forwarding engine, is packed by the module, and enters the port scheduling module;
the SW control module is used for detecting the use condition of the received data buffer zone and controlling the port to send and receive data.
4. The vehicle-mounted gateway based on the SOC chip of claim 2, wherein the packaging module is connected with the packet distribution module through a two-layer engine and a three-layer engine, and the packet distribution module determines the data output by the token bucket to perform two-layer forwarding or three-layer forwarding according to the priority and the security policy; the two-layer engine realizes the function of a two-layer switch, and the three-layer engine realizes the function of a three-layer switch.
5. The SOC-based vehicle-mounted gateway of claim 4, wherein the main switch module SW1 and the auxiliary switch module SW2 further include a CPU configuration port, the CPU configuration port is used for Hash table module setting and parameter reading, setting VLAN, IP address and interface access, and implementing a three-layer forwarding function.
6. The SOC-based vehicle-mounted gateway of claim 2, wherein the MAC control module includes a plurality of MAC units connected in parallel with the port scheduling module.
7. The SOC-chip-based vehicle-mounted gateway of claim 1, wherein the memory module comprises Flash, EEPROM, and DDR;
and the CAN interface module reserves 2 CAN bus interfaces, and the 2 CAN bus interfaces are connected with the CPU unit through a CAN bus.
8. The vehicle gateway based on the SOC chip of claim 1, further comprising an interface detection module JTAG, a USB module, a digital quantity input output module and an analog quantity acquisition module; and the interface detection module JTAG, the USB module, the digital quantity input/output module and the analog quantity acquisition module are all connected with the SOC core processing module.
9. A control method of an on-vehicle gateway, characterized by being applied to the on-vehicle gateway based on an SOC chip as claimed in any of claims 1 to 8, comprising the steps of:
the SOC core processing module is externally connected with network port equipment through an Ethernet interface to acquire the data flow of the network port equipment;
when the vehicle-mounted gateway works normally, the main switching module SW1 completes data receiving and forwarding, the auxiliary switching module SW2 performs data receiving and checking, and the forwarding state of the main switching module SW1 is detected;
when the forward state of the main switching module SW1 is detected to be normal, the switching module switching and redundancy control module sends a first control instruction to inform the auxiliary switching module SW2 to discard the received data, and the error detection control module discards the data message and does not forward the data;
when detecting that the forwarding state of the main switching module SW1 is abnormal, the switching module switching and redundancy control module sends a second control instruction to control the main switching module SW1 not to forward data any more, and the main switching module SW1 is switched to the auxiliary switching module SW2 to transmit and receive data, and the CPU unit resets the main switching module SW 1;
when the burst occurs in the data stream, the switching module and redundancy control module controls the auxiliary switching module SW2 to receive the data, the main switching module SW1 does not receive the data any more, only transmits the data, the auxiliary switching module SW2 finishes storing the received data, and after the main switching module SW1 finishes data forwarding of the buffer zone, the auxiliary switching module SW2 transmits the data again.
10. An in-vehicle device comprising a device housing, wherein the in-vehicle gateway based on an SOC chip as claimed in any one of claims 1 to 8 is provided in the device housing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211055769.4A CN115460044B (en) | 2022-08-31 | 2022-08-31 | Vehicle-mounted gateway based on SOC (system on chip), control method and vehicle-mounted device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211055769.4A CN115460044B (en) | 2022-08-31 | 2022-08-31 | Vehicle-mounted gateway based on SOC (system on chip), control method and vehicle-mounted device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115460044A CN115460044A (en) | 2022-12-09 |
CN115460044B true CN115460044B (en) | 2023-06-06 |
Family
ID=84301456
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211055769.4A Active CN115460044B (en) | 2022-08-31 | 2022-08-31 | Vehicle-mounted gateway based on SOC (system on chip), control method and vehicle-mounted device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115460044B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103250353A (en) * | 2010-09-30 | 2013-08-14 | 通用电气公司 | Communication system and method for communicating between master and slave devices |
CN106094789A (en) * | 2016-06-02 | 2016-11-09 | 上海交通大学 | The dual chip redundancy of a kind of automobile steering-by-wire and fault-tolerant control system |
WO2019192907A1 (en) * | 2018-04-04 | 2019-10-10 | Continental Automotive Gmbh | Databus system for a vehicle, vehicle access system, and method for learning a unique installation position |
CN110376876A (en) * | 2019-07-19 | 2019-10-25 | 北京交大思诺科技股份有限公司 | A kind of safety computer platform that double systems are synchronous |
CN110474943A (en) * | 2018-05-10 | 2019-11-19 | 株洲中车时代电气股份有限公司 | Vehicle net redundant system and gateway handoff method based on MVB and Ethernet |
CN110658718A (en) * | 2019-11-08 | 2020-01-07 | 北京市轨道交通建设管理有限公司 | Multi-master-control redundancy switching control method and system |
WO2020195066A1 (en) * | 2019-03-27 | 2020-10-01 | 株式会社オートネットワーク技術研究所 | On-board communication system, on-board relay device, and on-board control device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102705658B1 (en) * | 2019-11-05 | 2024-09-10 | 엘지전자 주식회사 | APPARATUS AND METHOD FOR MANAGING POWER OF MULTI SoC MODULE IN VEHICLE |
-
2022
- 2022-08-31 CN CN202211055769.4A patent/CN115460044B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103250353A (en) * | 2010-09-30 | 2013-08-14 | 通用电气公司 | Communication system and method for communicating between master and slave devices |
CN106094789A (en) * | 2016-06-02 | 2016-11-09 | 上海交通大学 | The dual chip redundancy of a kind of automobile steering-by-wire and fault-tolerant control system |
WO2019192907A1 (en) * | 2018-04-04 | 2019-10-10 | Continental Automotive Gmbh | Databus system for a vehicle, vehicle access system, and method for learning a unique installation position |
CN110474943A (en) * | 2018-05-10 | 2019-11-19 | 株洲中车时代电气股份有限公司 | Vehicle net redundant system and gateway handoff method based on MVB and Ethernet |
WO2020195066A1 (en) * | 2019-03-27 | 2020-10-01 | 株式会社オートネットワーク技術研究所 | On-board communication system, on-board relay device, and on-board control device |
CN110376876A (en) * | 2019-07-19 | 2019-10-25 | 北京交大思诺科技股份有限公司 | A kind of safety computer platform that double systems are synchronous |
CN110658718A (en) * | 2019-11-08 | 2020-01-07 | 北京市轨道交通建设管理有限公司 | Multi-master-control redundancy switching control method and system |
Non-Patent Citations (2)
Title |
---|
Boyaci, A. ; Ozturk, E. ; Yarkan, S. ; Zaim, A.H..Towards green and secure vehicle-to-vehicle communications: A protocol for establishing the network.《WFFCP》.2013,全文. * |
基于健康度的车载控制器冗余管理方法研究;戴虎;吕新军;;铁道通信信号(01);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN115460044A (en) | 2022-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10678243B2 (en) | Systems and methods for scalable electrical engineering (EE) architecture in vehicular environments | |
KR101534923B1 (en) | Ethernet backbone network system for vehicle and method for controlling fail safe of the ethernet backbone network system | |
US9356830B2 (en) | Communication device for a redundantly operable industrial communication network and method for operating the communication device | |
CN104125152B (en) | A kind of method that In-vehicle networking reliability is improved based on car borne gateway | |
CN111025959A (en) | Data management method, device and equipment and intelligent automobile | |
JP4953094B2 (en) | Packet data comparator and virus filter, virus checker and network system using the same | |
US10673986B2 (en) | Operation method of communication node for selective wake-up in vehicle network | |
ES2420110T3 (en) | A procedure, an electrical system, a digital control module and an activator control module in a vehicle | |
US11840211B2 (en) | Autonomous vehicle interface using bus impedance to identify control units, and associated systems and methods | |
CN111464505A (en) | Message processing method, device, apparatus, storage medium and processor | |
CN112729395A (en) | On-chip sensor reading system for complex SoC reliability monitoring | |
CN115460044B (en) | Vehicle-mounted gateway based on SOC (system on chip), control method and vehicle-mounted device | |
CN114465796A (en) | Safety protection method applied to vehicle-mounted firewall | |
CN106878062B (en) | A kind of more net redundancy approach of fuel cell car power performance test macro | |
Kenjić et al. | Connectivity challenges in automotive solutions | |
JP2007135011A (en) | Trunk connection unit and virtual mobile lan system | |
CN106452668B (en) | FPGA-based IED dual-channel data transmission and dual-logic verification system and method | |
JP2014007501A (en) | Communication device | |
CN103731316A (en) | Flow monitoring device and method | |
CN114979032A (en) | TTE exchange terminal, data sending method and data receiving method thereof | |
US10063465B2 (en) | Network system and relay device | |
CN113422714A (en) | Module for supporting high-integrity redundancy management on AFDX terminal | |
WO2023007209A1 (en) | Fault-tolerant distributed computing for vehicular systems | |
CN109302298B (en) | Train gateway forwarding strategy configuration method, device and system | |
CN113630220B (en) | Dual-redundancy communication method, device and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |