Hardware detection method, device and equipment for DPU (Data Processing Unit) and medium
By directly positioning and accessing the target detection unit of the target detection hardware using the hardware detection command sent by the external test unit in the DPU, the problem of insufficient security, compatibility and scalability of DPU hardware detection is solved, and efficient, secure and compatible hardware detection is achieved.
Patent Information
- Application Number
- CN202311321700.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2025-04-15
AI Technical Summary
The prior art is difficult to achieve security and compatibility of DPU hardware detection, and is insufficient in scalability.
Through the hardware detection command sent by the external testing unit, at least one of the target detection hardware in the DPU is directly located to the at least one of the target detection hardware, and a read data interface for accessing the target detection unit is called to obtain the target detection data from each target detection unit.
It realizes the security and compatibility of DPU hardware detection, simplifies hardware access logic, and improves the convenience and scalability of detection.
Smart Images

Figure CN119829336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hardware detection, and in particular to a DPU hardware detection method, device, equipment and medium. Background Art
[0002] DPU (Data Processing Unit) is a data-centric dedicated processor used to complete network, storage and security acceleration processing tasks. With the rise of technologies such as AI (Artificial Intelligence) and big data, functional detection and fault location of various hardware in DPU have become increasingly important.
[0003] Therefore, how to achieve DPU hardware detection that is easy to expand and has high security and compatibility is an important issue that needs to be solved. Summary of the invention
[0004] The present invention provides a DPU hardware detection method to improve the security and compatibility of data processing unit DPU hardware detection.
[0005] According to one aspect of an embodiment of the present invention, a DPU hardware detection method is provided, including:
[0006] Determine, according to a hardware detection command sent by an external test unit, target detection hardware in the DPU and at least one target detection unit in the target detection hardware;
[0007] Acquiring target detection data from each of the target detection units by calling a read data interface for accessing hardware in the DPU;
[0008] Each of the target detection data is provided to the external testing unit for display.
[0009] According to another aspect of an embodiment of the present invention, a DPU hardware detection device is provided, comprising:
[0010] A target detection unit determination module, configured to determine the target detection hardware in the DPU and at least one target detection unit in the target detection hardware according to a hardware detection command sent by an external test unit;
[0011] A target detection data acquisition module, used to acquire target detection data from each of the target detection units by calling a read data interface for accessing hardware in the DPU;
[0012] The target detection data display module is used to provide each target detection data to the external test unit for display.
[0013] According to another aspect of an embodiment of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the hardware detection method of the DPU described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the hardware detection method of the DPU described in any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention can directly locate at least one target detection unit in the target detection hardware that needs to be detected through the hardware detection command sent by the external test unit, and call the read data interface for accessing the target detection unit, and finally obtain the target detection data from each target detection unit. It provides a new type of DPU hardware detection technology, which does not need to pay attention to the underlying hardware access logic. It only needs to call the corresponding read data interface according to the detection instruction to complete the access to the DPU internal data. The implementation method is simple, safe and highly compatible, and can meet people's personalized and convenient DPU hardware testing needs.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flowchart of a DPU hardware detection method provided according to Embodiment 1 of the present invention;
[0022] Figure 2 An information interface diagram applicable to an embodiment of the present invention, which receives a hardware detection instruction issued by a tester through an external test unit and then feeds back the instruction;
[0023] Figure 3 A flowchart of another DPU hardware detection method provided in Embodiment 2 of the present invention;
[0024] Figure 4 A model diagram for accessing a hardware layer by a hardware access interface generated by a dynamic link library constructed according to an electronic spreadsheet file applicable to an embodiment of the present invention;
[0025] Figure 5 A schematic diagram of parsing a spreadsheet file to generate a dynamic link library applicable to an embodiment of the present invention;
[0026] Figure 6 A grammatical structure diagram for generating a target programming language file applicable to an embodiment of the present invention;
[0027] Figure 7 A flowchart of another DPU hardware detection method provided in Embodiment 3 of the present invention;
[0028] Figure 8 A model diagram for accessing a hardware layer using a hardware access interface generated according to a mapping relationship table applicable to an embodiment of the present invention;
[0029] Fig. 9 A schematic diagram of the structure of a DPU hardware detection device provided in Embodiment 4 of the present invention;
[0030] Fig.10 It is a structural schematic diagram of an electronic device for implementing the hardware detection method of a DPU according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1 This is a flowchart of a DPU hardware detection method provided in the first embodiment of the present invention. This embodiment is applicable to the hardware detection of the DPU. The method can be executed by a DPU hardware detection device. The DPU hardware detection device can be implemented in the form of hardware and / or software. The DPU hardware detection device can be configured in an electronic device integrated with the DPU. Figure 1 As shown, the method includes:
[0035] S110. Determine the target detection hardware in the DPU and at least one target detection unit in the target detection hardware according to the hardware detection command sent by the external test unit. The external test unit may be a hardware unit to which the tester sends a hardware test command to the DPU. The hardware test instruction may be understood as an instruction to test the hardware unit set inside the DPU. Accordingly, the DPU needs to establish a secure and reliable communication connection with the external test unit in advance.
[0036] Generally speaking, a GPU generally contains one or more types of computing hardware, such as FPGA (Field Programmable Gate Array) or ARM (Advanced RISC Machine). Each computing hardware generally contains multiple types of computing dependency units, typically multiple types of registers, such as general registers, special registers or control registers, which are used to store various types of data required for calculation.
[0037] In various embodiments of the present invention, the hardware detection of the DPU mainly refers to the detection of data stored in each computing dependency unit inside each computing hardware in the DPU.
[0038] Correspondingly, the hardware detection command is mainly used to specify the target detection hardware that needs to be detected in the DPU, and one or more target detection units that need to be detected inside the target detection hardware.
[0039] Among them, the target detection hardware is the computing hardware that needs to be detected in the DPU, that is, the FPGA or ARM mentioned above, and the target detection unit is the computing dependency unit that needs to be detected inside the computing unit, that is, the register mentioned above.
[0040] It should be noted that a computing hardware may include multiple types of computing dependent units, and the number of each type of computing dependent units may be one or more. A hardware detection command may specify multiple target detection units in the same target detection hardware, and is used to simultaneously detect data stored in multiple target detection units in the target detection hardware.
[0041] Specifically, according to the hardware detection command sent by the external test unit, the target detection hardware in the DPU and at least one target detection unit in the target detection hardware are determined. The tester may send multiple hardware detection commands in sequence through the external test unit. After receiving the hardware test commands sent by the external test unit, the DPU first determines the hardware information corresponding to the target detection hardware according to the hardware name specified in a hardware test instruction, and then determines the address information of the target detection unit in the target detection hardware according to the name of at least one computing dependent unit specified in another hardware test instruction, so as to locate at least one target detection unit in the target detection hardware.
[0042] S120. Acquire target detection data from each target detection unit by calling a read data interface for accessing hardware in the DPU.
[0043] Among them, the read data interface refers to the interface used to access the hardware in the DPU, which can obtain data from the hardware resources of the DPU. It can be understood that the various computing hardware included in the DPU generally has a unified hardware abstraction layer (HAL, Hardware Abstraction Layer), and the hardware abstraction layer pre-defines multiple hardware access interfaces, such as a read data interface or a write data interface. By directly calling the read data interface that can be recognized by the hardware abstraction layer, the read data stored inside at least one computing dependency unit of the computing hardware in the DPU can be set, that is, the target detection data can be obtained from each of the target detection units.
[0044] Through the data read interface, the hardware resources of the DPU can be effectively managed and accessed, thereby performing efficient data processing and computing tasks. Among them, the target detection data refers to the data information currently stored in the target detection unit that the tester needs to detect.
[0045] In an optional implementation of the present embodiment, multiple APIs (Application Programming Interface) can be pre-packaged for the data read interface, and each API is used to access the set computing dependent hardware in the set computing hardware in the DPU. Accordingly, after identifying the target detection unit that needs to be detected inside the target detection hardware in the hardware detection command, the matching API can be called to obtain the target detection data from each of the target detection units.
[0046] In another optional implementation of the present embodiment, the target detection unit that needs to be detected inside the target detection hardware can be first identified in the hardware detection command, and the access address of the target detection unit in the target detection hardware can be obtained. Thereafter, the access address can be passed as a parameter to the read data interface, and the target detection data can be obtained from each of the target detection units by calling the read data interface.
[0047] S130: Provide each of the target detection data to the external testing unit for display.
[0048] As mentioned above, since a communication connection is pre-established between the DPU and the external test unit, the DPU can send the read target detection data to the external test unit based on the communication connection.
[0049] Optionally, the external test unit itself has a display component, and after the external test unit receives the target detection data, the target detection data is directly displayed on the screen.
[0050] Accordingly, after the tester views the target detection data, the target detection data can be analyzed and processed to obtain the detection result of the target detection unit in the target detection hardware. Optionally, before the DPU is tested, the following steps may also be included:
[0051] Create an SSH (Secure Shell) server and enable the target service in the SSH server;
[0052] In response to a connection establishment request sent by an SSH client in the external test unit, a secure channel between the SSH client and the SSH server is established in the SSH server by calling a target service, so as to perform SSH encrypted data interaction with the SSH client through the secure channel.
[0053] Among them, Secure Shell Protocol (SSH) is a protocol used for secure remote login and other secure network services on an insecure network, supporting multiple encryption algorithms, multiplexing, etc. SSH server is a network service that runs on the target server and allows clients to execute commands or transfer files at remote locations through public key encryption and authentication mechanisms. SSH client is a software application used to communicate with the SSH server, which can be authenticated by username and password or SSH key pair.
[0054] Specifically, to create an SSH server and enable the target service in the SSH server, you can install the SSH server on the operating system of the DPU and complete the configuration of the SSH server by editing the configuration file of the SSH server. In the configuration file, you can define the target service, where the target service refers to the service called in the SSH server, which establishes a secure channel with the SSH client and performs encrypted data interaction.
[0055] Specifically, in response to the connection establishment request sent by the SSH client in the external test unit, a secure channel is established between the SSH client and the SSH server by calling the target service, so as to perform SSH encrypted data interaction with the SSH client through the secure channel. The SSH server may respond to the connection request from the SSH client in the external test unit and establish a secure channel with the client so as to perform SSH encrypted data interaction through the secure channel. When the SSH client in the external test unit wants to connect to the SSH server, it sends a connection establishment request to the server. This request usually includes the client's public key or other authentication information to prove the identity of the client. After receiving the connection request, the SSH server verifies the identity of the client. If the verification is successful, the server negotiates a security protocol with the client and establishes a secure channel. The secure channel uses the SSH encryption algorithm to encrypt all data transmitted through the channel to ensure the confidentiality and integrity of the data. Once the secure channel is established, the SSH server and the client can perform encrypted data interaction through the channel, thereby executing remote commands or starting a remote shell session, etc. In the process of interaction, all data transmission is encrypted, which can prevent third parties from obtaining or stealing data content, improve the security of the interaction process, and ensure data security.
[0056] Optionally, the above method may be executed by a function module preset in a target process within the DPU;
[0057] In this embodiment, the DPU may be pre-installed with an operating system, and various processes may be run in the operating system. Typically, a functional module may be started in an agent process in the DPU, and the above-mentioned DPU hardware detection method may be implemented in the functional module.
[0058] Specifically, determining the target detection hardware in the DPU and at least one target detection unit in the target detection hardware according to the hardware detection command sent by the external test unit may include:
[0059] When receiving a first type of hardware detection command sent by an external test unit through a secure channel, identifying target detection hardware from the first type of hardware detection command;
[0060] According to the target detection hardware, the currently activated function in the function module is pointed to the target function matching the target detection hardware;
[0061] When receiving a second type of hardware detection command sent by an external test unit through a secure channel, obtaining at least one detection unit description parameter from the second type of hardware detection command;
[0062] In the target function, at least one target detection unit matching the description parameters of each detection unit is determined.
[0063] Among them, Figure 2 FIG. 2 shows an information interface diagram of an SSH server applicable to an embodiment of the present invention, after receiving a hardware detection instruction sent by a tester through an external test unit, and feedback based on the instruction.
[0064] Specifically, after the DPU and the external test unit establish a secure channel based on SSH, the tester can input the hardware detection command through the human-computer interaction interface provided by the external test unit, such as a CMD (Command Prompt) command input interface.
[0065] like Figure 2 As shown, after establishing a communication connection between the SSH server in the DPU and the SSH client in the external test unit through a secure channel, the tester can enter a hardware detection command "fpga" (that is, a first type of hardware detection command) in the CMD command interface of the external test unit. After the SSH server receives the hardware detection command, it can first identify in the hardware detection command that the target detection hardware is the FPGA in the DPU.
[0066] Specifically, the function module preset in the target process can realize a variety of different functions, such as accessing different types of computing hardware in the DPU. Generally speaking, the function module can only activate one function at the same time to perform the corresponding function operation. Therefore, after identifying the target detection hardware, the SSH server first points the currently activated function in the function module to the target function that matches the target detection hardware.
[0067] Correspondingly, in the CMD command interface of the SSH client, point the current command line identifier to "fpga", that is, Figure 2 The "fpga>>" shown can prompt the tester that the target function matching the target detection hardware has been activated within the functional module. At this time, the tester can continue to enter the second type of hardware detection command to further specify the target detection unit within the target detection hardware.
[0068] Specifically, when the SSH server receives a second-type hardware detection command sent by an external test unit through a secure channel, at least one detection unit description parameter can be obtained from the second-type hardware detection command. Among them, the detection unit description parameter can be understood as identification information used to uniquely identify the target detection unit, and specifically can be the identity information of the target detection unit. For example, a pre-agreed unit serial number, or the name of the target detection unit, etc. The specific form of the description information of the detection unit can be set according to needs, and this embodiment does not specifically limit this.
[0069] The second type of hardware detection command may include detection unit description information of one or more target detection units.
[0070] In a specific example, a VRE register set is provided in the FPGA of the DPU, and a corresponding unit number can be pre-set for each VRE register in the VRE register set, for example, func0: logic_vre_glb_cfg, func1: logic_vre_cnt. Furthermore, by constructing a second type of hardware detection command in the form of: fpga_vre func0, or logic_vre_cnt, and extracting a detection unit description parameter from the second type of hardware detection command, at least one target detection unit matching each of the detection unit description parameters can be determined in the target function.
[0071] Based on the above embodiments, the method may further include:
[0072] When receiving a third type of hardware detection command sent by an external test unit through a secure channel, detecting whether a functional module has a currently activated function;
[0073] If so, all detection unit description information matching the currently activated function is provided to the external test unit for display;
[0074] If not, all functional description information matching the functional module is provided to the external testing unit for display.
[0075] Among them, the third category of hardware detection commands may refer to help commands used to guide testers to input hardware detection commands, such as the "help" command. When the tester does not know the commands that can be entered at the current functional level of the CMD command interface, this type of command can be entered. When the DPU receives such commands, the hardware detection commands that can be recognized at the next level can be provided to the tester for display to prompt the tester. Among them, all detection unit description information refers to detailed description information about all computing dependent units in a certain set computing hardware (target detection hardware). All functional description information refers to detailed description information of the functions that can be provided by the functional module.
[0076] Specifically, after the SSH server in the DPU completes the activation of the target service, the function description information of all functions that the function module can provide can be registered in the target service, and all detection unit description information under each function can be registered in the target service. Furthermore, when the third type of hardware detection command is received by calling the target service, the matching detection unit description information or function description information can be provided to the external test unit for display based on the above registration information.
[0077] For example, Figure 2 As shown, the tester enters the first type of hardware detection command in the form of "fpga" in the CMD command interface of the SSH client, and the DPU points the currently activated function in the functional module to the target function corresponding to the FPGA. At the same time, in the CMD command interface, the current command line identifier is also pointed to "fpga". When the user enters the third type of hardware detection command "help" under the command line identifier, all detection unit description information matching the currently activated function can be viewed. Specifically, the above detection unit description information can be provided directly, or the above detection unit description information can be displayed by constructing a more fine-grained third type of hardware detection command, such as the show func command or the show all command.
[0078] The technical solution of the embodiment of the present invention can ensure the security of the data interaction between the DPU and the external test unit by creating an SSH server and enabling the target service in the SSH server. By receiving the first type of hardware detection command, the second type of hardware detection command and the third type of hardware detection command input by the tester in the CMD command interface, the tester can be gradually guided to step by step input at least one target detection unit in the target detection hardware to be tested, thereby improving the input accuracy of the hardware detection command and, at the same time, improving the test efficiency while enhancing the tester's satisfaction.
[0079] It needs to be emphasized again that, in addition to establishing a secure connection between the DPU and the external test unit based on the SSH protocol, the technical solution of the embodiment of the present invention can also establish reliable data communication between the two based on the Restful protocol. This embodiment does not specifically limit the protocol for establishing a secure connection between the DPU and the external test unit.
[0080] Based on the above embodiments, the function module pre-installed in the target process in the DPU may be a Diagshell module. Accordingly, by calling the read data interface for accessing the hardware in the DPU, the target detection data is obtained from each target detection unit, which may include:
[0081] By using the built-in dlopen instruction in the Diagshell module, the read data interface used to access the hardware in the DPU is called to obtain the target detection data from each target detection unit.
[0082] Among them, Diagshell is a module for device debugging and diagnosis, which provides some built-in instructions for accessing and controlling the hardware resources of the device. Dlopen is one of the instructions, which is used to dynamically load shared libraries. In this optional implementation, the read data interface, or multiple APIs encapsulated based on the read data interface, can be pre-stored in a set dynamic link library (that is, a shared library as described in the full text). Correspondingly, after starting the SSH server through the Diagshell module, the SSH server performs password authorization, adds private keys, listens to ports, registers callbacks, and starts services during the startup process. After SSH authentication is passed, real-time parsing and processing of hardware detection commands sent by external test units can be achieved.
[0083] After the SSH server is started, it can wait for the SSH client in the external test unit to access. When the SSH client and the SSH server successfully establish a secure channel, the SSH server can receive the hardware detection command sent by the tester via the SSH client based on the secure channel, and determine the target detection hardware in the DPU and at least one target detection unit in the target detection hardware based on the hardware detection command.
[0084] Afterwards, by using the built-in dlopen instruction in the Diagshell module, the read data interface in the dynamic link library for accessing the hardware in the DPU can be called to obtain the target detection data from each target detection unit. Specifically, by calling the built-in dlopen instruction in the Diagshell module, a shared library containing a read data interface for accessing the hardware in the DPU can be dynamically loaded. After the shared library is loaded, the built-in dlsym instruction can be used to obtain the address of the interface function, and then the interface function can be used to obtain the corresponding target detection data from each target detection unit.
[0085] By using the built-in dlopen instruction in the Diagshell module, calling the read data interface used to access the hardware in the DPU, and obtaining the target detection data from each target detection unit, the existing dynamic link library access instruction can be directly called, and the read data interface can be directly called to complete the acquisition of the target detection data in the target detection unit, reducing the workload of developers to reconstruct the dynamic link library access instruction. The dlopen instruction allows the program to dynamically load or unload a specific dynamic link library at runtime, providing great convenience and scalability for the program.
[0086] Embodiment 2
[0087] Figure 3 A flowchart of another DPU hardware detection method provided in Embodiment 2 of the present invention. The embodiment of the present invention, based on the above embodiments, specifically defines a method for obtaining target detection data from each target detection unit by calling a read data interface for accessing hardware in the DPU. For solutions not fully described in the embodiments of the present invention, see the above embodiments.
[0088] like Figure 3 As shown, the method includes:
[0089] S210. Determine target detection hardware in the DPU and at least one target detection unit in the target detection hardware according to a hardware detection command sent by an external test unit.
[0090] S220. Obtain a target application program interface matching each of the target detection units in a pre-established dynamic link library, wherein the data reading interface is pre-encapsulated in the target application program interface.
[0091] The dynamic link library stores target application program interfaces for accessing target detection units of target detection hardware, and each application program interface encapsulates the data reading interface. Different application program interfaces are used to read data from different detection units in different detection hardware.
[0092] Among them, a mapping relationship between a detection unit in the detection hardware and an application program interface can be pre-built in the dynamic link library. After successfully identifying the target detection hardware and at least one target detection unit in the target detection hardware from the hardware detection command, the target application program interface matching each target detection unit can be obtained by querying the above mapping relationship.
[0093] S230 , accessing the target detection units to read data by calling the target application program interface to obtain target detection data.
[0094] S240: Provide each of the target detection data to the external testing unit for display.
[0095] Based on the above embodiments, the method may further include:
[0096] Obtaining a spreadsheet file, wherein the spreadsheet file defines parameter information of each detection unit in different detection hardware, and the parameter information includes a detection unit name, a base address, and an offset address;
[0097] Running a pre-built execution script to split the spreadsheet file into a plurality of plain text files, wherein the content in each plain text file corresponds to a set detection unit in the set detection hardware;
[0098] Run the pre-built lexical analyzer and syntax analyzer to parse each plain text file and generate a target programming language file corresponding to each plain text file;
[0099] Jointly compile each target programming language file with the hardware abstraction layer library file in the DPU to obtain an application program interface corresponding to each detection unit;
[0100] Each application program interface is stored in a dynamic link library. In this optional implementation, a specific implementation method of pre-building each application program interface is provided.
[0101] The detection unit name refers to the name of the detection unit set in the detection hardware set in the CPU, for example, the "logic_vre_cnt" mentioned above. The base address refers to the starting occupied address of the detection unit in the memory, the offset address is the address occupied range of the detection unit in the memory, and the cumulative value of the base address and the offset address is the end occupied address of the detection unit in the memory. That is, the address range of the detection unit of each detection hardware in the DPU in the DPU memory is recorded in the spreadsheet file (typically, excel file).
[0102] The pre-built execution script refers to a script that has been written to split the spreadsheet file before running the program or system. The script can be implemented through Python code and is used to split the spreadsheet file based on the detection unit as the granularity to obtain multiple plain text files, wherein each plain text file contains only the detection unit name, base address and offset address of one detection unit. Typically, the plain text file can be a CSV (Comma-Separated Values) file.
[0103] Wherein, the pre-built lexical analyzer (for example, Flex tool) and syntax analyzer (bison tool) refer to pre-written programs in software development, which are used for lexical analysis and syntax analysis of plain text files to convert plain text files into executable target programming language files. The lexical analyzer is used to cut the input character sequence into a word sequence. The syntax analyzer is used to analyze the word sequence according to specific grammatical rules to determine its grammatical structure. The syntax analyzer usually performs syntax analysis in a top-down or bottom-up manner. Wherein, the target programming language file refers to the target code file generated after lexical analysis and syntax analysis, that is, the file that has been compiled or interpreted into executable code, for example, C programming language file.
[0104] The hardware abstraction layer library file in the DPU refers to the software library file running on the DPU, which is used to provide interfaces and functions for interacting with the underlying hardware.
[0105] Specifically, obtaining a spreadsheet file, running a pre-built execution script, splitting the spreadsheet file into multiple plain text files, running a pre-built lexical analyzer and a syntax analyzer, parsing each plain text file, and generating a target programming language file corresponding to each plain text file, can be to obtain a spreadsheet file, in which the detection unit name, base address, and offset address information corresponding to all detection units in different detection hardware are defined. Then run the pre-built execution script, and use the execution script to split the spreadsheet file into multiple plain text files according to different detection unit names, and the content of each plain text file corresponds to a set detection unit in the set detection hardware. Then run the pre-built lexical analyzer and syntax analyzer, use the lexical analyzer and syntax analyzer to parse each plain text file, convert the words and symbols in the plain text file into the corresponding structure in the target programming language, and then write these structures into the corresponding target programming language file, and generate a target programming language file corresponding to each plain text file. The specific method of obtaining the spreadsheet file can be to obtain the spreadsheet file by file transfer, user input, etc., and the present invention does not specifically limit the method of obtaining the spreadsheet file.
[0106] Specifically, each target programming language file is jointly compiled with the hardware abstraction layer library file in the DPU to obtain an application interface corresponding to each detection unit, and each application interface is stored in a dynamic link library. The code in the target programming language file and the code in the hardware abstraction layer library file can be combined by a compiler, and then they are compiled together into executable code. The result of the compilation is an application interface corresponding to each detection unit. These application interfaces are functions or methods that can be called by other programs, in which a read data interface is encapsulated, and have the function of detecting and reading data in the target detection unit, and then these application interfaces are stored in a dynamic link library. Then, according to the test instructions of the tester, the corresponding application interface in the dynamic link library is accessed, and the detection of the target detection unit is completed through the read data interface encapsulated in the application interface.
[0107] Specifically, in Figure 4 FIG. 1 shows a model diagram of a hardware access interface generated by a dynamic link library constructed according to an electronic spreadsheet file to access the hardware layer, which is applicable to an embodiment of the present invention. Figure 4 As shown in the figure, agent is an external interaction process in DPU, responsible for obtaining information of each submodule and communicating with the outside through restful or ssh. Diagshell module is a subfunction in the agent process, which can obtain hardware information through the dynamic link library A.so. HAL is the adaptation layer for software to access hardware. A.so is a dynamic link library generated according to the Excel table, which stores the API interface for accessing hardware registers. FPGA and ARM are two detection hardware in DPU.
[0108] At the same time, Figure 5 FIG. 2 shows a schematic diagram of parsing a spreadsheet file to generate a dynamic link library applicable to the technical solution of an embodiment of the present invention. Figure 5 As shown, you need to first build an excel spreadsheet file and record the register table description used to describe each register in the CPU in the excel spreadsheet file. The tester puts the excel spreadsheet file into the specified file, and then runs the python script to split the excel spreadsheet into several csv plain text files, and uses the lexical analyzer and syntax analyzer (flex and bison) to dynamically parse the csv plain text files to generate the corresponding target programming language file (xxx.c). Finally, by compiling the generated target programming language file and the hardware abstraction layer library file (HAL) together, a dynamic link library A.so file can be generated.
[0109] Further, in Figure 6A syntax structure diagram for generating a target programming language file applicable to an embodiment of the present invention is shown in FIG. Figure 6 As shown, according to Figure 6 grammatical structure, write flex grammar file and bison lexical file, and then call flex and bison software to compile the above files into c programming language files. Write main.c file, and compile it into code generation tool together with the previously compiled c programming language file, execute the code generation tool, and generate the aforementioned target programming language file according to the csv file.
[0110] The technical solution of the embodiment of the present invention processes the spreadsheet file by using a pre-built execution script and a pre-built lexical analyzer and syntax analyzer to obtain the corresponding target programming language file, and jointly compiles each target programming language file with the hardware abstraction layer library file in the DPU to obtain an application program interface corresponding to each detection unit. When receiving the hardware detection instruction issued by the tester, the target application program interface can be directly called to complete the read data access to each target detection unit, and the target detection data can be obtained for hardware diagnosis, which improves the access speed to the data in the target detection unit and is more convenient for expansion.
[0111] Embodiment 3
[0112] Figure 7 This is a flowchart of another DPU hardware detection method provided in Embodiment 3 of the present invention. Based on the above embodiment, the present embodiment specifically defines another method for obtaining target detection data from each target detection unit by calling a read data interface for accessing hardware in the DPU. For solutions not described in detail in the embodiments of the present invention, see the above embodiment. Figure 7 As shown, the method includes:
[0113] S310. Determine target detection hardware in the DPU and at least one target detection unit in the target detection hardware according to a hardware detection command sent by an external test unit.
[0114] S320: query a pre-established mapping relationship table to obtain target access address description information corresponding to each of the target detection units.
[0115] The mapping relationship table refers to a data structure table for establishing an association between a key and a value, that is, each detection unit in the detection hardware and its corresponding detection unit name, base address and offset address are stored in the mapping relationship table. By querying the mapping relationship table, the detection unit name, base address and offset address associated with it can be obtained according to the given detection unit information. The specific storage mapping relationship can be a hash table, an array or a list, etc. The present invention does not specifically limit the form of the mapping relationship table.
[0116] Specifically, querying a pre-established mapping relationship table to obtain target access address description information corresponding to each target detection unit can be after at least one target detection unit in the target detection hardware is determined according to a hardware detection command sent by a tester through an external test unit. By querying the pre-established mapping relationship table, the detection unit name, base address and offset address information corresponding to at least one target detection unit in the target detection hardware can be obtained, and then the target access address description information of at least one target detection unit in the target detection hardware is determined according to the detection unit name, base address and offset address information.
[0117] S330 , calling the data reading interface in the pre-established dynamic link library based on the target access address description information, and acquiring target detection data from each of the target detection units.
[0118] The dynamic link library stores the read data interface for accessing each target detection unit of the target detection hardware. The read data interface is pre-packaged in the dynamic link library, and each target detection unit read data interface in the target detection hardware has its corresponding read data interface.
[0119] Specifically, based on the target access address description information, a read data interface in a pre-established dynamic link library is called to obtain target detection data from each target detection unit. After the target access address description information corresponding to each target detection unit is determined, the read data interface in the dynamic link library is called based on the parsed target access address description information, and the data in the target detection unit is acquired using the read data interface.
[0120] It needs to be explained again that the difference between this embodiment and the aforementioned embodiments is that the embodiments of the present invention do not need to pre-build multiple application program interfaces pointing to different detection units in different detection hardware. It is only necessary to obtain the target access address description information corresponding to the target detection unit to be accessed, pass the above target access address description information as an input parameter to the read data interface, and then call the read data interface, so as to achieve the effect of real-time construction of the target application program interface corresponding to the target detection unit.
[0121] Accordingly, in Figure 8 A model diagram of a hardware access interface generated according to a mapping relationship table to access the hardware layer applicable to an embodiment of the present invention is shown in FIG. Figure 8As shown, the data reading interface in the HAL layer can be directly compiled into an A.so file. The callback interface registered by Diagshell to the SSH server directly calls the data reading interface of the A.so file according to the register address corresponding to the target detection unit in the target detection hardware determined by the mapping relationship table to complete the acquisition of the target detection unit data.
[0122] S340: Provide each of the target detection data to the external testing unit for display.
[0123] Furthermore, the method may also include:
[0124] Obtaining a spreadsheet file, wherein the spreadsheet file defines parameter information of each detection unit in different detection hardware, and the parameter information includes a detection unit name, a base address, and an offset address;
[0125] By parsing the electronic spreadsheet file, a mapping relationship between each detection unit in each detection hardware and the access address description information is constructed to obtain a mapping relationship table.
[0126] Specifically, a spreadsheet file is obtained, and a mapping relationship between each detection unit in each detection hardware and the access address description information is constructed by parsing the spreadsheet file to obtain a mapping relationship table. This may be to obtain a spreadsheet file that defines the mapping relationship between the detection unit name, base address, and offset address of each detection unit in different detection hardware, and use an Excel parsing library or a parsing program to process the spreadsheet file, extract the mapping relationship information in the spreadsheet file, and extract the required mapping relationship information from the parsed spreadsheet file, and then construct a mapping relationship table between each detection unit in each detection hardware and the access address description information based on the extracted mapping relationship information. Through the constructed mapping relationship table, after obtaining the information of the target detection unit, the corresponding access address description information can be determined based on the information of the target detection unit.
[0127] The technical solution of the embodiment of the present invention, by parsing the electronic spreadsheet file, constructs the mapping relationship between each detection unit in each detection hardware and the access address description information, and obtains the mapping relationship table. When receiving the hardware detection instruction issued by the tester, by querying the pre-established mapping relationship table, the target access address description information corresponding to each target detection unit is obtained, and the read data interface in the pre-established dynamic link library is called based on the target access address description information to obtain the target detection data from each target detection unit. The mapping relationship table is obtained by parsing the electronic spreadsheet file, and the corresponding read data interface is called according to the mapping relationship table to complete the reading of the data in the target detection unit. There is no need to perform complex pre-compilation operations, and the content in the electronic spreadsheet file can be fully utilized for real-time read data access, which reduces unnecessary workload, is easier to maintain, and has strong scalability.
[0128] Embodiment 4
[0129] Fig. 9 This is a schematic diagram of the structure of a DPU hardware detection device provided by the fourth embodiment of the present invention. Fig. 9 As shown, the device includes: a target detection unit determination module 41, a target detection data acquisition module 42, and a target detection data display module 43.
[0130] A target detection unit determination module 41, configured to determine the target detection hardware in the DPU and at least one target detection unit in the target detection hardware according to a hardware detection command sent by an external test unit;
[0131] The target detection data acquisition module 42 is used to acquire the target detection data from each of the target detection units by calling the read data interface for accessing the hardware in the DPU;
[0132] The target detection data display module 43 is used to provide each target detection data to the external test unit for display.
[0133] Furthermore, the target detection unit determines the module 41, which is specifically used for:
[0134] When receiving a first type of hardware detection command sent by the external test unit through the secure channel, identifying target detection hardware from the first type of hardware detection command;
[0135] According to the target detection hardware, directing the currently activated function in the functional module to a target function matching the target detection hardware;
[0136] When receiving a second type of hardware detection command sent by the external test unit through the secure channel, obtaining at least one detection unit description parameter from the second type of hardware detection command;
[0137] In the target function, at least one target detection unit matching each of the detection unit description parameters is determined.
[0138] Furthermore, the target detection unit determination module 41 is further configured to:
[0139] When receiving a third type of hardware detection command sent by the external test unit through the security channel, detecting whether the functional module has a currently activated function;
[0140] If so, providing all detection unit description information matching the currently activated function to the external test unit for display;
[0141] If not, all functional description information matching the functional module is provided to the external testing unit for display.
[0142] Furthermore, the target detection data acquisition module 42 is specifically used for:
[0143] In a pre-established dynamic link library, a target application program interface matching each of the target detection units is obtained, wherein the data reading interface is pre-encapsulated in the target application program interface;
[0144] By calling the target application program interface, read data access is performed on each target detection unit to obtain target detection data.
[0145] Furthermore, the target detection data acquisition module 42 is further specifically used for:
[0146] Querying a pre-established mapping relationship table to obtain target access address description information corresponding to each of the target detection units;
[0147] The data reading interface in the pre-established dynamic link library is called based on the target access address description information to obtain target detection data from each target detection unit.
[0148] Furthermore, the target detection data acquisition module 42 is further specifically used for:
[0149] By using the built-in dlopen instruction in the Diagshell module, a read data interface for accessing the hardware in the DPU is called to obtain target detection data from each of the target detection units.
[0150] Furthermore, the hardware detection device of the DPU further includes:
[0151] A secure shell protocol (SSH) server creation module, used to create a secure shell protocol (SSH) server and enable a target service in the SSH server;
[0152] In response to a connection establishment request sent by an SSH client in an external test unit, a secure channel between the SSH client and the SSH server is established in the SSH server by calling a target service, so as to perform SSH encrypted data interaction with the SSH client through the secure channel.
[0153] Furthermore, the hardware detection device of the DPU further includes an application program interface generation module, which is used to:
[0154] Obtaining a spreadsheet file, wherein the spreadsheet file defines parameter information of each detection unit in different detection hardware, and the parameter information includes a detection unit name, a base address, and an offset address;
[0155] Running a pre-built execution script to split the electronic spreadsheet file into a plurality of plain text files, wherein the content in each plain text file corresponds to a setting detection unit in the setting detection hardware;
[0156] Running a pre-built lexical analyzer and a syntax analyzer to parse each of the plain text files and generate a target programming language file corresponding to each plain text file;
[0157] Jointly compile each target programming language file with the hardware abstraction layer library file in the DPU to obtain an application program interface corresponding to each detection unit;
[0158] Each of the application program interfaces is stored in the dynamic link library.
[0159] Furthermore, the hardware detection device of the DPU may also include a mapping relationship table establishment module, which is used to:
[0160] Obtaining a spreadsheet file, wherein the spreadsheet file defines parameter information of each detection unit in different detection hardware, and the parameter information includes a detection unit name, a base address, and an offset address;
[0161] By parsing the electronic spreadsheet file, a mapping relationship between each detection unit in each detection hardware and the access address description information is constructed to obtain the mapping relationship table.
[0162] The DPU hardware detection device provided in the embodiment of the present invention can execute the DPU hardware detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0163] Embodiment 5
[0164] Fig.10A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0165] like Fig.10 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0166] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0167] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the hardware detection method of the DPU.
[0168] That is: according to the hardware detection command sent by the external test unit, determine the target detection hardware in the DPU and at least one target detection unit in the target detection hardware;
[0169] Acquiring target detection data from each of the target detection units by calling a read data interface for accessing hardware in the DPU;
[0170] Each of the target detection data is provided to the external testing unit for display.
[0171] In some embodiments, the hardware detection method of the DPU may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the hardware detection method of the DPU described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the hardware detection method of the DPU in any other appropriate manner (e.g., by means of firmware).
[0172] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0173] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0174] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0175] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0176] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0177] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0178] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0179] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A hardware detection method for a data processing unit DPU, characterized in that: include: Determine, according to a hardware detection command sent by an external test unit, target detection hardware in the DPU and at least one target detection unit in the target detection hardware; Acquiring target detection data from each of the target detection units by calling a read data interface for accessing hardware in the DPU; Each of the target detection data is provided to the external testing unit for display.
2. The method according to claim 1, characterized in that Also includes: Create a secure shell protocol (SSH) server and enable the target service in the SSH server; In response to a connection establishment request sent by an SSH client in an external test unit, a secure channel between the SSH client and the SSH server is established in the SSH server by calling a target service, so as to perform SSH encrypted data interaction with the SSH client through the secure channel.
3. The method according to claim 2, characterized in that The method is executed by a function module preset in a target process in the DPU; Determining, according to a hardware detection command sent by an external test unit, target detection hardware in the DPU and at least one target detection unit in the target detection hardware, including: When receiving a first type of hardware detection command sent by the external test unit through the secure channel, identifying target detection hardware from the first type of hardware detection command; According to the target detection hardware, directing the currently activated function in the functional module to a target function matching the target detection hardware; When receiving a second type of hardware detection command sent by the external test unit through the secure channel, obtaining at least one detection unit description parameter from the second type of hardware detection command; In the target function, at least one target detection unit matching each of the detection unit description parameters is determined.
4. The method according to claim 3, characterized in that Also includes: When receiving a third type of hardware detection command sent by the external test unit through the security channel, detecting whether the functional module has a currently activated function; If so, providing all detection unit description information matching the currently activated function to the external test unit for display; If not, all functional description information matching the functional module is provided to the external testing unit for display.
5. The method according to any one of claims 1 to 4, characterized in that: Obtaining target detection data from each target detection unit by calling a read data interface for accessing hardware in the DPU, including: In a pre-established dynamic link library, a target application program interface matching each of the target detection units is obtained, wherein the data reading interface is pre-encapsulated in the target application program interface; By calling the target application program interface, read data access is performed on each target detection unit to obtain target detection data.
6. The method according to claim 5, characterized in that Also includes: Obtaining a spreadsheet file, wherein the spreadsheet file defines parameter information of each detection unit in different detection hardware, and the parameter information includes a detection unit name, a base address, and an offset address; Running a pre-built execution script to split the electronic spreadsheet file into a plurality of plain text files, wherein the content in each plain text file corresponds to a setting detection unit in the setting detection hardware; Running a pre-built lexical analyzer and a syntax analyzer to parse each of the plain text files and generate a target programming language file corresponding to each plain text file; Jointly compile each target programming language file with the hardware abstraction layer library file in the DPU to obtain an application program interface corresponding to each detection unit; Each of the application program interfaces is stored in the dynamic link library.
7. The method according to any one of claims 1 to 4, characterized in that: Obtaining target detection data from each target detection unit by calling a read data interface for accessing hardware in the DPU, including: Querying a pre-established mapping relationship table to obtain target access address description information corresponding to each of the target detection units; The data reading interface in the pre-established dynamic link library is called based on the target access address description information to obtain target detection data from each target detection unit.
8. The method according to claim 7, characterized in that Also includes: Obtaining a spreadsheet file, wherein the spreadsheet file defines parameter information of each detection unit in different detection hardware, and the parameter information includes a detection unit name, a base address, and an offset address; By parsing the electronic spreadsheet file, a mapping relationship between each detection unit in each detection hardware and the access address description information is constructed to obtain the mapping relationship table.
9. The method according to claim 3, characterized in that: The functional module is a Diagshell module; Obtaining target detection data from each target detection unit by calling a read data interface for accessing hardware in the DPU, including: By using the built-in dlopen instruction in the Diagshell module, a read data interface for accessing the hardware in the DPU is called to obtain target detection data from each of the target detection units.
10. A hardware detection device for a data processing unit DPU, characterized in that: include: A target detection unit determination module, configured to determine the target detection hardware in the DPU and at least one target detection unit in the target detection hardware according to a hardware detection command sent by an external test unit; A target detection data acquisition module, used to acquire target detection data from each of the target detection units by calling a read data interface for accessing hardware in the DPU; The target detection data display module is used to provide each target detection data to the external test unit for display.
11. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the hardware detection method of the data processing unit DPU described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the hardware detection method of the data processing unit DPU described in any one of claims 1 to 9 when executed.