CN102546611B - Interface implementation method integrating power monitoring bus protocol and serial communication protocol - Google Patents

Interface implementation method integrating power monitoring bus protocol and serial communication protocol Download PDF

Info

Publication number
CN102546611B
CN102546611B CN201110444113.7A CN201110444113A CN102546611B CN 102546611 B CN102546611 B CN 102546611B CN 201110444113 A CN201110444113 A CN 201110444113A CN 102546611 B CN102546611 B CN 102546611B
Authority
CN
China
Prior art keywords
pmbus
mode
data
enter
bus
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.)
Expired - Fee Related
Application number
CN201110444113.7A
Other languages
Chinese (zh)
Other versions
CN102546611A (en
Inventor
孙伟锋
常昌远
徐玉珉
王青
徐申
陆生礼
时龙兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN201110444113.7A priority Critical patent/CN102546611B/en
Publication of CN102546611A publication Critical patent/CN102546611A/en
Application granted granted Critical
Publication of CN102546611B publication Critical patent/CN102546611B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Communication Control (AREA)
  • Information Transfer Systems (AREA)

Abstract

整合电源监控总线协议和串行通信协议接口实现方法,本发明采用状态机的方式整合了电源监控总线PMBus协议和串行通信总线I2C协议,该发明的工作流程以总线上的start信号开始,如果存在start信号,则首先进行模式判断,判断是电源监控总线PMBus模式,还是串行通信I2C模式。如果是电源监控总线PMBus模式,则进一步判断是否存在故障中断ARA和进行的是读还是写操作判断,最后判断是一个还是两个字节的读或写操作,从而实现读1个字节、读2个字节、写1个字节和写2个字节四个操作的其中之一。如果是串行通信I2C模式,则进一步判断是读还是写操作,最后以总线的stop信号结束传输。

Integrated power monitoring bus protocol and serial communication protocol interface implementation method, the present invention integrates the power monitoring bus PMBus protocol and serial communication bus I2C protocol in the form of a state machine, and the work flow of the invention starts with the start signal on the bus, if If there is a start signal, the mode judgment is first performed to determine whether it is the power monitoring bus PMBus mode or the serial communication I2C mode. If it is the PMBus mode of the power supply monitoring bus, it is further judged whether there is a fault interrupt ARA and whether it is a read or write operation judgment, and finally judges whether it is a read or write operation of one or two bytes, so as to realize reading 1 byte, reading One of the four operations of 2 bytes, write 1 byte, and write 2 bytes. If it is a serial communication I2C mode, further judge whether it is a read or write operation, and finally end the transmission with the stop signal of the bus.

Description

整合电源监控总线协议和串行通信协议接口实现方法Implementation method of integrated power monitoring bus protocol and serial communication protocol interface

技术领域 technical field

本发明涉及电源监控协议PMBus接口和串行通信I2C接口,属于集成电路的设计,隶属电子技术领域。The invention relates to a power monitoring protocol PMBus interface and a serial communication I2C interface, which belongs to the design of integrated circuits and belongs to the field of electronic technology.

背景技术 Background technique

电源管理总线(PMBus)通信协议规范定义了一个用在功率转换器件和管理器件之间的开放标准数字电源管理协议(包括接口和命令)。借助PMBus,数字电源可以依据一套标准命令进行配置、监控和维护,在发生故障或运行警告时,设计者可以使用PMBus指令设定电源的工作参数、监视其工作状况和实施校正措施。而串行通信I2C协议是一种两线制串行通信标准,每个从机都有个特定的地址,I2C的传输速率在标准模式下可达100kbit/s,快速模式下可达400kbit/s,高速模式下可达3.4Mbit/s。The Power Management Bus (PMBus) communication protocol specification defines an open standard digital power management protocol (including interfaces and commands) used between power conversion devices and management devices. With PMBus, digital power supplies can be configured, monitored, and maintained according to a set of standard commands. In the event of a fault or operational warning, designers can use PMBus commands to set operating parameters of the power supply, monitor its operating status, and implement corrective measures. The serial communication I2C protocol is a two-wire serial communication standard. Each slave has a specific address. The transmission rate of I2C can reach 100kbit/s in standard mode and 400kbit/s in fast mode. , up to 3.4Mbit/s in high-speed mode.

PMBus协议的数据链路层的通信规范是源于I2C协议,但是PMBus很少需要大数据量的数据传输和高速的传输模式,因此本发明旨在设计一个接口电路,该接口电路可以同时满足PMBus协议和I2C协议,在PMBus模式下,可以不需要非常快的速度和大的数据量就可以实现PMBus,而在I2C模式下,可以实现快速的和大数据量的数据传输。这样就实现了在单一物理地址的基础上,可以同时实现PMBus协议的监控和大数据量的I2C协议数据传输。The communication specification of the data link layer of PMBus agreement is derived from I2C agreement, but PMBus seldom needs the data transmission of large amount of data and high-speed transmission mode, so the present invention aims at designing an interface circuit, and this interface circuit can satisfy PMBus simultaneously. Protocol and I2C protocol, in PMBus mode, PMBus can be realized without very fast speed and large data volume, while in I2C mode, fast and large data volume data transmission can be realized. In this way, on the basis of a single physical address, the monitoring of the PMBus protocol and the data transmission of the I2C protocol with a large amount of data can be realized at the same time.

发明内容 Contents of the invention

本发明提供了整合电源监控总线协议和串行通信协议接口实现方法,该方法在遵照PMBus协议和I2C通信协议的同时,充分优化了两个接口的整合,运用了较少的十个状态就实现了发明。The present invention provides a method for implementing an integrated power monitoring bus protocol and a serial communication protocol interface. The method fully optimizes the integration of the two interfaces while complying with the PMBus protocol and the I2C communication protocol, and realizes it with less than ten states invented.

本发明的技术方案如下:Technical scheme of the present invention is as follows:

一种整合电源监控总线协议和串行通信协议的接口实现方法,其特征在于:A method for implementing an interface integrating a power supply monitoring bus protocol and a serial communication protocol, characterized in that:

流程进入开始,之后直接进行start信号判断,判断电源监控总线PMBus上是否存在start信号,如果没有start信号,则返回开始,如果有start信号,则进入模式判断,判断是PMBus通信模式,还是I2C通信模式。The process enters the beginning, and then directly judges the start signal to judge whether there is a start signal on the power monitoring bus PMBus. If there is no start signal, return to the beginning. If there is a start signal, enter the mode judgment to judge whether it is PMBus communication mode or I2C communication model.

如果判断为电源监控总线PMBus通信模式,则进行故障中断ARA判断,判断是否存在故障中断ARA;如果存在故障中断ARA,则进入故障响应ARA响应,向PMBus总线发送从机地址数据,并且完成地址发送后进入开始;如果不存在ARA中断,则进入电源监控总线PMBus操作读写判断,判断是否进行PMBus读操作,如果是PMBus读操作,则进一步判断是进行1个字节还是2个字节数据的读取,如果是1个字节数据的读取,则进入电源监控总线PMBus模式,读1个字节,完成1个字节读取后,进入开始,如果是2个字节数据的读取,则进入电源监控总线PMBus模式读2个字节,完成2个字节读取后进入开始;如果不是电源监控总线PMBus读操作,则判断是进行1个字节还是2个字节数据的写入,如果是1个字节数据的写入,则进入电源监控总线PMBus模式写1个字节,完成1个字节写入后进入开始,如果是2个字节数据的写入,则进入电源监控总线PMBus模式写2个字节,完成2个字节写入后进入开始。If it is judged to be the PMBus communication mode of the power supply monitoring bus, it will judge whether there is a fault interrupt ARA to judge whether there is a fault interrupt ARA; if there is a fault interrupt ARA, it will enter a fault response ARA response, send the slave address data to the PMBus bus, and complete the address sending Then enter the start; if there is no ARA interrupt, enter the power monitoring bus PMBus operation read and write judgment, judge whether to perform PMBus read operation, if it is PMBus read operation, then further judge whether to perform 1 byte or 2 byte data Read, if it is the reading of 1 byte of data, enter the power monitoring bus PMBus mode, read 1 byte, after completing the reading of 1 byte, enter the start, if it is the reading of 2 bytes of data , then enter the power monitoring bus PMBus mode to read 2 bytes, and enter the start after completing the reading of 2 bytes; if it is not a power monitoring bus PMBus read operation, then judge whether to write 1 byte or 2 bytes of data Enter, if it is a write of 1 byte of data, then enter the power monitoring bus PMBus mode to write 1 byte, after completing the writing of 1 byte, enter the start, if it is the writing of 2 bytes of data, enter Write 2 bytes in power monitoring bus PMBus mode, and enter the start after completing the writing of 2 bytes.

如果判断为不是电源监控总线PMBus通信模式,则进入串行通信I2C读操作的判断,如果判断为读操作,则进入串行通信I2C模式读操作进行数据的读取,再在串行通信I2C模式下进行总线读操作stop信号判断,判断总线上是否存在stop信号,如果存在stop信号,则完成数据读取,并且进入开始,如果不存在stop信号,则保持进行数据的读取;如果判断为写操作,则进入I2C模式写操作进行数据的写入,再在I2C模式下进行PMBus总线写操作stop信号,判断总线上是否存在stop信号,如果存在stop信号,则数据写入完成,并且进入开始,如果不存在stop信号,则保持进行数据的写入。If it is judged that it is not the PMBus communication mode of the power supply monitoring bus, then enter the judgment of the serial communication I2C read operation, if it is judged as a read operation, then enter the serial communication I2C mode read operation to read the data, and then enter the serial communication I2C mode Next, judge the stop signal of the bus read operation to judge whether there is a stop signal on the bus. If there is a stop signal, complete the data reading and enter the start. If there is no stop signal, keep reading the data; if it is judged to be a write operation, enter the I2C mode write operation to write data, and then perform the PMBus bus write operation stop signal in the I2C mode to judge whether there is a stop signal on the bus. If there is a stop signal, the data writing is completed and enters the start. If there is no stop signal, data writing is kept.

本次复合PMBus协议和I2C协议接口实现方法的发明,完全采用VerilogHDL编写,已经通过功能验证,而且可以通过DC逻辑综合软件综合,从而使用标准的门单元电路搭建,设计的灵活性非常大,如果需要对设计进行调整,可以随时根据需要进行适当调整和修改,适用性强。The invention of the implementation method of the composite PMBus protocol and I2C protocol interface is completely written in VerilogHDL, has passed the functional verification, and can be synthesized by DC logic synthesis software, so that the standard gate unit circuit can be used to build, and the design flexibility is very large. If The design needs to be adjusted, and it can be properly adjusted and modified according to the needs at any time, with strong applicability.

本发明的优点及有益成果:Advantage of the present invention and beneficial result:

1)本发明基于PMBus总线设计,完全符合电源监控总线PMBus协议的标准,兼容性较好,可以直接运用于具有电源监控总线PMBus控制的电源监控环境中。1) The present invention is based on the design of the PMBus bus, fully conforms to the standard of the PMBus protocol of the power monitoring bus, has good compatibility, and can be directly applied to a power monitoring environment controlled by the PMBus control of the power monitoring bus.

2)本发明设计整合I2C总线,同样也是完全符合串行通行I2C的通行协议标准,可以在实现电源监控的同时,也可以实现总线器件间的数据传输。2) The design of the present invention integrates the I2C bus, which also fully complies with the serial I2C common protocol standard, and can realize data transmission between bus devices while realizing power supply monitoring.

3)电路设计理念简单,容易实现,可以通过DC逻辑综合后由标准门电路构建,制备工艺简单。3) The circuit design concept is simple and easy to implement, and can be constructed from standard gate circuits after DC logic synthesis, and the preparation process is simple.

4)电路的可修改性好,可以根据具体运用需要进行适当的调整和修改。4) The modifiability of the circuit is good, and appropriate adjustments and modifications can be made according to specific application needs.

5)以最简单的结构实现了高性能的PMBus接口和I2C接口的整合,占据芯片面积小,功耗也较小。5) The integration of high-performance PMBus interface and I2C interface is realized with the simplest structure, which occupies a small chip area and consumes less power.

附图说明 Description of drawings

图1是本发明的流程图。Fig. 1 is a flow chart of the present invention.

图2是本发明的系统状态图。Fig. 2 is a system state diagram of the present invention.

图3是本发明两种模式切换时主要信号的关系示意图(前半部分)。Fig. 3 is a schematic diagram (the first half) of the relationship between the main signals when the two modes are switched in the present invention.

图4是本发明两种模式切换时主要信号的关系示意图(后半部分)。Fig. 4 is a schematic diagram of the relationship between the main signals when the two modes are switched in the present invention (the second half).

图5是本发明两种模式切换的仿真波形图(前半部分)。Fig. 5 is a simulation waveform diagram (first half) of switching between two modes in the present invention.

图6是本发明两种模式切换的仿真波形图(后半部分)。Fig. 6 is a simulation waveform diagram (second half) of switching between two modes in the present invention.

具体实施方式 Detailed ways

一种整合电源监控总线协议和串行通信协议的接口实现方法,其特征在于:A method for implementing an interface integrating a power supply monitoring bus protocol and a serial communication protocol, characterized in that:

流程进入开始1,之后直接进行start信号2判断,判断电源监控总线PMBus上是否存在start信号,如果没有start信号,则返回开始1,如果有start信号,则进入模式判断3,判断是PMBus通信模式,还是I2C通信模式。The process enters the start 1, and then directly judges the start signal 2 to judge whether there is a start signal on the PMBus of the power monitoring bus. If there is no start signal, return to the start 1. If there is a start signal, enter the mode judgment 3, and judge that it is the PMBus communication mode. , or I2C communication mode.

如果判断为电源监控总线PMBus通信模式,则进行故障中断ARA4判断,判断是否存在故障中断ARA;如果存在故障中断ARA,则进入故障响应ARA响应5,向PMBus总线发送从机地址数据,并且完成地址发送后进入开始1;如果不存在ARA中断,则进入电源监控总线PMBus操作读写判断6,判断是否进行PMBus读操作,如果是PMBus读操作,则进一步判断是进行1个字节还是2个字节数据的读取,如果是1个字节数据的读取,则进入电源监控总线PMBus模式,读1个字节8,完成1个字节读取后,进入开始1,如果是2个字节数据的读取,则进入电源监控总线PMBus模式读2个字节9,完成2个字节读取后进入开始1;如果不是电源监控总线PMBus读操作,则判断是进行1个字节还是2个字节数据的写入,如果是1个字节数据的写入,则进入电源监控总线PMBus模式写1个字节11,完成1个字节写入后进入开始1,如果是2个字节数据的写入,则进入电源监控总线PMBus模式写2个字节9,完成2个字节写入后进入开始1。If it is judged to be the PMBus communication mode of the power supply monitoring bus, judge whether there is a fault interrupt ARA4, and judge whether there is a fault interrupt ARA; if there is a fault interrupt ARA, then enter the fault response ARA response 5, send the slave address data to the PMBus bus, and complete the address After sending, enter start 1; if there is no ARA interrupt, enter power monitoring bus PMBus operation read and write judgment 6, judge whether to perform PMBus read operation, if it is PMBus read operation, further judge whether to perform 1 byte or 2 words The reading of section data, if it is the reading of 1 byte data, enter the power monitoring bus PMBus mode, read 1 byte 8, after completing the reading of 1 byte, enter the start 1, if it is 2 words To read the section data, enter the power monitoring bus PMBus mode to read 2 bytes 9, and enter the start 1 after completing the reading of 2 bytes; if it is not the power monitoring bus PMBus read operation, then judge whether to perform 1 byte or 2 bytes of data writing, if it is 1 byte of data writing, then enter the power monitoring bus PMBus mode to write 1 byte 11, after completing 1 byte writing, enter start 1, if it is 2 To write byte data, enter the power monitoring bus PMBus mode to write 2 bytes 9, and enter start 1 after completing the writing of 2 bytes.

如果判断为不是电源监控总线PMBus通信模式,则进入串行通信I2C读操作13的判断,如果判断为读操作,则进入串行通信I2C模式读操作14进行数据的读取,再在串行通信I2C模式下进行总线读操作stop信号15判断,判断总线上是否存在stop信号,如果存在stop信号,则完成数据读取,并且进入开始1,如果不存在stop信号,则保持进行数据的读取;如果判断为写操作,则进入I2C模式写操作16进行数据的写入,再在I2C模式下进行PMBus总线写操作stop信号17,判断总线上是否存在stop信号,如果存在stop信号,则数据写入完成,并且进入开始1,如果不存在stop信号,则保持进行数据的写入。If it is judged not to be the power supply monitoring bus PMBus communication mode, then enter the judgment of the serial communication I2C read operation 13, if it is judged as a read operation, then enter the serial communication I2C mode read operation 14 to read the data, then in the serial communication In the I2C mode, the bus read operation stop signal 15 is judged to judge whether there is a stop signal on the bus. If there is a stop signal, the data reading is completed and enters the start 1. If there is no stop signal, the data reading is kept; If it is judged as a write operation, then enter the I2C mode write operation 16 to write the data, then perform the PMBus bus write operation stop signal 17 in the I2C mode, judge whether there is a stop signal on the bus, if there is a stop signal, then write the data Complete, and enter start 1, if there is no stop signal, keep writing data.

本方法是基于状态机设计的,状态机包含IDLE、Addr、ARA & send address、COMMAND、Data_Write、Restart & Addr_R、Data_Read、I2C_Write、I2C_Read和STOP十个状态,在任何阶段内如果检测到PMBus总线上存在stop信号,则状态机直接进入开始,否则正常工作。状态机在启动时或者无任何操作时,一直处于开始,并且当PMBus总线上检测到start信号时,状态机进入Addr状态,此时mode_sel信号为低电平时进入PMBus传输模式,如果mode_sel信号为高电平时进入I2C传输模式,在PMBus传输模式下,当alert_n为低电平时,说明有ARA中断,状态机进入ARA & send address状态,在此状态下从机地址数据被送至PMBus总线输出,ARA响应完成标志端口产生高电平脉冲信号表示完成ARA响应,可以进行后续操作;否则状态机进入COMMAND状态,状态机接收PMBus总线上的一个字节的串行命令数据,并从命令输出端口输出,同时在命令输出使能端产生一个高电平脉冲信号,此时如果PMBus总线上检测到restart信号时,则进入Data_Write状态,否则进入Restart & Addr_R状态读取PMBus总线输入的读数据地址后转入Data_Read状态;在Data_Write状态下,如果字节或字选择信号为高电平时,表示一个字节操作,将PMBus总线输入的数据送至数据输出端口输出,并且在数据输出使能端产生高电平脉冲信号;如果字节或字选择信号为低电平时,将PMBus总线输入的二个字节数据依次通过数据输出端口输出,并且每个字节传输完毕后都在数据输出使能端都产生一个高电平脉冲信号,并进入开始;在Data_Read状态下,将读取需向PMBus总线发送数据的输入端口数据,若字节或字选择信号为高电平,则数据锁存使能输出端输出一个高电平脉冲信号,并读取需向PMBus总线发送数据的输入端口上一个字节的数据,若字节或字选择信号为低电平,则数据锁存使能输出端输出二个高电平脉冲信号,并且由高电平脉冲信号控制依次读取需向PMBus总线发送数据的输入端口上二个字节的数据,数据的读取完成后进入开始。在I2C传输模式下,根据I2C协议逐位读取PMBus串行总线上的8bits数据后,根据所读数据的最低位判断读写操作,当最低位为高电平时I2C进入I2C_Read状态,并且数据锁存使能输出端上产生一个高电平脉冲信号,此时将需向PMBus总线发送数据的输入端口上的数据送至PMBus总线,之后重复读数据操作;若最低位为低电平I2C进入I2C_Write模式,数据输出端口并行输出PMBus串行总线上的8bits数据,并且数据输出使能端产生一个高电平脉冲信号,之后重复写数据操作。在I2C_Read状态和I2C_Write状态下若检测到PMBus总线stop信号则转入开始,等待新一轮的监控或数据传输。This method is designed based on the state machine. The state machine includes ten states of IDLE, Addr, ARA & send address, COMMAND, Data_Write, Restart & Addr_R, Data_Read, I2C_Write, I2C_Read and STOP. If there is a stop signal, the state machine directly enters the start, otherwise it works normally. The state machine is always at the beginning when it is started or when there is no operation, and when the start signal is detected on the PMBus bus, the state machine enters the Addr state. At this time, when the mode_sel signal is low, it enters the PMBus transmission mode. If the mode_sel signal is high Enter the I2C transmission mode when the level is low. In the PMBus transmission mode, when alert_n is low, it means that there is an ARA interrupt, and the state machine enters the ARA & send address state. In this state, the slave address data is sent to the PMBus bus output, ARA The response completion flag port generates a high-level pulse signal to indicate that the ARA response is completed, and subsequent operations can be performed; otherwise, the state machine enters the COMMAND state, and the state machine receives a byte of serial command data on the PMBus bus and outputs it from the command output port. At the same time, a high-level pulse signal is generated at the command output enable terminal. At this time, if the restart signal is detected on the PMBus bus, it will enter the Data_Write state, otherwise it will enter the Restart & Addr_R state to read the read data address input by the PMBus bus and then transfer to Data_Read state; in the Data_Write state, if the byte or word selection signal is high level, it means a byte operation, and the data input by the PMBus bus is sent to the data output port for output, and a high level is generated at the data output enable terminal Pulse signal; if the byte or word selection signal is low, the two bytes of data input by the PMBus bus are output through the data output port in turn, and after each byte is transmitted, a data output enable terminal is generated. High level pulse signal, and enter the start; in the Data_Read state, the input port data that needs to be sent to the PMBus bus will be read, if the byte or word selection signal is high level, the data latch enables the output port to output A high-level pulse signal, and read a byte of data on the input port that needs to send data to the PMBus bus. If the byte or word selection signal is low, the data latch enable output outputs two high Level pulse signal, and is controlled by the high level pulse signal to sequentially read the two bytes of data on the input port that needs to send data to the PMBus bus, and enter the start after the data reading is completed. In the I2C transmission mode, after reading the 8bits data on the PMBus serial bus bit by bit according to the I2C protocol, the read and write operations are judged according to the lowest bit of the read data. When the lowest bit is high, the I2C enters the I2C_Read state and the data is locked. A high-level pulse signal is generated on the storage enable output terminal. At this time, the data on the input port that needs to send data to the PMBus bus is sent to the PMBus bus, and then the read data operation is repeated; if the lowest bit is low, I2C enters I2C_Write mode, the data output port outputs 8bits data on the PMBus serial bus in parallel, and the data output enable terminal generates a high-level pulse signal, and then repeats the write data operation. In the I2C_Read state and I2C_Write state, if the stop signal of the PMBus bus is detected, it will be transferred to start, waiting for a new round of monitoring or data transmission.

下面结合附图及实例对本发明的电路结构、工作原理及过程作进一步说明。The circuit structure, working principle and process of the present invention will be further described below in conjunction with the accompanying drawings and examples.

图1是本发明的流程图,流程包括开始、start信号、PMBus模式、ARA中断、ARA响应、PMB读操作、读1字节、PMBus模式读1个字节、PMBus模式读2个字节、写1字节、PMBus模式写1个字节、PMBus模式写2个字节、I2C读操作、I2C模式读操作、读操作stop信号、I2C写操作和写操作stop信号十七个步骤。本发明的目的就是能够实现两种模式的数据传送,所以实现的方式就是进入相应的模式下,然后完成响应的读或者写操作,而在进入何种模式和进行何种操作都是需要根据特定的条件进行判断和选择,所以本流程图的核心就是根据特性信号做出相应的判断,然后根据流程完成模式和操作类型的选择,从而实现两种协议接口的整合。Fig. 1 is a flow chart of the present invention, and flow process comprises start, start signal, PMBus mode, ARA interrupt, ARA response, PMB read operation, read 1 byte, PMBus mode reads 1 byte, PMBus mode reads 2 bytes, Write 1 byte, PMBus mode write 1 byte, PMBus mode write 2 bytes, I2C read operation, I2C mode read operation, read operation stop signal, I2C write operation and write operation stop signal seventeen steps. The purpose of the present invention is to be able to realize the data transmission of the two modes, so the way to realize it is to enter the corresponding mode, and then complete the corresponding read or write operation, and which mode to enter and which operation to perform are required according to the specific Therefore, the core of this flow chart is to make corresponding judgments based on characteristic signals, and then to complete the selection of the mode and operation type according to the process, so as to realize the integration of the two protocol interfaces.

参看图2是本发明的状态图,包括IDLE、Addr、ARA & send address、COMMAND、Data_Write、Restart & Addr_R、Data_Read、I2C_Write、I2C_Read和STOP十个状态。本发明就是设计了一种采用较少状态数的状态机,从而很好的实现了PMBus协议接口和I2C协议接口整合的接口方法。该接口方法具有PMBus模式和I2C模式两种模式,而在PMBus模式下,能够响应ARA中断,在PMBus模式下能够实现对电源的监控或者是固定字节数据的读写,而在I2C模式下,可以实现不定字节数的数据读写操作,两个模式下,该接口方法都起到了串并数据转换的作用。将来自PMBus的串行数据并行的送给后续电路,或者从后续电路中读取并行数据,然后串行的向PMBus总线发送。2 is a state diagram of the present invention, including IDLE, Addr, ARA & send address, COMMAND, Data_Write, Restart & Addr_R, Data_Read, I2C_Write, I2C_Read and STOP ten states. The present invention designs a state machine with less number of states, thereby well realizing the interface method of PMBus protocol interface and I2C protocol interface integration. This interface method has two modes: PMBus mode and I2C mode. In PMBus mode, it can respond to ARA interrupt. In PMBus mode, it can monitor the power supply or read and write fixed byte data. In I2C mode, Data read and write operations with variable number of bytes can be realized. In both modes, this interface method plays the role of serial-to-parallel data conversion. Send the serial data from the PMBus to the subsequent circuit in parallel, or read the parallel data from the subsequent circuit, and then send it serially to the PMBus bus.

图3是本发明两种模式切换时主要信号的关系示意图(前半部分)。图中画出了在PMBus和I2C传输两种模式下转换之前PMBus模式读取两个字节数据的关键信号的示意图,传输从scl为高电平时sda从高变低电平的开始信号,然后总线传送从机地址,从图中可以读出其为8′hD0(8′b11010000),然后PMBus总线发送master_data[7:0]上的命令数据8′h10,经过9个scl时钟,cmd_accept[7:0]接收到命令数据8′h10,并且cmd_en产生一个高电平脉冲;接着总线产生重开始信号,然后总线传送从机地址,从图中可以读出其为8′hD1(8′b11010001),接着连续读取data_accept[7:0]上的两个数据8′h20和8′h46,并且产生一个stop_en高电平脉冲,表示结束操作。然后mode_sel由原先的低电平变为高电平,表示变换为I2C通信模式。Fig. 3 is a schematic diagram (the first half) of the relationship between the main signals when the two modes are switched in the present invention. The figure shows a schematic diagram of the key signal for reading two bytes of data in PMBus mode before conversion in the two modes of PMBus and I2C transmission, and transmits the start signal of sda changing from high to low when scl is high, and then The bus transmits the slave address, which can be read from the figure as 8'hD0 (8'b11010000), and then the PMBus bus sends the command data 8'h10 on master_data[7:0], after 9 scl clocks, cmd_accept[7 :0] Command data 8'h10 is received, and cmd_en generates a high-level pulse; then the bus generates a restart signal, and then the bus transmits the slave address, which can be read as 8'hD1 (8'b11010001) from the figure , and then continuously read the two data 8'h20 and 8'h46 on data_accept[7:0], and generate a stop_en high-level pulse, indicating the end of the operation. Then mode_sel changes from the original low level to high level, indicating the conversion to I2C communication mode.

图4是本发明两种模式切换时主要信号的关系示意图(后半部分)。该图实际上是图3的延续,但是由于考虑排版,所以将两种模式切换的关系图分成图3和图4。图中画出了在PMBus和I2C传输两种模式下转换之后I2C模式写入三个字节数据的关键信号的示意图,mode_sel由低电平变为高电平开始,此时模式由PMBus模式转变为I2C模式,传输从scl为高电平时sda从高变低电平的开始信号,然后PMBus总线传送从机地址,从图中可以读出其为8′hD0(8′b11010000),然后PMBus总线发送master_data[7:0]上的命令数据8′h05,经过9个scl时钟,data accept[7:0]接收到数据8′h05,并且data_en产生一个高电平脉冲;然后PMBus总线第二次发送master_data[7:0]上的命令数据8′h17,经过9个scl时钟,data_accept[7:0]接收到数据8′h17,并且data_en产生一个高电平脉冲;然后PMBus总线第三次发送master_data[7:0]上的命令数据8′h28,经过9个scl时钟,data_accept[7:0]接收到数据8′h29,并且data_en产生一个高电平脉冲;完成三次数据的写入后PMBus产生一个stop信号,所以stop_en产生一个高电平脉冲,表示操作结束。Fig. 4 is a schematic diagram of the relationship between the main signals when the two modes are switched in the present invention (the second half). This figure is actually a continuation of Figure 3, but due to the consideration of layout, the relationship diagram of the two modes switching is divided into Figure 3 and Figure 4. The figure shows a schematic diagram of the key signal for writing three bytes of data in the I2C mode after conversion in the two modes of PMBus and I2C transmission. Mode_sel starts from low level to high level, and the mode changes from PMBus mode at this time. In I2C mode, the start signal of sda changing from high to low when scl is high is transmitted, and then the PMBus bus transmits the slave address, which can be read from the figure as 8'hD0 (8'b11010000), and then the PMBus bus Send the command data 8′h05 on master_data[7:0], after 9 scl clocks, data accept[7:0] receives the data 8′h05, and data_en generates a high-level pulse; then the PMBus bus for the second time Send the command data 8'h17 on master_data[7:0], after 9 scl clocks, data_accept[7:0] receives the data 8'h17, and data_en generates a high level pulse; then the PMBus bus sends for the third time Command data 8′h28 on master_data[7:0], after 9 scl clocks, data_accept[7:0] receives data 8′h29, and data_en generates a high-level pulse; PMBus after three data writes A stop signal is generated, so stop_en generates a high level pulse, indicating the end of the operation.

图5是本发明两种模式切换的仿真波形图(前半部分)。该图是由PMBus模式读取两个字节数据向I2C模式写入三个字节数据切换的仿真图的前半部分,也就是PMBus模式读取两个字节数据的波形图。从图中可以看出,该接口电路能够在PMBus和I2C两个模式间顺利切换。图中在cmd_accept[7:0]接收到主机发送的命令数据8′h08,cmd_en使能有效后,主机的rcv_data[7:0]连续接收到两个从机数据8′h0a和8′h0f。Fig. 5 is a simulation waveform diagram (first half) of switching between two modes in the present invention. This figure is the first half of the simulation diagram of reading two bytes of data in PMBus mode and writing three bytes of data in I2C mode, that is, the waveform diagram of reading two bytes of data in PMBus mode. It can be seen from the figure that the interface circuit can switch smoothly between PMBus and I2C modes. In the figure, cmd_accept[7:0] receives the command data 8'h08 sent by the host, and after cmd_en is enabled, the host's rcv_data[7:0] continuously receives two slave data 8'h0a and 8'h0f.

图6是本发明两种模式切换的仿真波形图(后半部分)。该图是由PMBus模式读取两个字节数据向I2C模式写入三个字节数据切换的仿真图的后半部分,也就是I2C模式写入三个字节数据的波形图。事实上,本仿真图形是图5的延续,但是也是为了考虑排版所以将仿真图分成图5和图6。从图中可以看出,该接口电路能够在PMBus和I2C两个模式间顺利切换。图中在master_rcv[7:0]顺利接收完数据8′h0f,并且产生了stop_en高电平脉冲。然后mode_sel信号由低电平变为高电平,也就是模式变为I2C模式,data_accept[7:0]一次接收到来自PMBus总线的数据8′h18、8′h20和8′h28,并且产生了相应的data_en使能高电平脉冲信号,最后产生了stop_en高电平脉冲,表示传输结束。Fig. 6 is a simulation waveform diagram (second half) of switching between two modes in the present invention. This figure is the second half of the simulation diagram for switching from reading two bytes of data in PMBus mode to writing three bytes of data in I2C mode, that is, the waveform diagram of writing three bytes of data in I2C mode. In fact, this simulation graph is a continuation of Figure 5, but the simulation graph is also divided into Figure 5 and Figure 6 to consider layout. It can be seen from the figure that the interface circuit can switch smoothly between PMBus and I2C modes. In the figure, master_rcv[7:0] has successfully received the data 8′h0f, and a stop_en high-level pulse is generated. Then the mode_sel signal changes from low level to high level, that is, the mode changes to I2C mode, data_accept[7:0] receives data 8'h18, 8'h20 and 8'h28 from the PMBus bus at one time, and generates The corresponding data_en enables a high-level pulse signal, and finally generates a stop_en high-level pulse, indicating the end of the transmission.

Claims (1)

1.一种整合电源监控总线协议和串行通信协议的接口实现方法,其特征在于:1. an interface implementation method integrating power monitoring bus protocol and serial communication protocol, characterized in that: 流程进入开始(1),之后直接进行start信号(2)判断,判断电源监控总线PMBus上是否存在start信号,如果没有start信号,则返回开始(1),如果有start信号,则进入模式判断(3),判断是PMBus通信模式,还是I2C通信模式,所述模式判断如下:状态机在启动时或者无任何操作时,一直处于开始,并且当PMBus总线上检测到start信号时,状态机进入Addr状态,此时mode_sel信号为低电平时进入PMBus传输模式,如果mode_sel信号为高电平时进入I2C传输模式;The process enters the start (1), and then directly performs the start signal (2) judgment to determine whether there is a start signal on the power monitoring bus PMBus. If there is no start signal, return to the start (1). If there is a start signal, then enter the mode judgment ( 3), judging whether it is the PMBus communication mode or the I2C communication mode, the mode is judged as follows: the state machine is always at the beginning when starting or without any operation, and when the start signal is detected on the PMBus bus, the state machine enters Addr State, at this time, when the mode_sel signal is low, it enters the PMBus transmission mode, and if the mode_sel signal is high, it enters the I2C transmission mode; 如果判断为电源监控总线PMBus通信模式,则进行故障中断ARA(4)判断,判断是否存在故障中断ARA;如果存在故障中断ARA,则进入故障响应ARA响应(5),向PMBus总线发送从机地址数据,并且完成地址发送后进入开始(1);如果不存在ARA中断,则进入电源监控总线PMBus操作读写判断(6),判断是否进行PMBus读操作,如果是PMBus读操作,则进一步判断是进行1个字节还是2个字节数据的读取,如果是1个字节数据的读取,则进入电源监控总线PMBus模式,读1个字节(8),完成1个字节读取后,进入开始(1),如果是2个字节数据的读取,则进入电源监控总线PMBus模式读2个字节(9),完成2个字节读取后进入开始(1);如果不是电源监控总线PMBus读操作,则判断是进行1个字节还是2个字节数据的写入,如果是1个字节数据的写入,则进入电源监控总线PMBus模式写1个字节(11),完成1个字节写入后进入开始(1),如果是2个字节数据的写入,则进入电源监控总线PMBus模式写2个字节(9),完成2个字节写入后进入开始(1);If it is judged to be the PMBus communication mode of the power supply monitoring bus, then perform a fault interrupt ARA (4) judgment to determine whether there is a fault interrupt ARA; if there is a fault interrupt ARA, then enter the fault response ARA response (5), and send the slave address to the PMBus bus data, and complete the address sending and enter start (1); if there is no ARA interrupt, then enter the power monitoring bus PMBus operation read and write judgment (6), judge whether to perform PMBus read operation, if it is PMBus read operation, then further judge whether it is Read 1 byte or 2 bytes of data. If it is 1 byte of data, enter the PMBus mode of the power monitoring bus, read 1 byte (8), and complete the reading of 1 byte. After that, enter the start (1), if it is the reading of 2 bytes of data, then enter the power monitoring bus PMBus mode to read 2 bytes (9), after completing the reading of 2 bytes, enter the start (1); if If it is not a power monitoring bus PMBus read operation, it is judged whether to write 1 byte or 2 bytes of data. If it is a writing of 1 byte data, enter the power monitoring bus PMBus mode to write 1 byte ( 11), after completing the writing of 1 byte, enter the start (1), if it is the writing of 2 bytes of data, then enter the power monitoring bus PMBus mode to write 2 bytes (9), and complete the writing of 2 bytes enter after enter start(1); 如果判断为不是电源监控总线PMBus通信模式,则进入串行通信I2C读操作(13)的判断,如果判断为读操作,则进入串行通信I2C模式读操作(14)进行数据的读取,再在串行通信I2C模式下进行总线读操作stop信号(15)判断,判断总线上是否存在stop信号,如果存在stop信号,则完成数据读取,并且进入开始(1),如果不存在stop信号,则保持进行数据的读取;如果判断为写操作,则进入I2C模式写操作(16)进行数据的写入,再在I2C模式下进行PMBus总线写操作stop信号(17)判断,判断总线上是否存在stop信号,如果存在stop信号,则数据写入完成,并且进入开始(1),如果不存在stop信号,则保持进行数据的写入。If it is judged not to be the power supply monitoring bus PMBus communication mode, then enter the judgment of the serial communication I2C read operation (13), if it is judged as a read operation, then enter the serial communication I2C mode read operation (14) to read the data, and then Carry out bus read operation stop signal (15) judgment under serial communication I2C mode, judge whether there is stop signal on the bus, if there is stop signal, then complete data reading, and enter start (1), if do not exist stop signal, Then keep reading of data; if it is judged as a write operation, then enter I2C mode write operation (16) to write data, then carry out PMBus bus write operation stop signal (17) judgment under I2C mode, judge whether on the bus There is a stop signal, if there is a stop signal, the data writing is completed, and enters start (1), if there is no stop signal, then the data writing is kept.
CN201110444113.7A 2011-12-27 2011-12-27 Interface implementation method integrating power monitoring bus protocol and serial communication protocol Expired - Fee Related CN102546611B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110444113.7A CN102546611B (en) 2011-12-27 2011-12-27 Interface implementation method integrating power monitoring bus protocol and serial communication protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110444113.7A CN102546611B (en) 2011-12-27 2011-12-27 Interface implementation method integrating power monitoring bus protocol and serial communication protocol

Publications (2)

Publication Number Publication Date
CN102546611A CN102546611A (en) 2012-07-04
CN102546611B true CN102546611B (en) 2014-07-09

Family

ID=46352572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110444113.7A Expired - Fee Related CN102546611B (en) 2011-12-27 2011-12-27 Interface implementation method integrating power monitoring bus protocol and serial communication protocol

Country Status (1)

Country Link
CN (1) CN102546611B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6530029B1 (en) * 1999-09-23 2003-03-04 National Semiconductor Corporation I2C/SMBus start-stop detecting circuit that reduces the likelihood of stalling the bus due to glitches on the data line
US6874047B1 (en) * 2000-06-09 2005-03-29 3Com Corporation System and method for implementing an SMBus/I2C interface on a network interface card
CN101162435A (en) * 2007-08-01 2008-04-16 李谦 Computer accelerated velocity monitoring system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110302357A1 (en) * 2010-06-07 2011-12-08 Sullivan Jason A Systems and methods for dynamic multi-link compilation partitioning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6530029B1 (en) * 1999-09-23 2003-03-04 National Semiconductor Corporation I2C/SMBus start-stop detecting circuit that reduces the likelihood of stalling the bus due to glitches on the data line
US6874047B1 (en) * 2000-06-09 2005-03-29 3Com Corporation System and method for implementing an SMBus/I2C interface on a network interface card
CN101162435A (en) * 2007-08-01 2008-04-16 李谦 Computer accelerated velocity monitoring system

Non-Patent Citations (10)

* Cited by examiner, † Cited by third party
Title
Bob White.PMBus--数字电源开放标准协议.《今日电子》.2005,(第9期),
Digital DC/DC Controller with Drivers and Auto Compensation ZL6105;intersil Zilker Labs;《Digital DC/DC Controller with Drivers and Auto Compensation》;20110208;第1-35页 *
intersil Zilker Labs.Digital DC/DC Controller with Drivers and Auto Compensation ZL6105.《Digital DC/DC Controller with Drivers and Auto Compensation》.2011,第1-35页.
LM25066 System Power Management and Protection IC with PMBus(China);Texas Insrtuments;《LM25066 System Power Management and Protection IC with PMBus(China)》;20110711;第1-49页 *
Mark Thoren 等.对I2C号和SMBus信号进行无毛刺快速隔离的方法.《电子设计技术》.2004,第11卷(第11期),第98-99页.
PMBus--数字电源开放标准协议;Bob White;《今日电子》;20050930(第9期);第49-51页 *
Texas Insrtuments.LM25066 System Power Management and Protection IC with PMBus(China).《LM25066 System Power Management and Protection IC with PMBus(China)》.2011,第1-49页.
对I2C号和SMBus信号进行无毛刺快速隔离的方法;Mark Thoren 等;《电子设计技术》;20041130;第11卷(第11期);第98-99页 *
数字电源中的总线技术;路秋生;《电子测试》;20090930(第9期);第66-69页 *
路秋生.数字电源中的总线技术.《电子测试》.2009,(第9期),第66-69页.

Also Published As

Publication number Publication date
CN102546611A (en) 2012-07-04

Similar Documents

Publication Publication Date Title
CN102105872B (en) USB and Ethernet controller combination device
CN104021102B (en) CPCI serial port plate based on state machine and on-chip bus and working method of CPCI serial port plate
CN102696021B (en) Interface clock manages
CN101087235A (en) A FPGA-based multi-functional communication interface conversion device and method
CN107153622B (en) A kind of drive control method based on spi bus
JP2005228311A (en) Bus system based on open core protocol
CN205692166U (en) Core board based on PowerPC framework central processing unit
CN103092175B (en) Controlling method and device for serial clock line (SCL) between inter-integrated circuit (I2C) master equipment and slave equipment
CN102360204A (en) FlexRay-based distributed flight control computer communication system and control method thereof
CN103870429A (en) High-speed-signal processing board based on embedded GPU
CN110837486A (en) FlexRay-CPCIe communication module based on FPGA
CN104731746A (en) Equipment controller device
CN102253910A (en) Inter-integrated circuit (I2C) transmission method and device
CN104345869A (en) Safety digital input and output device, system and control method thereof
CN105281433A (en) Distribution terminal communication system
CN106959935A (en) A kind of method that compatible I2C communications communicate with IPMB
CN106951381A (en) A kind of UART extended chips and implementation method
CN110635985A (en) FlexRay-CPCIe communication module
CN107194257A (en) A kind of trusted system based on domestic TCM chips
CN102637453A (en) Phase change memory including serial input/output interface
WO2025130245A1 (en) High-speed optical communication connector and server
CN117806553A (en) Multi-source heterogeneous distributed system, memory access method and storage medium
CN116132383B (en) Information transmission device, system and method
CN101369948B (en) Communication system implementing low-power consumption
CN201860344U (en) System supporting various fieldbus protocols

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140709

Termination date: 20211227

CF01 Termination of patent right due to non-payment of annual fee