[go: up one dir, main page]

CN116860219A - A multi-board sharing method of CPLD firmware and related components - Google Patents

A multi-board sharing method of CPLD firmware and related components Download PDF

Info

Publication number
CN116860219A
CN116860219A CN202310896797.7A CN202310896797A CN116860219A CN 116860219 A CN116860219 A CN 116860219A CN 202310896797 A CN202310896797 A CN 202310896797A CN 116860219 A CN116860219 A CN 116860219A
Authority
CN
China
Prior art keywords
cpld
board
firmware
identification
preset
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
CN202310896797.7A
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.)
Inspur Power Commercial Systems Co Ltd
Original Assignee
Inspur Power Commercial Systems 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 Inspur Power Commercial Systems Co Ltd filed Critical Inspur Power Commercial Systems Co Ltd
Priority to CN202310896797.7A priority Critical patent/CN116860219A/en
Publication of CN116860219A publication Critical patent/CN116860219A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a multi-board sharing method of CPLD firmware and related components, relating to the technical field of server board design, wherein a plurality of CPLD codes are preset in the CPLD firmware, so that one CPLD firmware can provide a plurality of CPLD codes, namely, a plurality of board functions can be realized; after the board card identification of the board card connected with the CPLD is obtained, a specific CPLD code is provided for each board card according to a preset corresponding relation library of the board card identification and the CPLD code, so that the same CPLD firmware can be used on different board cards without writing a new CPLD code and generating a new CPLD firmware, the development workload of a server is reduced, the development efficiency is improved, the development cost is saved, and the pipelining of the board card development process is realized.

Description

一种CPLD固件的多板卡共用方法及相关组件A multi-board sharing method of CPLD firmware and related components

技术领域Technical field

本发明涉及服务器板卡设计技术领域,特别是涉及一种CPLD固件的多板卡共用方法及相关组件。The invention relates to the technical field of server board design, and in particular to a multi-board sharing method of CPLD firmware and related components.

背景技术Background technique

随着服务器多样性发展和人们对于互联网的多需求,定制化需求的服务器成为主力军,服务器的板卡需要实现的功能也随着需求的增加而增多。由于CPLD(ComplexProgrammable Logic Device,复杂可编程逻辑器件)具有易于实现各种算法和组合逻辑功能的优点,一般采用CPLD来实现板卡的功能需求,即根据板卡的功能编写相应的CPLD代码,通过CPLD代码生成相应的CPLD固件(Firmware),在板卡生产完成之后将CPLD固件烧录于CPLD中,板卡根据烧录在CPLD中的CPLD固件的控制来实现具体的功能。With the development of server diversity and people's multiple demands for the Internet, servers with customized needs have become the main force, and the functions that server boards need to implement have also increased with the increase in demand. Since CPLD (Complex Programmable Logic Device) has the advantage of being easy to implement various algorithms and combinational logic functions, CPLD is generally used to implement the functional requirements of the board, that is, the corresponding CPLD code is written according to the function of the board, and The CPLD code generates the corresponding CPLD firmware (Firmware). After the board production is completed, the CPLD firmware is burned into the CPLD. The board implements specific functions according to the control of the CPLD firmware burned into the CPLD.

现有技术中,板卡与板卡上的CPLD固件是对应匹配的,一个CPLD固件只能对一个板卡进行控制,当存在多个板卡时,即使板卡实现的功能相似,仍需要根据不同板卡的不同板卡标识为其提供特定的CPLD固件,即需要重复编写新的CPLD代码、生成新的CPLD固件,增加了服务器开发工作量的同时,也影响了开发效率和开发成本,不利于板卡开发过程的流水化。In the existing technology, the board and the CPLD firmware on the board are correspondingly matched. One CPLD firmware can only control one board. When there are multiple boards, even if the functions implemented by the boards are similar, it still needs to be based on Different board identifications provide specific CPLD firmware for different boards, which requires repeatedly writing new CPLD codes and generating new CPLD firmware. This not only increases the workload of server development, but also affects development efficiency and development costs. It is conducive to streamlining the board development process.

发明内容Contents of the invention

本发明的目的是提供一种CPLD固件的多板卡共用方法及相关组件,减少了服务器开发工作量,提高开发效率,节约开发成本,实现板卡开发过程的流水化。The purpose of the present invention is to provide a multi-board card sharing method of CPLD firmware and related components, which reduces the workload of server development, improves development efficiency, saves development costs, and realizes the streamlining of the board development process.

为解决上述技术问题,本发明提供了一种CPLD固件的多板卡共用方法,应用于CPLD,所述CPLD包括烧录在所述CPLD中的CPLD固件,所述CPLD固件中预设有多个CPLD代码,所述方法包括:In order to solve the above technical problems, the present invention provides a multi-board sharing method of CPLD firmware, which is applied to CPLD. The CPLD includes CPLD firmware burned in the CPLD, and the CPLD firmware is preset with multiple CPLD code, the method includes:

获取与自身连接的板卡的板卡标识;Get the board ID of the board connected to itself;

根据所述板卡标识和预设的板卡标识与CPLD代码对应关系库,调用预设在所述CPLD固件中的CPLD代码,以基于所述CPLD代码对所述板卡进行控制。According to the board identification and the preset correspondence library between the board identification and the CPLD code, the CPLD code preset in the CPLD firmware is called to control the board based on the CPLD code.

优选地,获取与CPLD连接的板卡的板卡标识,包括:Preferably, obtaining the board identification of the board connected to the CPLD includes:

获取与板卡连接的输入输出IO接口的电平变化信息;Obtain the level change information of the input and output IO interface connected to the board;

根据预设的电平变化信息与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。Determine the board identification of the board connected to the CPLD according to the preset correspondence between the level change information and the board identification.

优选地,获取与CPLD连接的板卡的板卡标识,包括:Preferably, obtaining the board identification of the board connected to the CPLD includes:

通过预设通讯方式接收上级控制对象发送的指令信号;Receive command signals sent by superior control objects through preset communication methods;

根据预设的指令信号与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。Determine the board identification of the board connected to the CPLD according to the preset correspondence library between the command signal and the board identification.

优选地,通过预设通讯方式接收上级控制对象发送的指令信号,包括:Preferably, the instruction signal sent by the superior control object is received through a preset communication method, including:

通过预设通讯方式接收上级控制对象通过控制可控开关和/或可控跳帽发送的指令信号。Receive the command signal sent by the superior control object through the control of the controllable switch and/or the controllable jump cap through the preset communication method.

优选地,所述上级控制对象包括设置在服务器中的BMC。Preferably, the upper-level control object includes a BMC installed in the server.

优选地,通过预设通讯方式接收上级控制对象发送的指令信号,包括:Preferably, the instruction signal sent by the superior control object is received through a preset communication method, including:

通过I2C总线接收设置在服务器中的BMC发送的指令信号。Receives command signals sent by the BMC installed in the server through the I2C bus.

优选地,所述板卡标识包括所述板卡的型号和所述板卡的版本信息。Preferably, the board identification includes a model of the board and version information of the board.

本发明还提供一种CPLD,包括烧录在所述CPLD中的CPLD固件,所述CPLD固件中预设有多个CPLD代码,包括:The present invention also provides a CPLD, including CPLD firmware burned in the CPLD, and a plurality of CPLD codes are preset in the CPLD firmware, including:

板卡监测模块,用于获取与所述CPLD连接的板卡的板卡标识;A board monitoring module, used to obtain the board identification of the board connected to the CPLD;

代码调用模块,用于根据所述板卡标识和预设的板卡标识与CPLD代码对应关系库,调用预设在所述CPLD固件中的CPLD代码,以基于所述CPLD代码对所述板卡进行控制。A code calling module, configured to call the CPLD code preset in the CPLD firmware according to the board identification and the preset correspondence library between the board identification and the CPLD code, so as to call the board card based on the CPLD code. Take control.

本发明还提供一种CPLD固件的多板卡共用装置,包括:The invention also provides a multi-board sharing device for CPLD firmware, which includes:

存储器,用于存储计算机程序;Memory, used to store computer programs;

处理器,用于执行所述计算机程序时实现如上述所述的CPLD固件的多板卡共用方法的步骤。A processor, configured to implement the steps of the multi-board card sharing method of CPLD firmware as described above when executing the computer program.

本发明还提供一种计算机可读存储介质,所述目标计算机可读存储介质上储存有计算机程序,所述目标计算机程序被处理器执行时实现如上述所述的CPLD固件的多板卡共用方法的步骤。The present invention also provides a computer-readable storage medium. A computer program is stored on the target computer-readable storage medium. When the target computer program is executed by a processor, the multi-board sharing method of CPLD firmware as described above is implemented. A step of.

本发明提供的一种CPLD固件的多板卡共用方法及相关组件,通过在CPLD固件中预设多个CPLD代码的方式,使得一个CPLD固件可以提供多种CPLD代码,即可以实现多种板卡功能;在获取与CPLD连接的板卡的板卡标识后,根据预设的板卡标识与CPLD代码对应关系库,为每个板卡提供特定的CPLD代码,就可以实现同一CPLD固件在不同板卡上使用,不需要编写新的CPLD代码、生成新的CPLD固件,减少了服务器开发工作量,提高开发效率,节约开发成本,实现板卡开发过程的流水化。The present invention provides a multi-board sharing method of CPLD firmware and related components. By presetting multiple CPLD codes in the CPLD firmware, one CPLD firmware can provide multiple CPLD codes, that is, multiple board cards can be implemented. Function; after obtaining the board ID of the board connected to the CPLD, provide a specific CPLD code for each board according to the preset correspondence library between the board ID and the CPLD code, so that the same CPLD firmware can be used on different boards. When used on the card, there is no need to write new CPLD code or generate new CPLD firmware, which reduces the workload of server development, improves development efficiency, saves development costs, and streamlines the board development process.

附图说明Description of the drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对现有技术和实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the prior art and the drawings needed to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the drawings of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.

图1为本发明实施例提供的一种CPLD固件的多板卡共用方法的流程图;Figure 1 is a flow chart of a method for sharing CPLD firmware with multiple boards provided by an embodiment of the present invention;

图2为本发明实施例提供的一种CPLD的结构示意图;Figure 2 is a schematic structural diagram of a CPLD provided by an embodiment of the present invention;

图3为本发明实施例提供的另一种CPLD的结构示意图;Figure 3 is a schematic structural diagram of another CPLD provided by an embodiment of the present invention;

图4为本发明实施例提供的一种CPLD固件的多板卡共用装置结构示意图;Figure 4 is a schematic structural diagram of a multi-board card sharing device of CPLD firmware provided by an embodiment of the present invention;

图5为本发明实施例提供的一种计算机可读存储介质的结构示意图。Figure 5 is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present invention.

具体实施方式Detailed ways

本发明的核心是提供一种CPLD固件的多板卡共用方法及相关组件,减少了服务器开发工作量,提高开发效率,节约开发成本,实现板卡开发过程的流水化。The core of the present invention is to provide a multi-board card sharing method of CPLD firmware and related components, which reduces the server development workload, improves development efficiency, saves development costs, and realizes the streamlining of the board development process.

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

请参考图1,图1为本发明实施例提供的一种CPLD固件的多板卡共用方法的流程图,应用于CPLD,CPLD包括烧录在CPLD中的CPLD固件,CPLD固件中预设有多个CPLD代码,方法包括:Please refer to Figure 1. Figure 1 is a flow chart of a method for sharing CPLD firmware with multiple boards provided by an embodiment of the present invention. It is applied to CPLD. CPLD includes CPLD firmware burned into the CPLD. There are multiple presets in the CPLD firmware. CPLD code, methods include:

S101:获取与自身连接的板卡的板卡标识;S101: Obtain the board ID of the board connected to itself;

S102:根据板卡标识和预设的板卡标识与CPLD代码对应关系库,调用预设在CPLD固件中的CPLD代码,以基于CPLD代码对板卡进行控制。S102: According to the board identification and the preset correspondence library between the board identification and the CPLD code, call the CPLD code preset in the CPLD firmware to control the board based on the CPLD code.

具体实施例中,CPLD根据与板卡连接的输入输出IO接口的电平变化信息或者上级控制对象发送的指令信号,确定与自身连接的板卡的板卡标识,板卡标识包含板卡的特定信息,通过板卡标识可以确定板卡的板卡型号和板卡的版本信息等,并可以根据这些板卡的特定信息,确定板卡需要实现的功能和实现功能相应需要的代码,即根据板卡标识和预设的板卡标识与CPLD代码对应关系库,在预设的多个CPLD代码查找到需要启用的CPLD代码,并基于该CPLD代码对板卡进行控制。In a specific embodiment, the CPLD determines the board identification of the board connected to itself based on the level change information of the input and output IO interface connected to the board or the instruction signal sent by the superior control object. The board identification includes the specific information of the board. Information, the board model and version information of the board can be determined through the board identification, and based on the specific information of these boards, the functions that the board needs to implement and the corresponding codes required to implement the functions can be determined, that is, according to the board Card identification and preset board identification and CPLD code correspondence library, find the CPLD code that needs to be enabled in multiple preset CPLD codes, and control the board based on the CPLD code.

本实施例并不限定与CPLD连接的板卡的板卡标识的具体内容,例如可以包括板卡的型号,或者可以包括板卡的版本信息,或者可以是其他内容,只要可以令CPLD识别出板卡的具体类型以使CPLD启用相应的CPLD代码对板卡进行控制即可,可以根据实际情况进行选择。This embodiment does not limit the specific content of the board identification of the board connected to the CPLD. For example, it may include the model of the board, or it may include the version information of the board, or it may be other contents, as long as the CPLD can identify the board. The specific type of card can be determined by enabling the CPLD to enable the corresponding CPLD code to control the board. You can select it according to the actual situation.

本实施例并不限定获取与自身连接的板卡的板卡标识的获取方法,例如可以通过与板卡连接的输入输出IO接口的电平变化信息确定板卡标识,或者可以通过预设通讯方式接收上级控制对象发送的指令信号确定板卡标识,或者可以是其他获取方式,应由本领域技术人员根据实际情况作出相应的设定。This embodiment is not limited to the method of obtaining the board identification of the board connected to itself. For example, the board identification can be determined through the level change information of the input and output IO interface connected to the board, or the board identification can be determined through a preset communication method. Receiving the instruction signal sent by the superior control object to determine the board identification, or other acquisition methods, should be made by those skilled in the art according to the actual situation.

本发明提供的一种CPLD固件的多板卡共用方法,通过在CPLD固件中预设多个CPLD代码的方式,使得一个CPLD固件可以提供多种CPLD代码,即可以实现多种板卡功能;在获取与CPLD连接的板卡的板卡标识后,根据预设的板卡标识与CPLD代码对应关系库,为每个板卡提供特定的CPLD代码,就可以实现同一CPLD固件在不同板卡上使用,不需要编写新的CPLD代码、生成新的CPLD固件,减少了服务器开发工作量,提高开发效率,节约开发成本,实现板卡开发过程的流水化。The present invention provides a method for sharing CPLD firmware with multiple boards, by presetting multiple CPLD codes in the CPLD firmware, so that one CPLD firmware can provide multiple CPLD codes, that is, multiple board card functions can be realized; After obtaining the board ID of the board connected to the CPLD, and providing a specific CPLD code for each board according to the preset correspondence library between the board ID and the CPLD code, the same CPLD firmware can be used on different boards. , there is no need to write new CPLD code or generate new CPLD firmware, which reduces the workload of server development, improves development efficiency, saves development costs, and streamlines the board development process.

在上述实施例的基础上:Based on the above embodiments:

作为一种优选地实施例,S101获取与CPLD连接的板卡的板卡标识,包括:As a preferred embodiment, S101 obtains the board identification of the board connected to the CPLD, including:

获取与板卡连接的输入输出IO接口的电平变化信息;Obtain the level change information of the input and output IO interface connected to the board;

根据预设的电平变化信息与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。Determine the board identification of the board connected to the CPLD according to the preset correspondence between the level change information and the board identification.

具体实施例中,由于不同板卡在硬件设计上存在差异,板卡上电后,对CPLD的输入输出IO接口会发送不同的电平信号,根据CPLD与板卡连接的输入输出IO接口的电平变化,预设电平变化信息与板卡标识对应关系库,根据预设的电平变化信息与板卡标识对应关系库可以确定与CPLD连接的板卡的板卡标识。本实施例通过与板卡连接的输入输出IO接口的电平变化信息确定与CPLD连接的板卡的板卡标识,根据板卡硬件设计的不同对板卡进行区分,可以实时对板卡进行检测,由CPLD自行识别板卡的板卡标识,节省人力,实现板卡开发过程的流水化。In specific embodiments, due to differences in hardware design of different boards, after the board is powered on, different level signals will be sent to the input and output IO interfaces of the CPLD. According to the voltage of the input and output IO interfaces connected between the CPLD and the board, Level change, preset level change information and board identification correspondence library, according to the preset level change information and board identification correspondence library can determine the board identification of the board connected to the CPLD. This embodiment determines the board identification of the board connected to the CPLD through the level change information of the input and output IO interface connected to the board, distinguishes the board according to the different hardware design of the board, and can detect the board in real time. , the CPLD identifies the board identification of the board by itself, saving manpower and streamlining the board development process.

作为一种优选地实施例,S101获取与CPLD连接的板卡的板卡标识,包括:As a preferred embodiment, S101 obtains the board identification of the board connected to the CPLD, including:

通过预设通讯方式接收上级控制对象发送的指令信号;Receive command signals sent by superior control objects through preset communication methods;

根据预设的指令信号与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。Determine the board identification of the board connected to the CPLD according to the preset correspondence library between the command signal and the board identification.

具体实施例中,可以通过设置特定指令信号的方式来告知CPLD当前板卡的板卡标识,本实施例并不限定指令信号的具体形式,例如可以是特定的高低电平,或者可以是特定的高低电平变化规律,或者是一段数据代码,或者是一个特定的标识等,应由本领域技术人员根据实际情况作出相应的设定。In a specific embodiment, the CPLD can be informed of the board identification of the current board by setting a specific command signal. This embodiment does not limit the specific form of the command signal. For example, it can be a specific high and low level, or it can be a specific The changing pattern of high and low levels, or a piece of data code, or a specific logo, etc., should be set accordingly by those skilled in the art according to the actual situation.

进一步的,本实施例并不限定上级控制对象发送的指令信号的具体方式,例如可以通过控制可控开关,将可控开关的不同状态作为不同的指令信号,或者可以通过控制可控跳帽,将可控跳帽的不同状态作为不同的指令信号,或者可以是上级控制对象的直接发送特定的信号电平作为指令信号,或者可以是其他方式,可以根据实际情况进行选择。相应的,本实施例并不限定预设通讯方式的具体实现方法,例如当通过控制可控开关,将可控开关的不同状态作为不同的指令信号时,可控开关是设置在板卡上的,预设通讯方式为可控开关与板卡上的CPLD的硬件连接;当上级控制对象的直接发送特定的信号电平作为指令信号,且上级控制对象为设置在服务器中的BMC时,预设通讯方式可以为通过I2C总线连接进行通信,可以根据实际情况进行选择。Furthermore, this embodiment does not limit the specific method of the instruction signal sent by the superior control object. For example, the controllable switch can be controlled to use different states of the controllable switch as different instruction signals, or the controllable jump cap can be controlled. The different states of the controllable jump cap can be used as different command signals, or the superior control object can directly send a specific signal level as the command signal, or it can be other methods, which can be selected according to the actual situation. Correspondingly, this embodiment does not limit the specific implementation method of the preset communication method. For example, when controlling the controllable switch and using different states of the controllable switch as different command signals, the controllable switch is set on the board card. , the default communication method is the hardware connection between the controllable switch and the CPLD on the board; when the superior control object directly sends a specific signal level as a command signal, and the superior control object is the BMC set in the server, the default The communication method can be communication through I2C bus connection, which can be selected according to the actual situation.

本实施例通过预设通讯方式接收上级控制对象发送的指令信号,以确定与CPLD连接的板卡的板卡标识,指令信号既可以根据BMC灵活设置,又可以通过硬件电路来控制,灵活性较高,有利于提高串口切换的准确性和切换效率。This embodiment uses a preset communication method to receive the instruction signal sent by the superior control object to determine the board identification of the board connected to the CPLD. The instruction signal can be flexibly set according to the BMC, and can also be controlled through the hardware circuit, which is more flexible. High, which is helpful to improve the accuracy and switching efficiency of serial port switching.

作为一种优选地实施例,通过预设通讯方式接收上级控制对象发送的指令信号,包括:As a preferred embodiment, receiving the instruction signal sent by the superior control object through a preset communication method includes:

通过预设通讯方式接收上级控制对象通过控制可控开关和/或可控跳帽发送的指令信号。Receive the command signal sent by the superior control object through the control of the controllable switch and/or the controllable jump cap through the preset communication method.

具体实施例中,可以使可控开关的连接和断开分别代表不同的指令信号,对应不同的板卡类型,也可以采用可控跳帽连接板卡的电源端和接地端,两个端口之间连接和断开分别代表不同的指令信号,对应不同的板卡类型,并不限制可控开关、可控板卡的数量,可以通过多个可控开关、可控板卡配合实现多种方式的指令信号发送。In specific embodiments, the connection and disconnection of the controllable switch can represent different command signals respectively, corresponding to different board types. A controllable jumper can also be used to connect the power end and the ground end of the board. Between the two ports, The connection and disconnection respectively represent different command signals, corresponding to different board types. There is no limit on the number of controllable switches and controllable boards. Various methods can be implemented through the cooperation of multiple controllable switches and controllable boards. The command signal is sent.

本实施例通过可控开关和/或可控跳帽发送指令信号,以硬件方式实现向CPLD发送信号,可控开关、可控跳帽价格便宜且便于更换,方便对板卡进行维修,也节约了开发成本,而且硬件控制的方式稳定性较高,提高了本方法的可靠性。In this embodiment, the command signal is sent through the controllable switch and/or the controllable jump cap, and the signal is sent to the CPLD in hardware. The controllable switch and controllable jump cap are cheap and easy to replace, which facilitates the maintenance of the board and saves money. The development cost is reduced, and the hardware control method is more stable, which improves the reliability of this method.

作为一种优选地实施例,上级控制对象包括设置在服务器中的BMC。As a preferred embodiment, the upper-level control object includes a BMC set in the server.

具体实施例中,可以是BMC通过I2C总线向CPLD发送板卡标识作为指令信号,也可以是BMC通过扩展的GPIO信号向CPLD发送高低电平信号作为指令信号。In a specific embodiment, the BMC may send the board identification to the CPLD as the command signal through the I2C bus, or the BMC may send the high and low level signals to the CPLD as the command signal through the extended GPIO signal.

本实施例将设置在服务器中的BMC作为上级控制对象,以软件方式实现向CPLD发送信号,占用板卡上空间少,更有利于板卡的集成化和小型化。This embodiment uses the BMC installed in the server as the upper-level control object to send signals to the CPLD in a software manner, which takes up less space on the board and is more conducive to the integration and miniaturization of the board.

作为一种优选地实施例,通过预设通讯方式接收上级控制对象发送的指令信号,包括:As a preferred embodiment, receiving the instruction signal sent by the superior control object through a preset communication method includes:

通过I2C总线接收设置在服务器中的BMC发送的指令信号。Receives command signals sent by the BMC installed in the server through the I2C bus.

本实施例通过I2C总线接收设置在服务器中的BMC发送的指令信号,使得CPLD可以直接接收BMC发送的板卡标识,智能化更高。This embodiment receives the instruction signal sent by the BMC installed in the server through the I2C bus, so that the CPLD can directly receive the board identification sent by the BMC, which is more intelligent.

作为一种优选地实施例,板卡标识包括板卡的型号和板卡的版本信息。As a preferred embodiment, the board identification includes the model of the board and the version information of the board.

本实施例将板卡的型号和板卡的版本信息都作为板卡标识,不同型号和不同版本的板卡的可以采用同一CPLD固件,无需因板卡版本升级而重新烧录新的CPLD固件,减少了板卡维护的成本,提高板卡维护的效率。This embodiment uses the board model and board version information as the board identification. Boards of different models and versions can use the same CPLD firmware, and there is no need to re-burn new CPLD firmware due to board card version upgrades. It reduces the cost of board maintenance and improves the efficiency of board maintenance.

请参考图2,图2为本发明实施例提供的一种CPLD的结构示意图:Please refer to Figure 2, which is a schematic structural diagram of a CPLD provided by an embodiment of the present invention:

本实施例中将烧录了CPLD固件的CPLD中分为功能选择层201和功能实现层202,功能选择层201中包括板卡监测模块211和代码调用模块212,功能实现层202包括多个不同的CPLD代码,板卡监测模块211用于获取与CPLD连接的板卡的板卡标识,代码调用模块212用于根据板卡标识和预设的板卡标识与CPLD代码对应关系库,调用预设在功能实现层202中的CPLD代码,以基于CPLD代码对板卡进行控制。In this embodiment, the CPLD with CPLD firmware burned into it is divided into a function selection layer 201 and a function implementation layer 202. The function selection layer 201 includes a board monitoring module 211 and a code calling module 212. The function implementation layer 202 includes multiple different CPLD code, the board monitoring module 211 is used to obtain the board identification of the board connected to the CPLD, and the code calling module 212 is used to call the preset according to the board identification and the preset correspondence library between the board identification and the CPLD code. The CPLD code in the function implementation layer 202 is used to control the board based on the CPLD code.

请参考图3,图3为本发明实施例提供的另一种CPLD的结构示意图,包括烧录在CPLD中的CPLD固件,CPLD固件中预设有多个CPLD代码,包括:Please refer to Figure 3. Figure 3 is a schematic structural diagram of another CPLD provided by an embodiment of the present invention, including CPLD firmware burned in the CPLD. The CPLD firmware is preset with multiple CPLD codes, including:

板卡监测模块301,用于获取与CPLD连接的板卡的板卡标识;The board monitoring module 301 is used to obtain the board identification of the board connected to the CPLD;

代码调用模块302,用于根据板卡标识和预设的板卡标识与CPLD代码对应关系库,调用预设在CPLD固件中的CPLD代码,以基于CPLD代码对板卡进行控制。The code calling module 302 is used to call the CPLD code preset in the CPLD firmware according to the board identification and the preset correspondence library between the board identification and the CPLD code, so as to control the board based on the CPLD code.

作为一种优选地实施例,板卡监测模块301,包括:As a preferred embodiment, the board monitoring module 301 includes:

电平检测模块,用于获取与板卡连接的输入输出IO接口的电平变化信息;The level detection module is used to obtain the level change information of the input and output IO interface connected to the board;

第一板卡确认模块,用于根据预设的电平变化信息与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。The first board confirmation module is used to determine the board identification of the board connected to the CPLD based on the preset correspondence between the level change information and the board identification.

作为一种优选地实施例,板卡监测模块301,包括:As a preferred embodiment, the board monitoring module 301 includes:

指令接收模块,用于通过预设通讯方式接收上级控制对象发送的指令信号;The command receiving module is used to receive the command signal sent by the superior control object through the preset communication method;

第二板卡确认模块,用于根据预设的指令信号与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。The second board confirmation module is used to determine the board identification of the board connected to the CPLD according to the preset correspondence library between the command signal and the board identification.

作为一种优选地实施例,指令接收模块,包括:As a preferred embodiment, the instruction receiving module includes:

硬件指令接收模块,用于通过预设通讯方式接收上级控制对象通过控制可控开关和/或可控跳帽发送的指令信号。The hardware command receiving module is used to receive the command signal sent by the superior control object through the control of the controllable switch and/or the controllable jump cap through the preset communication method.

作为一种优选地实施例,上级控制对象包括设置在服务器中的BMC。As a preferred embodiment, the upper-level control object includes a BMC set in the server.

作为一种优选地实施例,指令接收模块,包括:As a preferred embodiment, the instruction receiving module includes:

软件指令接收模块,用于通过I2C总线接收设置在服务器中的BMC发送的指令信号。The software command receiving module is used to receive command signals sent by the BMC set in the server through the I2C bus.

作为一种优选地实施例,板卡标识包括板卡的型号和板卡的版本信息。As a preferred embodiment, the board identification includes the model of the board and the version information of the board.

对于本发明提供的一种CPLD的介绍请参考上述实施例,本发明在此不做赘述。For an introduction to the CPLD provided by the present invention, please refer to the above embodiment, and the present invention will not be described in detail here.

请参考图4,图4为本发明实施例提供的一种CPLD固件的多板卡共用装置结构示意图,包括:Please refer to Figure 4. Figure 4 is a schematic structural diagram of a multi-board sharing device for CPLD firmware provided by an embodiment of the present invention, including:

存储器401,用于存储计算机程序;Memory 401, used to store computer programs;

处理器402,用于执行计算机程序时实现如上述的CPLD固件的多板卡共用方法的步骤。The processor 402 is configured to implement the steps of the above-mentioned CPLD firmware sharing method for multiple boards when executing a computer program.

对于本发明提供的一种CPLD固件的多板卡共用装置的介绍请参考上述实施例,本发明在此不做赘述。For an introduction to the multi-board sharing device of CPLD firmware provided by the present invention, please refer to the above embodiment, and the present invention will not be described in detail here.

请参考图5,图5为本发明实施例提供的一种计算机可读存储介质的结构示意图,目标计算机可读存储介质501上储存有计算机程序502,目标计算机程序502被处理器执行时实现如上述的CPLD固件的多板卡共用方法的步骤。Please refer to Figure 5. Figure 5 is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present invention. The target computer-readable storage medium 501 stores a computer program 502. When the target computer program 502 is executed by the processor, the following is implemented: The above-mentioned steps for sharing CPLD firmware with multiple boards.

对于本发明提供的一种计算机可读存储介质的介绍请参考上述实施例,本发明在此不做赘述。For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above embodiments, and the present invention will not be described in detail here.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on its differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For relevant details, please refer to the description in the method section.

还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or sequence between operations. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or apparatus that includes the stated element.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其他实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be practiced in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1.一种CPLD固件的多板卡共用方法,其特征在于,应用于CPLD,所述CPLD包括烧录在所述CPLD中的CPLD固件,所述CPLD固件中预设有多个CPLD代码,所述方法包括:1. A multi-board sharing method of CPLD firmware, characterized in that it is applied to CPLD, the CPLD includes CPLD firmware burned in the CPLD, and multiple CPLD codes are preset in the CPLD firmware, so The methods include: 获取与自身连接的板卡的板卡标识;Get the board ID of the board connected to itself; 根据所述板卡标识和预设的板卡标识与CPLD代码对应关系库,调用预设在所述CPLD固件中的CPLD代码,以基于所述CPLD代码对所述板卡进行控制。According to the board identification and the preset correspondence library between the board identification and the CPLD code, the CPLD code preset in the CPLD firmware is called to control the board based on the CPLD code. 2.如权利要求1所述的CPLD固件的多板卡共用方法,其特征在于,获取与CPLD连接的板卡的板卡标识,包括:2. The multi-board sharing method of CPLD firmware as claimed in claim 1, characterized in that obtaining the board identification of the board connected to the CPLD includes: 获取与板卡连接的输入输出IO接口的电平变化信息;Obtain the level change information of the input and output IO interface connected to the board; 根据预设的电平变化信息与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。Determine the board identification of the board connected to the CPLD according to the preset correspondence between the level change information and the board identification. 3.如权利要求1所述的CPLD固件的多板卡共用方法,其特征在于,获取与CPLD连接的板卡的板卡标识,包括:3. The multi-board sharing method of CPLD firmware as claimed in claim 1, characterized in that obtaining the board identification of the board connected to the CPLD includes: 通过预设通讯方式接收上级控制对象发送的指令信号;Receive command signals sent by superior control objects through preset communication methods; 根据预设的指令信号与板卡标识对应关系库确定与CPLD连接的板卡的板卡标识。Determine the board identification of the board connected to the CPLD according to the preset correspondence library between the command signal and the board identification. 4.如权利要求3所述的CPLD固件的多板卡共用方法,其特征在于,通过预设通讯方式接收上级控制对象发送的指令信号,包括:4. The multi-board sharing method of CPLD firmware according to claim 3, characterized in that receiving the command signal sent by the superior control object through a preset communication method includes: 通过预设通讯方式接收上级控制对象通过控制可控开关和/或可控跳帽发送的指令信号。Receive the command signal sent by the superior control object through the control of the controllable switch and/or the controllable jump cap through the preset communication method. 5.如权利要求3所述的CPLD固件的多板卡共用方法,其特征在于,所述上级控制对象包括设置在服务器中的BMC。5. The multi-board sharing method of CPLD firmware according to claim 3, characterized in that the upper-level control object includes a BMC set in the server. 6.如权利要求5所述的CPLD固件的多板卡共用方法,其特征在于,通过预设通讯方式接收上级控制对象发送的指令信号,包括:6. The multi-board sharing method of CPLD firmware according to claim 5, characterized in that receiving the command signal sent by the superior control object through a preset communication method includes: 通过I2C总线接收设置在服务器中的BMC发送的指令信号。Receives command signals sent by the BMC installed in the server through the I2C bus. 7.如权利要求1至6任一项所述的CPLD固件的多板卡共用方法,其特征在于,所述板卡标识包括所述板卡的型号和所述板卡的版本信息。7. The multi-board sharing method of CPLD firmware according to any one of claims 1 to 6, characterized in that the board identification includes the model of the board and the version information of the board. 8.一种CPLD,其特征在于,包括烧录在所述CPLD中的CPLD固件,所述CPLD固件中预设有多个CPLD代码,包括:8. A CPLD, characterized in that it includes CPLD firmware burned in the CPLD, and a plurality of CPLD codes are preset in the CPLD firmware, including: 板卡监测模块,用于获取与所述CPLD连接的板卡的板卡标识;A board monitoring module, used to obtain the board identification of the board connected to the CPLD; 代码调用模块,用于根据所述板卡标识和预设的板卡标识与CPLD代码对应关系库,调用预设在所述CPLD固件中的CPLD代码,以基于所述CPLD代码对所述板卡进行控制。A code calling module, configured to call the CPLD code preset in the CPLD firmware according to the board identification and the preset correspondence library between the board identification and the CPLD code, so as to call the board card based on the CPLD code. Take control. 9.一种CPLD固件的多板卡共用装置,其特征在于,包括:9. A multi-board sharing device for CPLD firmware, characterized in that it includes: 存储器,用于存储计算机程序;Memory, used to store computer programs; 处理器,用于执行所述计算机程序时实现如权利要求1至7任一项所述的CPLD固件的多板卡共用方法的步骤。A processor, configured to implement the steps of the multi-board card sharing method of CPLD firmware according to any one of claims 1 to 7 when executing the computer program. 10.一种计算机可读存储介质,其特征在于,所述目标计算机可读存储介质上储存有计算机程序,所述目标计算机程序被处理器执行时实现如权利要求1至7任一项所述的CPLD固件的多板卡共用方法的步骤。10. A computer-readable storage medium, characterized in that a computer program is stored on the target computer-readable storage medium, and when the target computer program is executed by a processor, the target computer program implements the method described in any one of claims 1 to 7 Steps for sharing CPLD firmware with multiple boards.
CN202310896797.7A 2023-07-20 2023-07-20 A multi-board sharing method of CPLD firmware and related components Pending CN116860219A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310896797.7A CN116860219A (en) 2023-07-20 2023-07-20 A multi-board sharing method of CPLD firmware and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310896797.7A CN116860219A (en) 2023-07-20 2023-07-20 A multi-board sharing method of CPLD firmware and related components

Publications (1)

Publication Number Publication Date
CN116860219A true CN116860219A (en) 2023-10-10

Family

ID=88228444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310896797.7A Pending CN116860219A (en) 2023-07-20 2023-07-20 A multi-board sharing method of CPLD firmware and related components

Country Status (1)

Country Link
CN (1) CN116860219A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118210529A (en) * 2024-05-17 2024-06-18 成都领目科技有限公司 Upgrading device, upgrading and starting loading method for board card firmware of optimizing machine frame type equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118210529A (en) * 2024-05-17 2024-06-18 成都领目科技有限公司 Upgrading device, upgrading and starting loading method for board card firmware of optimizing machine frame type equipment

Similar Documents

Publication Publication Date Title
US12401567B2 (en) Server management method, apparatus and system, and electronic device and readable storage medium
CN108363581B (en) Data writing method, system, device, equipment and medium of integrated circuit chip
US7822964B2 (en) Booting apparatus for booting a computer and method therefor and computer with a booting apparatus
CN114003538A (en) Intelligent network card and identification method thereof
CN112068885A (en) Screen self-adaptive driving method and device
CN117472289B (en) Storage configuration adjustment method, device, system, equipment and medium of server
CN107678988A (en) A kind of multifunctional serial port device and implementation method
US20210165661A1 (en) Automated bios platform configuration system
CN119718996A (en) Hot plug control method, hot plug system, medium and program product
CN116860219A (en) A multi-board sharing method of CPLD firmware and related components
WO2025001306A1 (en) Switch device, and serial communication interface switching method and apparatus
CN112260257A (en) Power management device and method
CN113535213A (en) Firmware updating method and system for programmable logic device
CN115934605A (en) A RISER card and its configuration method, device and readable storage medium
CN115470054A (en) A server memory function testing method, system, device and storage medium
CN103902298A (en) Instruction set firmware recovery state information setting method and device
CN119248559A (en) Fault handling method, device, equipment and medium
CN117370118A (en) Method, device and equipment for detecting hard disk slot number and readable storage medium
CN113297119B (en) A wireless communication device for a server
CN112882715B (en) Measurement and control device definition method, computer and definable measurement and control device
CN116932003A (en) A power-on configuration circuit and method for a multi-FPGA system
US10936329B2 (en) Systems and methods for dynamically electrically margining devices in an information handling system
CN115470173A (en) A communication switching system, method, device and readable storage medium
CN111027104A (en) Method, device and mainboard for preventing loss of network card identification data
CN120179592B (en) Multi-slave control system, method, device, program product and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination