Breakpoint resuming method based on online address allocation
By adopting the online address allocation breakpoint continuous transmission method based on a single-line interface in a multi-chip cascade system, the problems of complex PCB wiring and chip damage are solved, and the unique address allocation and control of each chip are realized to ensure system stability and reliability.
Patent Information
- Application Number
- CN202411020689.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
AI Technical Summary
In multi-chip cascade systems, existing communication interfaces such as I2C and SPI cause complex PCB wiring, and once the chip is damaged, it may affect subsequent chips, and a breakpoint continuous transmission protocol is lacking to ensure system stability.
The online address allocation breakpoint continuous transmission method based on a single-line interface is adopted. By defining the input interface and output interface of each controlled chip, the effective interface is determined by synchronous commands and CRC verification and judgment, the selection and forwarding of control commands is realized to ensure communication. Reliability and stability.
The unique address allocation of each chip is realized, so that the controller can easily control the chips in the cascade structure, and damage to any chip in the system will not affect the functions of other chips, reducing the complexity of the PCB and the risk of system failure.
Smart Images

Figure CN119003424A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of communication protocols, and in particular relates to a breakpoint-resume transmission method based on online address allocation. Background Art
[0002] Communication interfaces are widely used in semiconductor chips to achieve communication between controllers and chips. Common interfaces include I2C interface and SPI interface. The I2C interface consists of two lines, SDA and SCL. Its advantage is that the circuit is simple, but its disadvantage is that its bus structure makes the wiring complicated. At the same time, a controller can only connect up to 127 devices, which is not applicable in scenarios with more devices. The SPI interface consists of 4 lines: CLK, CS, DIN, and DOUT. The advantage of the SPI interface is that the communication speed is fast, but the controller requires more lines. Each controlled chip requires 4 signal lines. There are too many signal lines and the PCB routing is complicated.
[0003] With the development of technology, in some systems, there may be hundreds or thousands of chips of the same type. How to make the system PCB wiring easier, reduce the jumper wires of the PCB or reduce the number of PCB layers required by the system is also a big challenge. Due to the large number of chips in the system, any damage to a chip in the cascade structure may affect other chips in the cascade. A protocol control method that can realize breakpoint resumption is proposed, which has positive significance in the cascade control system. Summary of the invention
[0004] In view of the above problems, the present invention proposes a breakpoint-resume transmission method based on online address allocation based on a single-line interface protocol.
[0005] The technical solution of the present invention is:
[0006] A single-line communication protocol for multi-chip cascading. The controlled chips based on the single-line communication protocol have two interfaces: an input interface and an output interface. The input interface of each controlled chip is connected to the output interface of the previous controlled chip, and the input interface of the first controlled chip is connected to the controller. The communication method of the multi-chip cascade structure is:
[0007] A breakpoint-resume transmission method based on online address allocation is defined, wherein each controlled chip has a first input interface, a second input interface and an output interface, the first input interface of the Nth controlled chip is connected to the output interface of the N-1th controlled chip, the second input interface of the Nth controlled chip is connected to the output interface of the N-2th controlled chip, the first input interface of the first controlled chip is connected to the output interface of the controller, and the second input interface of the first controlled chip is grounded; the specific breakpoint-resume transmission method is:
[0008] Each controlled chip uses a synchronization command to determine the validity of input commands received by the first input interface and the second input interface, selects the control command of one of the input interfaces as a valid control command based on the determination result, and generates a control command sent by the output interface based on the valid control command.
[0009] Furthermore, the controller and all controlled chips communicate with each other using a single-line communication method, that is, the controller sends a control command to the first controlled chip, and after the first controlled chip parses the control command, it restores the control command and forwards it to the next chip through the output interface, and so on.
[0010] Furthermore, the method by which the controlled chip uses the synchronization command to determine the validity of the input commands of the two input interfaces is:
[0011] The flag bit of the first input interface receiving command is defined as RX_VALID. When the first input interface receives a valid asynchronous command that has passed the CRC check, this flag bit RX_VALID will be set to 1, otherwise it is 0; the flag bit of the second input interface receiving command is BRX_VALID. When the second input interface receives a valid asynchronous command that has passed the CRC check, this flag bit BRX_VALID will be set to 1, otherwise it is 0; when the controlled chip receives a synchronous command that has passed the CRC check, it will judge the two internal flag bits RX_VALID / BRX_VALID at this time, and judge whether the output signal of the output interface selects the signal of the first input interface or the second input interface as the basis according to the result of the flag bit. The specific judgment process is as follows:
[0012] When the chip is powered on, the default output interface selects to forward the signal of the first input interface;
[0013] When the chip has selected the first input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=1, the chip selects the signal of the first input interface as the output interface output signal;
[0014] When the chip has selected the first input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=0, the chip selects the signal of the first input interface as the output interface output signal;
[0015] When the chip has selected the first input interface as the output interface to output the signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=1, the chip selects the signal of the second input interface as the output interface to output the signal;
[0016] When the chip has selected the first input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=0, the chip selects the signal of the first input interface as the output interface output signal;
[0017] When the chip has selected the second input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=1, the chip selects the signal of the second input interface as the output interface output signal;
[0018] When the chip has selected the second input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=1, the chip selects the signal of the second input interface as the output interface output signal;
[0019] When the chip has selected the second input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=0, the chip selects the signal of the first input interface as the output interface output signal;
[0020] When the chip has selected the second input interface as the output interface to output the signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=0, the chip selects the signal of the second input interface as the output interface to output the signal.
[0021] The beneficial effects of the present invention are: the present invention assigns addresses to cascade chips through the protocol so that each chip has its own ID information, so that the controller can conveniently and quickly control one or more chips in the cascade structure; and if any non-continuous chip in the system is damaged, the functions of other chips are not affected; it plays a positive role in the field of chip control. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of the daisy chain cascade topology based on a single-wire interface;
[0023] Figure 2 Diagram for selecting arbitration between the first internal command flag and the TX output signal;
[0024] Figure 3 Diagram for selecting arbitration between the second internal command flag and the TX output signal;
[0025] Figure 4 Diagram of arbitration selection for the third internal command flag and TX output signal. DETAILED DESCRIPTION
[0026] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0027] like Figure 1 As shown, the method of the present invention is based on a single-line interface daisy chain cascade topology, and each controlled chip has 3 PIN pins: RX / BRX / TX. Among them, RX / BRX is a single-line digital input port, and TX is a signal output interface obtained by the chip based on input recovery. For the first chip, its RX is connected to the TX of the controller, and BRX can be grounded. The RX of the second chip is connected to the output TX of the first chip, and its BRX is connected to the output TX of the controller. Thereafter, the TX of the Nth chip is respectively connected to the RX of the N+1th chip and the BRX of the N+2th chip. In order to ensure that the chip receives accurate data, the protocol has a CRC check, and only commands with correct CRC check will be executed correctly.
[0028] During the initialization phase, the controller sends a command to set chip ID to number all the chips in the series. After the numbering is completed, a certain chip or multiple chips can be selected through the protocol to control together, achieving more convenient control.
[0029] When an error occurs in any non-continuous chip in the cascade topology, the subsequent chip of the error chip can be connected to the TX of the previous chip of the error chip by its BRX. The control chip periodically sends judgment commands to all chips. After receiving the judgment command, each chip will detect whether the signals of the two input ports of the chip are correct. If one of the port commands is abnormal. After receiving the judgment command, the chip will switch the signal pushed to the subsequent chip to the port that can receive the correct command. Through such a mechanism, as long as there is no error exception in the continuous chip in the cascade structure, the command can always be passed to the subsequent chip without being affected by the error chip, thus realizing the function of breakpoint resumption.
[0030] In a control system based on online address allocation, the controller needs to send an address allocation command during system initialization. The chip can receive commands through RX or BRX. Commands input from the RX / BRX port that pass the CRC check will be executed.
[0031] For the first-level chip, assuming that the address assigned to it by the system at the RX port is 01, it will forward the entire command to the next level through TX after completing the address allocation. The address assigned by the first-level chip to the second-level chip is 02.
[0032] For the subsequent chip, if the chip receives an address allocation command from RX, it will receive the allocation address in the command as its chip address, and add 1 to its received address as the allocation address for the subsequent chip; if the chip receives an address allocation command from BRX, it will receive the allocation address in the command plus 1 as its chip address, and add 2 to its received address as the allocation address for the subsequent chip;
[0033] After the address allocation is completed, all chips in the cascade structure will be assigned an address that is different from other chips, and the controller can control each chip based on this address.
[0034] Let the SYNC command be used as the validity judgment of the input command of the RX or BRX port. Between two valid SYNC commands, define RX_VALID as the internal flag bit of the RX port receiving command inside the RX chip. If the RX port receives a valid non-SYNC command that has passed the CRC check, this flag bit RX_VALID will be set to 1. Define BRX_VALID as the internal flag bit of the BRX port receiving command inside the BRX chip. If the BRX port receives a valid non-SYNC command that has passed the CRC check, this flag bit BRX_VALID will be set to 1. When the chip receives a SYNC command that has successfully passed the CRC check, it will judge the two internal flag bits RX_VALID / BRX_VALID at this time, and determine whether the TX output signal selects RX or BRX based on the result of the flag bit. For example Figure 2 , Figure 3 and Figure 4 As shown, the specific judgment process is as follows:
[0035] 1. When the chip is powered on, the default TX selection forwards the RX signal.
[0036] 2. When the chip has selected RX as the TX output signal, after receiving the SYNC command, if RX_VALID=1, BRX_VALID=1, the chip selects the RX signal as the TX output signal.
[0037] 3. When the chip has selected RX as the TX output signal, after receiving the SYNC command, if RX_VALID=1, BRX_VALID=0, the chip selects the RX signal as the TX output signal.
[0038] 4. When the chip has selected RX as the TX output signal, after receiving the SYNC command, if RX_VALID = 0, BRX_VALID = 1, the chip selects the BRX signal as the TX output signal.
[0039] 5. When the chip has selected RX as the TX output signal, after receiving the SYNC command, if RX_VALID = 0, BRX_VALID = 0, the chip selects the RX signal as the TX output signal.
[0040] 6. When the chip has selected BRX as the TX output signal, after receiving the SYNC command, if RX_VALID=1, BRX_VALID=1, the chip selects the BRX signal as the TX output signal.
[0041] 7. When the chip has selected BRX as the TX output signal, after receiving the SYNC command, if RX_VALID = 0, BRX_VALID = 1, the chip selects the BRX signal as the TX output signal.
[0042] 8. When the chip has selected BRX as the TX output signal, after receiving the SYNC command, if RX_VALID=1, BRX_VALID=0, the chip selects the RX signal as the TX output signal.
[0043] 9. When the chip has selected BRX as the TX output signal, after receiving the SYNC command, if RX_VALID = 0, BRX_VALID = 0, the chip selects the BRX signal as the TX output signal.
[0044] The above judgment result will continue until the next valid SYNC command is received. After the chip receives a valid SYNC command and completes the above interface judgment process, it sets the two internal flags RX_VALID and BRX_VALID to 0. Using the above judgment process, the system can work normally as long as the RX / BRX of a series of chips are not disconnected for two consecutive ID chips.
[0045] Through the above protocol and arbitration mechanism, when any of the two signal input ports RX / BRX of the chip is damaged, after receiving the SYNC command, the chip can switch the output to the normal port in time without affecting the subsequent cascade chips, thereby realizing the breakpoint resume function.
Claims
1. A breakpoint-resume transmission method based on online address allocation, characterized in that: It is defined that each controlled chip has a first input interface, a second input interface and an output interface, the first input interface of the Nth controlled chip is connected to the output interface of the N-1th controlled chip, the second input interface of the Nth controlled chip is connected to the output interface of the N-2th controlled chip, the first input interface of the first controlled chip is connected to the output interface of the controller, and the second input interface of the first controlled chip is grounded; the specific breakpoint resume method is: Each controlled chip uses a synchronization command to determine the validity of input commands received by the first input interface and the second input interface, selects the control command of one of the input interfaces as a valid control command based on the determination result, and generates a control command sent by the output interface based on the valid control command.
2. The method for resuming breakpoint transmission based on online address allocation according to claim 1, characterized in that: The controller and all controlled chips communicate with each other using a single-line communication method, that is, the controller sends a control command to the first controlled chip, and the first controlled chip parses the control command, restores the control command and forwards it to the next chip through the output interface, and so on.
3. The method for resuming breakpoint transmission based on online address allocation according to claim 1, characterized in that: The method by which the controlled chip uses synchronization commands to determine the validity of input commands of two input interfaces is: The flag bit of the first input interface receiving command is defined as RX_VALID. When the first input interface receives a valid asynchronous command that has passed the CRC check, this flag bit RX_VALID will be set to 1, otherwise it is 0; the flag bit of the second input interface receiving command is BRX_VALID. When the second input interface receives a valid asynchronous command that has passed the CRC check, this flag bit BRX_VALID will be set to 1, otherwise it is 0; when the controlled chip receives a synchronous command that has passed the CRC check, it will judge the two internal flag bits RX_VALID / BRX_VALID at this time, and judge whether the output signal of the output interface selects the signal of the first input interface or the second input interface as the basis according to the result of the flag bit. The specific judgment process is as follows: When the chip is powered on, the default output interface selects to forward the signal of the first input interface; When the chip has selected the first input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=1, the chip selects the signal of the first input interface as the output interface output signal; When the chip has selected the first input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=0, the chip selects the signal of the first input interface as the output interface output signal; When the chip has selected the first input interface as the output interface to output the signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=1, the chip selects the signal of the second input interface as the output interface to output the signal; When the chip has selected the first input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=0, the chip selects the signal of the first input interface as the output interface output signal; When the chip has selected the second input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=1, the chip selects the signal of the second input interface as the output interface output signal; When the chip has selected the second input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=1, the chip selects the signal of the second input interface as the output interface output signal; When the chip has selected the second input interface as the output interface output signal, after receiving the synchronization command, if RX_VALID=1, BRX_VALID=0, the chip selects the signal of the first input interface as the output interface output signal; When the chip has selected the second input interface as the output interface to output the signal, after receiving the synchronization command, if RX_VALID=0, BRX_VALID=0, the chip selects the signal of the second input interface as the output interface to output the signal.
