CN116049081B - A SMBus slave digital module design method and device - Google Patents
A SMBus slave digital module design method and device Download PDFInfo
- Publication number
- CN116049081B CN116049081B CN202211726418.1A CN202211726418A CN116049081B CN 116049081 B CN116049081 B CN 116049081B CN 202211726418 A CN202211726418 A CN 202211726418A CN 116049081 B CN116049081 B CN 116049081B
- Authority
- CN
- China
- Prior art keywords
- digital module
- smbus
- slave digital
- read
- chip
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/16—Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
- G06F15/163—Interprocessor communication
- G06F15/17—Interprocessor communication using an input/output type connection, e.g. channel, I/O port
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
-
- 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)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Transfer Systems (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及芯片数据传输技术领域,具体而言,涉及一种SMBus slave数字模块设计方法及装置。The present application relates to the technical field of chip data transmission, and in particular to a method and device for designing an SMBus slave digital module.
背景技术Background technique
SMBus是一种应用于移动PC或者桌面PC系统中的低速率通讯。它主要是通过一条廉价并且功能强大的总线(由两条线组成)来控制主板上的设备并收集相应的信息。SMBus为系统和电源管理这样的任务提供了一条控制总线,使用SMBus的系统,设备之间发送和接收消息都是通过SMBus,而不是使用单独的控制线,这样可以节省设备的管脚数。SMBus is a low-speed communication used in mobile PC or desktop PC systems. It mainly controls the devices on the motherboard and collects corresponding information through a cheap and powerful bus (consisting of two lines). SMBus provides a control bus for tasks such as system and power management. In systems using SMBus, messages are sent and received between devices through SMBus instead of using separate control lines, which can save the number of device pins.
目前asic芯片设计普遍实现的是Synopsys Design Ware生成的带AMBA APBslave接口的SMBus模块,相对于其他SMBus设备,它是一个SMBus master。也有asic芯片设计实现了SMBus模块,但是其支持的访问格式比较简单、读写效率比较低,也没有实现AMBA2.0规范的AHB接口,把SMBus总线接收到的数据通过AHB接口发出去,如果芯片内有其他master模块也要对芯片内的寄存器进行访问,则无法配合符合AMBA 2.0规范的仲裁模块做好访问的仲裁。At present, the SMBus module with AMBA APBslave interface generated by Synopsys Design Ware is generally implemented in ASIC chip design. Compared with other SMBus devices, it is an SMBus master. There are also ASIC chip designs that implement SMBus modules, but the access format they support is relatively simple, the read and write efficiency is relatively low, and the AHB interface of AMBA2.0 specification is not implemented. The data received by the SMBus bus is sent out through the AHB interface. If there are other master modules in the chip that also need to access the registers in the chip, they cannot cooperate with the arbitration module that complies with the AMBA 2.0 specification to do a good job of access arbitration.
发明内容Summary of the invention
本申请的目的在于,为了克服现有的技术缺陷,提供了一种SMBus slave数字模块设计方法及装置,通过master设备通过SMBus接口去访问芯片内的各个寄存器的内容,不一定要通过JTAG或者SWD接口,还能够支持读写多个word,有效提高SMBus读写寄存器的访问效率。The purpose of this application is to provide a SMBus slave digital module design method and device to overcome the existing technical defects, so that the master device can access the contents of each register in the chip through the SMBus interface, without having to go through the JTAG or SWD interface, and can also support reading and writing multiple words, effectively improving the access efficiency of the SMBus read and write registers.
本申请目的通过下述技术方案来实现:The purpose of this application is achieved through the following technical solutions:
第一方面,本申请提出了一种SMBus slave数字模块设计方法,其特征在于,所述方法应用于chip芯片中的SMBus slave数字模块,所述chip芯片与master设备连接,所述SMBus slave数字模块与所述chip芯片中的多个片内模块连接,包括:In a first aspect, the present application proposes a SMBus slave digital module design method, characterized in that the method is applied to an SMBus slave digital module in a chip chip, the chip chip is connected to a master device, and the SMBus slave digital module is connected to multiple on-chip modules in the chip chip, including:
所述SMBus slave数字模块接收master设备发送的设备地址、读写地址和读数据;The SMBus slave digital module receives the device address, read/write address and read data sent by the master device;
所述SMBus slave数字模块将所述读写地址和所述读数据转换为AHB bus总线信息;The SMBus slave digital module converts the read/write address and the read data into AHB bus information;
所述SMBus slave数字模块根据所述AHB bus总线信息访问所述chip芯片中的多个片内模块;The SMBus slave digital module accesses multiple on-chip modules in the chip according to the AHB bus information;
所述SMBus slave数字模块接收所述多个片内模块返回的反馈数据。The SMBus slave digital module receives feedback data returned by the multiple on-chip modules.
可选的,所述SMBus slave数字模块包括SMBus控制部件和AHB_CTRL控制部件,所述SMBus slave数字模块将所述读写地址和所述读数据转换为AHB bus总线信息的步骤包括:Optionally, the SMBus slave digital module includes an SMBus control component and an AHB_CTRL control component, and the step of the SMBus slave digital module converting the read/write address and the read data into AHB bus information includes:
所述SMBus控制部件通过ADDR总线将接收的所述读写地址发送至所述AHB_CTRL控制部件;The SMBus control component sends the received read/write address to the AHB_CTRL control component via the ADDR bus;
所述SMBus控制部件通过WDATA总线将接收的所述读数据发送至所述AHB_CTRL控制部件;The SMBus control component sends the received read data to the AHB_CTRL control component via the WDATA bus;
所述AHB_CTRL控制部件将所述读写地址和所述读数据转换为AHB bus总线信息。可选的,所述AHB bus总线信息符合AMBA 2.0时序规范。The AHB_CTRL control component converts the read/write address and the read data into AHB bus information. Optionally, the AHB bus information complies with the AMBA 2.0 timing specification.
可选的,所述SMBus slave数字模块接收master设备发送的设备地址、读写地址和读数据的步骤,包括:Optionally, the step of the SMBus slave digital module receiving a device address, a read/write address, and read data sent by a master device includes:
所述master设备发送启动指令使得所述SMBus slave数字模块启动;The master device sends a startup instruction to start the SMBus slave digital module;
所述master设备发送设备地址至所述SMBus slave数字模块,所述SMBus slave数字模块反馈ACK信号;The master device sends a device address to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal;
若所述设备地址中的读写位为0则表明要进行写操作,所述master设备发送命令码,所述SMBus slave数字模块反馈ACK信号;If the read/write bit in the device address is 0, it indicates that a write operation is to be performed, the master device sends a command code, and the SMBus slave digital module feeds back an ACK signal;
所述master设备发送字节计数码,所述SMBus slave数字模块反馈ACK信号;The master device sends a byte count code, and the SMBus slave digital module feeds back an ACK signal;
所述master设备发送读写地址,所述SMBus slave数字模块反馈ACK信号;The master device sends a read/write address, and the SMBus slave digital module feeds back an ACK signal;
若所述设备地址中的读写位1则表明要进行读操作,所述SMBus slave数字模块反馈ACK信号;If the read/write bit in the device address is 1, it indicates that a read operation is to be performed, and the SMBus slave digital module feeds back an ACK signal;
所述AHB_CTRL控制部件根据所述master设备发送的读写地址向多个片内模块发起读请求得到读数据。The AHB_CTRL control component initiates a read request to multiple on-chip modules to obtain read data according to the read and write addresses sent by the master device.
可选的,在所述master设备发送命令码,所述SMBus slave数字模块反馈ACK信号之后还包括:Optionally, after the master device sends a command code and the SMBus slave digital module feeds back an ACK signal, the following further comprises:
若所述命令码中的校验位为1,则所述master设备发出校验码,所述SMBus slave数字模块反馈ACK信号。If the check bit in the command code is 1, the master device sends a check code, and the SMBus slave digital module feeds back an ACK signal.
第二方面,本申请还提出了一种SMBus slave数字模块设计装置,所述装置应用于chip芯片中的SMBus slave数字模块,所述chip芯片与master设备连接,所述SMBus slave数字模块与所述chip芯片中的多个片内模块连接,包括:In a second aspect, the present application further proposes an SMBus slave digital module design device, which is applied to an SMBus slave digital module in a chip chip, the chip chip is connected to a master device, and the SMBus slave digital module is connected to multiple on-chip modules in the chip chip, including:
所述SMBus slave数字模块接收master设备发送的设备地址、读写地址和读数据;The SMBus slave digital module receives the device address, read/write address and read data sent by the master device;
所述SMBus slave数字模块将所述读写地址和所述读数据转换为AHB bus总线信息;The SMBus slave digital module converts the read/write address and the read data into AHB bus information;
所述SMBus slave数字模块根据所述AHB bus总线信息访问所述chip芯片中的多个片内模块;The SMBus slave digital module accesses multiple on-chip modules in the chip according to the AHB bus information;
所述SMBus slave数字模块接收所述多个片内模块返回的反馈数据。The SMBus slave digital module receives feedback data returned by the multiple on-chip modules.
第三方面,本申请还提出了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器加载并执行以实现如第一方面任一项所述的SMBus slave数字模块设计方法。In a third aspect, the present application further proposes a computer device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the SMBus slave digital module design method as described in any one of the first aspects.
第四方面,本申请还提出了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现如第一方面任一项所述的SMBusslave数字模块设计方法。In a fourth aspect, the present application further proposes a computer-readable storage medium, wherein a computer program is stored in the storage medium, and the computer program is loaded and executed by a processor to implement the SMBus slave digital module design method as described in any one of the first aspects.
上述本申请主方案及其各进一步选择方案可以自由组合以形成多个方案,均为本申请可采用并要求保护的方案;且本申请,(各非冲突选择)选择之间以及和其他选择之间也可以自由组合。本领域技术人员在了解本申请方案后根据现有技术和公知常识可明了有多种组合,均为本申请所要保护的技术方案,在此不做穷举。The above main scheme of the present application and its further options can be freely combined to form multiple schemes, all of which are schemes that can be adopted and claimed for protection in the present application; and in the present application, (non-conflicting options) can also be freely combined with each other and with other options. After understanding the scheme of the present application, those skilled in the art can understand that there are many combinations based on the prior art and common knowledge, all of which are technical schemes to be protected by the present application, and they are not exhaustively listed here.
本申请的有益效果在于:The beneficial effects of this application are:
第一、本申请实施例提出的SMBus slave数字模块,使得芯片外的master设备能够访问到芯片内SMBus slave数字模块和各个片内模块中寄存器的内容,不一定要通过JTAG或者SWD接口。First, the SMBus slave digital module proposed in the embodiment of the present application enables a master device outside the chip to access the contents of the registers in the SMBus slave digital module and each on-chip module within the chip, without necessarily going through a JTAG or SWD interface.
第二、本申请实施例提出的SMBus slave数字模块能够支持多种访问格式,芯片外的master设备能够通过下发不同的命令码(command code)来决定访问1个还是多个word,有效提高SMBus读写寄存器的访问效率。Second, the SMBus slave digital module proposed in the embodiment of the present application can support multiple access formats, and the master device outside the chip can decide whether to access one or multiple words by issuing different command codes, thereby effectively improving the access efficiency of the SMBus read and write registers.
第三、由于存在AMBA 2.0规范的AHB接口,通过AHB接口传输数据,如果芯片内有其他master模块也要对芯片内的寄存器进行访问,可以配合符合AMBA 2.0规范的仲裁模块做好访问的仲裁。Third, due to the existence of the AHB interface of the AMBA 2.0 specification, data is transmitted through the AHB interface. If there are other master modules in the chip that also need to access the registers in the chip, they can cooperate with the arbitration module that complies with the AMBA 2.0 specification to perform access arbitration.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1示出了现有技术中的SMBus模块与其他模块的连接关系。FIG. 1 shows the connection relationship between the SMBus module and other modules in the prior art.
图2示出了本申请实施例提出的SMBus slave数字模块与master设备的连接示意图。FIG. 2 shows a schematic diagram of the connection between the SMBus slave digital module and the master device proposed in an embodiment of the present application.
图3示出了本申请实施例提供的SMBus slave数字模块的内部示意图。FIG3 shows an internal schematic diagram of an SMBus slave digital module provided in an embodiment of the present application.
图4示出了master设备读取SMBus slave数字模块中的寄存器1个word示意图。FIG. 4 is a schematic diagram showing a master device reading a register word in an SMBus slave digital module.
图5示出了function=011的访问格式示意图。FIG. 5 shows a schematic diagram of the access format of function=011.
图6示出了function=100的访问格式示意图。FIG. 6 shows a schematic diagram of the access format of function=100.
图7示出了function=101的访问格式示意图。FIG. 7 shows a schematic diagram of the access format of function=101.
图8示出了function=110的访问格式示意图。FIG. 8 shows a schematic diagram of the access format of function=110.
图9示出了function=111的访问格式示意图。FIG. 9 is a schematic diagram showing the access format of function=111.
具体实施方式Detailed ways
以下通过特定的具体实例说明本申请的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本申请的其他优点与功效。本申请还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本申请的精神下进行各种修饰或改变。需说明的是,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of this application.
请参考图1,图1示出了现有技术中的SMBus模块与其他模块的连接关系,现有技术中的chip芯片内SMBus相对于片外SMBus设备为一个slave模块,片外SMBus设备相对于片内SMBus为一个slave设备,二者的主从关系为以片内SMBus为主,然后再片外SMBus设备为从,芯片内其他模块通过APB总线接口配置了该SMBus模块,然后该SMBus主动向芯片外的其他SMBus设备发起了访问请求。相对于其他SMBus设备,片外SMBus设备其支持的访问格式比较简单、读写效率比较低。此外由于片内SMBus使用的是APB bus接口与chip芯片的各个片内模块进行通信,不能实现AMBA 2.0规范的AHB接口。把SMBus总线接收到的数据通过AHB接口发出去,如果芯片内有其他master模块也要对芯片内的寄存器进行访问,则无法配合符合AMBA 2.0规范的仲裁模块做好访问的仲裁。Please refer to Figure 1, which shows the connection relationship between the SMBus module and other modules in the prior art. In the prior art, the SMBus in the chip is a slave module relative to the off-chip SMBus device, and the off-chip SMBus device is a slave device relative to the SMBus in the chip. The master-slave relationship between the two is that the SMBus in the chip is the master, and the off-chip SMBus device is the slave. Other modules in the chip configure the SMBus module through the APB bus interface, and then the SMBus actively initiates access requests to other SMBus devices outside the chip. Compared with other SMBus devices, the access format supported by the off-chip SMBus device is relatively simple and the read and write efficiency is relatively low. In addition, since the SMBus in the chip uses the APB bus interface to communicate with each on-chip module of the chip chip, the AHB interface of the AMBA 2.0 specification cannot be implemented. The data received by the SMBus bus is sent out through the AHB interface. If there are other master modules in the chip that also need to access the registers in the chip, it is impossible to cooperate with the arbitration module that complies with the AMBA 2.0 specification to do a good job of access arbitration.
因此为了解决上述的问题,本申请提出了一种SMBus slave数字模块设计方法,使得片内Bus模块相对于芯片外的SMBus设备是一个SMBus slave数字模块,以芯片外的SMBus设备为主,以片内Bus模块为从,与现有技术的主从关系进行调换,不仅支持多种访问格式,还能有效提高主机通过SMBus对芯片内其他模块的读写效率,并且实现了AMBA 2.0规范的AHB接口,接下来对SMBus slave数字模块设计方法进行详细说明。Therefore, in order to solve the above-mentioned problems, the present application proposes a SMBus slave digital module design method, so that the on-chip Bus module is an SMBus slave digital module relative to the SMBus device outside the chip, with the SMBus device outside the chip as the master and the on-chip Bus module as the slave, which is different from the master-slave relationship in the prior art. It not only supports multiple access formats, but also effectively improves the read and write efficiency of the host to other modules in the chip through the SMBus, and realizes the AHB interface of the AMBA 2.0 specification. The SMBus slave digital module design method is described in detail below.
请参考图2,图2示出了本申请实施例提出的SMBus slave数字模块与master设备的连接示意图,chip芯片包括SMBus slave数字模块,SMBus slave数字模块利用数据线和时钟线与chip芯片的SMBus总线接口相连,接口的另一端连接master设备,master设备为其他SMBus设备,片内SMBus slave数字模块还与chip芯片中的多个片内模块连接通过AHBbus连接,SMBus slave数字模块设计方法包括以下步骤:Please refer to FIG. 2 , which shows a schematic diagram of the connection between the SMBus slave digital module and the master device proposed in an embodiment of the present application. The chip chip includes the SMBus slave digital module, which is connected to the SMBus bus interface of the chip chip using a data line and a clock line. The other end of the interface is connected to the master device, which is another SMBus device. The on-chip SMBus slave digital module is also connected to multiple on-chip modules in the chip chip through the AHBbus. The SMBus slave digital module design method includes the following steps:
SMBus slave数字模块接收master设备发送的设备地址、读写地址和读数据;The SMBus slave digital module receives the device address, read/write address and read data sent by the master device;
SMBus slave数字模块将读写地址和读数据转换为AHB bus总线信息;The SMBus slave digital module converts the read/write address and read data into AHB bus information;
SMBus slave数字模块根据AHB bus总线信息访问chip芯片中的多个片内模块;The SMBus slave digital module accesses multiple on-chip modules in the chip according to the AHB bus information;
SMBus slave数字模块接收多个片内模块返回的反馈数据。The SMBus slave digital module receives feedback data returned by multiple on-chip modules.
基于图2,请参照图3,图3示出了本申请实施例提供的SMBus slave数字模块的内部示意图,SMBus slave数字模块包括SMBus控制部件和AHB_CTRL控制部件,SMBus控制部件和AHB_CTRL控制部件之间通过ADDR总线、读数据总线和写数据总线连接。将读写地址和读数据转换为AHB bus总线信息的步骤包括:Based on FIG. 2, please refer to FIG. 3, which shows an internal schematic diagram of an SMBus slave digital module provided in an embodiment of the present application. The SMBus slave digital module includes an SMBus control component and an AHB_CTRL control component. The SMBus control component and the AHB_CTRL control component are connected via an ADDR bus, a read data bus, and a write data bus. The steps of converting the read/write address and the read data into AHB bus information include:
SMBus控制部件通过ADDR总线将接收的读写地址发送至AHB_CTRL控制部件;The SMBus control component sends the received read and write addresses to the AHB_CTRL control component via the ADDR bus;
SMBus控制部件通过WDATA总线将接收的读数据发送至AHB_CTRL控制部件;The SMBus control component sends the received read data to the AHB_CTRL control component via the WDATA bus;
AHB_CTRL控制部件将读写地址和读数据转换为AHB bus总线信息。The AHB_CTRL control component converts the read and write addresses and read data into AHB bus information.
芯片外的Smaster设备利用数据线和时钟线与chip芯片的SMBus总线接口发过来读写地址、读数据,通过AHB_CTRL控制部件转换成符合AMBA 2.0时序规范的AHB bus总线信息,然后再AHB bus总线信息访问chip芯片中的多个片内模块,而片内模块会反馈读到的数据,通过SMBus slave数字模块传递到SMBus总线接口,直至最终到master设备。The Smaster device outside the chip uses the data line and clock line to send read and write addresses and read data to the SMBus bus interface of the chip chip, and converts them into AHB bus information that complies with the AMBA 2.0 timing specification through the AHB_CTRL control component. The AHB bus information then accesses multiple on-chip modules in the chip chip, and the on-chip modules will feedback the read data and pass it to the SMBus bus interface through the SMBus slave digital module until it finally reaches the master device.
可选的,SMBus slave数字模块接收master设备发送的设备地址、读写地址和读数据的子步骤包括:Optionally, the sub-steps of the SMBus slave digital module receiving the device address, read/write address, and read data sent by the master device include:
master设备发送启动指令使得SMBus slave数字模块启动;The master device sends a startup command to start the SMBus slave digital module;
master设备发送设备地址至SMBus slave数字模块,SMBus slave数字模块反馈ACK信号;The master device sends the device address to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal;
若设备地址中的读写位为0则表明要进行写操作,master设备发送命令码,SMBusslave数字模块反馈ACK信号;If the read/write bit in the device address is 0, it indicates that a write operation is to be performed. The master device sends a command code, and the SMBus slave digital module feeds back an ACK signal.
master设备发送字节计数码,SMBus slave数字模块反馈ACK信号;The master device sends a byte count code, and the SMBus slave digital module feeds back an ACK signal;
master设备发送读写地址,SMBus slave数字模块反馈ACK信号;The master device sends the read/write address, and the SMBus slave digital module feeds back an ACK signal;
若设备地址中的读写位1则表明要进行读操作,SMBus slave数字模块反馈ACK信号;If the read/write bit in the device address is 1, it indicates that a read operation is to be performed, and the SMBus slave digital module feeds back an ACK signal;
AHB_CTRL控制部件根据master设备发送的读写地址向多个片内模块发起读请求得到读数据。The AHB_CTRL control component initiates read requests to multiple on-chip modules to obtain read data based on the read and write addresses sent by the master device.
若命令码中的校验位为1,则master设备发出校验码,SMBus slave数字模块反馈ACK信号。If the check bit in the command code is 1, the master device sends a check code and the SMBus slave digital module feeds back an ACK signal.
值得说明的是,本申请实施例提出的SMBus slave数字模块能够支持多种访问格式,片外SMBus设备能够通过下发不同的命令码(command code)来决定访问1个word(32bits)、2个word(64bits)、4个word(128bits)或者是多个word,请参考图4,图4示出了master设备读取SMBus slave数字模块中的寄存器1个word示意图,并结合表1,表1示出了命令代码(command code)对应的字段。It is worth noting that the SMBus slave digital module proposed in the embodiment of the present application can support multiple access formats. The off-chip SMBus device can decide to access 1 word (32 bits), 2 words (64 bits), 4 words (128 bits) or multiple words by issuing different command codes. Please refer to Figure 4, which shows a schematic diagram of a master device reading a register 1 word in the SMBus slave digital module, and combined with Table 1, Table 1 shows the fields corresponding to the command code.
表1Table 1
图4中的白色背景数据是master设备下发的,灰色背景数据是SMBus slave数字模块反馈给master设备的。表2示出了另一种命令代码(command code)对应的字段:The white background data in Figure 4 is sent by the master device, and the gray background data is fed back to the master device by the SMBus slave digital module. Table 2 shows the fields corresponding to another command code:
表2Table 2
结合图4、表1以及表2,接下来以FUCTION=3’b110为例,其访问格式的流程如下:In combination with FIG. 4 , Table 1 and Table 2, taking FUCTION=3'b110 as an example, the access format flow is as follows:
1、master设备发起START启动指令使得SMBus slave数字模块启动;1. The master device initiates the START command to start the SMBus slave digital module;
2、master设备将设备地址slave address(7’h20)至SMBus slave数字模块,SMBusslave数字模块向master设备反馈ACK信号;2. The master device sends the device address slave address (7'h20) to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal to the master device;
3、由于读写位(W/R位)为0则表明要进行写操作,此时master设备发送8位命令码(command code),命令码的第0位END位为0,第1位START位为1,表示跨多个事务的命令中的第一个事务,第2位至第4位表示FUCTION=010进行短格式读字操作,第7位PEC校验为1,master设备发出校验码,SMBus slave数字模块反馈ACK信号;3. Since the read/write bit (W/R bit) is 0, it indicates that a write operation is to be performed. At this time, the master device sends an 8-bit command code. The 0th END bit of the command code is 0, and the 1st START bit is 1, indicating the first transaction in a command across multiple transactions. The 2nd to 4th bits indicate FUCTION = 010 for a short format read word operation. The 7th PEC check is 1, the master device sends a check code, and the SMBus slave digital module feeds back an ACK signal.
4、master设备发送8位字节计数码(byte count)至SMBus slave数字模块,SMBusslave数字模块反馈ACK信号;4. The master device sends an 8-bit byte count code (byte count) to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal;
5、master设备发送4个8位读写地址(offset byte)至SMBus slave数字模块,SMBus slave数字模块每接收到1个8位读写地址便反馈ACK信号;5. The master device sends four 8-bit read/write addresses (offset bytes) to the SMBus slave digital module. The SMBus slave digital module feeds back an ACK signal each time it receives an 8-bit read/write address.
6、由于master设备发送8位命令码中第7位PEC校验为1,master设备继续向SMBusslave数字模块发出8位pec校验码,SMBus slave数字模块反馈ACK信号。6. Since the 7th PEC checksum in the 8-bit command code sent by the master device is 1, the master device continues to send an 8-bit pec checksum to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal.
7、master设备发送STOP指令。7. The master device sends a STOP command.
8、由于master设备发送8位命令码的第2位至第4位表示FUCTION=010进行短格式读字操作,master设备发起START启动指令使得SMBus slave数字模块启动;8. Since the second to fourth bits of the 8-bit command code sent by the master device indicate FUCTION = 010 for a short-format read operation, the master device initiates a START start command to start the SMBus slave digital module;
9、设备地址slave address(7’h20)至SMBus slave数字模块,SMBus slave数字模块向master设备反馈ACK信号;9. The device address slave address (7’h20) is sent to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal to the master device;
10、读写位(W/R位)为0则表明要进行写操作,此时master设备发送8位命令码(command code),命令码的第0位END位为1,第1位START位为0,表示横跨多个事务的命令中的最后一个事务,第2位至第4位表示FUCTION=010进行短格式读字操作,第7位PEC校验为1,master设备发出校验码,SMBus slave数字模块反馈ACK信号;10. If the read/write bit (W/R bit) is 0, it indicates that a write operation is to be performed. At this time, the master device sends an 8-bit command code. The 0th END bit of the command code is 1, and the 1st START bit is 0, indicating the last transaction in a command spanning multiple transactions. The 2nd to 4th bits indicate FUCTION = 010 for a short format read word operation. The 7th PEC check is 1, the master device sends a check code, and the SMBus slave digital module feeds back an ACK signal.
11、master设备发起START启动指令使得SMBus slave数字模块启动11. The master device initiates the START command to start the SMBus slave digital module.
12、master设备将设备地址slave address(7’h20)至SMBus slave数字模块,SMBus slave数字模块向master设备反馈ACK信号;12. The master device sends the device address slave address (7’h20) to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal to the master device;
13、读写位(W/R位)为1则表明要进行读操作,SMBus slave数字模块反馈ACK信号;13. If the read/write bit (W/R bit) is 1, it indicates that a read operation is to be performed, and the SMBus slave digital module feeds back an ACK signal;
14、SMBus slave数字模块将第5步中的4个8位读写地址(offset byte)通过AHBCTRL控制部件发起AHB读请求至chip芯片中的多个片内模块,得到对应的32位读数据RDATA并对其进行存储;14. The SMBus slave digital module sends the four 8-bit read/write addresses (offset bytes) in step 5 to multiple on-chip modules in the chip through the AHBCTRL control component, obtains the corresponding 32-bit read data RDATA and stores it;
15、SMBus slave数字模块将第4步中的8位字节计数码(byte count)发送至master设备,master设备反馈ACK信号;15. The SMBus slave digital module sends the 8-bit byte count code (byte count) in step 4 to the master device, and the master device feeds back an ACK signal;
16、SMBus slave数字模块将存储的32位读数据RDATA发送至master设备,每发送到1个8位读数据RDATA便能收到master设备反馈ACK信号。16. The SMBus slave digital module sends the stored 32-bit read data RDATA to the master device. Every time an 8-bit read data RDATA is sent, the master device will feedback an ACK signal.
17、重复步骤14,SMBus slave数字模块将32位读写地址加4,通过AHB CTRL控制部件发起AHB读请求至chip芯片中的多个片内模块,得到对应的32位读数据RDATA并对其进行存储,SMBus slave数字模块将存储的32位读数据RDATA发送至master设备,每发送到1个8位读数据RDATA便能收到master设备反馈ACK信号。17. Repeat step 14. The SMBus slave digital module adds 4 to the 32-bit read/write address, initiates an AHB read request to multiple on-chip modules in the chip through the AHB CTRL control component, obtains the corresponding 32-bit read data RDATA and stores it. The SMBus slave digital module sends the stored 32-bit read data RDATA to the master device. Every time an 8-bit read data RDATA is sent, the master device can feedback an ACK signal.
18、重复步骤14,SMBus slave数字模块将32位读写地址加8,通过AHB CTRL控制部件发起AHB读请求至chip芯片中的多个片内模块,得到对应的32位读数据RDATA并对其进行存储,SMBus slave数字模块将存储的32位读数据RDATA发送至master设备,每发送到1个8位读数据RDATA便能收到master设备反馈ACK信号。18. Repeat step 14. The SMBus slave digital module adds 8 to the 32-bit read/write address, initiates an AHB read request to multiple on-chip modules in the chip through the AHB CTRL control component, obtains the corresponding 32-bit read data RDATA and stores it. The SMBus slave digital module sends the stored 32-bit read data RDATA to the master device. Every time an 8-bit read data RDATA is sent, the master device can feedback an ACK signal.
19、重复步骤14,SMBus slave数字模块将32位读写地址加12,通过AHB CTRL控制部件发起AHB读请求至chip芯片中的多个片内模块,得到对应的32位读数据RDATA并对其进行存储,SMBus slave数字模块将存储的32位读数据RDATA发送至master设备,每发送到1个8位读数据RDATA便能收到master设备反馈ACK信号。19. Repeat step 14. The SMBus slave digital module adds 12 to the 32-bit read/write address, initiates an AHB read request to multiple on-chip modules in the chip through the AHB CTRL control component, obtains the corresponding 32-bit read data RDATA and stores it. The SMBus slave digital module sends the stored 32-bit read data RDATA to the master device. Every time an 8-bit read data RDATA is sent, the master device can feedback an ACK signal.
20、由于master设备发送8位命令码中第7位PEC校验为1,master设备继续向SMBusslave数字模块发出8位pec校验码,SMBus slave数字模块反馈ACK信号。20. Since the 7th PEC checksum in the 8-bit command code sent by the master device is 1, the master device continues to send an 8-bit pec checksum to the SMBus slave digital module, and the SMBus slave digital module feeds back an ACK signal.
21、master设备发送STOP指令。21. The master device sends a STOP command.
此外,由于FUCTION有不同的字段,图5至图9示出了不同FUCTION字段下的访问格式示意图,图5示出了function=011的访问格式示意图,master设备写SMBus slave数字模块内的寄存器1个word;图6示出了function=100的访问格式示意图,master设备连续读取SMBus slave数字模块内的寄存器2个word;图7示出了function=101的访问格式示意图,master设备连续写SMBus slave数字模块内的寄存器2个word;图8示出了function=110的访问格式示意图,master设备连续读取SMBus slave数字模块内的寄存器4个word;图9示出了function=111的访问格式示意图,master设备连续写SMBus slave数字模块内的寄存器4个word,该访问格式的流程如上述所示,在此不再进行赘述。In addition, since FUCTION has different fields, Figures 5 to 9 show schematic diagrams of access formats under different FUCTION fields. Figure 5 shows a schematic diagram of the access format of function=011, where the master device writes one word of the register in the SMBus slave digital module; Figure 6 shows a schematic diagram of the access format of function=100, where the master device continuously reads two words of the register in the SMBus slave digital module; Figure 7 shows a schematic diagram of the access format of function=101, where the master device continuously writes two words of the register in the SMBus slave digital module; Figure 8 shows a schematic diagram of the access format of function=110, where the master device continuously reads four words of the register in the SMBus slave digital module; Figure 9 shows a schematic diagram of the access format of function=111, where the master device continuously writes four words of the register in the SMBus slave digital module. The process of this access format is as shown above and will not be repeated here.
与现有技术相比,本申请实施例具有以下有益效果:Compared with the prior art, the embodiments of the present application have the following beneficial effects:
第一、本申请实施例提出的SMBus slave数字模块,使得芯片外的master设备能够访问到芯片内SMBus slave数字模块和各个片内模块中寄存器的内容,不一定要通过JTAG或者SWD接口。First, the SMBus slave digital module proposed in the embodiment of the present application enables a master device outside the chip to access the contents of the registers in the SMBus slave digital module and each on-chip module within the chip, without necessarily going through a JTAG or SWD interface.
第二、本申请实施例提出的SMBus slave数字模块能够支持多种访问格式,芯片外的master设备能够通过下发不同的命令码(command code)来决定访问1个还是多个word,有效提高SMBus读写寄存器的访问效率。Second, the SMBus slave digital module proposed in the embodiment of the present application can support multiple access formats, and the master device outside the chip can decide whether to access one or multiple words by issuing different command codes, thereby effectively improving the access efficiency of the SMBus read and write registers.
第三、由于存在AMBA 2.0规范的AHB接口,通过AHB接口传输数据,如果芯片内有其他master模块也要对芯片内的寄存器进行访问,可以配合符合AMBA 2.0规范的仲裁模块做好访问的仲裁。Third, due to the existence of the AHB interface of the AMBA 2.0 specification, data is transmitted through the AHB interface. If there are other master modules in the chip that also need to access the registers in the chip, they can cooperate with the arbitration module that complies with the AMBA 2.0 specification to perform access arbitration.
此外,本申请实施例还提供了一种SMBus slave数字模块设计装置,该装置应用于chip芯片中的SMBus slave数字模块,chip芯片与master设备连接,SMBus slave数字模块与chip芯片中的多个片内模块连接。In addition, an embodiment of the present application also provides an SMBus slave digital module design device, which is applied to the SMBus slave digital module in the chip chip, the chip chip is connected to the master device, and the SMBus slave digital module is connected to multiple on-chip modules in the chip chip.
SMBus slave数字模块接收master设备发送的设备地址、读写地址和读数据;The SMBus slave digital module receives the device address, read/write address and read data sent by the master device;
SMBus slave数字模块将读写地址和读数据转换为AHB bus总线信息;The SMBus slave digital module converts the read/write address and read data into AHB bus information;
SMBus slave数字模块根据AHB bus总线信息访问chip芯片中的多个片内模块;The SMBus slave digital module accesses multiple on-chip modules in the chip according to the AHB bus information;
SMBus slave数字模块接收多个片内模块返回的反馈数据。The SMBus slave digital module receives feedback data returned by multiple on-chip modules.
本申请实施例提供了一种计算机设备,该计算机设备可以实现本申请实施例所提供的SMBus slave数字模块设计方法任一实施例中的步骤,因此,可以实现本申请实施例所提供的SMBus slave数字模块设计方法的有益效果,详见前面的实施例,在此不再赘述。The embodiment of the present application provides a computer device, which can implement the steps in any embodiment of the SMBus slave digital module design method provided in the embodiment of the present application. Therefore, the beneficial effects of the SMBus slave digital module design method provided in the embodiment of the present application can be achieved. Please refer to the previous embodiment for details, which will not be repeated here.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。为此,本申请实施例提供一种存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本申请实施例所提供的SMBus slave数字模块设计方法中任一实施例的步骤。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium, which stores multiple instructions, and the instructions can be loaded by a processor to execute the steps of any embodiment of the SMBus slave digital module design method provided in the embodiment of the present application.
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
由于该存储介质中所存储的指令,可以执行本申请实施例所提供的任一SMBusslave数字模块设计方法实施例中的步骤,因此,可以实现本申请实施例所提供的任一SMBus slave数字模块设计方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Since the instructions stored in the storage medium can execute the steps in any SMBus slave digital module design method embodiment provided in the embodiments of the present application, the beneficial effects that can be achieved by any SMBus slave digital module design method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本申请的保护范围之内。The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211726418.1A CN116049081B (en) | 2022-12-30 | 2022-12-30 | A SMBus slave digital module design method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211726418.1A CN116049081B (en) | 2022-12-30 | 2022-12-30 | A SMBus slave digital module design method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116049081A CN116049081A (en) | 2023-05-02 |
| CN116049081B true CN116049081B (en) | 2024-05-28 |
Family
ID=86128898
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211726418.1A Active CN116049081B (en) | 2022-12-30 | 2022-12-30 | A SMBus slave digital module design method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116049081B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117057286B (en) * | 2023-10-11 | 2024-01-30 | 成都电科星拓科技有限公司 | SMBus module level verification system based on UVM and VIP |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102012979A (en) * | 2010-11-15 | 2011-04-13 | 深圳市华威世纪科技股份有限公司 | Embedded credible computing terminal |
| CN103605632A (en) * | 2013-11-18 | 2014-02-26 | 山东大学 | Method and device for communication between AXI (advanced extensible interface) bus and AHB (advanced high-performance bus) |
| CN110765032A (en) * | 2019-10-31 | 2020-02-07 | 英业达科技有限公司 | Method for reading and writing I2C memory based on system management bus interface |
| CN111984562A (en) * | 2020-09-07 | 2020-11-24 | 盛科网络(苏州)有限公司 | Method for burst access control of register, electronic device and storage medium |
| CN114564427A (en) * | 2022-03-01 | 2022-05-31 | 四川创安微电子有限公司 | Bus bridge, system and method from AHB bus to I2C bus |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10691838B2 (en) * | 2014-06-20 | 2020-06-23 | Cypress Semiconductor Corporation | Encryption for XIP and MMIO external memories |
-
2022
- 2022-12-30 CN CN202211726418.1A patent/CN116049081B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102012979A (en) * | 2010-11-15 | 2011-04-13 | 深圳市华威世纪科技股份有限公司 | Embedded credible computing terminal |
| CN103605632A (en) * | 2013-11-18 | 2014-02-26 | 山东大学 | Method and device for communication between AXI (advanced extensible interface) bus and AHB (advanced high-performance bus) |
| CN110765032A (en) * | 2019-10-31 | 2020-02-07 | 英业达科技有限公司 | Method for reading and writing I2C memory based on system management bus interface |
| CN111984562A (en) * | 2020-09-07 | 2020-11-24 | 盛科网络(苏州)有限公司 | Method for burst access control of register, electronic device and storage medium |
| CN114564427A (en) * | 2022-03-01 | 2022-05-31 | 四川创安微电子有限公司 | Bus bridge, system and method from AHB bus to I2C bus |
Non-Patent Citations (2)
| Title |
|---|
| 一种I2C总线控制器的接口设计;宋杰;陈岚;冯燕;;信息与电子工程;20100825(第04期);全文 * |
| 一种兼容SMBus协议的I2C总线控制器的设计;王芬芬;冯海英;丁柯;;电子与封装;20180920(第09期);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116049081A (en) | 2023-05-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100492334C (en) | Serial Peripheral Interface Device | |
| US7490211B2 (en) | Memory hub with integrated non-volatile memory | |
| US5649128A (en) | Multiple bus interface adapter for connection to a plurality of computer bus architectures | |
| US6167476A (en) | Apparatus, method and system for accelerated graphics port bus bridges | |
| CN108268414B (en) | SD card driver and its control method based on SPI mode | |
| JP2005050324A (en) | Interface conversion system and method | |
| WO2007005553A1 (en) | Serial ata port addressing | |
| EP1730643A2 (en) | Pvdm (packet voice data module) generic bus protocol | |
| CN106371954A (en) | 10-bit slave address-based I2C bus verification method and system | |
| CN114661651B (en) | Data access method and system | |
| CN112199040B (en) | Storage access method and intelligent processing device | |
| CN1122472A (en) | Interface circuit for CD-ROM drive | |
| CN116049081B (en) | A SMBus slave digital module design method and device | |
| JPH1055331A (en) | Programmable read and write access signal and its method | |
| US6883057B2 (en) | Method and apparatus embedding PCI-to-PCI bridge functions in PCI devices using PCI configuration header type 0 | |
| CN101911035B (en) | Bridge circuit interfacing a processor to external devices via memory address mapping | |
| CN110795373B (en) | I2C bus-to-parallel bus conversion method, terminal and storage medium | |
| KR102792263B1 (en) | Memory card and method for processing data using the card | |
| CN118656280A (en) | A consistency verification method and related device | |
| CN118151838A (en) | Memory device, flash memory controller and control method thereof | |
| JP2005520248A (en) | USB host controller | |
| CN106325377B (en) | The data processing method of Principle of External Device Extension card and I/O peripheral equipment | |
| US20050144331A1 (en) | On-chip serialized peripheral bus system and operating method thereof | |
| US11372800B2 (en) | System on chip comprising a plurality of central processing units whose mailboxes are set in tightly-coupled memories | |
| CN118363901B (en) | PCIe device, electronic component and electronic device |
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 | ||
| CP03 | Change of name, title or address |
Address after: 610096 Sichuan Province, Chengdu City, No. 399, West Section of Fucheng Avenue, Chengdu High-tech Development Zone, China (Sichuan) Free Trade Pilot Zone, Building 7, Unit 3, 14th Floor, Room 1409 Patentee after: Chengdu Xingtuo Microelectronics Technology Co.,Ltd. Country or region after: China Address before: No. 1409, 14th Floor, Unit 3, Building 7, No. 399 Fucheng Avenue West Section, High tech Zone, Chengdu City, Sichuan Province Patentee before: Chengdu CETC Xingtuo Technology Co.,Ltd. Country or region before: China |
|
| CP03 | Change of name, title or address |