Movatterモバイル変換


[0]ホーム

URL:


CN118689819A - A data processing method, system and computing device based on complex programmable logic device CPLD - Google Patents

A data processing method, system and computing device based on complex programmable logic device CPLD
Download PDF

Info

Publication number
CN118689819A
CN118689819ACN202410751588.8ACN202410751588ACN118689819ACN 118689819 ACN118689819 ACN 118689819ACN 202410751588 ACN202410751588 ACN 202410751588ACN 118689819 ACN118689819 ACN 118689819A
Authority
CN
China
Prior art keywords
hard disk
data
ubm
controller
interface
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.)
Pending
Application number
CN202410751588.8A
Other languages
Chinese (zh)
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.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies Co Ltd
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 XFusion Digital Technologies Co LtdfiledCriticalXFusion Digital Technologies Co Ltd
Priority to CN202410751588.8ApriorityCriticalpatent/CN118689819A/en
Publication of CN118689819ApublicationCriticalpatent/CN118689819A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The application provides a data processing method, a system and a computing device based on a complex programmable logic device CPLD. The CPLD is arranged on a hard disk backboard of the server, and the hard disk backboard supports a universal backboard management UBM protocol; the hard disk backboard comprises an HFC connector used for connecting with the RAID controller and a DFC connector used for connecting with the hard disk slot position, and the CPLD is respectively connected with the HFC connector and the DFC connector; under the condition that a hard disk is inserted into a hard disk slot, judging the interface type of the hard disk according to the signal level transmitted by the DFC; processing interactive data between the RAID controller and the hard disk according to the type of the hard disk interface, wherein the interactive data comprises data indicating the type of the hard disk interface, data indicating the state of the hard disk and read/write operation command data; and transmitting the processed data to a RAID controller or a hard disk to realize management of the hard disk, wherein the hard disk comprises a hard disk of an SAS/SATA/NVME interface type. Thus, a new logic function is added on the original logic chip of the hard disk backboard, and the function of the UBM protocol is realized.

Description

Translated fromChinese
一种基于复杂可编程逻辑器件CPLD的数据处理方法、系统和计算设备A data processing method, system and computing device based on complex programmable logic device CPLD

技术领域Technical Field

本发明涉及硬盘背板技术领域,尤其涉及一种基于复杂可编程逻辑器件CPLD的数据处理方法、系统和计算设备。The present invention relates to the technical field of hard disk backplanes, and in particular to a data processing method, system and computing equipment based on a complex programmable logic device (CPLD).

背景技术Background Art

随着市场需求对服务器的数据读写速率和数据可靠性要求越来越高,市场应运而生了基于RAID控制器实现对NVME硬盘进行管理的技术方案,该方案依赖满足UBM协议的硬盘背板来实现方案的落地,通用背板管理(Universal Backplane Management,简称UBM)规范提供通用背板管理主机的框架,用于确定连接SAS/SATA/NVMe硬盘的硬盘背板特性并提供访问以驱动插槽信息和控件。As the market demand for server data read and write speed and data reliability is getting higher and higher, a technical solution for managing NVME hard disks based on RAID controllers has emerged in the market. This solution relies on a hard disk backplane that meets the UBM protocol to implement the solution. The Universal Backplane Management (UBM) specification provides a framework for the universal backplane management host, which is used to determine the hard disk backplane characteristics of connected SAS/SATA/NVMe hard disks and provide access to drive slot information and controls.

相关技术中通过专有FPGA芯片实现UBM协议的功能,或者通过专有FPGA芯片加上通用输入输出(General Purpose Input/Output,简称GPIO)扩展芯片实现UBM协议的功能。然而目前实现UBM协议的芯片为专用FPGA芯片,由于需求量和芯片自身的特殊性成本并无优势,并且存在专有FPGA芯片独家供应的风险、FPGA芯片价格较高。另外专用FPGA芯片可扩展性较差,服务器厂家无法通过更改源代码的方式实现功能的差异化特性。因此,需要一种能够在硬盘背板上实现UBM协议且成本可控,供应可控的系统和方法实现UBM协议的功能。In the related art, the functions of the UBM protocol are implemented through a proprietary FPGA chip, or through a proprietary FPGA chip plus a general purpose input/output (GPIO) expansion chip. However, the chip that currently implements the UBM protocol is a dedicated FPGA chip. Due to the demand and the particularity of the chip itself, the cost has no advantage, and there is a risk of exclusive supply of proprietary FPGA chips and high prices for FPGA chips. In addition, dedicated FPGA chips have poor scalability, and server manufacturers cannot achieve differentiated functional characteristics by changing the source code. Therefore, there is a need for a system and method that can implement the UBM protocol on a hard disk backplane with controllable cost and supply to implement the functions of the UBM protocol.

发明内容Summary of the invention

针对现有技术中存在的问题,本申请实施例提供了一种基于复杂可编程逻辑器件CPLD的数据处理方法、系统和计算设备。In order to solve the problems existing in the prior art, the embodiments of the present application provide a data processing method, system and computing device based on a complex programmable logic device (CPLD).

第一方面,本申请实施例提供一种基于复杂可编程逻辑器件CPLD的数据处理方法,其中CPLD设置于服务器的硬盘背板上,硬盘背板支持通用背板管理UBM协议;硬盘背板包括用于连接RAID控制器的HFC连接器和用于连接硬盘槽位的DFC连接器,CPLD分别连接HFC连接器和DFC连接器;该方法包括:在硬盘插入硬盘槽位的情况下,根据DFC传输的信号电平判断判断硬盘的接口类型;根据硬盘接口类型处理RAID控制器和硬盘之间的交互数据,交互数据包括指示硬盘接口类型的数据,以及指示硬盘状态的数据和读/写操作命令数据;将处理后的数据传输至RAID控制器或者硬盘,以实现对硬盘的管理,硬盘包括SAS/SATA/NVME接口类型的硬盘。In a first aspect, an embodiment of the present application provides a data processing method based on a complex programmable logic device (CPLD), wherein the CPLD is arranged on a hard disk backplane of a server, and the hard disk backplane supports a universal backplane management (UBM) protocol; the hard disk backplane includes an HFC connector for connecting a RAID controller and a DFC connector for connecting a hard disk slot, and the CPLD is connected to the HFC connector and the DFC connector, respectively; the method includes: when a hard disk is inserted into the hard disk slot, judging the interface type of the hard disk according to the signal level transmitted by the DFC; processing interaction data between the RAID controller and the hard disk according to the hard disk interface type, the interaction data including data indicating the hard disk interface type, and data indicating the hard disk status and read/write operation command data; transmitting the processed data to the RAID controller or the hard disk to realize the management of the hard disk, and the hard disk includes a hard disk of SAS/SATA/NVME interface type.

在本实施例中,通过使用服务器中通常设置于硬盘背板中的CPLD,在CPLD中设置协议处理模块,以实现在UBM规范提供的背板管理框架下,基于RAID控制器实现对SAS/SATA/NVME硬盘进行管理。减少了对市场上对专有FPGA等芯片的依赖,并且无需增加CPLD尺寸,保持了硬盘背板设计紧凑。使得硬盘背板可以更加灵活地适应不同接口类型的硬盘,提升了系统的集成度。另外使用CPLD模拟UBM协议的功能,相对于专有FPGA芯片,避免了额外采购和集成专有FPGA等芯片的费用,降低了硬件成本,增强了硬盘背板的通用性和可扩展性。CPLD的可编程特性使得硬盘背板可以灵活适应不同类型的硬盘,不需要更换硬件就可以实现支持新的硬盘接口协议。通过对CPLD的软件更新就可以实现对协议升级后的支持,例如有新的硬盘接口协议出现时,可以通过升级CPLD中的逻辑代码来支持新的协议。In this embodiment, by using the CPLD that is usually set in the hard disk backplane in the server, a protocol processing module is set in the CPLD to achieve management of SAS/SATA/NVME hard disks based on the RAID controller under the backplane management framework provided by the UBM specification. The dependence on proprietary chips such as FPGA in the market is reduced, and there is no need to increase the size of the CPLD, keeping the hard disk backplane design compact. The hard disk backplane can be more flexibly adapted to hard disks of different interface types, improving the integration of the system. In addition, the use of CPLD to simulate the function of the UBM protocol avoids the cost of additional procurement and integration of proprietary chips such as FPGA, reduces hardware costs, and enhances the versatility and scalability of the hard disk backplane. The programmable characteristics of the CPLD enable the hard disk backplane to flexibly adapt to different types of hard disks, and support for new hard disk interface protocols can be achieved without replacing hardware. Support for upgraded protocols can be achieved by updating the software of the CPLD. For example, when a new hard disk interface protocol appears, the new protocol can be supported by upgrading the logic code in the CPLD.

在一些可能的示例中,CPLD包括SAS/SATA协议处理模块和UBM协议处理模块;根据硬盘接口类型处理RAID控制器和硬盘之间的交互数据,包括:当硬盘接口类型为SAS/SATA时,使用SAS/SATA协议处理模块处理来自RAID控制器和第一硬盘的交互数据,第一硬盘包括SAS/SATA接口类型的硬盘;当硬盘接口类型为NVME时,使用UBM协议处理模块处理来自RAID控制器和第二硬盘的交互数据,第二硬盘包括NVME接口类型的硬盘;UBM协议处理模块按照UBM协议处理所述交互数据。In some possible examples, the CPLD includes a SAS/SATA protocol processing module and a UBM protocol processing module; the interaction data between the RAID controller and the hard disk is processed according to the hard disk interface type, including: when the hard disk interface type is SAS/SATA, the SAS/SATA protocol processing module is used to process the interaction data from the RAID controller and the first hard disk, and the first hard disk includes a hard disk of the SAS/SATA interface type; when the hard disk interface type is NVME, the UBM protocol processing module is used to process the interaction data from the RAID controller and the second hard disk, and the second hard disk includes a hard disk of the NVME interface type; the UBM protocol processing module processes the interaction data according to the UBM protocol.

在本实施例中,在CPLD的协议处理模块中,分别通过SAS/SATA协议处理模块和UBM协议处理模块对SAS/SATA硬盘和NVME硬盘进行处理,其中通过编程实现UBM协议处理模块,按照UBM协议处理RAID控制器NVME硬盘之间的交互数据,确保数据传输和状态管理的准确性和一致性。In this embodiment, in the protocol processing module of the CPLD, the SAS/SATA hard disk and the NVME hard disk are processed respectively by the SAS/SATA protocol processing module and the UBM protocol processing module, wherein the UBM protocol processing module is implemented by programming, and the interactive data between the RAID controller NVME hard disk is processed according to the UBM protocol to ensure the accuracy and consistency of data transmission and status management.

在一些可能的示例中,UBM协议处理模块包括多个UBM控制器,RAID控制器通过HFC连接器连接至少一个UBM控制器,UBM控制器连接至少一个DFC连接器;使用UBM协议处理模块处理来自第二硬盘的交互数据,包括:目标UBM控制器接收RAID控制器发送的交互数据;目标UBM控制器为多个UBM控制器中的一个;交互数据包括多个字段,多个字段包括以下中的一个或多个:读/写数据使能位、读/写数据地址位、命令位、待写数据位;利用UBM协议对交互数据进行解析得到多个接口数据;所述多个接口数据包括以下中的一个或多个:第一接口数据,第一接口数据指示读数据使能;第二接口数据,所述第二接口数据指示读/写数据地址;第三接口数据,第三接口数据指示写数据使能;第四接口数据,第四接口数据指示操作命令;第五接口数据,第五接口数据指示待写数据;读取至少第一接口数据至第五接口数据中至少一个接口数据的值,对至少第一接口数据至第五接口数据中至少一个接口数据的值进行解析,发送解析后的命令到第二硬盘连接的DFC连接器。In some possible examples, the UBM protocol processing module includes multiple UBM controllers, the RAID controller is connected to at least one UBM controller via an HFC connector, and the UBM controller is connected to at least one DFC connector; the UBM protocol processing module is used to process the interactive data from the second hard disk, including: the target UBM controller receives the interactive data sent by the RAID controller; the target UBM controller is one of the multiple UBM controllers; the interactive data includes multiple fields, and the multiple fields include one or more of the following: read/write data enable bit, read/write data address bit, command bit, and data to be written bit; the interactive data is parsed using the UBM protocol to obtain multiple interface data; the multiple interface data include one or more of the following: first interface data, the first interface data indicates read data enable; second interface data, the second interface data indicates read/write data address; third interface data, the third interface data indicates write data enable; fourth interface data, the fourth interface data indicates an operation command; fifth interface data, the fifth interface data indicates data to be written; read the value of at least one interface data from the first interface data to the fifth interface data, parse the value of at least one interface data from the first interface data to the fifth interface data, and send the parsed command to the DFC connector connected to the second hard disk.

在本实施例中,通过在UBM协议处理模块中设置多个UBM控制器,以通过多个UBM控制器上行连接RAID控制器,下行连接各种类型的硬盘。由UBM控制器实现对RAID控制器通过HFC连接器发送的交互数据的解析。通过设置多个UBM控制器,系统可以并发处理多个硬盘的交互数据,提高了交互数据的处理效率和系统的响应速度。交互数据包括多个字段,使得命令和数据的传输更加灵活,根据具体需求还可以扩展或者修改命令字段,确保每个操作的精确下发和执行。读取并解析得到接口数据,进而生成具体的操作命令,提高了系统的自动化程度,减少了人工干预。In this embodiment, multiple UBM controllers are set in the UBM protocol processing module to connect the RAID controller upstream and various types of hard disks downstream. The UBM controller implements the parsing of the interactive data sent by the RAID controller through the HFC connector. By setting multiple UBM controllers, the system can process the interactive data of multiple hard disks concurrently, improving the processing efficiency of interactive data and the response speed of the system. The interactive data includes multiple fields, making the transmission of commands and data more flexible. The command field can also be expanded or modified according to specific needs to ensure the accurate issuance and execution of each operation. The interface data is read and parsed to generate specific operation commands, thereby improving the automation of the system and reducing manual intervention.

在一些可能的示例中,交互数据中的多个字段还包括UBM控制器地址位,UBM控制器地址位用于确定目标UBM控制器;目标UBM控制器接收RAID控制器发送的交互数据,包括:RAID控制器通过串行数据总线发送交互数据到UBM控制器,基于交互数据中的UBM控制器地址位确定目标UBM控制器,包括:基于地址标识和UBM控制器地址位指示的地址标识比较结果为一致,确定至少一个UBM控制器中的一个UBM控制器为目标UBM控制器;至少一个UBM控制器中的每一个UBM控制器拥有唯一的地址标识。In some possible examples, multiple fields in the interaction data also include a UBM controller address bit, and the UBM controller address bit is used to determine the target UBM controller; the target UBM controller receives the interaction data sent by the RAID controller, including: the RAID controller sends the interaction data to the UBM controller via a serial data bus, and determines the target UBM controller based on the UBM controller address bit in the interaction data, including: based on the address identifier and the address identifier indicated by the UBM controller address bit being consistent, determining that one UBM controller in at least one UBM controller is the target UBM controller; each UBM controller in the at least one UBM controller has a unique address identifier.

在本实施例中,通过在交互数据设置UBM控制器的地址位,RAID控制器可以准确确定目标UBM控制器;每个UBM控制器拥有唯一的地址标识,可以在多个UBM控制器环境下防止地址冲突和数据传输错误。并且系统可以扩展新的UBM控制器而不会引起地址冲突。In this embodiment, by setting the address bit of the UBM controller in the interactive data, the RAID controller can accurately determine the target UBM controller; each UBM controller has a unique address identifier, which can prevent address conflicts and data transmission errors in multiple UBM controller environments. In addition, the system can expand new UBM controllers without causing address conflicts.

在一些可能的示例中,UBM协议处理模块还包括FRU,FRU存储硬盘背板的初始配置信息,初始配置信息包括多个UBM控制器和HFC连接器、DFC连接器的映射关系。In some possible examples, the UBM protocol processing module further includes a FRU, and the FRU stores initial configuration information of the hard disk backplane, where the initial configuration information includes a mapping relationship between multiple UBM controllers and HFC connectors and DFC connectors.

在本实施例中,通过FRU存储初始配置信息,使得系统在启动时无需重新配置各个UBM控制器和接口的映射关系,提高了系统的初始化速度,缩短了启动时间。FRU存储的配置信息确保了系统在重新启动或硬件更换后可以快速恢复到之前的配置状态。并且可以方便的扩展和添加新的硬盘和UBM控制器。In this embodiment, the initial configuration information is stored in the FRU, so that the system does not need to reconfigure the mapping relationship between each UBM controller and interface when starting up, which improves the initialization speed of the system and shortens the startup time. The configuration information stored in the FRU ensures that the system can be quickly restored to the previous configuration state after restarting or hardware replacement. It can also easily expand and add new hard disks and UBM controllers.

在一些可能的示例中,该方法还包括:目标UBM控制器返回交互数据处理结果到RAID控制器,处理结果指示对交互数据执行结果为成功或失败;基于执行结果成功,RAID控制器发送下一条交互数据;基于执行结果失败,RAID控制器例如记录日志或执行错误处理流程通知RAID控制器处理错误。In some possible examples, the method also includes: the target UBM controller returns the interactive data processing result to the RAID controller, and the processing result indicates whether the execution result of the interactive data is successful or failed; based on the successful execution result, the RAID controller sends the next interactive data; based on the failed execution result, the RAID controller, for example, records a log or executes an error handling process to notify the RAID controller to handle the error.

在本实施例中,通过执行成功和失败的指示,系统能够及时检测并处理异常情况,增强了系统的稳定性和可维护性。In this embodiment, by indicating success and failure, the system can detect and handle abnormal situations in a timely manner, thereby enhancing the stability and maintainability of the system.

在一些可能的示例中,该方法还包括:将处理后的数据传输至硬盘对应的硬盘指示灯以实现对硬盘指示灯的管理。In some possible examples, the method further includes: transmitting the processed data to a hard disk indicator light corresponding to the hard disk to manage the hard disk indicator light.

在本实施例中,通过将处理后的数据传输至硬盘对应的硬盘指示灯,系统可以即时显示硬盘的状态(如正常运行、存在、加载失败等)。In this embodiment, by transmitting the processed data to the hard disk indicator light corresponding to the hard disk, the system can instantly display the status of the hard disk (such as normal operation, existence, loading failure, etc.).

在一些可能的示例中,该方法还包括:第一硬盘和第二硬盘的硬盘指示灯通过同一组信号线进行控制。In some possible examples, the method further includes: hard disk indicator lights of the first hard disk and the second hard disk are controlled through the same set of signal lines.

在一些可能的示例中,该方法还包括:硬盘指示灯通过DFC连接器连接硬盘背板。DFC连接器通过复用的线路连接硬盘指示灯。In some possible examples, the method further includes: the hard disk indicator light is connected to the hard disk backplane via a DFC connector. The DFC connector is connected to the hard disk indicator light via a multiplexed line.

第二方面,本申请实施例提供一种基于复杂可编程逻辑器件CPLD的数据处理系统,CPLD设置于服务器的硬盘背板上,硬盘背板包括用于连接RAID控制器的HFC连接器和用于连接硬盘槽位的DFC连接器;该系统包括:协议处理模块,用于根据硬盘接口类型处理RAID控制器和硬盘之间的交互数据,将处理后的数据传输至RAID控制器或者硬盘,以实现对硬盘的管理,所述硬盘包括SAS/SATA/NVME接口类型的硬盘。In the second aspect, an embodiment of the present application provides a data processing system based on a complex programmable logic device CPLD, wherein the CPLD is arranged on a hard disk backplane of a server, and the hard disk backplane includes an HFC connector for connecting a RAID controller and a DFC connector for connecting a hard disk slot; the system includes: a protocol processing module, for processing interactive data between the RAID controller and the hard disk according to the hard disk interface type, and transmitting the processed data to the RAID controller or the hard disk to realize the management of the hard disk, wherein the hard disk includes a hard disk of a SAS/SATA/NVME interface type.

在一些可能的示例中,协议处理模块包括:SAS/SATA协议处理模块,用于当硬盘接口类型为SAS/SATA时,处理RAID控制器和第一硬盘的交互数据,第一硬盘包括SAS/SATA接口类型的硬盘;UBM协议处理模块,用于当硬盘接口类型为NVME时,利用UBM协议处理来自RAID控制器和第二硬盘的交互数据,第二硬盘包括NVME接口类型的硬盘;UBM协议处理模块按照UBM协议处理所述交互数据。In some possible examples, the protocol processing module includes: a SAS/SATA protocol processing module, which is used to process the interaction data between the RAID controller and the first hard disk when the hard disk interface type is SAS/SATA, and the first hard disk includes a hard disk of the SAS/SATA interface type; a UBM protocol processing module, which is used to process the interaction data from the RAID controller and the second hard disk using the UBM protocol when the hard disk interface type is NVME, and the second hard disk includes a hard disk of the NVME interface type; the UBM protocol processing module processes the interaction data according to the UBM protocol.

在一些可能的示例中,UBM协议处理模块包括:多个UBM控制器,多个UBM控制器中的每一个通过HFC连接器连接RAID控制器,通过DFC连接器连接硬盘槽位,每一个UBM控制器包括:数据接收模块,用于通过串行数据总线接收所述RAID控制器发送的交互数据,并对交互数据进行处理得到多个接口数据;命令解析模块,用于获取多个接口数据进行解析得到第一命令和第二命令;命令执行模块,用于将第一命令发送到所述UBM控制器连接的DFC连接器;第二命令发送到UBM控制器连接的第二硬盘的硬盘指示灯;第二硬盘包括NVME接口类型的硬盘。In some possible examples, the UBM protocol processing module includes: multiple UBM controllers, each of the multiple UBM controllers is connected to the RAID controller through an HFC connector, and is connected to the hard disk slot through a DFC connector, and each UBM controller includes: a data receiving module, which is used to receive the interactive data sent by the RAID controller through a serial data bus, and process the interactive data to obtain multiple interface data; a command parsing module, which is used to obtain the multiple interface data for parsing to obtain a first command and a second command; a command execution module, which is used to send the first command to the DFC connector connected to the UBM controller; the second command is sent to the hard disk indicator light of the second hard disk connected to the UBM controller; the second hard disk includes an NVME interface type hard disk.

在本实施例中,通过把交互数据进行处理的过程分为多个处理阶段,完成了每个阶段数据处理的闭环操作,也即在每个实现模块内部的信息流解析处理自闭环。这种结构化的处理方式提高了数据处理效率,减少了等待时间。确保了数据处理过程中各个阶段的稳定性和一致性。即使某个模块出现故障,其他模块也能继续正常工作,提高了系统的稳定性。每个模块在独立闭环内完成数据处理,减少了数据在多个模块之间传输带来的误差和延迟。In this embodiment, by dividing the process of processing interactive data into multiple processing stages, a closed-loop operation of data processing in each stage is completed, that is, the information flow parsing processing in each implementation module is self-closed. This structured processing method improves data processing efficiency and reduces waiting time. It ensures the stability and consistency of each stage in the data processing process. Even if a module fails, other modules can continue to work normally, which improves the stability of the system. Each module completes data processing in an independent closed loop, reducing the errors and delays caused by data transmission between multiple modules.

第三方面,本申请实施例提供一种计算设备,包括:硬盘背板,硬盘背板上包括CPLD,CPLD用于模拟UBM控制器,UBM控制器执行如第一方面和第二方面中任一项所述的数据处理方法;RAID控制器,与计算设备的UBM控制器连接,RAID控制器用于:生成硬盘的控制信息和硬盘指示灯的控制信息,并发送给目标UBM控制器;目标UBM控制器用于对硬盘的控制信息和硬盘指示灯的控制信息进行解析,得到控制命令发送到目标硬盘连接的DFC连接器和目标硬盘指示灯。In a third aspect, an embodiment of the present application provides a computing device, including: a hard disk backplane, the hard disk backplane includes a CPLD, the CPLD is used to simulate a UBM controller, the UBM controller executes a data processing method as described in any one of the first and second aspects; a RAID controller, connected to the UBM controller of the computing device, the RAID controller is used to: generate control information of the hard disk and control information of the hard disk indicator light, and send it to a target UBM controller; the target UBM controller is used to parse the control information of the hard disk and the control information of the hard disk indicator light, and obtain a control command to send to a DFC connector connected to the target hard disk and a target hard disk indicator light.

可以理解的是,上述第二方面和第三方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that the beneficial effects of the second and third aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请实施例提供的一种计算设备200的系统架构示意图;FIG1 is a schematic diagram of a system architecture of a computing device 200 provided in an embodiment of the present application;

图2为本申请实施例提供的又一种计算设备200的系统架构示意图;FIG2 is a schematic diagram of a system architecture of another computing device 200 provided in an embodiment of the present application;

图3为本申请实施例提供的一种UBM协议处理模块的系统架构示意图;FIG3 is a schematic diagram of a system architecture of a UBM protocol processing module provided in an embodiment of the present application;

图4为本申请实施例提供的多个硬盘背板的UBM控制器和UBM FRU的I2C通信示意图;FIG4 is a schematic diagram of I2C communication between a UBM controller and a UBM FRU of multiple hard disk backplanes provided in an embodiment of the present application;

图5为UBM控制器的内部实现示意图;FIG5 is a schematic diagram of the internal implementation of the UBM controller;

图6为图5中UBM控制器中各个模块包括的子模块的结构示意图;FIG6 is a schematic diagram of the structure of submodules included in each module of the UBM controller in FIG5;

图7为接收模块中第一寄存器的结构示意图;FIG7 is a schematic diagram of the structure of the first register in the receiving module;

图8为命令解析模块中第二寄存器的示意图;FIG8 is a schematic diagram of a second register in a command parsing module;

图9为本申请实施例提供的多RAID控制器和多硬盘背板的UBM结构示意图;FIG9 is a schematic diagram of the UBM structure of multiple RAID controllers and multiple hard disk backplanes provided in an embodiment of the present application;

图10为本申请实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

为了便于理解本申请的技术方案,下面对本文中涉及的相关术语进行解释。In order to facilitate understanding of the technical solution of the present application, the relevant terms involved in this article are explained below.

通用背板管理(Universal Backplane Management,简称UBM)。UBM规范旨在定义一种通用的背板管理方案,以便有效地管理和监控背板上的各种硬件设备,例如硬盘等。UBM规范通常包括对硬件连接、通信协议、管理功能等方面的详细规定。RAID控制器通常位于主板上,通过背板对硬盘进行管理。Universal Backplane Management (UBM). The UBM specification aims to define a universal backplane management solution to effectively manage and monitor various hardware devices on the backplane, such as hard disks. UBM specifications usually include detailed provisions for hardware connections, communication protocols, management functions, etc. RAID controllers are usually located on the motherboard and manage hard disks through the backplane.

复杂可编程逻辑器件(complex programming logic device,简称CPLD),CPLD是一种用户根据需要而自行构造逻辑功能的数字集成电路。是借助集成开发软件平台,用原理图、硬件描述语言等方法,生成相应的目标文件,通过将代码传送到目标芯片中,实现设计的数字系统。Complex Programmable Logic Device (CPLD) is a digital integrated circuit that users can construct logic functions according to their needs. It uses integrated development software platform, schematic diagram, hardware description language and other methods to generate corresponding target files, and transfers the code to the target chip to realize the designed digital system.

硬盘背板,用于计算设备接入更多硬盘的电路板,一般用于服务器领域,也可以被用于搭建个人存储系统。硬盘背板通过线缆直接连接主板或各类转接卡,每块背板上可连接的硬盘也各不相同,一般根据数据接口种类的不同来分类背板,常见分类有串行高级技术附件(serial advanced technology attachment,SATA)背板、6G背板(例如SFF-8087)、12G(例如SFF-8643)背板。Hard disk backplane is a circuit board used to connect computing devices to more hard disks. It is generally used in the server field and can also be used to build personal storage systems. The hard disk backplane is directly connected to the motherboard or various adapter cards through cables. The hard disks that can be connected to each backplane are also different. Generally, the backplane is classified according to the type of data interface. Common classifications include serial advanced technology attachment (SATA) backplane, 6G backplane (such as SFF-8087), and 12G (such as SFF-8643) backplane.

主板:服务器的主要部件之一,主板上一般可以设置电源、中央处理器、基板管理控制器,内存储器,内存控制器,RAID控制器、以及PCIE接口等为扩展卡预留的连接器。Motherboard: One of the main components of a server. The motherboard generally houses the power supply, central processing unit, baseboard management controller, internal memory, memory controller, RAID controller, and PCIE interface, as well as connectors reserved for expansion cards.

RAID控制器:是一种专用的扩展卡,用于管理多个硬盘驱动器,实现数据存储和保护功能,通常通过插槽安装在主板的PCIE插槽上。RAID controller: A dedicated expansion card used to manage multiple hard drives to achieve data storage and protection functions. It is usually installed on the PCIE slot of the motherboard through a slot.

硬盘背板作为服务器的一种重要组成部件,用于连接硬盘与上游板卡,其中上游板卡包括服务器主板、RAID控制器等。硬盘背板还可以通过接口连接一个或多个硬盘。其中,硬盘可分为串行连接小型计算机系统接口/串行高级技术附件(Serial AttachedSmall Computer SystemInterface/Serial Advanced Technology Attachment,SAS/SATA)硬盘和非易失性内存主机控制器接口(Non-Volatile Memory Express,NVME)硬盘。硬盘种类可以是机械硬盘、固态硬盘等,固态硬盘又分为SAS/SATA/NVMe固态硬盘,SAS/SATA的接口硬盘既包括机械硬盘,又包括固态硬盘。As an important component of the server, the hard disk backplane is used to connect the hard disk to the upstream board, where the upstream board includes the server motherboard, RAID controller, etc. The hard disk backplane can also connect one or more hard disks through the interface. Among them, the hard disk can be divided into Serial Attached Small Computer System Interface/Serial Advanced Technology Attachment (SAS/SATA) hard disk and Non-Volatile Memory Express (NVME) hard disk. The hard disk type can be a mechanical hard disk, a solid-state hard disk, etc. The solid-state hard disk is further divided into SAS/SATA/NVMe solid-state hard disk. The interface hard disk of SAS/SATA includes both mechanical hard disk and solid-state hard disk.

要对SAS/SATA/NVMe硬盘进行管理,需要使用不同的链路和协议。SAS/SATA硬盘通常使用SAS或SATA协议与主板上的CPU通信,这些协议定义了数据传输、命令交互、错误处理等方面的规范,使CPU能够对硬盘进行有效的管理。NVMe硬盘使用NVMe协议进行通信。NVMe协议是一种专门为固态硬盘设计的高性能、低延迟的存储协议。相比于传统的SATA和SAS接口,NVMe通过PCIE总线进行通信,利用其高带宽和低延迟的特性,实现了更高的数据传输速率和更低的访问延迟。To manage SAS/SATA/NVMe hard drives, different links and protocols are required. SAS/SATA hard drives usually use SAS or SATA protocols to communicate with the CPU on the motherboard. These protocols define specifications for data transmission, command interaction, error handling, etc., so that the CPU can effectively manage the hard drive. NVMe hard drives use the NVMe protocol for communication. The NVMe protocol is a high-performance, low-latency storage protocol designed specifically for solid-state drives. Compared to traditional SATA and SAS interfaces, NVMe communicates through the PCIE bus, using its high bandwidth and low latency characteristics to achieve higher data transfer rates and lower access latency.

在没有使用RAID控制器的服务器中,针对SAS/SATA/NVME硬盘,硬盘背板管理方案是不一样的。如果一个硬盘背板需要同时支持SAS/SATA/NVME硬盘,那么SAS/SATA/NVME硬盘需要有单独的上行连接器,同时在硬盘背板上面,需要不同的链路来支持,背板上面需要支持两种管理方案。SAS/SATA硬盘需要通过SGPIO管理方案进行管理,NVME硬盘需要通过VPP管理方案进行管理,背板管理复杂,物料成本较高。In servers that do not use RAID controllers, the hard disk backplane management solutions are different for SAS/SATA/NVME hard disks. If a hard disk backplane needs to support SAS/SATA/NVME hard disks at the same time, the SAS/SATA/NVME hard disks need to have separate upstream connectors, and different links are needed on the hard disk backplane to support them. The backplane needs to support two management solutions. SAS/SATA hard disks need to be managed through the SGPIO management solution, and NVME hard disks need to be managed through the VPP management solution. Backplane management is complex and material costs are high.

随着市场需求对服务器的数据读写速率和数据可靠性越来越高,RAID控制器出现,一些服务器开始支持RAID(Redundant Array of Independent Disks,独立硬盘冗余阵列)管理方式。在该管理方式下,RAID控制器上行通过PCIE协议和CPU交互,下行电连接于硬盘背板,以此实现和硬盘背板的交互。As market demands for higher data read and write speeds and data reliability for servers, RAID controllers have emerged, and some servers have begun to support RAID (Redundant Array of Independent Disks) management. In this management mode, the RAID controller interacts with the CPU via the PCIE protocol upstream, and is electrically connected to the hard disk backplane downstream to achieve interaction with the hard disk backplane.

由于RAID控制器可以提高系统的数据可靠性、性能和扩展性,同时简化存储系统的管理和维护工作,通过在多个硬盘之间分布数据和校验信息,即使其中一个硬盘发生故障,系统仍然可以继续工作,不会丢失数据。Since the RAID controller can improve the system's data reliability, performance, and scalability, while simplifying the management and maintenance of the storage system, by distributing data and verification information among multiple hard disks, the system can continue to work without data loss even if one of the hard disks fails.

但是使用RAID控制器对不同类型的硬盘进行管理时,因为硬盘支持的协议不同,对SAS/SATA硬盘和NVMe硬盘管理的方式也不同。不同接口类型的硬盘需要不同的连接器和控制器,增加了系统设计的复杂性和成本。上行设备(例如RAID控制器)需要支持多个不同的协议和命令集,增加了软件开发和维护的难度。因此,为了解决不同接口类型的硬盘在同一个系统中管理和监控的复杂性,引入了UBM协议,UBM协议提供标准化的管理框架,管理和监控背板上的多种不同接口类型硬件设备。However, when using a RAID controller to manage different types of hard disks, the management methods for SAS/SATA hard disks and NVMe hard disks are different because the hard disks support different protocols. Hard disks with different interface types require different connectors and controllers, which increases the complexity and cost of system design. Uplink devices (such as RAID controllers) need to support multiple different protocols and command sets, which increases the difficulty of software development and maintenance. Therefore, in order to solve the complexity of managing and monitoring hard disks with different interface types in the same system, the UBM protocol was introduced. The UBM protocol provides a standardized management framework to manage and monitor multiple hardware devices with different interface types on the backplane.

图1为本申请实施例提供的一种计算设备200的系统架构示意图。如图1所示,计算设备200包括主板10、硬盘背板20和存储设备30。主板10包括处理器11和RAID控制器12。硬盘背板20包括面向主机的连接器(Host Facing Connector,简称HFC)21、面向硬盘的连接器(Drive Facing Connector,简称DFC)22、CPLD23以及CPLD23中的协议处理模块27。FIG1 is a schematic diagram of a system architecture of a computing device 200 provided in an embodiment of the present application. As shown in FIG1 , the computing device 200 includes a mainboard 10, a hard disk backplane 20, and a storage device 30. The mainboard 10 includes a processor 11 and a RAID controller 12. The hard disk backplane 20 includes a host-facing connector (Host Facing Connector, referred to as HFC) 21, a hard disk-facing connector (Drive Facing Connector, referred to as DFC) 22, a CPLD 23, and a protocol processing module 27 in the CPLD 23.

处理器11与RAID控制器12之间可以通过高速串行计算机扩展总线标准(Peripheral Component Interconnect Express,简称PCIE)接口进行通信连接,还可以通过其他接口进行通信连接,本申请实施例对此不进行限定。例如处理器11为RAID控制器12提供高速PCIE信号。处理器11可以为中央处理器(Central Processing Unit,简称CPU),或者可以为其他具备处理能力的器件。处理器11可向RAID控制器12发送读写命令和管理配置命令,以实现数据的读写和RAID组的管理。The processor 11 and the RAID controller 12 can be connected to each other through a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, referred to as PCIE) interface, and can also be connected to each other through other interfaces, which is not limited in the embodiment of the present application. For example, the processor 11 provides a high-speed PCIE signal to the RAID controller 12. The processor 11 can be a central processing unit (CPU), or can be other devices with processing capabilities. The processor 11 can send read and write commands and management configuration commands to the RAID controller 12 to realize the reading and writing of data and the management of the RAID group.

RAID控制器12通过CPLD23对存储设备30进行管理。CPLD23包括协议处理模块27,协议处理模块27对RAID控制器12发送的指令进行解析,然后下发到存储设备30。协议处理模块27还将监测到的存储设备30的状态信息发送到RAID控制器12,RAID控制器12可以根据存储设备30的最新状态下发相应的指令实现对存储设备30的管理。The RAID controller 12 manages the storage device 30 through the CPLD 23. The CPLD 23 includes a protocol processing module 27, which parses the instructions sent by the RAID controller 12 and then sends them to the storage device 30. The protocol processing module 27 also sends the status information of the monitored storage device 30 to the RAID controller 12, and the RAID controller 12 can send corresponding instructions according to the latest status of the storage device 30 to manage the storage device 30.

RAID控制器12可以通过高速信号线、边带信号线和HFC连接器21连接。高速信号线用于RAID控制器12和HFC连接器21之间的高速数据的传输,例如通过PCIE总线和SAS/SATA/NVME接口进行高速数据传输。边带信号线用于传输HFC连接器21和协议处理模块27之间的控制和管理信号。RAID控制器12通过高速信号线传输数据到HFC连接器21,HFC连接器21将高速信号传输到DFC连接器22,DFC连接器22最后将高速信号传输到相应存储设备30的接口,实现对存储设备30的高速数据读写操作。HFC连接器21为连接到主板的连接器,指示连接到主机的背板上的连接器组件,本申请实施例中指为连接RAID控制器的HFC连接器21。The RAID controller 12 can be connected via a high-speed signal line, a sideband signal line and an HFC connector 21. The high-speed signal line is used for high-speed data transmission between the RAID controller 12 and the HFC connector 21, for example, high-speed data transmission through a PCIE bus and a SAS/SATA/NVME interface. The sideband signal line is used to transmit control and management signals between the HFC connector 21 and the protocol processing module 27. The RAID controller 12 transmits data to the HFC connector 21 via the high-speed signal line, and the HFC connector 21 transmits the high-speed signal to the DFC connector 22, and the DFC connector 22 finally transmits the high-speed signal to the interface of the corresponding storage device 30, thereby realizing high-speed data read and write operations on the storage device 30. The HFC connector 21 is a connector connected to the mainboard, indicating a connector component connected to the backplane of the host, and in the embodiment of the present application, refers to the HFC connector 21 connected to the RAID controller.

HFC连接器21通过边带信号线和协议处理模块27连接。边带信号线例如可以传输2-Wire信号和其他类型的控制和管理信号,2-Wire信号为低速控制和管理信号,在HFC连接器21和硬盘背板20上的协议处理模块27之间,2-Wire信号例如为集成电路总线(Inter-Integrated Circuit,简称I2C)信号。The HFC connector 21 is connected to the protocol processing module 27 via a sideband signal line. The sideband signal line can transmit, for example, 2-Wire signals and other types of control and management signals. The 2-Wire signal is a low-speed control and management signal. Between the HFC connector 21 and the protocol processing module 27 on the hard disk backplane 20, the 2-Wire signal is, for example, an Inter-Integrated Circuit (I2C) signal.

RAID控制器12通过HFC连接器21将读/写指令发送到协议处理模块27。The RAID controller 12 sends the read/write instruction to the protocol processing module 27 through the HFC connector 21 .

协议处理模块27和DFC连接器22连接,指令经过协议处理模块27的处理后,发送到DFC连接器22。其中协议处理模块27通过CPLD模拟实现UBM协议的功能,具体而言,协议处理模块27负责解析和处理传输的边带信号,管理和监控硬盘的状态和操作。DFC连接器22为连接到硬盘驱动器的连接器,指示硬盘背板连接到硬盘驱动器的连接器组件,本申请实施例中指为连接硬盘的连接器。The protocol processing module 27 is connected to the DFC connector 22, and the command is sent to the DFC connector 22 after being processed by the protocol processing module 27. The protocol processing module 27 implements the function of the UBM protocol through CPLD simulation. Specifically, the protocol processing module 27 is responsible for parsing and processing the transmitted sideband signal, and managing and monitoring the status and operation of the hard disk. The DFC connector 22 is a connector connected to the hard disk drive, indicating that the hard disk backplane is connected to the connector component of the hard disk drive, and in the embodiment of the present application, it refers to the connector connected to the hard disk.

DFC连接器22和存储设备30连接,DFC连接器22将经过协议处理模块23解析后的指令发送到存储设备30。完成对存储设备30的状态控制。The DFC connector 22 is connected to the storage device 30, and the DFC connector 22 sends the instruction parsed by the protocol processing module 23 to the storage device 30, thereby completing the state control of the storage device 30.

同理,存储设备30通过DFC连接器22将包括存储设备30的类型、状态和在位信息的信号发送到协议处理模块27,RAID控制器12通过HFC连接器21获取到最新的存储设备30的包括类型、状态和在位信息的信号,发出相应的操作指令。Similarly, the storage device 30 sends a signal including the type, status and presence information of the storage device 30 to the protocol processing module 27 through the DFC connector 22, and the RAID controller 12 obtains the latest signal including the type, status and presence information of the storage device 30 through the HFC connector 21, and issues corresponding operation instructions.

需要理解的,硬盘背板20上可以配置多个HFC连接器21,每个HFC连接器21可以连接多个DFC连接器22。It should be understood that a plurality of HFC connectors 21 may be configured on the hard disk backplane 20 , and each HFC connector 21 may be connected to a plurality of DFC connectors 22 .

DFC连接器22具有标准接口,可以同时支持连接PCIE硬盘、SATA硬盘和SAS硬盘中的至少一种。至少有一个HFC连接器21支持串行总线连接。串行总线可以包括但不限于如下所示的串行总线:集成电路(Inter-IntegratedCircuit,IIC或I2C)总线、升级版的集成电路(Improved Inter Integrated Circuit,I3C)总线和串行外围设备接口(SerialPeripheral Interface,SPI)总线。The DFC connector 22 has a standard interface and can simultaneously support the connection of at least one of a PCIE hard disk, a SATA hard disk, and a SAS hard disk. At least one HFC connector 21 supports serial bus connection. The serial bus may include, but is not limited to, the following serial buses: an Inter-Integrated Circuit (IIC or I2C) bus, an Improved Inter Integrated Circuit (I3C) bus, and a Serial Peripheral Interface (SPI) bus.

存储设备30包括但不限于如下所示的一种硬盘:NVMe硬盘、固态硬盘、机械硬盘或混合硬盘等。硬盘背板20中的硬盘槽位可以支持SATA/SAS/NVME三种类型接口模式的至少一种。The storage device 30 includes but is not limited to a hard disk as follows: NVMe hard disk, solid state hard disk, mechanical hard disk or hybrid hard disk, etc. The hard disk slot in the hard disk backplane 20 can support at least one of the three types of interface modes: SATA/SAS/NVME.

硬盘背板20为支持SATA/SAS/NVME三种类型接口模式的三模Tri-mode背板。The hard disk backplane 20 is a Tri-mode backplane that supports three types of interface modes: SATA/SAS/NVME.

在一个可能的实现方式中,在一个计算设备200中,主板的数量可以为一个或多个,对应的,RAID控制器12的数量也为一个或多个。例如,在一个计算设备200中,可以包括两个主板10,每一个主板10都可以包括两个RAID控制器。In a possible implementation, in a computing device 200, the number of motherboards may be one or more, and correspondingly, the number of RAID controllers 12 may also be one or more. For example, in a computing device 200, two motherboards 10 may be included, and each motherboard 10 may include two RAID controllers.

硬盘背板20还可以包括硬盘指示灯40,协议处理模块27连接硬盘指示灯40。The hard disk backplane 20 may further include a hard disk indicator light 40 , and the protocol processing module 27 is connected to the hard disk indicator light 40 .

RAID控制器12还通过和HFC连接器21、DFC连接器22之间的高速信号传输通道,对存储设备30进行数据的高速读/写操作。The RAID controller 12 also performs high-speed read/write operations on the storage device 30 through the high-speed signal transmission channel between the HFC connector 21 and the DFC connector 22 .

本申请实施例通过使用服务器中通常设置于硬盘背板中的CPLD,在CPLD中设置协议处理模块,以实现在UBM规范提供的背板管理框架下,基于RAID控制器实现对SAS/SATA/NVME硬盘进行管理。减少了对市场上对专有FPGA等芯片的依赖,并且无需增加CPLD尺寸,保持了硬盘背板设计紧凑。使得硬盘背板可以更加灵活地适应不同接口类型的硬盘,提升了系统的集成度。另外使用CPLD模拟UBM协议的功能,相对于专有FPGA芯片,避免了额外采购和集成专有FPGA等芯片的费用,降低了硬件成本,增强了硬盘背板的通用性和可扩展性。CPLD的可编程特性使得硬盘背板可以灵活适应不同类型的硬盘,不需要更换硬件就可以实现支持新的硬盘接口协议。通过对CPLD的软件更新就可以实现对协议升级后的支持,例如有新的硬盘接口协议出现时,可以通过升级CPLD中的逻辑代码来支持新的协议。The embodiment of the present application uses the CPLD which is usually set in the hard disk backplane in the server, and sets the protocol processing module in the CPLD to realize the management of SAS/SATA/NVME hard disk based on the RAID controller under the backplane management framework provided by the UBM specification. It reduces the dependence on the proprietary FPGA and other chips in the market, and does not need to increase the size of the CPLD, so that the hard disk backplane design is compact. The hard disk backplane can be more flexibly adapted to hard disks of different interface types, and the integration of the system is improved. In addition, the use of CPLD to simulate the function of the UBM protocol avoids the cost of additional purchase and integration of proprietary FPGA and other chips compared to the proprietary FPGA chip, reduces the hardware cost, and enhances the versatility and scalability of the hard disk backplane. The programmable characteristics of the CPLD enable the hard disk backplane to flexibly adapt to different types of hard disks, and support for new hard disk interface protocols can be achieved without replacing the hardware. Support for upgraded protocols can be achieved by updating the software of the CPLD. For example, when a new hard disk interface protocol appears, the new protocol can be supported by upgrading the logic code in the CPLD.

在一个可能的实现方式中,协议处理模块27由CPLD、现场可编程门阵列FPGA等控制器实现。In a possible implementation, the protocol processing module 27 is implemented by a controller such as a CPLD or a field programmable gate array FPGA.

应该理解,在图1所示的系统架构图中,RAID控制器12、存储设备30、硬盘背板20、DFC连接器22、HFC连接器21以及硬盘指示灯40的数目仅仅是示例性的,更多或更少的数量都属于本申请的保护范畴。It should be understood that in the system architecture diagram shown in Figure 1, the number of RAID controller 12, storage device 30, hard disk backplane 20, DFC connector 22, HFC connector 21 and hard disk indicator light 40 is merely exemplary, and greater or lesser numbers fall within the protection scope of this application.

在一个可能的实现方式中,HFC连接器21为满足SFF-8643规范的连接器,该连接器通常用于连接在RAID控制器与硬盘背板之间,以实现高速数据传输和管理功能。例如该连接器可以支持PCIE X16通道。In a possible implementation, the HFC connector 21 is a connector that meets the SFF-8643 specification, which is usually used to connect between a RAID controller and a hard disk backplane to achieve high-speed data transmission and management functions. For example, the connector can support a PCIE X16 channel.

在一个可能的实现方式中,DFC连接器22可以为满足SFF-8639规范的连接器,SFF-8639是一种由SFF(Small Form Factor)委员会定义的连接器标准,用于连接固态硬盘和其他存储设备。它也被称为U.2连接器。U.2支持NVMe协议,同时兼容SAS、SATA协议规范,可连接SAS、SATA以及NVME不同类型的硬盘。In a possible implementation, the DFC connector 22 may be a connector that meets the SFF-8639 specification, which is a connector standard defined by the SFF (Small Form Factor) committee for connecting solid-state drives and other storage devices. It is also called a U.2 connector. U.2 supports the NVMe protocol and is compatible with SAS and SATA protocol specifications, and can connect different types of hard drives such as SAS, SATA, and NVME.

示例的,RAID控制器12具有X16通道,和RAID控制器12连接的HFC连接器21有两个,每个HFC连接器21具有X8通道,其中每一个HFC连接器21连接四个DFC连接器,每个DFC22拥有X2通道,用于连接到硬盘背板上,接收从RAID控制器12传输过来的数据,并将数据传输给连接的硬盘。每个DFC连接器22可以连接一个硬盘。那么每个硬盘拥有X2通道,用于接收从DFC连接器22传输过来的数据,并对硬盘数据进行读/写操作。For example, the RAID controller 12 has an X16 channel, and there are two HFC connectors 21 connected to the RAID controller 12, each HFC connector 21 has an X8 channel, wherein each HFC connector 21 is connected to four DFC connectors, and each DFC22 has an X2 channel for connecting to the hard disk backplane, receiving data transmitted from the RAID controller 12, and transmitting the data to the connected hard disk. Each DFC connector 22 can be connected to a hard disk. Then each hard disk has an X2 channel for receiving data transmitted from the DFC connector 22 and performing read/write operations on the hard disk data.

HFC连接器21提供的通道数会受到连接的硬盘类型和数量的影响。例如HFC连接器21为SFF-8639连接器。该连接器包括6个通道,其中4个PCIE通道支持连接NVME硬盘,另外两个通道可以连接SAS/SATA硬盘。其最大可支持到PCIE X4(Lane0/1/2/3)的带宽,如果插入硬盘为PCIE X1时,使用SFF-8639接口上的Lane0;如果插入硬盘为PCIE X2硬盘时,使用SFF-8639接口上的Lane0/1;如果插入硬盘为PCIE X4时,使用SFF-8639接口上的Lane0/1/2/3/4。因此设计时应根据背板所需要的硬盘类型和数量来确定HFC连接器21所需的通道数。The number of channels provided by the HFC connector 21 will be affected by the type and number of hard disks connected. For example, the HFC connector 21 is an SFF-8639 connector. This connector includes 6 channels, of which 4 PCIE channels support the connection of NVME hard disks, and the other two channels can connect SAS/SATA hard disks. It can support a maximum bandwidth of PCIE X4 (Lane0/1/2/3). If the inserted hard disk is a PCIE X1, use Lane0 on the SFF-8639 interface; if the inserted hard disk is a PCIE X2 hard disk, use Lane0/1 on the SFF-8639 interface; if the inserted hard disk is a PCIE X4, use Lane0/1/2/3/4 on the SFF-8639 interface. Therefore, when designing, the number of channels required by the HFC connector 21 should be determined based on the type and number of hard disks required by the backplane.

在本申请实施例中,计算设备200可以为但不限于如下所示的设备:服务器、平板电脑、手提电脑、台式计算机和膝上型便携计算机等。服务器可以为但不限于如下所示的设备:高密服务器、机架服务器、GPU服务器、塔式服务器、刀片服务器和整机柜服务器。RAID控制器12可以为相关技术中可以用于对硬盘进行管理的任意一种控制器。In the embodiment of the present application, the computing device 200 may be, but is not limited to, the following devices: a server, a tablet computer, a laptop, a desktop computer, and a portable laptop computer. The server may be, but is not limited to, the following devices: a high-density server, a rack server, a GPU server, a tower server, a blade server, and a whole cabinet server. The RAID controller 12 may be any controller in the related art that can be used to manage a hard disk.

图2为本申请实施例提供的又一种计算设备200的系统架构示意图。图2和图1的不同之处在于,图2中的CPLD控制器23中的协议处理模块27包括SAS/SATA协议处理模块25和UBM协议处理模块26,根据存储设备30的类型,对不同类型的存储设备通过不同的通道进行处理。本申请实施例使用硬盘背板上的CPLD实现UBM协议的功能,通过UBM协议解析模块26使用UBM协议对CPLD与NVME硬盘之间传输的数据进行解析,实现RAID控制器对NVME硬盘的管理。同时SAS/SATA协议处理模块25使用例如SAS/SATA协议对CPLD和SAS/SATA硬盘之间传输的数据进行解析,实现RAID控制器对SAS/SATA硬盘的管理。由此将RAID控制器12对SAS/SATA硬盘和NVME硬盘处理的链路统一在CPLD中实现,简化了处理逻辑,减少了占用硬盘背板的空间。FIG. 2 is a schematic diagram of the system architecture of another computing device 200 provided in an embodiment of the present application. The difference between FIG. 2 and FIG. 1 is that the protocol processing module 27 in the CPLD controller 23 in FIG. 2 includes a SAS/SATA protocol processing module 25 and a UBM protocol processing module 26, and different types of storage devices are processed through different channels according to the type of the storage device 30. The embodiment of the present application uses the CPLD on the hard disk backplane to implement the function of the UBM protocol, and the UBM protocol parsing module 26 uses the UBM protocol to parse the data transmitted between the CPLD and the NVME hard disk, so as to realize the management of the NVME hard disk by the RAID controller. At the same time, the SAS/SATA protocol processing module 25 uses, for example, the SAS/SATA protocol to parse the data transmitted between the CPLD and the SAS/SATA hard disk, so as to realize the management of the SAS/SATA hard disk by the RAID controller. Thus, the links processed by the RAID controller 12 for the SAS/SATA hard disk and the NVME hard disk are unified in the CPLD, which simplifies the processing logic and reduces the space occupied by the hard disk backplane.

如图2所示,RAID控制器12通过对DFC_IFDET信号进行采样,确定与硬盘背板20的连接的硬盘的接口类型,根据硬盘的接口类型,确定和硬盘背板20进行通信的信号类型。As shown in FIG. 2 , the RAID controller 12 determines the interface type of the hard disk connected to the hard disk backplane 20 by sampling the DFC_IFDET signal, and determines the signal type for communicating with the hard disk backplane 20 according to the interface type of the hard disk.

RAID控制器12通过I2C协议将交互数据传输到硬盘背板20,硬盘背板20根据插接的硬盘的接口类型选择SAS/SATA协议处理模块或UBM协议处理模块26,再将数据传输到硬盘。请参阅图2,RAID控制器12通过高速通道(如PCIE通道)发送高速信号到HFC21,高速信号经过HFC21传输到DFC22,最终到达存储设备30。RAID控制器12通过例如I2C协议发送交互数据到硬盘背板20,HFC21接收来自RAID控制器12的I2C信号,并将其传递给硬盘背板20上的信号判断模块28。信号判断模块28接收IFDET信号,判断硬盘类型,并选择SAS/SATA协议处理模块25或者UBM协议处理模块26进行处理。The RAID controller 12 transmits interactive data to the hard disk backplane 20 through the I2C protocol. The hard disk backplane 20 selects the SAS/SATA protocol processing module or the UBM protocol processing module 26 according to the interface type of the plugged hard disk, and then transmits the data to the hard disk. Please refer to Figure 2. The RAID controller 12 sends a high-speed signal to HFC21 through a high-speed channel (such as a PCIE channel). The high-speed signal is transmitted to DFC22 through HFC21 and finally reaches the storage device 30. The RAID controller 12 sends interactive data to the hard disk backplane 20 through, for example, the I2C protocol. HFC21 receives the I2C signal from the RAID controller 12 and passes it to the signal judgment module 28 on the hard disk backplane 20. The signal judgment module 28 receives the IFDET signal, judges the hard disk type, and selects the SAS/SATA protocol processing module 25 or the UBM protocol processing module 26 for processing.

DFC_IFDET信号为硬盘背板上的信号,用于指示连接的硬盘使用的通信接口类型,接口类型例如包括SGPIO、2-Wire(I2C)或其他类型。I2C是一种串行总线标准,通常也被称为2-Wire总线,使用两条信号线(串行数据线和串行时钟线)传输数据。通过检测DFC_IFDET信号的状态,系统可以确定硬盘的通信接口类型。The DFC_IFDET signal is a signal on the hard disk backplane that indicates the type of communication interface used by the connected hard disk. The interface type includes, for example, SGPIO, 2-Wire (I2C), or other types. I2C is a serial bus standard, also commonly known as the 2-Wire bus, which uses two signal lines (serial data line and serial clock line) to transmit data. By detecting the state of the DFC_IFDET signal, the system can determine the communication interface type of the hard disk.

例如DFC_IFDET信号为低电平,指示硬盘背板连接串行通用输入输出(SerialGeneral Purpose Input/Output,英文简称SGPIO)信号,该信号是一种用于SAS/SATA硬盘接口的通用输入/输出信号。RAID控制器识别出硬盘背板通过SGPIO信号进行通信,则通过SAS/SATA协议处理模块25对RADI控制器12和SAS/SATA硬盘之间传输的数据,按照SAS/SATA协议进行解析。具体而言,RAID控制器12通过HFC21发送边带信号到SAS/SATA协议处理模块25,边带信号被封装成SAS/SATA协议可以识别的格式,包括命令以及必要的控制数据。SAS/SATA协议处理模块25根据SAS/SAATA协议规范解析该交互数据,并将解析后的命令发送到DFC22。DFC22将该命令发送到连接的SAS/SATA硬盘(第一硬盘)和SAS/SATA硬盘的硬盘指示灯,以实现对SAS/SATA硬盘(第一硬盘)和SAS/SATA硬盘的硬盘指示灯的控制。SAS/SATA协议处理模块可以也通过SGPIO向RAID控制器12发送SAS/SATA硬盘(第一硬盘)的状态信息。For example, the DFC_IFDET signal is low, indicating that the hard disk backplane is connected to the serial general purpose input/output (Serial General Purpose Input/Output, English abbreviation SGPIO) signal, which is a general input/output signal for the SAS/SATA hard disk interface. The RAID controller recognizes that the hard disk backplane communicates through the SGPIO signal, and then parses the data transmitted between the RADI controller 12 and the SAS/SATA hard disk according to the SAS/SATA protocol through the SAS/SATA protocol processing module 25. Specifically, the RAID controller 12 sends a sideband signal to the SAS/SATA protocol processing module 25 through HFC21, and the sideband signal is encapsulated into a format that can be recognized by the SAS/SATA protocol, including commands and necessary control data. The SAS/SATA protocol processing module 25 parses the interactive data according to the SAS/SAATA protocol specification and sends the parsed command to DFC22. DFC22 sends the command to the hard disk indicator light of the connected SAS/SATA hard disk (first hard disk) and the SAS/SATA hard disk to achieve control of the hard disk indicator light of the SAS/SATA hard disk (first hard disk) and the SAS/SATA hard disk. The SAS/SATA protocol processing module may also send the status information of the SAS/SATA hard disk (the first hard disk) to the RAID controller 12 through the SGPIO.

例如DFC_IFDET信号为高电平,指示硬盘背板使用2-Wire协议进行通信,RAID控制器通过UBM协议处理模块26和硬盘背板20进行通信。RAID控制器12通过使用2-Wire协议规范的信号来控制和管理连接的NVME硬盘。例如监视硬盘驱动器的状态,控制硬盘指示灯的状态,以及检测热插拔事件等。当RAID控制器12执行磁盘阵列重建、数据恢复、硬盘背板的状态信息的读取、硬盘状态的获取、上下电的控制、故障盘的监控、硬盘状态灯的指示、RAID信息清除、RAID重构等或者进行故障诊断时,发送2-Wire协议规范的信号来指示相应的硬盘驱动器进行读/写操作或者显示相应的状态指示灯。For example, the DFC_IFDET signal is high, indicating that the hard disk backplane uses the 2-Wire protocol for communication, and the RAID controller communicates with the hard disk backplane 20 through the UBM protocol processing module 26. The RAID controller 12 controls and manages the connected NVME hard disk by using the signal of the 2-Wire protocol specification. For example, monitor the status of the hard disk drive, control the status of the hard disk indicator light, and detect hot plug events, etc. When the RAID controller 12 performs disk array reconstruction, data recovery, reading of the status information of the hard disk backplane, acquisition of the hard disk status, control of power on and off, monitoring of the faulty disk, indication of the hard disk status light, clearing of RAID information, RAID reconstruction, etc., or performs fault diagnosis, the signal of the 2-Wire protocol specification is sent to instruct the corresponding hard disk drive to perform read/write operations or display the corresponding status indicator light.

换言之,RAID控制器12根据接收到的硬盘类型信息进行判断,如果存储设备为SAS/SATA硬盘,那么RAID控制器的和硬盘背板采用SGPIO模式通信,RAID控制器发送SGPIO信号,并将其发送到相应的SAS/SAT协议处理模块25解析处理,处理后输出SAS/SATA硬盘的控制信息和硬盘点灯信号。CPLD利用其自身的可编辑性能,将接收到的SGPIO信号转化成脚本执行。In other words, the RAID controller 12 makes a judgment based on the received hard disk type information. If the storage device is a SAS/SATA hard disk, the RAID controller and the hard disk backplane communicate in SGPIO mode. The RAID controller sends an SGPIO signal and sends it to the corresponding SAS/SAT protocol processing module 25 for parsing and processing. After processing, the SAS/SATA hard disk control information and hard disk lighting signal are output. The CPLD uses its own editable performance to convert the received SGPIO signal into a script for execution.

如果存储设备30为NVME硬盘,那么RAID控制器12的和硬盘背板20采用2-Wire模式通信,通过UBM协议处理模块26对2-Wire信号进行解析处理。从而实现对NVME硬盘状态的获取和命令的下发。If the storage device 30 is an NVME hard disk, the RAID controller 12 and the hard disk backplane 20 communicate in 2-Wire mode, and the 2-Wire signal is parsed and processed by the UBM protocol processing module 26. Thus, the NVME hard disk status is obtained and the command is sent.

在一个可能的实现方式中,可以通过添加通道选择器以实现对不同信号的处理链路。通道选择器可以位于RAID控制器12中,或位于硬盘背板20中的协议处理模块27中。在判断RAID控制器输出信号为SGPIO时,切换到SAS/SATA协议处理模块25进行数据解析;在判断RAID控制器12输出信号为2-Wire信号时,切换到本申请实施例提供的UBM协议处理模块26进行数据解析。In a possible implementation, a channel selector can be added to implement processing links for different signals. The channel selector can be located in the RAID controller 12, or in the protocol processing module 27 in the hard disk backplane 20. When it is determined that the RAID controller output signal is SGPIO, the SAS/SATA protocol processing module 25 is switched to perform data analysis; when it is determined that the RAID controller 12 output signal is a 2-Wire signal, the UBM protocol processing module 26 provided in the embodiment of the present application is switched to perform data analysis.

本申请提供的实施例在CPLD的协议处理模块中,分别通过SAS/SATA协议处理模块和UBM协议处理模块对SAS/SATA硬盘和NVME硬盘进行处理,其中通过编程实现UBM协议处理模块,按照UBM协议处理RAID控制器NVME硬盘之间的交互数据,确保数据传输和状态管理的准确性和一致性。In the embodiment provided by the present application, in the protocol processing module of the CPLD, the SAS/SATA hard disk and the NVME hard disk are processed by the SAS/SATA protocol processing module and the UBM protocol processing module respectively, wherein the UBM protocol processing module is implemented by programming, and the interactive data between the RAID controller NVME hard disk is processed according to the UBM protocol, thereby ensuring the accuracy and consistency of data transmission and status management.

图3为本申请实施例提供的一种UBM协议处理模块的系统架构示意图,如图3所示,相对于图2,图3对技术方案作了进一步的说明。在硬盘背板20中,UBM协议处理模块26包括多个UBM控制器和UBM FRU。一个UBM控制器可以对应连接一个HFC和多个DFC,多个DFC中的每个DFC连接至少一个硬盘。FIG3 is a schematic diagram of the system architecture of a UBM protocol processing module provided in an embodiment of the present application. As shown in FIG3, FIG3 further illustrates the technical solution relative to FIG2. In the hard disk backplane 20, the UBM protocol processing module 26 includes multiple UBM controllers and UBM FRUs. One UBM controller can be connected to one HFC and multiple DFCs, and each of the multiple DFCs is connected to at least one hard disk.

示例的,RAID控制器12通过四个UBM控制器实现对硬盘的管理。UBM控制器提供一个2-Wire从接口,提供背板功能以及DFC状态和控制信息。UBM信号处理模块26包括UBM控制器1和UBM FRU1,UBM控制器2和UBM FRU2,UBM控制器3和UBM FRU3,UBM控制器4和UBM FRU4。UBM控制器和UBM FRU例如可以一一对应设置。UBM控制器和UBM FRU的数量由RAID控制器提供的通道数、DFC的数量以及HFC的数量等根据具体硬件类型和需求确定,本申请实施例提供一种可能的实现方式。UBM控制器和HFC连接,用于接收RAID控制器12通过HFC发送的边带信号,例如UBM I2C、2WIRE_RESET#、CHANGE_ECTECT#等信号。HFC1和UBM控制器1、UBM FRU1连接,HFC1也和UBM控制器2、UBM FRU2连接。HFC2和UBM控制器3、UBM FRU3连接,HFC2也和UBM控制器4、UBM FRU4连接。每一组UBM控制器和UBM FRU连接到同一个2-Wire接口。UBM控制器通过2-Wire接口使用标准协议中的边带信号。For example, the RAID controller 12 implements the management of the hard disk through four UBM controllers. The UBM controller provides a 2-Wire slave interface, providing backplane functions and DFC status and control information. The UBM signal processing module 26 includes UBM controller 1 and UBM FRU1, UBM controller 2 and UBM FRU2, UBM controller 3 and UBM FRU3, UBM controller 4 and UBM FRU4. The UBM controller and the UBM FRU can be set in a one-to-one correspondence, for example. The number of UBM controllers and UBM FRUs is determined by the number of channels provided by the RAID controller, the number of DFCs, and the number of HFCs according to the specific hardware type and requirements. The embodiment of the present application provides a possible implementation method. The UBM controller is connected to the HFC to receive sideband signals sent by the RAID controller 12 through the HFC, such as UBM I2C, 2WIRE_RESET#, CHANGE_ECT# and other signals. HFC1 is connected to the UBM controller 1 and UBM FRU1, and HFC1 is also connected to the UBM controller 2 and UBM FRU2. HFC2 is connected to UBM controller 3 and UBM FRU 3, and HFC2 is also connected to UBM controller 4 and UBM FRU 4. Each set of UBM controllers and UBM FRUs is connected to the same 2-Wire interface. The UBM controller uses the sideband signal in the standard protocol through the 2-Wire interface.

示例的,边带信号为UBM1_I2C_SCL信号、UBM1_I2C_SDA信号、2WIRE_RESET信号和CHANGE_DETECT信号。For example, the sideband signals are a UBM1_I2C_SCL signal, a UBM1_I2C_SDA signal, a 2WIRE_RESET signal, and a CHANGE_DETECT signal.

硬盘背板中的FRU信息通常存储在硬盘背板上的存储器中,这个存储器可以是电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,简称EEPROM)或者是其他类型的非易失性存储器。FRU具有存储设备信息和状态的标准格式。The FRU information in the hard disk backplane is usually stored in the memory on the hard disk backplane, which can be an Electrically Erasable Programmable Read-Only Memory (EEPROM) or other types of non-volatile memory. FRU has a standard format for storing device information and status.

UBM FRU使用单字节2-Wire寻址,具体来说,UBM FRU使用0xAE进行寻址。UBM FRU记录了硬盘背板的初始配置信息,初始配置信息例如包括多个UBM控制器和HFC连接器、DFC连接器的映射关系、HFC的数量、端口、通道速率、DFC的数量、所连接的硬盘的类型和数量、UBM协议处理模块26的UBM端口路由信息等。在系统上电时,RAID控制器12读取UBM FRU中的信息,完成RAID控制器12和UBM协议处理模块26的初始化。The UBM FRU uses single-byte 2-Wire addressing. Specifically, the UBM FRU uses 0xAE for addressing. The UBM FRU records the initial configuration information of the hard disk backplane, which includes, for example, the mapping relationship between multiple UBM controllers and HFC connectors and DFC connectors, the number of HFCs, ports, channel rates, the number of DFCs, the type and number of connected hard disks, and the UBM port routing information of the UBM protocol processing module 26. When the system is powered on, the RAID controller 12 reads the information in the UBM FRU and completes the initialization of the RAID controller 12 and the UBM protocol processing module 26.

示例的,将初始配置信息写入FRU中,UBM FRU1存储UBM控制器1的初始配置信息,UBM FRU2存储UBM控制器2的初始配置信息,UBM FRU3存储UBM控制器3的初始配置信息,UBMFRU4存储UBM控制器4的初始配置信息。For example, the initial configuration information is written into the FRU, UBM FRU1 stores the initial configuration information of UBM controller 1, UBM FRU2 stores the initial configuration information of UBM controller 2, UBM FRU3 stores the initial configuration information of UBM controller 3, and UBM FRU4 stores the initial configuration information of UBM controller 4.

本申请实施例通过FRU存储初始配置信息,系统在启动时无需重新配置各个UBM控制器和接口的映射关系,提高了系统的初始化速度,缩短了启动时间。FRU存储的配置信息确保了系统在重新启动或硬件更换后可以快速恢复到之前的配置状态。并且可以方便的扩展和添加新的硬盘和UBM控制器。The embodiment of the present application stores initial configuration information through FRU, so the system does not need to reconfigure the mapping relationship between each UBM controller and interface when starting up, which improves the initialization speed of the system and shortens the startup time. The configuration information stored in FRU ensures that the system can be quickly restored to the previous configuration state after restarting or hardware replacement. It can also easily expand and add new hard disks and UBM controllers.

示例的,DFC包括DFC1-DFC8,UBM控制器1对应连接DFC1和DFC2,UBM控制器2对应连接DFC3和DFC4,UBM控制器3对应连接DFC5和DFC6,UBM控制器4对应连接DFC7和DFC8,DFC1-DFC8和NVME硬盘40-1至40-8对应连接。具体的,DFC1通过DFC1_PRSNT/DFC1_IFDET/DFC1_PERST和UBM控制器1连接,DFC2通过DFC2_PRSNT/DFC2_IFDET/DFC2_PERST和UBM控制器2连接。DFC3、DFC4、DFC5、DFC6和DFC8同理。For example, DFC includes DFC1-DFC8, UBM controller 1 is connected to DFC1 and DFC2, UBM controller 2 is connected to DFC3 and DFC4, UBM controller 3 is connected to DFC5 and DFC6, UBM controller 4 is connected to DFC7 and DFC8, and DFC1-DFC8 are connected to NVME hard disks 40-1 to 40-8. Specifically, DFC1 is connected to UBM controller 1 through DFC1_PRSNT/DFC1_IFDET/DFC1_PERST, and DFC2 is connected to UBM controller 2 through DFC2_PRSNT/DFC2_IFDET/DFC2_PERST. The same is true for DFC3, DFC4, DFC5, DFC6, and DFC8.

在一种可能的实施方式中,HFC1和UBM控制器1,HFC1和UBM控制器2,HFC2和UBM控制器3,HFC2和UBM控制器4采用I2C进行通信。I2C是一种串行通信协议,使用两条线(一条用于数据传输SDA,一条用于传输时钟信号SCL)进行通信,因此也称为2-Wire通信。In a possible implementation, HFC1 and UBM controller 1, HFC1 and UBM controller 2, HFC2 and UBM controller 3, HFC2 and UBM controller 4 communicate using I2C. I2C is a serial communication protocol that uses two wires (one for data transmission SDA and one for clock signal SCL) for communication, so it is also called 2-Wire communication.

UBM控制器1接收RAID控制器12通过HFC1发送的UBM_I2C_SDA信号和UBM_I2C_SCL信号,进行处理后,得到DFC1、DFC2的控制信号以及对DFC1和DFC2连接的硬盘指示灯DFC1_LED和DFC2_LED的控制信号。UBM控制器1输出DFC1/DFC2的控制信号发送到DFC1/DFC2、DFC1_LED/DFC2_LED。UBM controller 1 receives UBM_I2C_SDA signal and UBM_I2C_SCL signal sent by RAID controller 12 through HFC1, and after processing, obtains control signals of DFC1 and DFC2 and control signals of hard disk indicator lights DFC1_LED and DFC2_LED connected to DFC1 and DFC2. UBM controller 1 outputs control signals of DFC1/DFC2 and sends them to DFC1/DFC2 and DFC1_LED/DFC2_LED.

UBM控制器2接收RAID控制器12通过HFC1发送的UBM_I2C_SDA信号和UBM_I2C_SCL信号,进行处理后,得到DFC3、DFC4的控制信号以及对DFC3和DFC4连接的硬盘指示灯DFC3_LED和DFC4_LED的控制信号。UBM控制器2输出DFC3/DFC4的控制信号发送到DFC3/DFC4、DFC3_LED/DFC4_LED。UBM controller 2 receives UBM_I2C_SDA signal and UBM_I2C_SCL signal sent by RAID controller 12 through HFC1, and after processing, obtains control signals of DFC3 and DFC4 and control signals of hard disk indicator lights DFC3_LED and DFC4_LED connected to DFC3 and DFC4. UBM controller 2 outputs control signals of DFC3/DFC4 and sends them to DFC3/DFC4 and DFC3_LED/DFC4_LED.

UBM控制器3和UBM FRU3、UBM控制器4和UBM FRU4同理,此处不再赘述。The same applies to UBM controller 3 and UBM FRU3, and UBM controller 4 and UBM FRU4, which will not be described again here.

本申请实施例通过在UBM协议处理模块中设置多个UBM控制器,以通过多个UBM控制器上行连接RAID控制器,下行连接各种类型的硬盘。由UBM控制器实现对RAID控制器通过HFC连接器发送的交互数据的解析。通过设置多个UBM控制器,系统可以并发处理多个硬盘的交互数据,提高了交互数据的处理效率和系统的响应速度。交互数据包括多个字段,使得命令和数据的传输更加灵活,根据具体需求还可以扩展或者修改命令字段,确保每个操作的精确下发和执行。读取并解析得到接口数据,进而生成具体的操作命令,提高了系统的自动化程度,减少了人工干预。The embodiment of the present application sets multiple UBM controllers in the UBM protocol processing module to connect to the RAID controller upstream and various types of hard disks downstream through the multiple UBM controllers. The UBM controller implements the parsing of the interactive data sent by the RAID controller through the HFC connector. By setting up multiple UBM controllers, the system can process the interactive data of multiple hard disks concurrently, improving the processing efficiency of interactive data and the response speed of the system. The interactive data includes multiple fields, which makes the transmission of commands and data more flexible. The command field can also be expanded or modified according to specific needs to ensure the accurate issuance and execution of each operation. The interface data is read and parsed to generate specific operation commands, thereby improving the automation of the system and reducing manual intervention.

RAID控制器12通过本申请实施例提供的硬盘背板20的架构,可以确定背板功能、DFC连接器的状态和控制信息、以及读取背板上的DFC连接器到HFC连接器的路由信息等。硬盘背板20可以实现每个HFC通过高速信号通道50连接多个DFC,例如高速信号通道50为X1、X2、X4或其它通道带宽。The RAID controller 12 can determine the backplane function, the status and control information of the DFC connector, and read the routing information from the DFC connector on the backplane to the HFC connector through the architecture of the hard disk backplane 20 provided in the embodiment of the present application. The hard disk backplane 20 can realize that each HFC is connected to multiple DFCs through a high-speed signal channel 50, for example, the high-speed signal channel 50 has a bandwidth of X1, X2, X4 or other channels.

可以理解的是,本申请实施例示意的结构并不构成对UBM协议处理模块26中UBM控制器和UBM FRU、硬盘以及RAID控制器的具体限定。在本申请另一些实施例中,UBM协议处理模块26中的UBM控制器和UBM FRU、硬盘以及RAID控制器可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the UBM controller and UBM FRU, hard disk and RAID controller in the UBM protocol processing module 26. In other embodiments of the present application, the UBM controller and UBM FRU, hard disk and RAID controller in the UBM protocol processing module 26 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

示例的,每个硬盘包括3种状态:正常运行(Active)状态、硬盘存在(Present)状态、或处于硬盘加载失败(Fault)状态。通过硬盘指示灯的亮灯颜色来指示硬盘的运行状态为正常运行(Active)状态(例如当硬盘被正常识别,且参与数据读写操作,硬盘指示灯以绿色显示)、硬盘存在(Local)状态(例如硬盘已被系统检测到,但是尚未参与RAID阵列的活动,硬盘指示灯以黄色显示)、或处于硬盘加载失败(Fault)状态(例如当硬盘由于硬件故障、配置错误或数据损坏等原因无法正常工作时,硬盘指示灯以红色显示),可以有效的反映硬盘的工作状态。For example, each hard disk includes three states: normal operation (Active) state, hard disk presence (Present) state, or hard disk loading failure (Fault) state. The color of the hard disk indicator light indicates the operating state of the hard disk as normal operation (Active) state (for example, when the hard disk is normally identified and participates in data reading and writing operations, the hard disk indicator light is displayed in green), hard disk presence (Local) state (for example, the hard disk has been detected by the system, but has not yet participated in the activities of the RAID array, the hard disk indicator light is displayed in yellow), or hard disk loading failure (Fault) state (for example, when the hard disk cannot work normally due to hardware failure, configuration error or data damage, the hard disk indicator light is displayed in red), which can effectively reflect the working status of the hard disk.

DFC1_LED可以被UBM控制器1发出的硬盘指示灯信号fault/local/active控制,DFC2_LED可以被UBM控制器2发出的硬盘指示灯信号fault/local/active控制。通过UBM协议处理模块26可以指示硬盘状态信息:Active、Local、Fault状态。本申请实施例通过将处理后的数据传输至硬盘对应的硬盘指示灯,系统可以即时显示硬盘的状态(如正常运行、存在、加载失败等)。DFC1_LED can be controlled by the hard disk indicator signal fault/local/active sent by UBM controller 1, and DFC2_LED can be controlled by the hard disk indicator signal fault/local/active sent by UBM controller 2. The UBM protocol processing module 26 can indicate the hard disk status information: Active, Local, Fault status. In the embodiment of the present application, by transmitting the processed data to the hard disk indicator corresponding to the hard disk, the system can instantly display the status of the hard disk (such as normal operation, existence, loading failure, etc.).

在一些可能的实现方式中,第一硬盘和第二硬盘的硬盘指示灯通过同一组信号线进行连接控制。In some possible implementations, the hard disk indicators of the first hard disk and the second hard disk are connected and controlled through the same set of signal lines.

UBM控制器在系统上电时需要初始化,初始化包括下面步骤:The UBM controller needs to be initialized when the system is powered on. The initialization includes the following steps:

S100、初始化DFC的边带信号S100, initialize the sideband signal of DFC

对连接到DFC的硬盘的输入/输出(I/O)信号进行设置,包括:向连接的硬盘提供适当的电源信号,以便于启动硬盘。将与硬盘通信的信号线复位到一致的状态。Setting the input/output (I/O) signals of the hard disk connected to the DFC, including: providing appropriate power signals to the connected hard disk to start the hard disk. Resetting the signal lines communicating with the hard disk to a consistent state.

S110、将DFC_PERST信号复位。S110 , reset the DFC_PERST signal.

例如将DFC_PERST信号拉低为低电平,确保在设备启动或运行时,各个DFC接口上的信号处于正确的状态。For example, the DFC_PERST signal is pulled down to a low level to ensure that the signals on each DFC interface are in the correct state when the device is started or running.

S120、禁用参考时钟。S120, disable the reference clock.

确保在初始化过程中不会由于时钟信号的干扰而引起不必要的问题。Ensure that no unnecessary problems are caused by interference with the clock signal during the initialization process.

S130、启用电源(图中未示出)。S130, enable power supply (not shown in the figure).

S140、初始化HFC输出的边带信号。S140: Initialize the sideband signal output by the HFC.

S150、把UBM控制器的运行状态置为初始化中。S150: Set the running state of the UBM controller to initializing.

S160、启用UBM控制器的2-Wire从机接口。S160, enable the 2-Wire slave interface of the UBM controller.

按照标准的I2C协议,主机的I2C控制模块通常被称为I2C Master模块,从机的I2C模块通常被称为I2C Slave模块。每个I2C设备都有一个唯一的用于访问该设备的I2C地址。主机通过该地址识别其他I2C设备。上述主机是指初始化I2C总线的设备,其他被主机寻址的I2C设备称为从机。本申请实施例中主机为RAID控制器12,从机为UBM协议处理模块26中的UBM控制器。According to the standard I2C protocol, the I2C control module of the host is usually called the I2C Master module, and the I2C module of the slave is usually called the I2C Slave module. Each I2C device has a unique I2C address for accessing the device. The host identifies other I2C devices through the address. The above-mentioned host refers to the device that initializes the I2C bus, and other I2C devices addressed by the host are called slaves. In the embodiment of the present application, the host is a RAID controller 12, and the slave is a UBM controller in the UBM protocol processing module 26.

RAID控制器12为主机,发送命令和请求,多个UBM控制器作为从机,响应主机的指令。当主机(RAID控制器)发送数据时,每个从机(UBM控制器)通过匹配地址来识别是否是发送给自己的数据。The RAID controller 12 is the host, sending commands and requests, and multiple UBM controllers are slaves, responding to the host's instructions. When the host (RAID controller) sends data, each slave (UBM controller) identifies whether the data is sent to itself by matching the address.

S170、将UBM控制器的运行状态设为所有2-Wire从机接口准备就绪。S170, set the operating state of the UBM controller to all 2-Wire slave interfaces are ready.

将所有2-Wire从机接口的UBM控制器操作状态设置为READY。RAID控制器开始通过UBM控制器监视DFC对应的硬盘的状态和在位信号的变化。UBM控制器的初始化结束。UBM控制器的初始化结束后开始监测DFC输入的变化。示例的,UBM控制器将CHANGE_DETECT信号拉低。Set the UBM controller operation status of all 2-Wire slave interfaces to READY. The RAID controller starts to monitor the status of the hard disk corresponding to the DFC and the change of the in-place signal through the UBM controller. The initialization of the UBM controller is completed. After the initialization of the UBM controller is completed, it starts to monitor the changes of the DFC input. For example, the UBM controller pulls the CHANGE_DETECT signal low.

RAID控制器12尝试与UBM控制器通信,如果UBM控制器未响应,则再次重试通信。如果UBM控制器响应READY。UBM控制器将CHANGE_DETECT信号上拉为高电平。RAID控制器需要解析至少一个DFC经过UBM控制器到对应HFC的路由。The RAID controller 12 attempts to communicate with the UBM controller. If the UBM controller does not respond, the communication is retried. If the UBM controller responds READY, the UBM controller pulls up the CHANGE_DETECT signal to a high level. The RAID controller needs to resolve the route from at least one DFC to the corresponding HFC through the UBM controller.

表1示出了多个通道的DFC至两个HFC起始通道的示例。DFC、HFC和硬盘可以使用它们在背板上的位置或编号来表示物理地址。例如,可以将每个DFC、HFC和硬盘标识编号为1、2、3、4等。编号可以连续也可以不连续。Table 1 shows an example of multiple channels of DFC to two HFC starting channels. DFCs, HFCs, and hard disks can use their positions or numbers on the backplane to represent physical addresses. For example, each DFC, HFC, and hard disk identification number can be 1, 2, 3, 4, etc. The numbers can be continuous or discontinuous.

如表1所示,HFC0具有4个通道,通道标识分别为0/1/2/3,通道0和通道1连接通道标识为0的DFC0,通道2和通道3连接通道标识为1的DFC1。DFC0具有通道0和通道1,可以分别连接硬盘0和硬盘1,DFC1具有通道2和通道3,可以分别连接硬盘2和硬盘3。如果HFC设计支持PCIE接口,那么它的通道数可以与PCIE总线的通道数相匹配,每个PCIE通道的数据传输带宽通常可以为X1/X4/X8/X16。As shown in Table 1, HFC0 has four channels, with channel identifiers 0/1/2/3. Channel 0 and channel 1 are connected to DFC0 with channel identifier 0, and channel 2 and channel 3 are connected to DFC1 with channel identifier 1. DFC0 has channel 0 and channel 1, which can be connected to hard disk 0 and hard disk 1 respectively, and DFC1 has channel 2 and channel 3, which can be connected to hard disk 2 and hard disk 3 respectively. If the HFC design supports the PCIE interface, then its channel number can match the channel number of the PCIE bus, and the data transmission bandwidth of each PCIE channel can usually be X1/X4/X8/X16.

表一多个通道的DFC至两个HFC起始通道的示例Table 1 Example of DFC of multiple channels to two HFC starting channels

HFC标识为1的HFC1具有6个通道,通道标识分别为0/1/2/3/4/5,通道0、通道1通道2和通道3连接通道标识为2的DFC2,通道4和通道5连接通道标识为3的DFC3,DFC2具有通道0-通道3,可以分别连接硬盘4-硬盘7。DFC3具有通道4和通道5,可以分别连接硬盘8和硬盘9。HFC1 with HFC ID 1 has 6 channels, and the channel IDs are 0/1/2/3/4/5. Channel 0, channel 1, channel 2, and channel 3 are connected to DFC2 with channel ID 2. Channel 4 and channel 5 are connected to DFC3 with channel ID 3. DFC2 has channels 0 to 3, which can be connected to hard disks 4 to 7 respectively. DFC3 has channels 4 and 5, which can be connected to hard disks 8 and 9 respectively.

再以HFC0有16个通道进一步说明,示例的,16个通道中的4个通道可以分配给DFC0,剩余12个通道分配给DFC1,DFC0拥有的4个通道可以分别连接4个硬盘,DFC1拥有的12个通道可以分别连接12个硬盘。Let's further explain that HFC0 has 16 channels. For example, 4 channels of the 16 channels can be allocated to DFC0, and the remaining 12 channels are allocated to DFC1. The 4 channels owned by DFC0 can be connected to 4 hard disks respectively, and the 12 channels owned by DFC1 can be connected to 12 hard disks respectively.

示例的,RAID控制器发送复位命令到硬盘1和硬盘3。该复位命令中需要携带硬盘1和硬盘3的UBM端口路由,根据表1给出的信息,硬盘1的UBM端口路由为UBM端口路由索引=0,HFC标识=0,HFC通道=1,DFC标识=0,DFC通道=LANE1。硬盘3的UBM端口路由为UBM端口路由索引=1,HFC标识=0,HFC通道=3,DFC标识=1,DFC通道=LANE3。由此,可以完成对硬盘1和硬盘3的复位。For example, the RAID controller sends a reset command to hard disk 1 and hard disk 3. The reset command needs to carry the UBM port routes of hard disk 1 and hard disk 3. According to the information given in Table 1, the UBM port route of hard disk 1 is UBM port route index = 0, HFC identifier = 0, HFC channel = 1, DFC identifier = 0, DFC channel = LANE1. The UBM port route of hard disk 3 is UBM port route index = 1, HFC identifier = 0, HFC channel = 3, DFC identifier = 1, DFC channel = LANE3. In this way, the reset of hard disk 1 and hard disk 3 can be completed.

图4为本申请实施例提供的多个硬盘背板的UBM控制器和UBM FRU的I2C通信示意图。如图4所示,RAID控制器连接到4个硬盘背板,硬盘背板1-硬盘背板4。每个硬盘背板都设置有UBM协议处理模块,UBM协议处理模块包括多个UBM控制器和UBM FRU。RAID控制器12生成地址选择线信号并对其进行译码以选通某个硬盘背板上的UBM协议处理模块。在RAID控制器中设置地址选择器,地址选择线为n条时,n条地址选择线最多能选通2n个UBM协议处理模块。例如图4所示当有两条地址选择线时,可以输出00/01/10/11四种信号,对应端口1-端口4,根据地址选通逻辑选择一块硬盘背板上的UBM协议处理模块。因此,两条地址线最多可以选通4个UBM协议处理模块。对地址选择线信号进行译码的逻辑也可以由硬盘背板实现。FIG4 is a schematic diagram of I2C communication between UBM controllers and UBM FRUs of multiple hard disk backplanes provided in an embodiment of the present application. As shown in FIG4 , the RAID controller is connected to four hard disk backplanes, hard disk backplane 1-hard disk backplane 4. Each hard disk backplane is provided with a UBM protocol processing module, and the UBM protocol processing module includes multiple UBM controllers and UBM FRUs. The RAID controller 12 generates an address selection line signal and decodes it to select the UBM protocol processing module on a certain hard disk backplane. An address selector is set in the RAID controller. When there are n address selection lines, the n address selection lines can select up to 2n UBM protocol processing modules. For example, as shown in FIG4 , when there are two address selection lines, four signals of 00/01/10/11 can be output, corresponding to port 1-port 4, and a UBM protocol processing module on a hard disk backplane is selected according to the address selection logic. Therefore, two address lines can select up to 4 UBM protocol processing modules. The logic for decoding the address selection line signal can also be implemented by the hard disk backplane.

以硬盘背板3为例进行说明,作为主机的RAID控制器连接硬盘背板3中的HF0、HFC1到HFCn。以RAID控制器和HFC1之间的连接进行说明,HFC1连接UBM控制器1、UBM FRU1,UBM控制器2、UBM FRU2…UBM控制器N、UBM FRUN。Taking hard disk backplane 3 as an example, the RAID controller as the host is connected to HF0, HFC1 to HFCn in hard disk backplane 3. Taking the connection between the RAID controller and HFC1 as an example, HFC1 is connected to UBM controller 1, UBM FRU1, UBM controller 2, UBM FRU2...UBM controller N, UBM FRUN.

同理,HFC0-HFCn中对应连接至少一个UBM控制器和UBM FRU。Similarly, at least one UBM controller and UBM FRU are connected to HFC0-HFCn respectively.

HFC和UBM控制器之间的对外接口为I2C接口,因此,RAID控制器可以通过I2C总线与UBM控制器连接,相应地,RAID控制器和其对外接口所对应的各个UBM控制器采用的通信方式可以为I2C总线通信方式。在I2C总线上,每个从机(UBM控制器)都有唯一的地址用于I2C通信,这个地址通常称为I2C地址。The external interface between the HFC and the UBM controller is an I2C interface. Therefore, the RAID controller can be connected to the UBM controller via the I2C bus. Accordingly, the communication method adopted by the RAID controller and each UBM controller corresponding to its external interface can be the I2C bus communication method. On the I2C bus, each slave (UBM controller) has a unique address for I2C communication, which is usually called the I2C address.

RAID控制器12通过HFC向UBM协议处理模块中每个UBM控制器发送要访问的UBM控制器的I2C地址。当UBM控制器接收到与自身I2C地址匹配的地址时,响应RAID控制器的通信请求。因而RAID控制器12可访问到任意一个UBM控制器和UBM FRU,从而可以获得该UBM控制器管理的至少一个硬盘的状态信号以及下发硬盘点灯信号。The RAID controller 12 sends the I2C address of the UBM controller to be accessed to each UBM controller in the UBM protocol processing module through the HFC. When the UBM controller receives an address that matches its own I2C address, it responds to the communication request of the RAID controller. Therefore, the RAID controller 12 can access any UBM controller and UBM FRU, thereby obtaining the status signal of at least one hard disk managed by the UBM controller and sending a hard disk lighting signal.

在一个可能的实现方式中,RAID控制器12发送数据和UBM控制器接收数据流程为:In a possible implementation, the process of the RAID controller 12 sending data and the UBM controller receiving data is as follows:

发送起始条件和从机地址:RAID控制器首先发送起始条件(Start)信号,然后发送从机地址。I2C设备都有例如一个唯一的7位地址,UBM控制器确认地址:目标UBM控制器收到RAID控制器12发送的地址后,会确认地址是否正确。UBM控制器将自身地址和RAID控制器发送数据中地址字段的值进行比较,如果地址匹配,目标UBM控制器会准备发送或接收数据。Sending the start condition and slave address: The RAID controller first sends a start condition (Start) signal and then sends the slave address. I2C devices all have, for example, a unique 7-bit address. The UBM controller confirms the address: After receiving the address sent by the RAID controller 12, the target UBM controller will confirm whether the address is correct. The UBM controller compares its own address with the value of the address field in the data sent by the RAID controller. If the addresses match, the target UBM controller will prepare to send or receive data.

读取/写入数据位判断:主设备在发送从设备的例如7位地址之后,地址的最低位(第0位)可以表示数据传输的方向。例如这个最低位是0,则表示主设备将要向从设备写数据(写操作);例如这个最低位是1,则表示主设备从从设备读取数据(读操作)。Read/write data bit judgment: After the master device sends the slave device's 7-bit address, for example, the lowest bit of the address (bit 0) can indicate the direction of data transmission. For example, if the lowest bit is 0, it means that the master device will write data to the slave device (write operation); if the lowest bit is 1, it means that the master device reads data from the slave device (read operation).

RAID控制器接收数据:在最低位(方向位)为1时,RAID控制器12读取目标UBM控制器中的数据。在读取到数据之后,RAID控制器12可以选择发送应答信号以请求更多的数据,或者发送非应答信号来表示已经读取到全部数据。如果RAID控制器发送非应答信号,通常意味着RAID控制器不再需要更多的数据。RAID controller receives data: When the lowest bit (direction bit) is 1, the RAID controller 12 reads the data in the target UBM controller. After reading the data, the RAID controller 12 can choose to send a response signal to request more data, or send a non-response signal to indicate that all data has been read. If the RAID controller sends a non-response signal, it usually means that the RAID controller no longer needs more data.

停止条件:当主设备完成了对从设备的数据读写操作后,会生成停止条件来通知从设备传输会话结束。停止条件可以为主设备在SDA(数据线)上例如产生一个高电平信号,同时SCL(时钟线)也产生高电平。Stop condition: When the master device has completed the data read and write operation to the slave device, it will generate a stop condition to notify the slave device that the transmission session has ended. The stop condition can generate a high level signal on the SDA (data line) for the master device, and the SCL (clock line) also generates a high level.

本申请实施例通过在交互数据设置UBM控制器的地址位,RAID控制器可以准确确定目标UBM控制器;每个UBM控制器拥有唯一的地址标识,可以在多个UBM控制器环境下防止地址冲突和数据传输错误。并且系统够可以扩展新的UBM控制器而不会引起地址冲突。In the embodiment of the present application, by setting the address bit of the UBM controller in the interactive data, the RAID controller can accurately determine the target UBM controller; each UBM controller has a unique address identifier, which can prevent address conflicts and data transmission errors in multiple UBM controller environments. In addition, the system can expand new UBM controllers without causing address conflicts.

图5为UBM控制器的内部实现示意图,如图5所示,UBM控制器包括数据接收模块,命令解析模块,命令执行模块。FIG5 is a schematic diagram of the internal implementation of the UBM controller. As shown in FIG5 , the UBM controller includes a data receiving module, a command parsing module, and a command executing module.

数据接收模块,通过串行数据总线接收RAID控制器发送的交互数据,并对交互数据进行处理得到多个接口数据。数据接收模块接收来自RAID控制器的串行总线信号,将串行总线信号存储在寄存器中;串行总线信号指示对第二硬盘或第二硬盘指示灯的读/写数据命令,第二硬盘包括NVME接口类型的硬盘;串行总线信号包括多个字段,多个字段包括以下中的一个或多个:读/写数据使能位、读/写数据地址位、命令位、待写数据位;利用UBM协议对交互数据进行解析得到多个接口数据;多个接口数据包括以下中的一个或多个:第一接口数据,第一接口数据指示读数据使能;第二接口数据,第二接口数据指示读/写数据地址;第三接口数据,第三接口数据指示写数据使能;第四接口数据,第四接口数据指示操作命令;第五接口数据,第五接口数据指示待写数据。The data receiving module receives the interactive data sent by the RAID controller through the serial data bus, and processes the interactive data to obtain multiple interface data. The data receiving module receives the serial bus signal from the RAID controller and stores the serial bus signal in the register; the serial bus signal indicates the read/write data command for the second hard disk or the second hard disk indicator light, and the second hard disk includes a hard disk of the NVME interface type; the serial bus signal includes multiple fields, and the multiple fields include one or more of the following: read/write data enable bit, read/write data address bit, command bit, and data to be written bit; the interactive data is parsed using the UBM protocol to obtain multiple interface data; the multiple interface data include one or more of the following: first interface data, the first interface data indicates read data enable; second interface data, the second interface data indicates read/write data address; third interface data, the third interface data indicates write data enable; fourth interface data, the fourth interface data indicates an operation command; fifth interface data, the fifth interface data indicates data to be written.

命令解析模块:用于获取多个接口数据进行解析得到第一命令和第二命令。读取第一接口数据至第五接口数据中至少一个接口数据的值,对第一接口数据至第五接口数据中至少一个接口数据的值进行解析得到第一命令和第二命令。Command parsing module: used to obtain multiple interface data and parse them to obtain the first command and the second command. Read the value of at least one interface data from the first interface data to the fifth interface data, and parse the value of at least one interface data from the first interface data to the fifth interface data to obtain the first command and the second command.

命令执行模块:用于将第一命令发送到UBM控制器连接的DFC连接器;第二命令发送到UBM控制器连接的目标硬盘的硬盘指示灯。The command execution module is used to send a first command to the DFC connector connected to the UBM controller; and a second command to the hard disk indicator light of the target hard disk connected to the UBM controller.

本申请实施例提供通过把交互数据进行处理的过程分为多个处理阶段,完成了每个阶段数据处理的闭环操作,也即在每个实现模块内部的信息流解析处理自闭环。这种结构化的处理方式提高了数据处理效率,减少了等待时间。确保了数据处理过程中各个阶段的稳定性和一致性。即使某个模块出现故障,其他模块也能继续正常工作,提高了系统的稳定性。每个模块在独立闭环内完成数据处理,减少了数据在多个模块之间传输带来的误差和延迟。The embodiment of the present application provides a closed-loop operation of data processing at each stage by dividing the process of processing interactive data into multiple processing stages, that is, the information flow parsing processing self-closed loop within each implementation module. This structured processing method improves data processing efficiency and reduces waiting time. It ensures the stability and consistency of each stage in the data processing process. Even if a module fails, other modules can continue to work normally, improving the stability of the system. Each module completes data processing in an independent closed loop, reducing the errors and delays caused by data transmission between multiple modules.

数据接收模块通过HFC接收RAID控制器发送的交互数据,例如当检测到I2C总线上I2C_SCL保持为高电平,I2C_SDA从高电平转为低电平时,数据接收模块数据开始接收数据。数据接收模块对数据进行处理,以确定是否为发送给当前地址的UBM控制器以及发送数据指示读取数据或写入数据。具体的,根据发送数据的读/写位的值确定读取数据或写入数据,根据发送数据的地址位确定是否接收数据。至少一个UBM控制器中的每一个UBM控制器拥有唯一的地址标识,基于地址标识和地址位指示的地址标识比较结果为一致,确定至少一个UBM控制器中的一个UBM控制器为目标UBM控制器。The data receiving module receives interactive data sent by the RAID controller through the HFC. For example, when it is detected that I2C_SCL on the I2C bus remains at a high level and I2C_SDA changes from a high level to a low level, the data receiving module starts to receive data. The data receiving module processes the data to determine whether it is sent to the UBM controller of the current address and whether the sent data indicates reading data or writing data. Specifically, the reading data or writing data is determined according to the value of the read/write bit of the sent data, and whether the data is received is determined according to the address bit of the sent data. Each of the at least one UBM controller has a unique address identifier. Based on the consistency of the address identifier comparison result indicated by the address bit, one of the at least one UBM controller is determined to be the target UBM controller.

数据接收模块例如在时钟信号SCL的上升沿读取I2C数据线SDA上的数据位,并将其解析为有效的数据字节,根据I2C协议,例如数据是以LSB-first的顺序传输的,即最低位(LSB,Least Significant Bit)先传输,然后传输次低位,直到最高位(MSB,MostSignificant Bit)传输完成。数据接收模块需要将每个字节的数据位重新排序以得到正确的数据值。时钟信号I2C_SCL可以采用系统主时钟SYS_CLK。The data receiving module, for example, reads the data bits on the I2C data line SDA at the rising edge of the clock signal SCL and parses them into valid data bytes. According to the I2C protocol, for example, data is transmitted in the order of LSB-first, that is, the least significant bit (LSB) is transmitted first, then the second least significant bit is transmitted, until the most significant bit (MSB) is transmitted. The data receiving module needs to reorder the data bits of each byte to obtain the correct data value. The clock signal I2C_SCL can use the system master clock SYS_CLK.

I2C数据传输中的最小单位为一个数据位,数据接收模块在在SCL的上升沿或者下降沿读取数据位,接收到8个数据位即一个字节后就会将该字节存储。The smallest unit of I2C data transmission is a data bit. The data receiving module reads the data bit at the rising or falling edge of SCL. After receiving 8 data bits, that is, a byte, it will store the byte.

数据接收模块通过构建至少一个接口将数据处理的结果作为接口数据传递到命令解析模块。例如,数据接收模块添加第三数据接口write_en指示接收到的数据是写数据使能命令,通过对接收字节的数据的特定位置进行读取,例如特定位置为“1”表示读命令,为“0”表示写命令,由此将第三数据接口write_en赋值为“1”或“0”。添加第一数据接口read_en指示接收到的数据是读数据使能,通过对接收字节的数据的特定位置进行读取,将read_en赋值为“1”或“0”。数据接收模块添加第五数据接口write_data,指示接收到的数据是目标硬盘的状态信号或硬盘指示灯的点灯信号。The data receiving module passes the result of data processing as interface data to the command parsing module by constructing at least one interface. For example, the data receiving module adds a third data interface write_en to indicate that the received data is a write data enable command, and by reading the specific position of the data of the received byte, for example, the specific position is "1" for a read command, and "0" for a write command, thereby assigning the third data interface write_en to "1" or "0". The first data interface read_en is added to indicate that the received data is a read data enable, and by reading the specific position of the data of the received byte, read_en is assigned to "1" or "0". The data receiving module adds a fifth data interface write_data to indicate that the received data is a status signal of the target hard disk or a lighting signal of the hard disk indicator light.

本申请实施例还定义了其他若干接口传递到命令解析模块,例如包括数据接口Start_condition、stop_condition、restart_condition、initianl_finish、busy_en。The embodiment of the present application also defines several other interfaces to be passed to the command parsing module, including, for example, data interfaces Start_condition, stop_condition, restart_condition, initiall_finish, and busy_en.

在一个可能的实现方式中,命令解析模块用于每隔预设时间间隔获取一次数据接收模块接口提供的数据,对接口数据进行解析得到第一命令和第二命令,发送控制命令到命令执行模块,命令执行模块执行第一命令到至少一个DFC,以及发送第二命令到至少一个硬盘对应的硬盘指示灯。In one possible implementation, the command parsing module is used to obtain data provided by the data receiving module interface once every preset time interval, parse the interface data to obtain a first command and a second command, send a control command to the command execution module, the command execution module executes the first command to at least one DFC, and sends the second command to a hard disk indicator light corresponding to at least one hard disk.

在一个可能的实现方式中,数据接收模块接收到完整字节后存储在缓存区中,并设置数据接收完成标记位或者触发中断事件,通知命令解析模块数据读取。In a possible implementation, after receiving the complete byte, the data receiving module stores it in a buffer area, and sets a data receiving completion flag or triggers an interrupt event to notify the command parsing module to read the data.

示例的,命令解析模块调用数据接收模块提供的接口函数,访问存储接收数据的缓存区,读取数据字节进行命令解析。For example, the command parsing module calls the interface function provided by the data receiving module, accesses the buffer area storing the received data, and reads the data bytes to perform command parsing.

在一个可能的实现方式中,命令解析模块还用于存储至少一个硬盘的状态信号以及对应于所述硬盘的硬盘指示灯的状态信号。In a possible implementation, the command parsing module is further used to store a status signal of at least one hard disk and a status signal of a hard disk indicator light corresponding to the hard disk.

图6为图5中UBM控制器中各个模块包括的子模块的结构示意图。如图6所示:FIG6 is a schematic diagram of the structure of submodules included in each module of the UBM controller in FIG5. As shown in FIG6:

数据接收模块包括数据接收子模块、第一接口子模块和第一寄存器。The data receiving module includes a data receiving submodule, a first interface submodule and a first register.

命令解析模块包括命令接收子模块、第二接口子模块、硬盘状态获取子模块、命令输出子模块。The command parsing module includes a command receiving submodule, a second interface submodule, a hard disk status obtaining submodule, and a command output submodule.

命令执行模块包括第一命令执行子模块、第二命令执行子模块。The command execution module includes a first command execution submodule and a second command execution submodule.

数据接收子模块监听I2C总线上的数据传输,接收RAID控制器通过HFC发送的数据,将数据组合成字节并存储在第一寄存器(图6中所提及的缓存区)中。The data receiving submodule monitors the data transmission on the I2C bus, receives the data sent by the RAID controller through the HFC, combines the data into bytes and stores them in the first register (the buffer area mentioned in FIG. 6 ).

示例的,第一接口子模块将第一寄存器中的字节数据提供给命令解析模块。For example, the first interface submodule provides the byte data in the first register to the command parsing module.

数据接收子模块确保接收到的数据按照正确的顺序存储。数据存储完毕后,例如可以触发相应的中断信号到第一接口子模块,对接收到的原始数据进行处理。将处理后的数据传递给命令解析子模块。The data receiving submodule ensures that the received data is stored in the correct order. After the data is stored, for example, a corresponding interrupt signal can be triggered to the first interface submodule to process the received raw data and pass the processed data to the command parsing submodule.

命令解析子模块调用第一接口子模块的接口数据,对数据进行解析。The command parsing submodule calls the interface data of the first interface submodule and parses the data.

需要说明的是,命令解析子模块对数据的解析,是对接口数据进行解释和分析,确定命令的含义和需要执行的操作。It should be noted that the command parsing submodule parses the data by interpreting and analyzing the interface data to determine the meaning of the command and the operation to be performed.

命令解析子模块还用于对接口数据执行后的结果存放在第二接口子模块,RAID控制器可以周期性查询第二接口子模块,以获取命令执行的结果,命令执行结果通过I2C总线返回给RAID控制器。示例的,第二接口子模块包括多个数据接口:rdchecksum_valid、readdata_valid、read_data。目标UBM控制器返回执行结果状态到RAID控制器,执行结果状态指示对串行总线信号执行结果为成功或失败;基于执行结果成功,RAID控制器发送下一条串行总线信号。基于执行结果失败,RAID控制器例如记录日志或执行错误处理流程通知RAID控制器处理错误。The command parsing submodule is also used to store the result of the interface data execution in the second interface submodule. The RAID controller can periodically query the second interface submodule to obtain the result of the command execution, and the command execution result is returned to the RAID controller through the I2C bus. For example, the second interface submodule includes multiple data interfaces: rdchecksum_valid, readdata_valid, and read_data. The target UBM controller returns the execution result status to the RAID controller, and the execution result status indicates whether the execution result of the serial bus signal is successful or failed; based on the successful execution result, the RAID controller sends the next serial bus signal. Based on the failed execution result, the RAID controller, for example, records a log or executes an error handling process to notify the RAID controller to handle the error.

本申请实施例通过执行成功和失败的指示,系统能够及时检测并处理异常情况,增强了系统的稳定性和可维护性。The embodiment of the present application provides indications of success and failure, so that the system can detect and handle abnormal situations in a timely manner, thereby enhancing the stability and maintainability of the system.

硬盘状态获取子模块通过DFC获取与DFC连接的硬盘的状态信息。硬盘状态信息包括但不限于:硬盘在位信息DFC_PRSNT、硬盘类型信息DFC_IFDET和硬盘置位信息DFC_PERST。并将硬盘状态信息存储在第二寄存器中。The hard disk status acquisition submodule acquires the status information of the hard disk connected to the DFC through the DFC. The hard disk status information includes but is not limited to: hard disk position information DFC_PRSNT, hard disk type information DFC_IFDET and hard disk position information DFC_PERST. The hard disk status information is stored in the second register.

命令输出子模块,用于将解析后的命令发送到命令执行模块。The command output submodule is used to send the parsed commands to the command execution module.

第一命令执行子模块用于接收对DFC的控制命令,示例的,第一命令执行子模块将DFC_PERST信号发送到DFC。根据DFC_PERST的状态确定是否对DFC连接的硬盘进行复位。The first command execution submodule is used to receive a control command for the DFC. For example, the first command execution submodule sends a DFC_PERST signal to the DFC, and determines whether to reset the hard disk connected to the DFC according to the state of the DFC_PERST.

第二命令执行子模块用于将控制硬盘指示灯的命令发送到对应硬盘的硬盘指示灯。示例的,第二命令执行子模块通过相应的电压或电流信息来控制硬盘指示灯的亮度和闪烁频率。具体的,第二命令执行子模块接收命令输出子模块输出的命令,确定需要点亮的硬盘指示灯,以及指示灯的状态。The second command execution submodule is used to send the command for controlling the hard disk indicator light to the hard disk indicator light of the corresponding hard disk. For example, the second command execution submodule controls the brightness and flashing frequency of the hard disk indicator light through the corresponding voltage or current information. Specifically, the second command execution submodule receives the command output by the command output submodule, determines the hard disk indicator light to be lit, and the state of the indicator light.

下面对硬盘热插拔过程进行说明,硬盘状态获取子模块检测硬盘的状态信号,在硬盘状态信号发生变化时,将新的硬盘状态信号存储在第二寄存器中作为当前硬盘状态信号,命令解析子模块将将硬盘状态信号变化通知给RAID控制器。RAID控制器通过I2C数据通道接收到硬盘状态变化信号,从而对发生状态变化的硬盘进行热插拔管理。The following is an explanation of the hard disk hot-swap process. The hard disk status acquisition submodule detects the hard disk status signal. When the hard disk status signal changes, the new hard disk status signal is stored in the second register as the current hard disk status signal. The command parsing submodule notifies the RAID controller of the hard disk status signal change. The RAID controller receives the hard disk status change signal through the I2C data channel, and thus performs hot-swap management on the hard disk that has changed status.

图7为接收模块中第一寄存器的结构示意图,如图7所示,第一寄存器存储数据接收模块接收的I2C数据,I2C数据包括若干字段,包括读/写数据使能位、读/写数据地址位、命令位、待写数据位。另外还包括开始位、UBM控制器地址位、校验位和停止位。FIG7 is a schematic diagram of the structure of the first register in the receiving module. As shown in FIG7 , the first register stores the I2C data received by the data receiving module. The I2C data includes several fields, including a read/write data enable bit, a read/write data address bit, a command bit, and a data bit to be written. In addition, it also includes a start bit, a UBM controller address bit, a check bit, and a stop bit.

第一寄存器包括多个存储单元,多个存储单元组成一个数据块用于存储一条完整的命令。存储单元的数目和UBM规范中定义的UBM命令集中的命令数目相同。The first register includes a plurality of storage units, and the plurality of storage units form a data block for storing a complete command. The number of storage units is the same as the number of commands in the UBM command set defined in the UBM specification.

示例的,第一寄存器的一个存储单元为1个bit(比特)位值,一个存储单元存放一个比特数据,多个存储单元存放一条命令。一条命令由接收数据的开始位和结束位确定,在开始位和结束位之间至少包括读/写数据使能位、读/写数据地址位、命令位、待写数据位。For example, a storage unit of the first register is a 1-bit value, a storage unit stores a bit of data, and multiple storage units store a command. A command is determined by the start bit and the end bit of the received data, and at least includes a read/write data enable bit, a read/write data address bit, a command bit, and a data bit to be written between the start bit and the end bit.

需要说明的是,本申请实施例以一种传输数据的格式进行说明,该数据传输格式中包括的字段位的数量和含义仅为示意性的表示,不应以此作为对本申请实施例保护范围的限制。It should be noted that the embodiment of the present application is described in a format for transmitting data, and the number and meaning of the field bits included in the data transmission format are only for schematic representation and should not be used as a limitation on the scope of protection of the embodiment of the present application.

数据接收模块根据接收数据的命令位,将第一寄存器中与该命令位具有相同标识的存储单元作为目标存储单元,将接收数据存储在目标存储单元中。The data receiving module uses the storage unit in the first register having the same identifier as the command bit as the target storage unit according to the command bit of the received data, and stores the received data in the target storage unit.

第一接口子模块中对第一至第五接口数据的定义如下:第一接口数据:指示读数据使能。第二接口数据:指示读/写数据地址。第三接口数据:指示写数据使能。第四接口数据:指示操作命令。第五接口数据:指示待写数据。The first to fifth interface data in the first interface submodule are defined as follows: First interface data: indicates read data enable. Second interface data: indicates read/write data address. Third interface data: indicates write data enable. Fourth interface data: indicates operation command. Fifth interface data: indicates data to be written.

数据开始传输时,会发送开始位,第一接口子模块检测到起始位信号,并将其存储。数据存储完成后,第一接口子模块将start_condition信号置为预定的有效电平,该电平值的变化指示命令解析子模块开始接收数据。When data transmission starts, a start bit is sent, and the first interface submodule detects the start bit signal and stores it. After data storage is completed, the first interface submodule sets the start_condition signal to a predetermined valid level, and the change of the level value indicates that the command parsing submodule starts receiving data.

接着第一接口子模块判断读数据位/写数据使能位,如果指示为读操作,第一接口子模块将第一数据接口read_en接口置为约定的有效电平值,指示命令解析子模块开始读操作。如果指示为写操作,第一接口子模块将第三数据接口write_en接口数据置为约定的有效电平值,指示命令解析子模块开始写操作。命令解析子模块中的状态机根据read_en或write_en信号自动跳转到相应的读或写操作状态。写操作数据从第五数据接口中提供。命令解析子模块根据UBM规范对数据进行解析,并输出控制信号到命令输出子模块,完成相应操作。Then the first interface submodule determines the read data bit/write data enable bit. If the indication is a read operation, the first interface submodule sets the first data interface read_en interface to the agreed effective level value, and instructs the command parsing submodule to start the read operation. If the indication is a write operation, the first interface submodule sets the third data interface write_en interface data to the agreed effective level value, and instructs the command parsing submodule to start the write operation. The state machine in the command parsing submodule automatically jumps to the corresponding read or write operation state according to the read_en or write_en signal. The write operation data is provided from the fifth data interface. The command parsing submodule parses the data according to the UBM specification, and outputs a control signal to the command output submodule to complete the corresponding operation.

有些命令需要连续进行写操作,例如命令i中嵌套有命令j,命令i和命令j存在关联关系,命令j的开始位由第一子接口子模块的数据接口restart_condition指示。Some commands require continuous write operations. For example, command j is nested in command i. Command i and command j are associated with each other. The start bit of command j is indicated by the data interface restart_condition of the first sub-interface submodule.

数据接收完成之后,第一接口子模块将数据接口stop_condition接口置为约定的有效电平值,指示命令解析子模块本条命令结束并准备处理下一条命令。After the data reception is completed, the first interface submodule sets the data interface stop_condition interface to the agreed effective level value, instructing the command parsing submodule to end the current command and prepare to process the next command.

数据接收子模块会检验命令是否接收完整,例如命令i定义有12比特数据,如果数据接收子模块只接收到了10比特数据,那么在把接收到的命令i包括的各个字段存储到第一寄存器时,分配给命令i的12bit寄存器单元不能存满,剩余2比特的存储单元没有新的数据刷新上一次命令i存放的数据,那么数据接收子模块会认为接收的命令i的字段是无效的。需要RAID控制器重传命令i。The data receiving submodule will check whether the command is received completely. For example, if the command i is defined as 12 bits of data, and the data receiving submodule only receives 10 bits of data, then when storing the various fields included in the received command i into the first register, the 12-bit register unit allocated to command i cannot be fully stored, and the remaining 2-bit storage unit has no new data to refresh the data stored in the last command i, then the data receiving submodule will consider that the fields of the received command i are invalid. The RAID controller needs to retransmit command i.

对数据接收的正确性一方面依靠命令i校验和字段进行校验,另一方面命令解析子模块也会对命令i进行整体校验。这个校验过程可以采用现有的技术方案来实现,此处不再赘述。在命令解析子模块对命令i校验完成后,如果校验失败,就通过第二接口子模块的数据接口rdchecksum_valid将结果返回给RAID控制器,RAID控制器在收到反馈信息后,按照数据发送规则会重新发送接收失败的数据。The correctness of data reception is verified by the command i checksum field on the one hand, and the command parsing submodule also performs an overall check on command i on the other hand. This verification process can be implemented using existing technical solutions, which will not be described here. After the command parsing submodule completes the verification of command i, if the verification fails, the result is returned to the RAID controller through the data interface rdchecksum_valid of the second interface submodule. After receiving the feedback information, the RAID controller will resend the data that failed to be received according to the data sending rules.

总之,第一接口子模块中的数据接口经过命令解析模块解析后对硬盘或硬盘指示灯进行操作。第二接口子模块中的接口数据反馈给RAID控制器,指示命令没有接收成功,告知RAID控制器重新发送;或,命令已经处理完成,可以发送下一条命令。In short, the data interface in the first interface submodule operates the hard disk or hard disk indicator light after being parsed by the command parsing module. The interface data in the second interface submodule is fed back to the RAID controller, indicating that the command was not received successfully, and informing the RAID controller to resend; or, the command has been processed and the next command can be sent.

示例的,RAID控制器发送命令对某块硬盘执行下电,命令解析子模块完成命令后反馈给RAID控制器命令执行结果,如果成功执行了命令,RAID控制器就发出下一条命令指示硬盘上电或者置位。For example, the RAID controller sends a command to power off a hard disk. After the command parsing submodule completes the command, it feeds back the command execution result to the RAID controller. If the command is successfully executed, the RAID controller sends the next command to instruct the hard disk to power on or reset.

在一个可能的实现方式中,UBM控制器连接的DFC检测到某个硬盘槽位没有插入硬盘,那么系统会将第二寄存器占用的存储空间释放,供其他UBM控制器使用。如此,可以达到存储空间的使用优化。In a possible implementation, if the DFC connected to the UBM controller detects that a hard disk slot has no hard disk inserted, the system will release the storage space occupied by the second register for use by other UBM controllers, thereby optimizing the use of storage space.

需要说明的是,命令解析子模块对数据接收子模块的接口结构和数据格式已经约定,规定了命令解析子模块和数据接收子模块之间的数据交换方式。这些规则包括数据的类型、位置、格式以及读写的时机等信息。因此,命令解析子模块根据这些规则来解析数据接收子模块接口的数据,并执行相应的操作。It should be noted that the command parsing submodule has agreed on the interface structure and data format of the data receiving submodule, and stipulates the data exchange method between the command parsing submodule and the data receiving submodule. These rules include information such as the type, location, format, and timing of reading and writing of the data. Therefore, the command parsing submodule parses the data of the data receiving submodule interface according to these rules and performs corresponding operations.

命令解析子模块会调用第一接口子模块的数据,当获取到接口数据后,对该接口数据进行解析。The command parsing submodule calls the data of the first interface submodule, and after obtaining the interface data, parses the interface data.

示例的,命令解析子模块会创建多个进程,按照预设规则获取第一接口子模块提供的数据,预设规则可以为每隔一个时间段查询第一接口子模块。For example, the command parsing submodule may create multiple processes to obtain data provided by the first interface submodule according to a preset rule. The preset rule may be to query the first interface submodule at every time period.

在一个可能的实现方式中,硬盘状态获取子模块包括接口电路,接口电路中的多个引脚接收来自DFC的DFC_PERST、DFC_IFDET、DFC_PRSNT信号。通过编程将引脚配置为硬盘状态获取子模块的输入端口,以接收来自DFC获取的硬盘状态信号。当包括DFC_PERST、DFC_IFDET、DFC_PRSNT的信号被接口电路接收到,硬盘状态获取子模块将当前的硬盘状态存储在第二寄存器中,RAID控制器可以根据信号的电平(高电平或低电平)来判断硬盘的状态信息。In a possible implementation, the hard disk status acquisition submodule includes an interface circuit, and a plurality of pins in the interface circuit receive DFC_PERST, DFC_IFDET, and DFC_PRSNT signals from the DFC. The pins are configured as input ports of the hard disk status acquisition submodule through programming to receive hard disk status signals acquired from the DFC. When the signals including DFC_PERST, DFC_IFDET, and DFC_PRSNT are received by the interface circuit, the hard disk status acquisition submodule stores the current hard disk status in the second register, and the RAID controller can determine the status information of the hard disk according to the level of the signal (high level or low level).

在UBM协议规范中,DFC状态和控制信息中的若干比特位置指示DFC中的硬盘类型。In the UBM protocol specification, several bit positions in the DFC status and control information indicate the type of hard disk in the DFC.

可以通过检测槽位的第一引脚的信号,确定槽位中是否插入了硬盘。Whether a hard disk is inserted into the slot can be determined by detecting the signal of the first pin of the slot.

在一个可能的实现方式中,第一引脚的信号为确定硬盘是否插入槽位的DFC_PRSNT信号,当第一引脚的信号为高电平时,说明硬盘被拔出;当第一引脚的信号为低电平时,说明硬盘插入槽位。In a possible implementation, the signal of the first pin is a DFC_PRSNT signal for determining whether the hard disk is inserted into the slot. When the signal of the first pin is high, it indicates that the hard disk is pulled out; when the signal of the first pin is low, it indicates that the hard disk is inserted into the slot.

在一个可能的实现方式中,第二引脚的信号为DFC_IFDET信号。可以通过检测第二引脚的信号,确定硬盘的类型。如果第二引脚的类型为低电平信号,确定插入硬盘的类型为SAS或SATA;如果第二引脚的信号为高电平信号,则确定硬盘的类型为NVME。In a possible implementation, the signal of the second pin is a DFC_IFDET signal. The type of the hard disk can be determined by detecting the signal of the second pin. If the type of the second pin is a low-level signal, the type of the inserted hard disk is determined to be SAS or SATA; if the signal of the second pin is a high-level signal, the type of the hard disk is determined to be NVME.

第一引脚和第二引脚信号通过硬盘状态获取子模块中的接口电路接收,并将第一引脚和第二引脚信号存放在第二寄存器中.The first pin and the second pin signals are received by the interface circuit in the hard disk status acquisition submodule, and the first pin and the second pin signals are stored in the second register.

在一个可能的实现方式中,第三引脚的信号为确定硬盘置位状态的DFC_PERST信号,第三引脚信号也可以存放在第二寄存器中。In a possible implementation, the signal of the third pin is a DFC_PERST signal for determining the hard disk set state, and the third pin signal may also be stored in the second register.

具体的,硬盘状态获取子模块将接口电路发送的信号的电平保存在第二寄存器中,可以通过编写逻辑代码来实现。这将在后文详细阐述。Specifically, the hard disk status acquisition submodule stores the level of the signal sent by the interface circuit in the second register, which can be achieved by writing logic code, which will be described in detail later.

如果硬盘信息已经放入了第二寄存器中,并且主机需要读取这些信息,可以在I2C通信协议中约定第二寄存器地址,比如第二寄存器地址为0x1000。If the hard disk information has been put into the second register, and the host needs to read the information, the second register address can be agreed upon in the I2C communication protocol, for example, the second register address is 0x1000.

命令执行子模块接收命令解析子模块发送的解析后数据,第一命令执行子模块用于控制硬盘的状态信号包括:DFC_VALID和DFC_DATA,第二命令执行子模块用于控制硬盘指示灯的信号包括:LED_DATA、LED_EN和LED_STATUS。The command execution submodule receives the parsed data sent by the command parsing submodule. The first command execution submodule is used to control the hard disk status signals including: DFC_VALID and DFC_DATA. The second command execution submodule is used to control the hard disk indicator light signals including: LED_DATA, LED_EN and LED_STATUS.

示例的,第一命令执行子模块通过多路选择器,根据DFC_VALID信号的状态选择是否选通DFC_DATA信号,命令执行子模块的输出与DFC提供硬盘的置位信号DFC_PERST连接,以输出有效的或无效的硬盘置位信号DFC_PERST。For example, the first command execution submodule selects whether to enable the DFC_DATA signal according to the state of the DFC_VALID signal through a multiplexer, and the output of the command execution submodule is connected to the hard disk set signal DFC_PERST provided by the DFC to output a valid or invalid hard disk set signal DFC_PERST.

本申请实施例允许通过DFC来传输硬盘的复位信号,UBM控制器就可以集中管理硬盘的复位操作,可以动态地由RAID控制器控制硬盘的复位,可以选择复位指定DFC连接下的某个槽位的硬盘,可以实现更加精细的控制。The embodiment of the present application allows the hard disk reset signal to be transmitted through the DFC, so that the UBM controller can centrally manage the hard disk reset operation, the hard disk reset can be dynamically controlled by the RAID controller, and the hard disk in a certain slot under the specified DFC connection can be reset, thereby achieving more precise control.

示例的,第二命令执行子模块通过将反映LED状态的信号LED_STATUS映射到硬盘指示灯的具体状态,比如故障、活动、本地。命令执行子模块根据指示灯的具体状态控制LED电路,以使硬盘指示灯按照控制信号指示的状态显示。For example, the second command execution submodule maps the signal LED_STATUS reflecting the LED status to the specific status of the hard disk indicator light, such as fault, activity, and local. The command execution submodule controls the LED circuit according to the specific status of the indicator light, so that the hard disk indicator light is displayed according to the status indicated by the control signal.

LED_EN信号用于启用或禁用硬盘指示灯,当LED_EN信号处于使能状态时,命令执行模块根据LED_DATA和LED_STATUS信号调整指示灯的亮或灭以及状态,例如亮度级别、颜色、闪烁频率。The LED_EN signal is used to enable or disable the hard disk indicator light. When the LED_EN signal is in the enabled state, the command execution module adjusts the indicator light on or off and the state, such as the brightness level, color, and flashing frequency, according to the LED_DATA and LED_STATUS signals.

示例的,当LED_STATUS指示硬盘出现故障时,第二命令执行子模块产生FAULT控制信号到故障指示灯。当LED_STATUS信号指示硬盘处于活动状态时,产生控制信号ACTIVE来点亮活动指示灯。当LED_STATUS信号指示硬盘处于本地状态时,产生控制信号LOCAL来点亮本地指示灯。基于LED_DATA信号用于传输LED灯的亮度或颜色等控制信息。For example, when LED_STATUS indicates that the hard disk has a fault, the second command execution submodule generates a FAULT control signal to the fault indicator light. When the LED_STATUS signal indicates that the hard disk is in an active state, a control signal ACTIVE is generated to light up the active indicator light. When the LED_STATUS signal indicates that the hard disk is in a local state, a control signal LOCAL is generated to light up the local indicator light. The LED_DATA signal is used to transmit control information such as the brightness or color of the LED light.

图8为命令解析模块中第二寄存器的示意图,如图8所示,硬盘0到硬盘N中每一个硬盘的DFC_PERST、DFC_IFDET、DFC_PRSNT信号都存储在第二寄存器中,第二寄存器存储第一命令解析子模块连接的至少一个DFC连接的至少一个硬盘的第一引脚信号、第二引脚信号和第三引脚信号。Figure 8 is a schematic diagram of the second register in the command parsing module. As shown in Figure 8, the DFC_PERST, DFC_IFDET, and DFC_PRSNT signals of each hard disk from Hard Disk 0 to Hard Disk N are stored in the second register. The second register stores the first pin signal, the second pin signal, and the third pin signal of at least one hard disk connected to at least one DFC connected to the first command parsing submodule.

第二寄存器包括多个存储单元,例如设置第二寄存器的基地址为0x1000,设置每一个存储单元相对于及地址的偏移量,用于确定每个存储单元在寄存器空间中位置。The second register includes a plurality of storage units. For example, the base address of the second register is set to 0x1000, and the offset of each storage unit relative to the address is set to determine the position of each storage unit in the register space.

寄存器偏移量指的是在设备的寄存器映射中,每个存储单元相对于基地址的偏移量。基地址是设备寄存器空间的起始地址,而偏移量则是相对于该起始地址的偏移值,用于确定每个存储单元在寄存器空间中的位置。Register offset refers to the offset of each storage unit relative to the base address in the device's register map. The base address is the starting address of the device's register space, and the offset is the offset value relative to the starting address, which is used to determine the location of each storage unit in the register space.

通过检测硬盘对应的第二寄存器中的硬盘状态信号,并在硬盘状态信号发生变化时,通过接口电路获取硬盘的最新状态,将最新状态保存在第二寄存器中对应的地址偏移量存储空间中。By detecting the hard disk status signal in the second register corresponding to the hard disk, and when the hard disk status signal changes, the latest status of the hard disk is obtained through the interface circuit, and the latest status is saved in the corresponding address offset storage space in the second register.

示例的,在UBM控制器1中,硬盘状态获取子模块可以获取DFC1连接的硬盘1的_DFC1_PERST信号,DFC2连接的硬盘2的_DFC2_PERST信号,DFC1连接的硬盘1的_DFC1_PESNT信号,DFC2连接的硬盘2的_DFC2_PESNT信号,DFC1连接的硬盘1的_DFC1_IFDET信号,DFC2连接的硬盘2的_DFC2_IFDET信号。在第二寄存中每一个硬盘的状态都存储在一个存储单元中。For example, in UBM controller 1, the hard disk status acquisition submodule can acquire the _DFC1_PERST signal of hard disk 1 connected to DFC1, the _DFC2_PERST signal of hard disk 2 connected to DFC2, the _DFC1_PESNT signal of hard disk 1 connected to DFC1, the _DFC2_PESNT signal of hard disk 2 connected to DFC2, the _DFC1_IFDET signal of hard disk 1 connected to DFC1, and the _DFC2_IFDET signal of hard disk 2 connected to DFC2. In the second register, the status of each hard disk is stored in a storage unit.

下面继续对第三引脚信号DFC_PERST信号进行说明,第一引脚信号DFC_PERST信号可以在硬盘插入槽位后,由DFC更新该硬盘的DEF_PERST信号状态,还可以通过RAID控制器发送复位命令来更新第二寄存器中硬盘的DEF_PERST信号。The third pin signal DFC_PERST signal is further described below. The first pin signal DFC_PERST signal can be used by the DFC to update the DEF_PERST signal state of the hard disk after the hard disk is inserted into the slot. The RAID controller can also send a reset command to update the DEF_PERST signal of the hard disk in the second register.

示例的,RAID控制器需要复位硬盘1,RAID控制器会通过I2C信号通道发送复位命令到硬盘1所连接的UBM控制器地址,UBM控制器中的数据接收模块接收该命令,判断开始位,读写位,命令位,数据位、检验和位和结束位,将命令存储在第一寄存器中对应的存储单元,同时将处理后的数据发送到相应的数据接口,命令解析模块中的进程查询数据接收模块提供的接口,执行接口提供的数据并返回执行结果到RAID控制器。示例的,命令解析模块采用定期轮询的方式查询数据接收模块提供的接口数据。本申请实施例不对命令接口模块获取接口数据的方式进行限定。For example, the RAID controller needs to reset hard disk 1. The RAID controller will send a reset command to the UBM controller address connected to hard disk 1 through the I2C signal channel. The data receiving module in the UBM controller receives the command, determines the start bit, read-write bit, command bit, data bit, checksum bit and end bit, stores the command in the corresponding storage unit in the first register, and sends the processed data to the corresponding data interface. The process in the command parsing module queries the interface provided by the data receiving module, executes the data provided by the interface and returns the execution result to the RAID controller. For example, the command parsing module uses periodic polling to query the interface data provided by the data receiving module. The embodiment of the present application does not limit the way in which the command interface module obtains interface data.

以RAID控制器读取硬盘状态为例,对UBM控制器接收数据并解析的过程进行说明。RAID控制器发送读取硬盘状态的指令,通过I2C总线向目标UBM控制器中的数据接收模块发送读取硬盘状态的命令。需要说明的是,本申请实施例中RAID控制器发送的数据是特定的字节序列,根据UBM协议的规定进行编码。数据接收模块接收到RAID控制器从I2C总线上发送过来的命令,通过对接收数据中第一数据信号的值进行提取,如果指示为一个读取的命令,将接口write_en的值置为“1”。通过对接收数据中第二数据信号的值进行提取,得到对应命令的十六进制数值,该第二数据信号的值指示需要执行的命令。根据预设的命令映射关系,例如命令字段为07h被映射为01。从第一寄存器中查找多个存储单元中具有01标识的命令字段,如果匹配成功则将接收数据存储在该存储单元中,并覆盖之前存储在该单元的命令。该命令指示读取硬盘状态,在数据字段包含了读取的UBM端口路由信息,该端口路由信息指示了需要读取的硬盘从HFC到DFC的具体路径(如表1所示)。命令解析模块在获取到数据接收模块提供的read_en接口的数据后,从第一寄存器中读取该条指令的命令和数据字段,根据命令字段指示的命令和数据字段指示的命令数据,根据端口路由信息从第二寄存器中获取硬盘状态。Taking the RAID controller reading the hard disk status as an example, the process of the UBM controller receiving and parsing data is explained. The RAID controller sends an instruction to read the hard disk status, and sends a command to read the hard disk status to the data receiving module in the target UBM controller through the I2C bus. It should be noted that the data sent by the RAID controller in the embodiment of the present application is a specific byte sequence, which is encoded according to the provisions of the UBM protocol. The data receiving module receives the command sent by the RAID controller from the I2C bus, and extracts the value of the first data signal in the received data. If it indicates a read command, the value of the interface write_en is set to "1". By extracting the value of the second data signal in the received data, the hexadecimal value of the corresponding command is obtained, and the value of the second data signal indicates the command to be executed. According to the preset command mapping relationship, for example, the command field is 07h and is mapped to 01. Search the command field with a 01 identifier in multiple storage units from the first register. If the match is successful, the received data is stored in the storage unit and the command previously stored in the unit is overwritten. This command indicates to read the hard disk status, and the data field contains the read UBM port routing information, which indicates the specific path of the hard disk from HFC to DFC to be read (as shown in Table 1). After obtaining the data of the read_en interface provided by the data receiving module, the command parsing module reads the command and data fields of the instruction from the first register, and obtains the hard disk status from the second register according to the command indicated by the command field and the command data indicated by the data field according to the port routing information.

计算设备上可以设置有一个或多个硬盘背板,该一个或多个硬盘背板与RAID控制器连接。为了对该一个或多个硬盘背板进行配置,在计算设备上电之后,RAID控制器可以通过该一个或多个硬盘背板中的UBM控制器读取该一个或多个硬盘背板的信息,该一个或多个硬盘背板的信息可以包括该一个或多个硬盘背板的标识,该一个或多个硬盘背板的标识分别用于指示该一个或多个硬盘背板的硬件资源,硬盘背板的硬件资源可以包括硬盘背板的接口数量、支持的最大硬盘数量、支持的硬盘类型等,且不同类型的硬盘背板对应的硬件资源不同。其中,一个硬盘背板的标识可以为该硬盘背板的背板ID,也可以为其它可以标识该硬盘背板类型或硬件资源的信息(如硬盘背板的名称等),本申请实施例在此不作限定。One or more hard disk backplanes may be provided on the computing device, and the one or more hard disk backplanes are connected to the RAID controller. In order to configure the one or more hard disk backplanes, after the computing device is powered on, the RAID controller may read the information of the one or more hard disk backplanes through the UBM controller in the one or more hard disk backplanes, and the information of the one or more hard disk backplanes may include the identification of the one or more hard disk backplanes, and the identification of the one or more hard disk backplanes is used to indicate the hardware resources of the one or more hard disk backplanes respectively, and the hardware resources of the hard disk backplane may include the number of interfaces of the hard disk backplane, the maximum number of hard disks supported, the type of hard disks supported, etc., and the hardware resources corresponding to different types of hard disk backplanes are different. Among them, the identification of a hard disk backplane can be the backplane ID of the hard disk backplane, or it can be other information that can identify the type of the hard disk backplane or the hardware resources (such as the name of the hard disk backplane, etc.), which is not limited in the embodiments of the present application.

本申请实施例提供一种基于复杂可编程逻辑器件CPLD的数据处理方法,CPLD设置于服务器的硬盘背板上,硬盘背板支持通用背板管理UBM协议;硬盘背板包括用于连接RAID控制器的HFC连接器和用于连接硬盘槽位的DFC连接器,CPLD分别连接所述HFC连接器和DFC连接器;该方法包括:The embodiment of the present application provides a data processing method based on a complex programmable logic device (CPLD). The CPLD is arranged on a hard disk backplane of a server, and the hard disk backplane supports a universal backplane management (UBM) protocol. The hard disk backplane includes an HFC connector for connecting a RAID controller and a DFC connector for connecting a hard disk slot, and the CPLD is connected to the HFC connector and the DFC connector respectively. The method includes:

步骤S310、在硬盘插入所述硬盘槽位的情况下,根据DFC传输的信号电平判断判断所述硬盘的接口类型;Step S310: when a hard disk is inserted into the hard disk slot, determining the interface type of the hard disk according to the signal level transmitted by the DFC;

步骤S320、根据硬盘接口类型处理RAID控制器和硬盘之间的交互数据,交互数据包括指示硬盘接口类型的数据,指示硬盘状态的数据和读/写操作命令数据;Step S320: Processing the interaction data between the RAID controller and the hard disk according to the hard disk interface type, where the interaction data includes data indicating the hard disk interface type, data indicating the hard disk status, and read/write operation command data;

步骤S330、将处理后的数据传输至RAID控制器或者所述硬盘,以实现对硬盘的管理,硬盘包括SAS/SATA/NVME接口类型的硬盘。Step S330: transmitting the processed data to the RAID controller or the hard disk to manage the hard disk, where the hard disk includes a hard disk of a SAS/SATA/NVME interface type.

本申请实施例提供又一种基于复杂可编程逻辑器件CPLD的数据处理方法,该方法应用于硬盘背板,硬盘背板包括用于连接RAID控制器的HFC连接器和用于连接硬盘槽位的DFC连接器,HFC和DFC为满足通用硬盘背板管理规范UBM的连接器,HFC和RAID控制器连接,所述HFC通过CPLD连接至少一个DFC,DFC连接至少一个硬盘;硬盘背板包括多个UBM控制器,UBM控制器通过HFC和RAID控制器连接;UBM控制器通过DFC和硬盘连接,该方法包括:The embodiment of the present application provides another data processing method based on a complex programmable logic device (CPLD). The method is applied to a hard disk backplane. The hard disk backplane includes an HFC connector for connecting to a RAID controller and a DFC connector for connecting to a hard disk slot. The HFC and the DFC are connectors that meet the universal hard disk backplane management specification (UBM). The HFC is connected to the RAID controller. The HFC is connected to at least one DFC through the CPLD, and the DFC is connected to at least one hard disk. The hard disk backplane includes multiple UBM controllers. The UBM controllers are connected to the RAID controller through the HFC. The UBM controllers are connected to the hard disk through the DFC. The method includes:

响应于RAID控制器发送串行总线信号,目标UBM控制器接收串行总线信号;目标UBM控制器为多个UBM控制器中的一个;串行总线信号包括多个字段,多个字段至少包括读/写数据使能位、读/写数据地址位、命令位、待写数据位;In response to the RAID controller sending a serial bus signal, the target UBM controller receives the serial bus signal; the target UBM controller is one of the multiple UBM controllers; the serial bus signal includes multiple fields, and the multiple fields include at least a read/write data enable bit, a read/write data address bit, a command bit, and a to-be-written data bit;

对串行总线信号进行解析得到多个接口数据;多个接口数据至少包括第一数据接口指示读数据使能,第二数据接口指示读/写数据地址,第三数据接口指示写数据使能,第四数据接口指示操作命令,第五数据接口指示待写数据;所述目标硬盘为多个硬盘中的至少一个;The serial bus signal is parsed to obtain a plurality of interface data; the plurality of interface data at least includes a first data interface indicating read data enable, a second data interface indicating read/write data address, a third data interface indicating write data enable, a fourth data interface indicating operation command, and a fifth data interface indicating data to be written; the target hard disk is at least one of the plurality of hard disks;

读取第一接口数据至第五接口数据中至少一个数据接口数据的值,对第一接口数据至第五接口数据中至少一个接口数据的值进行解析,发送读/写命令到目标硬盘连接的DFC或目标硬盘指示灯。Read the value of at least one data interface data from the first interface data to the fifth interface data, parse the value of at least one data interface data from the first interface data to the fifth interface data, and send a read/write command to the DFC or the target hard disk indicator light connected to the target hard disk.

其中,串行总线信号包括至少第一串行总线信号、第二串行总线信号、第三串行总线信号和第四串行总线信号。第一串行总线信号指示对目标硬盘的读数据命令,第二串行总线信号指示对目标硬盘的写数据命令,第三串行总线信号指示对目标硬盘指示灯的写数据命令,第四串行总线信号指示对目标硬盘指示灯的读数据命令。The serial bus signal includes at least a first serial bus signal, a second serial bus signal, a third serial bus signal and a fourth serial bus signal. The first serial bus signal indicates a read data command to the target hard disk, the second serial bus signal indicates a write data command to the target hard disk, the third serial bus signal indicates a write data command to the indicator light of the target hard disk, and the fourth serial bus signal indicates a read data command to the indicator light of the target hard disk.

响应于RAID控制器发送第一串行总线信号,目标UBM控制器接收第一串行总线信号,第一串行总线信号包括多个字段,多个字段至少包括读数据位、目标硬盘地址标识位;对第一串行总线信号进行解析得到多个接口数据;多个接口数据中的至少第一数据接口数据指示读数据使能,第二接口数据指示目标硬盘的UBM端口路由;读取至少第一接口数据、第二接口数据的值,对第一接口数据和第二接口数据的值进行解析,基于UBM端口路由,确定目标硬盘的状态数据的寄存单元地址;读取寄存单元地址中存放的目标硬盘的状态数据,将状态数据通过串行总线发送到RAID控制器。In response to the RAID controller sending a first serial bus signal, the target UBM controller receives the first serial bus signal, the first serial bus signal includes multiple fields, and the multiple fields at least include a read data bit and a target hard disk address identification bit; the first serial bus signal is parsed to obtain multiple interface data; at least the first data interface data among the multiple interface data indicates read data enable, and the second interface data indicates the UBM port routing of the target hard disk; the values of at least the first interface data and the second interface data are read, the values of the first interface data and the second interface data are parsed, and based on the UBM port routing, the storage unit address of the status data of the target hard disk is determined; the status data of the target hard disk stored in the registration unit address is read, and the status data is sent to the RAID controller through the serial bus.

响应于RAID控制器发送第二串行总线信号,目标UBM控制器接收第二串行总线信号;第二串行总线信号指示对目标硬盘的复位命令;第二串行总线信号包括多个字段,所述多个字段至少包括写数据使能位、写数据地址位和命令位;对第二串行总线信号进行解析得到多个接口数据;多个接口数据中的至少第三接口数据指示写数据使能,第二接口数据指示写数据地址为目标硬盘的UBM端口路由,第四接口数据指示对目标硬盘的操作命令;操作命令指示将目标硬盘的复位信号置为有效值;读取至少第二接口、第三接口和第四接口的值,对第二接口、第三接口和第四接口的值进行解析,得到对目标硬盘的操作命令;将操作命令发送到目标硬盘对应连接的DFC,通过DFC将目标硬盘复位。In response to the RAID controller sending a second serial bus signal, the target UBM controller receives the second serial bus signal; the second serial bus signal indicates a reset command for the target hard disk; the second serial bus signal includes multiple fields, and the multiple fields include at least a write data enable bit, a write data address bit and a command bit; the second serial bus signal is parsed to obtain multiple interface data; at least the third interface data among the multiple interface data indicates write data enable, the second interface data indicates that the write data address is routed to the UBM port of the target hard disk, and the fourth interface data indicates an operation command for the target hard disk; the operation command indicates that the reset signal of the target hard disk is set to a valid value; the values of at least the second interface, the third interface and the fourth interface are read, and the values of the second interface, the third interface and the fourth interface are parsed to obtain an operation command for the target hard disk; the operation command is sent to a DFC corresponding to the connection of the target hard disk, and the target hard disk is reset through the DFC.

响应于RAID控制器发送第三串行总线信号,目标UBM控制器接收第三串行总线信号;第三串行总线信号指示对目标硬盘指示灯的点灯命令;第三串行总线信号包括多个字段,多个字段至少包括写数据使能位、写数据地址位和待写数据位,目标硬盘指示灯和所述目标硬盘一一对应;对第三串行总线信号进行解析得到多个接口数据;多个接口数据中的至少第三接口数据指示写数据使能,第二接口数据包括端口路由信息,根据端端口路由信息确定目标硬盘指示灯的控制寄存器地址,第四数据接口指示操作命令为对目标硬盘指示灯的点灯命令,第五数据接口指示待写数据为对目标硬盘指示灯的点灯信号;读取至少第二接口、第三接口、第四接口和第五接口的值,对第二接口、第三接口、第四接口和第五接口的值进行解析,得到对目标硬盘指示灯的点灯命令;将点灯命令发送到目标硬盘指示灯。In response to the RAID controller sending a third serial bus signal, the target UBM controller receives the third serial bus signal; the third serial bus signal indicates a command to turn on the indicator light of the target hard disk; the third serial bus signal includes multiple fields, and the multiple fields include at least a write data enable bit, a write data address bit and a to-be-written data bit, and the target hard disk indicator light corresponds to the target hard disk one-to-one; the third serial bus signal is parsed to obtain multiple interface data; at least the third interface data among the multiple interface data indicates write data enable, the second interface data includes port routing information, and the control register address of the target hard disk indicator light is determined according to the port routing information, the fourth data interface indicates that the operation command is a command to turn on the indicator light of the target hard disk, and the fifth data interface indicates that the to-be-written data is a signal to turn on the indicator light of the target hard disk; the values of at least the second interface, the third interface, the fourth interface and the fifth interface are read, and the values of the second interface, the third interface, the fourth interface and the fifth interface are parsed to obtain a command to turn on the indicator light of the target hard disk; and the turning on command is sent to the indicator light of the target hard disk.

响应于RAID控制器发送第四串行总线信号,目标UBM控制器接收第四串行总线信号;第四串行总线信号指示对目标硬盘指示灯的读数据命令;第四串行总线信号包括多个字段,多个字段至少包括读数据使能位、读数据地址;对第四串行总线信号进行解析得到多个接口数据;多个接口数据中的至少所述第一接口数据指示读数据使能,第二接口数据包括读数据地址,确定目标硬盘指示灯的寄存单元地址。读取至少第一接口、第二接口的值,对第一接口和第二接口的值进行解析,基于UBM端口路由,得到目标硬盘指示灯状态的寄存单元地址;读取寄存单元地址中存放的目标硬盘指示灯的状态数据,将状态数据通过串行总线发送到RAID控制器。In response to the RAID controller sending a fourth serial bus signal, the target UBM controller receives the fourth serial bus signal; the fourth serial bus signal indicates a read data command for the target hard disk indicator light; the fourth serial bus signal includes multiple fields, and the multiple fields at least include a read data enable bit and a read data address; the fourth serial bus signal is parsed to obtain multiple interface data; at least the first interface data among the multiple interface data indicates read data enable, and the second interface data includes a read data address, and the register unit address of the target hard disk indicator light is determined. The values of at least the first interface and the second interface are read, and the values of the first interface and the second interface are parsed, and the register unit address of the target hard disk indicator light state is obtained based on the UBM port routing; the state data of the target hard disk indicator light stored in the register unit address is read, and the state data is sent to the RAID controller through the serial bus.

需要说明的是,本申请实施例仅对第一串行总线信号到第四串行总线信号进行了示例性的说明,RAID控制器还可以发送代表其他命令的串行总线信号,在此不在赘述。It should be noted that the embodiment of the present application only provides an exemplary description of the first serial bus signal to the fourth serial bus signal, and the RAID controller may also send serial bus signals representing other commands, which will not be elaborated here.

图9为本申请实施例提供的多RAID控制器和多硬盘背板的UBM结构示意图。如图9所示,计算设备的机箱内存在多于一个背板,硬盘背板0和硬盘背板1。RAID控制器也可以为多个,例如RAID控制器0和RAID控制器1。RAID控制器0和硬盘背板0连接。硬盘背板0包括多个UBM控制器和UBM FRU,硬盘背板1包括多个UBM控制器和UBM FRU。FIG9 is a schematic diagram of the UBM structure of multiple RAID controllers and multiple hard disk backplanes provided in an embodiment of the present application. As shown in FIG9 , there are more than one backplane in the chassis of the computing device, namely, hard disk backplane 0 and hard disk backplane 1. There may also be multiple RAID controllers, such as RAID controller 0 and RAID controller 1. RAID controller 0 is connected to hard disk backplane 0. Hard disk backplane 0 includes multiple UBM controllers and UBM FRUs, and hard disk backplane 1 includes multiple UBM controllers and UBM FRUs.

RAID控制器0和硬盘背板0连接,RAID控制器1和硬盘背板1连接。RAID控制器0和硬盘背板0中的HFC0和HFC1连接,RAID控制器1和硬盘背板1中的HFC0和HFC1连接。RAID控制器0/1可以通过硬盘背板0/1中的HFC0、HFC1发送边带信号,获取硬盘背板0/1中的HFC0、HFC1连接的至少一个硬盘的状态信息、在位信息,发送控制命令到至少一个硬盘。RAID controller 0 is connected to hard disk backplane 0, and RAID controller 1 is connected to hard disk backplane 1. RAID controller 0 is connected to HFC0 and HFC1 in hard disk backplane 0, and RAID controller 1 is connected to HFC0 and HFC1 in hard disk backplane 1. RAID controller 0/1 can send sideband signals through HFC0 and HFC1 in hard disk backplane 0/1 to obtain status information and in-position information of at least one hard disk connected to HFC0 and HFC1 in hard disk backplane 0/1, and send control commands to at least one hard disk.

本申请实施例还提供一种计算设备1000,如图10所示,计算设备1000包括:硬盘背板,硬盘背板上包括CPLD,CPLD用于模拟UBM控制器,多个UBM控制器执行如图2-9中任一项所述的数据处理方法。The embodiment of the present application also provides a computing device 1000, as shown in FIG10 , the computing device 1000 includes: a hard disk backplane, the hard disk backplane includes a CPLD, the CPLD is used to simulate a UBM controller, and multiple UBM controllers execute the data processing method as shown in any one of FIGS. 2-9 .

RAID控制器,与计算设备1000的UBM控制器连接,RAID控制器用于:生成硬盘的控制信息和硬盘指示灯的控制信息,并发送给目标UBM控制器;目标UBM控制器用于对硬盘的控制信息和硬盘指示灯的控制信息进行解析,得到控制命令发送到目标硬盘连接的DFC连接器和目标硬盘指示灯。The RAID controller is connected to the UBM controller of the computing device 1000. The RAID controller is used to: generate control information of the hard disk and control information of the hard disk indicator light, and send it to the target UBM controller; the target UBM controller is used to parse the control information of the hard disk and the control information of the hard disk indicator light, and obtain the control command to send to the DFC connector connected to the target hard disk and the target hard disk indicator light.

可以理解的是,本申请的实施例中的处理器可以是中央处理单元(centralprocessing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signalprocessor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件,硬件部件或者其任意组合。通用处理器可以是微处理器,也可以是任何常规的处理器。It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

本申请的实施例中的方法步骤可以通过硬件的方式来实现,也可以由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read-only memory,ROM)、可编程只读存储器(programmable rom,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、CD-ROM或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

Claims (10)

CN202410751588.8A2024-06-112024-06-11 A data processing method, system and computing device based on complex programmable logic device CPLDPendingCN118689819A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202410751588.8ACN118689819A (en)2024-06-112024-06-11 A data processing method, system and computing device based on complex programmable logic device CPLD

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202410751588.8ACN118689819A (en)2024-06-112024-06-11 A data processing method, system and computing device based on complex programmable logic device CPLD

Publications (1)

Publication NumberPublication Date
CN118689819Atrue CN118689819A (en)2024-09-24

Family

ID=92764043

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202410751588.8APendingCN118689819A (en)2024-06-112024-06-11 A data processing method, system and computing device based on complex programmable logic device CPLD

Country Status (1)

CountryLink
CN (1)CN118689819A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118860966A (en)*2024-09-272024-10-29苏州元脑智能科技有限公司 Computer system, signal processing method, device, medium and product
CN118899007A (en)*2024-09-292024-11-05苏州元脑智能科技有限公司 A hard disk backplane structure and control method thereof, and server
CN119629047A (en)*2024-11-292025-03-14新华三信息技术有限公司 Device type identification method, device, device and readable storage medium
CN120353734A (en)*2025-06-202025-07-22苏州元脑智能科技有限公司Hard disk control circuit, method, device, medium and program product

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN118860966A (en)*2024-09-272024-10-29苏州元脑智能科技有限公司 Computer system, signal processing method, device, medium and product
CN118899007A (en)*2024-09-292024-11-05苏州元脑智能科技有限公司 A hard disk backplane structure and control method thereof, and server
CN118899007B (en)*2024-09-292025-02-07苏州元脑智能科技有限公司Hard disk backboard structure, control method thereof and server
CN119629047A (en)*2024-11-292025-03-14新华三信息技术有限公司 Device type identification method, device, device and readable storage medium
CN120353734A (en)*2025-06-202025-07-22苏州元脑智能科技有限公司Hard disk control circuit, method, device, medium and program product

Similar Documents

PublicationPublication DateTitle
CN1124551C (en)Method and system used for hot insertion of processor into data processing system
CN118689819A (en) A data processing method, system and computing device based on complex programmable logic device CPLD
CN107870882B (en)Data protocol for managing peripheral devices
US6671748B1 (en)Method and apparatus for passing device configuration information to a shared controller
US10324888B2 (en)Verifying a communication bus connection to a peripheral device
US7162554B1 (en)Method and apparatus for configuring a peripheral bus
CN118708519B (en)Server expansion module, server, configuration method, device and medium
CN117687944A (en)Topology generation method, expansion board card and server
CN119807106B (en) Expansion card circuit and communication method capable of being inserted into external device
CN117873924A (en) A computing device, a management controller and a data processing method
CN116185505A (en)Configuration method of hard disk backboard and computing equipment
CN114741350A (en) A method, system, device and medium for cascading multiple NVME hard disk backplanes
CN113190084B (en)Method and device for connecting hard disk backboard supporting multiple-bit-width hard disks
CN213365381U (en)Main board
CN117667818B (en)Signal transmission structure, server and signal transmission method
CN118643000A (en) Generating method, sending method and device of configuration information table of server PCIe port
CN118626428A (en) Bandwidth allocation method, server, device, medium and program product
CN118132458A (en) MMIO address resource allocation method, device, computing device and storage medium
CN112667483A (en)Memory information reading device and method for server mainboard and server
US12001373B2 (en)Dynamic allocation of peripheral component interconnect express bus numbers
CN117194123A (en)RAID card testing method, testing device and testing jig board
CN116627472A (en) Firmware program upgrading method and server of high-speed peripheral component equipment
CN117609009A (en) Test methods, servers, management equipment and test systems
US6970986B1 (en)Software based system and method for I/O chip hiding of processor based controllers from operating system
CN111414323B (en)Redundant bundle disk

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp