Data sending node, data sending method, network-on-chip, chip and electronic equipment
By monitoring the data transmission situation and token release situation in the data sending node of the on-chip network, and judging and handling data congestion, the performance impact problem when writing data and reading response data share the cache area, and the reasonable allocation of cache space is achieved Improved data transmission efficiency.
Patent Information
- Application Number
- CN202411569698.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-01-10
AI Technical Summary
In an on-chip network, when writing data and reading response data share a cache area in data transmission between nodes, it is easy to affect the reception of the other party's data due to congestion, and the prior art is difficult to effectively reduce the mutual influence of cache space requirements and data transmission performance.
By setting up a monitoring module and determination module in the data sending node, monitoring the data sending situation and token release, determining whether the receiving node is congested, and pausing the transmission of target type data when congestion occurs, ensuring the reasonable allocation of cache space and other Transmission of data streams.
It effectively reduces the cache space requirement at the data receiver, reduces the mutual influence of data transmission performance between different data streams, avoids data transmission blockage caused by congestion, and improves the efficiency of the overall network.
Smart Images

Figure CN119299379A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data sending node, a sending method, an on-chip network, a chip and an electronic device. Background Art
[0002] In a NOC (Network on Chip) system, nodes can communicate with each other through an IDN (ideal network). For example, node A can transmit data to node B through an IDN, where the transmitted data can include both data written by node A to node B (i.e., write data) and data transmitted by node A to node B in response to a read data request from node B (i.e., read response data). The two types of data can be transmitted through the same data channel at different times.
[0003] When the distance between nodes AB is far, a certain depth of buffer area needs to be designed inside node B for receiving data. The buffer area can be, for example, SRAM (Static Random Access Memory). Generally speaking, the depth of the buffer area in node B is usually greater than or equal to the amount of data continuously sent by node A within the RTT (Round-Trip Time). In this way, when the data path is unobstructed, after node A sends a data, node A can continue to send data to node B before node A receives the token (TKN, token) corresponding to the data released by node B. For example, if the RTT from node A to node B is 10 clock cycles, the depth of the buffer area in node B should be at least 10.
[0004] In the related art, on the node B side, write data and read response data can share the same cache area, or each can use a cache area separately. In the case of sharing a cache area, although cache resources can be saved, if one type of data in node B (such as write data) is congested, that is, node B cannot take the data out of the cache area for processing in time, the cache area will be occupied by a large amount of the data, thereby affecting the reception of another type of data (such as read response data). In the case where two types of data use a cache area separately, since the depth of each cache area must be greater than or equal to the amount of data continuously sent by node A within the RTT time, a large amount of cache resources are required.
[0005] There is no effective solution in the relevant technology on how to reduce the cache space while minimizing the mutual influence of data transmission performance between different data streams. Summary of the invention
[0006] In view of this, an embodiment of the present invention provides a data sending node, a sending method, an on-chip network, a chip and an electronic device, which can effectively reduce the data cache space at the data receiving end while greatly reducing the mutual influence of data transmission performance between different data streams.
[0007] In a first aspect, an embodiment of the present invention provides a data sending node, which is arranged in an on-chip network, and the data sending node includes: a first monitoring module, configured to monitor the data sending status of the data sending node for target type data and the token release status of the data receiving node for the target type data, wherein the target type data includes one of write data and read response data; a data cache space is provided in the data receiving node, and the data cache space is used to cache the write data and / or read response data received from the data sending node, and the data cache space is greater than a first threshold and less than 2 times of the first threshold, and the first threshold is the number of data sent by the data sending node to the data receiving node when continuously sending data within a round-trip delay; a determination module, coupled with the first monitoring module, configured to determine whether data congestion occurs at the data receiving node based on the data sending status and the token release status; a pause module, coupled with the determination module, configured to pause sending the target type data to the data receiving node when the determination module determines that data congestion occurs at the data receiving node.
[0008] In one embodiment, the first monitoring module includes a first counter and a second counter; the first counter is configured to, when the target type data is the write data: in response to the data sending node sending the target type data to the data receiving node, the first counter is increased by 1 after the round-trip delay; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the first counter is reduced by 1; the second counter is configured to, when the target type data is the read response data: in response to the data sending node sending the target type data to the data receiving node, the second counter is increased by 1 after the round-trip delay; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the second counter is reduced by 1.
[0009] In one implementation, the round trip delay is implemented through a pipeline structure.
[0010] In one embodiment, the number of pipeline stages of the pipeline structure is equal to one-Nth of the number of clock cycles corresponding to the round-trip delay, wherein the data sending node inputs a counting signal to the pipeline structure every M clock cycles, and after the counting signal is output from the last pipeline stage of the pipeline structure, it triggers the first counter to add 1 or the second counter to add 1, wherein M and N are both positive integers, and the product of M and N is equal to the number of clock cycles corresponding to the round-trip delay.
[0011] In one embodiment, the determination module is configured to: determine that data congestion occurs at the data receiving node when the count value of the first counter or the second counter is greater than or equal to a preset count threshold; or determine that data congestion does not occur at the data receiving node when the count value of the first counter or the second counter is less than the preset count threshold.
[0012] In one embodiment, the data sending node also includes: a second monitoring module, configured to monitor the amount of write data that has been sent by the data sending node and has not yet been processed by the data receiving node, and the amount of read response data that has been sent by the data sending node and has not yet been processed by the data receiving node, to obtain corresponding first quantities and second quantities; a selection module, coupled to the determination module and the second monitoring module, respectively, and configured to select the write data or the read response data as the target type data and send it to the data receiving node based on the size relationship between the first quantity and the second quantity when the determination module determines that data congestion has not occurred at the data receiving node.
[0013] In one embodiment, the second monitoring module includes: a third counter, configured to increase by 1 in response to the data sending node sending a write data to the data receiving node; or, to decrease by 1 in response to the data sending node receiving a token released by the data receiving node for the write data; a fourth counter, configured to increase by 1 in response to the data sending node sending a read response data to the data receiving node; or, to decrease by 1 in response to the data sending node receiving a token released by the data receiving node for the read response data.
[0014] In one embodiment, the data cache space includes a first subspace, a second subspace, and a third subspace; the first subspace is used to cache the write data, the second subspace is used to cache the read response data, and the third subspace is used to cache the write data and / or the read response data; the first subspace, the second subspace, and the third subspace do not overlap with each other, the first subspace and the second subspace have the same number of cache units, and the sum of the number of cache units in the first subspace and the number of cache units in the third subspace is equal to the first threshold; the first subspace, the second subspace, and the third subspace respectively correspond to different types of tokens, and the number of tokens of each type is equal to the number of cache units in the subspace corresponding to the token; the data receiving node is configured to release a token corresponding to the subspace to the data sending node every time a data is taken from one of the subspaces for processing.
[0015] In one embodiment, the data sending node also includes a recovery module, which is coupled to the determination module and the pause module respectively, and is configured to resume sending the target type data to the data receiving node in response to the determination module determining that data congestion has not occurred at the data receiving node when the pause module suspends sending the target type data to the data receiving node.
[0016] In a second aspect, an embodiment of the present invention further provides a data sending method, which is applied to a data sending node in an on-chip network, and the method comprises: monitoring the data sending status of the data sending node for target type data and the token release status of the data receiving node for the target type data, wherein the target type data comprises one of write data and read response data; a data cache space is provided in the data receiving node, and the data cache space is used to cache write data and / or read response data received from the data sending node, and the data cache space is greater than a first threshold and less than 2 times of the first threshold, and the first threshold is the number of data sent when the data sending node continuously sends data to the data receiving node within a round-trip delay; determining whether data congestion occurs at the data receiving node based on the data sending status and the token release status; and suspending sending the target type data to the data receiving node when it is determined that data congestion occurs at the data receiving node.
[0017] In one embodiment, the monitoring of the data sending status of the target type data by the data sending node and the token release status of the target type data by the data receiving node includes: when the target type data is the write data, in response to the data sending node sending a target type data to the data receiving node, after the round-trip delay, a first counter is increased by 1; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the first counter is reduced by 1; or, when the target type data is the read response data, in response to the data sending node sending a target type data to the data receiving node, after the round-trip delay, a second counter is increased by 1; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the second counter is reduced by 1.
[0018] In one implementation, the round trip delay is implemented through a pipeline structure.
[0019] In one embodiment, the number of pipeline stages of the pipeline structure is equal to one-Nth of the number of clock cycles corresponding to the round-trip delay, wherein the data sending node inputs a counting signal to the pipeline structure every M clock cycles, and after the counting signal is output from the last pipeline stage of the pipeline structure, the first counter or the second counter is triggered to add 1, wherein M and N are both positive integers, and the product of M and N is equal to the number of clock cycles corresponding to the round-trip delay.
[0020] In one embodiment, determining whether data congestion occurs at the data receiving node based on the data sending situation and the token release situation includes: when the count value of the first counter or the second counter is greater than or equal to a preset count threshold, determining that data congestion occurs at the data receiving node; or, when the count value of the first counter or the second counter is less than the preset count threshold, determining that data congestion does not occur at the data receiving node.
[0021] In one embodiment, the data sending method also includes: monitoring the amount of write data that has been sent by the data sending node and has not yet been processed by the data receiving node, and the amount of read response data that has been sent by the data sending node and has not yet been processed by the data receiving node, to obtain corresponding first quantities and second quantities; when it is determined that the data receiving node is not congested, based on the size relationship between the first quantity and the second quantity, selecting the write data or the read response data as the target type data, and sending it to the data receiving node.
[0022] In one embodiment, the monitoring of the number of write data that has been sent by the data sending node and has not yet been processed by the data receiving node, and the number of read response data that has been sent by the data sending node and has not yet been processed by the data receiving node includes: in response to the data sending node sending a write data to the data receiving node, the third counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the write data, the third counter is decremented by 1; or, in response to the data sending node sending a read response data to the data receiving node, the fourth counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the read response data, the fourth counter is decremented by 1.
[0023] In one embodiment, the data cache space includes a first subspace, a second subspace, and a third subspace; the first subspace is used to cache the write data, the second subspace is used to cache the read response data, and the third subspace is used to cache the write data and / or the read response data; the first subspace, the second subspace, and the third subspace do not overlap with each other, the first subspace and the second subspace have the same number of cache units, and the sum of the number of cache units in the first subspace and the number of cache units in the third subspace is equal to the first threshold; the first subspace, the second subspace, and the third subspace respectively correspond to different types of tokens, and the number of tokens of each type is equal to the number of cache units in the subspace corresponding to the token; the data receiving node is configured to release a token corresponding to the subspace to the data sending node every time a data is taken from one of the subspaces for processing.
[0024] In one embodiment, after pausing sending the target type data to the data receiving node, the method further includes: in response to the data sending node determining that the data receiving node has no data congestion, resuming sending the target type data to the data receiving node.
[0025] In a third aspect, an embodiment of the present invention further provides an on-chip network, comprising: a data sending node, an on-chip communication channel, and a data receiving node; the data sending node communicates with the data receiving node through the on-chip communication channel, wherein the data sending node is any data sending node provided by an embodiment of the present invention.
[0026] In a fourth aspect, an embodiment of the present invention further provides a chip, wherein the chip includes any one of the on-chip networks provided by the embodiments of the present invention.
[0027] In a fifth aspect, an embodiment of the present invention further provides an electronic device, comprising a circuit board and a chip, wherein the chip is arranged on the circuit board, and the chip is any chip provided by the embodiment of the present invention.
[0028] The data sending node, sending method, on-chip network, chip and electronic device provided by the embodiments of the present invention can determine whether data congestion has occurred at the data receiving node according to the data sending status of the target type data and the token release status, and stop the sending of the target type data in time when it is determined that data congestion has occurred at the data receiving node. Therefore, even if data congestion occurs, the target type data will only occupy a part of the data cache space, thereby reserving part of the data cache space for the transmission of other data. In this way, on the one hand, the demand for the data cache space size of the data receiving node can be effectively reduced, and there is no need to set a data cache space greater than or equal to the first threshold for each of the write data and the read response data. On the other hand, conditions can be provided for the transmission of other data, instead of allowing the target type data to occupy the entire data cache space as in the prior art, resulting in the inability to transmit other types of data. Therefore, while effectively reducing the data cache space at the data receiving end, the mutual influence of data transmission performance between different data streams can be greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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.
[0030] Figure 1 A schematic diagram of the structure of a data sending node provided by an embodiment of the present invention; Figure 2 Another structural schematic diagram of a data sending node provided by an embodiment of the present invention; Figure 3 A schematic diagram of a data sending process in an embodiment of the present invention; Figure 4 A schematic diagram of another structure of a data sending node provided by an embodiment of the present invention; Figure 5 A detailed schematic diagram of a data sending process in an embodiment of the present invention; Figure 6 Another detailed schematic diagram of the data sending process in an embodiment of the present invention; Figure 7 A flow chart of a data sending method provided by an embodiment of the present invention; Figure 8 A schematic diagram of a structure of a network on chip provided by an embodiment of the present invention; Fig. 9 A schematic diagram of the structure of a chip provided by an embodiment of the present invention; Fig.10 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0032] It should be clear that the described embodiments are only some embodiments of the present invention, not all 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.
[0033] In a first aspect, an embodiment of an embodiment of the present invention provides a data sending node, which can effectively reduce the data buffer space of a data receiving end while greatly reducing the mutual influence of data transmission performance between different data streams.
[0034] like Figure 1 As shown, the data sending node provided by the embodiment of the present invention is arranged in an on-chip network, and the data sending node may include: The first monitoring module 11 is configured to monitor the data sending status of the data sending node for the target type data and the token release status of the data receiving node for the target type data, wherein the target type data includes one of write data and read response data; a data cache space is provided in the data receiving node, and the data cache space is used to cache the write data and / or read response data received from the data sending node, and the data cache space is greater than a first threshold and less than 2 times of the first threshold, and the first threshold is the number of data sent by the data sending node to the data receiving node when continuously sending data within the round-trip delay; The determination module 12 is coupled to the first monitoring module 11 and is configured to determine whether data congestion occurs at the data receiving node according to the data sending situation and the token release situation; The pausing module 13 is coupled to the determining module 12, and is configured to suspend sending the target type data to the data receiving node when the determining module 12 determines that data congestion occurs at the data receiving node.
[0035] The data sending node provided by the embodiment of the present invention can determine whether data congestion has occurred in the data receiving node according to the data sending status of the target type data and the token release status, and when it is determined that data congestion has occurred in the data receiving node, promptly stop sending the target type data. Therefore, even if data congestion occurs, the target type data will only occupy a part of the data cache space, thereby reserving part of the data cache space for the transmission of other data. In this way, on the one hand, the demand for the data cache space size of the data receiving node can be effectively reduced, and there is no need to set a data cache space greater than or equal to the first threshold for each of the write data and the read response data. On the other hand, it can also provide conditions for the transmission of other data, instead of allowing the target type data to occupy the entire data cache space as in the prior art, resulting in the inability to transmit other types of data. Therefore, it can effectively reduce the data cache space of the data receiving end while greatly reducing the mutual influence of data transmission performance between different data streams.
[0036] First, a brief introduction to the network on chip is given. The network-on-chip (NoC) is a communication method of the system-on-chip (SoC). In the NOC (Network on Chip), nodes can communicate through the IDN (ideal network). In the embodiment of the present invention, the IDN may include multiple command channels and one data channel. Among them, different commands can be transmitted through the corresponding command channels, and various data must be transmitted through a data channel. For example, in one example, node A can send a write command to node B through the request command channel IDN_REQ in the IDN, and send write data DatReq to node B through the data channel IDN_DAT. In another example, node A can receive a read command sent by node B through the response command channel IDN_RSP in the IDN, and send the data DatRsp that node B wants to read, that is, read response data, to node B through the data channel IDN_DAT. It can be seen that the write data and the read response data are both data sent by node A to node B, but the triggering mechanism is different. Since the write data and the read response data share the data channel between the two nodes, the write data and the read response data will use the data channel for data transmission at different times.
[0037] In an embodiment of the present invention, the data sending node and the data receiving node may be any two nodes in the network on chip that have communication connection. For example, in one example, the data sending node may be a processor core in the network on chip, and the data receiving node may be another processor core in the network on chip. The data sending node may send data to the data receiving node based on a token mechanism. Specifically, the data receiving node may release a corresponding number of tokens to the data sending node according to the size of its own data cache space. The data sending node may send a corresponding number of data to the data receiving node according to the number of tokens it has. When the data sending node has no token, it needs to wait for the data receiving node to release a new token before it can continue to send data to the data receiving node. In order to avoid the data sending node waiting in vain due to the lack of tokens, in an embodiment of the present invention, a data cache space of a certain size may be set in the data receiving node to cache the data sent from the data sending node. Whenever the data receiving node takes a piece of data from the data cache space, the data receiving node will release a token to the data sending node. Therefore, in order to avoid the data sending node waiting in vain due to the lack of tokens, the size of the data cache space may be greater than or equal to the number of data sent when the data sending node continuously sends data to the data receiving node within the round trip delay. Among them, round-trip delay is a common concept in the field of communications, specifically referring to the time required for data to be transmitted from one end of the network to the other end and then receive confirmation from the receiving end. Specifically in the embodiment of the present invention, when the data path is unobstructed, the round-trip delay is the length of time it takes for a certain data to be sent from the data sending node to the data sending node receiving the token for the data released by the data receiving node. In an example, if the data sending node can send one data per clock cycle, then the round-trip delay includes as many clock cycles as the data sending node can send as much data within the round-trip delay, and therefore, the minimum value of the data cache space should be set to that value.
[0038] Specifically, in an embodiment of the present invention, the data sending node may include a first monitoring module 11, and the first monitoring module 11 may monitor the data sending situation of the data sending node for the target type data and the token release situation of the data receiving node for the target type data, wherein the target type data may include one of write data and read response data, for example, in one example, the target type data may be write data, and in another example, the target type data may be read response data. In another example, the target type data may be alternately write data or read response data.
[0039] The data transmission of the target type data by the data transmitting node and the token release of the target type data by the data receiving node are a dynamic process. On the one hand, if the data transmitting node has a token of the target type data, it will send a target type data, thereby consuming the token. On the other hand, each time the data receiving node releases a token of the target type data, the number of the tokens of the target type data owned by the data transmitting node will be increased by 1. The first monitoring module 11 can monitor this dynamic process.
[0040] In specific implementation, in one embodiment of the present invention, the first monitoring module 11 may include a first counter and a second counter; the first counter may be configured such that, when the target type data is write data: in response to the data sending node sending a target type data to the data receiving node, the first counter is incremented by 1 after a round trip delay; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the first counter is decremented by 1. The second counter may be configured such that, when the target type data is read response data: in response to the data sending node sending a target type data to the data receiving node, the second counter is incremented by 1 after a round trip delay; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the second counter is decremented by 1.
[0041] That is to say, in the embodiment of the present invention, for the case where the target type data is write data or read response data, different counters are used to count and calculate respectively. Wherein, when the target type data is write data, the data transmission situation and the token release situation are counted by the first counter, and when the target type data is read response data, the data transmission situation and the token release situation are counted by the second counter. In this way, if the data path is unobstructed, the count value of the first counter or the second counter will always remain at a smaller count value, because after sending a target type data, the first counter or the second counter will not add 1 immediately, but will wait until a round trip delay before adding 1, and at this time, if the data path is unobstructed, since a round trip delay has passed, the data sending node will receive the token released by the data receiving node for the target type data, thereby reducing the first counter or the second counter by 1. Then, the data sending node enters the next round of data transmission, and the cycle repeats, and the value of the first counter or the second counter fluctuates between 0 and 1. If the data path is not very smooth, the time for the data sending node to receive the token will be delayed, causing the count value of the first counter or the second counter to rise to a larger value. The less smooth the data path is, the longer the delay will be, and the larger the count value of the first counter or the second counter will be. Therefore, the data sending node can determine whether the target type data in the data receiving node has data congestion according to the count value of the first counter or the second counter. Here, data congestion of the target type data in the data receiving node means that the data receiving node cannot take the target type data in the data cache space for processing in time, so that the corresponding token cannot be released in time.
[0042] Specifically, based on the count of the first counter or the second counter, in one embodiment of the present invention, the determination module 12 can be configured to: when the count value of the first counter or the second counter is greater than or equal to the preset count threshold, it can be determined that data congestion occurs in the data receiving node; or, when the count value of the first counter or the second counter is less than the preset count threshold, it is determined that data congestion does not occur in the data receiving node. The size of the preset count threshold can be set according to the amount of data sent by the round-trip delay and the tolerance of the on-chip network to congestion. For example, in one example, the amount of data sent by the round-trip delay is 600 data, and the tolerance of the on-chip network to congestion is 40%, then the count threshold can be set to 600×40%=240. That is, if the count value of the first counter or the second counter is less than 240, the determination module 12 can determine that data congestion does not occur in the data receiving node, and if the count value of the first counter or the second counter is greater than or equal to 240, the determination module 12 can determine that data congestion occurs in the data receiving node.
[0043] Based on the determination module 12 that data congestion has occurred in the data receiving node, the suspension module 13 can suspend sending the target type data to the data receiving node, thereby preventing the target type data from filling up the data cache space in the data receiving node, thereby reserving conditions for sending other data. Here, the target type data can be one of write data or read response data, and the other data can be, for example, the other of write data or read response data. Specifically, in an embodiment of the present invention, since the data cache space at the data receiving node is greater than the first threshold and less than 2 times the first threshold, and the write data and the read response data are not sent at the same time, therefore, when the data path is unobstructed, the target type data, regardless of whether it is write data or read response data, can be guaranteed to be continuously sent within the round-trip delay, and at the same time, the part of the data cache space that is larger than the first threshold can also allow a small amount of the other type of data in the write data or read response data to be sent. Even if the transmission of target type data is blocked, since the data sending node can promptly learn of the blocking situation and suspend the sending of target type data, the congestion state of the target type data will gradually ease over time, thereby freeing up more data cache space for other data, thereby greatly reducing the mutual impact of data transmission performance between different data streams.
[0044] Furthermore, if Figure 2 As shown, in one embodiment of the present invention, the data sending node provided by the embodiment of the present invention may further include a recovery module 14, which is coupled to the determination module 12 and the pause module 13 respectively, and is configured to resume sending the target type data to the data receiving node in response to the determination module 12 determining that there is no data congestion at the data receiving node when the pause module 13 suspends sending the target type data to the data receiving node, so that the data sending state can be automatically adjusted according to the smoothness of the data path.
[0045] In the embodiment of the present invention, in order to more effectively monitor the data transmission and token release of the target type data, the data buffer space in the data receiving node can be further divided. Figure 3As shown, in one embodiment, the data cache space in the data receiving node may include a first subspace, a second subspace, and a third subspace; wherein the first subspace may be used to cache write data, the second subspace may be used to cache read response data, and the third subspace may be used to cache write data and / or read response data. The first subspace, the second subspace, and the third subspace do not overlap with each other, the first subspace and the second subspace have the same number of cache units, and the sum of the number of cache units in the first subspace and the number of cache units in the third subspace is equal to the first threshold; the first subspace, the second subspace, and the third subspace correspond to different types of tokens, respectively, and the number of tokens of each type is equal to the number of cache units in the subspace corresponding to the token; the data receiving node is configured to release a token corresponding to the subspace to the data sending node each time a data is taken from one of the subspaces for processing. Based on this, in one embodiment of the present invention, the first counter in the first monitoring module 11 can be added or subtracted by 1 based on the sending of write data and the release of tokens corresponding to the first subspace, and the second counter can be added or subtracted by 1 based on the sending of read response data and the release of tokens corresponding to the second subspace.
[0046] In order to release the corresponding tokens for each subspace respectively, in one example, the data receiving node can maintain three counters, each of which is used to record the current number of tokens in a subspace in the data receiving node, and the counter corresponds to the subspace one by one. Every time the data receiving node receives a piece of data, it will store the data in the corresponding cache subspace. After the data is taken out of the cache for processing, the counter corresponding to the subspace is increased by 1, indicating that the current number of tokens in the subspace is increased by 1. In the data receiving node, as long as the number of tokens corresponding to the subspace is not 0, it will be released to the data sending node, and the count value of the counter will be reduced to 0. The operation of the data receiving node releasing the token to the data sending node can be, for example, the operation of the data receiving node sending a pulse to the data sending node, wherein the operation of sending a pulse can be controlled by the counter corresponding to each subspace. Each time a pulse is sent, the corresponding counter is reduced by 1, and a token is released, indicating that the subspace corresponding to the counter has an empty cache unit.
[0047] For example, in one embodiment, the first threshold is 600, and the data cache space is 900, that is, there are 900 cache units, each of which is used to store a target type of data. Among them, the first subspace and the second subspace have the same number of cache units, for example, the number of cache units of the first subspace and the second subspace are both 300, and the sum of the number of cache units of the first subspace and the number of cache units of the third subspace is 600, so the number of cache units of the third subspace is 600-300=300. That is, write data and read response data each have 300 exclusive cache units, and in addition, write data and read response data also share 300 cache units. In another embodiment, the first threshold is 600, the data cache space is 1000, the number of cache units of the first subspace and the second subspace are both 400, and the number of cache units of the third subspace is 600-400=200.
[0048] The following uses the target type data as write data as an example to illustrate the use of subspaces. It can be understood that similar conclusions can be drawn for the case where the target type data is read response data. In one embodiment of the present invention, when a data receiving node receives a write data, it can be first stored in the first subspace that it exclusively uses. After the first subspace is full, the write data can continue to be stored in the third subspace shared by the two. If the data receiving node takes a write data from the first subspace for processing, a token corresponding to the first subspace can be released to the data sending node. If the data receiving node takes a write data from the third subspace for processing, a token corresponding to the third subspace can be released to the data sending node. Since the sum of the number of cache units in the first subspace and the third subspace is exactly equal to the first threshold, the write data that is continuously sent within a round-trip delay can be cached. In some examples, even if a certain amount of data congestion occurs in the write data, the write data will not occupy the second subspace, thereby reserving a portion of the transmission capacity for the read response data.
[0049] In an embodiment of the present invention, after the first counter or the second counter sends a target type of data, it needs to go through a round trip delay before adding 1. Exemplarily, in one example, if the round trip delay is 400 clock cycles, the first counter or the second counter will add 1 after sending a target type of data, and it will take another 400 clock cycles. Among them, the data sending node can form such a round trip delay through a hardware circuit, so as to more accurately grasp the timing of adding 1 to the first counter or the second counter. Specifically, in one embodiment of the present invention, the round trip delay can be implemented through a pipeline structure. The so-called pipeline can refer to dividing a large-scale and multi-level combinational logic circuit into several levels, inserting a register group at each level and temporarily storing intermediate data. A K-level pipeline is a circuit with exactly K register groups from the input to the output of the combinational logic, and the output of the previous level is the input of the next level without feedback. In this way, since each clock cycle, the signal can be transmitted from the first level of the pipeline to the adjacent next level of the pipeline, therefore, for the K-level pipeline, the signal needs to go through a total of K clock cycles from entering the pipeline to being output from the pipeline.
[0050] In one embodiment of the present invention, in order to obtain the round-trip delay, the number of pipeline stages of the pipeline structure can be equal to one-Nth of the number of clock cycles corresponding to the round-trip delay, wherein a data sending node inputs a counting signal to the pipeline structure every M clock cycles, and after the counting signal is output from the last pipeline stage of the pipeline structure, it can trigger the first counter or the second counter to add 1, wherein M and N are both positive integers, and the product of M and N is equal to the number of clock cycles corresponding to the round-trip delay.
[0051] For example, in one example, the number of clock cycles corresponding to the round-trip delay is 600, N=60, M=10, then the data sending node inputs a counting signal to the pipeline structure every M clock cycles, in the pipeline structure, the counting signal is passed down one level every 10 clock cycles, so that after 600 clock cycles, 60 pipeline stages can be completed and flow out of the pipeline structure, thereby triggering the first counter or the second counter to increase by 1. In another example, the number of clock cycles corresponding to the round-trip delay is 600, N=600, M=1, then the data sending node inputs a counting signal to the pipeline structure every M clock cycles, in the pipeline structure, the counting signal is passed down one level every 1 clock cycle, so that after 600 clock cycles, 600 pipeline stages can be completed and flow out of the pipeline structure, thereby triggering the first counter or the second counter to increase by 1.
[0052] From the above example, we can see that the smaller M is, the more accurate the round-trip delay estimation is for each target type of data, but the cost is that the pipeline structure has more pipeline stages, and more hardware is required. However, since the pipeline structure is only used to simulate the round-trip delay for the target type of data, the data bit width of each pipeline stage can be smaller, so the hardware cost is still within a reasonable range.
[0053] In an embodiment of the present invention, the target type data may be write data or read response data, but only one of the two may be used at the same time, which may vary according to different application scenarios, and the embodiment of the present invention does not limit this. For example, in one embodiment of the present invention, the target type data may be alternately write data or read response data, and the round trip delay may be simulated, and the write data and the read response data may be distinguished, so that when the count signal is output from the pipeline structure, the corresponding first counter or the second counter may be indicated to perform an add 1 operation. In one example, a data bit of the count signal may be used to indicate whether the target type data corresponding to the current count signal is write data or read response data. For example, in one example, the bit width of the count signal is 2, wherein the high bit may represent the count value, and the low bit may represent whether the target type data corresponding to the current calculation signal is write data or read response data. For example, when the low bit is 0, it indicates that the target type data corresponding to the current calculation signal is write data, and when the low bit is 1, it indicates that the target type data corresponding to the current calculation signal is read response data.
[0054] Furthermore, in addition to monitoring the data sending status of the target type data by the data sending node and the token release status of the target type data by the data receiving node through the first monitoring module 11, other situations can also be monitored to further optimize the data transmission between nodes.
[0055] Specifically, if Figure 4As shown, in one embodiment of the present invention, the data sending node may further include a second monitoring module 15, which may be configured to monitor the number of write data that has been sent by the data sending node and has not been processed by the data receiving node, and the number of read response data that has been sent by the data sending node and has not been processed by the data receiving node, to obtain the corresponding first number and second number; the selection module 16 is coupled with the determination module 12 and the second monitoring module 15 respectively, and is configured to select the write data or the read response data as the target type data and send it to the data receiving node according to the size relationship between the first number and the second number when the determination module 12 determines that the data receiving node has not experienced data congestion. Among them, the write data or read response data that has been sent by the data sending node and has not been processed by the data receiving node may refer to the data sending node having sent the write data or read response data, but the token corresponding to the write data or read response data has not been released by the data receiving node. Optionally, in this case, the write data or read response data may still be transmitted in the data channel, and may have been cached in the data cache space of the data receiving node, but has not yet been taken out of the cache by the data receiving node for processing. The second monitoring module 15 can monitor the number of write data that has been sent but not yet processed by the data receiving node to obtain a first number, and can also monitor the number of read response data that has been sent but not yet processed by the data receiving node to obtain a second number. In one embodiment of the present invention, if the determination module 12 determines that there is no data congestion at the data receiving node, the selection module 16 can select the smaller of the first number and the second number, and send the corresponding write data or read response data to the data receiving node. For example, in one example, the first number corresponding to the write data is 200, and the second number corresponding to the read response data is 80, that is, the second number is smaller, then the read response data corresponding to the second number can be selected to be sent to the data receiving node.
[0056] In a specific implementation, the second monitoring module 15 can also be implemented based on a counter. In one embodiment of the present invention, the second monitoring module 15 may include: a third counter, configured to increase the third counter by 1 in response to the data sending node sending a write data to the data receiving node; or, in response to the data sending node receiving a token released by the data receiving node for the write data, the third counter is reduced by 1; a fourth counter, configured to increase the fourth counter by 1 in response to the data sending node sending a read response data to the data receiving node; or, in response to the data sending node receiving a token released by the data receiving node for the read response data, the fourth counter is reduced by 1.
[0057] Comparing the first counter, the second counter, the third counter, and the fourth counter, we can see that the first counter and the second counter are incremented by 1 after sending a data and waiting for a round trip delay, while the third counter and the fourth counter are incremented by 1 immediately after sending a data. All four counters are decremented by 1 when receiving the token released by the data receiving node.
[0058] Exemplarily, in one example, a schematic diagram of a data sending node performing a data sending operation may be as follows: Figure 5 See Figure 5 The data sending node can send two types of data, write data or read response data, to the data receiving node. The specific data to be sent can be determined by the count values of the first counter, the second counter, the third counter, and the fourth counter. For details, please refer to the description in the above embodiment, which will not be repeated here. In another example, a schematic diagram of a data sending node performing a data sending operation can be as follows: Figure 6 shown. Figure 5 and Figure 6 Basically the same, except that Figure 5 The number of pipeline stages used to simulate the round-trip delay is 600. Figure 6 The number of pipeline stages used to simulate the round-trip delay is 60, and the pipeline moves backward one level every 10 clock cycles.
[0059] In a second aspect, an embodiment of an embodiment of the present invention provides a data sending method, which can effectively reduce the data buffer space at the data receiving end and greatly reduce the mutual influence of data transmission performance between different data streams.
[0060] like Figure 7 As shown, the data sending method provided by the embodiment of the present invention is applied to a data sending node in a network on chip. The method may include: S41, monitoring the data sending status of the target type data by the data sending node and the token release status of the target type data by the data receiving node, wherein the target type data includes one of write data and read response data; a data cache space is provided in the data receiving node, and the data cache space is used to cache the write data and / or read response data received from the data sending node, and the data cache space is greater than a first threshold and less than 2 times of the first threshold, and the first threshold is the number of data sent when the data sending node continuously sends data to the data receiving node within the round-trip delay; S42, determining whether data congestion occurs at the data receiving node according to the data sending situation and the token release situation; S43: When it is determined that data congestion occurs at the data receiving node, suspend sending the target type data to the data receiving node.
[0061] The data sending method provided by the embodiment of the present invention can determine whether data congestion has occurred in the data receiving node according to the data sending status of the target type data and the token release status, and when it is determined that data congestion has occurred in the data receiving node, the sending of the target type data is stopped in time. Therefore, even if data congestion occurs, the target type data will only occupy a part of the data cache space, thereby reserving part of the data cache space for the transmission of other data. In this way, on the one hand, the demand for the data cache space size of the data receiving node can be effectively reduced, and there is no need to set a data cache space greater than or equal to the first threshold for each of the write data and the read response data. On the other hand, conditions can be provided for the transmission of other data, instead of allowing the target type data to occupy the entire data cache space as in the prior art, resulting in the inability to transmit other types of data. Therefore, while effectively reducing the data cache space of the data receiving end, the mutual influence of data transmission performance between different data streams can be greatly reduced.
[0062] In one implementation, step S41 of monitoring the data sending status of the target type data by the data sending node and the token release status of the target type data by the data receiving node may specifically include: In the case where the target type data is the write data, in response to the data sending node sending a target type data to the data receiving node, after the round trip delay, the first counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the first counter is decremented by 1; or, In the case where the target type data is the read response data, in response to the data sending node sending the target type data to the data receiving node, the second counter is increased by 1 after the round-trip delay; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the second counter is reduced by 1.
[0063] In one implementation, the round trip delay may be achieved through a pipeline structure.
[0064] In one embodiment, the number of pipeline stages of the pipeline structure is equal to one-Nth of the number of clock cycles corresponding to the round-trip delay, wherein the data sending node inputs a counting signal to the pipeline structure every M clock cycles, and after the counting signal is output from the last pipeline stage of the pipeline structure, the first counter or the second counter is triggered to add 1, wherein M and N are both positive integers, and the product of M and N is equal to the number of clock cycles corresponding to the round-trip delay.
[0065] In one implementation, step S42, determining whether data congestion occurs at the data receiving node according to the data sending situation and the token release situation, may include: When the count value of the first counter or the second counter is greater than or equal to a preset count threshold, determining that data congestion occurs at the data receiving node; or, When the count value of the first counter or the second counter is less than the preset count threshold, it is determined that no data congestion occurs at the data receiving node.
[0066] In one implementation, the data sending method provided by the embodiment of the present invention may further include: Monitor the amount of the write data that has been sent by the data sending node and has not yet been processed by the data receiving node, and the amount of the read response data that has been sent by the data sending node and has not yet been processed by the data receiving node, to obtain corresponding first and second amounts; When it is determined that the data receiving node is not congested, the write data or the read response data is selected as the target type data according to the size relationship between the first quantity and the second quantity, and sent to the data receiving node.
[0067] In one implementation, monitoring the amount of write data that has been sent by the data sending node and has not been processed by the data receiving node, and the amount of read response data that has been sent by the data sending node and has not been processed by the data receiving node may include: In response to the data sending node sending a write data to the data receiving node, the third counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the write data, the third counter is decremented by 1; or, In response to the data sending node sending a read response data to the data receiving node, the fourth counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the read response data, the fourth counter is decremented by 1.
[0068] In one embodiment, the data cache space includes a first subspace, a second subspace, and a third subspace; the first subspace is used to cache the write data, the second subspace is used to cache the read response data, and the third subspace is used to cache the write data and / or the read response data; the first subspace, the second subspace, and the third subspace do not overlap with each other, the first subspace and the second subspace have the same number of cache units, and the sum of the number of cache units in the first subspace and the number of cache units in the third subspace is equal to the first threshold; the first subspace, the second subspace, and the third subspace respectively correspond to different types of tokens, and the number of tokens of each type is equal to the number of cache units in the subspace corresponding to the token; the data receiving node is configured to release a token corresponding to the subspace to the data sending node every time a data is taken from one of the subspaces for processing.
[0069] In one embodiment, after pausing sending the target type data to the data receiving node, the data sending method provided by an embodiment of the present invention may further include: in response to the data sending node determining that data congestion does not occur at the data receiving node, resuming sending the target type data to the data receiving node.
[0070] In a third aspect, an embodiment of the present invention further provides a network on chip, such as Figure 8 As shown, the on-chip network may include: a data sending node 1, an on-chip communication channel 2, and a data receiving node 3; the data sending node 1 communicates with the data receiving node 3 through the on-chip communication channel 2, wherein the data sending node 1 is any data sending node provided by the embodiments of the present invention, and therefore can also achieve corresponding beneficial technical effects, which have been described in detail above and will not be repeated here.
[0071] Fourthly, Fig. 9 As shown, an embodiment of the present invention further provides a chip 5, which includes any one of the on-chip networks 51 provided in the aforementioned embodiments, and thus can also achieve corresponding beneficial technical effects, which have been described in detail above and will not be repeated here.
[0072] Fifthly, Fig.10 As shown, an embodiment of the present invention further provides an electronic device, which includes a circuit board 6 and a chip 5. The chip 5 is arranged on the circuit board 6. The chip 5 is any chip provided in the aforementioned embodiments, and therefore can also achieve corresponding beneficial technical effects, which have been described in detail above and will not be repeated here.
[0073] It should be noted that, in this article, 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 "include", "comprise" 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0074] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0075] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0076] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.
[0077] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0078] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A data sending node, characterized in that: Set in the on-chip network, the data sending node includes: A first monitoring module is configured to monitor the data sending status of the data sending node for target type data and the token release status of the data receiving node for the target type data, wherein the target type data includes one of write data and read response data; a data cache space is provided in the data receiving node, and the data cache space is used to cache the write data and / or read response data received from the data sending node, and the data cache space is greater than a first threshold and less than 2 times of the first threshold, and the first threshold is the number of data sent by the data sending node to the data receiving node when continuously sending data within a round-trip delay; a determination module, coupled to the first monitoring module, and configured to determine whether data congestion occurs at the data receiving node according to the data sending situation and the token release situation; The pause module is coupled to the determination module and is configured to pause sending the target type data to the data receiving node when the determination module determines that data congestion occurs at the data receiving node.
2. The data sending node according to claim 1, characterized in that: The first monitoring module includes a first counter and a second counter; The first counter is configured to, when the target type data is the write data: In response to the data sending node sending a piece of the target type data to the data receiving node, the first counter is incremented by 1 after the round trip delay; Alternatively, in response to the data sending node receiving a token released by the data receiving node for the target type of data, the first counter is reduced by 1; The second counter is configured to, when the target type data is the read response data: In response to the data sending node sending a piece of the target type data to the data receiving node, the second counter is incremented by 1 after the round trip delay; Alternatively, in response to the data sending node receiving a token released by the data receiving node for the target type data, the second counter is reduced by 1.
3. The data sending node according to claim 2, characterized in that: The round trip delay is achieved through a pipeline structure.
4. The data sending node according to claim 3, characterized in that: The number of pipeline stages of the pipeline structure is equal to one-N of the number of clock cycles corresponding to the round-trip delay, wherein the data sending node inputs a counting signal to the pipeline structure every M clock cycles, and after the counting signal is output from the last pipeline stage of the pipeline structure, the first counter is triggered to add 1 or the second counter is triggered to add 1, wherein M and N are both positive integers, and the product of M and N is equal to the number of clock cycles corresponding to the round-trip delay.
5. The data sending node according to claim 2, characterized in that: The determination module is configured to: When the count value of the first counter or the second counter is greater than or equal to a preset count threshold, determining that data congestion occurs at the data receiving node; or, When the count value of the first counter or the second counter is less than the preset count threshold, it is determined that no data congestion occurs at the data receiving node.
6. The data sending node according to any one of claims 1 to 5, characterized in that: Also includes: A second monitoring module is configured to monitor the amount of the write data that has been sent by the data sending node and has not been processed by the data receiving node, and the amount of the read response data that has been sent by the data sending node and has not been processed by the data receiving node, to obtain corresponding first and second amounts; The selection module is coupled to the determination module and the second monitoring module respectively, and is configured to select the write data or the read response data as the target type data and send it to the data receiving node based on the size relationship between the first quantity and the second quantity when the determination module determines that the data receiving node is not congested.
7. The data sending node according to claim 6, characterized in that: The second monitoring module includes: A third counter is configured to increase the third counter by 1 in response to the data sending node sending a write data to the data receiving node; or, in response to the data sending node receiving a token released by the data receiving node for the write data, decrease the third counter by 1; The fourth counter is configured to increase by 1 in response to the data sending node sending a read response data to the data receiving node; or, in response to the data sending node receiving a token released by the data receiving node for the read response data, the fourth counter is reduced by 1.
8. The data sending node according to any one of claims 1 to 5, characterized in that: The data cache space includes a first subspace, a second subspace, and a third subspace; The first subspace is used to cache the write data, the second subspace is used to cache the read response data, and the third subspace is used to cache the write data and / or the read response data; The first subspace, the second subspace, and the third subspace do not overlap with each other, the first subspace and the second subspace have the same number of cache units, and the sum of the number of cache units in the first subspace and the number of cache units in the third subspace is equal to the first threshold; the first subspace, the second subspace, and the third subspace correspond to different types of tokens, respectively, and the number of tokens of each type is equal to the number of cache units in the subspace corresponding to the token of that type; The data receiving node is configured to release a token corresponding to the subspace to the data sending node each time a data is taken from one of the subspaces for processing.
9. The data sending node according to any one of claims 1 to 5, characterized in that: It also includes a recovery module, which is coupled to the determination module and the pause module respectively, and is configured to resume sending the target type data to the data receiving node in response to the determination module determining that data congestion does not occur at the data receiving node when the pause module suspends sending the target type data to the data receiving node.
10. A data transmission method, characterized in that: Applied to a data sending node in an on-chip network, the method comprises: Monitor the data sending status of the target type data by the data sending node and the token release status of the target type data by the data receiving node, wherein the target type data includes one of write data and read response data; a data cache space is provided in the data receiving node, and the data cache space is used to cache the write data and / or read response data received from the data sending node, and the data cache space is greater than a first threshold and less than 2 times of the first threshold, and the first threshold is the number of data sent when the data sending node continuously sends data to the data receiving node within the round-trip delay; Determining whether data congestion occurs at the data receiving node according to the data sending situation and the token releasing situation; When it is determined that data congestion occurs at the data receiving node, sending the target type data to the data receiving node is suspended.
11. The data transmission method according to claim 10, characterized in that: The monitoring of the data sending status of the target type data by the data sending node and the token release status of the target type data by the data receiving node includes: In the case where the target type data is the write data, in response to the data sending node sending a target type data to the data receiving node, after the round trip delay, the first counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the first counter is decremented by 1; or, In the case where the target type data is the read response data, in response to the data sending node sending the target type data to the data receiving node, the second counter is increased by 1 after the round-trip delay; or, in response to the data sending node receiving a token released by the data receiving node for the target type data, the second counter is reduced by 1.
12. The data transmission method according to claim 11, characterized in that: The round trip delay is achieved through a pipeline structure.
13. The data transmission method according to claim 12, characterized in that: The number of pipeline stages of the pipeline structure is equal to one-N of the number of clock cycles corresponding to the round-trip delay, wherein the data sending node inputs a counting signal to the pipeline structure every M clock cycles, and after the counting signal is output from the last pipeline stage of the pipeline structure, the first counter or the second counter is triggered to add 1, wherein M and N are both positive integers, and the product of M and N is equal to the number of clock cycles corresponding to the round-trip delay.
14. The data transmission method according to claim 11, characterized in that: The determining, according to the data sending situation and the token releasing situation, whether data congestion occurs at the data receiving node comprises: When the count value of the first counter or the second counter is greater than or equal to a preset count threshold, determining that data congestion occurs at the data receiving node; or, When the count value of the first counter or the second counter is less than the preset count threshold, it is determined that no data congestion occurs at the data receiving node.
15. The data transmission method according to any one of claims 10 to 14, characterized in that: Also includes: Monitor the amount of the write data that has been sent by the data sending node and has not yet been processed by the data receiving node, and the amount of the read response data that has been sent by the data sending node and has not yet been processed by the data receiving node, to obtain corresponding first and second amounts; When it is determined that the data receiving node is not congested, the write data or the read response data is selected as the target type data according to the size relationship between the first quantity and the second quantity, and sent to the data receiving node.
16. The data transmission method according to claim 15, characterized in that: The monitoring of the amount of write data that has been sent by the data sending node and has not been processed by the data receiving node, and the amount of read response data that has been sent by the data sending node and has not been processed by the data receiving node includes: In response to the data sending node sending a write data to the data receiving node, the third counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the write data, the third counter is decremented by 1; or, In response to the data sending node sending a read response data to the data receiving node, the fourth counter is incremented by 1; or, in response to the data sending node receiving a token released by the data receiving node for the read response data, the fourth counter is decremented by 1.
17. The data transmission method according to any one of claims 10 to 14, characterized in that: The data cache space includes a first subspace, a second subspace, and a third subspace; The first subspace is used to cache the write data, the second subspace is used to cache the read response data, and the third subspace is used to cache the write data and / or the read response data; The first subspace, the second subspace, and the third subspace do not overlap with each other, the first subspace and the second subspace have the same number of cache units, and the sum of the number of cache units in the first subspace and the number of cache units in the third subspace is equal to the first threshold; the first subspace, the second subspace, and the third subspace correspond to different types of tokens, respectively, and the number of tokens of each type is equal to the number of cache units in the subspace corresponding to the token of that type; The data receiving node is configured to release a token corresponding to the subspace to the data sending node each time a data is taken from one of the subspaces for processing.
18. The data transmission method according to any one of claims 1 to 5, characterized in that: After pausing sending the target type data to the data receiving node, the method further includes: In response to the data sending node determining that data congestion does not occur at the data receiving node, the sending of the target type data to the data receiving node is resumed.
19. A network on chip, characterized in that: include: Data sending node, on-chip communication channel, data receiving node; The data sending node communicates with the data receiving node through the on-chip communication channel, wherein the data sending node is the data sending node according to any one of claims 1 to 9.
20. A chip, characterized in that: The chip comprises any one of the on-chip networks described in claim 19.
21. An electronic device, characterized in that: The electronic device includes a circuit board and a chip. The chip is arranged on the circuit board. The chip is any one of the chips described in claim 20.