WO2022110384A1 - Routing control method and apparatus, and routing device and storage medium - Google Patents

Routing control method and apparatus, and routing device and storage medium Download PDF

Info

Publication number
WO2022110384A1
WO2022110384A1 PCT/CN2020/137435 CN2020137435W WO2022110384A1 WO 2022110384 A1 WO2022110384 A1 WO 2022110384A1 CN 2020137435 W CN2020137435 W CN 2020137435W WO 2022110384 A1 WO2022110384 A1 WO 2022110384A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
routing
data
routing packet
output channel
Prior art date
Application number
PCT/CN2020/137435
Other languages
French (fr)
Chinese (zh)
Inventor
马骋
裴京
宋晨航
鲁明胜
Original Assignee
清华大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 清华大学 filed Critical 清华大学
Publication of WO2022110384A1 publication Critical patent/WO2022110384A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2458Modification of priorities while in transit
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the technical field of systems on a chip, and in particular, to a routing control method, apparatus, routing device and storage medium.
  • NoC Network on Chip
  • the network-on-chip can have various topologies.
  • the two-dimensional network (2-Dimension mesh, 2D Mesh) is a more commonly used structure, as shown in Figure 1, mainly has the advantages of simple structure, good scalability, easy implementation and analysis.
  • the routing device in the network-on-chip processes the multiple routing packets according to the receiving order of the multiple routing packets.
  • some routing packets may have strict requirements on delay, and some routing packets have lower requirements on delay.
  • a reasonable and effective routing control method has not been provided in the related art.
  • the technical solution includes:
  • a routing control method comprising:
  • the transmission request information of the second routing packet satisfies a preset interruption condition
  • the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first routing packet.
  • output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
  • the data of the second routing packet is transmitted through the first output channel.
  • receiving the transmission request information of the second routing packet includes:
  • a header packet of the second routing packet is received, and the header packet includes the priority and routing information of the second routing packet.
  • the routing information includes at least one of a routing packet type, a destination address, a first data packet sequence number, a starting storage address, a data packet address storage mode, and a check bit;
  • the routing packet type is used to indicate the type of the second routing packet
  • the destination address is the absolute address or relative address of the receiving end of the second routing packet
  • the first data packet sequence number is used to indicate The total number of data packets to be transmitted in the second routing packet
  • the starting storage address is the starting address of the data packets in the second routing packet stored in the memory of the receiving end
  • the data packet The address storage mode is used to indicate the storage mode of the data packet in the second routing packet in the memory of the receiving end
  • the check bit is used to indicate whether the data in the header packet is correct.
  • the transmitting the data of the second routing packet through the first output channel includes:
  • the data packet and the tail packet of the second routing packet are transmitted through the first output channel, the data packet includes the data of the second routing packet, and the tail packet is used to indicate the end of the second routing packet. transmission.
  • the tail packet includes the routing packet type and a second data packet sequence number, where the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the second routing packet number.
  • the method further includes:
  • interrupting the transmission of the first routing packet includes:
  • a pseudo-tail packet of the first routing packet is generated, and the sequence number of the second data packet in the pseudo-tail packet is the first data The difference between the packet sequence number and the number of transmitted data packets in the first routing packet;
  • a pseudo-tail packet of the first routing packet is sent, where the pseudo-tail packet is used to instruct to interrupt the transmission of the first routing packet.
  • the method when the transmission request information of the second routing packet satisfies the preset interruption condition, after generating the pseudo-tail packet of the first routing packet, the method further includes:
  • the pseudo-header packet of the first routing packet is cached.
  • the method further includes:
  • the untransmitted data in the first routing packet is continued to be transmitted according to the pseudo-header packet of the first routing packet.
  • the method is applied to a routing device of a network-on-chip, where the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
  • a routing control device comprising:
  • a receiving module configured to receive the transmission request information of the second routing packet in the process of transmitting the data of the first routing packet through the first output channel
  • a processing module configured to interrupt the transmission of the first routing packet when the transmission request information of the second routing packet satisfies a preset interruption condition, where the preset interruption condition includes an output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
  • a sending module configured to transmit the data of the second routing packet through the first output channel.
  • a routing device comprising: a processor; a memory for storing instructions executable by the processor;
  • processor is configured to:
  • the transmission request information of the second routing packet satisfies a preset interruption condition
  • the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first routing packet.
  • output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
  • the data of the second routing packet is transmitted through the first output channel.
  • a non-volatile computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above-described method when executed by a processor.
  • the embodiment of the present disclosure provides a routing control method, in the process of transmitting the data of the first routing packet through the first output channel, receiving the transmission request information of the second routing packet; when the transmission request information of the second routing packet satisfies the predetermined
  • the interruption condition is set, the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet;
  • An output channel transmits the data of the second routing packet; build a routing protocol with priority order to ensure that routing packets with higher priority can obtain lower routing delay, for example, when a group of routing packets is about to be delayed due to a busy path When blocked, if the priority of the routing packet is higher than that of the routing packet being transmitted on the output channel, the transmission of the routing packet with the lower priority will be interrupted, and the routing packet with the higher priority will be transmitted instead to ensure The rationality of routing control and routing transmission efficiency by the routing device of the network-on-chip
  • FIG. 1 shows a structural diagram of a two-dimensional network in the related art
  • FIG. 2 shows a schematic structural diagram of a routing device provided by an exemplary embodiment of the present disclosure
  • FIG. 3 shows a flowchart of a routing control method provided by an exemplary embodiment of the present disclosure
  • FIG. 4 shows a flowchart of a routing control method provided by another exemplary embodiment of the present disclosure
  • FIG. 5 shows a schematic diagram of the principles involved in the routing control method provided by an exemplary embodiment of the present disclosure
  • FIG. 6 shows a schematic structural diagram of a routing control apparatus provided by an exemplary embodiment of the present disclosure.
  • the routing device in the network-on-chip processes the multiple routing packets according to the receiving order of the multiple routing packets.
  • the current routing protocol does not differentiate the priority of routing packets, and all routing packets have the same priority.
  • some routing packets may have strict requirements on delay, and some routing packets have lower requirements on delay. Therefore, it is very necessary to establish an efficient routing protocol with priority order.
  • the embodiments of the present disclosure construct a routing protocol with a priority order to ensure that routing packets with higher priorities can obtain lower routing delays. For example, when a group of routing packets is about to be blocked due to a busy path, The priority of the packet is higher than that of the routing packet being transmitted on the output channel, the transmission of the routing packet with the lower priority is interrupted, and the routing packet with the higher priority starts to be transmitted, ensuring that the routing device of the on-chip network performs Rationality of routing control and routing transmission efficiency.
  • FIG. 2 shows a schematic structural diagram of a routing device provided by an exemplary embodiment of the present disclosure.
  • the routing device is a routing device in the network-on-chip, and the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
  • the network-on-chip includes a plurality of nodes, and each node includes a routing device. Depending on how the physical links are formed, the network-on-chip can have various topologies. The embodiments of the present disclosure only take that the topology structure of the network on chip is 2DMesh as an example for description.
  • a routing device also known as a router, is a hardware device that connects two or more networks, acts as a gateway between the networks, and is a dedicated intelligent network device that reads the address in each data packet and transmits it.
  • the routing device includes a processor 10 , a memory 20 and a communication interface 30 .
  • a processor 10 a processor 10
  • memory 20 a memory 20
  • communication interface 30 a communication interface
  • the processor 10 is the control center of the routing device, using various interfaces and lines to connect various parts of the entire routing device, by running or executing the software programs and/or modules stored in the memory 20, and calling the data stored in the memory 20. , perform various functions of the routing device and process data, so as to control the routing device as a whole.
  • the processor 10 may be implemented by a CPU, or may be implemented by a graphics processing unit (Graphics Processing Unit, GPU).
  • the memory 20 may be used to store software programs and modules.
  • the processor 10 executes various functional applications and data processing by executing software programs and modules stored in the memory 20 .
  • the memory 20 may mainly include a stored program area and a stored data area, wherein the stored program area may store the receiving module 21, the processing module 22, the sending module 23, etc.; the storage data area may store data created according to the use of the routing device, etc.
  • the memory 20 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable).
  • SRAM Static Random Access Memory
  • Electrically Erasable Programmable Read-Only Memory Electrically Erasable
  • memory 20 may also include a memory controller to provide processor 10 access to memory 20 .
  • the processor 20 performs the following functions by running the receiving module 21: in the process of transmitting the data of the first routing packet through the first output channel, receiving the transmission request information of the second routing packet; the processor 20 performs the following functions by running the processing module 22 The following function: when the transmission request information of the second routing packet satisfies a preset interruption condition, the transmission of the first routing packet is interrupted.
  • the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the second routing packet The priority of the first routing packet is greater than that of the first routing packet; the processor 20 executes the following function by running the sending module 23: transmitting the data of the second routing packet through the first output channel.
  • FIG. 3 shows a flowchart of a routing control method provided by an exemplary embodiment of the present disclosure. This embodiment is exemplified by using the method in the routing device shown in FIG. 2 . The method includes the following steps.
  • Step 301 in the process of transmitting the data of the first routing packet through the first output channel, receive transmission request information of the second routing packet.
  • the routing device After receiving the transmission request information of the first routing packet, the routing device transmits the data of the first routing packet through the first output channel, and receives the transmission request information of the second routing packet during the process of transmitting the first routing packet.
  • the routing device is a routing device of a network-on-chip, and the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
  • the transmission request information of the first routing packet is used to indicate the output channel requested by the first routing packet and the priority of the first routing packet.
  • the transmission request information of the second routing packet is used to indicate the output channel requested by the second routing packet and the priority of the second routing packet. Wherein, the second routing packet is different from the first routing packet.
  • Step 302 when the transmission request information of the second routing packet satisfies a preset interruption condition, interrupt the transmission of the first routing packet, and the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the second routing packet The priority is greater than the priority of the first routing packet.
  • the routing device determines whether the transmission request information of the second routing packet satisfies a preset interruption condition.
  • the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet. priority.
  • the transmission of the first routing packet is interrupted. If the transmission request information of the second routing packet does not meet the preset interruption condition, the transmission of the data of the first routing packet is maintained. Optionally, in the case of maintaining the transmission of the data of the first routing packet, the data of the second routing packet is cached.
  • Step 303 Transmit the data of the second routing packet through the first output channel.
  • the routing device After the routing device interrupts the transmission of the first routing packet, it starts to transmit the data of the second routing packet through the first output channel.
  • the embodiments of the present disclosure provide a routing control method, in the process of transmitting the data of the first routing packet through the first output channel, the transmission request information of the second routing packet is received; When the transmission request information meets a preset interruption condition, the transmission of the first routing packet is interrupted.
  • the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet.
  • Priority transmit the data of the second routing packet through the first output channel; build a routing protocol with priority order to ensure that routing packets with higher priorities can obtain lower routing delays, such as when a group of routing packets When the path is busy and is about to be blocked, if the priority of the routing packet is higher than that of the routing packet being transmitted on the output channel, the transmission of the routing packet with lower priority is interrupted, and the transmission of the routing packet with the higher priority is started instead.
  • the routing package ensures the rationality of routing control and routing transmission efficiency by the routing device of the network-on-chip.
  • packet header information including routing address information and data are generally packaged and sent, and the packet header information is included in each transmitted data packet, resulting in low routing transmission efficiency.
  • each data packet in the current routing transmission consists of a packet header and data.
  • the one-time routing process includes the transmission of header packets, data packets and tail packets, that is, a header packet is sent first, and the header packet includes routing address information; then a data packet is sent, and the data packet no longer includes routing address information. , that is, reducing the routing address information in the data packet; finally, a tail packet is transmitted, and the tail packet is used to indicate that all data packets in the routing process have been sent, and the data transmission of this routing is completed.
  • the header packet of each group of routing packets also needs to indicate the priority of the routing packet, so that routing packets of different priorities can be processed separately.
  • a complete routing process is a process of transmitting a group of routing packets, where the group of routing packets includes a header packet, a data packet and a tail packet, wherein the data packet is one or more data packets.
  • the header packet includes at least one of the priority of the routing packet, the type of the routing packet, the destination address, the sequence number of the first data packet, the starting storage address, the storage method of the data packet address, and the check bit. kind of information.
  • the information contained in the header packet is shown in Table 1.
  • P is the priority of the routing packet.
  • the priority of the routing packet is used to indicate the transmission order of the routing packet.
  • the priority is positively correlated with the transmission order, that is, the higher the priority, the higher the transmission order.
  • T is the routing packet type, for example, the routing packet type includes one of a data configuration packet, a common data packet, and a query packet. This embodiment of the present disclosure does not limit the way of dividing the routing packet types.
  • Dst is the destination address, that is, the absolute address or relative address of the receiving end of the routing packet.
  • the destination address is a multi-dimensional structure.
  • Rank is the sequence number of the first data packet, and is used to indicate the total number of data packets to be transmitted in the routing packet.
  • Addr is the starting storage address, that is, the starting address where the data packet in the routing packet is stored in the memory of the receiving end.
  • R is the storage mode of the data packet address, which is used to indicate the storage mode of the data packet in the routing packet in the memory of the receiver.
  • the data packet address storage method is used to indicate that each time a preset number of data packets are stored in the memory of the receiving end, the routing address is jumped to a preset amount and then continues to be stored.
  • the preset number is 5, that is, each time 5 data packets are received and stored, the routing address will continue to be stored after jumping a certain amount, and this information can retain flexibility for actual routing applications.
  • C is the check digit, which is used to indicate whether the data in the header packet is correct.
  • the check digit is a first value, it is used to indicate that the data in the header packet is correct, and when the check digit is a value other than the first value, it is used to indicate that the data in the header packet is incorrect.
  • the embodiment of the present disclosure does not limit the specific value of the first numerical value.
  • none of the multiple data packets in the routing packet includes routing address information.
  • Each data packet includes data and may also include check digits.
  • the information contained in the data packet is shown in Table 2.
  • Data is the data
  • C is the check digit, which is used to indicate whether the data in the data packet is correct.
  • the tail packet is used to indicate the end of the transmission of the routing packet.
  • the tail packet includes the routing packet type and the second data packet sequence number, and the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the routing packet, so as to facilitate the receiving end to perform data integrity verification.
  • a check digit may also be included in the tail packet to indicate whether the data in the tail packet is correct.
  • the check digit when the check digit is the second value, it is used to indicate that the data in the data packet is correct, and when the check digit is a value other than the second value, it is used to indicate that the data in the data packet is incorrect.
  • the specific value of the second numerical value is not limited in the embodiment of the present disclosure.
  • the information contained in the tail packet is shown in Table 3.
  • T is the routing packet type, and the routing packet types of the head packet and the tail packet in a group of routing packets are the same.
  • Rank is the second data packet sequence number, and is used to indicate the number of data packets that have not been transmitted in the routing packet.
  • sequence number of the second data packet is zero.
  • C is the check digit, which is used to indicate whether the data in the tail packet is correct.
  • the check digit is a third value, it is used to indicate that the data in the tail packet is correct, and when the check digit is a value other than the third value, it is used to indicate that the data in the tail packet is incorrect.
  • the embodiment of the present disclosure does not limit the specific value of the third numerical value.
  • the embodiments of the present disclosure also provide an efficient routing transmission method.
  • the protocol of header packet + data packet + tail packet the data packet no longer contains routing address information, and the routing address in the data packet is reduced. It also supports the above-mentioned routing protocols with priority order, and can also support the interruption and resumption of routing data transmission, which further ensures the effect of routing transmission.
  • a routing process should be sent by the sender in turn to send the header packet, data packet, and tail packet, and then end the data transmission of the group of routing packets.
  • the receiving end judges by checking whether the number of received data packets is equal to the difference between the sequence number of the first data packet in the header packet and the sequence number of the second data packet in the end packet.
  • the sending end is the abbreviation of the routing device at the sending end
  • the receiving end is the abbreviation of the routing device at the receiving end.
  • FIG. 4 shows a flowchart of a routing control method provided by another exemplary embodiment of the present disclosure.
  • the method is used in the routing device shown in FIG. 2 as an example for illustration. The method includes the following steps.
  • Step 401 in the process of transmitting the data of the first routing packet through the first output channel, receive a header packet of the second routing packet, where the header packet includes the priority and routing information of the second routing packet.
  • the routing device receives the header packet of the second routing packet.
  • the header packet includes the priority and routing information of the second routing packet.
  • the priority of the second routing packet is used to indicate the transmission order of the second routing packet.
  • the priority is positively correlated with the transmission order, that is, the higher the priority, the higher the transmission order.
  • the routing information includes at least one of a routing packet type, a destination address, a first data packet sequence number, a starting storage address, a data packet address storage mode, and a check bit.
  • the routing packet type is used to indicate the type of the second routing packet
  • the destination address is the absolute address or relative address of the receiving end of the second routing packet
  • the first data packet sequence number is used to indicate the total number of data packets to be transmitted in the second routing packet
  • the starting storage address is the starting address of the data packet in the second routing packet stored in the memory of the receiving end
  • the storage mode of the data packet address is used to indicate the storage mode of the data packet in the second routing packet in the memory of the receiving end
  • the check digit is used to indicate whether the data in the header packet is correct.
  • Step 402 when the transmission request information of the second routing packet satisfies the preset interruption condition, generate and send a pseudo-tail packet of the first routing packet, and the second data packet sequence number in the pseudo-tail packet is the first data packet sequence number and the first packet sequence number. The difference between the number of packets transmitted in the routing packet.
  • the routing device determines whether the transmission request information of the second routing packet satisfies a preset interruption condition.
  • the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet. priority.
  • a pseudo-tail packet of the first routing packet is generated and sent. If the transmission request information of the second routing packet does not meet the preset interruption condition, the transmission of the data of the first routing packet is maintained. Optionally, in the case of maintaining the transmission of the data of the first routing packet, the data of the second routing packet is cached.
  • the difference between the sequence number of the first data packet and the number of transmitted data packets in the first routing packet is determined as the second data in the pseudo-tail packet Packet sequence number, generate and send the pseudo-tail packet of the first routing packet.
  • the pseudo-tail packet of the first routing packet includes the routing packet type and the second data packet sequence number, the routing packet type in the pseudo-tail packet is the same as the routing packet type in the header packet, and the second data packet sequence number in the pseudo-tail packet is No. The difference between a data packet sequence number and the number of transmitted data packets in the first routing packet.
  • the pseudo-tail packet is used to indicate that the transmission of the first routing packet is interrupted.
  • the receiving end receives the pseudo-tail packet of the first routing packet, and determines to end the reception of the data of the first routing packet.
  • Step 403 Generate a pseudo-header packet of the first routing packet, cache the pseudo-header packet of the first routing packet, and the sequence number of the first data packet in the pseudo-header packet is the sequence number of the second data packet in the pseudo-tail packet.
  • the routing device After the routing device generates the pseudo-tail packet of the first routing packet, it generates a pseudo-head packet of the first routing packet, and the sequence number of the first data packet in the pseudo-head packet is the sequence number of the second data packet in the pseudo-tail packet, that is, the sequence number of the first data packet in the pseudo-head packet
  • the first data packet sequence number is the difference between the first data packet sequence number and the number of transmitted data packets in the first routing packet.
  • the routing device stores the generated pseudo-header packet at the head of the cache queue of the first routing packet, that is, the cached first routing packet includes the pseudo-header packet, the remaining untransmitted data packets and the tail packet.
  • the sequence number of the second data packet of the tail packet in the first routing packet is zero.
  • Step 404 transmit the data packet and the tail packet of the second routing packet through the first output channel, where the data packet includes data of the second routing packet, and the tail packet is used to indicate the end of the transmission of the second routing packet.
  • the routing device transmits the data packet and the tail packet of the second routing packet through the first output channel.
  • the data packet of the second routing packet includes data.
  • the data packet of the second routing packet may further include a check bit, where the check bit is used to indicate whether the data in the data packet of the second routing packet is correct.
  • the tail packet includes a routing packet type and a second data packet sequence number, and the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the second routing packet.
  • the routing device When the routing device receives the tail packet, the routing transmission process of the second routing packet is ended. After the routing device finishes transmitting the second routing packet, it determines whether there is packet loss in the second routing packet according to the relationship between the number of received data packets in the second routing packet and the sequence number difference, and the sequence number difference is The difference between the first data packet sequence number and the second data packet sequence number.
  • the sequence number difference provided to the routing device or the controller is the difference between the sequence number of the first data packet and the sequence number of the second data packet.
  • Step 405 After the data transmission of the second routing packet is completed, continue to transmit the data that has not been transmitted in the first routing packet according to the pseudo-header packet of the first routing packet.
  • the routing device continues to transmit the data that has not been transmitted in the first routing packet.
  • the routing device continues to transmit the untransmitted data packets and tail packets in the first routing packet according to the cached pseudo-header packet of the first routing packet.
  • the routing device of the intermediate node A is passing through the output channel E transmits the routing packet K1 with the priority of "1".
  • the routing device of the intermediate node A receives the header packet of the routing packet K2 input in the S direction, and finds that the routing packet K2 will apply for the output channel E and the routing packet K2 has the priority
  • the priority "2" is higher than the priority "1" of the routing packet K1. In this case, the transmission of the data of the low-priority routing packet K1 will be interrupted.
  • the routing device of the intermediate node A calculates the data transmitted by the routing packet K1.
  • the number of packets generate a pseudo-tail packet, and send it to end the data transmission of the routing packet K1 in advance.
  • a pseudo-header packet is regenerated for the routing packet K1 with a lower priority, and stored at the head of the cache queue of the routing packet K1, and then the routing packet with a higher priority is transmitted.
  • K2 data After the data transmission of the routing packet K2 with higher priority is completed, the routing process that was interrupted just now is continued, that is, the data of the remaining routing packet K1 that has not been transmitted is transmitted.
  • the embodiments of the present disclosure provide a routing control method.
  • the priority order of routing packets is added to ensure that routing packets with high priority pass through blocking nodes more preferentially.
  • a protocol for interrupting and resuming routing packets is proposed, which theoretically ensures that routing packets with high priority can interrupt routing packets with low priority.
  • a routing protocol of header packet + data packet + tail packet is proposed, which supports the above-mentioned routing protocols with priority order and the characteristics of interruption and resume transmission, which improves the efficiency of routing transmission.
  • FIG. 6 shows a schematic structural diagram of a routing control apparatus provided by an exemplary embodiment of the present disclosure.
  • the routing control device can be implemented as all or a part of the routing device through software, hardware, or a combination of the two.
  • the apparatus includes: a receiving module 610 , a processing module 620 and a sending module 630 .
  • the receiving module 610 is configured to receive the transmission request information of the second routing packet in the process of transmitting the data of the first routing packet through the first output channel;
  • the processing module 620 is configured to interrupt the transmission of the first routing packet when the transmission request information of the second routing packet satisfies a preset interruption condition, where the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the first The priority of the second routing packet is greater than the priority of the first routing packet;
  • the sending module 630 is configured to transmit the data of the second routing packet through the first output channel.
  • the receiving module 610 is further configured to:
  • a header packet of the second routing packet is received, and the header packet includes the priority and routing information of the second routing packet.
  • the routing information includes at least one of a routing packet type, a destination address, a first data packet sequence number, a starting storage address, a data packet address storage mode, and a check bit;
  • the routing packet type is used to indicate the type of the second routing packet
  • the destination address is the absolute address or relative address of the receiving end of the second routing packet
  • the first data packet sequence number is used to indicate the data packet to be transmitted in the second routing packet
  • the total number, the starting storage address is the starting address of the data packet in the second routing packet stored in the memory of the receiving end
  • the storage method of the data packet address is used to indicate the data packet in the second routing packet in the memory of the receiving end.
  • Storage mode the check digit is used to indicate whether the data in the header packet is correct.
  • the sending module 630 is further configured to:
  • the data packet and the tail packet of the second routing packet are transmitted through the first output channel, where the data packet includes data of the second routing packet, and the tail packet is used to indicate the end of the transmission of the second routing packet.
  • the tail packet includes a routing packet type and a second data packet sequence number, where the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the second routing packet.
  • processing module 620 is further configured to:
  • processing module 620 is further configured to:
  • a pseudo-tail packet of the first routing packet is generated, and the sequence number of the second data packet in the pseudo-tail packet is the sequence number of the first data packet and the transmitted data in the first routing packet. The difference between the number of packets;
  • a pseudo-tail packet of the first routing packet is sent, where the pseudo-tail packet is used to instruct to interrupt the transmission of the first routing packet.
  • processing module 620 is further configured to:
  • the pseudo-header packet of the first routing packet is cached.
  • the sending module 630 is further configured to:
  • the data that has not been transmitted in the first routing packet is continued to be transmitted according to the pseudo-header packet of the first routing packet.
  • the apparatus is applied to a routing device of a network-on-chip, where the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
  • An embodiment of the present disclosure further provides a routing device, and the user equipment includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to: implement the execution of the routing device in the foregoing method embodiments. step.
  • Embodiments of the present disclosure further provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, implement the methods in the foregoing method embodiments.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer readable program instructions.
  • Computer readable program instructions are executed to implement various aspects of the present disclosure.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

Abstract

The present disclosure relates to the technical field of systems-on-chip, and in particular to a routing control method and apparatus, and a routing device and a storage medium. The method comprises: during the process of transmitting data of a first routing packet by means of a first output channel, receiving transmission request information of a second routing packet; when the transmission request information of the second routing packet meets a preset interruption condition, interrupting the transmission of the first routing packet, wherein the preset interruption condition comprises an output channel requested by the second routing packet being the first output channel and the priority of the second routing packet being greater than the priority of the first routing packet; and transmitting data of the second routing packet by means of the first output channel. By means of the embodiments of the present disclosure, a routing protocol with a priority sequence is constructed, such that a routing packet with a relatively high priority can obtain a relatively low routing delay, thereby ensuring the rationality of a routing device of a network-on-chip performing routing control and the routing transmission efficiency.

Description

路由控制方法、装置、路由设备及存储介质Routing control method, device, routing device and storage medium 技术领域technical field
本公开涉及片上系统技术领域,尤其涉及一种路由控制方法、装置、路由设备及存储介质。The present disclosure relates to the technical field of systems on a chip, and in particular, to a routing control method, apparatus, routing device and storage medium.
背景技术Background technique
随着集成电路的发展,单个芯片上的计算单元不断增加,基于传统式总线的结构已经成为了芯片速度的瓶颈。因此借鉴计算机网络的思想,提出了片上网络(Network on Chip,NoC)的概念。对于多核系统,片上网络可以显著提高通信的性能。With the development of integrated circuits, the number of computing units on a single chip continues to increase, and the traditional bus-based structure has become the bottleneck of the chip speed. Therefore, drawing on the idea of computer network, the concept of Network on Chip (NoC) is proposed. For multi-core systems, network-on-chip can significantly improve the performance of communication.
根据物理链路的不同组成方式,片上网络可以有多种拓扑结构。在二维结构中,二维网络(2-Dimension mesh,2D Mesh)是一种较为常用的结构,如图1所示,主要有结构简单、可扩展性好、实现和分析较容易等优点。Depending on how the physical links are formed, the network-on-chip can have various topologies. In the two-dimensional structure, the two-dimensional network (2-Dimension mesh, 2D Mesh) is a more commonly used structure, as shown in Figure 1, mainly has the advantages of simple structure, good scalability, easy implementation and analysis.
相关技术中,片上网络中的路由设备按照多个路由包的接收顺序对多个路由包进行处理。然而实际使用中部分路由包可能对延时要求交严格,部分路由包则对延时要求较低。相关技术中尚未提供一种合理且有效的路由控制方法。In the related art, the routing device in the network-on-chip processes the multiple routing packets according to the receiving order of the multiple routing packets. However, in actual use, some routing packets may have strict requirements on delay, and some routing packets have lower requirements on delay. A reasonable and effective routing control method has not been provided in the related art.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本公开提出了一种路由控制方法、装置、路由设备及存储介质。所述技术方案包括:In view of this, the present disclosure proposes a routing control method, apparatus, routing device and storage medium. The technical solution includes:
根据本公开的一方面,提供了一种路由控制方法,所述方法包括:According to an aspect of the present disclosure, a routing control method is provided, the method comprising:
在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;In the process of transmitting the data of the first routing packet through the first output channel, receiving transmission request information of the second routing packet;
当所述第二路由包的传输请求信息满足预设中断条件时,中断所述第一路由包的传输,所述预设中断条件包括所述第二路由包请求的输出通道为所述第一输出通道且所述第二路由包的优先级大于所述第一路由包的优先级;When the transmission request information of the second routing packet satisfies a preset interruption condition, the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first routing packet. output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
通过所述第一输出通道传输所述第二路由包的数据。The data of the second routing packet is transmitted through the first output channel.
在一种可能的实现方式中,所述在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息,包括:In a possible implementation manner, in the process of transmitting data of the first routing packet through the first output channel, receiving the transmission request information of the second routing packet includes:
在通过所述第一输出通道传输所述第一路由包的数据的过程中,接收所述第二路由包的头包,所述头包包括所述第二路由包的优先级和路由信息。During the process of transmitting the data of the first routing packet through the first output channel, a header packet of the second routing packet is received, and the header packet includes the priority and routing information of the second routing packet.
在另一种可能的实现方式中,所述路由信息包括路由包类型、目的端地址、第一数据包序号、起始存储地址、数据包地址存储方式和校验位中的至少一种;In another possible implementation, the routing information includes at least one of a routing packet type, a destination address, a first data packet sequence number, a starting storage address, a data packet address storage mode, and a check bit;
其中,所述路由包类型用于指示所述第二路由包的类型,所述目的端地址为所述第二路由包的接收端的绝对地址或者相对地址,所述第一数据包序号用于指示所述第二路 由包中待传输的数据包总个数,所述起始存储地址为所述第二路由包中的数据包在所述接收端内存中存储的起始地址,所述数据包地址存储方式用于指示所述第二路由包中的数据包在所述接收端内存中的存储方式,所述校验位用于指示所述头包中的数据是否正确。The routing packet type is used to indicate the type of the second routing packet, the destination address is the absolute address or relative address of the receiving end of the second routing packet, and the first data packet sequence number is used to indicate The total number of data packets to be transmitted in the second routing packet, the starting storage address is the starting address of the data packets in the second routing packet stored in the memory of the receiving end, and the data packet The address storage mode is used to indicate the storage mode of the data packet in the second routing packet in the memory of the receiving end, and the check bit is used to indicate whether the data in the header packet is correct.
在另一种可能的实现方式中,所述通过所述第一输出通道传输所述第二路由包的数据,包括:In another possible implementation manner, the transmitting the data of the second routing packet through the first output channel includes:
通过所述第一输出通道传输所述第二路由包的数据包和尾包,所述数据包包括所述第二路由包的数据,所述尾包用于指示结束对所述第二路由包的传输。The data packet and the tail packet of the second routing packet are transmitted through the first output channel, the data packet includes the data of the second routing packet, and the tail packet is used to indicate the end of the second routing packet. transmission.
在另一种可能的实现方式中,所述尾包包括所述路由包类型和第二数据包序号,所述第二数据包序号用于指示所述第二路由包中尚未传输的数据包个数。In another possible implementation manner, the tail packet includes the routing packet type and a second data packet sequence number, where the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the second routing packet number.
在另一种可能的实现方式中,所述通过所述第一输出通道传输所述第二路由包的数据包和尾包之后,还包括:In another possible implementation manner, after the transmitting the data packet and the tail packet of the second routing packet through the first output channel, the method further includes:
根据接收到的所述第二路由包中的数据包的个数与序号差值的大小关系,确定所述第二路由包是否存在丢包情况,所述序号差值为所述第一数据包序号与所述第二数据包序号之间的差值。Determine whether there is packet loss in the second routing packet according to the relationship between the number of received data packets in the second routing packet and the sequence number difference, and the sequence number difference is the first data packet The difference between the sequence number and the sequence number of the second data packet.
在另一种可能的实现方式中,所述当所述第二路由包的传输请求信息满足预设中断条件时,中断所述第一路由包的传输,包括:In another possible implementation manner, when the transmission request information of the second routing packet satisfies a preset interruption condition, interrupting the transmission of the first routing packet includes:
当所述第二路由包的传输请求信息满足所述预设中断条件时,生成所述第一路由包的伪尾包,所述伪尾包中的第二数据包序号为所述第一数据包序号与所述第一路由包中已传输的数据包个数之间的差值;When the transmission request information of the second routing packet satisfies the preset interruption condition, a pseudo-tail packet of the first routing packet is generated, and the sequence number of the second data packet in the pseudo-tail packet is the first data The difference between the packet sequence number and the number of transmitted data packets in the first routing packet;
发送所述第一路由包的伪尾包,所述伪尾包用于指示中断对所述第一路由包的传输。A pseudo-tail packet of the first routing packet is sent, where the pseudo-tail packet is used to instruct to interrupt the transmission of the first routing packet.
在另一种可能的实现方式中,所述当所述第二路由包的传输请求信息满足所述预设中断条件时,生成所述第一路由包的伪尾包之后,还包括:In another possible implementation manner, when the transmission request information of the second routing packet satisfies the preset interruption condition, after generating the pseudo-tail packet of the first routing packet, the method further includes:
生成所述第一路由包的伪头包,所述伪头包中的第一数据包序号为所述伪尾包中的第二数据包序号;generating a pseudo-header packet of the first routing packet, where the first data packet sequence number in the pseudo-header packet is the second data packet sequence number in the pseudo-tail packet;
将所述第一路由包的所述伪头包进行缓存。The pseudo-header packet of the first routing packet is cached.
在另一种可能的实现方式中,所述方法还包括:In another possible implementation, the method further includes:
在所述第二路由包的数据传输结束后,根据所述第一路由包的所述伪头包,继续传输所述第一路由包中尚未传输的数据。After the data transmission of the second routing packet is completed, the untransmitted data in the first routing packet is continued to be transmitted according to the pseudo-header packet of the first routing packet.
在另一种可能的实现方式中,所述方法应用于片上网络的路由设备,所述路由设备为所述片上网络的任意一个节点中的路由设备,所述节点包括处理器核。In another possible implementation manner, the method is applied to a routing device of a network-on-chip, where the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
根据本公开的另一方面,提供了一种路由控制装置,所述路由控制装置包括:According to another aspect of the present disclosure, there is provided a routing control device, the routing control device comprising:
接收模块,用于在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;a receiving module, configured to receive the transmission request information of the second routing packet in the process of transmitting the data of the first routing packet through the first output channel;
处理模块,用于当所述第二路由包的传输请求信息满足预设中断条件时,中断所述 第一路由包的传输,所述预设中断条件包括所述第二路由包请求的输出通道为所述第一输出通道且所述第二路由包的优先级大于所述第一路由包的优先级;a processing module, configured to interrupt the transmission of the first routing packet when the transmission request information of the second routing packet satisfies a preset interruption condition, where the preset interruption condition includes an output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
发送模块,用于通过所述第一输出通道传输所述第二路由包的数据。A sending module, configured to transmit the data of the second routing packet through the first output channel.
根据本公开的另一方面,提供了一种路由设备,所述路由设备包括:处理器;用于存储处理器可执行指令的存储器;According to another aspect of the present disclosure, there is provided a routing device, the routing device comprising: a processor; a memory for storing instructions executable by the processor;
其中,所述处理器被配置为:wherein the processor is configured to:
在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;In the process of transmitting the data of the first routing packet through the first output channel, receiving transmission request information of the second routing packet;
当所述第二路由包的传输请求信息满足预设中断条件时,中断所述第一路由包的传输,所述预设中断条件包括所述第二路由包请求的输出通道为所述第一输出通道且所述第二路由包的优先级大于所述第一路由包的优先级;When the transmission request information of the second routing packet satisfies a preset interruption condition, the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first routing packet. output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
通过所述第一输出通道传输所述第二路由包的数据。The data of the second routing packet is transmitted through the first output channel.
根据本公开的另一方面,提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述的方法。According to another aspect of the present disclosure, there is provided a non-volatile computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above-described method when executed by a processor.
本公开实施例通过提供一种路由控制方法,在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;当第二路由包的传输请求信息满足预设中断条件时,中断第一路由包的传输,预设中断条件包括第二路由包请求的输出通道为第一输出通道且第二路由包的优先级大于第一路由包的优先级;通过第一输出通道传输第二路由包的数据;构建一种具有优先级顺序的路由协议,保证优先级较高的路由包可以获得较低的路由延时,比如当一组路由包因为路径繁忙而将要被阻塞时,如果该路由包的优先级比输出通道上正在传输的路由包的优先级高,则中断优先级较低的路由包的传输,转而开始传输该优先级高的路由包,保证了片上网络的路由设备进行路由控制的合理性和路由传输效率。The embodiment of the present disclosure provides a routing control method, in the process of transmitting the data of the first routing packet through the first output channel, receiving the transmission request information of the second routing packet; when the transmission request information of the second routing packet satisfies the predetermined When the interruption condition is set, the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet; An output channel transmits the data of the second routing packet; build a routing protocol with priority order to ensure that routing packets with higher priority can obtain lower routing delay, for example, when a group of routing packets is about to be delayed due to a busy path When blocked, if the priority of the routing packet is higher than that of the routing packet being transmitted on the output channel, the transmission of the routing packet with the lower priority will be interrupted, and the routing packet with the higher priority will be transmitted instead to ensure The rationality of routing control and routing transmission efficiency by the routing device of the network-on-chip are discussed.
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本公开的示例性实施例、特征和方面,并且用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure, and together with the description, serve to explain the principles of the disclosure.
图1示出了相关技术中的二维网络的结构图;1 shows a structural diagram of a two-dimensional network in the related art;
图2示出了本公开一个示例性实施例提供的路由设备的结构示意图;FIG. 2 shows a schematic structural diagram of a routing device provided by an exemplary embodiment of the present disclosure;
图3示出了本公开一个示例性实施例提供的路由控制方法的流程图;FIG. 3 shows a flowchart of a routing control method provided by an exemplary embodiment of the present disclosure;
图4示出了本公开另一个示例性实施例提供的路由控制方法的流程图;FIG. 4 shows a flowchart of a routing control method provided by another exemplary embodiment of the present disclosure;
图5示出了本公开一个示例性实施例提供的路由控制方法涉及的原理示意图;FIG. 5 shows a schematic diagram of the principles involved in the routing control method provided by an exemplary embodiment of the present disclosure;
图6示出了本公开一个示例性实施例提供的路由控制装置的结构示意图。FIG. 6 shows a schematic structural diagram of a routing control apparatus provided by an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
另外,为了更好的说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following detailed description. It will be understood by those skilled in the art that the present disclosure may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present disclosure.
相关技术中,片上网络中的路由设备按照多个路由包的接收顺序对多个路由包进行处理。目前的路由协议对路由包不做优先级上的区分,所有路由包优先级相同。然而实际使用中部分路由包可能对延时要求交严格,部分路由包则对延时要求较低。因此建立一种带有优先级顺序的高效路由协议就是非常必要的。In the related art, the routing device in the network-on-chip processes the multiple routing packets according to the receiving order of the multiple routing packets. The current routing protocol does not differentiate the priority of routing packets, and all routing packets have the same priority. However, in actual use, some routing packets may have strict requirements on delay, and some routing packets have lower requirements on delay. Therefore, it is very necessary to establish an efficient routing protocol with priority order.
本公开实施例构建一种具有优先级顺序的路由协议,保证优先级较高的路由包可以获得较低的路由延时,比如当一组路由包因为路径繁忙而将要被阻塞时,如果该路由包的优先级比输出通道上正在传输的路由包的优先级高,则中断优先级较低的路由包的传输,转而开始传输该优先级高的路由包,保证了片上网络的路由设备进行路由控制的合理性和路由传输效率。The embodiments of the present disclosure construct a routing protocol with a priority order to ensure that routing packets with higher priorities can obtain lower routing delays. For example, when a group of routing packets is about to be blocked due to a busy path, The priority of the packet is higher than that of the routing packet being transmitted on the output channel, the transmission of the routing packet with the lower priority is interrupted, and the routing packet with the higher priority starts to be transmitted, ensuring that the routing device of the on-chip network performs Rationality of routing control and routing transmission efficiency.
请参考图2,其示出了本公开一个示例性实施例提供的路由设备的结构示意图。Please refer to FIG. 2 , which shows a schematic structural diagram of a routing device provided by an exemplary embodiment of the present disclosure.
该路由设备为片上网络中的路由设备,路由设备为片上网络的任意一个节点中的路由设备,节点包括处理器核。The routing device is a routing device in the network-on-chip, and the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
其中,片上网络包括多个节点,每个节点中包括路由设备。根据物理链路的不同组成方式,片上网络可以有多种拓扑结构。本公开实施例仅以片上网络的拓扑结构为2DMesh为例进行说明。The network-on-chip includes a plurality of nodes, and each node includes a routing device. Depending on how the physical links are formed, the network-on-chip can have various topologies. The embodiments of the present disclosure only take that the topology structure of the network on chip is 2DMesh as an example for description.
路由设备也称为路由器,是连接两个或多个网络的硬件设备,在网络间起网关的作用,是读取每一个数据包中的地址并进行传送的专用智能性的网络设备。A routing device, also known as a router, is a hardware device that connects two or more networks, acts as a gateway between the networks, and is a dedicated intelligent network device that reads the address in each data packet and transmits it.
路由设备包括处理器10、存储器20以及通信接口30。本领域技术人员可以理解,图2中示出的结构并不构成对该路由设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:The routing device includes a processor 10 , a memory 20 and a communication interface 30 . Those skilled in the art can understand that the structure shown in FIG. 2 does not constitute a limitation on the routing device, and may include more or less components than the one shown, or combine some components, or arrange different components. in:
处理器10是路由设备的控制中心,利用各种接口和线路连接整个路由设备的各个部分,通过运行或执行存储在存储器20内的软件程序和/或模块,以及调用存储在存储器20内的数据,执行路由设备的各种功能和处理数据,从而对路由设备进行整体控制。处理 器10可以由CPU实现,也可以由图形处理器(Graphics Processing Unit,GPU)实现。The processor 10 is the control center of the routing device, using various interfaces and lines to connect various parts of the entire routing device, by running or executing the software programs and/or modules stored in the memory 20, and calling the data stored in the memory 20. , perform various functions of the routing device and process data, so as to control the routing device as a whole. The processor 10 may be implemented by a CPU, or may be implemented by a graphics processing unit (Graphics Processing Unit, GPU).
存储器20可用于存储软件程序以及模块。处理器10通过运行存储在存储器20的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器20可主要包括存储程序区和存储数据区,其中,存储程序区可存储接收模块21、处理模块22和发送模块23等;存储数据区可存储根据路由设备的使用所创建的数据等。存储器20可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM),可编程只读存储器(Programmable Read-Only Memory,PROM),只读存储器(Read Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。相应地,存储器20还可以包括存储器控制器,以提供处理器10对存储器20的访问。The memory 20 may be used to store software programs and modules. The processor 10 executes various functional applications and data processing by executing software programs and modules stored in the memory 20 . The memory 20 may mainly include a stored program area and a stored data area, wherein the stored program area may store the receiving module 21, the processing module 22, the sending module 23, etc.; the storage data area may store data created according to the use of the routing device, etc. The memory 20 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable). Programmable Read-Only Memory, EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read Only Memory (Read Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk. Accordingly, memory 20 may also include a memory controller to provide processor 10 access to memory 20 .
其中,处理器20通过运行接收模块21执行以下功能:在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;处理器20通过运行处理模块22执行以下功能:当第二路由包的传输请求信息满足预设中断条件时,中断第一路由包的传输,预设中断条件包括第二路由包请求的输出通道为第一输出通道且第二路由包的优先级大于第一路由包的优先级;处理器20通过运行发送模块23执行以下功能:通过第一输出通道传输第二路由包的数据。Wherein, the processor 20 performs the following functions by running the receiving module 21: in the process of transmitting the data of the first routing packet through the first output channel, receiving the transmission request information of the second routing packet; the processor 20 performs the following functions by running the processing module 22 The following function: when the transmission request information of the second routing packet satisfies a preset interruption condition, the transmission of the first routing packet is interrupted. The preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the second routing packet The priority of the first routing packet is greater than that of the first routing packet; the processor 20 executes the following function by running the sending module 23: transmitting the data of the second routing packet through the first output channel.
下面,采用几个示例性实施例对本公开实施例提供的图像处理方法的进行介绍。Hereinafter, the image processing methods provided by the embodiments of the present disclosure will be introduced by using several exemplary embodiments.
请参考图3,其示出了本公开一个示例性实施例提供的路由控制方法的流程图,本实施例以该方法用于图2所示的路由设备中来举例说明。该方法包括以下几个步骤。Please refer to FIG. 3 , which shows a flowchart of a routing control method provided by an exemplary embodiment of the present disclosure. This embodiment is exemplified by using the method in the routing device shown in FIG. 2 . The method includes the following steps.
步骤301,在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息。 Step 301, in the process of transmitting the data of the first routing packet through the first output channel, receive transmission request information of the second routing packet.
路由设备接收第一路由包的传输请求信息后,通过第一输出通道传输第一路由包的数据,在传输第一路由包的过程中,接收第二路由包的传输请求信息。After receiving the transmission request information of the first routing packet, the routing device transmits the data of the first routing packet through the first output channel, and receives the transmission request information of the second routing packet during the process of transmitting the first routing packet.
可选地,路由设备为片上网络的路由设备,路由设备为片上网络的任意一个节点中的路由设备,节点包括处理器核。Optionally, the routing device is a routing device of a network-on-chip, and the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
第一路由包的传输请求信息用于指示第一路由包请求的输出通道和第一路由包的优先级。第二路由包的传输请求信息用于指示第二路由包请求的输出通道和第二路由包的优先级。其中,第二路由包不同于第一路由包。The transmission request information of the first routing packet is used to indicate the output channel requested by the first routing packet and the priority of the first routing packet. The transmission request information of the second routing packet is used to indicate the output channel requested by the second routing packet and the priority of the second routing packet. Wherein, the second routing packet is different from the first routing packet.
步骤302,当第二路由包的传输请求信息满足预设中断条件时,中断第一路由包的传输,预设中断条件包括第二路由包请求的输出通道为第一输出通道且第二路由包的优先级大于第一路由包的优先级。 Step 302, when the transmission request information of the second routing packet satisfies a preset interruption condition, interrupt the transmission of the first routing packet, and the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the second routing packet The priority is greater than the priority of the first routing packet.
路由设备判断第二路由包的传输请求信息是否满足预设中断条件,预设中断条件包括第二路由包请求的输出通道为第一输出通道且第二路由包的优先级大于第一路由包的 优先级。The routing device determines whether the transmission request information of the second routing packet satisfies a preset interruption condition. The preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet. priority.
若第二路由包的传输请求信息满足预设中断条件,则中断第一路由包的传输。若第二路由包的传输请求信息不满足预设中断条件,则保持对第一路由包的数据的传输。可选地,在保持对第一路由包的数据的传输的情况下,将第二路由包的数据进行缓存。If the transmission request information of the second routing packet satisfies the preset interruption condition, the transmission of the first routing packet is interrupted. If the transmission request information of the second routing packet does not meet the preset interruption condition, the transmission of the data of the first routing packet is maintained. Optionally, in the case of maintaining the transmission of the data of the first routing packet, the data of the second routing packet is cached.
步骤303,通过第一输出通道传输第二路由包的数据。Step 303: Transmit the data of the second routing packet through the first output channel.
路由设备中断第一路由包的传输后,通过第一输出通道开始传输第二路由包的数据。After the routing device interrupts the transmission of the first routing packet, it starts to transmit the data of the second routing packet through the first output channel.
综上所述,本公开实施例通过提供一种路由控制方法,在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;当第二路由包的传输请求信息满足预设中断条件时,中断第一路由包的传输,预设中断条件包括第二路由包请求的输出通道为第一输出通道且第二路由包的优先级大于第一路由包的优先级;通过第一输出通道传输第二路由包的数据;构建一种具有优先级顺序的路由协议,保证优先级较高的路由包可以获得较低的路由延时,比如当一组路由包因为路径繁忙而将要被阻塞时,如果该路由包的优先级比输出通道上正在传输的路由包的优先级高,则中断优先级较低的路由包的传输,转而开始传输该优先级高的路由包,保证了片上网络的路由设备进行路由控制的合理性和路由传输效率。To sum up, the embodiments of the present disclosure provide a routing control method, in the process of transmitting the data of the first routing packet through the first output channel, the transmission request information of the second routing packet is received; When the transmission request information meets a preset interruption condition, the transmission of the first routing packet is interrupted. The preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet. Priority; transmit the data of the second routing packet through the first output channel; build a routing protocol with priority order to ensure that routing packets with higher priorities can obtain lower routing delays, such as when a group of routing packets When the path is busy and is about to be blocked, if the priority of the routing packet is higher than that of the routing packet being transmitted on the output channel, the transmission of the routing packet with lower priority is interrupted, and the transmission of the routing packet with the higher priority is started instead. The routing package ensures the rationality of routing control and routing transmission efficiency by the routing device of the network-on-chip.
相关技术中,一般是将包含路由地址信息的包头信息与数据进行打包后发送,每次发送的数据包中都包含包头信息,导致路由传输效率较低。In the related art, packet header information including routing address information and data are generally packaged and sent, and the packet header information is included in each transmitted data packet, resulting in low routing transmission efficiency.
即目前的路由传输中每个数据包都由包头和数据两部分组成,然而一般情况下,同一个路由器发出的数据包中大部分的路由信息都是一样的,因此可以将路由信息的传输减少到一次。本公开实施例提供的一次路由过程包括头包、数据包和尾包的传输,即先发送一个头包,该头包包括路由地址信息;然后发送数据包,数据包中不再包含路由地址信息,即减少数据包中的路由地址信息;最后传输一个尾包,尾包用于指示该路由过程的所有数据包已经发送完成,完成本次路由的数据传输。That is, each data packet in the current routing transmission consists of a packet header and data. However, in general, most of the routing information in the data packet sent by the same router is the same, so the transmission of routing information can be reduced. to once. The one-time routing process provided by the embodiments of the present disclosure includes the transmission of header packets, data packets and tail packets, that is, a header packet is sent first, and the header packet includes routing address information; then a data packet is sent, and the data packet no longer includes routing address information. , that is, reducing the routing address information in the data packet; finally, a tail packet is transmitted, and the tail packet is used to indicate that all data packets in the routing process have been sent, and the data transmission of this routing is completed.
每组路由包的头包中还需要标明该路由包的优先级,以便对不同优先级的路由包分别处理。The header packet of each group of routing packets also needs to indicate the priority of the routing packet, so that routing packets of different priorities can be processed separately.
一个完整的路由过程为传输一组路由包的过程,该组路由包包含头包、数据包和尾包,其中数据包为一个或者多个数据包。A complete routing process is a process of transmitting a group of routing packets, where the group of routing packets includes a header packet, a data packet and a tail packet, wherein the data packet is one or more data packets.
在一种可能的实现方式中,头包包括路由包的优先级、路由包类型、目的端地址、第一数据包序号、起始存储地址、数据包地址存储方式和校验位中的至少一种信息。In a possible implementation manner, the header packet includes at least one of the priority of the routing packet, the type of the routing packet, the destination address, the sequence number of the first data packet, the starting storage address, the storage method of the data packet address, and the check bit. kind of information.
示意性的,头包所包含的信息如表一所示。Illustratively, the information contained in the header packet is shown in Table 1.
表一Table I
PP TT DstDst RankRank AddrAddr RR CC
其中,P为路由包的优先级。路由包的优先级用于指示该路由包的传输顺序。优先级与传输顺序呈正相关关系,即优先级越高,传输顺序也靠前。Among them, P is the priority of the routing packet. The priority of the routing packet is used to indicate the transmission order of the routing packet. The priority is positively correlated with the transmission order, that is, the higher the priority, the higher the transmission order.
T为路由包类型,比如,路由包类型包括数据配置包、普通数据包、查询包中的一种。本公开实施例对路由包类型的划分方式不加以限定。T is the routing packet type, for example, the routing packet type includes one of a data configuration packet, a common data packet, and a query packet. This embodiment of the present disclosure does not limit the way of dividing the routing packet types.
Dst为目的端地址,即为该路由包的接收端的绝对地址或者相对地址。针对多维结构,比如包含一个芯片阵列,每个芯片又包含若干个核的阵列,则目的端地址为多维结构。Dst is the destination address, that is, the absolute address or relative address of the receiving end of the routing packet. For a multi-dimensional structure, such as an array that includes a chip array, and each chip includes an array of several cores, the destination address is a multi-dimensional structure.
Rank为第一数据包序号,用于指示路由包中待传输的数据包总个数。Rank is the sequence number of the first data packet, and is used to indicate the total number of data packets to be transmitted in the routing packet.
Addr为起始存储地址,即为路由包中的数据包在接收端内存中存储的起始地址。Addr is the starting storage address, that is, the starting address where the data packet in the routing packet is stored in the memory of the receiving end.
R为数据包地址存储方式,用于指示路由包中的数据包在接收端内存中的存储方式。通常一个路由过程中不同数据包在接收端内存中按地址连续存储,但也可能有一定规律。示意性的,数据包地址存储方式用于指示在接收端内存中每存储预设数量的数据包,将路由地址跳转预设量后继续存储。比如,预设数量为5,即每接收并存储5个数据包,路由地址跳转一定量后继续存储,该信息可为实际的路由应用保留灵活性。R is the storage mode of the data packet address, which is used to indicate the storage mode of the data packet in the routing packet in the memory of the receiver. Usually, in a routing process, different data packets are continuously stored in the memory of the receiving end by address, but there may be certain rules. Illustratively, the data packet address storage method is used to indicate that each time a preset number of data packets are stored in the memory of the receiving end, the routing address is jumped to a preset amount and then continues to be stored. For example, the preset number is 5, that is, each time 5 data packets are received and stored, the routing address will continue to be stored after jumping a certain amount, and this information can retain flexibility for actual routing applications.
C为校验位,用于指示头包中的数据是否正确。可选地,校验位为第一数值时用于指示头包中的数据正确,校验位为除第一数值外的其他数值时用于指示头包中的数据错误。本公开实施例对第一数值的具体取值不加以限定。C is the check digit, which is used to indicate whether the data in the header packet is correct. Optionally, when the check digit is a first value, it is used to indicate that the data in the header packet is correct, and when the check digit is a value other than the first value, it is used to indicate that the data in the header packet is incorrect. The embodiment of the present disclosure does not limit the specific value of the first numerical value.
在一种可能的实现方式中,路由包中的多个数据包均不包含路由地址信息。每个数据包包括数据,还可以包括校验位。In a possible implementation manner, none of the multiple data packets in the routing packet includes routing address information. Each data packet includes data and may also include check digits.
示意性的,数据包所包含的信息如表二所示。Illustratively, the information contained in the data packet is shown in Table 2.
表二Table II
DataData CC
其中,Data为数据,C为校验位,用于指示数据包中的数据是否正确。Among them, Data is the data, and C is the check digit, which is used to indicate whether the data in the data packet is correct.
在一种可能的实现方式中,尾包用于指示结束对路由包的传输。尾包中包括路由包类型和第二数据包序号,第二数据包序号用于指示路由包中尚未传输的数据包个数,方便接收端进行数据完整性校验。尾包中还可以包括校验位,用于指示尾包中的数据是否正确。In a possible implementation manner, the tail packet is used to indicate the end of the transmission of the routing packet. The tail packet includes the routing packet type and the second data packet sequence number, and the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the routing packet, so as to facilitate the receiving end to perform data integrity verification. A check digit may also be included in the tail packet to indicate whether the data in the tail packet is correct.
可选地,校验位为第二数值时用于指示数据包中的数据正确,校验位为除第二数值外的其他数值时用于指示数据包中的数据错误。本公开实施例对第二数值的具体取值不加以限定。Optionally, when the check digit is the second value, it is used to indicate that the data in the data packet is correct, and when the check digit is a value other than the second value, it is used to indicate that the data in the data packet is incorrect. The specific value of the second numerical value is not limited in the embodiment of the present disclosure.
示意性的,尾包所包含的信息如表三所示。Illustratively, the information contained in the tail packet is shown in Table 3.
表三Table 3
TT RankRank CC
其中,T为路由包类型,一组路由包中的头包和尾包的路由包类型是相同的。Among them, T is the routing packet type, and the routing packet types of the head packet and the tail packet in a group of routing packets are the same.
Rank为第二数据包序号,用于指示路由包中尚未传输的数据包个数。一般情况下第二数据包序号为零。Rank is the second data packet sequence number, and is used to indicate the number of data packets that have not been transmitted in the routing packet. In general, the sequence number of the second data packet is zero.
C为校验位,用于指尾包中的数据是否正确。可选地,校验位为第三数值时用于指示尾包中的数据正确,校验位为除第三数值外的其他数值时用于指示尾包中的数据错误。 本公开实施例对第三数值的具体取值不加以限定。C is the check digit, which is used to indicate whether the data in the tail packet is correct. Optionally, when the check digit is a third value, it is used to indicate that the data in the tail packet is correct, and when the check digit is a value other than the third value, it is used to indicate that the data in the tail packet is incorrect. The embodiment of the present disclosure does not limit the specific value of the third numerical value.
综上所述,本公开实施例还提供了一种高效路由传输方法,通过头包+数据包+尾包的协议,使得数据包中不再包含路由地址信息,减少了数据包中的路由地址信息,提高传递提高效率;同时支持上述具有优先级顺序的路由协议,还可以支持路由数据传输的中断和续传,进一步保证了路由传输效果。To sum up, the embodiments of the present disclosure also provide an efficient routing transmission method. Through the protocol of header packet + data packet + tail packet, the data packet no longer contains routing address information, and the routing address in the data packet is reduced. It also supports the above-mentioned routing protocols with priority order, and can also support the interruption and resumption of routing data transmission, which further ensures the effect of routing transmission.
即基于上述的头包+数据包+尾包的路由协议,在一般情况下,一个路由过程应该是由发送端依次发送头包、数据包、尾包,然后结束该组路由包的数据传输,接收端通过校验接收到的数据包的个数是否等于头包中的第一数据包序号与尾包中的第二数据包序号的差值来判断。That is, based on the above-mentioned routing protocol of header packet + data packet + tail packet, in general, a routing process should be sent by the sender in turn to send the header packet, data packet, and tail packet, and then end the data transmission of the group of routing packets. The receiving end judges by checking whether the number of received data packets is equal to the difference between the sequence number of the first data packet in the header packet and the sequence number of the second data packet in the end packet.
需要说明的是,本公开实施例中的发送端为发送端路由设备的简称,接收端为接收端路由设备的简称。It should be noted that, in the embodiments of the present disclosure, the sending end is the abbreviation of the routing device at the sending end, and the receiving end is the abbreviation of the routing device at the receiving end.
但是当出现优先级高的路由打断优先级低的路由的情况,需要特殊处理。请参考图4,其示出了本公开另一个示例性实施例提供的路由控制方法的流程图,本实施例以该方法用于图2所示的路由设备中来举例说明。该方法包括以下几个步骤。However, when a route with a higher priority interrupts a route with a lower priority, special handling is required. Please refer to FIG. 4 , which shows a flowchart of a routing control method provided by another exemplary embodiment of the present disclosure. In this embodiment, the method is used in the routing device shown in FIG. 2 as an example for illustration. The method includes the following steps.
步骤401,在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的头包,头包包括第二路由包的优先级和路由信息。 Step 401, in the process of transmitting the data of the first routing packet through the first output channel, receive a header packet of the second routing packet, where the header packet includes the priority and routing information of the second routing packet.
在路由设备通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的头包。During the process of transmitting the data of the first routing packet through the first output channel, the routing device receives the header packet of the second routing packet.
其中,头包包括第二路由包的优先级和路由信息。第二路由包的优先级用于指示第二路由包的传输顺序。优先级与传输顺序呈正相关关系,即优先级越高,传输顺序也靠前。The header packet includes the priority and routing information of the second routing packet. The priority of the second routing packet is used to indicate the transmission order of the second routing packet. The priority is positively correlated with the transmission order, that is, the higher the priority, the higher the transmission order.
可选地,路由信息包括路由包类型、目的端地址、第一数据包序号、起始存储地址、数据包地址存储方式和校验位中的至少一种。路由包类型用于指示第二路由包的类型,目的端地址为第二路由包的接收端的绝对地址或者相对地址,第一数据包序号用于指示第二路由包中待传输的数据包总个数,起始存储地址为第二路由包中的数据包在接收端内存中存储的起始地址,数据包地址存储方式用于指示第二路由包中的数据包在接收端内存中的存储方式,校验位用于指示头包中的数据是否正确。Optionally, the routing information includes at least one of a routing packet type, a destination address, a first data packet sequence number, a starting storage address, a data packet address storage mode, and a check bit. The routing packet type is used to indicate the type of the second routing packet, the destination address is the absolute address or relative address of the receiving end of the second routing packet, and the first data packet sequence number is used to indicate the total number of data packets to be transmitted in the second routing packet The starting storage address is the starting address of the data packet in the second routing packet stored in the memory of the receiving end, and the storage mode of the data packet address is used to indicate the storage mode of the data packet in the second routing packet in the memory of the receiving end , the check digit is used to indicate whether the data in the header packet is correct.
需要说明的是,第二路由包的头包的相关描述可类比参考上述实施例中对头包进行介绍的相关细节,在此不再赘述。It should be noted that, for the related description of the header packet of the second routing packet, reference may be made to the relevant details of the header packet introduced in the foregoing embodiment, and details are not repeated here.
步骤402,当第二路由包的传输请求信息满足预设中断条件时,生成并发送第一路由包的伪尾包,伪尾包中的第二数据包序号为第一数据包序号与第一路由包中已传输的数据包个数之间的差值。 Step 402, when the transmission request information of the second routing packet satisfies the preset interruption condition, generate and send a pseudo-tail packet of the first routing packet, and the second data packet sequence number in the pseudo-tail packet is the first data packet sequence number and the first packet sequence number. The difference between the number of packets transmitted in the routing packet.
路由设备判断第二路由包的传输请求信息是否满足预设中断条件,预设中断条件包括第二路由包请求的输出通道为第一输出通道且第二路由包的优先级大于第一路由包的优先级。The routing device determines whether the transmission request information of the second routing packet satisfies a preset interruption condition. The preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than that of the first routing packet. priority.
若第二路由包的传输请求信息满足预设中断条件,则生成并发送第一路由包的伪尾包。若第二路由包的传输请求信息不满足预设中断条件,则保持对第一路由包的数据的传输。可选地,在保持对第一路由包的数据的传输的情况下,将第二路由包的数据进行缓存。If the transmission request information of the second routing packet satisfies the preset interruption condition, a pseudo-tail packet of the first routing packet is generated and sent. If the transmission request information of the second routing packet does not meet the preset interruption condition, the transmission of the data of the first routing packet is maintained. Optionally, in the case of maintaining the transmission of the data of the first routing packet, the data of the second routing packet is cached.
当第二路由包的传输请求信息满足预设中断条件时,将第一数据包序号与第一路由包中已传输的数据包个数之间的差值确定为伪尾包中的第二数据包序号,生成并发送第一路由包的伪尾包。When the transmission request information of the second routing packet satisfies the preset interruption condition, the difference between the sequence number of the first data packet and the number of transmitted data packets in the first routing packet is determined as the second data in the pseudo-tail packet Packet sequence number, generate and send the pseudo-tail packet of the first routing packet.
第一路由包的伪尾包中包括路由包类型和第二数据包序号,伪尾包中的路由包类型与头包中的路由包类型相同,伪尾包中的第二数据包序号为第一数据包序号与第一路由包中已传输的数据包个数之间的差值。伪尾包用于指示中断对第一路由包的传输。The pseudo-tail packet of the first routing packet includes the routing packet type and the second data packet sequence number, the routing packet type in the pseudo-tail packet is the same as the routing packet type in the header packet, and the second data packet sequence number in the pseudo-tail packet is No. The difference between a data packet sequence number and the number of transmitted data packets in the first routing packet. The pseudo-tail packet is used to indicate that the transmission of the first routing packet is interrupted.
对应的,接收端接收到第一路由包的伪尾包,确定结束对第一路由包的数据的接收。Correspondingly, the receiving end receives the pseudo-tail packet of the first routing packet, and determines to end the reception of the data of the first routing packet.
步骤403,生成第一路由包的伪头包,并将第一路由包的伪头包进行缓存,伪头包中的第一数据包序号为伪尾包中的第二数据包序号。Step 403: Generate a pseudo-header packet of the first routing packet, cache the pseudo-header packet of the first routing packet, and the sequence number of the first data packet in the pseudo-header packet is the sequence number of the second data packet in the pseudo-tail packet.
路由设备生成第一路由包的伪尾包后,生成第一路由包的伪头包,伪头包中的第一数据包序号为伪尾包中的第二数据包序号,即伪头包中的第一数据包序号为第一数据包序号与第一路由包中已传输的数据包个数之间的差值。After the routing device generates the pseudo-tail packet of the first routing packet, it generates a pseudo-head packet of the first routing packet, and the sequence number of the first data packet in the pseudo-head packet is the sequence number of the second data packet in the pseudo-tail packet, that is, the sequence number of the first data packet in the pseudo-head packet The first data packet sequence number is the difference between the first data packet sequence number and the number of transmitted data packets in the first routing packet.
路由设备将生成的伪头包存放在该第一路由包的缓存队列首,即缓存的第一路由包包括伪头包、剩余的尚未传输的数据包和尾包。其中,第一路由包中的尾包的第二数据包序号为零。The routing device stores the generated pseudo-header packet at the head of the cache queue of the first routing packet, that is, the cached first routing packet includes the pseudo-header packet, the remaining untransmitted data packets and the tail packet. The sequence number of the second data packet of the tail packet in the first routing packet is zero.
步骤404,通过第一输出通道传输第二路由包的数据包和尾包,数据包包括第二路由包的数据,尾包用于指示结束对第二路由包的传输。 Step 404 , transmit the data packet and the tail packet of the second routing packet through the first output channel, where the data packet includes data of the second routing packet, and the tail packet is used to indicate the end of the transmission of the second routing packet.
路由设备通过第一输出通道传输第二路由包的数据包和尾包。The routing device transmits the data packet and the tail packet of the second routing packet through the first output channel.
其中,第二路由包的数据包包括数据。第二路由包的数据包还可以包括校验位,该校验位用于指示第二路由包的数据包中的数据是否正确。Wherein, the data packet of the second routing packet includes data. The data packet of the second routing packet may further include a check bit, where the check bit is used to indicate whether the data in the data packet of the second routing packet is correct.
其中,尾包包括路由包类型和第二数据包序号,第二数据包序号用于指示第二路由包中尚未传输的数据包个数。The tail packet includes a routing packet type and a second data packet sequence number, and the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the second routing packet.
需要说明的是,第二路由包的数据包和尾包的相关描述可类比参考上述实施例中对数据包和尾包进行介绍的相关细节,在此不再赘述。It should be noted that, for the related description of the data packet and the tail packet of the second routing packet, reference may be made to the relevant details of the data packet and the tail packet in the foregoing embodiment, and details are not repeated here.
当路由设备接收到尾包时,结束第二路由包的路由传输过程。路由设备结束对第二路由包的传输后,根据接收到的第二路由包中的数据包的个数与序号差值的大小关系,确定第二路由包是否存在丢包情况,序号差值为第一数据包序号与第二数据包序号之间的差值。When the routing device receives the tail packet, the routing transmission process of the second routing packet is ended. After the routing device finishes transmitting the second routing packet, it determines whether there is packet loss in the second routing packet according to the relationship between the number of received data packets in the second routing packet and the sequence number difference, and the sequence number difference is The difference between the first data packet sequence number and the second data packet sequence number.
即若接收到的第二路由包中的数据包的个数等于序号差值,表示第二路由包不存在丢包情况;若接收到的第二路由包中的数据包的个数不等于序号差值时,表示第二路由包存在丢包情况,则产生可供控制器处理的错误信号。其中,提供给路由设备或控制器 的序号差值为第一数据包序号与第二数据包序号之间的差值。That is, if the number of received data packets in the second routing packet is equal to the sequence number difference, it means that there is no packet loss in the second routing packet; if the number of received data packets in the second routing packet is not equal to the sequence number When the difference is the value, it indicates that there is a packet loss situation in the second routing packet, and an error signal that can be processed by the controller is generated. Wherein, the sequence number difference provided to the routing device or the controller is the difference between the sequence number of the first data packet and the sequence number of the second data packet.
步骤405,在第二路由包的数据传输结束后,根据第一路由包的伪头包,继续传输第一路由包中尚未传输的数据。Step 405: After the data transmission of the second routing packet is completed, continue to transmit the data that has not been transmitted in the first routing packet according to the pseudo-header packet of the first routing packet.
在第二路由包的数据传输结束后,路由设备继续传输第一路由包中尚未传输的数据。After the data transmission of the second routing packet ends, the routing device continues to transmit the data that has not been transmitted in the first routing packet.
在第二路由包的数据传输结束后,路由设备根据缓存的第一路由包的伪头包,继续传输第一路由包中尚未传输的数据包和尾包。After the data transmission of the second routing packet ends, the routing device continues to transmit the untransmitted data packets and tail packets in the first routing packet according to the cached pseudo-header packet of the first routing packet.
在一个示意性的例子中,假如在路由路径的中间节点A出现了高优先级路由包将要打断低优先级路由包的情况,如图5所示,中间节点A的路由设备正在通过输出通道E传输优先级为“1”的路由包K1,某一时刻中间节点A的路由设备收到了S方向输入的路由包K2的头包,发现路由包K2将要申请输出通道E且路由包K2的优先级“2”高于路由包K1的优先级“1”,这种情况下将中断低优先级的路由包K1的数据的传输,中间节点A的路由设备根据统计的路由包K1已经传输的数据包个数,生成一个伪尾包,并发送,提前结束该路由包K1的数据传输。同时根据之前保存的路由包K1的头包,重新为该优先级较低的路由包K1生成一个伪头包,并存放在路由包K1的缓存队列首,然后开始传输优先级较高的路由包K2的数据。当优先级较高的路由包K2的数据传输结束后,继续刚才被中断的路由过程,即对剩余的尚未传输的路由包K1的数据进行传输。In a schematic example, if there is a situation in the intermediate node A of the routing path that a high-priority routing packet will interrupt the low-priority routing packet, as shown in Figure 5, the routing device of the intermediate node A is passing through the output channel E transmits the routing packet K1 with the priority of "1". At a certain moment, the routing device of the intermediate node A receives the header packet of the routing packet K2 input in the S direction, and finds that the routing packet K2 will apply for the output channel E and the routing packet K2 has the priority The priority "2" is higher than the priority "1" of the routing packet K1. In this case, the transmission of the data of the low-priority routing packet K1 will be interrupted. The routing device of the intermediate node A calculates the data transmitted by the routing packet K1. The number of packets, generate a pseudo-tail packet, and send it to end the data transmission of the routing packet K1 in advance. At the same time, according to the header packet of the routing packet K1 saved before, a pseudo-header packet is regenerated for the routing packet K1 with a lower priority, and stored at the head of the cache queue of the routing packet K1, and then the routing packet with a higher priority is transmitted. K2 data. After the data transmission of the routing packet K2 with higher priority is completed, the routing process that was interrupted just now is continued, that is, the data of the remaining routing packet K1 that has not been transmitted is transmitted.
综上所述,本公开实施例提供了一种路由控制方法,在一方面,添加了路由包的优先级顺序,保证高优先级的路由包更优先通过阻塞节点。在另一方面,提出了路由包中断和续传的协议,理论上保证高优先级的路由包可以打断低优先级的路由包。在另一方面,提出头包+数据包+尾包的路由协议,支持上述具有优先级顺序的路由协议和中断、续传的特点,提高了路由传输的效率。To sum up, the embodiments of the present disclosure provide a routing control method. On the one hand, the priority order of routing packets is added to ensure that routing packets with high priority pass through blocking nodes more preferentially. On the other hand, a protocol for interrupting and resuming routing packets is proposed, which theoretically ensures that routing packets with high priority can interrupt routing packets with low priority. On the other hand, a routing protocol of header packet + data packet + tail packet is proposed, which supports the above-mentioned routing protocols with priority order and the characteristics of interruption and resume transmission, which improves the efficiency of routing transmission.
以下为本公开实施例的装置实施例,对于装置实施例中未详细阐述的部分,可以参考上述方法实施例中公开的技术细节。The following apparatus embodiments are the embodiments of the present disclosure. For the parts that are not described in detail in the apparatus embodiments, reference may be made to the technical details disclosed in the foregoing method embodiments.
请参考图6,其示出了本公开一个示例性实施例提供的路由控制装置的结构示意图。该路由控制装置可以通过软件、硬件以及两者的组合实现成为路由设备的全部或一部分。该装置包括:接收模块610、处理模块620和发送模块630。Please refer to FIG. 6 , which shows a schematic structural diagram of a routing control apparatus provided by an exemplary embodiment of the present disclosure. The routing control device can be implemented as all or a part of the routing device through software, hardware, or a combination of the two. The apparatus includes: a receiving module 610 , a processing module 620 and a sending module 630 .
接收模块610,用于在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;The receiving module 610 is configured to receive the transmission request information of the second routing packet in the process of transmitting the data of the first routing packet through the first output channel;
处理模块620,用于当第二路由包的传输请求信息满足预设中断条件时,中断第一路由包的传输,预设中断条件包括第二路由包请求的输出通道为第一输出通道且第二路由包的优先级大于第一路由包的优先级;The processing module 620 is configured to interrupt the transmission of the first routing packet when the transmission request information of the second routing packet satisfies a preset interruption condition, where the preset interruption condition includes that the output channel requested by the second routing packet is the first output channel and the first The priority of the second routing packet is greater than the priority of the first routing packet;
发送模块630,用于通过第一输出通道传输第二路由包的数据。The sending module 630 is configured to transmit the data of the second routing packet through the first output channel.
在一种可能的实现方式中,接收模块610,还用于:In a possible implementation manner, the receiving module 610 is further configured to:
在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的头包,头包包括第二路由包的优先级和路由信息。In the process of transmitting the data of the first routing packet through the first output channel, a header packet of the second routing packet is received, and the header packet includes the priority and routing information of the second routing packet.
在另一种可能的实现方式中,路由信息包括路由包类型、目的端地址、第一数据包序号、起始存储地址、数据包地址存储方式和校验位中的至少一种;In another possible implementation, the routing information includes at least one of a routing packet type, a destination address, a first data packet sequence number, a starting storage address, a data packet address storage mode, and a check bit;
其中,路由包类型用于指示第二路由包的类型,目的端地址为第二路由包的接收端的绝对地址或者相对地址,第一数据包序号用于指示第二路由包中待传输的数据包总个数,起始存储地址为第二路由包中的数据包在接收端内存中存储的起始地址,数据包地址存储方式用于指示第二路由包中的数据包在接收端内存中的存储方式,校验位用于指示头包中的数据是否正确。The routing packet type is used to indicate the type of the second routing packet, the destination address is the absolute address or relative address of the receiving end of the second routing packet, and the first data packet sequence number is used to indicate the data packet to be transmitted in the second routing packet The total number, the starting storage address is the starting address of the data packet in the second routing packet stored in the memory of the receiving end, and the storage method of the data packet address is used to indicate the data packet in the second routing packet in the memory of the receiving end. Storage mode, the check digit is used to indicate whether the data in the header packet is correct.
在另一种可能的实现方式中,发送模块630,还用于:In another possible implementation manner, the sending module 630 is further configured to:
通过第一输出通道传输第二路由包的数据包和尾包,数据包包括第二路由包的数据,尾包用于指示结束对第二路由包的传输。The data packet and the tail packet of the second routing packet are transmitted through the first output channel, where the data packet includes data of the second routing packet, and the tail packet is used to indicate the end of the transmission of the second routing packet.
在另一种可能的实现方式中,尾包包括路由包类型和第二数据包序号,第二数据包序号用于指示第二路由包中尚未传输的数据包个数。In another possible implementation manner, the tail packet includes a routing packet type and a second data packet sequence number, where the second data packet sequence number is used to indicate the number of data packets that have not been transmitted in the second routing packet.
在另一种可能的实现方式中,处理模块620,还用于:In another possible implementation manner, the processing module 620 is further configured to:
根据接收到的所述第二路由包中的数据包的个数与序号差值的大小关系,确定所述第二路由包是否存在丢包情况,所述序号差值为所述第一数据包序号与所述第二数据包序号之间的差值。Determine whether there is packet loss in the second routing packet according to the relationship between the number of received data packets in the second routing packet and the sequence number difference, and the sequence number difference is the first data packet The difference between the sequence number and the sequence number of the second data packet.
在另一种可能的实现方式中,处理模块620,还用于:In another possible implementation manner, the processing module 620 is further configured to:
当第二路由包的传输请求信息满足预设中断条件时,生成第一路由包的伪尾包,伪尾包中的第二数据包序号为第一数据包序号与第一路由包中已传输的数据包个数之间的差值;When the transmission request information of the second routing packet satisfies the preset interruption condition, a pseudo-tail packet of the first routing packet is generated, and the sequence number of the second data packet in the pseudo-tail packet is the sequence number of the first data packet and the transmitted data in the first routing packet. The difference between the number of packets;
发送第一路由包的伪尾包,伪尾包用于指示中断对第一路由包的传输。A pseudo-tail packet of the first routing packet is sent, where the pseudo-tail packet is used to instruct to interrupt the transmission of the first routing packet.
在另一种可能的实现方式中,处理模块620,还用于:In another possible implementation manner, the processing module 620 is further configured to:
生成第一路由包的伪头包,伪头包中的第一数据包序号为伪尾包中的第二数据包序号;generating a pseudo-header packet of the first routing packet, and the first data packet sequence number in the pseudo-header packet is the second data packet sequence number in the pseudo-tail packet;
将第一路由包的伪头包进行缓存。The pseudo-header packet of the first routing packet is cached.
在另一种可能的实现方式中,发送模块630,还用于:In another possible implementation manner, the sending module 630 is further configured to:
在第二路由包的数据传输结束后,根据第一路由包的伪头包,继续传输第一路由包中尚未传输的数据。After the data transmission of the second routing packet is completed, the data that has not been transmitted in the first routing packet is continued to be transmitted according to the pseudo-header packet of the first routing packet.
在另一种可能的实现方式中,该装置应用于片上网络的路由设备,路由设备为片上网络的任意一个节点中的路由设备,节点包括处理器核。In another possible implementation manner, the apparatus is applied to a routing device of a network-on-chip, where the routing device is a routing device in any node of the network-on-chip, and the node includes a processor core.
需要说明的是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分 功能。It should be noted that when the device provided in the above embodiment realizes its functions, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated to different functional modules according to actual needs. The content structure of the device is divided into different functional modules to complete all or part of the functions described above.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.
本公开实施例还提供了一种路由设备,用户设备包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为:实现上述各个方法实施例中由路由设备执行的步骤。An embodiment of the present disclosure further provides a routing device, and the user equipment includes: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to: implement the execution of the routing device in the foregoing method embodiments. step.
本公开实施例还提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,计算机程序指令被处理器执行时实现上述各个方法实施例中的方法。Embodiments of the present disclosure further provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, implement the methods in the foregoing method embodiments.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种 类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (13)

  1. 一种路由控制方法,其特征在于,所述方法包括:A route control method, characterized in that the method comprises:
    在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;In the process of transmitting the data of the first routing packet through the first output channel, receiving transmission request information of the second routing packet;
    当所述第二路由包的传输请求信息满足预设中断条件时,中断所述第一路由包的传输,所述预设中断条件包括所述第二路由包请求的输出通道为所述第一输出通道且所述第二路由包的优先级大于所述第一路由包的优先级;When the transmission request information of the second routing packet satisfies a preset interruption condition, the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first routing packet. output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
    通过所述第一输出通道传输所述第二路由包的数据。The data of the second routing packet is transmitted through the first output channel.
  2. 根据权利要求1所述的方法,其特征在于,所述在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息,包括:The method according to claim 1, wherein, in the process of transmitting the data of the first routing packet through the first output channel, receiving the transmission request information of the second routing packet, comprising:
    在通过所述第一输出通道传输所述第一路由包的数据的过程中,接收所述第二路由包的头包,所述头包包括所述第二路由包的优先级和路由信息。During the process of transmitting the data of the first routing packet through the first output channel, a header packet of the second routing packet is received, and the header packet includes the priority and routing information of the second routing packet.
  3. 根据权利要求2所述的方法,其特征在于,所述路由信息包括路由包类型、目的端地址、第一数据包序号、起始存储地址、数据包地址存储方式和校验位中的至少一种;The method according to claim 2, wherein the routing information includes at least one of a routing packet type, a destination address, a first data packet sequence number, a starting storage address, a data packet address storage mode, and a check bit. kind;
    其中,所述路由包类型用于指示所述第二路由包的类型,所述目的端地址为所述第二路由包的接收端的绝对地址或者相对地址,所述第一数据包序号用于指示所述第二路由包中待传输的数据包总个数,所述起始存储地址为所述第二路由包中的数据包在所述接收端内存中存储的起始地址,所述数据包地址存储方式用于指示所述第二路由包中的数据包在所述接收端内存中的存储方式,所述校验位用于指示所述头包中的数据是否正确。The routing packet type is used to indicate the type of the second routing packet, the destination address is the absolute address or relative address of the receiving end of the second routing packet, and the first data packet sequence number is used to indicate The total number of data packets to be transmitted in the second routing packet, the starting storage address is the starting address of the data packets in the second routing packet stored in the memory of the receiving end, and the data packet The address storage mode is used to indicate the storage mode of the data packet in the second routing packet in the memory of the receiving end, and the check bit is used to indicate whether the data in the header packet is correct.
  4. 根据权利要求1所述的方法,其特征在于,所述通过所述第一输出通道传输所述第二路由包的数据,包括:The method according to claim 1, wherein the transmitting the data of the second routing packet through the first output channel comprises:
    通过所述第一输出通道传输所述第二路由包的数据包和尾包,所述数据包包括所述第二路由包的数据,所述尾包用于指示结束对所述第二路由包的传输。The data packet and the tail packet of the second routing packet are transmitted through the first output channel, the data packet includes the data of the second routing packet, and the tail packet is used to indicate the end of the second routing packet. transmission.
  5. 根据权利要求4所述的方法,其特征在于,所述尾包包括所述路由包类型和第二数据包序号,所述第二数据包序号用于指示所述第二路由包中尚未传输的数据包个数。The method according to claim 4, wherein the tail packet includes the routing packet type and a second data packet sequence number, and the second data packet sequence number is used to indicate that the second routing packet has not yet been transmitted. number of packets.
  6. 根据权利要求5所述的方法,其特征在于,所述通过所述第一输出通道传输所述第二路由包的数据包和尾包之后,还包括:The method according to claim 5, wherein after the transmitting the data packet and the tail packet of the second routing packet through the first output channel, the method further comprises:
    根据接收到的所述第二路由包中的数据包的个数与序号差值的大小关系,确定所述第二路由包是否存在丢包情况,所述序号差值为所述第一数据包序号与所述第二数据包序号之间的差值。Determine whether there is packet loss in the second routing packet according to the relationship between the number of received data packets in the second routing packet and the sequence number difference, and the sequence number difference is the first data packet The difference between the sequence number and the sequence number of the second data packet.
  7. 根据权利要求1所述的方法,其特征在于,所述当所述第二路由包的传输请求信息满足预设中断条件时,中断所述第一路由包的传输,包括:The method according to claim 1, wherein when the transmission request information of the second routing packet satisfies a preset interruption condition, interrupting the transmission of the first routing packet comprises:
    当所述第二路由包的传输请求信息满足所述预设中断条件时,生成所述第一路由包的伪尾包,所述伪尾包中的第二数据包序号为所述第一数据包序号与所述第一路由包中已传输的数据包个数之间的差值;When the transmission request information of the second routing packet satisfies the preset interruption condition, a pseudo-tail packet of the first routing packet is generated, and the sequence number of the second data packet in the pseudo-tail packet is the first data The difference between the packet sequence number and the number of transmitted data packets in the first routing packet;
    发送所述第一路由包的伪尾包,所述伪尾包用于指示中断对所述第一路由包的传输。A pseudo-tail packet of the first routing packet is sent, where the pseudo-tail packet is used to instruct to interrupt the transmission of the first routing packet.
  8. 根据权利要求7所述的方法,其特征在于,所述当所述第二路由包的传输请求信息满足所述预设中断条件时,生成所述第一路由包的伪尾包之后,还包括:The method according to claim 7, wherein when the transmission request information of the second routing packet satisfies the preset interruption condition, after generating the pseudo-tail packet of the first routing packet, the method further comprises: :
    生成所述第一路由包的伪头包,所述伪头包中的第一数据包序号为所述伪尾包中的第二数据包序号;generating a pseudo-header packet of the first routing packet, where the first data packet sequence number in the pseudo-header packet is the second data packet sequence number in the pseudo-tail packet;
    将所述第一路由包的所述伪头包进行缓存。The pseudo-header packet of the first routing packet is cached.
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:The method according to claim 8, wherein the method further comprises:
    在所述第二路由包的数据传输结束后,根据所述第一路由包的所述伪头包,继续传输所述第一路由包中尚未传输的数据。After the data transmission of the second routing packet is completed, the untransmitted data in the first routing packet is continued to be transmitted according to the pseudo-header packet of the first routing packet.
  10. 根据权利要求1至9任一所述的方法,其特征在于,所述方法应用于片上网络的路由设备,所述路由设备为所述片上网络的任意一个节点中的路由设备,所述节点包括处理器核。The method according to any one of claims 1 to 9, wherein the method is applied to a routing device of a network-on-chip, and the routing device is a routing device in any node of the network-on-chip, and the node includes processor core.
  11. 一种路由控制装置,其特征在于,所述路由控制装置包括:A routing control device, characterized in that the routing control device comprises:
    接收模块,用于在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;a receiving module, configured to receive the transmission request information of the second routing packet in the process of transmitting the data of the first routing packet through the first output channel;
    处理模块,用于当所述第二路由包的传输请求信息满足预设中断条件时,中断所述第一路由包的传输,所述预设中断条件包括所述第二路由包请求的输出通道为所述第一输出通道且所述第二路由包的优先级大于所述第一路由包的优先级;a processing module, configured to interrupt the transmission of the first routing packet when the transmission request information of the second routing packet satisfies a preset interruption condition, where the preset interruption condition includes an output channel requested by the second routing packet is the first output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
    发送模块,用于通过所述第一输出通道传输所述第二路由包的数据。A sending module, configured to transmit the data of the second routing packet through the first output channel.
  12. 一种路由设备,其特征在于,所述路由设备包括:处理器;用于存储处理器可执行指令的存储器;A routing device, characterized in that the routing device comprises: a processor; a memory for storing instructions executable by the processor;
    其中,所述处理器被配置为:wherein the processor is configured to:
    在通过第一输出通道传输第一路由包的数据的过程中,接收第二路由包的传输请求信息;In the process of transmitting the data of the first routing packet through the first output channel, receiving transmission request information of the second routing packet;
    当所述第二路由包的传输请求信息满足预设中断条件时,中断所述第一路由包的传输,所述预设中断条件包括所述第二路由包请求的输出通道为所述第一输出通道且所述第二路由包的优先级大于所述第一路由包的优先级;When the transmission request information of the second routing packet satisfies a preset interruption condition, the transmission of the first routing packet is interrupted, and the preset interruption condition includes that the output channel requested by the second routing packet is the first routing packet. output channel and the priority of the second routing packet is greater than the priority of the first routing packet;
    通过所述第一输出通道传输所述第二路由包的数据。The data of the second routing packet is transmitted through the first output channel.
  13. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至10中任意一项所述的方法。A non-volatile computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are executed by a processor, the method described in any one of claims 1 to 10 is implemented.
PCT/CN2020/137435 2020-11-30 2020-12-18 Routing control method and apparatus, and routing device and storage medium WO2022110384A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011372040.0 2020-11-30
CN202011372040.0A CN112437021B (en) 2020-11-30 2020-11-30 Routing control method, device, routing equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022110384A1 true WO2022110384A1 (en) 2022-06-02

Family

ID=74698687

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/137435 WO2022110384A1 (en) 2020-11-30 2020-12-18 Routing control method and apparatus, and routing device and storage medium

Country Status (2)

Country Link
CN (1) CN112437021B (en)
WO (1) WO2022110384A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158403A (en) * 2011-03-24 2011-08-17 山东大学 Efficient data stream transmission communication structure suitable for on chip network and operating method thereof
CN103986664A (en) * 2014-05-15 2014-08-13 厦门大学 Mixed interconnection Mesh topological structure for on-chip network and routing algorithm thereof
US9363174B2 (en) * 2013-02-14 2016-06-07 Unisys Corporation Apparatus, method, and system for a destination cached routing protocol for mobile ad hoc networks
CN109039949A (en) * 2018-07-24 2018-12-18 合肥工业大学 Dynamic radio media access control method priority-based in wireless network-on-chip

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027839A1 (en) * 2003-07-31 2005-02-03 International Business Machiness Corporation Method, system and program product for dynamic transmission in a messaging session
US7460509B2 (en) * 2004-03-05 2008-12-02 Motorola, Inc. Method and apparatus for isochronous datagram delivery over contention-based data link
CN100346289C (en) * 2006-04-12 2007-10-31 华为技术有限公司 FIFO memory and method for output empty full marker thereof
US9608935B2 (en) * 2014-09-08 2017-03-28 Qualcomm Technologies, Inc. Tunneling within a network-on-chip topology
US10999170B2 (en) * 2016-03-30 2021-05-04 Nec Corporation Communication system, available-bandwidth estimation method, and recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158403A (en) * 2011-03-24 2011-08-17 山东大学 Efficient data stream transmission communication structure suitable for on chip network and operating method thereof
US9363174B2 (en) * 2013-02-14 2016-06-07 Unisys Corporation Apparatus, method, and system for a destination cached routing protocol for mobile ad hoc networks
CN103986664A (en) * 2014-05-15 2014-08-13 厦门大学 Mixed interconnection Mesh topological structure for on-chip network and routing algorithm thereof
CN109039949A (en) * 2018-07-24 2018-12-18 合肥工业大学 Dynamic radio media access control method priority-based in wireless network-on-chip

Also Published As

Publication number Publication date
CN112437021B (en) 2022-03-29
CN112437021A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
US20220214919A1 (en) System and method for facilitating efficient load balancing in a network interface controller (nic)
US20220030091A1 (en) Method and system for high speed data links
CN110313163B (en) Load balancing in distributed computing systems
US10541921B2 (en) Supporting access control list rules that apply to TCP segments belonging to ‘established’ connection
US11048569B1 (en) Adaptive timeout mechanism
US9535867B2 (en) Method, device, system and storage medium for implementing packet transmission in PCIE switching network
US20150103822A1 (en) Noc interface protocol adaptive to varied host interface protocols
JP5629954B2 (en) Apparatus, method, and program capable of interrupting at least partial frame transmission
CN115080500A (en) Incremental topology modification of network on chip
WO2021208092A1 (en) Method and device for processing stateful service
CN111026324B (en) Updating method and device of forwarding table entry
CN112291293A (en) Task processing method, related equipment and computer storage medium
US9699118B2 (en) System for flexible dynamic reassignment of throughput
WO2022110387A1 (en) Routing apparatus, and routing device of network-on-chip
JP2016515361A (en) Network transmission coordination based on transmission metadata provided by the application
US10635774B2 (en) Integrated circuit design
US10715437B2 (en) Deadline driven packet prioritization for IP networks
WO2022110384A1 (en) Routing control method and apparatus, and routing device and storage medium
CN116915708A (en) Method for routing data packets, processor and readable storage medium
US9621487B2 (en) Method and apparatus for protection switching based on memory control in packet transport system
US11218396B2 (en) Port-to-port network routing using a storage device
US11640366B1 (en) Address decoder for a multi-chip system
CN117155846B (en) Routing method, device, computer equipment and storage medium of interconnection network
CN117354253A (en) Network congestion notification method, device and storage medium
WO2020201789A1 (en) Technologies for managing data wait barrier operations

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20963272

Country of ref document: EP

Kind code of ref document: A1