Method for obtaining address of accelerator card and related components

CN115543904BActive Publication Date: 2026-09-22INSPUR (BEIJING) ELECTRONICS INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211260365.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-14
Publication Date
2026-09-22
Estimated Expiration
2042-10-14

AI Technical Summary

Benefits of technology

[0033]本申请提供了一种加速卡地址的获取方法及相关组件,应用于计算机领域,在加速卡接入主机时,为加速卡配置对应的PCIE参数;通过PCIE参数读取加速卡的MAC地址;将MAC地址保存至预设存储空间中。在加速卡接入主机时为加速卡配置加速卡对应的PCIE参数,通过PCIE参数才能读取到加速卡的MAC地址,在读取到MAC地址后保存至预设存储空间中,便于后续调用。本申请能自动识别到加速卡的MAC地址,便于用户后续对加速卡的配置。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543904B_ABST
    Figure CN115543904B_ABST
Patent Text Reader

Abstract

The application discloses a method for obtaining an address of an acceleration card and related components, and is applied to the field of computers, wherein when the acceleration card accesses a host computer, corresponding PCIE parameters of the acceleration card are configured; the MAC address of the acceleration card is read through the PCIE parameters; and the MAC address is saved in a preset storage space. When the acceleration card accesses the host computer, the corresponding PCIE parameters of the acceleration card are configured, the MAC address of the acceleration card can be read through the PCIE parameters, and after the MAC address is read, the MAC address is saved in the preset storage space, thereby facilitating subsequent calling. The application can automatically identify the MAC address of the acceleration card, thereby facilitating subsequent configuration of the acceleration card by a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and in particular to a method for obtaining the address of an accelerator card and related components. Background Technology

[0002] In establishing a network communication connection between an FPGA (Field Programmable Gate Array) accelerator card and a host server, a crucial prerequisite before configuring the FPGA accelerator card's MAC (Media Access Control) address is knowing its MAC address. Since FPGA accelerator cards are frequently circulated among engineers, their MAC addresses are often not marked on their surfaces, and they are rarely properly registered for future use. Because the MAC address of an FPGA accelerator card cannot be directly obtained through network configuration commands, acquiring the MAC address before use is extremely important. Summary of the Invention

[0003] The purpose of this invention is to provide a method for obtaining the accelerator card address and related components, which can automatically identify the MAC address of the accelerator card, facilitating subsequent configuration of the accelerator card by the user.

[0004] To solve the above-mentioned technical problems, the present invention provides a method for obtaining an accelerator card address, comprising:

[0005] When the accelerator card is connected to the host, the corresponding PCIe parameters are configured for the accelerator card;

[0006] The MAC address of the accelerator card is read using the PCIE parameters;

[0007] Save the MAC address to a preset storage space.

[0008] Preferably, when the accelerator card is connected to the host, the corresponding PCIe parameters are configured for the accelerator card, including:

[0009] When the accelerator card is sequentially connected to the first optical module, optical fiber, second optical module and network card, and the accelerator card and the network card are respectively connected to the host, the corresponding PCIE parameters are configured for the accelerator card.

[0010] The first optical module, the second optical module, and the optical fiber are used to provide a network for the accelerator card.

[0011] Preferably, the corresponding PCIe parameters are configured for the accelerator card, including:

[0012] Identify the type of the accelerator card;

[0013] The PCIe parameters corresponding to the type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and the PCIe parameters.

[0014] Preferably, before reading the MAC address of the accelerator card through the PCIe parameters, the method further includes:

[0015] Determine whether the accelerator card is identified through the PCIe parameters;

[0016] If the accelerator card is detected, proceed to the step of reading the MAC address of the accelerator card through the PCIE parameters;

[0017] If the accelerator card is not detected, return to the step of configuring the corresponding PCIe parameters for the accelerator card.

[0018] Preferably, reading the MAC address of the accelerator card through the PCIe parameters includes:

[0019] The data in the register storing the MAC address in the accelerator card is read using the PCIE parameters.

[0020] Preferably, the register includes a first preset position and a second preset position;

[0021] Reading data from the register storing the MAC address in the accelerator card via PCIe parameters includes:

[0022] The high-order and low-order addresses of the MAC address are read from the first preset location and the second preset location respectively using the PCIE parameters;

[0023] The MAC address is obtained by combining the high-order address and the low-order address.

[0024] To address the aforementioned technical problems, the present invention also provides a system for obtaining an accelerator card address, comprising:

[0025] The configuration unit is used to configure the corresponding PCIe parameters for the accelerator card when the accelerator card is connected to the host.

[0026] A reading unit is used to read the MAC address of the accelerator card through the PCIE parameters;

[0027] A storage unit is used to save the MAC address to a preset storage space.

[0028] To address the aforementioned technical problems, the present invention also provides a device for obtaining an accelerator card address, comprising:

[0029] Memory, used to store computer programs;

[0030] A processor is used to implement the steps of the above-described method for obtaining the accelerator card address when executing the computer program.

[0031] To solve the above-mentioned technical problems, the present invention also provides a host computer, including the above-mentioned accelerator card address acquisition device.

[0032] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for obtaining the accelerator card address.

[0033] This application provides a method and related components for obtaining the address of an accelerator card, applicable to the computer field. When the accelerator card is connected to a host, corresponding PCIe parameters are configured for the accelerator card; the MAC address of the accelerator card is read through the PCIe parameters; and the MAC address is saved to a preset storage space. Configuring the corresponding PCIe parameters for the accelerator card when it is connected to the host is necessary to read the MAC address. After reading the MAC address, it is saved to the preset storage space for later retrieval. This application can automatically identify the MAC address of the accelerator card, facilitating subsequent configuration by the user. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 A flowchart illustrating a method for obtaining an accelerator card address provided by the present invention;

[0036] Figure 2 This invention provides a schematic diagram of an accelerator card connection structure;

[0037] Figure 3 A program implementation diagram for reading addresses from an accelerator card is provided for this invention;

[0038] Figure 4 A schematic diagram of the structure of an accelerator card address acquisition system provided by the present invention;

[0039] Figure 5 This is a schematic diagram of the structure of an accelerator card address acquisition device provided by the present invention. Detailed Implementation

[0040] The core of this invention is to provide a method for obtaining the accelerator card address and related components, which can automatically identify the MAC address of the accelerator card, making it easier for users to configure the accelerator card subsequently.

[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0042] Figure 1 A flowchart of a method for obtaining an accelerator card address provided by the present invention, the method comprising:

[0043] S11: When the accelerator card is connected to the host, configure the corresponding PCIE (peripheral component interconnect express, high-speed serial computer expansion bus standard) parameters for the accelerator card;

[0044] In establishing a network communication connection between an FPGA (Field Programmable Gate Array) accelerator card and a host server, a crucial prerequisite before configuring the FPGA accelerator card's MAC (Media Access Control) address is knowing its MAC address. Since FPGA accelerator cards are frequently circulated among engineers, their MAC addresses are often not marked on their surfaces, and they are rarely properly registered for future use. Because the MAC address of an FPGA accelerator card cannot be directly obtained through network configuration commands, acquiring the MAC address before use is extremely important.

[0045] This application configures the corresponding PCIe parameters for the accelerator card when it is connected to the host. Only after configuring the PCIe parameters can the MAC address of the accelerator card be obtained.

[0046] S12: Read the MAC address of the accelerator card through PCIe parameters;

[0047] The MAC address of the accelerator card can only be read after configuring the PCIe parameters. Specifically, the program can only be burned to the accelerator card after configuring the PCIe parameters, and then the MAC address of the accelerator card can be obtained.

[0048] S13: Save the MAC address to the preset storage space.

[0049] After obtaining the MAC address, save it to the preset storage space so that the host can retrieve the MAC address from the storage space for subsequent configuration.

[0050] This application provides a method for obtaining the address of an accelerator card, applied in the computer field. When the accelerator card is connected to a host, corresponding PCIe parameters are configured for the accelerator card; the MAC address of the accelerator card is read through the PCIe parameters; and the MAC address is saved to a preset storage space. Configuring the corresponding PCIe parameters for the accelerator card when it is connected to the host is necessary to read the accelerator card's MAC address. After reading the MAC address, it is saved to the preset storage space for later retrieval. This application can automatically identify the MAC address of the accelerator card, facilitating subsequent configuration by the user.

[0051] Based on the above embodiments:

[0052] Figure 2 This invention provides a schematic diagram of an accelerator card connection structure;

[0053] In a preferred embodiment, when the accelerator card is connected to the host, the corresponding PCIe parameters are configured for the accelerator card, including:

[0054] When the accelerator card is connected to the first optical module, optical fiber, second optical module and network card in sequence, and the accelerator card and network card are connected to the host respectively, configure the corresponding PCIe parameters for the accelerator card.

[0055] The first optical module, the second optical module, and the optical fiber are used to provide a network for the accelerator card.

[0056] Considering that the accelerator card needs to be connected to the network to operate, the accelerator card is connected to the first optical module, the first optical module is connected to the second optical module through an optical fiber, the second optical module is connected to the network card, and the accelerator card can connect to the network when the network card is connected to the host.

[0057] Once the hardware environment for the accelerator card is set up, it can achieve network connectivity in order to obtain the MAC address later.

[0058] As a preferred embodiment, the corresponding PCIe parameters are configured for the accelerator card, including:

[0059] Identify the type of accelerator card;

[0060] The corresponding PCIe parameters for each type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and PCIe parameters.

[0061] Given that there are many types of accelerator cards, and each accelerator card has its corresponding PCIe parameters, it is necessary to identify the type of accelerator card in advance in order to configure the corresponding PCIe parameters for the accelerator card.

[0062] The program can only be burned to the accelerator card by configuring the corresponding PCIe parameters.

[0063] In addition, the path location and environment variables need to be configured.

[0064] As a preferred embodiment, before reading the accelerator card's MAC address via PCIe parameters, the following steps are also included:

[0065] Determine whether the accelerator card is identified through PCIe parameters;

[0066] If the accelerator card is detected, proceed to the step of reading the accelerator card's MAC address through PCIe parameters;

[0067] If the accelerator card is not detected, return to the steps for configuring the corresponding PCIe parameters for the accelerator card.

[0068] If the accelerator card is successfully identified through the PCIe parameters, it proves that the PCIe parameters have been configured successfully, and the next step of reading the MAC address can be performed. If the accelerator card is not identified, it may be due to a failure in parameter configuration, which prevents the accelerator card from being identified. Therefore, the PCIe parameters need to be reconfigured.

[0069] As a preferred embodiment, reading the MAC address of the accelerator card via PCIe parameters includes:

[0070] The data in the register that stores the MAC address in the accelerator card is read using the PCIe parameters.

[0071] The accelerator card has a corresponding location that stores its MAC address. Specifically, the MAC address of the accelerator card is stored in the register of the accelerator card. Therefore, the MAC address of the accelerator card can be obtained by reading the register at the corresponding location.

[0072] In a preferred embodiment, the register includes a first preset position and a second preset position;

[0073] Data is read from the register storing the MAC address in the accelerator card via PCIe parameters, including:

[0074] The high and low bits of the MAC address are read from the first and second preset positions respectively using the PCIe parameters.

[0075] The MAC address is obtained by combining the high-order address and the low-order address.

[0076] Considering that the accelerator card stores the MAC address in two parts, high and low, it will read from the register that stores the high part and the register that stores the low part respectively during the reading process.

[0077] Figure 3 This is a flowchart illustrating the program implementation for reading addresses using an accelerator card, as provided by the present invention.

[0078] The address read from bit 0x30038 is 0x9791D2ED, and the address read from bit 0x3003C is 0xFAFA, so the MAC address of this register is 0xFAFA9791D2ED.

[0079] Figure 4 This is a schematic diagram of a system for obtaining the address of an accelerator card provided by the present invention. The system includes:

[0080] Configuration unit 41 is used to configure the corresponding PCIe parameters for the accelerator card when the accelerator card is connected to the host.

[0081] Reading unit 42 is used to read the MAC address of the accelerator card through PCIe parameters;

[0082] The storage unit 43 is used to save the MAC address to a preset storage space.

[0083] Specifically, configuration unit 41 is used to configure corresponding PCIE parameters for the accelerator card when the accelerator card is connected to the first optical module, optical fiber, second optical module and network card in sequence, and when the accelerator card and network card are connected to the host respectively.

[0084] The first optical module, the second optical module, and the optical fiber are used to provide a network for the accelerator card.

[0085] Identify the type of accelerator card;

[0086] The corresponding PCIe parameters for each type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and PCIe parameters.

[0087] It also includes a judgment unit to determine whether the accelerator card is identified through PCIe parameters;

[0088] If the accelerator card is detected, proceed to the step of reading the accelerator card's MAC address through PCIe parameters;

[0089] If the accelerator card is not detected, return to the steps for configuring the corresponding PCIe parameters for the accelerator card.

[0090] The reading unit 42 is specifically used to read data from the register that stores the MAC address in the accelerator card through PCIE parameters.

[0091] The register includes a first preset position and a second preset position;

[0092] Data is read from the register storing the MAC address in the accelerator card via PCIe parameters, including:

[0093] The high and low bits of the MAC address are read from the first and second preset positions respectively using the PCIe parameters.

[0094] The MAC address is obtained by combining the high-order address and the low-order address.

[0095] In establishing a network communication connection between an FPGA (Field Programmable Gate Array) accelerator card and a host server, a crucial prerequisite before configuring the FPGA accelerator card's MAC (Media Access Control) address is knowing its MAC address. Since FPGA accelerator cards are frequently circulated among engineers, their MAC addresses are often not marked on their surfaces, and they are rarely properly registered for future use. Because the MAC address of an FPGA accelerator card cannot be directly obtained through network configuration commands, acquiring the MAC address before use is extremely important.

[0096] This application requires configuring corresponding PCIe parameters for the accelerator card when it is connected to the host. Only after configuring the PCIe parameters can the accelerator card's MAC address be obtained. Specifically, configuring the PCIe parameters is necessary before the program can be burned to the accelerator card, and only then can the accelerator card's MAC address be obtained subsequently.

[0097] After obtaining the MAC address, save it to the preset storage space so that the host can retrieve the MAC address from the storage space for subsequent configuration.

[0098] This application provides a system for obtaining the accelerator card address, applied in the computer field. When the accelerator card is connected to a host, corresponding PCIe parameters are configured for the accelerator card; the MAC address of the accelerator card is read through the PCIe parameters; and the MAC address is saved to a preset storage space. The accelerator card's corresponding PCIe parameters are configured when it is connected to the host, and the MAC address can only be read through these parameters. After the MAC address is read, it is saved to the preset storage space for later retrieval. This application can automatically identify the accelerator card's MAC address, facilitating subsequent configuration of the accelerator card by the user.

[0099] The description of the accelerator card address acquisition system provided in this application is similar to the above embodiments and will not be repeated here.

[0100] Figure 5 This is a schematic diagram of a device for obtaining the address of an accelerator card provided by the present invention. The device includes:

[0101] Memory 51 is used to store computer programs;

[0102] The processor 52 is used to implement the steps of the above-described method for obtaining the accelerator card address when executing a computer program.

[0103] The specific steps of implementing a computer program are as follows:

[0104] When the accelerator card is connected to the host, configure the corresponding PCIe parameters for the accelerator card;

[0105] Read the MAC address of the accelerator card through PCIe parameters;

[0106] Save the MAC address to the preset storage space.

[0107] When the accelerator card is connected to the host, configure the corresponding PCIe parameters for the accelerator card, including:

[0108] When the accelerator card is connected to the first optical module, optical fiber, second optical module and network card in sequence, and the accelerator card and network card are connected to the host respectively, configure the corresponding PCIe parameters for the accelerator card.

[0109] The first optical module, the second optical module, and the optical fiber are used to provide a network for the accelerator card.

[0110] Configure the corresponding PCIe parameters for the accelerator card, including:

[0111] Identify the type of accelerator card;

[0112] The corresponding PCIe parameters for each type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and PCIe parameters.

[0113] Before reading the accelerator card's MAC address via PCIe parameters, the following steps are also included:

[0114] Determine whether the accelerator card is identified through PCIe parameters;

[0115] If the accelerator card is detected, proceed to the step of reading the accelerator card's MAC address through PCIe parameters;

[0116] If the accelerator card is not detected, return to the steps for configuring the corresponding PCIe parameters for the accelerator card.

[0117] Read the accelerator card's MAC address through PCIe parameters, including:

[0118] The data in the register that stores the MAC address in the accelerator card is read using the PCIe parameters.

[0119] The register includes a first preset position and a second preset position;

[0120] Data is read from the register storing the MAC address in the accelerator card via PCIe parameters, including:

[0121] The high and low bits of the MAC address are read from the first and second preset positions respectively using the PCIe parameters.

[0122] The MAC address is obtained by combining the high-order address and the low-order address.

[0123] In establishing a network communication connection between an FPGA (Field Programmable Gate Array) accelerator card and a host server, a crucial prerequisite before configuring the FPGA accelerator card's MAC (Media Access Control) address is knowing its MAC address. Since FPGA accelerator cards are frequently circulated among engineers, their MAC addresses are often not marked on their surfaces, and they are rarely properly registered for future use. Because the MAC address of an FPGA accelerator card cannot be directly obtained through network configuration commands, acquiring the MAC address before use is extremely important.

[0124] This application requires configuring corresponding PCIe parameters for the accelerator card when it is connected to the host. Only after configuring the PCIe parameters can the accelerator card's MAC address be obtained. Specifically, configuring the PCIe parameters is necessary before the program can be burned to the accelerator card, and only then can the accelerator card's MAC address be obtained subsequently.

[0125] After obtaining the MAC address, save it to the preset storage space so that the host can retrieve the MAC address from the storage space for subsequent configuration.

[0126] This application provides a device for obtaining the accelerator card address, applied in the computer field. When the accelerator card is connected to a host, it configures corresponding PCIe parameters for the accelerator card; reads the accelerator card's MAC address through the PCIe parameters; and saves the MAC address to a preset storage space. Configuring the corresponding PCIe parameters for the accelerator card when it is connected to the host is necessary to read the accelerator card's MAC address. After reading the MAC address, it is saved to the preset storage space for later retrieval. This application can automatically identify the accelerator card's MAC address, facilitating subsequent configuration of the accelerator card by the user.

[0127] Please refer to the above embodiments for a description of the device for obtaining the accelerator card address provided in this application, and it will not be repeated here.

[0128] This application also provides a host computer that includes the aforementioned accelerator card address acquisition device.

[0129] The host provided in this application includes a processor 52, which can perform the following steps:

[0130] The specific steps of implementing a computer program are as follows:

[0131] When the accelerator card is connected to the host, configure the corresponding PCIe parameters for the accelerator card;

[0132] Read the MAC address of the accelerator card through PCIe parameters;

[0133] Save the MAC address to the preset storage space.

[0134] When the accelerator card is connected to the host, configure the corresponding PCIe parameters for the accelerator card, including:

[0135] When the accelerator card is connected to the first optical module, optical fiber, second optical module and network card in sequence, and the accelerator card and network card are connected to the host respectively, configure the corresponding PCIe parameters for the accelerator card.

[0136] The first optical module, the second optical module, and the optical fiber are used to provide a network for the accelerator card.

[0137] Configure the corresponding PCIe parameters for the accelerator card, including:

[0138] Identify the type of accelerator card;

[0139] The corresponding PCIe parameters for each type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and PCIe parameters.

[0140] Before reading the accelerator card's MAC address via PCIe parameters, the following steps are also included:

[0141] Determine whether the accelerator card is identified through PCIe parameters;

[0142] If the accelerator card is detected, proceed to the step of reading the accelerator card's MAC address through PCIe parameters;

[0143] If the accelerator card is not detected, return to the steps for configuring the corresponding PCIe parameters for the accelerator card.

[0144] Read the accelerator card's MAC address through PCIe parameters, including:

[0145] The data in the register that stores the MAC address in the accelerator card is read using the PCIe parameters.

[0146] The register includes a first preset position and a second preset position;

[0147] Data is read from the register storing the MAC address in the accelerator card via PCIe parameters, including:

[0148] The high and low bits of the MAC address are read from the first and second preset positions respectively using the PCIe parameters.

[0149] The MAC address is obtained by combining the high-order address and the low-order address.

[0150] In establishing a network communication connection between an FPGA (Field Programmable Gate Array) accelerator card and a host server, a crucial prerequisite before configuring the FPGA accelerator card's MAC (Media Access Control) address is knowing its MAC address. Since FPGA accelerator cards are frequently circulated among engineers, their MAC addresses are often not marked on their surfaces, and they are rarely properly registered for future use. Because the MAC address of an FPGA accelerator card cannot be directly obtained through network configuration commands, acquiring the MAC address before use is extremely important.

[0151] This application requires configuring corresponding PCIe parameters for the accelerator card when it is connected to the host. Only after configuring the PCIe parameters can the accelerator card's MAC address be obtained. Specifically, configuring the PCIe parameters is necessary before the program can be burned to the accelerator card, and only then can the accelerator card's MAC address be obtained subsequently.

[0152] After obtaining the MAC address, save it to the preset storage space so that the host can retrieve the MAC address from the storage space for subsequent configuration.

[0153] This application provides a host computer system that configures corresponding PCIe parameters for an accelerator card when the card is connected to the host. The system reads the accelerator card's MAC address using these parameters and saves the MAC address to a preset storage space. The process of configuring the accelerator card's corresponding PCIe parameters upon connection allows the system to read the accelerator card's MAC address. After reading the MAC address, it is saved to the preset storage space for later retrieval. This application automatically identifies the accelerator card's MAC address, facilitating subsequent configuration by the user.

[0154] The host provided in this application is described in the above embodiments and will not be repeated here.

[0155] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for obtaining the accelerator card address.

[0156] The specific steps of implementing a computer program are as follows:

[0157] When the accelerator card is connected to the host, configure the corresponding PCIe parameters for the accelerator card;

[0158] Read the MAC address of the accelerator card through PCIe parameters;

[0159] Save the MAC address to the preset storage space.

[0160] When the accelerator card is connected to the host, configure the corresponding PCIe parameters for the accelerator card, including:

[0161] When the accelerator card is connected to the first optical module, optical fiber, second optical module and network card in sequence, and the accelerator card and network card are connected to the host respectively, configure the corresponding PCIe parameters for the accelerator card.

[0162] The first optical module, the second optical module, and the optical fiber are used to provide a network for the accelerator card.

[0163] Configure the corresponding PCIe parameters for the accelerator card, including:

[0164] Identify the type of accelerator card;

[0165] The corresponding PCIe parameters for each type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and PCIe parameters.

[0166] Before reading the accelerator card's MAC address via PCIe parameters, the following steps are also included:

[0167] Determine whether the accelerator card is identified through PCIe parameters;

[0168] If the accelerator card is detected, proceed to the step of reading the accelerator card's MAC address through PCIe parameters;

[0169] If the accelerator card is not detected, return to the steps for configuring the corresponding PCIe parameters for the accelerator card.

[0170] Read the accelerator card's MAC address through PCIe parameters, including:

[0171] The data in the register that stores the MAC address in the accelerator card is read using the PCIe parameters.

[0172] The register includes a first preset position and a second preset position;

[0173] Data is read from the register storing the MAC address in the accelerator card via PCIe parameters, including:

[0174] The high and low bits of the MAC address are read from the first and second preset positions respectively using the PCIe parameters.

[0175] The MAC address is obtained by combining the high-order address and the low-order address.

[0176] In establishing a network communication connection between an FPGA (Field Programmable Gate Array) accelerator card and a host server, a crucial prerequisite before configuring the FPGA accelerator card's MAC (Media Access Control) address is knowing its MAC address. Since FPGA accelerator cards are frequently circulated among engineers, their MAC addresses are often not marked on their surfaces, and they are rarely properly registered for future use. Because the MAC address of an FPGA accelerator card cannot be directly obtained through network configuration commands, acquiring the MAC address before use is extremely important.

[0177] This application requires configuring corresponding PCIe parameters for the accelerator card when it is connected to the host. Only after configuring the PCIe parameters can the accelerator card's MAC address be obtained. Specifically, configuring the PCIe parameters is necessary before the program can be burned to the accelerator card, and only then can the accelerator card's MAC address be obtained subsequently.

[0178] After obtaining the MAC address, save it to the preset storage space so that the host can retrieve the MAC address from the storage space for subsequent configuration.

[0179] This application provides a computer-readable storage medium applied in the computer field. When an accelerator card is connected to a host, it configures corresponding PCIe parameters for the accelerator card; reads the accelerator card's MAC address through the PCIe parameters; and saves the MAC address to a preset storage space. Configuring the corresponding PCIe parameters for the accelerator card when it is connected to the host is necessary to read the accelerator card's MAC address. After reading the MAC address, it is saved to the preset storage space for later retrieval. This application can automatically identify the accelerator card's MAC address, facilitating subsequent configuration of the accelerator card by the user.

[0180] The description of the computer-readable storage medium provided in this application is given in the above embodiments and will not be repeated here.

[0181] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0182] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0183] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not 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

1. A method for obtaining an accelerator card address, characterized in that, include: When the accelerator card is connected to the host, the corresponding PCIe parameters are configured for the accelerator card; The MAC address of the accelerator card is read using the PCIE parameters; Save the MAC address to a preset storage space; When the accelerator card is connected to the host, the corresponding PCIe parameters are configured for the accelerator card, including: When the accelerator card is sequentially connected to the first optical module, the optical fiber, the second optical module, and the network card, and when the accelerator card and the network card are respectively connected to the host, the type of the accelerator card is identified; the first optical module, the second optical module, and the optical fiber are used to provide network access for the accelerator card. The PCIE parameters corresponding to the type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and the PCIE parameters. Before reading the MAC address of the accelerator card through the PCIe parameters, the process also includes: Determine whether the accelerator card is identified through the PCIe parameters; If the accelerator card is detected, proceed to the step of reading the MAC address of the accelerator card through the PCIE parameters; If the accelerator card is not detected, return to the step of configuring the corresponding PCIe parameters for the accelerator card; The register includes a first preset location and a second preset location. The MAC address of the accelerator card is read through the PCIe parameters, including: The high-order and low-order addresses of the MAC address are read from the first preset location and the second preset location respectively using the PCIE parameters; The MAC address is obtained by combining the high-order address and the low-order address.

2. A system for obtaining the address of an accelerator card, characterized in that, include: The configuration unit is used to configure the corresponding PCIe parameters for the accelerator card when the accelerator card is connected to the host. A reading unit is used to read the MAC address of the accelerator card through the PCIE parameters; A storage unit is used to save the MAC address to a preset storage space; When the accelerator card is connected to the host, the corresponding PCIe parameters are configured for the accelerator card, including: When the accelerator card is sequentially connected to the first optical module, the optical fiber, the second optical module, and the network card, and when the accelerator card and the network card are respectively connected to the host, the type of the accelerator card is identified; the first optical module, the second optical module, and the optical fiber are used to provide network access for the accelerator card. The PCIE parameters corresponding to the type of accelerator card are determined based on the pre-stored correspondence between the accelerator card type and the PCIE parameters. The system for obtaining the accelerator card address is also used for: Before reading the MAC address of the accelerator card through the PCIe parameters, determine whether the accelerator card can be identified through the PCIe parameters; If the accelerator card is detected, proceed to the step of reading the MAC address of the accelerator card through the PCIE parameters; If the accelerator card is not detected, return to the step of configuring the corresponding PCIe parameters for the accelerator card; The register includes a first preset location and a second preset location. The MAC address of the accelerator card is read through the PCIe parameters, including: The high-order and low-order addresses of the MAC address are read from the first preset location and the second preset location respectively using the PCIE parameters; The MAC address is obtained by combining the high-order address and the low-order address.

3. A device for obtaining the address of an accelerator card, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the method for obtaining the accelerator card address as described in claim 1 when executing the computer program.

4. A host computer, characterized in that, Includes the accelerator card address acquisition device as described in claim 3.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for obtaining the accelerator card address as described in claim 1.

Citation Information

Patent Citations

  • Accelerator card, MAC address generation method and device thereof, and storage medium

    CN112187966A

  • Distributed heterogeneous acceleration platform communication method and system, equipment and medium

    CN113900982A