CN113032312B - Multi-chip circuit cascade communication system - Google Patents
Multi-chip circuit cascade communication system Download PDFInfo
- Publication number
- CN113032312B CN113032312B CN201911346919.5A CN201911346919A CN113032312B CN 113032312 B CN113032312 B CN 113032312B CN 201911346919 A CN201911346919 A CN 201911346919A CN 113032312 B CN113032312 B CN 113032312B
- Authority
- CN
- China
- Prior art keywords
- chip
- level
- signal
- sub
- daisy
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4247—Bus transfer protocol, e.g. handshake; Synchronisation on a daisy chain bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
- G06F13/4291—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a clocked protocol
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明提供一种多片电路级联通信系统中,多片电路级联通信系统的多级子级芯片之间通过菊花链方式连接,每级子级芯片的级联通信接口包括兼容SPI接口的可配置菊花链电路结构,通过结合通用SPI通信接口和菊花链结构,在同样SPI通信接口管脚资源的情况下,可实现一颗主控芯片与多颗子级电路芯片级联通信,主控芯片可对每颗级联的子级电路芯片进行所有寄存器的写寄存器、读寄存器操作,对每颗级联的子级电路芯片进行不同地址的寄存器写、读操作,有选择性的旁路子级电路芯片等精准的点对点和点对多操作,实现了主控芯片对级联子级电路芯片的精准管理和控制,有效解决了现有的多片电路级联通信接口中级联方案功能单一、无法应用到复杂需求场合的问题。
The invention provides a multi-chip circuit cascade communication system. The multi-stage sub-level chips of the multi-chip circuit cascade communication system are connected in a daisy chain manner, and the cascade communication interface of each sub-level chip includes a SPI interface compatible interface. The daisy-chain circuit structure can be configured. By combining the general SPI communication interface and the daisy-chain structure, with the same SPI communication interface pin resources, cascaded communication between one main control chip and multiple sub-circuit chips can be realized. The chip can write and read registers of all registers for each cascaded sub-circuit chip, perform register write and read operations with different addresses for each cascaded sub-circuit chip, and selectively bypass the sub-level Accurate point-to-point and point-to-multiple operations such as circuit chips realize the precise management and control of the main control chip to the cascaded sub-level circuit chips, effectively solving the existing multi-chip circuit cascade communication interface. Problems that cannot be applied to complex demand occasions.
Description
技术领域technical field
本发明涉及信号处理与通信技术领域,特别是涉及一种多片电路级联通信系统。The present invention relates to the technical field of signal processing and communication, in particular to a multi-chip circuit cascade communication system.
背景技术Background technique
随着科技的发展,面向应用市场的电子系统功能不断增加,系统上集成的集成电路数量也越来越多,甚至有的电子系统为实现复杂的多通道处理,同样的集成电路会集成若干颗。这将导致占用同样的信号管脚连线资源的需求成倍增加,从而对进行最终信号处理的处理器带来沉重的管脚资源负担。例如,一个电子系统要集成一颗ADC电路,基于SPI的通信接口最少需要4根(SCLK、CSN、SDI、SDO)管脚资源,如果现在系统功能扩展,需要集成同样的ADC电路10颗,则需要管脚资源为40根,管脚资源需求就增加了36根,这对一个电子系统管脚资源来说无疑将是一个非常沉重的负担,甚至可能因为要满足足够的管脚资源需求,而更改设计方案以采用更多管脚资源的处理器(DSP或者FPGA等),这将带来设计方案更改风险以及成本增加的问题。With the development of science and technology, the functions of electronic systems oriented to the application market continue to increase, and the number of integrated circuits integrated on the system is also increasing. In some electronic systems, in order to achieve complex multi-channel processing, the same integrated circuit will integrate several . This will result in an exponential increase in the demand for the same signal pin connection resources, thereby placing a heavy pin resource burden on the processor that performs the final signal processing. For example, if an electronic system needs to integrate an ADC circuit, the SPI-based communication interface requires at least 4 (SCLK, CSN, SDI, SDO) pin resources. Needing 40 pin resources, the pin resource requirement will increase by 36 pins, which will undoubtedly be a very heavy burden on the pin resources of an electronic system. Change the design to use a processor with more pin resources (DSP or FPGA, etc.), which will bring the risk of design changes and increase the cost.
目前,为解决上述问题,业界多个厂家已推出支持菊花链模式的SPI接口来解决多片级联问题。例如美国ADI公司的AD7690产品,其SPI接口包括CNV、SCK、SDI和SDO四根信号,如图1所示,其推荐的级联解决方案是通过共享使能信号CNV和时钟信号SCK,以及前级输出SDO与后级输入SDI级联这样的方式,在驱动能力足够的情况下,无论多少片AD7690级联,对于后级的信号处理器,仅仅只提供三根信号接口,从而极大的节省了信号处理器的管脚资源。At present, in order to solve the above problems, many manufacturers in the industry have introduced SPI interfaces that support the daisy-chain mode to solve the multi-chip cascade problem. For example, the AD7690 product of ADI Company in the United States, its SPI interface includes four signals CNV, SCK, SDI and SDO, as shown in Figure 1, the recommended cascading solution is to share the enable signal CNV and clock signal SCK, and the previous In this way, the output SDO of the stage is cascaded with the input SDI of the latter stage. If the driving capacity is sufficient, no matter how many AD7690s are cascaded, for the signal processor of the latter stage, only three signal interfaces are provided, which greatly saves money. Pin resources for signal processors.
但是上述方案以及其他类似级联解决方案,都只是通过接口信号(CNV、SCK、SDI和SDO)将单片集成电路中的输出数据以移位的方式顺序串行移位输出,即读数据;但当需要对单片集成电路中的多个寄存器进行写配置信息、读寄存器值以校验、以及级联时需要选择性旁路某片级联电路等复杂操作时,上述方案就无法满足了,即上述方案功能单一,无法应用到复杂场合。However, the above solutions and other similar cascaded solutions only serially shift and output the output data in the monolithic integrated circuit by means of interface signals (CNV, SCK, SDI and SDO) in a shifted manner, that is, read data; However, when it is necessary to write configuration information to multiple registers in a monolithic integrated circuit, read register values for verification, and to selectively bypass a certain cascaded circuit when cascading, the above solution cannot be satisfied. , that is, the above scheme has a single function and cannot be applied to complex occasions.
发明内容SUMMARY OF THE INVENTION
鉴于以上所述现有技术的缺点,本发明的目的在于提供一种包含兼容SPI接口的可配置菊花链电路结构的多片电路级联通信系统,用于解决上述技术问题。In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a multi-chip circuit cascade communication system including a configurable daisy-chain circuit structure compatible with an SPI interface, to solve the above-mentioned technical problems.
为实现上述目的及其他相关目的,本发明提供一种多片电路级联通信系统,其包括主控芯片和多级子级芯片,多级所述子级芯片及所述主控芯片级联,且多级所述子级芯片之间通过菊花链方式连接;In order to achieve the above object and other related purposes, the present invention provides a multi-chip circuit cascade communication system, which includes a main control chip and a multi-level sub-level chip, and the multi-level sub-level chip and the main control chip are cascaded, And the multi-level sub-level chips are connected by a daisy chain;
所述主控芯片输出的串行时钟和所有所述子级芯片的时钟输入端连接,所述主控芯片输出的片选信号和所有所述子级芯片的片选输入端连接,所述主控芯片输出的加载控制信号和所有所述子级芯片的加载控制输入端连接;The serial clock output by the main control chip is connected with the clock input terminals of all the sub-level chips, the chip select signal output by the main control chip is connected with the chip select input terminals of all the sub-level chips, and the main control chip is connected. The loading control signal output by the control chip is connected with the loading control input terminals of all the sub-level chips;
所述主控芯片的串行输出端与第一级所述子级芯片的串行输入端连接;除第一级所述子级芯片外,其它所述子级芯片的串行输入端都和前级所述子级芯片的串行输出端连接;最后一级所述子级芯片的串行输出端和所述主控芯片的串行输入端连接;The serial output terminal of the main control chip is connected to the serial input terminal of the first-level sub-level chip; except for the first-level sub-level chip, the serial input terminals of the other sub-level chips are all connected to the serial input terminal of the first-level sub-level chip. The serial output terminal of the sub-level chip in the previous stage is connected; the serial output terminal of the sub-level chip in the last stage is connected with the serial input terminal of the main control chip;
每级所述子级芯片的级联通信接口包括兼容SPI接口的可配置菊花链电路结构。The cascaded communication interface of the sub-level chips at each stage includes a configurable daisy-chain circuit structure compatible with the SPI interface.
可选地,每级所述子级芯片的旁路输入端悬空,每级所述子级芯片的旁路输入端为下拉设计,悬空状态下为低电平。Optionally, the bypass input terminal of the sub-level chip of each stage is suspended, and the bypass input terminal of the sub-level chip of each stage is a pull-down design, and is a low level in a floating state.
可选地,所述兼容SPI接口的可配置菊花链电路结构包括:Optionally, the configurable daisy-chain circuit structure compatible with the SPI interface includes:
通用SPI通信接口,分别与所述片选信号、串行时钟输入信号、串行输入信号及复位输入信号相连,在普通串行通信模式下接收串行数据输入;a general SPI communication interface, which is respectively connected with the chip select signal, the serial clock input signal, the serial input signal and the reset input signal, and receives serial data input in a common serial communication mode;
基于SPI的菊花链接口,分别与所述片选信号、串行时钟输入信号、串行输入信号及复位输入信号相连,在菊花链通信模式下接收串行数据输入;The SPI-based daisy-chain interface is respectively connected with the chip select signal, the serial clock input signal, the serial input signal and the reset input signal, and receives serial data input in the daisy-chain communication mode;
串行输出信号选择模块,与所述串行输入信号、通用SPI通信接口及基于SPI的菊花链接口连接,对所述串行输入信号、所述通用SPI通信接口的串行输出信号及所述基于SPI的菊花链接口的串行输出信号进行选择输出;The serial output signal selection module is connected with the serial input signal, the general SPI communication interface and the SPI-based daisy-chain interface, and is connected to the serial input signal, the serial output signal of the general SPI communication interface and the The serial output signal based on the SPI daisy-chain interface is selected and output;
数据寄存输出选择模块,与所述通用SPI通信接口及基于SPI的菊花链接口连接,对所述通用SPI通信接口的寄存数据输出信号及所述基于SPI的菊花链接口的寄存数据输出信号进行选择输出,其输出端接每级所述子级芯片的控制寄存器组。A data register output selection module, connected with the general SPI communication interface and the SPI-based daisy-chain interface, and selects the register data output signal of the general SPI communication interface and the register data output signal of the SPI-based daisy-chain interface output, the output terminal of which is connected to the control register group of the sub-level chip of each level.
可选地,所述串行输出信号选择模块包括:Optionally, the serial output signal selection module includes:
第一选择器,分别与所述通用SPI通信接口、基于SPI的菊花链接口和菊花链模式的使能控制信号相连,在所述菊花链模式的使能控制信号的控制下,对所述通用SPI通信接口的串行输出信号和所述基于SPI的菊花链接口的串行输出信号进行选择输出;The first selector is respectively connected with the general-purpose SPI communication interface, the SPI-based daisy-chain interface, and the enabling control signal of the daisy-chain mode, and under the control of the enabling control signal of the daisy-chain mode, the general The serial output signal of the SPI communication interface and the serial output signal of the SPI-based daisy-chain interface are selectively output;
第二选择器,分别与所述第一选择器的输出、串行输入信号和旁路输入信号相连,在所述旁路信号的控制下,对所述串行输入信号和所述第一选择器的输出进行选择输出;The second selector is respectively connected to the output of the first selector, the serial input signal and the bypass input signal, and under the control of the bypass signal, selects the serial input signal and the first selector. The output of the controller is selected for output;
其中,所述第二选择器的输出信号作为每级所述子级芯片的串行输出信号。Wherein, the output signal of the second selector is used as the serial output signal of the sub-level chip of each stage.
可选地,所述数据寄存输出选择模块包括:Optionally, the data register output selection module includes:
反相器,其输入端与所述片选信号相连,对所述片选信号逻辑取反;an inverter, the input end of which is connected to the chip selection signal, and logically inverts the chip selection signal;
第一与门,其输入端分别与所述通用SPI通信接口和所述反相器的输出端相连;the first AND gate, the input end of which is respectively connected with the output end of the general SPI communication interface and the inverter;
第一数据寄存器组,分别与所述通用SPI通信接口、第一与门的输出端和串行时钟输入信号相连,所述第一与门产生所述第一数据寄存器组锁存数据时的使能信号,在最后一个串行时钟的上升沿锁存所述通用SPI通信接口输出的并行数据。The first data register group is respectively connected with the general SPI communication interface, the output end of the first AND gate and the serial clock input signal, and the first AND gate generates the first data register group to latch data. Enable signal to latch the parallel data output by the general SPI communication interface at the rising edge of the last serial clock.
可选地,所述数据寄存输出选择模块还包括:Optionally, the data register output selection module further includes:
D触发器,带有复位端,分别与所述串行时钟输入信号、复位输入信号相连,产生所述菊花链模式的使能控制信号;A D flip-flop, with a reset terminal, is respectively connected with the serial clock input signal and the reset input signal to generate an enable control signal of the daisy-chain mode;
第三选择器,分别与所述D触发器和所述片选信号相连,在所述片选信号控制下,对所述D触发器的Q端和Qn端进行选择输出;The third selector is respectively connected with the D flip-flop and the chip selection signal, and under the control of the chip selection signal, selects and outputs the Q terminal and the Qn terminal of the D flip-flop;
第二与门,其输入端分别与所述基于SPI的菊花链接口、片选信号和第三选择器的输入端相连;The second AND gate, the input ends of which are respectively connected with the input ends of the SPI-based daisy-chain interface, the chip select signal and the third selector;
第二数据寄存器组,分别与所述基于SPI的菊花链接口、第二与门的输出端和所述加载控制信号相连,所述第二与门产生所述第二数据寄存器组锁存数据时的使能信号,在所述加载控制信号的上升沿锁存所述基于SPI的菊花链接口在所述第二数据寄存器组中的移位保存值。The second data register group is respectively connected to the SPI-based daisy-chain interface, the output end of the second AND gate and the load control signal. When the second AND gate generates the second data register group to latch data The enable signal of the SPI-based daisy-chain interface in the second data register group is latched at the rising edge of the load control signal.
可选地,所述数据寄存输出选择模块还包括:Optionally, the data register output selection module further includes:
第四选择器,分别与所述第一数据寄存器组、第二数据寄存器组和菊花链模式的使能控制信号相连,在所述菊花链模式的使能控制信号的控制下,对所述第一数据寄存器组的寄存数据和第二数据寄存器组的寄存数据进行选择输出。The fourth selector is respectively connected with the first data register group, the second data register group and the enable control signal of the daisy-chain mode, and under the control of the enable control signal of the daisy-chain mode, the The registered data of one data register group and the registered data of the second data register group are selected and output.
可选地,所述第一与门包括二输入与门,所述第二与门包括三输入与门,所述第一选择器、第二选择器、第三选择器及第四选择器包括二选一选择器。Optionally, the first AND gate includes a two-input AND gate, the second AND gate includes a three-input AND gate, and the first selector, the second selector, the third selector, and the fourth selector include Two-to-one selector.
可选地,在所述片选信号的高电平期间,所述串行时钟输入信号中连续出现的两个下降沿构成一对触发信号,使得所述菊花链模式的使能控制信号产生一个高电平脉冲,对应脉冲宽度由两个所述下降沿的间隔决定。Optionally, during the high level period of the chip select signal, two consecutive falling edges in the serial clock input signal constitute a pair of trigger signals, so that the enable control signal of the daisy-chain mode generates a trigger signal. For a high-level pulse, the corresponding pulse width is determined by the interval between the two falling edges.
可选地,当所述旁路输入信号为低电平时,所述子级芯片处于菊花链工作模式;当所述旁路输入信号为高电平时,所述子级芯片的菊花链工作模式被旁路,所述子级芯片通过串行接口接收的所述串行时钟输入信号直接传输到所述子级芯片的串行输出端口。Optionally, when the bypass input signal is at a low level, the sub-level chip is in a daisy-chain operation mode; when the bypass input signal is at a high level, the daisy-chain operation mode of the sub-level chip is disabled. Bypass, the serial clock input signal received by the sub-level chip through the serial interface is directly transmitted to the serial output port of the sub-level chip.
如上所述,本发明的多片电路级联通信系统,具有以下有益效果:As mentioned above, the multi-chip circuit cascade communication system of the present invention has the following beneficial effects:
多级子级芯片之间通过菊花链方式连接,每级子级芯片的级联通信接口包括兼容SPI接口的可配置菊花链电路结构,通过结合通用SPI通信接口和菊花链结构,在同样的SPI通信接口管脚资源的情况下,可实现一颗主控芯片与多颗子级电路芯片级联通信;主控芯片可以对每颗级联的子级电路芯片进行所有寄存器的写寄存器、读寄存器操作,主控芯片可以同时对每颗级联的子级电路芯片进行不同地址的寄存器写、读操作,主控芯片可以有选择性的旁路子级电路芯片;此外,在不额外增加管脚资源的情况下,这种电路结构可以让主控芯片对级联的子级电路芯片进行精准的点对点和点对多操作,实现了主控芯片对级联子级电路芯片的精准管理和控制,从而使得具有这样通信接口的电路芯片可以应用到复杂需求场合。The multi-level sub-level chips are connected by a daisy-chain method. The cascaded communication interface of each level of sub-level chips includes a configurable daisy-chain circuit structure compatible with the SPI interface. By combining the general SPI communication interface and the daisy-chain structure, the same SPI In the case of communication interface pin resources, one main control chip can communicate with multiple sub-level circuit chips in cascade; the main control chip can write and read all registers for each cascaded sub-level circuit chip. operation, the main control chip can simultaneously perform register write and read operations with different addresses for each cascaded sub-circuit chip, and the main control chip can selectively bypass the sub-circuit chips; in addition, without additional pin resources This circuit structure allows the main control chip to perform precise point-to-point and point-to-multiple operations on the cascaded sub-circuit chips, and realizes the precise management and control of the cascaded sub-circuit chips by the main control chip. The circuit chip with such a communication interface can be applied to complex demand occasions.
附图说明Description of drawings
图1显示为美国ADI公司的AD7690产品菊花链级联连接结构。Figure 1 shows the daisy-chain cascade connection structure of AD7690 products of ADI Company.
图2显示为本发明实施例中多片电路级联通信系统的菊花链级联连接结构。FIG. 2 shows a daisy-chain cascade connection structure of a multi-chip circuit cascade communication system according to an embodiment of the present invention.
图3显示为本发明实施例中多片电路级联通信系统的兼容SPI接口的可配置菊花链电路结构的较佳实施方式的结构示意图。FIG. 3 is a schematic structural diagram of a preferred implementation manner of a configurable daisy-chain circuit structure compatible with an SPI interface of a multi-chip circuit cascade communication system according to an embodiment of the present invention.
图4显示为本发明实施例中输入端的串行接口通信时序图。FIG. 4 is a sequence diagram of a serial interface communication of an input terminal in an embodiment of the present invention.
图5显示为本发明实施例中应用在多片电路级联通信系统中的主控芯片发送命令数据传输结构示意图。FIG. 5 is a schematic diagram illustrating a data transmission structure of a main control chip sent in a multi-chip circuit cascade communication system according to an embodiment of the present invention.
图6显示为本发明实施例中多片电路级联通信系统在菊花链模式使能控制信号DCM_EN产生过程的较佳实施方式的时序示意图。FIG. 6 is a timing diagram illustrating a preferred embodiment of a process of generating an enable control signal DCM_EN in a daisy-chain mode in a multi-chip circuit cascaded communication system according to an embodiment of the present invention.
图7显示为本发明实施例中多片电路级联通信系统在菊花链模式下的写寄存器操作过程的较佳实施方式的时序示意图。FIG. 7 is a timing diagram illustrating a preferred implementation manner of a register write operation process in a daisy-chain mode of a multi-chip circuit cascaded communication system according to an embodiment of the present invention.
图8显示为本发明实施例中多片电路级联通信系统在菊花链模式下的读寄存器操作过程的较佳实施方式的时序示意图。FIG. 8 is a timing diagram illustrating a preferred implementation manner of a read register operation process of a multi-chip circuit cascade communication system in a daisy-chain mode according to an embodiment of the present invention.
图9显示为本发明实施例中多片电路级联通信系统实现方法在菊花链模式下的子级电路被旁路控制的操作过程的较佳实施方式的时序示意图。FIG. 9 is a timing diagram illustrating a preferred embodiment of an operation process in which sub-level circuits are bypassed in a daisy-chain mode of a method for implementing a multi-chip circuit cascaded communication system according to an embodiment of the present invention.
具体实施方式Detailed ways
发明人研究发现,现有的级联解决方案,都只是通过接口信号(CNV、SCK、SDI和SDO)将单片集成电路中的输出数据以移位的方式顺序串行移位输出(即读数据),但当需要对单片集成电路中的多个寄存器进行写配置信息、读寄存器值以校验、以及级联时需要选择性旁路某片级联电路等复杂操作时,上述方案就无法满足需求,即上述方案功能单一、无法应用到复杂场合。The inventor's research found that the existing cascading solutions only serially shift the output data in the monolithic integrated circuit through the interface signals (CNV, SCK, SDI and SDO) in a shifted manner (that is, read data), but when it is necessary to write configuration information to multiple registers in a monolithic integrated circuit, read register values for verification, and to selectively bypass a certain cascaded circuit when cascading complex operations, the above scheme is not Unable to meet the needs, that is, the above solutions have a single function and cannot be applied to complex occasions.
基于此,本发明提出一种包含兼容SPI接口的可配置菊花链电路结构的多片电路级联通信系统,多片电路级联通信系统的多级子级芯片之间通过菊花链方式连接,每级子级芯片的级联通信接口包括兼容SPI接口的可配置菊花链电路结构,通过结合通用SPI通信接口和菊花链结构,在同样的SPI通信接口管脚资源的情况下,可实现一颗主控芯片与多颗子级电路芯片级联通信,主控芯片可以对每颗级联的子级电路芯片进行所有寄存器的写寄存器、读寄存器操作,且主控芯片可以同时对每颗级联的子级电路芯片进行不同地址的寄存器写、读操作,且这种电路结构可以让主控芯片对级联的子级电路芯片进行精准的点对点和点对多操作,实现了主控芯片对级联子级电路芯片的精准管理和控制,从而使得具有这样通信接口的电路芯片可以应用到复杂需求场合。Based on this, the present invention proposes a multi-chip circuit cascading communication system including a configurable daisy-chain circuit structure compatible with an SPI interface. The cascaded communication interface of the sub-level chip includes a configurable daisy-chain circuit structure compatible with the SPI interface. By combining the general SPI communication interface and the daisy-chain structure, under the same SPI communication interface pin resources, one master can be realized. The control chip communicates with multiple sub-level circuit chips in cascade, and the main control chip can write and read all registers for each cascaded sub-level circuit chip, and the main control chip can simultaneously write and read registers for each cascaded The sub-level circuit chips perform register write and read operations at different addresses, and this circuit structure allows the main control chip to perform precise point-to-point and point-to-multiple operations on the cascaded sub-level circuit chips, realizing the cascade of the main control chips. The precise management and control of sub-level circuit chips enables circuit chips with such communication interfaces to be applied to complex demand occasions.
以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。The embodiments of the present invention are described below through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
请参阅图1至图9。需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。本说明书所附图式所绘示的结构、比例、大小等,均仅用以配合说明书所揭示的内容,以供熟悉此技术的人士了解与阅读,并非用以限定本发明可实施的限定条件,故不具技术上的实质意义,任何结构的修饰、比例关系的改变或大小的调整,在不影响本发明所能产生的功效及所能达成的目的下,均应仍落在本发明所揭示的技术内容得能涵盖的范围内。See Figures 1 to 9. It should be noted that the drawings provided in this embodiment are only to illustrate the basic concept of the present invention in a schematic way, so the drawings only show the components related to the present invention rather than the number, shape and the number of components in actual implementation. For dimension drawing, the type, quantity and proportion of each component can be changed at will in actual implementation, and the component layout may also be more complicated. The structures, proportions, sizes, etc. shown in the drawings in this specification are only used to cooperate with the contents disclosed in the specification for the understanding and reading of those who are familiar with the technology, and are not intended to limit the conditions for the implementation of the present invention. , therefore does not have technical substantive significance, any structural modification, proportional relationship change or size adjustment, without affecting the effect that the present invention can produce and the purpose that can be achieved, should still fall within the scope of the present invention. The technical content must be able to cover the scope.
如图2所示,本发明提供一种多片电路级联通信系统,其包括主控芯片和多级子级芯片,多级子级芯片及主控芯片级联,且多级子级芯片之间通过菊花链方式连接;As shown in FIG. 2, the present invention provides a multi-chip circuit cascade communication system, which includes a main control chip and a multi-level sub-level chip, the multi-level sub-level chip and the main control chip are cascaded, and the multi-level sub-level chip is connected. connected by daisy chain;
主控芯片输出的串行时钟信号SCK和所有子级芯片的时钟输入端连接,主控芯片输出的片选信号SEN和所有子级芯片的片选输入端连接,主控芯片输出的加载控制信号LOAD和所有子级芯片的加载控制输入端连接;The serial clock signal SCK output by the main control chip is connected with the clock input terminals of all sub-level chips, the chip select signal SEN output by the main control chip is connected with the chip select input terminals of all sub-level chips, and the loading control signal output by the main control chip LOAD is connected to the load control input terminals of all sub-level chips;
主控芯片的串行输出端与第一级子级芯片的串行输入端连接;除第一级子级芯片外,其它子级芯片的串行输入端都和前级子级芯片的串行输出端连接;最后一级子级芯片的串行输出端和主控芯片的串行输入端连接;The serial output terminal of the main control chip is connected to the serial input terminal of the first-level sub-level chip; except for the first-level sub-level chip, the serial input terminals of other sub-level chips are connected to the serial input terminal of the previous-level sub-level chip. The output terminal is connected; the serial output terminal of the last stage sub-level chip is connected with the serial input terminal of the main control chip;
每级子级芯片的级联通信接口包括兼容SPI接口的可配置菊花链电路结构。The cascaded communication interface of each sub-level chip includes a configurable daisy-chain circuit structure compatible with the SPI interface.
可选地,如图2所示,每级子级芯片的旁路输入端悬空,每级子级芯片的旁路输入端为下拉设计,悬空状态下为低电平。Optionally, as shown in FIG. 2 , the bypass input terminal of each sub-level chip is suspended, and the bypass input terminal of each sub-level chip is designed to be pulled down, and is low level in the floating state.
可选地,如图2所示的多片电路级联通信系统包括4级子级芯片;如图6所示的多片电路级联通信系统包括L级子级芯片。Optionally, the multi-chip circuit cascade communication system shown in FIG. 2 includes 4-level sub-level chips; the multi-chip circuit cascade communication system shown in FIG. 6 includes L-level sub-level chips.
可选地,如图3所示,兼容SPI接口的可配置菊花链电路结构包括:Optionally, as shown in Figure 3, the configurable daisy-chain circuit structure compatible with the SPI interface includes:
通用SPI通信接口,分别与片选信号SEN、串行时钟输入信号SCLK、串行输入信号SDI及复位输入信号RST相连,在普通串行通信模式下接收串行数据输入;The general SPI communication interface is respectively connected with the chip select signal SEN, the serial clock input signal SCLK, the serial input signal SDI and the reset input signal RST, and receives serial data input in the ordinary serial communication mode;
基于SPI的菊花链接口,分别与片选信号SEN、串行时钟输入信号SCLK、串行输入信号SDI及复位输入信号RST相连,在菊花链通信模式下接收串行数据输入;The SPI-based daisy-chain interface is respectively connected with the chip select signal SEN, the serial clock input signal SCLK, the serial input signal SDI and the reset input signal RST, and receives serial data input in the daisy-chain communication mode;
串行输出信号选择模块,与串行输入信号SDI、通用SPI通信接口及基于SPI的菊花链接口连接,对串行输入信号SDI、通用SPI通信接口的串行输出信号SDO_spi及基于SPI的菊花链接口的串行输出信号SDO_DCM进行选择输出;The serial output signal selection module is connected with the serial input signal SDI, the general SPI communication interface and the SPI-based daisy-chain interface, and the serial input signal SDI, the serial output signal SDO_spi of the general SPI communication interface and the SPI-based daisy-chain interface The serial output signal SDO_DCM of the port is selected and output;
数据寄存输出选择模块,与通用SPI通信接口及基于SPI的菊花链接口连接,对通用SPI通信接口的寄存数据输出信号及所述基于SPI的菊花链接口的寄存数据输出信号进行选择输出,其输出端接每级子级芯片的控制寄存器组。The data register output selection module is connected with the general-purpose SPI communication interface and the SPI-based daisy-chain interface, and selects and outputs the register data output signal of the general-purpose SPI communication interface and the register data output signal of the SPI-based daisy-chain interface. Terminates the control register bank of each sub-level chip.
其中,通用SPI通信接口为通用的SPI通信接口,其结构可参考现有技术,在此不再赘述。The general-purpose SPI communication interface is a general-purpose SPI communication interface, and its structure may refer to the prior art, which will not be repeated here.
详细地,如图3所示,串行输出信号选择模块包括:In detail, as shown in Figure 3, the serial output signal selection module includes:
第一选择器MUX1,分别与通用SPI通信接口、基于SPI的菊花链接口和菊花链模式的使能控制信号DCM_EN相连,在菊花链模式的使能控制信号DCM_EN的控制下,对通用SPI通信接口的串行输出信号SDO_spi和基于SPI的菊花链接口的串行输出信号SDO_DCM进行选择输出,其输出端输出串行输出信号SDO_T;The first selector MUX1 is respectively connected with the general SPI communication interface, the SPI-based daisy-chain interface and the enable control signal DCM_EN of the daisy-chain mode, and under the control of the enable control signal DCM_EN of the daisy-chain mode, the general SPI communication interface The serial output signal SDO_spi of the SPI and the serial output signal SDO_DCM of the SPI-based daisy-chain interface are selected and output, and the output terminal outputs the serial output signal SDO_T;
第二选择器MUX2,分别与第一选择器MUX1的输出、串行输入信号SDI和旁路输入信号BYPASS相连,在旁路信号BYPASS的控制下,对串行输入信号SDI和第一选择器MUX1的输出SDO_T进行选择输出;The second selector MUX2 is respectively connected to the output of the first selector MUX1, the serial input signal SDI and the bypass input signal BYPASS, and under the control of the bypass signal BYPASS, the serial input signal SDI and the first selector MUX1 The output SDO_T is selected for output;
其中,第二选择器MUX2的输出信号作为每级子级芯片的串行输出信号SDO。Wherein, the output signal of the second selector MUX2 is used as the serial output signal SDO of each sub-level chip.
详细地,如图3所示,数据寄存输出选择模块包括:In detail, as shown in Figure 3, the data register output selection module includes:
反相器INV1,其输入端与片选信号SEN相连,对片选信号SEN逻辑取反;Inverter INV1, the input terminal of which is connected to the chip select signal SEN, and logically inverts the chip select signal SEN;
第一与门AND2x1,其输入端分别与通用SPI通信接口和反相器INV1的输出端相连,对通用SPI通信接口输出的信号M/R_spi及片选信号SEN的取反信号进行与运算,在其输出端得到使能信号EN1;The first AND gate AND2x1, whose input ends are respectively connected with the general SPI communication interface and the output end of the inverter INV1, performs AND operation on the signal M/R_spi output by the general SPI communication interface and the inverted signal of the chip select signal SEN, Its output terminal gets the enable signal EN1;
第一数据寄存器组,分别与通用SPI通信接口、第一与门AND2x1的输出端和串行时钟输入信号SCLK相连,第一与门AND2x1产生第一数据寄存器组锁存数据时的使能信号EN1,在最后一个串行时钟的上升沿锁存通用SPI通信接口输出的并行数据,其接收通用SPI通信接口输出的地址信号ADDR_spi[N-m-1]和串行输出信号spi_D[m-1:0]并输出寄存数据信号data_SPI[m-1:0]。The first data register group is respectively connected with the general SPI communication interface, the output end of the first AND gate AND2x1 and the serial clock input signal SCLK, and the first AND gate AND2x1 generates the enable signal EN1 when the first data register group latches data , latch the parallel data output by the general SPI communication interface at the rising edge of the last serial clock, which receives the address signal ADDR_spi[N-m-1] and the serial output signal spi_D[m-1:0] output by the general SPI communication interface And output the registered data signal data_SPI[m-1:0].
其中,第一数据寄存器组为m位数据寄存器组,m为正整数如8、16等。The first data register group is an m-bit data register group, and m is a positive integer such as 8, 16, and so on.
详细地,如图3所示,数据寄存输出选择模块还包括:In detail, as shown in Figure 3, the data register output selection module further includes:
D触发器DFFR1,带有复位端,分别与串行时钟输入信号SCLK、复位输入信号RST相连,在CK端接串行时钟输入信号SCLK,在R端接复位输入信号RST,在输出端Q端产生菊花链模式的使能控制信号DCM_EN;D flip-flop DFFR1, with a reset terminal, is connected to the serial clock input signal SCLK and the reset input signal RST respectively, the CK terminal is connected to the serial clock input signal SCLK, the R terminal is connected to the reset input signal RST, and the output terminal Q is connected Generate daisy-chain mode enable control signal DCM_EN;
第三选择器MUX3,分别与D触发器DFFR1和片选信号SEN相连,第三选择器MUX3的两个输入端分别接D触发器DFFR1的输出端Q端和输出端Qn端,第三选择器MUX3的控制端接片选信号SEN,第三选择器MUX3的输出端接D触发器DFFR1的输入端D端,在片选信号SEN控制下,对D触发器DFFR1的Q端和Qn端进行选择输出;The third selector MUX3 is connected to the D flip-flop DFFR1 and the chip selection signal SEN respectively. The two input ends of the third selector MUX3 are respectively connected to the output end Q and the output end Qn of the D flip-flop DFFR1. The third selector The control terminal of MUX3 is connected to the chip selection signal SEN, and the output terminal of the third selector MUX3 is connected to the input terminal D of the D flip-flop DFFR1. Under the control of the chip selection signal SEN, the Q terminal and the Qn terminal of the D flip-flop DFFR1 are selected. output;
第二与门AND3x1,其输入端分别与基于SPI的菊花链接口、片选信号SEN和第三选择器MUX3的输入端相连,对基于SPI的菊花链接口输出的信号DCM_M/R、片选信号SEN及菊花链模式的使能控制信号DCM_EN进行与运算,在其输出端输出使能信号EN2;The second AND gate AND3x1 is connected to the input end of the SPI-based daisy-chain interface, the chip selection signal SEN and the input end of the third selector MUX3, respectively. The enable control signal DCM_EN of SEN and daisy-chain mode performs AND operation, and outputs the enable signal EN2 at its output;
第二数据寄存器组,分别与基于SPI的菊花链接口、第二与门AND3x1的输出端和加载控制信号LOAD相连,第二与门AND3x1产生第二数据寄存器组锁存数据时的使能信号EN2,在加载控制信号LOAD的上升沿锁存基于SPI的菊花链接口在第二数据寄存器组中的移位保存值,其接收通用SPI通信接口输出的地址信号DCM_ADDR[N-m-1]和串行输出信号DCM_D[m-1:0]并输出寄存数据信号data_DCM[m-1:0]。The second data register group is respectively connected with the SPI-based daisy-chain interface, the output end of the second AND gate AND3x1 and the loading control signal LOAD, and the second AND3x1 generates an enable signal EN2 when the second data register group latches data , at the rising edge of the load control signal LOAD to latch the shift stored value of the SPI-based daisy-chain interface in the second data register group, which receives the address signal DCM_ADDR[N-m-1] output by the general SPI communication interface and the serial output signal DCM_D[m-1:0] and output the registered data signal data_DCM[m-1:0].
其中,第二数据寄存器组同样为m位数据寄存器组。The second data register group is also an m-bit data register group.
详细地,如图3所示,数据寄存输出选择模块还包括:In detail, as shown in Figure 3, the data register output selection module further includes:
第四选择器MUX组1,分别与第一数据寄存器组、第二数据寄存器组和菊花链模式的使能控制信号DCM_EN相连,在菊花链模式的使能控制信号DCM_EN的控制下,对第一数据寄存器组的寄存数据信号data_SPI[m-1:0]和第二数据寄存器组的寄存数据信号data_DCM[m-1:0]进行选择输出,在其输出端输出数据信号Data[m-1:0],且其输出端接每级子级芯片的控制寄存器组。The fourth
可选地,如图3所示,第一与门AND2x1包括二输入与门,第二与门AND3x1包括三输入与门,第一选择器MUX1、第二选择器MUX2、第三选择器MUX3及第四选择器MUX组1包括二选一选择器。Optionally, as shown in FIG. 3, the first AND gate AND2x1 includes a two-input AND gate, the second AND gate AND3x1 includes a three-input AND gate, the first selector MUX1, the second selector MUX2, the third selector MUX3 and The fourth
在本发明的一个实施例中,多片电路级联通信系统中通用SPI通信接口和基于SPI的菊花链接口的串行输入端口的信号时序请参考图4所示。In an embodiment of the present invention, please refer to FIG. 4 for the signal timings of the serial input ports of the general SPI communication interface and the SPI-based daisy-chain interface in the multi-chip circuit cascade communication system.
详细地,下面将对上述兼容SPI接口的可配置菊花链电路结构的工作原理进行简单的说明。In detail, the working principle of the above-mentioned configurable daisy-chain circuit structure compatible with the SPI interface will be briefly described below.
更详细地,当兼容SPI接口的可配置菊花链电路结构处于通用SPI通信模式时,此时为写寄存器操作,每级子级芯片的外部的串行输入数据,将在通用SPI通信接口中被接收,如果接收的命令W/R=0,则在接收串行时钟输入信号SCLK最后一个时钟的下降沿时,在接收的命令W/R、地址信号ADDR_spi[N-m-1]和串行通信片选信号SEN的控制下,将串行接收到的数据存入位于第一数据寄存器组中接收地址ADDR对应的寄存器中,并同时输出到片外;当为读寄存器操作时,每级子级芯片外部的串行输入数据,将在通用SPI通信接口中被接收,如果接收的命令W/R=1,将在接收完地址ADDR信息后,在串行时钟输入信号SCLK的第一个时钟的上升沿,根据接收的命令W/R、地址信号ADDR_spi[N-m-1],将对应这个地址的寄存器存储的数据读取到串行接收寄存器中,并通过串行输出端口SDO_spi输出,最终在菊花链模式的使能控制信号DCM_EN、旁路输入信号BYPASS的控制下,输出到片外的SDO端口。In more detail, when the configurable daisy-chain circuit structure compatible with the SPI interface is in the general SPI communication mode, it is a write register operation at this time, and the external serial input data of each stage of the sub-chip will be read in the general SPI communication interface. Receive, if the received command W/R=0, when receiving the falling edge of the last clock of the serial clock input signal SCLK, the received command W/R, the address signal ADDR_spi[N-m-1] and the serial communication chip Under the control of the selection signal SEN, the serially received data is stored in the register corresponding to the receiving address ADDR located in the first data register group, and output to the off-chip at the same time; when the operation is to read the register, each level of sub-chip The external serial input data will be received in the general SPI communication interface. If the received command W/R=1, after receiving the address ADDR information, the first clock of the serial clock input signal SCLK will rise. Edge, according to the received command W/R, address signal ADDR_spi[N-m-1], read the data stored in the register corresponding to this address into the serial receive register, and output it through the serial output port SDO_spi, and finally in the daisy chain Under the control of the mode enable control signal DCM_EN and the bypass input signal BYPASS, it is output to the off-chip SDO port.
更详细地,如图5所示,菊花链模式的使能控制信号DCM_EN的产生过程如下:In more detail, as shown in FIG. 5 , the generation process of the enable control signal DCM_EN in the daisy-chain mode is as follows:
a、在外部输入的复位信号RST高电平有效复位时,Q端输出低电平,即复位后D触发器DFFR1号DCM_EN的电平为低电平;a. When the externally input reset signal RST is reset at a high level, the Q terminal outputs a low level, that is, the level of the DCM_EN of the D flip-flop DFFR1 is a low level after the reset;
b、当输入的片选信号SEN为高电平时,第三选择器MUX3选择D触发器DFFR1的Qn端输出作为D触发器DFFR1的D端的数据输入;在维持片选信号SEN为高电平期间,串行输入时钟信号SCLK第一次出现下降沿时,将触发D触发器DFFR1采集D端输入数据,而D端输入数据此时连接的是D触发器DFFR1的Qn端,即在片选信号SEN的高电平期间、串行输入时钟信号SCLK下降沿时触发,D触发器DFFR1的Q端输出将取反,由复位的低电平转变成高电平,也就是说菊花链模式的使能控制信号DCM_EN为高电平;b. When the input chip selection signal SEN is at a high level, the third selector MUX3 selects the Qn terminal of the D flip-flop DFFR1 to output as the data input of the D terminal of the D flip-flop DFFR1; while maintaining the chip selection signal SEN at a high level , when the serial input clock signal SCLK has a falling edge for the first time, the D flip-flop DFFR1 will be triggered to collect the input data of the D terminal, and the input data of the D terminal is connected to the Qn terminal of the D flip-flop DFFR1 at this time, that is, the chip select signal During the high level of SEN and the falling edge of the serial input clock signal SCLK, the output of the Q terminal of the D flip-flop DFFR1 will be inverted, and the reset low level will be changed to a high level, that is to say, the daisy-chain mode is enabled. Can control signal DCM_EN to be high level;
c、当输入的片选信号SEN由高电平变为低电平时,第三选择器MUX3选择D触发器DFFR1的Q端输出作为D触发器DFFR1的D端的数据输入,在维持片选信号SEN为低电平期间,串行输入时钟信号SCLK出现若干下降沿信号时,将触发D触发器DFFR1采集D端输入数据,而D端输入数据此时一直连接的是D触发器DFFR1的Q端,即在片选信号SEN低电平期间串行输入时钟信号SCLK下降沿触发时,D触发器DFFR1的Q端将保持高电平输出值不变,也就是说菊花链模式的使能控制信号DCM_EN保持高电平不变;c. When the input chip selection signal SEN changes from high level to low level, the third selector MUX3 selects the Q terminal of the D flip-flop DFFR1 to output as the data input of the D terminal of the D flip-flop DFFR1, while maintaining the chip selection signal SEN During the low level period, when the serial input clock signal SCLK has several falling edge signals, the D flip-flop DFFR1 will be triggered to collect the input data of the D terminal, and the input data of the D terminal is always connected to the Q terminal of the D flip-flop DFFR1 at this time. That is, when the serial input clock signal SCLK is triggered by the falling edge of the serial input clock signal SCLK during the low level of the chip select signal SEN, the Q terminal of the D flip-flop DFFR1 will keep the high level output value unchanged, that is to say, the enable control signal DCM_EN of the daisy chain mode keep the high level unchanged;
d、当输入的片选信号SEN由低电平恢复到高电平期间,串行输入时钟信号SCLK再次出现下降沿信号时,将触发D触发器DFFR1触发器采集D端输入数据,而D端输入数据此时连接的是D触发器DFFR1的Qn端,即在片选信号SEN高电平期间、串行输入时钟信号SCLK再次下降沿触发时,D触发器DFFR1的Q端输出将取反,Q端维持的高电平转变成低电平,即菊花链模式的使能控制信号DCM_EN变为低电平;d. When the input chip select signal SEN is restored from low level to high level, and the serial input clock signal SCLK has a falling edge signal again, the D flip-flop DFFR1 flip-flop will be triggered to collect the input data of the D terminal, and the D terminal will be triggered. The input data is connected to the Qn terminal of the D flip-flop DFFR1 at this time, that is, when the chip select signal SEN is at a high level and the serial input clock signal SCLK is triggered by the falling edge again, the output of the Q terminal of the D flip-flop DFFR1 will be inverted. The high level maintained at the Q terminal changes to a low level, that is, the enable control signal DCM_EN of the daisy-chain mode changes to a low level;
e、在片选信号SEN的高电平期间,随着串行输入时钟信号SCLK下降沿信号持续的出现,菊花链模式的使能控制信号DCM_EN也将在高电平、低电平间反复切换,即在片选信号SEN的高电平期间,连续出现的串行输入时钟信号SCLK的两个下降沿构成一对触发信号,使得菊花链模式的使能控制信号DCM_EN产生一个高电平脉冲,脉冲宽度由相应两个下降沿的间隔决定。e. During the high level period of the chip select signal SEN, with the continuous occurrence of the falling edge signal of the serial input clock signal SCLK, the enable control signal DCM_EN of the daisy-chain mode will also switch repeatedly between the high level and the low level. , that is, during the high-level period of the chip select signal SEN, the two falling edges of the serial input clock signal SCLK that appear continuously constitute a pair of trigger signals, so that the enable control signal DCM_EN of the daisy-chain mode generates a high-level pulse, The pulse width is determined by the interval between the corresponding two falling edges.
如图5所示,当片选信号SEN维持在高电平期间,串行输入时钟信号SCLK的第一个下降沿时,菊花链模式的使能控制信号DCM_EN由低电平变为高电平(菊花链模式的使能控制信号DCM_EN高电平有效),电路进入菊花链模式;当片选信号SEN维持在高电平期间,串行输入时钟信号SCLK的第二个下降沿时,菊花链模式的使能控制信号DCM_EN由高电平变为低电平,电路结束菊花链模式,恢复到普通的SPI模式;菊花链模式的使能控制信号DCM_EN为电路内部产生的信号,不占用端口的引脚资源。As shown in Figure 5, when the chip select signal SEN is maintained at a high level and the first falling edge of the serial input clock signal SCLK, the enable control signal DCM_EN of the daisy-chain mode changes from a low level to a high level (The enable control signal DCM_EN of the daisy-chain mode is active high), the circuit enters the daisy-chain mode; when the chip select signal SEN is maintained at a high level, when the second falling edge of the serial input clock signal SCLK, the daisy-chain The enable control signal DCM_EN of the mode changes from high level to low level, the circuit ends the daisy-chain mode and returns to the normal SPI mode; the enable control signal DCM_EN of the daisy-chain mode is a signal generated inside the circuit and does not occupy the port’s Pin resources.
更详细地,如图6及图7所示,当兼容SPI接口的可配置菊花链电路结构处于基于SPI的菊花链模式进行通信时,对应写寄存器操作的原理如下:In more detail, as shown in Figure 6 and Figure 7, when the configurable daisy-chain circuit structure compatible with the SPI interface is in the SPI-based daisy-chain mode for communication, the principle of the corresponding write register operation is as follows:
a’、如图6所示,针对包括L级子级芯片的多片电路级联通信系统,在写寄存器操作时需要主控芯片发送L个写寄存器操作命令,这个写寄存器命令共N位,由一位读写命令R/W、N-m-1位寄存器寻址地址ADDR、m位配置寄存器的数据组成;当主控芯片对级联的L级子级芯片写寄存器操作时,需要在主控芯片中对L级子级芯片中的每一级子级芯片的N位写命令数据进行配置,即写命令R/W为“0”、N-m-1位寄存器寻址地址ADDR为对应子级芯片需要配置的寄存器地址、m位配置寄存器的数据为地址ADDR所指向的寄存器需要配置的数据;a', as shown in Figure 6, for a multi-chip circuit cascade communication system including L-level sub-chips, the main control chip needs to send L write register operation commands during the write register operation. This write register command has a total of N bits, It consists of one-bit read and write command R/W, N-m-1-bit register addressing address ADDR, and m-bit configuration register data; when the main control chip writes registers to the cascaded L-level sub-level chips, it needs to be The chip configures the N-bit write command data of each sub-level chip in the L-level sub-level chip, that is, the write command R/W is "0", and the N-m-1-bit register addressing address ADDR is the corresponding sub-level chip. The register address to be configured and the data of the m-bit configuration register are the data that the register pointed to by the address ADDR needs to be configured;
b’、从片选信号SEN的下降沿开始串行写入命令数据并移位传输,在片选信号SEN进入低电平状态后,如图6及图7所示,主控芯片开始通过串行输出端口向级联的第一级子级芯片串行发送写命令数据,并移位存入在第一级子级芯片的N位移位寄存器的寄存器中,待第一个N位写命令数据发送完毕,第一子级中N位移位寄存器则依次存入N位写命令数据,待主控芯片发送第二个N位写命令数据的第一位数据“命令R/W”时,第一子级中N位移位寄存器移位接收这位数据的同时,第一子级中N位移位寄存器的寄存器N将移位输出第一个N位写命令数据的第一位数据“命令R/W”给第二子级芯片中的N位移位寄存器的寄存器,如此持续,待L个N位写命令数据发送完毕,则这L个N位写命令数据将分别对应存入各子级芯片的N位移位寄存器中;b', starting from the falling edge of the chip select signal SEN to serially write the command data and shift transmission, after the chip select signal SEN enters the low level state, as shown in Figure 6 and Figure 7, the main control chip starts to pass the serial The line output port serially sends the write command data to the cascaded first-level sub-level chip, and shifts and stores it in the register of the N-bit shift register of the first-level sub-level chip, waiting for the first N-bit write command After the data is sent, the N-bit shift register in the first sub-level stores the N-bit write command data in turn. When the main control chip sends the first data "command R/W" of the second N-bit write command data, When the N-bit shift register in the first sub-stage shifts to receive this data, the register N of the N-bit shift register in the first sub-stage will shift and output the first bit of the first N-bit write command data" Command R/W" to the register of the N-bit shift register in the second sub-chip, and this continues until the L N-bit write command data is sent, the L N-bit write command data will be stored in each corresponding In the N-bit shift register of the sub-chip;
c’、主控芯片在复位时将加载控制信号LOAD信号复位为低电平,待所有写命令数据移位存入移位寄存器中且片选信号SEN置为高电平后,主控芯片将加载控制信号LOAD信号置为高电平,在片选信号SEN高电平期间,加载控制信号LOAD高电平持续时间至少要大于串行时钟一个周期,然后主控芯片将加载控制信号LOAD信号置为低电平;c'. The main control chip resets the load control signal LOAD signal to a low level during reset. After all the write command data is shifted and stored in the shift register and the chip select signal SEN is set to a high level, the main control chip will The loading control signal LOAD signal is set to high level. During the high level of the chip select signal SEN, the duration of the loading control signal LOAD high level is at least one cycle longer than the serial clock, and then the main control chip sets the loading control signal LOAD signal to a high level. is low level;
d’、在片选信号维持SEN高电平期间,当加载控制信号LOAD由低电平变成高电平时,级联的每一级子级芯片的移位寄存器中的数据将被加载到第二数据寄存器组某一个地址对应的m位寄存器中,这个地址由写命令中的ADDR决定,从而完成菊花链模式下的写操作。即在片选信号维持SEN高电平期间、加载控制信号LOAD的上升沿命令被执行,移位寄存器值被加载到N位数据寄存器组。d'. During the period when the chip select signal maintains the high level of SEN, when the load control signal LOAD changes from low level to high level, the data in the shift register of each level of cascaded sub-level chips will be loaded into the first level. In the m-bit register corresponding to an address of the two data register groups, this address is determined by the ADDR in the write command, thereby completing the write operation in the daisy-chain mode. That is, while the chip select signal maintains the high level of SEN, the rising edge command of the load control signal LOAD is executed, and the shift register value is loaded into the N-bit data register group.
更详细地,在多片电路级联通信系统中,对不同的子级芯片可以发不同的写控制命令信息,以实现对不同地址的寄存器进行不同信息的配置;主控芯片在写寄存器操作时,主控芯片需要通过串行通信接口发送L个N位写命令数据,发送数据格式是先发命令R/W位、再发寻址地址ADDR、最后发数据位,所有数据都是高位在前、地位在后。In more detail, in a multi-chip circuit cascade communication system, different write control command information can be sent to different sub-level chips, so as to realize the configuration of different information for registers with different addresses; , the main control chip needs to send L N-bit write command data through the serial communication interface. The sending data format is to send the command R/W bit first, then send the addressing address ADDR, and finally send the data bit. All data are high-order first. , the status is behind.
更详细地,如图8所示,当兼容SPI接口的可配置菊花链电路结构处于基于SPI的菊花链模式进行通信时,对应读寄存器操作的原理如下:In more detail, as shown in Figure 8, when the configurable daisy-chain circuit structure compatible with the SPI interface is in the SPI-based daisy-chain mode for communication, the principle of the corresponding read register operation is as follows:
a”、针对包括L级子级芯片的多片电路级联通信系统,在读寄存器时,就需要发送L个读寄存器操作命令,这个读寄存器命令共N位,由一位读写命令R/W、N-m-1位寄存器寻址地址ADDR、m位配置寄存器的数据组成;当主控芯片对L级子级芯片读寄存器操作时,需要在主控芯片中对L级子级芯片中的每一级子级芯片的N位读命令数据进行配置,即读命令R/W为“1”、N-m-1位寄存器寻址地址ADDR为对应子级芯片需要配置的寄存器地址、m位配置寄存器的数据为地址ADDR所指向的寄存器需要配置的数据;a". For a multi-chip circuit cascade communication system including L-level sub-level chips, when reading a register, it is necessary to send L read register operation commands. This register read command has a total of N bits, and one read and write command R/W , N-m-1-bit register addressing address ADDR, m-bit configuration register data composition; when the main control chip reads the register to the L-level sub-level chip, it needs to be in the main control chip for each of the L-level sub-level chips. The N-bit read command data of the sub-level chip is configured, that is, the read command R/W is "1", the N-m-1-bit register addressing address ADDR is the register address that needs to be configured for the corresponding sub-level chip, and the m-bit configuration register data. The data that needs to be configured for the register pointed to by the address ADDR;
b”、在片选信号SEN进入低电平状态后,如图8所示,主控芯片开始通过SDO端口向级联的第一级子级芯片串行发送读命令数据,并移位存入在第一级子级芯片的N位移位寄存器的寄存器1中,待第一个N位读命令数据发送完毕,第一子级中N位移位寄存器则依次存入N位读命令数据,待主控芯片发送第二个N位读命令数据的第一位数据“命令R/W”时,第一子级中N位移位寄存器移位接收这位数据的同时,第一子级中N位移位寄存器的寄存器N将移位输出第一个N位读命令数据的第一位数据“命令R/W”给第二子级芯片中的N位移位寄存器的寄存器1,如此持续,待L个N位读命令数据发送完毕,则这L个N位读命令数据将分别对应存入各子级N位移位寄存器中;b". After the chip select signal SEN enters the low level state, as shown in Figure 8, the main control chip starts to serially send the read command data to the cascaded first-level sub-level chip through the SDO port, and shift and store it in In the
c”、主控芯片在复位时将加载控制信号LOAD信号复位为低电平,待所有读命令数据移位存入移位寄存器中且片选信号SEN置为高电平后,主控芯片将加载控制信号LOAD信号置为高电平,在片选信号维持SEN高电平期间,加载控制信号LOAD高电平持续时间至少要大于串行时钟一个周期,然后主控芯片将加载控制信号LOAD信号置为低电平;c". The main control chip resets the load control signal LOAD signal to a low level during reset. After all the read command data is shifted and stored in the shift register and the chip select signal SEN is set to a high level, the main control chip will The load control signal LOAD signal is set to high level. During the period when the chip select signal maintains SEN high level, the duration of the load control signal LOAD high level is at least one cycle longer than the serial clock, and then the main control chip will load the control signal LOAD signal. set to low level;
d”、在片选信号SEN维持高电平期间,级联的每一级子级芯片由于接收到读命令,所以当加载控制信号LOAD由低电平变成高电平时,子级芯片将根据接收的地址ADDR,对该地址的m位寄存器中的数据加载到移位寄存器中对应的数据位置,即用接收到的地址对应寄存器中的数据替换移位寄存器中对应的m位配置寄存器中的数据,从而完成寄存器数据的取操作,如图8所示,在加载控制信号LOAD的上升沿执行读取命令,将读出的数据加载到移位寄存器对应数据位置D11~D0;d". During the period when the chip select signal SEN maintains a high level, each sub-level chip in the cascade receives a read command, so when the load control signal LOAD changes from a low level to a high level, the sub-level chip will For the received address ADDR, the data in the m-bit register of the address is loaded into the corresponding data position in the shift register, that is, the data in the corresponding register of the received address is used to replace the corresponding m-bit configuration register in the shift register. data, so as to complete the fetch operation of the register data, as shown in Figure 8, execute the read command on the rising edge of the load control signal LOAD, and load the read data into the corresponding data positions D11 to D0 of the shift register;
e”、在片选信号SEN由高电平变为低电平时,主控芯片再次发送同样的L个读寄存器操作命令,即通过移位方式,将取出来的数据移位输出给主控芯片,从而完成菊花链模式下的读操作,如图8所示,移位输出读出的数据,需要继续发送同样字节的空数据。e". When the chip select signal SEN changes from high level to low level, the main control chip sends the same L read register operation commands again, that is, by shifting, the extracted data is shifted and output to the main control chip , so as to complete the read operation in the daisy-chain mode. As shown in Figure 8, the data read out is shifted and output, and it is necessary to continue to send the same byte of empty data.
其中,主控芯片第一次发送的L个读寄存器操作命令是发送读命令控制位和要读操作的寄存器地址,主控芯片第二次发发送的L个读寄存器操作命令是将在加载控制信号LOAD上升沿进行取数据操作后的数据进行移位输出给主控芯片。Among them, the L read register operation commands sent by the main control chip for the first time are to send the read command control bit and the register address to be read, and the L read register operation commands sent by the main control chip for the second time On the rising edge of the signal LOAD, the data after the data fetch operation is shifted and output to the main control chip.
同样地,在多片电路级联通信系统中,主控芯片进行读寄存器操作时,对不同的子级芯片可以发不同的读控制命令信息,以实现对不同地址的寄存器进行读操作;主控芯片进行读寄存器操作时,主控芯片需要通过串行通信接口发送L个N位读命令数据,发送数据格式是先发读命令R/W位、再发读寄存器地址ADDR、最后发数据位,所述的数据位可发任意数据,所有数据都是高位在前、地位在后。Similarly, in a multi-chip circuit cascade communication system, when the main control chip performs a register read operation, different read control command information can be sent to different sub-level chips to realize the read operation of registers with different addresses; When the chip reads the register, the main control chip needs to send L N-bit read command data through the serial communication interface. The format of the data sent is to send the read command R/W bit first, then send the read register address ADDR, and finally send the data bit. The data bits can send any data, and all data are high-order first and last.
详细地,上述兼容SPI接口的可配置菊花链电路在菊花链模式下的子级电路可以被旁路控制操作,如图9所示,其原理如下:In detail, the sub-level circuit of the above-mentioned configurable daisy-chain circuit compatible with the SPI interface in the daisy-chain mode can be operated by bypass control, as shown in Figure 9, and the principle is as follows:
在多片电路级联通信系统中,当旁路输入信号BYPASS为低电平时,子级芯片处于正常的菊花链工作模式;当旁路输入信号BYPASS为高电平时,子级芯片的菊花链模式被旁路(屏蔽),子级芯片通过串行接口接收的串行时钟输入信号直接传输到子级芯片的串行输出端口。In a multi-chip circuit cascade communication system, when the bypass input signal BYPASS is low level, the sub-level chip is in the normal daisy-chain working mode; when the bypass input signal BYPASS is high level, the sub-level chip is in the daisy-chain mode. Being bypassed (shielded), the serial clock input signal received by the sub-stage chip through the serial interface is directly transmitted to the serial output port of the sub-stage chip.
此外,本发明的多片电路级联通信系统是基于纯数字逻辑实现的,应用在需要多片电路级联通信系统中的子级电路芯片中,采用工艺根据子级电路芯片决定。In addition, the multi-chip circuit cascade communication system of the present invention is realized based on pure digital logic, and is applied to the sub-level circuit chips in the multi-chip circuit cascade communication system.
综上所述,在本发明所提供的包含兼容SPI接口的可配置菊花链电路结构的多片电路级联通信系统中,多片电路级联通信系统的多级子级芯片之间通过菊花链方式连接,每级子级芯片的级联通信接口包括兼容SPI接口的可配置菊花链电路结构,通过结合通用SPI通信接口和菊花链结构,在同样的SPI通信接口管脚资源的情况下,可实现一颗主控芯片与多颗子级电路芯片级联通信,主控芯片可以对每颗级联的子级电路芯片进行所有寄存器的写寄存器、读寄存器操作,对每颗级联的子级电路芯片进行不同地址的寄存器写、读操作,有选择性的旁路子级电路芯片等精准的点对点和点对多操作,这种电路结构实现了主控芯片对级联子级电路芯片的精准管理和控制,有效解决了现有的多片电路级联通信接口中级联方案功能单一、无法应用到复杂需求场合的问题。To sum up, in the multi-chip circuit cascade communication system including the configurable daisy-chain circuit structure compatible with the SPI interface provided by the present invention, the multi-level sub-chips of the multi-chip circuit cascade communication system pass through the daisy chain. The cascading communication interface of each sub-level chip includes a configurable daisy-chain circuit structure compatible with the SPI interface. By combining the general SPI communication interface and the daisy-chain structure, under the same SPI communication interface pin resources, the Realize cascade communication between one main control chip and multiple sub-level circuit chips. The main control chip can write and read registers of all registers for each cascaded sub-level circuit chip. The circuit chip performs precise point-to-point and point-to-multiple operations such as register write and read operations at different addresses, and selectively bypasses the sub-level circuit chips. This circuit structure realizes the precise management of the cascaded sub-level circuit chips by the main control chip. and control, effectively solving the problem that the cascading scheme in the existing multi-chip circuit cascading communication interface has a single function and cannot be applied to complex demand occasions.
上述实施例仅例示性说明本发明的原理及其功效,而非用于限制本发明。任何熟悉此技术的人士皆可在不违背本发明的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡所属技术领域中具有通常知识者在未脱离本发明所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本发明的权利要求所涵盖。The above-mentioned embodiments merely illustrate the principles and effects of the present invention, but are not intended to limit the present invention. Anyone skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed in the present invention should still be covered by the claims of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911346919.5A CN113032312B (en) | 2019-12-24 | 2019-12-24 | Multi-chip circuit cascade communication system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911346919.5A CN113032312B (en) | 2019-12-24 | 2019-12-24 | Multi-chip circuit cascade communication system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113032312A CN113032312A (en) | 2021-06-25 |
CN113032312B true CN113032312B (en) | 2022-07-05 |
Family
ID=76451634
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911346919.5A Active CN113032312B (en) | 2019-12-24 | 2019-12-24 | Multi-chip circuit cascade communication system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113032312B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116802607A (en) * | 2021-05-21 | 2023-09-22 | 华为技术有限公司 | Integrated circuit |
CN113590524B (en) * | 2021-08-03 | 2024-08-09 | 上海联影医疗科技股份有限公司 | Cross-board daisy chain transmission structure, master board, slave board and system |
CN113905227A (en) * | 2021-10-18 | 2022-01-07 | 中国科学院长春光学精密机械与物理研究所 | Video processing chip aging device and method based on daisy chain |
CN114328354B (en) * | 2021-12-29 | 2024-08-02 | 苏州矽典微智能科技有限公司 | Data transmission system and method |
CN115292237B (en) * | 2022-10-09 | 2022-12-20 | 中科声龙科技发展(北京)有限公司 | Chip and data transmission method thereof |
CN119173934A (en) * | 2023-03-01 | 2024-12-20 | 京东方科技集团股份有限公司 | Electronic system, address configuration and data transmission method, slave device, electronic apparatus |
CN118069577B (en) * | 2024-04-18 | 2024-07-02 | 深圳曦华科技有限公司 | Data transmission method, device, computer equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105812392A (en) * | 2016-05-18 | 2016-07-27 | 西安航天民芯科技有限公司 | Cascading SPI communication system applied to battery monitoring chip and communication method |
CN107145460A (en) * | 2017-04-13 | 2017-09-08 | 上海云统信息科技有限公司 | A kind of expansible serial bus system and its means of communication |
CN108388492A (en) * | 2018-03-20 | 2018-08-10 | 珠海格力电器股份有限公司 | Multi-DSP chip debugging control method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10216678B2 (en) * | 2014-10-07 | 2019-02-26 | Infineon Technologies Ag | Serial peripheral interface daisy chain communication with an in-frame response |
US10642769B2 (en) * | 2017-03-24 | 2020-05-05 | Analog Devices Global Unlimited Company | Serial peripheral interface daisy chain mode system and apparatus |
-
2019
- 2019-12-24 CN CN201911346919.5A patent/CN113032312B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105812392A (en) * | 2016-05-18 | 2016-07-27 | 西安航天民芯科技有限公司 | Cascading SPI communication system applied to battery monitoring chip and communication method |
CN107145460A (en) * | 2017-04-13 | 2017-09-08 | 上海云统信息科技有限公司 | A kind of expansible serial bus system and its means of communication |
CN108388492A (en) * | 2018-03-20 | 2018-08-10 | 珠海格力电器股份有限公司 | Multi-DSP chip debugging control method and device |
Non-Patent Citations (1)
Title |
---|
理解ATE SPI(串行外设接口);佚名;《http://www.eepw.com.cn/article/209452.htm》;20111122;1-5 * |
Also Published As
Publication number | Publication date |
---|---|
CN113032312A (en) | 2021-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113032312B (en) | Multi-chip circuit cascade communication system | |
US5175819A (en) | Cascadable parallel to serial converter using tap shift registers and data shift registers while receiving input data from FIFO buffer | |
US8286025B1 (en) | Selection of port adapters for clock crossing boundaries | |
US8135881B1 (en) | Dynamically configurable serial data communication interface | |
US10318447B2 (en) | Universal SPI (Serial Peripheral Interface) | |
US5099481A (en) | Registered RAM array with parallel and serial interface | |
JPS61156358A (en) | Bus converter | |
US7624209B1 (en) | Method of and circuit for enabling variable latency data transfers | |
US6523153B1 (en) | Method of design verification for integrated circuit system and method for generating interface model for design verification | |
JPH05324860A (en) | Single-chip microcomputer | |
US9092284B2 (en) | Entropy storage ring having stages with feedback inputs | |
CN102262595A (en) | Extended addressing method for microprocessor | |
US6510483B1 (en) | Circuit, architecture and method for reading an address counter and/or matching a bus width through one or more synchronous ports | |
CN103995688B (en) | A kind of unordered vector reduction circuit based on label | |
US9164730B2 (en) | Self-timed logic bit stream generator with command to run for a number of state transitions | |
US9417844B2 (en) | Storing an entropy signal from a self-timed logic bit stream generator in an entropy storage ring | |
US7769929B1 (en) | Design tool selection and implementation of port adapters | |
CN114747143A (en) | Programmable device configuration memory system | |
CN117280298A (en) | Register array circuit and method for accessing register array | |
CN1595383A (en) | Programmable bus type control port expansion module | |
JPS60554A (en) | Memory control device | |
CN112910444B (en) | A reversible single-edge D flip-flop that can be set asynchronously | |
CN112542187B (en) | Circuit for reading ID and chip state at high speed and flash memory | |
JP4193284B2 (en) | Elastic and integrated circuits | |
CN2849838Y (en) | Reconfigurable computing unit using asynchronous communication mechanism |
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 |