PCIe equipment management method and device and chip
By sharing the Bus resource pool for multiple accelerators and reallocating Bus resources, the problem of accelerator access device Bus requirements exceeding resources in the PCIe system is solved, and on-demand and flexible allocation of Bus resources are achieved to ensure the stable operation of the system.
Patent Information
- Application Number
- CN202310224180.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-08-30
AI Technical Summary
In the PCIe system, when the Bus demand of the PCIe device connected to the accelerator is greater than the corresponding Bus resource of the accelerator, the system cannot load some PCIe devices, affecting the normal operation of the system.
By sharing the Bus resource pool for multiple accelerators, the Bus resources are reallocated to meet the needs of the PCIe devices connected to each accelerator, ensuring that the Bus resources of each accelerator are allocated on demand and avoiding resource waste.
It realizes the normal loading of PCIe devices connected to each accelerator, improves the flexibility of Bus resource allocation, and ensures the stable operation of the system.
Smart Images

Figure CN118567828A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a management method, device, and chip for PCIe devices. Background Art
[0002] In a high-speed peripheral component interconnect express (PCIe) system, an accelerator is supported to be connected to a processor, and a PCIe device is connected through the port of the accelerator. It is necessary to enumerate the connected PCIe devices and determine the bus configuration of each PCIe device.
[0003] In the related art, a fixed Bus resource is set for each accelerator during the Basic Input Output System (BIOS) startup phase. During the enumeration phase, the bus configuration of the PCIe device to which the accelerator is connected is determined based on the Bus resource corresponding to the accelerator.
[0004] However, when the Bus demand of a PCIe device connected to an accelerator is greater than the Bus resources corresponding to the accelerator, the PCIe system will be unable to load some PCIe devices, affecting the normal operation of the PCIe system. Summary of the invention
[0005] The present application provides a management method, device and chip for PCIe devices, which solves the problem in the related art that when the Bus demand of a PCIe device connected to an accelerator is greater than the Bus resources corresponding to the accelerator, the PCIe system will be unable to load some PCIe devices, and can realize on-demand allocation of Bus resources corresponding to each accelerator, thereby avoiding waste of Bus resources.
[0006] In a first aspect, the present application provides a method for managing a PCIe device, the method comprising: determining a Bus resource pool shared by multiple accelerators, the accelerators being used to access PCIE devices, the Bus resource pool being used to provide Bus configuration to the PCIe devices to which the multiple accelerators are connected; when the Bus demand of the PCIe device to which the accelerator is connected is greater than the Bus resources corresponding to the accelerator, reallocating the Bus resources corresponding to the multiple accelerators respectively from the Bus resource pool.
[0007] The Bus resource pool may include all Bus segments in the system. The Bus requirement of the PCIe device connected to the accelerator may include the number of Bus numbers required by the PCIe device connected to the accelerator, and the Bus resource corresponding to the accelerator may include a threshold value of the number of Bus numbers corresponding to the accelerator.
[0008] The beneficial effect is that multiple accelerators share a Bus resource pool. When the Bus demand of a PCIe device connected to a certain accelerator is greater than the Bus resources corresponding to the accelerator, the Bus resources corresponding to multiple accelerators can be reallocated from the Bus resource pool. This can increase the Bus resources corresponding to the accelerator and reduce the Bus resources corresponding to the accelerator with a smaller Bus demand of the connected PCIe device, thereby ensuring the normal loading of each PCIe device connected to the accelerator and realizing on-demand allocation of Bus resources corresponding to each accelerator, thereby avoiding waste of Bus resources and having high flexibility in allocation of Bus resources.
[0009] In a possible implementation, the method further includes: intercepting configuration information of the PCIe device during the enumeration process, the configuration information of the PCIe device being used to indicate: the bus configuration of the PCIe device; and broadcasting the configuration information of the PCIe device to the multiple accelerators.
[0010] The Bus configuration of the PCIe device may include the Bus number of the PCIe device. This process may be performed during the system enumeration phase. Each time the Bus resources corresponding to multiple accelerators are reallocated, the enumeration process needs to be re-executed to determine all PCIe devices in the PCIe system and determine the configuration information of each PCIe device (including the Bus number assigned to each PCIe device). During the enumeration process, each time the configuration information of a PCIe device is determined, the configuration information will be sent to the PCIe device. During this process, the decoder in the processor will intercept the configuration information sent to the PCIe device.
[0011] Broadcasting the configuration information of the PCIe device can ensure that each accelerator in the PCIe system synchronously obtains the configuration information of each PCIe device, thereby ensuring the normal progress of the subsequent message transmission process.
[0012] In one possible implementation, the method further includes: when receiving a message, routing the message to an accelerator to which the destination PCIe device is connected based on the configuration information of each of the PCIe devices and the bus information carried in the message, wherein the bus information is used to indicate the bus configuration of the destination PCIE device.
[0013] In a possible implementation, the PCIe devices to which the multiple accelerators are connected share a memory mapped input / output (MMIO) space.
[0014] The MMIO space is used by the processor to write configuration information of each PCIe device. In the related art, each PCIe device has one MMIO space, but in the embodiment of the present application, multiple PCIe devices share one MMIO space, which can realize flexible management of the operating system.
[0015] In a second aspect, the present application provides a management device for a PCIe device, the device comprising: a processing module, used to determine a bus resource pool shared by multiple accelerators, the accelerators being used to access PCIe devices, the bus resource pool being used to provide bus configuration to the PCIe devices to which the multiple accelerators are connected; the processing module is also used to reallocate the bus resources corresponding to the multiple accelerators from the bus resource pool when the bus demand of the PCIe device to which the accelerator is connected is greater than the bus resources corresponding to the accelerator.
[0016] In a possible implementation, the processing module is further used to intercept configuration information of the PCIe device during the enumeration process, and the configuration information of the PCIe device is used to indicate: the bus configuration of the PCIe device; the device also includes: a transceiver module, used to broadcast the configuration information of the PCIe device to the multiple accelerators.
[0017] In a possible implementation, the transceiver module is also used to route the message to the accelerator connected to the destination PCIe device based on the configuration information of each PCIe device and the bus information carried in the message when receiving the message, and the bus information is used to indicate the bus configuration of the destination PCIE device.
[0018] In a possible implementation, the PCIe devices to which the multiple accelerators are connected share a memory-mapped input / output MMIO space.
[0019] In a third aspect, the present application provides a management device for a PCIe device, the device comprising: one or more processors; a memory for storing one or more computer programs or instructions; when the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement a method as described in any one of the first aspects.
[0020] In a fourth aspect, the present application provides a management device for a PCIe device, comprising a processor for executing a method as described in any one of the first aspects.
[0021] In a fifth aspect, the present application provides a computer-readable storage medium, comprising a computer program or instructions, which, when executed on a computer, causes the computer to perform any of the methods described in the first aspect.
[0022] In a sixth aspect, the present application provides a chip, comprising: an input interface, an output interface, and at least one processor. Optionally, the chip also includes a memory. The at least one processor is used to execute a code in the memory, and when the at least one processor executes the code, the chip implements any one of the methods in the first aspect above.
[0023] Optionally, the above chip may also be an integrated circuit.
[0024] In a seventh aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to implement any of the methods described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic diagram of the structure of a PCIe system provided in an embodiment of the present application;
[0026] Figure 2 A flowchart of a method for managing a PCIe device provided in an embodiment of the present application;
[0027] Figure 3 A flowchart of another PCIe device management method provided in an embodiment of the present application;
[0028] Figure 4 A schematic diagram of an enumeration process provided in an embodiment of the present application;
[0029] Figure 5 A block diagram of a PCIe device management device provided in an embodiment of the present application;
[0030] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0031] Figure 7 A schematic diagram of the structure of a PCIe device management device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The terms "first", "second", etc. in the specification embodiments, claims, and drawings of the present application are only used for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, including a series of steps or units. The method, system, product, or device is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0034] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0035] In the PCIe system, Bus management and address decoding are required. The process of Bus management includes: when the PCIe device connected to the accelerator changes (including connecting a new PCIe device, disconnecting a PCIe device, and changing the port where the PCIe device is inserted), the PCIe devices connected to the accelerator are re-enumerated to re-determine the bus configuration of each PCIe device based on the Bus resources corresponding to the accelerator. The Bus resources may include the number of available Bus numbers, and the bus configuration includes the Bus number.
[0036] The embodiment of the present application provides a method for managing PCIe devices, which can flexibly set the Bus resources corresponding to each accelerator to ensure the normal loading of the PCIe device connected to the accelerator. This method can be applied to the PCIe system, please refer to Figure 1 , Figure 1 A structural diagram of a PCIe system provided in an embodiment of the present application, the system includes: a processor, a bus, multiple accelerators and multiple PCIe devices. The accelerator is connected to the processor through the bus, and can be used to execute part of the process originally executed by the processor to accelerate the processor. The PCIe device is connected to the accelerator through the PCIe slot and interacts with the processor through the accelerator and the bus. Figure 1Two accelerators: accelerators 101a and 101b and three PCIe devices: PCIe devices 102a, 102b, and 102c are shown. PCIe devices 102a and 102b are connected to accelerator 101a, and PCIe device 102c is connected to accelerator 101b.
[0037] Optionally, the processor and each accelerator include a decoder. The decoder in the accelerator is required to decode the message when the accelerator and the PCIe device are transmitted. In another option, the accelerator may also include at least one PCIe core, and each PCIe core may be connected to a certain number of PCIe devices. Among them, the processor may include a central processing unit (CPU), the bus may include a network on chip (NOC) bus, the accelerator may include a subsystem (Subsys), and the PCIe device may include a PCIe card and a PCIe switch (Switch), etc.
[0038] Please refer to Figure 2 , Figure 2 A flowchart of a method for managing a PCIe device provided in an embodiment of the present application is provided. The method can be applied to a PCIe system, for example Figure 1 In the PCIe system shown, the method may include the following processes:
[0039] 201. Determine a Bus resource pool shared by multiple accelerators, where the accelerator is used to access a PCIe device, and the Bus resource pool is used to provide Bus configuration to the PCIe devices to which the multiple accelerators are connected.
[0040] This process can be done by Figure 1 The processor in the system is executed during the system startup phase. The Bus resource pool can include all Bus segments in the system.
[0041] 202. When the Bus demand of the PCIe device to which the accelerator is connected is greater than the Bus resources corresponding to the accelerator, the Bus resources corresponding to the plurality of accelerators are reallocated from the Bus resource pool.
[0042] The Bus requirement of the PCIe device to which the accelerator is connected may include the number of Bus numbers required by the PCIe device to which the accelerator is connected, and the Bus resources corresponding to the accelerator may include a threshold value of the number of Bus numbers corresponding to the accelerator.
[0043] To summarize, the management method of PCIe devices provided in the embodiment of the present application first determines a Bus resource pool shared by multiple accelerators, and the Bus resource pool is used to provide Bus configuration to the PCIe devices connected to the multiple accelerators. When the Bus demand of the PCIe device connected to the accelerator is greater than the Bus resources corresponding to the accelerator, the Bus resources corresponding to the multiple accelerators are reallocated from the Bus resource pool. The multiple accelerators share the Bus resource pool. When the Bus demand of the PCIe device connected to a certain accelerator is greater than the Bus resources corresponding to the accelerator, the Bus resources corresponding to the multiple accelerators are reallocated from the Bus resource pool. The Bus resources corresponding to the accelerator can be increased, and the Bus resources corresponding to the accelerator with smaller Bus demand of the connected PCIe device can be reduced, thereby ensuring the normal loading of each PCIe device connected to the accelerator, realizing the on-demand allocation of Bus resources corresponding to each accelerator, thereby avoiding the waste of Bus resources, and the allocation flexibility of Bus resources is high.
[0044] Please refer to Figure 3 , Figure 3 A flowchart of another PCIe device management method provided in an embodiment of the present application is provided. The method can be applied to a PCIe system, for example Figure 1 In the PCIe system shown, the method may include the following processes:
[0045] 301. Determine a Bus resource pool shared by multiple accelerators, where the accelerator is used to access a PCIe device, and the Bus resource pool is used to provide Bus configuration to the PCIe devices to which the multiple accelerators are connected.
[0046] 302. When the Bus demand of the PCIe device to which the accelerator is connected is greater than the Bus resources corresponding to the accelerator, the Bus resources corresponding to the plurality of accelerators are reallocated from the Bus resource pool.
[0047] This process can be done by Figure 1 The processor in the program is executed. The processor can reallocate the Bus resources corresponding to the multiple accelerators from the Bus resource pool by changing the register configuration. For an accelerator whose Bus demand of the connected PCIe device is greater than the corresponding Bus resources, when reallocating the Bus resources corresponding to the multiple accelerators, the Bus resources corresponding to the accelerator can be increased. For an accelerator whose Bus demand of the connected PCIe device is less than the corresponding Bus resources, when reallocating the Bus resources corresponding to the multiple accelerators, the Bus resources corresponding to the accelerator can be reduced.
[0048] 303. Intercept configuration information of the PCIe device during the enumeration process, where the configuration information of the PCIe device is used to indicate: Bus configuration of the PCIe device.
[0049] The Bus configuration of the PCIe device may include the Bus number of the PCIe device. This process may be performed by the processor during the system enumeration phase. After each reallocation of Bus resources corresponding to multiple accelerators, the processor needs to re-execute the enumeration process to determine all PCIe devices in the PCIe system and determine the configuration information of each PCIe device (including the Bus number assigned to each PCIe device).
[0050] During the enumeration process, the processor determines the configuration information of a PCIe device and sends the configuration information to the PCIe device. During this process, the decoder in the processor intercepts the configuration information sent to the PCIe device.
[0051] Optionally, the PCIe devices connected to the multiple accelerators can also share MMIO space. The MMIO space is used by the processor to write configuration information of each PCIe device. In the related art, each PCIe device has an MMIO space, while in the embodiment of the present application, multiple PCIe devices share an MMIO space, which can realize flexible management of the operating system.
[0052] 304. Broadcast configuration information of the PCIe device to multiple accelerators.
[0053] The decoder in the processor can broadcast the configuration information of a PCIe device to multiple accelerators each time after intercepting the configuration information of the PCIe device during the enumeration process; or it can broadcast the configuration information of each PCIe device to multiple accelerators after intercepting the configuration information of all PCIe devices during the enumeration process, which is not limited in the embodiments of the present application. It should be noted that the processor also needs to send its configuration information to the enumerated PCIe device to complete the enumeration of the PCIe device.
[0054] When the processor re-enumerates, it is necessary to ensure that each accelerator in the PCIe system synchronously obtains the configuration information of each PCIe device to ensure the normal progress of the subsequent message transmission process, so it is necessary to execute process 304.
[0055] In the subsequent message transmission process, when the decoder in the processor receives the message, it routes the message to the accelerator connected to the destination PCIe device based on the configuration information of each PCIe device intercepted and the Bus information carried in the message. The accelerator transmits the message to the destination PCIe device based on the configuration information of each PCIe device received during the broadcast process and the Bus information carried in the message. The Bus information is used to indicate the Bus configuration of the destination PCIe device, for example, the Bus information may include the Bus number of the destination PCIe device.
[0056] For example, please refer to Figure 4 , Figure 4 A schematic diagram of an enumeration process provided in an embodiment of the present application. Figure 4 Take the following example to illustrate the process of enumerating a PCIe device. Figure 4 Figure 1 shows a request node (RN), a miscellaneous node (MN), a slave node (SN), and a PCIe device. RN represents a processor, MN represents a miscellaneous node in a PCIe system, and SN represents an accelerator. Figure 4 Only one SN and one PCIe device are shown in the figure. In the actual process, there are multiple SNs and multiple PCIe devices.
[0057] In the process of enumerating a PCIe device, RN first sends WriteNoSnp to MN to issue a write request. MN returns DBIDResp to RN to inform SN that it can send data, and broadcasts the received WriteNoSnp to each SN and this PCIe device. Based on the received WriteNoSnp, each SN and the PCIe device returns DBIDResp to MN to inform MN that it can receive write data. After receiving DBIDResp returned by MN, RN sends NCBWrData to MN, that is, write data, and the data is the configuration information corresponding to the PCIe device. After receiving DBIDResp returned by SN, MN broadcasts NCBWrData to each SN, and after receiving DBIDResp returned by PCIe device, sends NCBWrData to the PCIe device. Based on the received NCBWrData, each SN and the PCIe device returns Comp to MN to inform MN that the data has been received. After receiving Comp returned by each SN and each PCIe device, MN returns Comp to RN to inform SN that the data has been received.
[0058] In summary, the management method of PCIe devices provided in the embodiment of the present application first determines a Bus resource pool shared by multiple accelerators, and the Bus resource pool is used to provide Bus configuration to PCIe devices connected to multiple accelerators. When the Bus demand of the PCIe device connected to the accelerator is greater than the Bus resources corresponding to the accelerator, the Bus resources corresponding to the multiple accelerators are reallocated from the Bus resource pool, and then the configuration information corresponding to the PCIe device in the enumeration process is enumerated. The configuration information corresponding to the PCIe device is used to indicate: the Bus configuration of the PCIe device, and broadcast the configuration information corresponding to the PCIe device to multiple accelerators. Configuration information, multiple accelerators share a Bus resource pool. When the Bus demand of a PCIe device connected to an accelerator is greater than the Bus resources corresponding to the accelerator, the Bus resources corresponding to multiple accelerators can be reallocated from the Bus resource pool. This can increase the Bus resources corresponding to the accelerator and reduce the Bus resources corresponding to the accelerator with a smaller Bus demand of the connected PCIe device. This ensures the normal loading of each PCIe device connected to the accelerator and realizes the on-demand allocation of the Bus resources corresponding to each accelerator, thereby avoiding the waste of Bus resources and achieving high flexibility in the allocation of Bus resources.
[0059] The above-mentioned embodiment is described by taking multiple accelerators in a PCIe system as an example. The embodiment of the present application can also be applied to PCIe device management in a multi-chip system. The multi-chip system can share a Bus resource pool, which is not limited in the embodiment of the present application.
[0060] The sequence of the methods provided in the embodiments of the present application can be adjusted appropriately, and the process can be increased or decreased accordingly according to the situation. Any technician familiar with the technical field can easily think of a method of change within the technical scope disclosed in this application, which should be included in the protection scope of this application, and the embodiments of the present application do not limit this.
[0061] The above mainly introduces the management method of the PCIe device provided in the embodiment of the present application from the perspective of the device. It is understandable that in order to realize the above functions, the device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.
[0062] The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0063] Figure 5 A block diagram of a management device for a PCIe device provided in an embodiment of the present application, in the case of dividing each functional module according to each function, the management device 400 of the PCIe device may include a transceiver module 401 and a processing module 402. Exemplarily, the management device of the PCIe device may be a processor, or a chip therein, or other combined devices, components, etc. having the functions of the management device of the above-mentioned PCIe device. When the management device 400 of the PCIe device is a processor, the transceiver module 401 may be a transceiver, and the transceiver may include an antenna and a radio frequency circuit, etc.; the processing module 402 may be a processor (or a processing circuit), such as a baseband processor, and the baseband processor may include one or more CPUs. When the management device 400 of the PCIe device is a device or component having the above-mentioned functions, the transceiver module 401 may be a radio frequency unit; the processing module 402 may be a processor (or a processing circuit), such as a baseband processor. When the management device 400 of the PCIe device is a chip system, the transceiver module 401 can be an input and output interface of a chip (e.g., a baseband chip); the processing module 402 can be a processor (or a processing circuit) of the chip system, which can include one or more central processing units. It should be understood that the transceiver module 401 in the embodiment of the present application can be implemented by a transceiver or a transceiver-related circuit component; the processing module 402 can be implemented by a processor or a processor-related circuit component (or, referred to as a processing circuit).
[0064] The transceiver module 401 can be used to execute Figure 2 or Figure 3 All transceiver operations in the embodiment shown, and / or other processes for supporting the technology described herein; the processing module 402 can be used to perform Figure 2 or Figure 3 All operations except for the transceiver operations in the illustrated embodiments, and / or other processes for supporting the techniques described herein.
[0065] The transceiver module 401 may include a sending module and / or a receiving module, each of which is used to execute Figure 2 or Figure 3In the sending and receiving operations in the illustrated embodiment, the management device of the PCIe device includes:
[0066] A processing module, used to determine a bus resource pool shared by multiple accelerators, the accelerators are used to access PCIe devices, and the bus resource pool is used to provide bus configuration to the PCIe devices accessed by the multiple accelerators;
[0067] The processing module is further configured to reallocate the bus resources corresponding to the plurality of accelerators respectively from the bus resource pool when the bus demand of the PCIe device to which the accelerator is connected is greater than the bus resources corresponding to the accelerator.
[0068] In combination with the above scheme, the processing module is also used to intercept the configuration information of the PCIe device during the enumeration process, and the configuration information of the PCIe device is used to indicate: the bus configuration of the PCIe device; the transceiver module is used to broadcast the configuration information of the PCIe device to the multiple accelerators.
[0069] In combination with the above scheme, the transceiver module is also used to route the message to the accelerator connected to the destination PCIe device based on the configuration information of each PCIe device and the bus information carried in the message when receiving the message, and the bus information is used to indicate the bus configuration of the destination PCIE device.
[0070] In combination with the above solution, the PCIe devices connected to the multiple accelerators share a memory-mapped input / output MMIO space.
[0071] Figure 6 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device 500 may be a processor or a chip or a functional module in a processor. Figure 6 As shown, the electronic device 500 includes a processor 501 , a transceiver 502 and a communication circuit 503 .
[0072] The processor 501 is used to execute the following Figure 2 and Figure 3 In any step of the method embodiment shown, when performing a process such as broadcasting configuration information corresponding to a plurality of accelerators, the transceiver 502 and the communication line 503 may be selectively called to complete the corresponding operation.
[0073] Furthermore, the electronic device 500 may further include a memory 504. The processor 501, the memory 504 and the transceiver 502 may be connected via a communication line 503.
[0074] The processor 501 is a processor, a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 501 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0075] The transceiver 502 is used to communicate with other devices or other communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The transceiver 502 can be a module, a circuit, a transceiver or any device capable of achieving communication.
[0076] The transceiver 502 is mainly used for sending and receiving commands and information, and may include a transmitter and a receiver, which respectively send and receive commands and information; operations other than sending and receiving commands and information are implemented by the processor, such as determining a bus resource pool shared by multiple accelerators.
[0077] The communication line 503 is used to transmit information between the components included in the electronic device 500.
[0078] In one design, the processor may be considered as the logic circuit and the transceiver may be considered as the interface circuit.
[0079] The memory 504 is used to store instructions, where the instructions may be computer programs.
[0080] The memory 504 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. The nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DRRAM). The memory 504 may also be a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disk, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, etc. It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0081] It should be noted that the memory 504 can exist independently of the processor 501, or can be integrated with the processor 501. The memory 504 can be used to store instructions or program codes or some data, etc. The memory 504 can be located inside the electronic device 500, or outside the electronic device 500, without limitation. The processor 501 is used to execute the instructions stored in the memory 504 to implement the method provided in the above embodiment of the present application.
[0082] In one example, the processor 501 may include one or more processors, such as Figure 6 Processor 0 and processor 1 in.
[0083] As an optional implementation, the electronic device 500 includes multiple processors, for example, Figure 6 In addition to the processor 501, a processor 507 may also be included.
[0084] As an optional implementation, the electronic device 500 further includes an output device 505 and an input device 506. Exemplarily, the input device 506 is a device such as a keyboard, a mouse, a microphone or a joystick, and the output device 505 is a device such as a display screen and a speaker.
[0085] It should be noted that the electronic device 500 may be a chip system or a Figure 6 Devices with similar structures in the chip system. Among them, the chip system can be composed of chips, or it can include chips and other discrete devices. The actions, terms, etc. involved in the various embodiments of this application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiment of this application is only an example, and other names can also be used in the specific implementation without limitation. In addition, Figure 6 The components shown in the figure do not constitute a limitation on the electronic device 500. Figure 6 In addition to the components shown, the electronic device 500 may include Figure 6 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.
[0086] The processor and transceiver described in the present application can be implemented in an integrated circuit (IC), an analog IC, a radio frequency integrated circuit, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
[0087] Figure 7The following is a schematic diagram of a PCIe device management device provided in an embodiment of the present application. The PCIe device management device can be applied to the scenario shown in the above method embodiment. For ease of explanation, Figure 7 Only the main components of the management device of the PCIe device are shown, including a processor, a memory, a control circuit, and an input-output device. The processor is mainly used to process the communication protocol and communication data, execute the software program, and process the data of the software program. The memory is mainly used to store the software program and data. The control circuit is mainly used for power supply and transmission of various electrical signals. The input-output device is mainly used to receive data input by the user and output data to the user.
[0088] When the management device of the PCIe device is a processor, the control circuit can be a motherboard, the memory includes a hard disk, RAM, ROM and other media with storage functions, the processor can include a baseband processor and a central processing unit, the baseband processor is mainly used to process the communication protocol and communication data, the central processing unit is mainly used to control the management device of the entire PCIe device, execute software programs, process the data of software programs, and the input and output devices include a display screen, a keyboard and a mouse, etc.; the control circuit can further include or connect a transceiver circuit or a transceiver, such as: a network cable interface, etc., for sending or receiving data or signals, such as data transmission and communication with other devices. Furthermore, it can also include an antenna for sending and receiving wireless signals, and for data / signal transmission with other devices.
[0089] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which includes a computer program code. When the computer program code runs on a computer, the computer executes any of the methods described in the embodiments of the present application.
[0090] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by a computer or a device with management capabilities of a PCIe device to control the completion of related hardware. The computer program or the group of instructions can be stored in the above computer-readable storage medium. When the computer program or the group of instructions is executed, it may include the processes of the above method embodiments. The computer-readable storage medium may be an internal storage unit of the processor of any of the above embodiments, such as a hard disk or memory of the processor. The above computer-readable storage medium may also be an external storage device of the above processor, such as a plug-in hard disk equipped on the above processor, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. Further, the above computer-readable storage medium may also include both the internal storage unit of the above processor and an external storage device. The above computer-readable storage medium is used to store the above computer program or instructions and other programs and data required by the above processor. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0091] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0093] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0094] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0095] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0096] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0097] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for managing a high-speed peripheral component interconnect (PCIe) device, characterized in that: The method comprises: Determine a bus resource pool shared by multiple accelerators, the accelerators are used to access PCIE devices, and the bus resource pool is used to provide bus configuration to the PCIe devices accessed by the multiple accelerators; When the bus demand of the PCIe device to which the accelerator is connected is greater than the bus resources corresponding to the accelerator, the bus resources respectively corresponding to the multiple accelerators are reallocated from the bus resource pool.
2. The method according to claim 1, characterized in that The method further comprises: Intercepting configuration information of the PCIe device during enumeration, where the configuration information of the PCIe device is used to indicate: the bus configuration of the PCIe device; The configuration information of the PCIe device is broadcasted to the multiple accelerators.
3. The method according to claim 2, characterized in that The method further comprises: When a message is received, the message is routed to the accelerator connected to the destination PCIe device based on the configuration information of each PCIe device and the bus information carried in the message, where the bus information is used to indicate the bus configuration of the destination PCIE device.
4. The method according to any one of claims 1 to 3, characterized in that: The PCIe devices connected to the multiple accelerators share a memory-mapped input / output MMIO space.
5. A management device for high-speed peripheral component interconnect (PCIe) equipment, characterized in that: The device comprises: A processing module, used to determine a bus resource pool shared by multiple accelerators, the accelerators are used to access PCIe devices, and the bus resource pool is used to provide bus configuration to the PCIe devices accessed by the multiple accelerators; The processing module is further configured to reallocate the bus resources corresponding to the plurality of accelerators respectively from the bus resource pool when the bus demand of the PCIe device to which the accelerator is connected is greater than the bus resources corresponding to the accelerator.
6. The device according to claim 5, characterized in that The processing module is further used to intercept the configuration information of the PCIe device during the enumeration process, where the configuration information of the PCIe device is used to indicate: the bus configuration of the PCIe device; The apparatus further includes: a transceiver module, configured to broadcast configuration information of the PCIe device to the multiple accelerators.
7. The device according to claim 6, characterized in that The transceiver module is also used to route the message to the accelerator connected to the destination PCIe device based on the configuration information of each PCIe device and the bus information carried in the message when receiving the message, and the bus information is used to indicate the bus configuration of the destination PCIE device.
8. The device according to any one of claims 5 to 7, characterized in that The PCIe devices connected to the multiple accelerators share a memory-mapped input / output MMIO space.
9. A management device for high-speed peripheral component interconnect (PCIe) equipment, characterized in that: The device comprises: one or more processors; a memory for storing one or more computer programs or instructions; When the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.
10. A chip, characterized in that: The chip comprises: memory and at least one processor; The at least one processor executes the program or instruction stored in the memory so that the chip implements the method according to any one of claims 1 to 4 above.
