Data transmission method, device, processing chip and storage medium
By obtaining the remaining space information of the first-in-first-out memory, determining the cache location and transmission strategy, and using the arbitrator to control the distribution of data between different memories, the problem of blockage of data transmission paths between chips in the multi-chip computing power sharing system is solved, and the system stability and efficiency are improved.
Patent Information
- Application Number
- CN202311544169.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-11-17
AI Technical Summary
In a multi-chip computing power sharing system, data transmission paths between chips are prone to congestion and loop deadlock, resulting in reduced system stability.
By obtaining the remaining space information of the first-in-first-out memory, the cache location and transmission strategy of the data to be transmitted are determined, and the arbitrator is used to control the distribution of data between different types of memories to avoid data backlog.
It effectively prevents the blockage of the transmission path between chips, avoids loop deadlock, and improves the stability of the system and data transmission efficiency.
Smart Images

Figure CN117472835B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission technology, and in particular to a data transmission method, device, processing chip and storage medium. Background Art
[0002] With the rapid development of information technology, data has been integrated into various industries, the amount of data has grown explosively, and the computing power required for data processing has also exploded.
[0003] Currently, supercomputing platforms commonly use multi-chip computing power sharing to achieve greater computing power. When computing power is shared by at least three chips, inter-chip transmission paths exist between each chip. Because the speed of data consumption within a chip and the speed of data transmission between chips are not fixed, the amount of data transmitted between chips may be too large at certain times, causing each chip to wait for each other, resulting in congestion in the loop transmission path. Therefore, how to prevent congestion in the inter-chip transmission path has become a pressing issue. Summary of the Invention
[0004] The present invention provides a data transmission method, device, processing chip and storage medium, so as to cache the data to be transmitted when the amount of data transmitted between chips is too large, thereby preventing the transmission path between chips from being blocked.
[0005] According to one aspect of the present invention, a data transmission method is provided, wherein the method includes:
[0006] Obtaining remaining space information of a first-in-first-out memory, and determining a cache location of the data to be transmitted based on the remaining space information;
[0007] The control arbiter determines a transmission strategy for the data to be transmitted according to the remaining space information of the first-in-first-out memory;
[0008] The data to be transmitted in the cache location is transmitted to the target chip according to the transmission strategy.
[0009] According to another aspect of the present invention, a data transmission device is provided, wherein the device includes:
[0010] A location determination module is used to obtain the remaining space information of the first-in-first-out memory and determine the cache location of the data to be transmitted according to the remaining space information;
[0011] A strategy determination module, used to control the arbitrator to determine a transmission strategy for data to be transmitted according to the remaining space information of the first-in-first-out memory;
[0012] The data sending module is used to transmit the data to be transmitted in the cache location to the target chip according to the transmission strategy.
[0013] According to another aspect of the present invention, a processing chip is provided, wherein the processing chip includes:
[0014] at least one processing unit;
[0015] and a storage unit communicatively coupled to the at least one processing unit;
[0016] The storage unit stores a computer program that can be executed by at least one processing unit, and the computer program is executed by at least one processing unit so that the at least one processing unit can execute the data transmission method of any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processing unit to implement the data transmission method of any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention obtains the remaining space information of the first-in-first-out memory, determines the cache location of the data to be transmitted according to the remaining space information, controls the arbitrator to determine the transmission strategy of the data to be transmitted according to the remaining space information of the first-in-first-out memory, and transmits the data to be transmitted in the cache location to the target chip according to the transmission strategy. When the amount of data between chips is too large, the data to be transmitted is cached, the transmission path between chips is prevented from being blocked, the transmission loop between chips is avoided from being deadlocked, and the system stability is improved.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 This is a flowchart of a data transmission method provided according to the first embodiment of the present invention;
[0022] Figure 2 This is a flowchart of a data transmission method provided according to the second embodiment of the present invention;
[0023] Figure 3 is a schematic structural diagram of an inter-chip transmission path proposed in Embodiment 3 of the present invention;
[0024] Figure 4 This is a schematic structural diagram of a data transmission device provided according to a fourth embodiment of the present invention;
[0025] Figure 5 It is a structural diagram of a processing chip for implementing a data transmission method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Example 1
[0029] Figure 1 This is a flow chart of a data transmission method provided according to the first embodiment of the present invention. This embodiment is applicable to the case of inter-chip data transmission. The method can be executed by a data transmission device. The data transmission device can be implemented in the form of hardware and / or software. The data transmission device can be configured in a processing chip. Figure 1 As shown, the method includes:
[0030] S110 , obtaining remaining space information of a first-in-first-out memory, and determining a cache location of the data to be transmitted according to the remaining space information.
[0031] Among them, the first-in first-out memory (FIFO) is a first-in first-out data buffer that can sequentially write data to be transmitted and sequentially read data to be transmitted. The first-in first-out memory can cache continuous data streams to prevent the loss of data to be transmitted during chip processing. The data to be transmitted can be data that the processing chip needs to transmit. In one embodiment, the data to be transmitted can include but is not limited to clock signals. In the actual operation process, the data to be transmitted can be data that needs to be forwarded transmitted by an external chip; or it can be data that needs to be sent generated by the processing chip. The cache location can refer to the location where the processing chip stores the data to be processed after receiving the data to be processed. The cache location can include a first-in first-out memory, a double-rate synchronous dynamic random access memory, etc.
[0032] In one embodiment, the cache location includes at least one of the following: a first-in-first-out memory, and a double data rate synchronous dynamic random access memory.
[0033] Among them, Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM) can transmit data twice in one clock cycle.
[0034] In an embodiment of the invention, the processing chip can obtain the remaining space information of the first-in-first-out memory in real time, and determine the cache location of the information to be transmitted according to the remaining space information of the first-in-first-out memory. In the actual operation process, the first-in-first-out memory can actively report the remaining space information; or, the processing chip actively pulls the remaining space information of the first-in-first-out memory, which is not limited to this. The cache location may include a first-in-first-out memory and a double-rate synchronous dynamic random access memory. In one embodiment, a first threshold remaining space information can be set in advance. When the remaining space information is greater than the first threshold remaining space information, the cache location of the data to be transmitted is determined to be the first-in-first-out memory; when the remaining space information is less than or equal to the first threshold remaining space information, the cache location of the data to be transmitted is determined to be the double-rate synchronous dynamic random access memory.
[0035] S120 , the control arbiter determines a transmission strategy for the data to be transmitted according to the remaining space information of the FIFO memory.
[0036] The arbiter is a device that determines which module receives priority control when multiple modules compete for transmission control. In actual operation, the arbiter may include, but is not limited to, a 2-choose-1 arbiter and a round-robin arbiter. The transmission strategy is the strategy for transmitting data to be transmitted, and can be determined based on the remaining space in the first-in-first-out memory. In one embodiment, the transmission strategy may include transmitting data to be transmitted from the first-in-first-out memory and transmitting data to be transmitted from the double-bit-rate synchronous dynamic random access memory.
[0037] In an embodiment of the invention, the processing chip can control the arbitrator to obtain the remaining space information of the first-in-first-out memory, and the arbitrator can determine the transmission strategy for the data to be transmitted based on the remaining space information of the first-in-first-out memory. In the actual operation process, the second threshold remaining space information can be set in advance. When the remaining space information is greater than the second threshold remaining space information, the transmission strategy is determined to be the transmission of the data to be transmitted of the double-rate synchronous dynamic random access memory; when the remaining space information is less than or equal to the second threshold remaining space information, the transmission strategy is determined to be the transmission of the data to be transmitted of the first-in-first-out memory. In other words, when the remaining space information of the first-in-first-out memory is small, the arbitrator gives authority to the first-in-first-out memory, and when the remaining space information of the first-in-first-out memory is large, the arbitrator gives authority to the double-rate synchronous dynamic random access memory, so as to give priority to the transmission of the data to be transmitted of the first-in-first-out memory.
[0038] S130 , transmitting the data to be transmitted in the cache location to the target chip according to the transmission strategy.
[0039] The target chip may be a target sending chip for data to be transmitted, and the data transmission path between the target chip and the initial chip may be pre-set. The target chip may be determined according to the data transmission path of the processing chip.
[0040] In an embodiment of the invention, after determining a transmission strategy, a target chip can be determined, and the data to be transmitted in the cache location can be transmitted to the target chip according to the transmission strategy. In actual operation, when the transmission strategy is to transmit data to be transmitted in a first-in-first-out memory, the data to be transmitted in the first-in-first-out memory can be transmitted to the target chip according to the transmission strategy; when the transmission strategy is to transmit data to be transmitted in a double-bit rate synchronous dynamic random access memory, the data to be transmitted in the double-bit rate synchronous dynamic random access memory can be transmitted to the target chip according to the transmission strategy.
[0041] An embodiment of the present invention obtains the remaining space information of a first-in-first-out memory, determines the cache location of the data to be transmitted according to the remaining space information, controls the arbitrator to determine the transmission strategy of the data to be transmitted according to the remaining space information of the first-in-first-out memory, and transmits the data to be transmitted at the cache location to the target chip according to the transmission strategy, thereby realizing the determination of the cache location and transmission strategy of the data to be transmitted according to the remaining space information of the first-in-first-out memory. When the amount of data transmission between chips is too large, the data to be transmitted is cached to prevent the transmission path between chips from being blocked, thereby avoiding the deadlock of the transmission loop between chips.
[0042] In one embodiment, when the cache location of the data to be transmitted is a double data rate synchronous dynamic random access memory, the data transmission method further includes:
[0043] Determine the delay transmission time of the data to be transmitted in the double rate synchronous dynamic random access memory;
[0044] When the delayed transmission time is greater than the preset delay time, the delayed transmission time is determined to be timed out, and the number of timeouts is recorded;
[0045] When the number of times is greater than the preset number of times, the transmission strategy is adjusted to transmit the data to be transmitted in the double rate synchronous dynamic random access memory;
[0046] When the number is less than or equal to the preset number, the transmission strategy is adjusted to transmit the data to be transmitted in the first-in-first-out memory.
[0047] Among them, the delayed transmission time may refer to the increased transmission time caused by caching the data to be transmitted in the double rate synchronous dynamic random access memory. The delayed transmission time can be determined based on the time it takes for the data to be transmitted to exit the double rate synchronous dynamic random access memory minus the time it takes for the data to enter the double rate synchronous dynamic random access memory. The preset delay time may be the maximum value of the preset delayed transmission time. When the delayed transmission time exceeds the preset delay time, the delayed transmission time may be considered to be a timeout. The preset number of times may be the maximum number of timeouts set in advance. When the number is greater than the preset number, the transmission strategy may be adjusted. In one embodiment, the preset delay time and the preset number of times may be set according to user needs. Exemplarily, the preset delay time may include but is not limited to 2 15 clock cycles, 2 16 clock cycles, the preset number may include but is not limited to 2 15 times, 2 16 Second-rate.
[0048] In an embodiment of the invention, the time when data to be transmitted enters and leaves the double-speed synchronous dynamic random access memory (DDRSDRAM) can be determined, and the time when the data to be transmitted leaves the DDRSDRAM minus the time when the data enters the DDRSDRAM is used as the delayed transmission time. When the delayed transmission time exceeds a preset delay time, the delayed transmission time is determined to be a timeout. A counter can be used to count the number of timeouts. When the number exceeds the preset number, the transmission strategy is adjusted to transmit the data to be transmitted from the DDRSDRAM; when the number is less than or equal to the preset number, the transmission strategy is adjusted to transmit the data to be transmitted from the first-in-first-out memory.
[0049] An embodiment of the present invention determines the delayed transmission time of data to be transmitted in a double-speed synchronous dynamic random access memory. When the delayed transmission time is greater than a preset delay time, the delayed transmission time is determined to be a timeout, and the number of timeouts is recorded. When the number is greater than a preset number, the transmission strategy is adjusted to transmit the data to be transmitted in the double-speed synchronous dynamic random access memory; when the number is less than or equal to the preset number, the transmission strategy is adjusted to transmit the data to be transmitted in the first-in-first-out memory. This achieves the goal of transmitting the data to be synchronized in the double-speed synchronous dynamic random access memory when the delayed transmission time of the data to be transmitted in the double-speed synchronous dynamic random access memory is too high, reducing the additional transmission time of the data to be transmitted in the double-speed synchronous dynamic random access memory, and preventing the data to be transmitted from being cached in the processing chip for a long time.
[0050] In one embodiment, determining a transmission delay time of data to be transmitted in a double data rate synchronous dynamic random access memory includes:
[0051] Determine a first timestamp of buffering the data to be transmitted into the double rate synchronous dynamic random access memory;
[0052] determining a second timestamp of when the data to be transmitted is transmitted to the arbitrator;
[0053] The delayed transmission time is obtained by subtracting the first timestamp from the second timestamp.
[0054] The first timestamp may be used to identify the time when the data to be transmitted enters the double data rate synchronous dynamic random access memory; the second timestamp may be used to indicate the time when the data to be transmitted is transmitted to the arbitrator, that is, the time when it leaves the double data rate synchronous dynamic random access memory.
[0055] In an embodiment of the invention, when the data to be transmitted is cached in the DDR SDRAM, a timestamp may be recorded as a first timestamp. When the data to be transmitted is read again from the DDR SDRAM and sent to the arbitrator, the real time may be recorded as a second timestamp, and the delayed transmission time may be calculated by subtracting the first timestamp from the second timestamp.
[0056] Example 2
[0057] Figure 2 FIG. 1 is a flow chart of a data transmission method according to the second embodiment of the present invention. This embodiment further illustrates a data transmission method based on the above embodiment. Figure 2 As shown, the method includes:
[0058] S210: Receive remaining space information of a first-in-first-out memory, and extract first threshold remaining space information.
[0059] The first threshold remaining space information can be understood as a critical value for determining the size of the FIFO memory remaining space information, and can be set according to user needs. In one embodiment, when the remaining space information is greater than the first threshold remaining space information, the FIFO memory remaining space information can be considered to be large; when the remaining space information is less than or equal to the first threshold remaining space information, the FIFO memory remaining space information can be considered to be small.
[0060] In an embodiment of the invention, the FIFO memory can proactively report remaining space information. The processing chip receives the remaining space information reported by the FIFO memory and simultaneously retrieves pre-stored remaining space information corresponding to a first threshold. In actual operation, a reporting period for the FIFO processor can be pre-set, and the FIFO memory can report remaining space information according to the reporting period. In one embodiment, the reporting period can include, but is not limited to, one clock cycle, two clock cycles, and so on, and is not limited to this.
[0061] S220: When the remaining space information is greater than the first threshold remaining space information, determine that the cache location of the data to be transmitted is a first-in-first-out memory.
[0062] In an embodiment of the present invention, after obtaining the remaining space information, the relationship between the remaining space information and the first threshold remaining space information can be determined. When the remaining space information is greater than the first threshold remaining space information, it can be determined that the remaining space information of the first-in-first-out memory is larger, and the cache location of the data to be transmitted is determined to be the first-in-first-out memory.
[0063] S230: When the remaining space information is less than or equal to the first threshold remaining space information, determine that the cache location of the data to be transmitted is a double data rate synchronous dynamic random access memory.
[0064] In an embodiment of the invention, when the remaining space information is less than or equal to the first threshold remaining space information, it can be determined that the remaining space information of the FIFO memory is small, and the cache location of the data to be transmitted is determined to be the double data rate synchronous dynamic random access memory.
[0065] S240: Control the arbitrator to receive remaining space information of the first-in-first-out memory.
[0066] In an embodiment of the invention, the FIFO memory can proactively report remaining space information, and the processing chip can control the arbitrator to receive the remaining space information reported by the FIFO memory. In actual operation, the remaining space information of the FIFO memory received by the processing chip is the same as the remaining space information of the FIFO memory received by the arbitrator.
[0067] S250: When the remaining space information is greater than the second threshold remaining space information, determine the transmission strategy as transmitting the data to be transmitted in the double data rate synchronous dynamic random access memory.
[0068] The second threshold remaining space information can be understood as a critical value for updating the transmission strategy and can be set by the user as needed. In one embodiment, when the remaining space information is greater than the second threshold remaining space information, the FIFO memory remaining space information can be considered to be large; when the remaining space information is less than or equal to the first threshold remaining space information, the FIFO memory remaining space information can be considered to be small. The first threshold remaining space information and the second threshold remaining space information can be the same or different, and this is not limited to this.
[0069] In an embodiment of the present invention, after the control arbiter obtains the remaining space information, the arbiter may determine the relationship between the remaining space information and the second threshold remaining space information. If the remaining space information is greater than the second threshold remaining space information, it may be determined that the remaining space information of the FIFO memory is large, and the transmission strategy may be determined to be to transmit the data to be transmitted from the double data rate synchronous dynamic random access memory.
[0070] S260: When the remaining space information is less than or equal to the second threshold remaining space information, determine the transmission strategy as transmitting the data to be transmitted in the first-in-first-out memory.
[0071] In an embodiment of the invention, when the remaining space information is less than or equal to the second threshold remaining space information, it can be determined that the remaining space information of the FIFO memory is small, and the transmission strategy is determined to transmit the data to be transmitted in the FIFO memory.
[0072] S270: Determine a target chip that receives the data to be transmitted.
[0073] In an embodiment of the invention, the data transmission path of the processing chip can be extracted, and the chip corresponding to the transmission path can be determined as the target chip for receiving the data to be transmitted. In actual operation, the target chip can be a pre-set receiving chip.
[0074] S280: When the transmission strategy is to transmit the data to be transmitted in the first-in-first-out memory, the data to be transmitted cached in the first-in-first-out memory is sent to the target chip.
[0075] In an embodiment of the invention, after determining the transmission strategy and target chip, the data to be transmitted can be transmitted to the target chip according to the transmission strategy. If the transmission strategy is to transmit data to be transmitted from a first-in-first-out memory, the data to be transmitted cached in the first-in-first-out memory can be sent to the target chip according to the transmission strategy.
[0076] S290: When the transmission strategy is to transmit the data to be transmitted in the double data rate synchronous dynamic random access memory, the data to be transmitted cached in the double data rate synchronous dynamic random access memory is sent to the target chip.
[0077] In an embodiment of the invention, when the transmission strategy is to transmit data to be transmitted in the DDR SDRAM, the data to be transmitted cached in the DDR SDRAM can be sent to the target chip according to the transmission strategy.
[0078] In an embodiment of the present invention, by receiving the remaining space information of a first-in-first-out memory and extracting the first threshold remaining space information, when the remaining space information is greater than the first threshold remaining space information, it is determined that the cache location of the data to be transmitted is the first-in-first-out memory; when the remaining space information is less than or equal to the first threshold remaining space information, it is determined that the cache location of the data to be transmitted is the double rate synchronous dynamic random access memory, thereby realizing the determination of the cache location of the data to be transmitted according to the remaining space information of the first-in-first-out memory. By controlling the arbiter to receive the remaining space information of the first-in-first-out memory, when the remaining space information is greater than the second threshold remaining space information, the transmission strategy is determined to be the transmission of the data to be transmitted of the double-rate synchronous dynamic random access memory; when the remaining space information is less than or equal to the second threshold remaining space information, the transmission strategy is determined to be the transmission of the data to be transmitted of the first-in-first-out memory, and the target chip for receiving the data to be transmitted is determined; when the transmission strategy is the transmission of the data to be transmitted of the first-in-first-out memory, the data to be transmitted cached in the first-in-first-out memory is sent to the target chip; when the transmission strategy is the transmission of the data to be transmitted of the double-rate synchronous dynamic random access memory, the data to be transmitted cached in the double-rate synchronous dynamic random access memory is sent to the target chip, so as to determine the transmission strategy through the remaining space information of the first-in-first-out memory; when the remaining space information is small, the transmission strategy is updated to reduce the additional transmission time of the data to be transmitted in the double-rate synchronous dynamic random access memory, prevent the data to be transmitted from being cached in the processing chip for a long time, and avoid congestion in the transmission path between chips.
[0079] Example 3
[0080] Figure 3This is a schematic diagram of the structure of the inter-chip transmission path proposed in the third embodiment of the present invention. This embodiment is based on the above embodiment and takes the processing chip as an example consisting of a data distribution module, a first-in-first-out memory, a double-rate synchronous dynamic random access memory, and an arbiter. The data distribution module is used to receive the remaining space information of the first-in-first-out memory and determine the cache location of the data to be transmitted. The arbiter is a 2-to-1 arbiter as an example to further illustrate a data transmission method. Figure 3 As shown:
[0081] The processing chip preferentially uses a first-in-first-out memory (FIFO) to cache data to be transmitted that is to be sent to other chips. The data to be transmitted can be generated inside the processing chip, or it can be data from an external chip that needs to be forwarded to the target chip. The data distribution module can detect the remaining space information in the FIFO in real time. When the remaining space information is small, the data sent to the target chip can be temporarily stored in a double-bit rate synchronous dynamic random access memory (DDR). In one embodiment, by extracting the first threshold remaining space information, when the remaining space information is greater than the first threshold remaining space information, the cache location of the data to be transmitted is determined to be a first-in-first-out memory; when the remaining space information is less than or equal to the first threshold remaining space information, the cache location of the data to be transmitted is determined to be a double-bit rate synchronous dynamic random access memory.
[0082] After the data to be transmitted in the DDR cache location is read, it can be sent to the target chip after passing through a 2-to-1 arbiter together with the data in the original FIFO. The 2-to-1 arbiter can detect the remaining space information in the FIFO in real time. When there is more free storage, the authority is given to the DDR path. Otherwise, the authority is given to the FIFO, and the data stored in the FIFO is sent as much as possible. In one embodiment, the second threshold remaining space information can be extracted. When the remaining space information is greater than the second threshold remaining space information, the transmission strategy is determined to be the transmission of the data to be transmitted from the double-rate synchronous dynamic random access memory; when the remaining space information is less than or equal to the second threshold remaining space information, the transmission strategy is determined to be the transmission of the data to be transmitted from the first-in-first-out memory.
[0083] In one embodiment, when the cache location is DDR, a timestamp (first timestamp) of the data to be transmitted being cached in the DDR can be recorded and written to the DDR. When the data to be transmitted is read back from the DDR and sent to the target chip via the arbiter, a real-time timestamp (second timestamp) can be determined. The timestamp information carried in the data is subtracted from the real-time timestamp to obtain the additional transmission time of the data due to being cached in the DDR, i.e., the delayed transmission time. A counter is used to count the number of times the delayed transmission time exceeds a preset delay time, and the transmission strategy is adjusted. In one embodiment, when the number of times exceeds the preset number, the transmission strategy is adjusted to transmit the data to be transmitted from the double data rate synchronous dynamic random access memory; when the number of times is less than or equal to the preset number, the transmission strategy is adjusted to transmit the data to be transmitted from the first-in-first-out memory.
[0084] Example 4
[0085] Figure 4 FIG. 1 is a structural diagram of a data transmission device according to a fourth embodiment of the present invention. Figure 4 As shown, the device includes: a location determination module 41, a strategy determination module 42 and a data sending module 43.
[0086] The location determination module 41 is configured to obtain remaining space information of the first-in-first-out memory and determine a cache location of the data to be transmitted according to the remaining space information.
[0087] The strategy determination module 42 is used to control the arbitrator to determine the transmission strategy of the data to be transmitted according to the remaining space information of the first-in-first-out memory.
[0088] The data sending module 43 is configured to transmit the data to be transmitted in the cache location to the target chip according to the transmission strategy.
[0089] In an embodiment of the present invention, a position determination module obtains the remaining space information of a first-in-first-out memory, determines the cache position of the data to be transmitted based on the remaining space information, a strategy determination module controls an arbitrator to determine the transmission strategy of the data to be transmitted based on the remaining space information of the first-in-first-out memory, and a data sending module transmits the data to be transmitted at the cache position to a target chip based on the transmission strategy, thereby realizing the determination of the cache position and transmission strategy of the data to be transmitted according to the remaining space information of the first-in-first-out memory. When the amount of data transmission between chips is too large, the data to be transmitted is cached to prevent the transmission path between chips from being blocked, thereby avoiding the deadlock of the transmission loop between chips.
[0090] In one embodiment, the cache location in the location determination module 41 includes at least one of the following: a first-in-first-out memory, and a double data rate synchronous dynamic random access memory.
[0091] In one embodiment, the data transmission device further includes:
[0092] A delay time determination module is used to determine the delay transmission time of the data to be transmitted in the double rate synchronous dynamic random access memory;
[0093] A timeout number recording module is used to determine that the delayed transmission time is timed out when the delayed transmission time is greater than the preset delay time, and record the number of timeouts;
[0094] A first transmission strategy adjustment module is configured to adjust the transmission strategy to transmit the data to be transmitted in the double rate synchronous dynamic random access memory when the number of times is greater than a preset number;
[0095] The second transmission strategy adjustment module is configured to adjust the transmission strategy to transmit the data to be transmitted in the first-in-first-out memory when the number of times is less than or equal to a preset number of times.
[0096] In one embodiment, the delay time determination module includes:
[0097] A first timestamp determining unit, configured to determine a first timestamp of data to be transmitted being cached in the double rate synchronous dynamic random access memory;
[0098] a second timestamp determining unit, configured to determine a second timestamp of the data to be transmitted when it is transmitted to the arbitrator;
[0099] The delay time determining unit is configured to obtain the delayed transmission time by subtracting the first timestamp from the second timestamp.
[0100] In one embodiment, the location determination module 41 includes:
[0101] a space information receiving unit, configured to receive remaining space information from the first-in-first-out memory and extract first threshold remaining space information;
[0102] a first position determining unit, configured to determine that the cache location of the data to be transmitted is a first-in-first-out memory when the remaining space information is greater than a first threshold remaining space information;
[0103] The second position determining unit is configured to determine that the cache location of the data to be transmitted is the double rate synchronous dynamic random access memory when the remaining space information is less than or equal to the first threshold remaining space information.
[0104] In one embodiment, the policy determination module 42 includes:
[0105] A remaining information receiving unit, used for controlling the arbitrator to receive remaining space information of the first-in-first-out memory;
[0106] A first transmission strategy determining module is configured to determine, when the remaining space information is greater than the second threshold remaining space information, that the transmission strategy is to transmit the data to be transmitted in the double data rate synchronous dynamic random access memory;
[0107] The second transmission strategy determining module is configured to determine the transmission strategy as transmitting the data to be transmitted in the first-in-first-out memory when the remaining space information is less than or equal to the second threshold remaining space information.
[0108] In one embodiment, the data sending module 43 includes:
[0109] A target chip determination module is used to determine a target chip that receives data to be transmitted;
[0110] a first data transmission unit, configured to send the data to be transmitted cached in the first-in-first-out memory to the target chip when the transmission strategy is to transmit the data to be transmitted in the first-in-first-out memory;
[0111] The second data transmission unit is configured to send the data to be transmitted cached in the double data rate synchronous dynamic random access memory to the target chip when the transmission strategy is to transmit the data to be transmitted in the double data rate synchronous dynamic random access memory.
[0112] The data transmission device provided in the embodiment of the present invention can execute the data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0113] Example 5
[0114] Figure 5 1 is a schematic diagram of the structure of a processing chip 10 for implementing a data transmission method according to an embodiment of the present invention. The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0115] like Figure 5 As shown, the processing chip 10 includes at least one processing unit 11 and a storage unit, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processing unit 11. The storage unit stores a computer program that can be executed by the at least one processing unit. The processing unit 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the processing chip 10 can also be stored in the RAM 13. The processing unit 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0116] Various components in processing chip 10 are connected to I / O interface 15, including: input unit 16, such as a keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as a magnetic disk, optical disk, etc.; and communication unit 19, such as a network card, modem, wireless communication transceiver, etc. Communication unit 19 allows processing chip 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0117] The processing unit 11 can be various general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the processing unit 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processing unit 11 performs the various methods and processes described above, such as the data transmission method.
[0118] In some embodiments, the data transmission method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto processing chip 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processing unit 11, one or more steps of the data transmission method described above may be performed. Alternatively, in other embodiments, processing unit 11 may be configured to perform the data transmission method in any other suitable manner (e.g., via firmware).
[0119] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0123] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0124] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0125] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0126] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A data transmission method, characterized in that: include: Obtaining remaining space information of a first-in-first-out memory, and determining a cache location of the data to be transmitted according to the remaining space information; The control arbitrator determines a transmission strategy for the data to be transmitted according to the remaining space information of the first-in-first-out memory; transmitting the data to be transmitted in the cache location to a target chip according to the transmission strategy; Wherein, when the cache location of the data to be transmitted is a double data rate synchronous dynamic random access memory, the method further includes: Determining a delayed transmission time of the data to be transmitted in the double rate synchronous dynamic random access memory; When the delayed transmission time is greater than the preset delay time, determining that the delayed transmission time is timed out, and recording the number of timeouts; When the number of times is greater than a preset number of times, adjusting the transmission strategy to transmit the data to be transmitted in the double rate synchronous dynamic random access memory; When the number is less than or equal to the preset number, the transmission strategy is adjusted to transmit the data to be transmitted in the first-in-first-out memory.
2. The method according to claim 1, characterized in that The cache location includes at least one of the following: the first-in-first-out memory, and a double rate synchronous dynamic random access memory.
3. The method according to claim 1, characterized in that The determining of the delayed transmission time of the data to be transmitted in the double rate synchronous dynamic random access memory includes: Determine a first timestamp of buffering the data to be transmitted into the double rate synchronous dynamic random access memory; Determine a second timestamp when the data to be transmitted is transmitted to the arbitrator; The delayed transmission time is obtained by subtracting the first timestamp from the second timestamp.
4. The method according to claim 1, wherein The obtaining of remaining space information of the first-in-first-out memory and determining a cache location of the data to be transmitted according to the remaining space information includes: receiving the remaining space information of the first-in-first-out memory and extracting first threshold remaining space information; When the remaining space information is greater than the first threshold remaining space information, determining that the cache location of the data to be transmitted is the first-in-first-out memory; When the remaining space information is less than or equal to a first threshold remaining space information, it is determined that the cache location of the data to be transmitted is a double data rate synchronous dynamic random access memory.
5. The method according to claim 1, wherein The control arbiter determines a transmission strategy for the data to be transmitted according to the remaining space information of the first-in-first-out memory, including: Controlling the arbitrator to receive the remaining space information of the first-in-first-out memory; When the remaining space information is greater than the second threshold remaining space information, determining that the transmission strategy is to transmit the data to be transmitted of the double data rate synchronous dynamic random access memory; When the remaining space information is less than or equal to the second threshold remaining space information, the transmission strategy is determined to be transmitting the data to be transmitted in the first-in-first-out memory.
6. The method according to claim 1, characterized in that The step of transmitting the data to be transmitted at the cache location to the target chip according to the transmission strategy includes: Determining the target chip to receive the data to be transmitted; When the transmission strategy is to transmit the data to be transmitted in the first-in-first-out memory, sending the data to be transmitted cached in the first-in-first-out memory to the target chip; When the transmission strategy is to transmit the data to be transmitted in the double data rate synchronous dynamic random access memory, the data to be transmitted cached in the double data rate synchronous dynamic random access memory is sent to the target chip.
7. A data transmission device, characterized in that: include: a location determination module, configured to obtain remaining space information of a first-in-first-out memory and determine a cache location of data to be transmitted based on the remaining space information; a strategy determination module, configured to control the arbitrator to determine a transmission strategy for the data to be transmitted according to the remaining space information of the first-in-first-out memory; a data sending module, configured to transmit the data to be transmitted in the cache location to a target chip according to the transmission strategy; Wherein, the data transmission device further includes: A delay time determination module, used to determine the delay transmission time of the data to be transmitted in the double rate synchronous dynamic random access memory; a timeout number recording module, configured to determine that the delayed transmission time is a timeout when the delayed transmission time is greater than a preset delay time, and to record the number of timeouts; A first transmission strategy adjustment module is configured to adjust the transmission strategy to transmit the data to be transmitted in the double data rate synchronous dynamic random access memory when the number of times is greater than a preset number; The second transmission strategy adjustment module is configured to adjust the transmission strategy to transmit the data to be transmitted in the first-in-first-out memory when the number of times is less than or equal to a preset number of times.
8. A processing chip, characterized in that: The processing chip includes: at least one processing unit; and a storage unit communicatively connected to the at least one processing unit; The storage unit stores a computer program that can be executed by the at least one processing unit, and the computer program is executed by the at least one processing unit so that the at least one processing unit can execute the data transmission method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processing unit to implement the data transmission method according to any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Cache control method and system, storage medium, computer equipment and application
CN111782578A