Data transmission method, device, equipment and medium
By implementing bus arbitration and data channel management of SGPIO controllers in a multiprocessor system, the problem of chip resource waste in traditional designs is solved, and the use efficiency and resource utilization of SGPIO controllers are improved.
Patent Information
- Application Number
- CN202411161470.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-03
AI Technical Summary
In multiprocessor systems, traditional SGPIO controller design leads to wasting chip resources, and each processor requires 4 chip pins, resulting in excessive resource usage.
By implementing bus arbitration between the master and multiple processors and slaves, configuring clock signals and hardware devices, the priority module determines access priority, and manages data channels through multiplexers to implement an SGPIO controller Supports data transmission of multiple processors.
It saves the logic resources of the SGPIO controller, improves usage efficiency, reduces the use of chip pins, and realizes data interaction between multiple processors.
Smart Images

Figure CN119065996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data transmission method, device, equipment and medium. Background Art
[0002] As a common data transmission method, Serial General Purpose Input / Output (SGPIO) is flexible and versatile and is widely used in chips, especially in hard disk status detection and control. However, with the development of chip technology, multi-processor systems are becoming more and more common, and each processor may need to use SGPIO.
[0003] In the traditional solution, each processor needs to correspond to an SGPIO controller to realize the control of the SGPIO interface and data transmission. However, since the hard disk status does not change frequently, SGPIO is idle most of the time, which leads to a large waste of the logic resources of the SGPIO controller, increasing the chip area and tape-out cost. In addition, each SGPIO interface usually consists of 4 chip pins, including a clock signal (Sclock) pin, a data load signal (Sload) pin, a data output signal (Sdataout) pin, and a data input signal (Sdatain) pin. If each processor corresponds to an SGPIO controller, then N processors will require 4N chip pins, which will occupy too many chip resources and lead to a waste of chip pins.
[0004] In view of the above problems, how to solve the unreasonable use of SGPIO in the current multi-processor system and the waste of chip resources is an urgent problem to be solved by technicians in this field. Summary of the invention
[0005] The purpose of the present invention is to provide a data transmission method, device, equipment and medium to solve the problem of unreasonable SGPIO usage and waste of chip resources in the current multi-processor system.
[0006] To solve the above technical problems, the present invention provides a data transmission method, which is applied to a master device of a serial universal input / output interface controller; the master device is communicatively connected to a plurality of processors via a bus, and is communicatively connected to a slave device of the serial universal input / output interface controller via a serial universal input / output interface; the slave device is communicatively connected to a plurality of hardware devices; the method comprises:
[0007] Receiving access requests to the hardware device sent by each of the processors; wherein the access request includes configuration information for a serial universal input / output interface and data for accessing the hardware device;
[0008] Performing bus arbitration on each of the access requests so as to determine a target access request for accessing a target hardware device among the access requests;
[0009] The target access request is sent to the slave device through a serial universal input / output interface, so that the slave device determines the target hardware device according to the target access request and sends the target access request to the target hardware device.
[0010] On the one hand, performing bus arbitration on each of the access requests includes:
[0011] Based on the access request, configuring the clock frequency of the clock signal pin and the number of the hardware devices to be accessed through a configuration module;
[0012] Determine the access priority of each processor through a priority module, so as to determine the target processor with the highest priority among the processors, and select the target access request of the target processor to wait for sending;
[0013] The access request sent by the unselected processor is masked by a mask module.
[0014] On the other hand, before configuring the clock frequency of the clock signal pin and the number of the hardware devices to be accessed by the configuration module based on the access request, the method further includes:
[0015] Set a corresponding first-in-first-out queue for each processor respectively;
[0016] The clock frequency of the corresponding bus is synchronized with the system clock operating frequency of the serial universal input and output interface controller through the first-in first-out queue corresponding to each processor.
[0017] On the other hand, sending the target access request to the slave device via a serial universal input / output interface includes:
[0018] The configuration information of the serial universal input / output interface in the target access request is stored in a first configuration information module; wherein the configuration information includes the clock frequency of the clock signal pin, the number of the hardware devices to be accessed, and the data size configuration information;
[0019] Encoding the target access request by a first encoding module;
[0020] Based on the configuration information, the encoded target access request is sent to the slave device through a clock signal pin, a data loading signal pin and a data output signal pin by a first driver submodule.
[0021] On the other hand, it also includes:
[0022] Monitoring the state of the serial universal input and output interface controller;
[0023] When the device status changes, an interrupt is generated through the interrupt module.
[0024] On the other hand, the slave device determines the target hardware device according to the target access request, and sends the target access request to the target hardware device, including:
[0025] Receiving the target access request through the second configuration information module of the slave device;
[0026] Based on the target access request, configuring the number and data size configuration information of the hardware devices to be accessed through the second configuration information module of the slave device;
[0027] Decoding the target access request by a first decoding module of the slave device to obtain the decoded target access request;
[0028] Based on the decoded target access request, selecting the corresponding target hardware device through the second driver submodule of the slave device;
[0029] Based on the configuration information in the second configuration information module of the slave device, determining a data channel of the target hardware device through a multiplexer of the slave device;
[0030] Selecting the data channel of the target hardware device through the multiplexer of the slave device;
[0031] keeping the remaining data channels closed through the multiplexer of the slave device;
[0032] Based on the data channel of the target hardware device, sending the decoded target access request to the target hardware device;
[0033] Starting a data monitoring process of the slave device;
[0034] The feedback data transmitted by the target hardware device is monitored through the data monitoring process of the slave device.
[0035] On the other hand, after sending the target access request to the target hardware device, the method further includes:
[0036] Receiving feedback data transmitted by the target hardware device through the slave device;
[0037] encoding the feedback data by a second encoding module of the slave device;
[0038] Receiving the feedback data sent by the slave device through a data input signal pin;
[0039] Decoding the feedback data by a second decoding module to obtain the decoded feedback data;
[0040] Determine the corresponding target processor according to the decoded feedback data;
[0041] The decoded feedback data is transmitted to the corresponding target processor.
[0042] In order to solve the above technical problems, the present invention also provides a data transmission device, which is applied to a master device of a serial universal input / output interface controller; the master device is communicatively connected with a plurality of processors via a bus, and is communicatively connected with a slave device of the serial universal input / output interface controller via a serial universal input / output interface; the slave device is communicatively connected with a plurality of hardware devices; the device comprises:
[0043] A receiving module, used for receiving an access request to the hardware device sent by each processor; wherein the access request includes configuration information of the serial universal input and output interface and data for accessing the hardware device;
[0044] An arbitration module, used for performing bus arbitration on each of the access requests, so as to determine a target access request for accessing a target hardware device among the access requests;
[0045] The sending module is used to send the target access request to the slave device through the serial universal input and output interface, so that the slave device determines the target hardware device according to the target access request and sends the target access request to the target hardware device.
[0046] In order to solve the above technical problems, the present invention further provides a data transmission device, comprising:
[0047] Memory for storing computer programs;
[0048] A processor is used to implement the steps of the above-mentioned data transmission method when executing the computer program.
[0049] In order to solve the above technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above data transmission method are implemented.
[0050] The data transmission method provided by the present invention is applied to a master device of a serial universal input / output interface controller; the master device is connected to multiple processors through a bus, and is connected to a slave device of the serial universal input / output interface controller through a serial universal input / output interface; the slave device is connected to multiple hardware devices; the method specifically receives an access request to a hardware device sent by each processor; wherein the access request contains configuration information for the serial universal input / output interface and data for accessing the hardware device; bus arbitration is performed on each access request so as to determine a target access request for accessing a target hardware device in each access request; the target access request is sent to the slave device through the serial universal input / output interface so as to determine the target hardware device according to the target access request, and the target access request is sent to the target hardware device. The beneficial effects of the present invention are that a master device of an SGPIO controller is connected to multiple processors through a bus, a slave device of the SGPIO controller is connected to multiple hardware devices through a bus, and the master device and the slave device are connected through the SGPIO communication; when multiple processors are used, the master device receives access requests to hardware devices sent by each processor, and after bus arbitration, the access requests are sent to the corresponding hardware devices through the slave device, so that one SGPIO controller can meet the use requirements of multiple processors, and data interaction can be realized completely and without conflict, thereby saving the logic resources of the SGPIO controller and improving the use efficiency of the SGPIO controller; at the same time, the SGPIO controller only needs 4 external chip pins, which greatly saves chip resources.
[0051] In addition, the present invention also provides a data transmission device, equipment and medium, which have the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A design architecture diagram of the SGPIO controller provided in an embodiment of the present invention;
[0054] Figure 2 A flowchart of a data transmission method provided by an embodiment of the present invention;
[0055] Figure 3 A schematic diagram of a data transmission device provided by an embodiment of the present invention;
[0056] Figure 4 A schematic diagram of a data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The core of the present invention is to provide a data transmission method, device, equipment and medium to solve the problem of unreasonable SGPIO usage and waste of chip resources in the current multi-processor system.
[0059] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0060] In the traditional solution, each processor needs to correspond to an SGPIO controller to realize the control of the SGPIO interface and data transmission. However, since the hard disk status does not change frequently, the SGPIO is in an idle state most of the time, which results in a large amount of waste of the logic resources of the SGPIO controller, increasing the chip area and tape-out cost. In addition, each SGPIO interface is usually composed of 4 chip pins, including Sclock, Sload, Sdataout and Sdatain pins. If each processor corresponds to an SGPIO controller, then N processors will require 4N chip pins, which will take up too many chip resources and cause waste of chip pins. In order to solve the above problems, the present invention provides a data transmission method. It should be noted that the method provided by the present invention is applied to the master device of the serial general input and output interface controller.
[0061] Figure 1 The design architecture diagram of the SGPIO controller provided by the embodiment of the present invention. Figure 1 As shown, the master device (Initiator) of the SGPIO controller is connected to multiple processors through a bus, and is connected to the slave device (Target) of the SGPIO controller through SGPIO (Sclock, Sload, Sdataout, and Sdatain); the slave device is connected to multiple hardware devices. It can be understood that in a specific implementation, the master device can be instantiated in the baseboard management controller chip, that is, the side that monitors the hard disk device; the slave device can be instantiated on the opposite side, for example, it can be instantiated in the complex programmable logic device of the hard disk backplane.
[0062] Figure 2 A flowchart of a data transmission method provided by an embodiment of the present invention. Figure 2 As shown, the method includes:
[0063] S10: Receive access requests to hardware devices sent by each processor.
[0064] The access request includes configuration information of the serial universal input and output interface and data for accessing the hardware device.
[0065] In a specific implementation, the master device of the SGPIO controller can receive access requests from multiple processors. It should be noted that the access request is an access request to a hardware device connected to the slave device of the SGPIO controller; it includes configuration information for the SGPIO and data for accessing the hardware device. In this embodiment, there is no restriction on the specific configuration information and specific data, which depends on the specific implementation situation.
[0066] S11: bus arbitration is performed on each access request, so as to determine a target access request for accessing a target hardware device among each access request.
[0067] Furthermore, since there may be multiple processors requesting access to the hardware device, but the SGPIO controller can only process and transmit one of the requests at the same time, it is necessary to perform bus arbitration on each access request, so as to determine the target access request of one of the processors to the target hardware device in each access request. In this embodiment, the specific process of bus arbitration is not limited and depends on the specific implementation situation.
[0068] S12: Sending the target access request to the slave device through the serial universal input and output interface, so that the slave device determines the target hardware device according to the target access request and sends the target access request to the target hardware device.
[0069] Finally, the determined target access request is sent to the slave device via SGPIO, so that the slave device determines the target hardware device to be accessed according to the target access request, and sends the request to the target hardware device, so that the target hardware device responds to the request. In this embodiment, there is no restriction on the process of determining the target hardware device and sending the request by the slave device.
[0070] In this embodiment, the master device of the SGPIO controller is connected to multiple processors through a bus, the slave device of the SGPIO controller is connected to multiple hardware devices through a bus, and the master device and the slave device are connected through the SGPIO communication; when multiple processors are used, the master device receives access requests to the hardware devices sent by each processor, and sends the access requests to the corresponding hardware devices through the slave device after bus arbitration, so that one SGPIO controller can meet the use requirements of multiple processors, and data interaction can be realized completely and without conflict, saving the logic resources of the SGPIO controller and improving the use efficiency of the SGPIO controller; at the same time, the SGPIO controller only needs 4 external chip pins, which greatly saves chip resources.
[0071] Based on the above embodiments, in some embodiments, bus arbitration is performed on each access request, including:
[0072] S111: Based on the access request, configure the clock frequency of the clock signal pin and the number of hardware devices to be accessed through the configuration module;
[0073] S112: Determine the access priority of each processor through the priority module, so as to determine the target processor with the highest priority among the processors, and select the target access request of the target processor to wait for sending;
[0074] S113: Masking access requests sent by unselected processors through a mask module.
[0075] In order to realize bus arbitration, it is specifically implemented based on the arbiter in the master device. The arbiter in the master device contains three sub-modules, namely the configuration module, the priority module and the mask module.
[0076] In the specific implementation, firstly, based on the access request, the clock frequency of the clock signal pin SClock and the number of hardware devices to be accessed are configured through the configuration module. The access priority of each processor is determined by the priority module, so as to determine the target processor with the highest priority among the processors, and select the target access request of the target processor to wait for sending. It can be understood that after the target processor is used, the SGPIO bus will be released and then used by the processor with lower priority. The access request sent by the unselected processor is shielded by the mask module, that is, if the current processor is not selected for use, the mask module will shield its information to avoid affecting the currently working processor.
[0077] It should be noted that the arbiter selects a group of processors to use SGPIO based on priority, and only allows data from one group of processors to flow to the next module.
[0078] In order to ensure the consistency of the clock frequency, based on the above embodiments, in some embodiments, before configuring the clock frequency of the clock signal pin and the number of hardware devices to be accessed by the configuration module based on the access request, it also includes:
[0079] S114: setting a corresponding first-in first-out queue for each processor;
[0080] S115: Synchronizing the clock frequency of the corresponding bus with the system clock operating frequency of the serial universal input and output interface controller through the first-in first-out queue corresponding to each processor.
[0081] In the specific implementation, a First In, First Out (FIFO) queue is designed and connected to the bus interface of each processor for cross-clock domain processing. Since the bus interface frequencies of different processors may be inconsistent, by adding a FIFO, the clock frequency of each bus can be synchronized to the system clock operating frequency of the SGPIO controller, ensuring the consistency of the clock frequency.
[0082] Based on the above embodiments, in some embodiments, sending a target access request to a slave device via a serial universal input / output interface includes:
[0083] S121: storing the configuration information of the serial general purpose input and output interface in the target access request into the first configuration information module;
[0084] The configuration information includes the clock frequency of the clock signal pin, the number of hardware devices to be accessed, and data size configuration information.
[0085] S122: Encode the target access request by a first encoding module;
[0086] S123: Based on the configuration information, the encoded target access request is sent to the slave device through the clock signal pin, the data loading signal pin and the data output signal pin by the first driver submodule.
[0087] In order to send the target access request to the slave device through SGPIO, a control module is specifically set in the master device; the control module includes a first configuration information module, a first encoding module and a first driver submodule.
[0088] Specifically, first, the configuration information of SGPIO in the target access request is stored in the first configuration information module, including the SClock clock frequency passed from the Arbiter, the number of hardware devices to be accessed, and the data size configuration information. The target access request is further encoded by the first encoding module; it can be understood that since there are multiple hardware devices on the SGPIO opposite end, the devices controlled by each processor may also be different, so it is necessary to encode the sent data and encode the SDataOut to indicate which device to send. Finally, based on the configuration information, the encoded target access request is sent to the slave device through the clock signal pin SClock, the data loading signal pin Sload, and the data output signal pin SDataOut through the first driver submodule, and it needs to be sent according to the timing specified by the SGPIO protocol. In this way, the sending of the target access request to the slave device is realized.
[0089] In addition, based on the above embodiments, in some embodiments, the method further includes:
[0090] S124: monitoring the status of the serial general purpose input and output interface controller;
[0091] S125: When the device status changes, an interrupt is generated through the interrupt module.
[0092] Specifically, an interrupt module may be provided in the main device control module to generate an interrupt according to the configuration. When the device status changes, an interrupt may be raised to indicate the change.
[0093] Based on the above embodiments, in some embodiments, the slave device determines the target hardware device according to the target access request, and sends the target access request to the target hardware device, including:
[0094] S131: receiving a target access request from a second configuration information module of the device;
[0095] S132: Based on the target access request, configure the number of hardware devices to be accessed and data size configuration information through the second configuration information module of the slave device;
[0096] S133: Decoding the target access request by a first decoding module of the slave device to obtain a decoded target access request;
[0097] S134: Based on the decoded target access request, select a corresponding target hardware device through a second driver submodule of the slave device;
[0098] S135: Based on the configuration information in the second configuration information module of the slave device, determine the data channel of the target hardware device through the multiplexer of the slave device;
[0099] S136: Selecting the data channel of the target hardware device through the multiplexer of the slave device;
[0100] S137: Keep the remaining data channels closed through the multiplexer of the slave device;
[0101] S138: sending the decoded target access request to the target hardware device based on the data channel of the target hardware device;
[0102] S139: Start the data monitoring process from the device;
[0103] S140: Monitoring feedback data transmitted by the target hardware device through the data monitoring process of the slave device.
[0104] In a specific implementation, a control module is also provided in the slave device, which specifically includes a second configuration information module, a first decoding module, and a second driver submodule. In order to send a target access request to a target hardware device, the target access request is received specifically through the second configuration information module of the slave device; based on the target access request, the number of hardware devices to be accessed and the data size end configuration information are configured through the second configuration information module of the slave device.
[0105] The target access request is further decoded by the first decoding module of the slave device to obtain a decoded target access request, that is, SClock, SLoad, and SDataOut; based on the decoded target access request, the corresponding target hardware device is selected by the second driver submodule of the slave device.
[0106] At the same time, a multiplexer is also provided in the slave device for data selection; based on the configuration information in the second configuration information module of the slave device, the multiplexer determines the data channel of the target hardware device and selects the data channel of the target hardware device; at the same time, the multiplexer keeps the remaining data channels closed to prevent their data from interfering with the working device.
[0107] Finally, based on the data channel of the target hardware device, the decoded target access request is sent to the target hardware device, thereby realizing the sending of the target access request to the target hardware device.
[0108] In addition, the slave device can also start a data monitoring process; the slave device's data monitoring process monitors the feedback data transmitted by the target hardware device, and after receiving the feedback data, it transmits it back to the corresponding processor through the master device. The following is a detailed description:
[0109] In a specific implementation, after sending the target access request to the target hardware device, the method further includes:
[0110] S141: receiving feedback data transmitted by the target hardware device through the slave device;
[0111] S142: Encode the feedback data by a second encoding module of the slave device;
[0112] S143: receiving feedback data sent from the device through the data input signal pin;
[0113] S144: decoding the feedback data by a second decoding module to obtain decoded feedback data;
[0114] S145: Determine the corresponding target processor according to the decoded feedback data;
[0115] S146: Transmit the decoded feedback data to the corresponding target processor.
[0116] Specifically, the slave device is further provided with a second encoding module, and can specifically receive the feedback data transmitted by the target hardware device through the slave device, and encode the feedback data through the second encoding module of the slave device.
[0117] Furthermore, a second decoding module is also provided in the master device. The master device receives feedback data sent by the slave device through the data input signal pin SDataIN, and decodes the feedback data through the second decoding module to obtain decoded feedback data. Finally, the corresponding target processor is determined according to the decoded feedback data, and the decoded feedback data is transmitted to the corresponding target processor. In this way, complete data interaction between the processor and the hardware device is realized.
[0118] In addition, when the processor receives data fed back by the hardware device through SGPIO, it performs a series of operations to process the data and indicate the device status. First, the processor parses the feedback data to determine the status of the hardware device. For example, if the data indicates that the device is active, it means that the device is performing operations such as reading and writing data. If the data indicates that the device is in a fault state, it means that the device has encountered a problem, such as a hardware failure or a lost connection.
[0119] Next, the processor uses the device status information to control an LED indicator or other user interface element to display the status of the device to the system administrator or user. For example, if the device is active, the processor can light a green LED indicator; if the device is in a fault state, the processor can light a red LED indicator.
[0120] In addition to indicating device status, the processor can also log status information to a log file or other monitoring system for troubleshooting, performance analysis, or compliance purposes. In addition, if the device status changes, the processor can send notifications to other system components, such as sending an alert to a monitoring system to alert an administrator to a problem.
[0121] Through these steps, the processor can effectively process SGPIO data and indicate the status of the hardware device, thereby helping the system administrator to monitor and maintain the hardware device.
[0122] In order to make those skilled in the art better understand the present solution, the SGPIO controller of the present invention is described below by way of example. Assume that there are three groups of processors in the baseboard management controller chip, namely, the main processor (processor 0), the coprocessor (processor 1), and the host-side processor (processor 2), all of which need to detect the hard disk on the backplane. Processor 0 needs to detect SATA0, SATA1, SATA2, and SATA3 on the hard disk backplane, processor 1 needs to detect SATA0 and SATA1, and processor 2 only needs to detect SATA3.
[0123] (1) Configure the bus priority, processor 0> processor 1> processor 2; the SGPIO controller system working clock is 50M, the processor 0 SGPIO interface SClock clock frequency is 25M, the processor 1 SGPIO interface SClock clock frequency is 5M, and the processor 2 SGPIO interface SClock clock frequency is 1M.
[0124] (2) When processor 0, processor 1, and processor 2 want to use the SGPIO interface at the same time, the processor 0 data channel is selected according to the priority configuration, and processor 0 obtains the SGPIO usage permission. The configuration information of processor 0 (clock division, big-endian configuration, number of devices 4) will be configured to the configuration module, and the mask module will mask the configuration information of processor 1 and processor 2. The data that processor 0 needs to send will also be written into the register and wait for sending.
[0125] (3) Processor 0 needs to monitor four devices. The four devices are encoded as 000, 001, 010, and 011 respectively. According to the SGPIO protocol, each 3 bits form a group, so the encoding length must be a multiple of 3.
[0126] (4) The first driver submodule sends 25M SClock according to the configuration information, sends SLoad according to the SGPIO protocol, and sends SDataOut according to the data and encoding information. Assuming that the data sent to SATA0 is 010, the data sent to SATA1 is 011, the data sent to SATA2 is 110, and the data sent to SATA3 is 111, the serial data sent by SDataOut is 000 010 001 011 010 110 011 111, that is, it is sent in the format of encoding + data.
[0127] (5) Target receives SDataOut according to the SGPIO protocol, decodes SDataOut, decodes 000, and sends 010 data to SATA0; decodes 001, and sends 011 to SATA1; decodes 010, and sends 110 to 110SATA2; decodes 011, and sends 111 to SATA3;
[0128] (6) After receiving the data, SATA1-3 responds to the data and returns the response to the processor. Assume that the corresponding data of SATA0 is 110, the corresponding data of SATA1 is 111, the corresponding data of SATA2 is 010, and the corresponding data of SATA3 is 001;
[0129] (7) Target encodes the processors. Processor 0 is 000, processor 1 is 010, and processor 2 is 011. The data of SATA1-3 needs to be returned to processor 0. Therefore, the multiplexer opens all the data channels of SATA1-3. The control module of Target encodes them. The data sent by SDataIn is 000 110 000 111 000 010 000 001, and the encoding + data method is also used.
[0130] (8) Initiator receives SDataIn and decodes it, and sends all decoded 000 to processor 0. That is, the four states 110111 101 001 are all received by processor 0. After processor 0 receives the data, if no further operation is required, it will pull SClock, SLoad, and SDataOut high according to the SGPIO protocol, indicating that the transmission is complete.
[0131] (9) Each processor can use SGPIO again. When processor 1 and processor 2 use SGPIO, the process is the same as above, but because the hard disks to be detected are different and the processors returned are different, only the code values sent are different, and the data channels selected are different.
[0132] In the above embodiments, the data transmission method is described in detail. The present invention also provides a corresponding embodiment of the data transmission device.
[0133] Figure 3 A schematic diagram of a data transmission device provided by an embodiment of the present invention. The device is applied to a master device of a serial universal input / output interface controller; the master device is connected to multiple processors through a bus, and is connected to a slave device of the serial universal input / output interface controller through a serial universal input / output interface; the slave device is connected to multiple hardware devices; Figure 3 As shown, the device comprises:
[0134] The receiving module 10 is used to receive the access request to the hardware device sent by each processor; wherein the access request includes the configuration information of the serial universal input and output interface and the data for accessing the hardware device;
[0135] The arbitration module 11 is used to perform bus arbitration on each access request so as to determine a target access request for accessing a target hardware device among each access request;
[0136] The sending module 12 is used to send the target access request to the slave device through the serial universal input and output interface, so that the slave device determines the target hardware device according to the target access request and sends the target access request to the target hardware device.
[0137] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0138] In addition, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the above data transmission method when executed by a processor.
[0139] Figure 4 A schematic diagram of a data transmission device provided by an embodiment of the present invention. Figure 4 As shown, the data transmission equipment includes:
[0140] A memory 20, used for storing computer programs;
[0141] The processor 21 is used to implement the steps of the data transmission method mentioned in the above embodiment when executing a computer program.
[0142] The data transmission device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0143] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0144] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the data transmission method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. Data 203 may include but is not limited to data involved in the data transmission method.
[0145] In some embodiments, the data transmission device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0146] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the data transmission device, and may include more or fewer components than shown in the figure.
[0147] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.
[0148] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.
[0149] The above is a detailed introduction to a data transmission method, device, equipment and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.
[0150] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A data transmission method, It is characterized in that A master device applied to a serial universal input / output interface controller; the master device is communicatively connected to a plurality of processors via a bus, and is communicatively connected to a slave device of the serial universal input / output interface controller via a serial universal input / output interface; the slave device is communicatively connected to a plurality of hardware devices; the method comprises: Receiving access requests to the hardware device sent by each of the processors; wherein the access request includes configuration information for a serial universal input / output interface and data for accessing the hardware device; Performing bus arbitration on each of the access requests so as to determine a target access request for accessing a target hardware device among the access requests; The target access request is sent to the slave device through a serial universal input / output interface, so that the slave device determines the target hardware device according to the target access request and sends the target access request to the target hardware device.
2. The data transmission method according to claim 1, It is characterized in that The performing bus arbitration on each of the access requests comprises: Based on the access request, configuring the clock frequency of the clock signal pin and the number of the hardware devices to be accessed through a configuration module; Determine the access priority of each processor through a priority module, so as to determine the target processor with the highest priority among the processors, and select the target access request of the target processor to wait for sending; The access request sent by the unselected processor is masked by a mask module.
3. The data transmission method according to claim 2, It is characterized in that Before configuring the clock frequency of the clock signal pin and the number of the hardware devices to be accessed by the configuration module based on the access request, the method further includes: Set a corresponding first-in-first-out queue for each processor respectively; The clock frequency of the corresponding bus is synchronized with the system clock operating frequency of the serial universal input and output interface controller through the first-in first-out queue corresponding to each processor.
4. The data transmission method according to claim 2, It is characterized in that The step of sending the target access request to the slave device via a serial universal input / output interface comprises: The configuration information of the serial universal input / output interface in the target access request is stored in a first configuration information module; wherein the configuration information includes the clock frequency of the clock signal pin, the number of the hardware devices to be accessed, and the data size configuration information; Encoding the target access request by a first encoding module; Based on the configuration information, the encoded target access request is sent to the slave device through a clock signal pin, a data loading signal pin and a data output signal pin by a first driver submodule.
5. The data transmission method according to claim 4, It is characterized in that Also includes: Monitoring the state of the serial universal input and output interface controller; When the device status changes, an interrupt is generated through the interrupt module.
6. The data transmission method according to claim 1, It is characterized in that The slave device determines the target hardware device according to the target access request, and sends the target access request to the target hardware device, including: Receiving the target access request through the second configuration information module of the slave device; Based on the target access request, configuring the number and data size configuration information of the hardware devices to be accessed through the second configuration information module of the slave device; Decoding the target access request by a first decoding module of the slave device to obtain the decoded target access request; Based on the decoded target access request, selecting the corresponding target hardware device through the second driver submodule of the slave device; Based on the configuration information in the second configuration information module of the slave device, determining a data channel of the target hardware device through a multiplexer of the slave device; Selecting the data channel of the target hardware device through the multiplexer of the slave device; keeping the remaining data channels closed through the multiplexer of the slave device; Based on the data channel of the target hardware device, sending the decoded target access request to the target hardware device; Starting a data monitoring process of the slave device; The feedback data transmitted by the target hardware device is monitored through the data monitoring process of the slave device.
7. The data transmission method according to any one of claims 1 to 6, It is characterized in that After sending the target access request to the target hardware device, the method further includes: Receiving feedback data transmitted by the target hardware device through the slave device; encoding the feedback data by a second encoding module of the slave device; Receiving the feedback data sent by the slave device through a data input signal pin; Decoding the feedback data by a second decoding module to obtain the decoded feedback data; Determine the corresponding target processor according to the decoded feedback data; The decoded feedback data is transmitted to the corresponding target processor.
8. A data transmission device, It is characterized in that A master device applied to a serial universal input / output interface controller; the master device is communicatively connected to a plurality of processors via a bus, and is communicatively connected to a slave device of the serial universal input / output interface controller via a serial universal input / output interface; the slave device is communicatively connected to a plurality of hardware devices; the device comprises: A receiving module, used for receiving an access request to the hardware device sent by each processor; wherein the access request includes configuration information of the serial universal input and output interface and data for accessing the hardware device; An arbitration module, used for performing bus arbitration on each of the access requests, so as to determine a target access request for accessing a target hardware device among the access requests; The sending module is used to send the target access request to the slave device through the serial universal input and output interface, so that the slave device determines the target hardware device according to the target access request and sends the target access request to the target hardware device.
9. A data transmission device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the data transmission method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Control device and control method for multi-channel communication and electronic equipment
CN122507540A
