Read-write operation execution method and device, storage medium and electronic equipment

By connecting complex programmable logic devices on the target bus between the central processor and the baseboard management controller, the read and write operations of the central processor are detected and executed, thereby solving the low efficiency of read and write operations caused by the limited number of central processor pins. problem, improving the efficiency of read and write operations.

CN118656319APending Publication Date: 2024-09-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410773607.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-16
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Due to the limited number of pins of the central processing unit, the execution efficiency of read and write operations is low, and the existing technology cannot effectively solve this problem.

Method used

By connecting complex programmable logic devices on the target bus between the central processor and the baseboard management controller, the read and write status of the central processor is detected and monitored, and the read and write operations are extracted and executed, thereby expanding the input and output functions of the central processor. .

Benefits of technology

It improves the execution efficiency of read and write operations, expands the input and output functions of the central processor through complex programmable logic devices, and solves the problem of low efficiency of read and write operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656319A
    Figure CN118656319A
Patent Text Reader

Abstract

The embodiment of the invention provides a read-write operation execution method and device, a storage medium and electronic device.The method comprises the steps that the read-write state of a central processing unit on a target bus is detected, and the read-write state is used for indicating target read-write equipment requesting to execute read-write operation on the target bus by the central processing unit; under the condition that the read-write state is detected to be used for indicating that the central processing unit requests to execute read-write operation on the complex programmable logic device, monitoring command data sent by the central processing unit on a target bus; when it is monitored that the central processing unit sends the target command data on the target bus, target read-write operation requested to be executed by the central processing unit is extracted from the target command data; and executing the target read-write operation in the target storage space of the complex programmable logic device. By means of the method and device, the problem that the execution efficiency of the read-write operation is low is solved, and then the effect of improving the execution efficiency of the read-write operation is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a method, device, storage medium, and electronic device for performing read and write operations. Background Art

[0002] At present, due to the increasing integration of central processing units, some platforms have abandoned the PCH (Platform Controller Hub, South Bridge). However, due to the limited number of pins of the central processing unit itself, the central processing unit cannot provide enough input and output pins, which reduces the execution efficiency of read and write operations in the central processing unit.

[0003] In view of the problems in related technologies such as low execution efficiency of read and write operations, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a method, device, storage medium and electronic device for executing read and write operations, so as to at least solve the problem of low execution efficiency of read and write operations in the related art.

[0005] According to an embodiment of the present application, a method for executing a read and write operation is provided, wherein a server comprises: a central processing unit, a baseboard management controller, and a complex programmable logic device, wherein the central processing unit and the baseboard management controller are connected via a target bus, wherein the target bus is used to implement interaction between the central processing unit and the baseboard management controller, and the complex programmable logic device is connected to the target bus, wherein the method is applied to the complex programmable logic device, and wherein the method comprises:

[0006] Detecting the read / write status of the central processor on the target bus, wherein the read / write status is used to indicate the target read / write device requested by the central processor to perform a read / write operation on the target bus;

[0007] monitoring command data sent by the central processor on the target bus when the read / write status is detected to indicate that the central processor requests to perform a read / write operation on the complex programmable logic device;

[0008] In the case where it is monitored that the central processor sends target command data on the target bus, extracting the target read / write operation requested to be executed by the central processor from the target command data;

[0009] The target read and write operations are performed in a target storage space of the complex programmable logic device.

[0010] In an exemplary embodiment, the target bus includes a first bus and a second bus, and the detecting the read / write status of the central processing unit on the target bus includes: receiving a chip select signal sent by the central processing unit via the first bus; detecting a level conversion of the chip select signal; and when detecting that the chip select signal is converted from a high level to a low level, determining that the read / write status is detected to indicate that the central processing unit requests to perform the read / write operation on the complex programmable logic device, wherein the second bus is used to transmit data between the central processing unit and the complex programmable logic device.

[0011] In an exemplary embodiment, the monitoring of command data sent by the central processor on the target bus includes: continuously receiving data sent by the central processor on the target bus; detecting whether the received data carries a target identifier, wherein the target identifier is used to indicate the starting time when the central processor performs the read and write operations on the complex programmable logic device; when it is detected that the received data carries the target identifier, determining the data carrying the target identifier as the target command data, and determining that the central processor is monitored to have sent the target command data on the target bus.

[0012] In an exemplary embodiment, extracting the target read / write operation requested by the central processing unit from the target command data includes: extracting target operation information from the target command data, wherein the target operation information is used to indicate the execution of a read operation or a write operation; when the extracted target operation information is used to indicate the execution of the read operation, determining the target read / write operation to be the read operation; when the extracted target operation information is used to indicate the execution of the write operation, determining the target read / write operation to be the write operation.

[0013] In an exemplary embodiment, the target read / write operation is performed in the target storage space of the complex programmable logic device, including: when the target read / write operation is a read operation, extracting a first data index from the target command data, wherein the first data index is used to indicate the read type to which the content requested to be read by the central processing unit belongs, and the read type includes: a data type and a level state type, and the content belonging to the level state type is used to indicate the level state of the target pin of the complex programmable logic device, and the target read / write operation includes the read operation; extracting read data belonging to the read type from the target storage space according to the first data index; transmitting the read data to the central processing unit through the target bus; and continuing to receive the central processing unit's request to read the content requested by the central processing unit. Write data sent by the processor on the target bus, wherein the target read and write operations include the write operations, and the write data include a data count and a data group, the data count is used to indicate the number of data groups to be subjected to the write operation, the data group includes a second data index and a data value having a corresponding relationship, the second data index is used to indicate a target register in the target storage space to be written with the corresponding data value, the target register includes a data register and a pin status register; upon receiving the data groups of the number indicated by the data count, detecting whether the data groups are complete data by sending a first check code to the data groups; upon detecting that the data groups are complete data, writing the corresponding data values ​​into the corresponding target registers according to the data index included in each of the data groups.

[0014] In an exemplary embodiment, extracting the first data index from the target command data includes: extracting an initial index from the target command data; detecting whether the initial index falls within a target index value range; and determining that the first data index is extracted from the target command data when it is detected that the initial index falls within the target index value range.

[0015] In an exemplary embodiment, extracting read data belonging to the read type from the target storage space according to the first data index includes: detecting a target register where the data belonging to the read type is located according to the first data index, wherein the target storage space includes the target register, and the target register includes a data register and a pin status register; searching for data belonging to the read type in the target register; when data belonging to the read type is found, detecting whether the data belonging to the read type is complete data by sending a second check code to the data belonging to the read type; when it is detected that the data belonging to the read type is complete data, using the data belonging to the read type as the read data, and extracting the read data from the target storage space.

[0016] According to another embodiment of the present application, a device for executing read and write operations is provided, wherein the server includes: a central processing unit, a baseboard management controller, and a complex programmable logic device, wherein the central processing unit and the baseboard management controller are connected via a target bus, wherein the target bus is used to implement interaction between the central processing unit and the baseboard management controller, wherein the complex programmable logic device is connected to the target bus, wherein the device is applied to the complex programmable logic device, and wherein the device includes:

[0017] A detection module, used for detecting the read / write status of the central processor on the target bus, wherein the read / write status is used for indicating the target read / write device requested by the central processor to perform read / write operations on the target bus;

[0018] A monitoring module, configured to monitor command data sent by the central processor on the target bus when it is detected that the read / write status indicates that the central processor requests to perform a read / write operation on the complex programmable logic device;

[0019] an extraction module, for extracting the target read / write operation requested to be executed by the central processor from the target command data when monitoring that the central processor has sent the target command data on the target bus;

[0020] An execution module is used to execute the target read and write operations in the target storage space of the complex programmable logic device.

[0021] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0022] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0023] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0024] Through the present application, the read / write status of the central processing unit on the target bus is detected, wherein the read / write status is used to indicate the target read / write device on the target bus that the central processing unit requests to perform read / write operations; in the case where it is detected that the read / write status is used to indicate that the central processing unit requests to perform read / write operations on a complex programmable logic device, the command data sent by the central processing unit on the target bus is monitored; in the case where it is monitored that the central processing unit has sent target command data on the target bus, the target read / write operation requested to be performed by the central processing unit is extracted from the target command data; and the target read / write operation is performed in the target storage space of the complex programmable logic device. Since the complex programmable logic device originally existing on the server is connected on the target bus used to connect the central processing unit and the baseboard management controller, the input / output function is expanded for the central processing unit through the complex programmable logic device. Therefore, the problem of low execution efficiency of read / write operations can be solved, and the effect of improving the execution efficiency of read / write operations can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a hardware structure block diagram of a server device of a method for executing a read and write operation according to an embodiment of the present application;

[0026] Figure 2 is a flowchart of a method for executing a read and write operation according to an embodiment of the present application;

[0027] Figure 3 is a schematic diagram of a communication process between a central processing unit and a complex programmable logic device according to an embodiment of the present application;

[0028] Figure 4 is a schematic diagram of target command data for indicating a read operation according to an embodiment of the present application;

[0029] Figure 5 is a schematic diagram of target command data for indicating a write operation according to an embodiment of the present application;

[0030] Figure 6 is a schematic diagram of a data value according to an embodiment of the present application;

[0031] Figure 7is a schematic diagram of a server according to an embodiment of the present application;

[0032] Figure 8 is a schematic diagram of an execution process of a read and write operation according to an embodiment of the present application;

[0033] Fig. 9 is a structural block diagram of a device for executing read and write operations according to an embodiment of the present application;

[0034] Fig.10 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0035] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0037] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a method for executing a read and write operation in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the execution method of the read and write operations in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0040] In this embodiment, a method for executing a read and write operation is provided. The server includes: a central processing unit, a baseboard management controller, and a complex programmable logic device. The central processing unit and the baseboard management controller are connected via a target bus. The target bus is used to implement interaction between the central processing unit and the baseboard management controller. The complex programmable logic device is connected to the target bus. The method is applied to the complex programmable logic device. Figure 2 is a flowchart of a method for executing a read and write operation according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0041] Step S202, detecting the read / write status of the central processor on the target bus, wherein the read / write status is used to indicate the target read / write device requested by the central processor to perform a read / write operation on the target bus;

[0042] Step S204, monitoring command data sent by the central processor on the target bus when it is detected that the read / write status indicates that the central processor requests to perform a read / write operation on the complex programmable logic device;

[0043] Step S206, when it is monitored that the central processor sends target command data on the target bus, extracting the target read / write operation requested to be executed by the central processor from the target command data;

[0044] Step S208, executing the target read and write operations in the target storage space of the complex programmable logic device.

[0045] Through the above steps, the read and write status of the central processing unit on the target bus is detected, wherein the read and write status is used to indicate the target read and write device on the target bus that the central processing unit requests to perform read and write operations; in the case where it is detected that the read and write status indicates that the central processing unit requests to perform read and write operations on the complex programmable logic device, the command data sent by the central processing unit on the target bus is monitored; in the case where it is monitored that the central processing unit has sent target command data on the target bus, the target read and write operation requested to be performed by the central processing unit is extracted from the target command data; and the target read and write operation is performed in the target storage space of the complex programmable logic device. Since the complex programmable logic device originally existing on the server is connected on the target bus used to connect the central processing unit and the baseboard management controller, the input and output functions of the central processing unit are expanded through the complex programmable logic device. Therefore, the problem of low execution efficiency of read and write operations can be solved, and the effect of improving the execution efficiency of read and write operations can be achieved.

[0046] Optionally, in this embodiment, the server platform can be, but is not limited to, building a server through the execution method of the read and write operations proposed in this application, and the server platform can be, but is not limited to, including: Birch Stream platform, EagleStream platform, etc. Any platform that allows the input and output pin expansion of the central processing unit deployed in the server can use the execution method of the read and write operations proposed in this application.

[0047] Optionally, in this embodiment, the server may be, but is not limited to, deployed with a CPU (Central Processing Unit), a BMC (Baseboard Management Controller) and a CPLD (Complex Programmable Logic Device).

[0048] In the execution method of the read and write operation proposed in the present application, by connecting the CPLD to the target bus connecting the CPU and the BMC, since the CPLD is a device originally existing in the server, the CPU GPIO expansion functions such as bandwidth allocation, configuration differentiation, and motherboard signal control for the CPU are realized through the CPLD without adding additional devices. It should be noted that the above-mentioned CPLD can also be other devices deployed on the server that allow the same function to be realized.

[0049] In the technical solution provided in the above step S202, the above target bus can be, but is not limited to, used to transmit signals or data sent by the central processing unit, and can be, but is not limited to, detecting whether the central processing unit requests to perform read or write operations based on the signals or data transmitted by the central processing unit through the target bus, for example: when it is detected that the central processing unit has transmitted a target signal through the target bus, it is determined that the central processing unit requests to perform read or write operations; or, when it is detected that the central processing unit has transmitted target data through the target bus, it is determined that the central processing unit requests to perform read or write operations, etc.

[0050] Optionally, in this embodiment, when it is determined that the central processor requests to perform a read / write operation, the target read / write device on which the central processor requests to perform a read / write operation can be further detected based on the signal or data transmitted by the central processor through the target bus, but is not limited to: when it is detected that a target signal transmitted by the central processor through the target bus undergoes a level conversion, it is determined that the central processor requests to perform a read / write operation on a complex programmable logic device. Alternatively, when it is detected that the target data transmitted by the central processor through the target bus carries an identifier for indicating a complex programmable logic device, it is determined that the central processor requests to perform a read / write operation on the complex programmable logic device, etc.

[0051] In an exemplary embodiment, the target bus includes a first bus and a second bus, and the read and write status of the central processing unit on the target bus can be detected in the following manner, but is not limited to: receiving a chip select signal sent by the central processing unit via the first bus; detecting a level conversion of the chip select signal; and when detecting that the chip select signal is converted from a high level to a low level, determining that the read and write status is detected to indicate that the central processing unit requests to perform the read and write operations on the complex programmable logic device, wherein the second bus is used to transmit data between the central processing unit and the complex programmable logic device.

[0052] Optionally, in this embodiment, the target bus may include, but is not limited to, a first bus for transmitting a chip select signal, and a second bus for transmitting data between a central processing unit and a complex programmable logic device. The first bus may be, but is not limited to, any bus that allows the transmission of a chip select signal. The second bus may be, but is not limited to, a bus that allows data to be transmitted between a central processing unit and a complex programmable logic device, such as an SPI (Serial Peripheral Interface) bus, an eSPI (enhanced Serial Peripheral Interface) bus, etc.

[0053] It should be noted that in the Birch Stream platform, the SPI bus signal of the CPU is mainly used for reading and writing flash data, and there are no extra pins to implement the GPIO expansion function. Therefore, eSPI is preferred for CPU GPIO expansion in the Birch Stream platform and similar Birch Stream platforms.

[0054] In an exemplary embodiment, the read and write status of the central processing unit on the target bus can be detected in the following manner but is not limited to: receiving a chip select signal sent by the central processing unit through the target bus; detecting a level conversion of the chip select signal; and upon detecting that the chip select signal is converted from a high level to a low level, determining that the read and write status is detected to indicate that the central processing unit requests to perform the read and write operations on the complex programmable logic device.

[0055] Optionally, in this embodiment, the target bus can be but is not limited to a bus that has the function of transmitting chip select signals and the function of transmitting data between a central processing unit and a complex programmable logic device, such as: SPI (Serial Peripheral Interface) bus, eSPl (enhanced Serial Peripheral Interface) bus, etc.

[0056] Optionally, in this embodiment, Figure 3 is a schematic diagram of a communication process between a central processing unit and a complex programmable logic device according to an embodiment of the present application, such as Figure 3 As shown, before the communication between the central processing unit and the complex programmable logic device begins, data synchronization can be ensured by, but is not limited to, CLK (clock signal). The central processing unit pulls down ChipSelect# (chip select signal) through the first bus, indicating that the central processing unit determines to communicate with the complex programmable logic device.

[0057] The central processing unit may, but is not limited to, continue to send command data to the complex programmable logic device to achieve communication with the complex programmable logic device. The command data used to complete the communication may, but is not limited to, include: CMD (COMMAND, command code), indicating the type of operation requested by the central processing unit, optional HDR (header information), optional DATA (data) and CRC (Cyclic Redundancy Check, cyclic redundancy check code).

[0058] The CPLD may, but is not limited to, respond to command data via RESPONSE and feed back data to the central processor. RESPONSE may, but is not limited to, include: RSP (response code), optional HDR, optional DATA, STS (status code) and CRC.

[0059] After the CPU receives the response and verifies it is correct, the Chip Select# signal will be pulled high, ending the current communication cycle.

[0060] It should be noted that in the above description, the central processing unit is the master device of the target bus, and the complex programmable logic device is the slave device of the target bus. When other devices are used as the master device of the target bus, or when other devices are used as the slave device of the target bus, the above method can also be used for communication.

[0061] In the technical solution provided in the above step S204, the above central processing unit may be, but is not limited to, continuously sending data on the target bus, and the above data may be, but is not limited to, including command data and other data. When the central processing unit is monitored to have sent command data on the target bus, it may be, but is not limited to, further detecting whether the command data is related to the read / write operation requested by the central processing unit and the target read / write device requested to perform the read / write operation. When it is detected that the command data is related to the read / write operation requested by the central processing unit and the target read / write device requested to perform the read / write operation, it is determined that the central processing unit is monitored to have sent the target command data on the target bus.

[0062] In an exemplary embodiment, the command data sent by the central processor on the target bus can be monitored in the following manner, but is not limited to: continuously receiving data sent by the central processor on the target bus; detecting whether the received data carries a target identifier, wherein the target identifier is used to indicate the starting time when the central processor performs the read and write operations on the complex programmable logic device; when it is detected that the received data carries the target identifier, determining the data carrying the target identifier as the target command data, and determining that the central processor has been monitored to send the target command data on the target bus.

[0063] Optionally, in this embodiment, the time when the target identifier is detected can be, but is not limited to, determined as the starting time when the central processor performs read and write operations on the complex programmable logic device. For example, taking the target identifier as CMD as an example, when CMD is detected, it is determined that the central processor starts to perform read and write operations on the complex programmable logic device. Alternatively, it can be, but is not limited to, determining the starting time when the central processor performs read and write operations on the complex programmable logic device based on the detected target identifier, for example, when the target identifier is the start time, when the target identifier is detected, the target identifier is parsed to determine the starting time when the central processor performs read and write operations on the complex programmable logic device, etc.

[0064] In the technical solution provided in the above step S206, the target read and write operations may include but are not limited to: read operations and write operations, and the above target command data may include but are not limited to carrying the target read and write operations requested to be executed by the central processing unit, such as: reading a specific location of the target command data to obtain the target read and write operations requested to be executed by the central processing unit.

[0065] In an exemplary embodiment, the target read / write operation requested by the central processing unit to be executed can be extracted from the target command data in the following manner, but is not limited to: extracting target operation information from the target command data, wherein the target operation information is used to indicate the execution of a read operation or a write operation; in the case where the extracted target operation information is used to indicate the execution of the read operation, determining the target read / write operation to be the read operation; in the case where the extracted target operation information is used to indicate the execution of the write operation, determining the target read / write operation to be the write operation.

[0066] Optionally, in this embodiment, taking the target command data as CMD as an example, when CMD is parsed to be 00000100, it means that the current target bus communication is in PUT_VWIRE mode, that is, the target read and write operation is determined to be a write operation; when CMD is parsed to be 00000101, it means that the current target bus communication is in GET_VWIRE mode, that is, the target read and write operation is determined to be a read operation.

[0067] In the technical solution provided in the above step S208, executing the target read and write operation in the target storage space of the complex programmable logic device may include, but is not limited to: executing a read operation in the target storage space, or executing a write operation in the target storage space. It should be noted that in each target bus transmission process, the direction of the target read and write operation is consistent, that is, a target read and write operation is either used entirely to complete a read operation or entirely to complete a write operation.

[0068] In an exemplary embodiment, the target read and write operation can be performed in the target storage space of the complex programmable logic device in the following manner, but is not limited to: when the target read and write operation is a read operation, extracting a first data index from the target command data, wherein the first data index is used to indicate the read type to which the content requested to be read by the central processing unit belongs, and the read type includes: a data type and a level status type, and the content belonging to the level status type is used to indicate the level status of the target pin of the complex programmable logic device, and the target read and write operation includes the read operation; extracting read data belonging to the read type from the target storage space according to the first data index; and transmitting the read data to the central processing unit via the target bus.

[0069] Optionally, in this embodiment, the read type of the content requested to be read by the central processing unit may include, but is not limited to, a data type and a level state type, and the content belonging to the level state type is used to indicate the level state of the target pin of the complex programmable logic device. The content belonging to the data type and the content belonging to the level state type may be, but are not limited to, stored in different registers of the complex programmable logic device. Alternatively, they may also be stored in the same register.

[0070] Optionally, in this embodiment, Figure 4 is a schematic diagram of target command data for indicating a read operation according to an embodiment of the present application, such as Figure 4 As shown, the central processing unit can, but is not limited to, request to perform a read operation in the following manner: the central processing unit sends target command data (COMMAND) including: GET_VWIRE (target operation information) for requesting to read data, a first data index (INDEX), and a command check (CRC) for ensuring that there is no error in the target operation information during transmission.

[0071] When the complex programmable logic device receives the target command data, it determines the read type of the content requested by the central processor according to the first data index, and extracts the read data from the corresponding register according to the read type of the content requested by the central processor, and transmits it to the central processor in the following ways, but not limited to:

[0072] After receiving the target command data, the complex programmable logic device will send a response frame, which includes: RSP (response code), indicating the response to the previous command; Virtual Wire Index, identifying the virtual wire or data type involved in the response; Data (actual data load), data provided according to the request; data organization; Count, the number of data items included in the response; status code (STS), indicating the status of data transmission or execution results; response check (CRC), used to ensure the integrity and accuracy of the response data.

[0073] In an exemplary embodiment, the first data index can be extracted from the target command data in the following manner but is not limited to: extracting an initial index from the target command data; detecting whether the initial index falls within the target index value range; and determining that the first data index is extracted from the target command data when it is detected that the initial index falls within the target index value range.

[0074] Optionally, in this embodiment, the index can be but is not limited to being used to indicate the data type of the transmission, and can be but is not limited to determining the data type of the transmission based on the index value range in which the index value is located. For example: setting the index between 128-255 indicates the ordinary GPlO extended data type, that is, when the initial index falls between 128-255, it is determined that the first data index is extracted from the target command data.

[0075] In an exemplary embodiment, read data belonging to the read type can be extracted from the target storage space according to the first data index in the following manner, but is not limited to: detecting a target register where the data belonging to the read type is located according to the first data index, wherein the target storage space includes the target register, and the target register includes a data register and a pin status register; searching for data belonging to the read type in the target register; when data belonging to the read type is found, detecting whether the data belonging to the read type is complete data by sending a second check code to the data belonging to the read type; when it is detected that the data belonging to the read type is complete data, using the data belonging to the read type as the read data, and extracting the read data from the target storage space.

[0076] Optionally, in this embodiment, the second check code may be, but is not limited to, CRC, or other check codes may be used to detect whether the data of the read type is complete data.

[0077] In an exemplary embodiment, the target read and write operation can be performed in the target storage space of the complex programmable logic device in the following manner, but is not limited to: when the target read and write operation is a write operation, continue to receive the write data sent by the central processor on the target bus, wherein the target read and write operation includes the write operation, and the write data includes a data count and a data group, the data count is used to indicate the number of data groups to be subjected to the write operation, the data group includes a second data index and a data value with a corresponding relationship, the second data index is used to indicate the target register to be written to the corresponding data value in the target storage space, and the target register includes a data register and a pin status register; when the number of data groups indicated by the data count is received, whether the data group is complete data is detected by sending a first check code to the data group; when it is detected that the data group is complete data, the corresponding data value is written into the corresponding target register according to the data index included in each data group.

[0078] Optionally, in this embodiment, Figure 5 is a schematic diagram of target command data for indicating a write operation according to an embodiment of the present application, such as Figure 5 As shown, in the target command data for indicating a write operation, the target operation information (commandopcode) is PUT_VWIRE, and in COMMAND (target command data), index (second data index) and data (data value) form a data group, and count is the data count.

[0079] Before the CPU sends the write data on the target bus, the data can be grouped but not limited to control the amount of data transmitted in a single transmission through data counting. Figure 6 is a schematic diagram of a data value according to an embodiment of the present application, such as Figure 6 As shown, 4 bits of valid bits can be defined, but are not limited to them, that is, <7:4> is the data valid bit, which corresponds to whether the <3:0> data is valid. If valid=0, the corresponding <3:0> data can be ignored. If valid=1, the corresponding <3:0> data is valid and can be used. For example, if <7=0>, the corresponding <3> The data can be ignored.

[0080] Since the effective number of bits for a group of data is 4 bits, when the number of CPU GPIOs to be expanded is 23, the actual effective number of bits for each group of data is 4 bits, and a total of 6 groups of data need to be divided.

[0081] Furthermore, the data can be grouped according to the delay requirement for writing the data, which may include but is not limited to: when the data delay requirement is high, the number of data groups (count) for each data transmission is set to 0, that is, only one group of data is transmitted each time, and the data transmission frequency is increased; when the data delay requirement is low, the number of data groups (count) for each data transmission can be appropriately increased. For example, among 23 bits of data, 4 bits of data transmission have high timeliness requirements, then the 23 bits of data can be divided into two groups, the first group of data group count (count) is 0, that is, only 4 bits of data are transmitted each time, and the second group of data group count (count) is 4, that is, 5 groups of data are transmitted each time, totaling 20 bits.

[0082] As shown in Table 1, the central processing unit and complex programmable logic device connected to the target bus can, but is not limited to, construct the target command data according to the Index agreed in Table 1 and transmit the corresponding signal:

[0083] Table 1

[0084]

[0085] By constructing the target command data through the GPIO signal names and functions of the CPLD extended CPU recorded in Table 1, the CPLD can realize the GPIO of the extended CPU and realize GPIO functions such as bandwidth allocation, configuration differentiation and mainboard signal control.

[0086] Optionally, in this embodiment, in order to better understand the process of executing the above read and write operations in the execution method of the read and write operations proposed in this application, the above process is described in conjunction with an optional embodiment below, but is not used to limit the technical solution of the embodiment of this application.

[0087] In an exemplary embodiment, an example of a server is provided. Figure 7 is a schematic diagram of a server according to an embodiment of the present application, such as Figure 7 As shown, the server is deployed with a CPU, a CPLD and a BMC, and the CPU and the BMC are connected via an eSPI bus (second bus). In the present application, the eSPI is connected to the CPLD, and the CPU is also connected to the CPLD via CS1 (first bus).

[0088] Through the above server, taking the target bus as the eSPI bus as an example, the CLK / CS1 / ALERT1 / IO[3:0] data signal of the eSPI bus is connected to the CPLD, which is used for the CPLD to parse the data on the eSPI bus. The Virtual Wire data parsing function of the eSPI bus is implemented inside the CPLD, which is used to implement the data parsing of the eSPI protocol. By expanding the GPIO of the CPU through the CPLD, the functions of motherboard bandwidth allocation, configuration differentiation and motherboard signal control are realized.

[0089] Optionally, in this embodiment, Figure 8 is a schematic diagram of an execution process of a read and write operation according to an embodiment of the present application, such as Figure 8 As shown, the CPU, CPLD and BMC can perform read and write operations in the following ways, but are not limited to:

[0090] CPLD monitors CLK and CS1 signals (chip select signal). When CLK is low and CS1 has a falling edge, the CPU starts to transmit data.

[0091] When CPLD detects that CPU starts to transmit data, it parses IO[3:0] data (command data) at the falling edge of CLK, where IO[3:0] data includes CMD (target command data), and CMD is 8-bit valid data.

[0092] When the CMD is parsed to include 0000_0100 (target operation information for indicating a write operation), it means that the current bus communication is in PUT_VWIRE mode, and the write operation can be performed through, but not limited to, the following process:

[0093] CPLD continues to monitor IO[3:0] data at the falling edge of CLK. At this time, CPU will send 8-bit count (data count). CPLD parses count to obtain the next valid data amount, that is, the number of index (second data index) + data (data value) (that is, the number of data groups). After CPLD completes the parsing, it performs CRC check. If the check passes, it means that the data transmission is valid. Otherwise, the data is discarded.

[0094] After CPLD parses and completes the write data, Figure 3 The RESPONSE shown is used for data feedback.

[0095] When the CMD is parsed to include 00000101 (target operation information for indicating a read operation), it means that the current bus communication is in GET_VWIRE mode, and a write operation can be performed through, but is not limited to, the following process:

[0096] CPLD continues to monitor IO[3:0] data (command data) at the falling edge of CLK, where IO[3:0] data includes CMD (target command data), which is 8-bit valid data. The first data index is extracted from CMD, and the corresponding read data is searched according to the first data index. At this time, the CPU will send 8-bit CRC data. After the CPLD completes the analysis, it will perform a CRC check. If the check passes, it means that the data transmission is valid. Otherwise, the data is discarded. After the CPLD completes the CRC check, it extracts the data to be returned from the register and returns it according to the following steps: Figure 4 The data format shown is used for feedback.

[0097] It should be noted that when data is updated in the CPLD, the alert signal needs to be triggered first to pass through the CPU. The CPU obtains the current data transmission event through the GET_STATUS instruction and then performs the GET_VWIRE data read operation.

[0098] Through the execution method of read and write operations proposed in this application, CPLD is used to parse eSPI protocol data, and CPU GPIO expansion functions such as bandwidth allocation, configuration differentiation and motherboard signal control are implemented through CPLD. Since the eSPI bus frequency is relatively high, the delay of GPIO data transmission can be effectively reduced. The motherboard CPLD is used to implement this function, which reduces the hardware design cost and effectively solves the problem that the number of CPU pins on the Birch Stream platform is limited but there are not enough GPIOs for communication.

[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0100] In this embodiment, a device for executing read and write operations is also provided, and the server includes: a central processing unit, a baseboard management controller and a complex programmable logic device. The central processing unit and the baseboard management controller are connected via a target bus, and the target bus is used to realize the interaction between the central processing unit and the baseboard management controller. The complex programmable logic device is connected to the target bus. The device is applied to the complex programmable logic device. The device is used to implement the above-mentioned embodiments and preferred implementation methods, and those that have been explained will not be repeated. As used below, the term "module" can realize a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0101] Fig. 9 is a structural block diagram of a device for executing read and write operations according to an embodiment of the present application, such as Fig. 9 As shown, the device comprises:

[0102] A detection module 92, used for detecting the read / write status of the central processor on the target bus, wherein the read / write status is used for indicating the target read / write device requested by the central processor to perform a read / write operation on the target bus;

[0103] A monitoring module 94, configured to monitor command data sent by the central processor on the target bus when it is detected that the read / write status indicates that the central processor requests to perform a read / write operation on the complex programmable logic device;

[0104] An extraction module 96, configured to extract the target read / write operation requested to be executed by the central processor from the target command data when monitoring that the central processor has sent the target command data on the target bus;

[0105] The execution module 98 is used to execute the target read and write operations in the target storage space of the complex programmable logic device.

[0106] Through the above device, the read and write status of the central processing unit on the target bus is detected, wherein the read and write status is used to indicate the target read and write device on the target bus that the central processing unit requests to perform read and write operations; in the case where it is detected that the read and write status indicates that the central processing unit requests to perform read and write operations on a complex programmable logic device, the command data sent by the central processing unit on the target bus is monitored; in the case where it is monitored that the central processing unit has sent target command data on the target bus, the target read and write operation requested to be performed by the central processing unit is extracted from the target command data; and the target read and write operation is performed in the target storage space of the complex programmable logic device. Since the complex programmable logic device originally existing on the server is connected on the target bus used to connect the central processing unit and the baseboard management controller, the input and output functions of the central processing unit are expanded through the complex programmable logic device. Therefore, the problem of low execution efficiency of read and write operations can be solved, and the effect of improving the execution efficiency of read and write operations can be achieved.

[0107] In an exemplary embodiment, the detection module comprises:

[0108] A first receiving unit, used for receiving a chip selection signal sent by the central processing unit through the first bus;

[0109] A first detection unit, used for detecting the level conversion of the chip selection signal;

[0110] The first determination unit is used to determine that the read / write state is detected to indicate that the central processing unit requests to perform the read / write operation on the complex programmable logic device when the chip select signal is detected to be converted from a high level to a low level, wherein the second bus is used to transmit data between the central processing unit and the complex programmable logic device.

[0111] In an exemplary embodiment, the monitoring module includes:

[0112] A second receiving unit, used for continuously receiving data sent by the central processor on the target bus;

[0113] A second detection unit, used to detect whether the received data carries a target identifier, wherein the target identifier is used to indicate a start time for the central processor to perform the read and write operations on the complex programmable logic device;

[0114] The second determination unit is used to determine the data carrying the target identifier as the target command data when it is detected that the received data carries the target identifier, and to determine that the central processor has sent the target command data on the target bus.

[0115] In an exemplary embodiment, the extraction module comprises:

[0116] an extraction unit, configured to extract target operation information from the target command data, wherein the target operation information is used to indicate the execution of a read operation or a write operation;

[0117] A third determining unit, configured to determine that the target read / write operation is the read operation when the extracted target operation information is used to indicate that the read operation is to be performed;

[0118] A fourth determining unit is configured to determine that the target read-write operation is the write operation when the extracted target operation information is used to indicate that the write operation is to be performed.

[0119] In an exemplary embodiment, the execution module includes:

[0120] A first execution unit is configured to extract a first data index from the target command data when the target read / write operation is a read operation, wherein the first data index is used to indicate a read type to which the content requested to be read by the central processing unit belongs, and the read type includes: a data type and a level state type, and the content belonging to the level state type is used to indicate a level state of a target pin of the complex programmable logic device, and the target read / write operation includes the read operation; extract read data belonging to the read type from the target storage space according to the first data index; and transmit the read data to the central processing unit through the target bus;

[0121] A second execution unit is used to continue receiving write data sent by the central processing unit on the target bus when the target read / write operation is a write operation, wherein the target read / write operation includes the write operation, and the write data includes a data count and a data group, the data count is used to indicate the number of data groups to be subjected to the write operation, the data group includes a second data index and a data value having a corresponding relationship, the second data index is used to indicate a target register in the target storage space to be written with the corresponding data value, the target register includes a data register and a pin status register; when receiving the data groups of the number indicated by the data count, detecting whether the data group is complete data by sending a first check code to the data group; when detecting that the data group is complete data, writing the corresponding data value into the corresponding target register according to the data index included in each data group.

[0122] In an exemplary embodiment, the first execution unit is further used to: extract an initial index from the target command data; detect whether the initial index falls within the target index value range; and determine that the first data index is extracted from the target command data when it is detected that the initial index falls within the target index value range.

[0123] In an exemplary embodiment, the first execution unit is further used to: detect a target register where the data belonging to the read type is located according to the first data index, wherein the target storage space includes the target register, and the target register includes a data register and a pin status register; search for data belonging to the read type in the target register; when data belonging to the read type is found, detect whether the data belonging to the read type is complete data by sending a second check code to the data belonging to the read type; when it is detected that the data belonging to the read type is complete data, use the data belonging to the read type as the read data, and extract the read data from the target storage space.

[0124] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0125] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0126] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0127] An embodiment of the present application further provides an electronic device, Fig.10 is a structural block diagram of an electronic device according to an embodiment of the present application, such as Fig.10 As shown, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the method embodiments described above.

[0128] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0129] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0130] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0131] The embodiments of the present application also provide a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0132] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0133] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0134] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for executing a read and write operation, characterized in that: The server includes: a central processing unit, a baseboard management controller, and a complex programmable logic device. The central processing unit and the baseboard management controller are connected via a target bus. The target bus is used to implement interaction between the central processing unit and the baseboard management controller. The complex programmable logic device is connected to the target bus. The method is applied to the complex programmable logic device, and the method includes: Detecting a read / write status of the central processing unit on the target bus, wherein the read / write status is used to indicate a target read / write device requested by the central processing unit to perform a read / write operation on the target bus; monitoring command data sent by the central processor on the target bus when detecting that the read / write status indicates that the central processor requests to perform a read / write operation on the complex programmable logic device; extracting the target read / write operation requested by the central processor from the target command data when monitoring that the central processor has sent target command data on the target bus; The target read and write operations are performed in a target storage space of the complex programmable logic device.

2. The method according to claim 1, characterized in that The target bus includes a first bus and a second bus, and detecting the read and write status of the central processing unit on the target bus includes: receiving a chip select signal sent by the central processing unit via the first bus; detecting a level conversion of the chip select signal; When it is detected that the chip select signal is converted from a high level to a low level, it is determined that the read / write state is detected to indicate that the central processing unit requests to perform the read / write operation on the complex programmable logic device, wherein the second bus is used to transmit data between the central processing unit and the complex programmable logic device.

3. The method according to claim 1, characterized in that The monitoring of command data sent by the central processing unit on the target bus includes: continuously receiving data sent by the central processing unit on the target bus; Detecting whether the received data carries a target identifier, wherein the target identifier is used to indicate a start time of the central processing unit performing the read and write operations on the complex programmable logic device; When it is detected that the received data carries the target identifier, the data carrying the target identifier is determined as the target command data, and it is determined that the central processor has monitored and sent the target command data on the target bus.

4. The method according to claim 1, wherein The step of extracting the target read / write operation requested to be executed by the central processing unit from the target command data includes: Extracting target operation information from the target command data, wherein the target operation information is used to indicate execution of a read operation or a write operation; In a case where the extracted target operation information is used to indicate execution of the read operation, determining that the target read / write operation is the read operation; In a case where the extracted target operation information is used to indicate execution of the write operation, the target read-write operation is determined to be the write operation.

5. The method according to claim 1, characterized in that The performing the target read and write operations in the target storage space of the complex programmable logic device includes: In a case where the target read / write operation is a read operation, extracting a first data index from the target command data, wherein the first data index is used to indicate a read type of content requested to be read by the central processing unit, the read type including: a data type and a level state type, content belonging to the level state type is used to indicate a level state of a target pin of the complex programmable logic device, and the target read / write operation includes the read operation; extracting read data belonging to the read type from the target storage space according to the first data index; and transmitting the read data to the central processing unit via the target bus; In the case where the target read / write operation is a write operation, continue to receive the write data sent by the central processing unit on the target bus, wherein the target read / write operation includes the write operation, and the write data includes a data count and a data group, the data count is used to indicate the number of data groups to perform the write operation, the data group includes a second data index and a data value with a corresponding relationship, the second data index is used to indicate the target register to be written to the corresponding data value in the target storage space, and the target register includes a data register and a pin status register; in the case of receiving the data group of the number indicated by the data count, detect whether the data group is complete data by sending a first check code to the data group; in the case of detecting that the data group is complete data, write the corresponding data value into the corresponding target register according to the data index included in each data group.

6. The method according to claim 5, characterized in that The extracting the first data index from the target command data includes: extracting an initial index from the target command data; Detecting whether the initial index falls within a target index value range; When it is detected that the initial index falls within the target index value range, it is determined that the first data index is extracted from the target command data.

7. The method according to claim 5, characterized in that The extracting the read data belonging to the read type from the target storage space according to the first data index includes: Detecting a target register where the data of the read type is located according to the first data index, wherein the target storage space includes the target register, and the target register includes a data register and a pin status register; searching the target register for data of the read type; In the case that data belonging to the read type is found, detecting whether the data belonging to the read type is complete data by sending a second check code to the data belonging to the read type; In a case where it is detected that the data belonging to the read type is complete data, the data belonging to the read type is used as the read data, and the read data is extracted from the target storage space.

8. A device for executing read and write operations, characterized in that: The server includes: a central processing unit, a baseboard management controller, and a complex programmable logic device. The central processing unit and the baseboard management controller are connected via a target bus. The target bus is used to implement interaction between the central processing unit and the baseboard management controller. The complex programmable logic device is connected to the target bus. The device is applied to the complex programmable logic device and includes: a detection module, configured to detect a read / write status of the central processing unit on the target bus, wherein the read / write status is used to indicate a target read / write device requested by the central processing unit to perform a read / write operation on the target bus; a monitoring module configured to monitor command data sent by the central processing unit on the target bus when detecting that the read / write status indicates that the central processing unit requests to perform a read / write operation on the complex programmable logic device; an extraction module, configured to extract the target read / write operation requested by the central processing unit from the target command data when monitoring that the central processing unit has sent target command data on the target bus; An execution module is used to execute the target read and write operations in the target storage space of the complex programmable logic device.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.