Power management bus and communication system
By introducing a filter module into the PMBUS system to remove signal burrs, the problem of data transmission failure is solved, the reliability of data transmission is improved, and the stable operation of the SoC chip is ensured.
Patent Information
- Application Number
- CN202410637628.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-17
AI Technical Summary
The existing PMBUS system is prone to signal glitches during data transmission, causing data transmission failure and affecting the use of SoC chips.
An improved power management bus is designed, including a filter module, a peripheral bus interface module and a state machine module. The filter module is used to filter the input serial clock, serial data and communication request signals to remove signal burrs. Ensure the reliability of data transmission.
Through filtering processing, the reliability of data transmission is effectively improved, signal error processing caused by signal burrs is avoided, and the stability and efficiency of the PMBUS system are ensured.
Smart Images

Figure CN118656324A
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a power management bus and a communication system. Background Art
[0002] SMBUS (System Management Bus) is an improved communication bus based on I2C (Inter-Integrated Circuit). SMBUS adds provisions for communication clocks, such as the time out feature of clk_stretch; defines a variety of specific transmission frame formats: Send Byte, Receive Byte, Write Byte / Word, Read Byte / Word, Block Write, Block Read, etc.; supports SMBALERT, and the slave can request bus resources by pulling down the SMBALERT line; SMBUS slaves must respond to their own addresses, which allows the host to infer that slaves that do not respond correctly are faulty devices or slaves that have been removed from the system.
[0003] PMBUS (Power Management Bus) is a special SMBUS that supports a series of PMBUS instructions for controlling power.
[0004] When communicating based on the existing PMBUS, data transmission failure often occurs, which affects the use of SoC (System on Chip).
[0005] In summary, how to improve PMBUS to ensure data transmission reliability and other issues are technical problems that technical personnel in this field urgently need to solve. Summary of the invention
[0006] The purpose of this application is to provide a power management bus and communication system, an improved PMBUS, which ensures data transmission reliability by filtering out signal glitches.
[0007] In order to solve the above technical problems, this application provides the following technical solutions:
[0008] A power management bus, comprising:
[0009] Filter module, peripheral bus interface module and state machine module;
[0010] The filtering module is used to filter the input serial clock, serial data and communication request signal, and input the filtered serial clock, serial data and communication request signal to the state machine module;
[0011] The peripheral bus interface module is used to send a control signal to the state machine module based on the received peripheral bus control signal, receive the state signal fed back by the state machine module and the output parallel data, and output a corresponding peripheral bus control signal based on the state signal and the parallel data processing bus;
[0012] The state machine module is used to receive the system clock, and output the serial clock, serial data, and communication request signal to the outside; and output an interrupt signal.
[0013] Preferably, the filtering module includes an APB register, and the APB register is used to control the filtering length; the filtering module performs filtering processing when the physical layer is enabled;
[0014] The PMBUS filtering module is used to perform filtering processing using Lmax=(2W+1)*Tpmb_clk, wherein Lmax represents the maximum filtering length, W is the number of bits of the filtering counter, and Tpmb_clk is the internal working clock cycle of the bus.
[0015] Preferably, the clock gating includes an AND gate, the input of the AND gate is the system peripheral clock and the system peripheral clock gating enable signal, and the output is the internal working clock of the bus.
[0016] Preferably, the number of bits of the filtering counter is 5 bits.
[0017] Preferably, the peripheral bus interface module comprises a control management register, and the control management register is used to control and manage the filter module and the state machine module.
[0018] Preferably, the state machine module comprises two timer circuits, one of which is used to monitor the SCL low state, and the other timer circuit WDT is used to avoid clock stretching timeout; the timer circuit is enabled when transmission is in progress.
[0019] Preferably, the state machine module is used to implement the functions of the data link layer and protocol layer of the PMBUS according to the configuration of the bus, and to generate an interrupt signal and a module working state feedback signal.
[0020] Preferably, the state machine module includes: a finite state machine, a hardware cyclic redundancy code calculation module, a serial-to-parallel shift register, a parallel-to-serial shift register, a received data first-in-first-out memory, and an interrupt status first-in-first-out memory.
[0021] Preferably, in the finite state machine, a 1-master-2-slave state machine logic is implemented, and a finite state machine includes: a receiving part and a sending part; the receiving part is used to collect received byte data, and the sending part is responsible for transmitting the provided byte data.
[0022] A communication system, comprising:
[0023] The system on chip and the power management bus as described above, the system on chip communicates with the outside world via the power management bus.
[0024] The power management bus provided by the embodiment of the present application includes: a filtering module, a peripheral bus interface module and a state machine module; the filtering module is used to filter the input serial clock, serial data and communication request signal, and input the filtered serial clock, serial data and communication request signal to the state machine module; the peripheral bus interface module is used to send a control signal to the state machine module based on the received peripheral bus control signal, and receive the state signal fed back by the state machine module and the output parallel data, and output the corresponding peripheral bus control signal to the outside based on the state signal and the parallel data processing bus; the state machine module is used to receive the system clock, and output the serial clock, serial data, and communication request signal to the outside; and output an interrupt signal.
[0025] In this embodiment, a power management bus is provided, which includes a filtering module, a peripheral bus interface module and a state machine module; wherein the filtering module can filter the input serial clock, serial data and communication request signal, and then input the filtered serial clock, serial data and communication request signal into the state machine module for processing. The peripheral bus interface can receive the peripheral bus control signal, send the control signal to the state machine module, and receive the state signal fed back by the state machine module and the output parallel data, and output the corresponding peripheral bus control signal to the outside based on the state signal and the parallel data processing bus. Since the serial clock, serial data and communication request signal processed by the state machine module are filtered by the filtering module, the filtering module can remove signal glitches, avoid signal error processing caused by signal glitches, and effectively improve the reliability of data transmission.
[0026] Technical effect: The PMBUS provided by this application can filter out signal glitches, thereby ensuring the reliability of data transmission.
[0027] Correspondingly, the embodiment of the present application also provides a communication system corresponding to the above-mentioned power management bus, which has the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A schematic diagram of a power management bus in an embodiment of the present application;
[0030] Figure 2 is a schematic diagram of an internal clock gating circuit;
[0031] Figure 3 This is a schematic diagram of a clock circuit in an embodiment of the present application;
[0032] Figure 4 This is a component diagram of a state machine module in an embodiment of the present application;
[0033] Figure 5 This is a state machine logic diagram in an embodiment of the present application;
[0034] Figure 6 This is a schematic diagram of a sending state machine in an embodiment of the present application;
[0035] Figure 7 This is a schematic diagram of a receiving state machine in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0037] Please refer to Figure 1 , Figure 1 This is a schematic diagram of a power management bus in an embodiment of the present application, and the power management bus includes:
[0038] Filter module, peripheral bus interface module and state machine module;
[0039] A filtering module, used for filtering the input serial clock, serial data and communication request signal, and inputting the filtered serial clock, serial data and communication request signal into the state machine module;
[0040] The peripheral bus interface module is used to send a control signal to the state machine module based on the received peripheral bus control signal, receive the state signal fed back by the state machine module and the output parallel data, and output the corresponding peripheral bus control signal to the outside based on the state signal and the parallel data processing bus;
[0041] The state machine module is used to receive the system clock and output the serial clock, serial data, communication request signal to the outside; and output the interrupt signal.
[0042] For ease of understanding and description, the following are explanations of relevant terms:
[0043] PMB_I2CF represents the filter module.
[0044] PMB_APB represents the peripheral bus interface module.
[0045] PMB_FSM represents the state machine module.
[0046] clk_fsm represents the system clock,
[0047] scl_out represents the serial clock output,
[0048] sda_out represents serial data output,
[0049] pmb_alert_out indicates the communication request signal output.
[0050] scl_in represents the serial clock input,
[0051] sda_in represents serial data input,
[0052] pmb_alert_in indicates communication request signal input.
[0053] That is, in this embodiment, the PMBUS module mainly includes the following three parts:
[0054] PMBUS filter module PMB_I2CF,
[0055] PMBUS advanced peripheral bus interface module PMB_APB,
[0056] PMBUS state machine module PMB_FSM.
[0057] The filtering module includes an APB register, and the APB register is used to control the filtering length; the filtering module performs filtering processing when the physical layer is enabled;
[0058] The PMBUS filter module is used to perform filtering processing using Lmax=(2W+1)*Tpmb_clk, where Lmax represents the maximum filtering length, W is the number of bits of the filtering counter, and Tpmb_clk is the internal working clock cycle of the bus.
[0059] The number of bits of the filter counter is 5 bits.
[0060] Specifically, in the present application, it is found that the filtering function is weak, resulting in weak anti-interference capability, which makes the communication reliability low. Based on this, the number of bits of the filter counter is increased in the present embodiment to improve the filtering performance.
[0061] Generally, the number of filter counter bits of XDP1100 is 3 bits, and the maximum length of glitches that can be filtered out is 8 system clock cycles.
[0062] In this embodiment, as shown in Table 1, the bit width of the filter counter is designed to be 5 bits, and a burr with a maximum length of 32 internal clock cycles can be filtered out.
[0063] Table 1, filtering diagram
[0064]
[0065] That is to say, the PMBUS filter module filters the external input serial clock signal and serial data signal, and uses the filtered signals for communication, which can reduce the impact of burrs on the signal line on bus data transmission. Among them, the relationship between the filter length and the number of filter counter bits is:
[0066] Lmax=(2W+1)*Tpmb_clk,
[0067] Wherein, Lmax represents the maximum filter length, W is the number of filter counter bits, and Tpmb_clk is the PMBUS internal working clock period.
[0068] The difference between the filter module and before the improvement: the bit width of the filter counter is increased. Under the condition of the same working clock frequency, the filter performance after the improvement is 4 times that before the improvement (the bit width of the filter counter before the improvement is 3, and after the improvement is 5, substituted into the filter).
[0069] In one embodiment of the present application, in the power management bus, the clock gating includes an AND gate, the input of the AND gate is the system peripheral clock and the system peripheral clock gating enable signal, and the output is the bus internal working clock.
[0070] Clock gating can save power by turning off the module clock, but controlling the internal clock gating through registers has the same effect as controlling the clock gating through the system clock management module. It is more reasonable to delete the PMBUS internal clock gating logic and control the clock uniformly through the system clock management module.
[0071] Please refer to Figure 2 and Figure 3 , Figure 2 and Figure 3 Corresponding to the circuit schematics before and after deleting the internal clock gating function, it can be seen that the circuit structure after deleting the internal clock gating function is obviously simplified.
[0072] PMBUS module operation requires enabling the module clock (pmbus_kernel_clk), releasing the peripheral reset (pmbus_rst_n), correctly configuring the module registers through the APB interface, and enabling the PMBus physical layer.
[0073] The PMB_I2CF module filters the external input SCL and SDA and inputs the filtered signals into the PMB_FSM module. The filter length can be configured through the APB register. The PMB_I2CF module works only when the PHY (physical layer) is enabled.
[0074] The PMB_APB module serves as the APB interface and contains all registers used to control and manage the PMBus interface (ie, PMB_FSM and PMB_I2CF).
[0075] In one embodiment of the present application, the peripheral bus interface module includes a control management register, which is used to control and manage the filter module and the state machine module. That is, the function of the PMBUS advanced peripheral bus interface module is to connect the system peripheral bus to realize the reading and writing of PMBUS related control and status registers.
[0076] In one embodiment of the present application, the peripheral bus interface module may be improved by deleting redundant registers.
[0077] Currently, there are many redundant registers and large circuit area. The harm of large circuit area is that it may increase chip cost and power consumption, and redundant design should be avoided as much as possible.
[0078] For example: the redundant registers in the XDPP register list are listed as follows:
[0079] Bit 29 of the STATUS register: This bit indicates which SCL timeout caused the watchdog interrupt. However, the PMbus protocol only contains the timeout when SCL is low, and there is no timeout when SCL is high, so this bit can be deleted.
[0080] Bit 0 of the ARA_CW register: This register is a reserved register and has no clear purpose, so it can be deleted.
[0081] Bits 15 to 14 of the CTRL_TX register: These 2 bits are repeated in CTRL_RX and can be deleted.
[0082] It should be noted that deleting redundant registers or only deleting a small number of useless registers will not affect the module function. The circuit structure does not change before and after deletion, and only a small number of registers and corresponding signal lines are reduced.
[0083] In one embodiment of the present application, the state machine module includes two timer circuits, one timer circuit is used to monitor the SCL low state, and the other timer circuit WDT is used to avoid clock stretching timeout; the timer circuit is enabled when transmission is in progress.
[0084] That is, the PMB_FSM module implements the function of supporting I2C physical layer communication with a state machine. The PMB_FSM state machine is completely controlled by the CPU. One WDT (timer circuit, watchdog) is provided to monitor the SCL low state, and another WDT is used to avoid clock stretching timeout. The watchdog is enabled only when the transmission is in progress. PMB_FSM embeds a hardware CRC check logic for RXPEC and TX PEC calculations. The state machine is divided into two main parts: the RX part and the TX part. The RX part needs to collect the received byte data (ADR, DATA), while the TX part is responsible for transmitting the provided byte data. PMB_APB is also responsible for controlling the generation and release of the SMBALERT signal.
[0085] In one embodiment of the present application, the state machine module is used to implement the functions of the data link layer and the protocol layer of the PMBUS according to the configuration of the bus, and to generate an interrupt signal and a module working status feedback signal.
[0086] Specifically, PMBus interrupts can be generated at the end of each I2C cycle: detection of a start event (start_irq), completion of the first byte reception after start (rx_adr_w_irq or rx_adr_r_irq), receipt of more bytes (rx_irq), request for a byte transmission (tx_irq), detection of a stop event (stop_irq), and a watchdog event (wdt_irq). If ie_fsm is turned off, no interrupt will be generated. Each interrupt has a separate enable control. If it is turned off, no corresponding interrupt will be generated.
[0087] Every time an interrupt occurs, the interrupt status i_code is written to the interrupt fifo, the fifo_empty signal is pulled low, and pmb_int is generated.
[0088] The start interrupt can be configured via USE_START_IRQ_DELAY to generate a start interrupt when a start is detected, or to generate an rx_adr_x interrupt after an address match (it will not generate both a start interrupt and an rx_adr interrupt).
[0089] The state machine module includes: a finite state machine, a hardware cyclic redundancy code calculation module, a serial-parallel shift register, a parallel-serial shift register, a received data first-in-first-out memory, and an interrupt state first-in-first-out memory. In the finite state machine, the 1-master-2-slave state machine logic is implemented. A finite state machine includes: a receiving part and a sending part; the receiving part is used to collect the received byte data, and the sending part is responsible for transmitting the provided byte data.
[0090] That is, the PMBUS state machine module is the main functional module of PMBUS. It works according to the bus configuration, realizes the functions of the data link layer and protocol layer of PMBUS, and generates interrupt signals and module working status feedback signals. Please refer to Figure 4 The module contains 1 master and 2 slave state machine logic, 2 watchdog counter modules, 1 hardware cyclic redundancy code calculation module, 1 serial-to-parallel shift register, 1 parallel-to-serial shift register, 1 receive data first-in-first-out memory, and 1 interrupt status first-in-first-out memory.
[0091] Please refer to Figures 5 to 7 , respectively represent the state diagrams of the state machine.
[0092] exist Figure 5 In the state machine, if the PMBUS enable is not turned on, the state machine is in the IDLE state; if the STOP signal is detected in any state, the state machine jumps to the STOP state. Figure 5 The description of each state can refer to Table 2:
[0093] Table 2, Table 2 is Figure 5 Status description corresponding table
[0094]
[0095]
[0096] exist Figure 6 In the process, if the master state machine leaves the TX state, the transmitting state machine returns to the IDLE state. Figure 6 The description of each state can refer to Table 3:
[0097] Table 3, Table 3 is Figure 6 Status description corresponding table
[0098] Status Name Status description TX_IDLE Send Idle TX_DATA Sending Data TX_ACK Send Reply TX_PEC PEC transmission
[0099] exist Figure 7 In the process, if the main state machine leaves the RX state, the receiving state machine returns to the IDLE state. Figure 7 The description of each state can refer to Table 4:
[0100] Table 4, Table 4 is Figure 7 Status description corresponding table
[0101] Status Name Status description RX_IDLE Receive Idle RX_DATA Receiving Data RX_ACK Receive Response
[0102] Figures 5 to 7 The various states in the state machine can be specifically referred to Table 5, which is a register list of the power management bus provided in the embodiment of the present application.
[0103] Table 5 is a list of registers for the power management bus.
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123] In one embodiment of the present application, 8 address configurations are supported, and addr_lut_0 is recommended to configure the slave address. Among them, the receiving data configuration:
[0124] Configure en_phy, enable interrupt ie_fsm, configure addr_lut_w, interrupt read i_code, if (i_code==3), {rd_cnt++}, if (rd_cnt==1), {CMD=PMBUS->PMBUS_RXDATA}.
[0125] Refer to the configuration process: read the received address in the interrupt, if the address == 0x28, &&read_zone == active_zone, {zone_reading = 1}, read command control code, read status mask / command code, if the address == 0x29 (zone read), configure data_lut, byte_to_tx, byte_remaining, if tx_done, {turn off zone address matching enable}, if bus_contention, {reconfigure data_lut, byte_to_tx, byte_remaining.}
[0126] When in stop interrupt state, turn on the zone address enable.
[0127] About pec sending, including:
[0128] 1. Automatic transmission: After enabling auto_pec_transmite, pmbus will automatically send PEC after the byte_to_tx number of bytes are sent.
[0129] 2. Manual sending, including: writing the PEC result into data_word.
[0130] The power management bus provided by the embodiment of the present application includes: a filtering module, a peripheral bus interface module and a state machine module; the filtering module is used to filter the input serial clock, serial data and communication request signal, and input the filtered serial clock, serial data and communication request signal to the state machine module; the peripheral bus interface module is used to send a control signal to the state machine module based on the received peripheral bus control signal, and receive the state signal fed back by the state machine module and the output parallel data, and output the corresponding peripheral bus control signal to the outside based on the state signal and the parallel data processing bus; the state machine module is used to receive the system clock, and output the serial clock, serial data, and communication request signal to the outside; and output an interrupt signal.
[0131] In this embodiment, a power management bus is provided, which includes a filtering module, a peripheral bus interface module and a state machine module; wherein the filtering module can filter the input serial clock, serial data and communication request signal, and then input the filtered serial clock, serial data and communication request signal into the state machine module for processing. The peripheral bus interface can receive the peripheral bus control signal, send the control signal to the state machine module, and receive the state signal fed back by the state machine module and the output parallel data, and output the corresponding peripheral bus control signal to the outside based on the state signal and the parallel data processing bus. Since the serial clock, serial data and communication request signal processed by the state machine module are filtered by the filtering module, the filtering module can remove signal glitches, avoid signal error processing caused by signal glitches, and effectively improve the reliability of data transmission.
[0132] Technical effect: The PMBUS provided by this application can filter out signal glitches, thereby ensuring the reliability of data transmission.
[0133] Corresponding to the above method embodiment, the embodiment of the present application further provides a communication system. The communication system described below and the power management bus described above can refer to each other.
[0134] The communication system comprises: a system on chip and the power management bus as described above, and the system on chip communicates with the outside world via the power management bus.
[0135] Since the power management bus has relevant technical effects, the communication system including the SoC chip and the power management bus also has corresponding technical effects, which will not be described in detail here.
[0136] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0137] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0138] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0139] This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the power management bus and its core ideas of the present application. At the same time, for general technicians in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A power management bus, characterized in that: include: Filter module, peripheral bus interface module and state machine module; The filtering module is used to filter the input serial clock, serial data and communication request signal, and input the filtered serial clock, serial data and communication request signal to the state machine module; The peripheral bus interface module is used to send a control signal to the state machine module based on the received peripheral bus control signal, receive the state signal fed back by the state machine module and the output parallel data, and output a corresponding peripheral bus control signal based on the state signal and the parallel data processing bus; The state machine module is used to receive the system clock and output the serial clock, serial data and communication request signal to the outside; And output interrupt signal.
2. The power management bus according to claim 1, characterized in that: The filtering module includes an APB register, and the APB register is used to control the filtering length; the filtering module performs filtering processing when the physical layer is enabled; The PMBUS filtering module is used to perform filtering processing using Lmax=(2W+1)*Tpmb_clk, wherein Lmax represents the maximum filtering length, W is the number of bits of the filtering counter, and Tpmb_clk is the internal working clock cycle of the bus.
3. The power management bus according to claim 2, characterized in that: The clock gating includes an AND gate, the input of the AND gate is the system peripheral clock and the system peripheral clock gating enable signal, and the output is the internal working clock of the bus.
4. The power management bus according to claim 2, characterized in that: The number of bits of the filter counter is 5 bits.
5. The power management bus according to claim 1, characterized in that: The peripheral bus interface module includes a control management register, and the control management register is used to control and manage the filter module and the state machine module.
6. The power management bus according to claim 1, characterized in that: The state machine module includes two timer circuits, one of which is used to monitor the SCL low state, and the other timer circuit WDT is used to avoid clock stretching timeout; the timer circuit is enabled when transmission is in progress.
7. The power management bus according to claim 1, characterized in that: The state machine module is used to implement the functions of the data link layer and the protocol layer of the PMBUS according to the configuration of the bus, and to generate an interrupt signal and a module working state feedback signal.
8. The power management bus according to claim 1, characterized in that: The state machine module comprises: a finite state machine, a hardware cyclic redundancy code calculation module, a serial-parallel shift register, a parallel-serial shift register, a received data first-in-first-out memory, and an interrupt state first-in-first-out memory.
9. The power management bus according to claim 8, characterized in that: In the finite state machine, a 1-master-2-slave state machine logic is implemented, and a finite state machine includes: a receiving part and a sending part; the receiving part is used to collect received byte data, and the sending part is responsible for transmitting the provided byte data.
10. A communication system, characterized in that: include: A system on chip and a power management bus as claimed in any one of claims 1 to 9, wherein the system on chip communicates with the outside world through the power management bus.
