Configuration system and method for chip communication initialization
By setting units supporting Ethernet data transmission protocol in the serial device and the deserial device of the APHY protocol chip, data correspondence and communication link establishment between chips are realized, and the problem of data non-correspondence when configuring chips in the prior art is solved. .
Patent Information
- Application Number
- CN202411636839.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, when configuring a pair of APHY protocol chips, the problem of inconsistency of the original data in the register is prone to occur, resulting in failure to establish a communication link.
The serial device and the deserialization device are arranged in pairs and are connected through a data transmission line. Both the serial device and the deserialization device are built-in units that support the Ethernet data transmission protocol. In configuration mode, the host transmits read and write configuration information to the slave through the data transmission line. The slave reads and writes the registers according to the configuration information and feedbacks the result. The host switches to the communication mode according to the feedback information, and notifies the slave switch through the preset link sequence. to communication mode.
It realizes that when configuring a pair of APHY protocol chips, ensures the data in the register corresponds to avoid failure of communication links, and simplifies the configuration process. Users can only control the host to complete the initial configuration of the slave.
Smart Images

Figure CN119473996A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of chip communication electronic technology, and in particular relates to a configuration system and method for chip communication initialization. Background Art
[0002] In the related technologies, the communication between the vehicle-side components and the ECU (Electronic Control Unit, also known as the controller) needs to rely on the on-board communication chip. The on-board communication chip in the related technologies usually adopts the APHY (MIPI A-PHY, the automotive long-distance serializer / deserializer SerDes physical layer interface specification released by the MIPI Alliance) protocol in the FDD (Frequency Division Duplexing) full-duplex communication system. This protocol supports STP (Shielded Twisted Pair) and UTP (Unshielded Twisted Pair) and other twisted pair cables for data transmission above 4Gbps, but a link needs to be established before data transmission.
[0003] Chips based on the APHY protocol are usually paired, and each pair includes a serializer chip and a deserializer chip. In order to ensure smooth communication between paired APHY protocol chips, the APHY protocol chips usually need to be configured. The existing configuration method is to separately configure the serializer chip and the deserializer chip in the APHY protocol chip. It is very likely that the original data in the registers of a pair of APHY protocol chips will not correspond, and then a pair of APHY protocol chips will fail to establish a communication link during communication connection.
[0004] Therefore, it is necessary to provide a configuration system and method for chip communication initialization to solve the problem in the prior art that when a pair of APHY protocol chips are configured, the original data in the registers may not correspond due to separate configuration. Summary of the invention
[0005] In order to solve the problem that when a pair of APHY protocol chips are configured for communication initialization, the data in the registers of a pair of chips may not correspond when the chips are configured separately, the present application provides a configuration system and method for chip communication initialization.
[0006] The configuration system and method for chip communication initialization provided in this application adopt the following technical solutions: A configuration system for chip communication initialization, comprising a serial device, a data transmission line and a deserialization device, wherein one end of the data transmission line is connected to the serial device, and the other end of the data transmission line is connected to the deserialization device, and both the serial device and the deserialization device are built-in with a unit supporting an Ethernet data transmission protocol; when the serial device or the deserialization device acts as a host, the deserialization device or the serial device at the opposite end acts as a slave; The host in the configuration mode transmits the read-write configuration information to the slave through the data transmission line; the slave in the configuration mode reads and writes the slave register according to the read-write configuration information to generate read-write feedback information, and transmits the read-write feedback information to the host through the data transmission line; The host in configuration mode switches itself to communication mode after completing the read-write configuration according to the read-write feedback information, and generates a communication switching instruction to control the slave to switch to communication mode; the host in communication mode and the slave establish a communication link in accordance with the vehicle communication protocol.
[0007] By adopting the above technical solution, the serial device and the deserialization device are arranged in pairs, and the paired serial device and the deserialization device are connected through a data transmission line. When the serial device is the host, the corresponding deserialization device is the slave; when the deserialization device is the host, the corresponding serial device is the slave. In this case, the serial device and the deserialization device are not only provided with a unit suitable for the vehicle communication protocol, but also provided with a unit supporting the Ethernet data transmission protocol. In other words, the data exchange between the serial device and the deserialization device can be realized not only through the vehicle communication protocol, but also through the Ethernet data transmission protocol via the data transmission line.
[0008] The host in configuration mode transmits the read-write configuration information to the slave through the data transmission line. The slave reads and writes its own slave register according to the read-write configuration information to complete the execution of the read-write configuration information. At the same time, the operation result of the read-write configuration information is used as read-write feedback information and fed back to the host through the data transmission line. Therefore, in this case, the slave performs corresponding configuration according to the read-write configuration information of the host. The user can read the data of the slave register in the slave through the host, and can also rewrite the data of the slave register in the slave through the host. The user can complete the initialization configuration of the slave corresponding to the host by only controlling the host, thereby ensuring the data correspondence when a pair of serial devices and deserialization devices are initialized and configured.
[0009] The host in configuration mode switches itself from configuration mode to communication mode according to the read-write feedback information fed back by the slave, and switches the slave to communication mode, so as to facilitate the communication link between the host in communication mode and the slave.
[0010] Optionally, the host enters a configuration mode after power-on, and the slave enters a configuration mode after power-on, and the host and the slave in the configuration mode support the T1S protocol.
[0011] By adopting the above technical solution, the Ethernet data transmission protocol supported by the serial device and the deserialization device is the T1S protocol, which takes effect when the host and the slave are in the configuration mode. The host and the slave are set to the configuration mode at the moment of power-on. At this time, the units supporting the T1S protocol in the host and the slave take effect, and the host and the slave can exchange data through the units supporting the T1S protocol and the data transmission line. That is, the host can read and write the slave register through the T1S protocol unit in the host, the data transmission line, and the T1S protocol unit in the slave.
[0012] Optionally, the host in the configuration mode determines that the read-write configuration is completed after determining that the read-write feedback information complies with the host switching rule, and generates a state switching instruction to switch the host from the configuration mode to the communication mode.
[0013] Optionally, when the host is in communication mode, a preset link sequence is generated as the communication switching instruction, and the preset link sequence is sent to the slave through the data transmission line to switch the slave to communication mode; the slave switches itself to communication mode according to the preset link sequence, and feeds the preset link sequence to the host through the data transmission line, so that the host and the slave establish a communication link according to the vehicle-mounted communication protocol.
[0014] By adopting the above technical solution, when the slave completes the execution according to the read-write configuration information, it generates read-write feedback information and feeds it to the host. The host generates a state switching instruction according to the read-write feedback information, and the host switches from the configuration mode to the communication mode. After the host completes the switch, it notifies the opposite slave to switch from the configuration mode to the communication mode through the preset link sequence on the link. When the opposite slave receives the preset link sequence, it switches itself from the configuration mode to the communication mode, and then also feeds back the preset link sequence to the host. The host then establishes a communication link with the slave according to the vehicle communication protocol.
[0015] Optionally, the preset link sequence is different from the sequences in the vehicle communication protocol and the Ethernet data transmission protocol, and the host or the slave has a verification mechanism and a read-write timeout protection mechanism when transmitting the read-write configuration information or the read-write feedback information. An error is reported when the error sequence generated when the host or the slave switches from the configuration mode to the communication mode belongs to the sequence in the vehicle communication protocol and the Ethernet data transmission protocol.
[0016] Optionally, the serial device or deserialization device as the host includes a main control unit, a host configuration unit, a host communication unit and a host transmission unit; The main control unit connects the host transmission unit with the host configuration unit to enter a configuration mode after the host is powered on, and the host configuration unit transmits the read-write configuration information to the host transmission unit, and forwards the read-write feedback information received by the host transmission unit and from the slave to the main control unit, so that the main control unit generates the state switching instruction and the communication switching instruction according to the read-write feedback information; The main control unit disconnects the host transmission unit from the host configuration unit according to the state switching instruction, and connects the host communication unit to the host transmission unit to switch from the configuration mode to the communication mode; the host communication unit and the host data transmission unit in the communication mode establish a communication link with the slave in the communication mode in accordance with the vehicle-mounted communication protocol.
[0017] By adopting the above technical solution, the host communication unit supports the establishment of a communication link between the host and the slave that complies with the vehicle communication protocol, and the host configuration unit supports Ethernet data transmission between the host and the slave through the data transmission line.
[0018] After the host is powered on, it defaults to configuration mode, that is, the main control unit controls the host configuration unit to connect to the host transmission unit to transmit read and write configuration information to the slave through the data transmission line according to the Ethernet data transmission protocol, so that the slave performs the read and write operations corresponding to the read and write configuration information on the slave register; and transmits a communication switching instruction to the slave, so that the slave switches from configuration mode to communication mode. The host switches from configuration mode to communication mode according to the state switching instruction, and the main control unit connects the host communication unit with the host transmission unit to establish a communication link with the slave that is also in communication mode in accordance with the vehicle communication protocol.
[0019] Optionally, the main control unit has a first control end and a host switching control end, the first control end is used to control the connection and disconnection between the host communication unit and the host transmission unit, and the host switching control end is used to control the connection and disconnection between the host configuration unit and the host transmission unit.
[0020] Optionally, the host configuration unit includes a host media accessor and a host network configurator, a first end of the host media accessor is connected to the main control unit, a second end of the host media accessor is connected to a first end of the host network configurator, and a second end of the host network configurator is connected to the host transmission unit; The host media accessor is used to transmit the read-write configuration information from the main control unit to the host network configurator, so that the host network configurator sends the read-write configuration information to the corresponding host transmission unit according to the network configuration in the read-write configuration information; the host network configurator is used to send the read-write feedback information forwarded from the host transmission unit to the host media accessor, so that the host media accessor forwards the read-write feedback information to the main control unit so that the main control unit switches the host from configuration mode to communication mode.
[0021] Optionally, the host transmission unit has a first end, a second end and a third end; the first end is connected to the data transmission line, the second end is connected to the host communication unit, so that the host in communication mode and the slave follow the vehicle communication protocol to transmit data, and the third end is connected to the host configuration unit, so that the host in configuration mode sends the read and write configuration information to the slave, and the host in configuration mode receives the read and write feedback information from the slave.
[0022] Optionally, the deserializing device or the serializing device of the slave includes a slave configuration unit, a slave communication unit and a slave transmission unit; After the slave is powered on, the connection between the slave transmission unit and the slave configuration unit is turned on to enter the configuration mode; the slave configuration unit reads and writes the slave register according to the read-write configuration information forwarded by the slave transmission unit, and generates configuration feedback information, and sends the configuration feedback information to the slave transmission unit for the host to receive through the data transmission line; The slave disconnects the slave transmission unit from the slave configuration unit and switches on the slave communication unit from the slave transmission unit to enter a communication mode according to the communication switching instruction received by the slave transmission unit; the slave communication unit and the slave transmission unit in the communication mode establish a communication link with the host in the communication mode that complies with the vehicle communication protocol.
[0023] By adopting the above technical solution, after the slave is powered on, it is in the configuration mode by default. After the slave transmission unit is connected to the slave configuration unit, Ethernet data transmission is realized with the host in the configuration mode through the data transmission line. The slave in the configuration mode receives the read-write configuration information from the host, and after performing corresponding operations on the slave register according to the read-write configuration information, it feeds the configuration feedback information to the host.
[0024] The slave in configuration mode also receives a communication switching instruction from the host to switch to communication mode, that is, disconnects the connection between the slave transmission unit and the slave configuration unit, maintains the connection between the slave transmission unit and the slave communication unit, and realizes that the slave in communication mode and the host in communication mode establish a communication link that complies with the vehicle communication protocol.
[0025] Optionally, the slave transmission unit has a fourth end, a fifth end and a sixth end, the fourth end is connected to the data transmission line, the fifth end is connected to the slave communication unit so that the slave in communication mode can transmit data with the host in accordance with the vehicle communication protocol, and the sixth end is connected to the slave configuration unit.
[0026] Optionally, the slave configuration unit includes a slave media accessor and a slave network configurator, a first end of the slave network configurator is connected to the slave transmission unit, a second end of the slave network configurator is connected to a first end of the slave media accessor, and a second end of the slave media accessor is connected to a slave register; The slave network configurator is used to transmit the read and write configuration information from the host to the corresponding slave media accessor, and the slave media accessor reads and writes the slave register according to the read and write configuration information to generate the read and write feedback information, and feeds the read and write feedback information to the host through the slave network configurator and the slave transmission unit.
[0027] Optionally, when the read / write feedback information indicates that the slave has completed execution according to the read / write configuration information, the host generates a state switching instruction for the host to switch to the communication mode, so that the configuration system as a whole switches to the communication mode; The present invention also provides a configuration method for chip communication initialization, the configuration method is applied to the above-mentioned configuration system for chip communication initialization, and the configuration method includes: The host in configuration mode sends the read and write configuration information to the slave via the data transmission line; The slave in the configuration mode reads and writes the slave register according to the read and write configuration information to generate read and write feedback information; The slave in the configuration mode sends the read / write feedback information to the host in the configuration mode via a data transmission line; The host in the configuration mode switches to the communication mode according to the read-write feedback information; The host in the communication mode generates a communication switching instruction, and sends the communication switching instruction to the slave in the configuration mode through a data transmission line; The slave in the configuration mode switches to the communication mode according to the communication switching instruction; The host in communication mode establishes a communication link with the slave in communication mode in accordance with the vehicle communication protocol; The host corresponds to one of the serial device and the deserialization device, the slave corresponds to the other of the deserialization device and the serial device, and the host and the slave are opposite ends.
[0028] By adopting the above technical solution, the host in the configuration mode transmits the read-write configuration information to the slave through the data transmission line. The slave reads and writes its own slave register according to the read-write configuration information to complete the execution of the read-write configuration information, and at the same time, the operation result of the read-write configuration information is used as read-write feedback information and fed back to the host through the data transmission line. Therefore, in this case, the slave performs corresponding configuration according to the read-write configuration information of the host. The user can read the data of the slave register in the slave through the host, and can also rewrite the data of the slave register in the slave through the host. The user can only control the host to complete the initialization configuration of the slave corresponding to the host, thereby ensuring that the data corresponds when a pair of serial devices and deserialization devices are initialized and configured. In addition, when the host is in the communication mode, the communication transmission instruction is transmitted to the slave through the data transmission line, so that the slave switches to the communication mode synchronously, thereby facilitating the communication link between the host and the slave in the communication mode, realizing the switching synchronization of the communication mode, and ensuring the instant communication between the host and the slave.
[0029] In summary, the present application includes at least one of the following beneficial technical effects: 1. The serial device and the deserialization device are arranged in pairs, and the paired serial device and the deserialization device are connected through a data transmission line. When the serial device is the host, the corresponding deserialization device is the slave; when the deserialization device is the host, the corresponding serial device is the slave. Compared with the conventional technology, in which the serial device and the deserialization device are only provided with units supporting the vehicle communication protocol, this case adds a unit supporting the Ethernet data transmission protocol. In this case, the serial device and the deserialization device are not only provided with units suitable for the vehicle communication protocol to support the data communication transmission between the serial device and the deserialization device after the configuration is successful, but also provided with units supporting the Ethernet data transmission protocol to support the configuration of the other through one of the serial device and the deserialization device. In other words, the data exchange between the serial device and the deserialization device can not only be realized through the vehicle communication protocol, but also through the Ethernet data transmission protocol via the data transmission line.
[0030] 2. During the initialization configuration, both the host and the slave are in the configuration mode, and the slave performs corresponding configuration according to the read-write configuration information of the host. The user can read the data of the slave register in the slave through the host, or rewrite the data of the slave register in the slave through the host. The user can only control the host to complete the initialization configuration of the slave corresponding to the host, thereby ensuring the data correspondence when a pair of serial devices and deserialization devices are initialized and configured. Compared with conventional technologies, it is necessary to configure the serial device and the deserialization device separately, and it is difficult to verify whether the serial device and the serial device are matched successfully during the configuration process; this case supports unilateral configuration, and uses the serial device or deserialization device used for configuration as the host. After the host itself is configured, it configures the slave through the Ethernet data transmission protocol. After verifying that the configuration of the slave is also completed, the configured host automatically enters the communication mode to control the slave to enter the communication mode synchronously to establish a communication link that supports the vehicle communication protocol.
[0031] 3. The T1S protocol is an in-vehicle Ethernet with a transmission rate of 10Mbps, which can support point-to-point communication based on CSMA / CD and multi-point communication based on multidrop mode. Since the point-to-point T1S protocol based on CSMA / CD does not require both parties to establish a link to communicate, and can share cables with the APHY protocol, the unit supporting the T1S protocol is transplanted into the serial device and deserialization device of the in-vehicle communication protocol. The host (serial device or deserialization device) can modify, read, and write the configuration information in the register of the slave (deserialization device or serial device) through the T1S protocol unit before the communication link of the in-vehicle communication protocol is established, which is convenient for debugging. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a structural schematic diagram of a configuration system for chip communication initialization provided by the present invention; Figure 2 yes Figure 1 System diagram when the serial device is used as the host; Figure 3 yes Figure 1 System diagram when the serial device in the middle acts as a slave; Figure 4 It is a schematic diagram of information transmission between the master and slave in configuration mode; Figure 5 It is a schematic diagram of information transmission during the state switching process between the master and slave; Figure 6 It is a schematic diagram of information between the host and the slave according to the Ethernet data transmission protocol; Figure 7 It is a communication link between the host and the slave to establish the vehicle communication protocol, and the information diagram; Figure 8 yes Figure 2 The structural diagram of the host; Fig. 9 yes Figure 2 Schematic diagram of the structure of the slave machine.
[0033] The reference numerals are: source, serial device; 102, data transmission line; sink, deserialization device; 101, host; 103, slave; APHY-1, host communication unit; T1S-1, host configuration unit; AFE-1, host transmission unit; MCU, main control unit; T1S-MAC-1, host media accessor; T1S-PCS-1, host network configurator; APHY-2, slave communication unit; T1S-2, slave configuration unit; AFE-2, slave transmission unit; T1S-MAC-2, slave media accessor; T1S-PCS-2, slave network configurator. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Unless otherwise defined, the technical terms or scientific terms used herein should be understood by people with general skills in the field to which the present invention belongs. "Including" and similar words used in this article mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0035] In view of the problems existing in the prior art, an embodiment of the present invention provides a configuration system for chip communication initialization, such as Figure 1 As shown, it includes a serial device source, a data transmission line 102 and a deserialization device sink, one end of the data transmission line 102 is connected to the serial device source, and the other end of the data transmission line 102 is connected to the deserialization device sink. The serial device source and the deserialization device sink are both built-in with a unit supporting the Ethernet data transmission protocol. The serial device source and the deserialization device sink are arranged in pairs, and the paired serial device source and the deserialization device sink are connected through the data transmission line 102.
[0036] When the serial device source or the deserialization device sink acts as the host 101, the deserialization device sink or the serial device source at the opposite end acts as the slave 103. Specifically, Figure 2 As shown, when the serial device source is the host 101, the corresponding deserialization device sink is the slave 103; Figure 3 As shown, when the deserialization device sink is the host 101, the corresponding serial device source is the slave 103. The serial device source and the deserialization device sink are not only provided with units applicable to the vehicle communication protocol, but also provided with units supporting the Ethernet data transmission protocol, that is, the data exchange between the serial device source and the deserialization device sink can be realized not only through the vehicle communication protocol, but also through the Ethernet data transmission protocol via the data transmission line 102.
[0037] Usually, the vehicle communication protocol followed between the host 101 and the slave 103 is usually set to the APHY protocol, and a pair of serial device source and deserialization device sink are both implemented through the APHY chip. The data transmission line 102 uses a shielded twisted pair STP or an unshielded twisted pair UTP, and the Ethernet data transmission protocol is set to the T1S protocol. It is worth mentioning that the T1S protocol is an in-vehicle Ethernet with a transmission rate of 10Mbps, which can support point-to-point communication based on CSMA / CD and multi-point communication based on the multidrop mode. Since the point-to-point T1S protocol based on CSMA / CD does not require both parties to establish a link to communicate, and the unit supporting the T1S protocol can share the cable (i.e., the data transmission line 102) with the unit supporting the vehicle communication protocol (APHY protocol), it is feasible to transplant the unit supporting the T1S protocol into the serial device source and deserialization device sink supporting the AHPY protocol. In this way, the host 101 (serial device source or deserialization device sink) can modify the registers in the slave 103 (deserialization device sink or serial device source) and read the register configuration information and status information therein through the T1S protocol unit before the communication link of the vehicle communication protocol is established, which is convenient for debugging.
[0038] like Figure 4 As shown, the host 101 in the configuration mode transmits the read-write configuration information to the slave 103 through the data transmission line 102; the slave 103 in the configuration mode reads and writes the slave register 1034 according to the read-write configuration information to generate read-write feedback information, and transmits the read-write feedback information to the host 101 through the data transmission line 102.
[0039] The host 101 in the configuration mode transmits the read-write configuration information to the slave 103 through the data transmission line 102. The slave 103 reads and writes its own slave register 1034 according to the read-write configuration information to complete the execution of the read-write configuration information, and at the same time feeds the operation result of the read-write configuration information back to the host 101 through the data transmission line 102 as the read-write feedback information. In other words, the slave 103 performs corresponding configuration according to the read-write configuration information of the host 101. The user can read the data of the slave register 1034 in the slave 103 through the host 101, and can also rewrite the data of the slave register 1034 in the slave 103 through the host 101. The user can complete the initialization configuration of the slave 103 corresponding to the host 101 by only controlling the host 101, thereby ensuring that the data correspondence is performed when a pair of serial device source and deserialization device sink are initialized and configured.
[0040] like Figure 5 As shown, the host 101 in the configuration mode switches itself to the communication mode according to the read-write feedback information, and generates a communication switching instruction to control the slave 103 to switch to the communication mode. The specific process is: the host 101 in the configuration mode generates a state switching instruction when the read-write feedback information meets the host 101 switching rule, so that the host 101 switches from the configuration mode to the communication mode; the host 101 in the communication mode generates a preset link sequence as a communication switching instruction, and sends the preset link sequence to the slave 103 through the data transmission line 102 to switch the slave 103 to the communication mode; the slave 103 switches itself to the communication mode according to the preset link sequence, and feeds the preset link sequence to the host 101 through the data transmission line 102, so that the host 101 and the slave 103 establish a communication link according to the vehicle communication protocol. Among them, the switching rule of the host 101 is actually that the read-write feedback information indicates that the slave 103 is executed according to the read-write configuration information.
[0041] That is to say, when the slave 103 in this case completes the execution according to the read-write configuration information, it generates read-write feedback information and feeds it to the host 101. The host 101 generates a state switching instruction according to the read-write feedback information, and the host 101 switches from the configuration mode to the communication mode. After the host 101 completes the switch, it notifies the opposite slave 103 to switch from the configuration mode to the communication mode through the preset link sequence on the link. When the opposite slave 103 receives the preset link sequence, it switches itself from the configuration mode to the communication mode, and then also feeds back the preset link sequence to the host 101. Then the host 101 establishes a communication link with the slave 103 according to the vehicle communication protocol.
[0042] In some examples, such as Figure 6 and Figure 7As shown, the serial device source or deserialization device sink as the host 101 includes a main control unit MCU, a host configuration unit T1S-1, a host communication unit APHY-1 and a host transmission unit AFE-1. The deserialization device sink or the serial device source as the slave 103 includes a slave configuration unit T1S-2, a slave communication unit APHY-2, a slave transmission unit AFE-2 and a slave register 1034.
[0043] After the host 101 is powered on, the host 101 enters the configuration mode by default. After the host 101 is powered on, the host 101 connects the host transmission unit AFE-1 to the host configuration unit T1S-1 by default to enter the configuration mode. After the slave 103 is powered on, the slave 103 connects the slave transmission unit AFE-2 to the slave configuration unit T1S-2 by default to enter the configuration mode.
[0044] like Figure 6 As shown, the host 101 and the slave 103, both in the configuration mode, communicate data via the data transmission line 102 according to the Ethernet data transmission protocol (preferably the TIS protocol). Specifically: S6-1, the host 101 in configuration mode controls the host configuration unit T1S-1 to connect with the host transmission unit AFE-1 through the main control unit MCU, and the host configuration unit T1S-1 transmits the read and write configuration information from the user to the host transmission unit AFE-1; S6-2, the master transmission unit AFE-1 sends read and write configuration information to the slave transmission unit AFE-2 via the data transmission line 102; S6-3, the slave transmission unit AFE-2 sends the read-write configuration information to the slave configuration unit T1S-2; S6-4, the slave configuration unit T1S-2 performs corresponding data reading, data rewriting and other operations on the slave register 1034, completes the execution of the read-write configuration information, and sends the operation result of the read-write configuration information as read-write feedback information to the slave transmission unit AFE-2; S6-5, the slave transmission unit AFE-2 sends the read / write feedback information to the master transmission unit AFE-1 via the data transmission line 102; S6-6, the host transmission unit AFE-1 sends the read-write feedback information to the host configuration unit T1S-1; the host configuration unit T1S-1 sends the read-write feedback information to the main control unit MCU.
[0045] Subsequently, the main control unit MCU determines that the read-write configuration is completed after determining that the read-write feedback information complies with the host switching rules (that is, after the read-write feedback information indicates that the slave 103 has completed the execution according to the read-write configuration information), and generates a state switching instruction; the host 101 switches itself from the configuration mode to the communication mode according to the state switching instruction. At this time, the main control unit MCU disconnects the host transmission unit AFE-1 from the host configuration unit T1S-1 according to the state switching instruction, and connects the host communication unit APHY-1 to the host transmission unit AFE-1.
[0046] like Figure 7 As shown, the process of the host 101 in communication mode controlling the slave 103 to switch from the configuration mode to the communication mode and establishing a communication link with the slave 103 is as follows: S7-1, the host 101 in communication mode sends the preset link sequence as a communication switching instruction through the main control unit MCU to the host transmission unit AFE-1 via the host communication unit APHY-1; S7-2, the master transmission unit AFE-1 sends to the slave transmission unit AFE-2 via the data transmission line 102; S7-3, the slave 103 receives the communication switching instruction through the slave transmission unit AFE-2, disconnects the slave transmission unit AFE-2 from the slave configuration unit T1S-2, and switches the slave communication unit APHY-2 to the slave transmission unit AFE-2, so that the slave 103 itself switches to the communication mode; and when the slave 103 receives the communication switching instruction through the slave transmission unit AFE-2, the slave 103 also feeds the communication switching instruction from the slave transmission unit AFE-2 to the host transmission unit AFE-1 of the host 101 through the data transmission line 102; S7-4, the host transmission unit AFE-1 sends a communication switching instruction to the host communication unit APHY-1; S7-5, the host communication unit APHY-1 sends a communication switching instruction to the main control unit MCU; S7-6, when the main control unit MCU receives the communication switching instruction, it controls the host communication unit APHY-1 and the slave communication unit APHY-2 to establish an on-board communication protocol APHY communication link between the host 101 and the slave 103.
[0047] In this example, the Ethernet data transmission protocol supported by the serial device source and the deserialization device sink is the T1S protocol, which takes effect when the host 101 and the slave 103 are in the configuration mode. The host 101 and the slave 103 are set to the configuration mode at the moment of power-on, and the main control unit MCU controls the host configuration unit T1S-1 to connect the host transmission unit AFE-1 to transmit the read-write configuration information to the slave 103 through the data transmission line 102 according to the Ethernet data transmission protocol, so that the slave 103 performs the read-write operation corresponding to the read-write configuration information on the slave register 1034.
[0048] In the slave 103 in the configuration mode, the slave configuration unit T1S-2 modifies, reads, and writes the configuration information in the slave register 1034 according to the read-write configuration information forwarded by the slave transmission unit AFE-2. At the same time, the operation result is used as read-write feedback information, and the read-write feedback information is sent to the main control unit MCU through the slave transmission unit AFE-2, the data transmission line 102, the host transmission unit AFE-1, and the host configuration unit T1S-1. The main control unit MCU instructs the slave 103 to generate a state switching instruction when the read and write configuration information is completed according to the read-write feedback information, so as to control the host to switch from the configuration mode to the communication mode.
[0049] In the host that enters the communication mode, the main control unit MCU generates a communication switching instruction (in the form of a preset link) and sends it to the slave through the host communication unit APHY-1, the host transmission unit AFE-1 and the data transmission line; the slave switches itself from the configuration mode to the communication mode according to the communication switching instruction, and feeds the same communication switching instruction (in the form of a preset link) to the host through the slave communication unit APHY-2, the slave transmission unit AFE-2 and the data transmission line; the main control unit MCU of the host controls the host communication unit APHY-1 and the slave communication unit APHY-2 of the slave to establish a communication link that complies with the vehicle communication protocol APHY according to the communication switching instruction (in the form of a preset link) forwarded by the host transmission unit AFE-1 and the host communication unit APHY-1.
[0050] In some examples, such as Figure 8 As shown, the specific structure of the host 101 is as follows: The main control unit MCU has a first control terminal and a host switching control terminal. The first control terminal is used to control the connection and disconnection between the host communication unit APHY-1 and the host transmission unit AFE-1. The host switching control terminal is used to control the connection and disconnection between the host configuration unit T1S-1 and the host transmission unit AFE-1. The host configuration unit T1S-1 includes a host media access device T1S-MAC-1 and a host network configurator T1S-PCS-1, a first end of the host media access device T1S-MAC-1 is connected to the main control unit MCU, a second end of the host media access device T1S-MAC-1 is connected to a first end of the host network configurator T1S-PCS-1, and a second end of the host network configurator T1S-PCS-1 is connected to the host transmission unit AFE-1; The host media access device T1S-MAC-1 is used to transmit the read and write configuration information of the future main control unit MCU to the host network configurator T1S-PCS-1, so that the host network configurator T1S-PCS-1 sends the read and write configuration information to the corresponding host transmission unit AFE-1 according to the network configuration in the read and write configuration information; the host network configurator T1S-PCS-1 is used to send the read and write feedback information forwarded from the host transmission unit AFE-1 to the host media access device T1S-MAC-1, so that the host media access device T1S-MAC-1 forwards the read and write feedback information to the main control unit MCU so that the main control unit MCU switches the host from the configuration mode to the communication mode; The host transmission unit AFE-1 has a first end, a second end and a third end; the first end is connected to the data transmission line 102, the second end is connected to the host communication unit APHY-1, so that the host in the communication mode and the slave follow the vehicle communication protocol to transmit data, and the third end is connected to the host configuration unit T1S-1, so that the host in the configuration mode sends read and write configuration information to the slave, and the host in the configuration mode receives read and write feedback information from the slave.
[0051] like Fig. 9 As shown, the specific structure of the slave 103 is as follows: The slave transmission unit AFE-2 has a fourth end, a fifth end and a sixth end, the fourth end is connected to the data transmission line 102, the fifth end is connected to the slave communication unit APHY-2 for the slave 103 in the communication mode to perform data transmission with the host 101 in accordance with the vehicle communication protocol, and the sixth end is connected to the slave configuration unit T1S-2 for establishing data transmission of the T1S protocol between the slave configuration unit T1S-2 and the host configuration unit T1S-2 (i.e., transmitting read and write configuration information from the host to the slave configuration unit T1S-2 and receiving configuration feedback information from the slave configuration unit T1S-2); The slave configuration unit T1S-2 includes a slave media accessor T1S-MAC-2 and a slave network configurator T1S-PCS-2, wherein a first end of the slave network configurator T1S-PCS-2 is connected to the slave transmission unit AFE-2, a second end of the slave network configurator T1S-PCS-2 is connected to a first end of the slave media accessor T1S-MAC-2, and a second end of the slave media accessor T1S-MAC-2 is connected to the slave register 1034; The slave network configurator T1S-PCS-2 is used to transmit the read and write configuration information from the host to the corresponding slave media accessor T1S-MAC-2. The slave media accessor T1S-MAC-2 reads and writes the slave register according to the read and write configuration information to generate read and write feedback information, and feeds the read and write feedback information to the host 101 through the slave network configurator T1S-PCS-2 and the slave transmission unit AFE-2.
[0052] That is to say, the serial device or deserialization device as the host is additionally provided with a main control unit MCU compared with the deserialization device or serialization device as the slave.
[0053] In some examples, as the preset link of the communication switching instruction, the sequences in the vehicle communication protocol (APHY protocol) and the Ethernet data transmission protocol (T1S protocol), the host 101 or the slave 103 has a CRC16 check mechanism and a read-write timeout protection mechanism when transmitting the read-write configuration information or read-write feedback information, and an error is reported when the error sequence generated when the host 101 or the slave 103 switches from the configuration mode to the communication mode belongs to the sequence in the vehicle communication protocol (APHY protocol) and the Ethernet data transmission protocol (T1S protocol).
[0054] This example recommends using a special sequence that does not appear in the normal APHY protocol and T1S protocol. In the configuration and status readback process in T1S mode, add a CRC16 check mechanism and a timeout protection mechanism for read and write operations, and add a Toggle flip bit as a check mark in each read and write operation. In the special sequence detection process when T1S switches to APHY mode, add a certain tolerance mechanism, such as considering a 0001 sequence that occasionally has a single-bit error in 100 consecutive 0011 sequences as a 0011 sequence (provided that the sequence with the error does not appear in the APHY protocol and T1S protocol).
[0055] In other examples, the host 101 controls the slave 103 to switch from the configuration mode to the communication mode when: The host 101 in the configuration mode, when the read-write feedback information from the slave indicates that the slave 103 has completed the execution of the read-write configuration information in the slave register 1034, generates a communication switching instruction, and sends the communication switching instruction to the slave through the data transmission line to switch the slave from the configuration mode to the communication mode; For a host in configuration mode, when the main control unit generates a communication switching instruction and the read-write feedback information disappears, it generates a state switching instruction to control the host to switch from configuration mode to communication mode.
[0056] In this example, the host 101 preferentially controls the slave 103 to complete the switching of the communication mode. After the slave completes the switching of the communication mode, the host switches the communication mode. In this way, the host can establish a communication connection with the slave in the vehicle communication protocol at the moment of switching to the communication mode. Because the slave switches to the communication mode, the link between the slave and the host, "the unit of the Ethernet data transmission protocol of the host (host configuration unit T1S-1)-data transmission line-the unit of the Ethernet data transmission protocol of the slave (slave configuration unit T1S-2)" is disconnected, and the host 101 cannot receive the read and write feedback information from the slave 103. At this time, the host 101 determines that the slave 103 has switched to the communication mode. At this time, the host 101 generates a state switching instruction to switch the host 101 itself to the communication mode. Both the host 101 and the slave 103 switch from the configuration mode to the communication mode. At this time, the Ethernet data transmission protocol (T1S protocol) is invalid, and the communication link between the host 101 and the slave 103 is established in accordance with the vehicle communication protocol.
[0057] In addition, in another example, the host 101 controls the slave 103 to switch from the configuration mode to the communication mode when: The host 101 is in the configuration mode, and the main control unit MCU generates a communication switching instruction and a state switching instruction when the read-write feedback information from the slave indicates that the slave 103 has completed the execution of the read-write configuration information in the slave register 1034; wherein the main control unit MCU sends the communication switching instruction to the slave through the data transmission line to make the slave switch from the configuration mode to the communication mode, and the main control unit MCU controls the host to switch from the configuration mode to the communication mode according to the state switching instruction.
[0058] In this example, the host 101 and the slave 103 are synchronously switched from the configuration mode to the communication mode, so that the state switching of the host 101 and the slave 103 is synchronized, ensuring that the host 101 can quickly establish a communication link with the slave 103 in the communication mode.
[0059] The present invention also provides a configuration method for chip communication initialization, which is applied to the configuration system for chip communication initialization, and the configuration method includes: The host 101 in configuration mode sends read and write configuration information to the slave 103 via the data transmission line 102; The slave 103 in configuration mode reads and writes the slave register 1034 according to the read and write configuration information to generate read and write feedback information; The slave 103 in the configuration mode sends the read / write feedback information to the host 101 in the configuration mode via the data transmission line 102; The host 101 in the configuration mode switches to the communication mode according to the read-write feedback information; The host 101 in the communication mode generates a communication switching instruction, and sends the communication switching instruction to the slave 103 in the configuration mode through the data transmission line 102; The slave 103 in the configuration mode switches to the communication mode according to the communication switching instruction; The host 101 in communication mode establishes a communication link with the slave 103 in communication mode in accordance with the vehicle communication protocol; The host 101 corresponds to one of a serial device source and a deserialization device sink, and the slave 103 corresponds to the other of the deserialization device sink and the serial device source. The host 101 and the slave 103 are opposite ends.
[0060] The host 101 in the configuration mode transmits the read-write configuration information to the slave 103 through the data transmission line 102. The slave 103 reads and writes its own slave register 1034 according to the read-write configuration information to complete the execution of the read-write configuration information, and at the same time feeds the operation result of the read-write configuration information back to the host 101 through the data transmission line 102 as the read-write feedback information. Therefore, in this case, the slave 103 performs corresponding configuration according to the read-write configuration information of the host 101. The user can read the data of the slave register 1034 in the slave 103 through the host 101, and can also rewrite the data of the slave register 1034 in the slave 103 through the host 101. The user can complete the initialization configuration of the slave 103 corresponding to the host 101 by only controlling the host 101, thereby ensuring the data correspondence when a pair of serial device source and deserialization device sink are initialized and configured. Furthermore, when the host 101 is in the communication mode, the communication transmission instruction is transmitted to the slave 103 through the data transmission line 102, so that the slave 103 switches to the communication mode synchronously, thereby facilitating the communication link between the host 101 in the communication mode and the slave 103, realizing the switching synchronization of the communication mode, and ensuring the instant communication between the host 101 and the slave 103.
[0061] Other implementation details and working methods of the configuration method for chip communication initialization disclosed in the present application are the same or similar to the configuration system for chip communication initialization described above, and will not be repeated here.
[0062] Although the embodiments of the present invention are described in detail above, it is obvious to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations are within the scope and spirit of the present invention as described in the claims. Moreover, the present invention described herein may have other embodiments and may be implemented or realized in a variety of ways.
Claims
1. A configuration system for chip communication initialization, characterized in that: The device comprises a serial device, a data transmission line and a deserialization device, wherein one end of the data transmission line is connected to the serial device, and the other end of the data transmission line is connected to the deserialization device, and the serial device and the deserialization device are both built with a unit supporting an Ethernet data transmission protocol; when the serial device or the deserialization device acts as a host, the deserialization device or the serial device at the opposite end acts as a slave; The host in the configuration mode transmits the read-write configuration information to the slave through the data transmission line; the slave in the configuration mode reads and writes the slave register according to the read-write configuration information to generate read-write feedback information, and transmits the read-write feedback information to the host through the data transmission line; The host in configuration mode switches itself to communication mode after completing the read-write configuration according to the read-write feedback information, and generates a communication switching instruction to control the slave to switch to communication mode; the host in communication mode and the slave establish a communication link in accordance with the vehicle communication protocol.
2. The configuration system for chip communication initialization according to claim 1, characterized in that: The host enters the configuration mode after power-on, and the slave enters the configuration mode after power-on. The host and the slave in the configuration mode support the T1S protocol.
3. The configuration system for chip communication initialization according to claim 1, characterized in that: The host in the configuration mode determines that the read-write configuration is completed after determining that the read-write feedback information complies with the host switching rule, and generates a state switching instruction to switch the host from the configuration mode to the communication mode.
4. The configuration system for chip communication initialization according to claim 1, characterized in that: When the read / write feedback information indicates that the slave has completed the execution according to the read / write configuration information and the host is in the communication mode, the host generates a preset link sequence as the communication switching instruction, and sends the preset link sequence to the slave through the data transmission line to switch the slave to the communication mode; The slave switches itself to a communication mode according to the preset link sequence, and feeds the preset link sequence to the host through the data transmission line, so that the host and the slave establish a communication link according to the vehicle communication protocol.
5. The configuration system for chip communication initialization according to claim 4, characterized in that: The preset link sequence is different from the sequences in the vehicle communication protocol and the Ethernet data transmission protocol. The host or the slave has a verification mechanism and a read-write timeout protection mechanism when transmitting the read-write configuration information or the read-write feedback information. An error is reported when the error sequence generated when the host or the slave switches from the configuration mode to the communication mode belongs to the sequence in the vehicle communication protocol and the Ethernet data transmission protocol.
6. The configuration system for chip communication initialization according to claim 3, characterized in that: The serial device or deserialization device as the host includes a main control unit, a host configuration unit, a host communication unit and a host transmission unit; The main control unit connects the host transmission unit with the host configuration unit to enter a configuration mode after the host is powered on, and the host configuration unit transmits the read-write configuration information to the host transmission unit, and forwards the read-write feedback information received by the host transmission unit and from the slave to the main control unit, so that the main control unit generates the state switching instruction and the communication switching instruction according to the read-write feedback information; The main control unit disconnects the host transmission unit from the host configuration unit according to the state switching instruction, and connects the host communication unit to the host transmission unit to switch from the configuration mode to the communication mode; the host communication unit and the host data transmission unit in the communication mode establish a communication link with the slave in the communication mode in accordance with the vehicle-mounted communication protocol.
7. The configuration system for chip communication initialization according to claim 6, characterized in that: The main control unit has a first control end and a host switching control end. The first control end is used to control the connection and disconnection between the host communication unit and the host transmission unit. The host switching control end is used to control the connection and disconnection between the host configuration unit and the host transmission unit.
8. The configuration system for chip communication initialization according to claim 6, characterized in that: The host configuration unit comprises a host media accessor and a host network configurator, wherein a first end of the host media accessor is connected to the main control unit, a second end of the host media accessor is connected to a first end of the host network configurator, and a second end of the host network configurator is connected to the host transmission unit; The host media accessor is used to transmit the read-write configuration information from the main control unit to the host network configurator, so that the host network configurator sends the read-write configuration information to the corresponding host transmission unit according to the network configuration in the read-write configuration information; the host network configurator is used to send the read-write feedback information forwarded from the host transmission unit to the host media accessor, so that the host media accessor forwards the read-write feedback information to the main control unit so that the main control unit switches the host from configuration mode to communication mode.
9. The configuration system for chip communication initialization according to claim 6, characterized in that: The host transmission unit has a first end, a second end and a third end; the first end is connected to the data transmission line, the second end is connected to the host communication unit, so that the host in communication mode and the slave follow the vehicle communication protocol to transmit data, and the third end is connected to the host configuration unit, so that the host in configuration mode sends the read and write configuration information to the slave, and the host in configuration mode receives the read and write feedback information from the slave.
10. The configuration system for chip communication initialization according to claim 3 or 4, characterized in that: The deserializing device or the serializing device as the slave includes a slave configuration unit, a slave communication unit and a slave transmission unit; After the slave is powered on, the connection between the slave transmission unit and the slave configuration unit is turned on to enter the configuration mode; the slave configuration unit reads and writes the slave register according to the read-write configuration information forwarded by the slave transmission unit, and generates configuration feedback information, and sends the configuration feedback information to the slave transmission unit for the host to receive through the data transmission line; The slave disconnects the slave transmission unit from the slave configuration unit and switches on the slave communication unit from the slave transmission unit to enter a communication mode according to the communication switching instruction received by the slave transmission unit; the slave communication unit and the slave transmission unit in the communication mode establish a communication link with the host in the communication mode that complies with the vehicle communication protocol.
11. The configuration system for chip communication initialization according to claim 10, characterized in that: The slave transmission unit has a fourth end, a fifth end and a sixth end, the fourth end is connected to the data transmission line, the fifth end is connected to the slave communication unit so that the slave in the communication mode and the host can perform data transmission in accordance with the vehicle communication protocol, and the sixth end is connected to the slave configuration unit so that the slave configuration unit in the configuration mode can read and write the slave register according to the read and write configuration information, and send the configuration feedback information to the host.
12. The configuration system for chip communication initialization according to claim 10, characterized in that: The slave configuration unit comprises a slave media accessor and a slave network configurator, wherein a first end of the slave network configurator is connected to the slave transmission unit, a second end of the slave network configurator is connected to a first end of the slave media accessor, and a second end of the slave media accessor is connected to a slave register; The slave network configurator is used to transmit the read and write configuration information from the host to the corresponding slave media accessor, and the slave media accessor reads and writes the slave register according to the read and write configuration information to generate the read and write feedback information, and feeds the read and write feedback information to the host through the slave network configurator and the slave transmission unit.
13. A configuration method for chip communication initialization, characterized in that: The configuration method is applied to the configuration system for chip communication initialization according to any one of claims 1 to 12, and the configuration method comprises: The host in configuration mode sends the read and write configuration information to the slave via the data transmission line; The slave in the configuration mode reads and writes the slave register according to the read and write configuration information to generate read and write feedback information; The slave in the configuration mode sends the read / write feedback information to the host in the configuration mode via a data transmission line; The host in the configuration mode switches to the communication mode after completing the read-write configuration according to the read-write feedback information; The host in the communication mode generates a communication switching instruction, and sends the communication switching instruction to the slave in the configuration mode through a data transmission line; The slave in the configuration mode switches to the communication mode according to the communication switching instruction; The host in communication mode establishes a communication link with the slave in communication mode in accordance with the vehicle communication protocol; The host corresponds to one of the serial device and the deserialization device, the slave corresponds to the other of the deserialization device and the serial device, and the host and the slave are opposite ends.