Data transmission method, device and equipment of network-on-chip, and medium
By introducing the first generation module and the second generation module in the on-chip network, the storage location of the data packets is dynamically determined, and the resource waste caused by the single storage method of data packets in the prior art is solved, and bandwidth utilization efficiency and storage resource utilization are improved.
Patent Information
- Application Number
- CN202411954650.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-22
AI Technical Summary
In the data transmission of existing on-chip networks, the storage method of data packets is single, resulting in idle and waste of storage resources.
By introducing a first generation module and a second generation module in the on-chip network, the request channel and the response channel are respectively formed, and the storage location of the data packet is dynamically determined according to the amount of data requested task data, thereby generating the request data packet and the response data packet.
Improves the bandwidth utilization efficiency of data packets during on-chip network transmission, and saves storage resources and line resources.
Smart Images

Figure CN119862150A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission, and in particular to a data transmission method, device, equipment and medium of a network on chip. Background Art
[0002] Network on chip is a technology that builds a communication network inside an integrated circuit. Faced with the scalability and performance challenges of multi-core processors and system-level chips, the traditional bus architecture is no longer sufficient. As a solution strategy, network on chip provides excellent scalability. It enables multiple processor cores, intellectual property cores, storage units and other functional modules on the chip to achieve efficient interconnection and communication.
[0003] In communication interaction, the party that initiates a transaction is usually called a master device, and the party that handles the transaction response is called a slave device. Furthermore, data transmission in an on-chip network is usually carried out using data packets. However, in the prior art, the storage location of the transmitted data in the data packet is fixed, resulting in a single storage method. Furthermore, a single storage method may lead to idleness and waste of storage resources. Summary of the invention
[0004] The embodiments of the present invention provide a data transmission method, device, equipment and medium for an on-chip network. Through the technical solution of the present application, the bandwidth utilization efficiency of data packets during the on-chip network transmission process can be improved, and storage resources and line resources can be saved.
[0005] In a first aspect, an embodiment of the present invention provides a data transmission method for an on-chip network, wherein the on-chip network includes a master device, a slave device, a router, a first generation module, and a second generation module, wherein channels for data transmission of the first generation module, the router, and the second generation module constitute a request channel and a response channel, which are applied to the first generation module, and include:
[0006] Receiving a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information;
[0007] Determining a storage location of the request task data in the request data packet according to the data volume of the request task data of the request task;
[0008] Generate a request data packet based on the storage location, the request task data, the master device identification and the request address information;
[0009] Based on the request channel, sending the request data packet to a second generation module, so that the second generation module generates a request task according to the request data packet, and sends the request task to the slave device;
[0010] Based on the response channel, a response data packet sent by the second generation module is received.
[0011] In a second aspect, a data transmission method of an on-chip network includes a master device, a slave device, a router, a first generation module and a second generation module, characterized in that the channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, which are applied to the second generation module, and include:
[0012] Based on the request channel, receiving a request data packet sent by the master device, wherein the request data packet is generated based on a storage location, request task data, a master device identifier and request address information, and the request task data is determined at a storage location of the request data packet according to a data volume of the request task data;
[0013] Generate a request task according to the request data packet, and send the request task to the slave device;
[0014] Receiving a response task corresponding to the request task sent by the slave device, wherein the response task includes response task data and a master device identifier;
[0015] Determining a storage location of the response task data in the response data packet according to the data volume of the response task data of the response task;
[0016] Generate a response data packet based on the storage location, the response task data and the master device identification;
[0017] Based on the response channel, the response data packet is sent to a first generation module.
[0018] In a third aspect, a data transmission device of an on-chip network includes a master device, a slave device, a router, a first generation module and a second generation module, wherein the channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, and the data transmission device is configured in the first generation module, including:
[0019] A receiving module, used for receiving a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information;
[0020] A storage module, used for determining a storage location of the request task data in the request data packet according to the data volume of the request task data of the request task;
[0021] A generating module, used for generating a request data packet based on the storage location, the request task data, the master device identification and the request address information;
[0022] A sending module, based on the request channel, sends the request data packet to a second generating module, so that the second generating module generates a request task according to the request data packet, and sends the request task to the slave device;
[0023] A response module is used to receive a response data packet sent by the second generation module based on the response channel.
[0024] In a fourth aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0025] at least one processor; and,
[0026] a memory communicatively connected to the at least one processor; wherein,
[0027] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute any one of the data transmission methods for the on-chip network applied to the first generation module in the embodiments of the present invention or the data transmission method for the on-chip network applied to the second generation module in the embodiments of the present invention.
[0028] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any one of the data transmission methods for an on-chip network applied to a first generation module in the embodiments of the present invention or the data transmission method for an on-chip network applied to a second generation module in the embodiments of the present invention when executed.
[0029] The embodiment of the present invention provides a data transmission method, device, equipment and medium of a network on chip, wherein the network on chip includes a master device, a slave device, a router, a first generation module and a second generation module, wherein the channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, which are applied to the first generation module, and include: receiving a request task sent by the master device, wherein the request task includes request task data, a master device identifier and request address information; determining the storage location of the request task data in a request data packet according to the data volume of the request task data of the request task; generating a request data packet based on the storage location, the request task data, the master device identifier and the request address information; based on the request channel, sending the request data packet to the second generation module, so that the second generation module generates a request task according to the request data packet, and sends the request task to the slave device; based on the response channel, receiving the response data packet sent by the second generation module. Specifically, the storage location of the request task data in the request data packet can be determined according to the data volume of the request task data, thereby improving the utilization efficiency of the internal storage space of the data packet. The technical solution provided by the embodiment of the present invention can improve the utilization efficiency of the data packet space and save storage resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 A flowchart of a data transmission method of a network on chip provided in Embodiment 1 of the present invention;
[0032] Figure 2 A schematic diagram of the structure of a network on chip provided by an embodiment of the present invention;
[0033] Figure 3 A flowchart of a data transmission method of a network on chip is provided for the second embodiment of the present invention;
[0034] Figure 4 A schematic diagram of the structure of a request data packet provided by an embodiment of the present invention;
[0035] Figure 5 A flowchart of a data transmission method of a network on chip provided in Embodiment 3 of the present invention;
[0036] Figure 6 A schematic diagram of the structure of a response data packet provided by an embodiment of the present invention;
[0037] Figure 7 A schematic diagram of the structure of a data transmission device of a network on chip provided in a fourth embodiment of the present invention;
[0038] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] It should be noted that the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0042] Embodiment 1
[0043] Figure 1 A flowchart of a data transmission method for a network on chip is provided in Embodiment 1 of the present invention. The method can be applicable to data transmission situations of a network on chip. The method can be executed by a data transmission device for a network on chip. The device can be composed of software and / or hardware and configured in a main device of the network on chip.
[0044] Specifically, the on-chip network includes a master device and a slave device, the master device is a device that issues a request task, and the slave device is a device that generates a response task based on the request task and returns it to the master device. The channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, wherein the master device and the slave device respectively serve as the sender and the receiver in the request type task, and respectively serve as the receiver and the generator in the response type task. Further, the request channel and the response channel are configured in the router, the first generation module and the second generation module at the same time, and then when executing a request type task, a request data packet is sent through the request channel of the first generation module, and a request data packet is received through the request channel of the second generation module. When executing a response type task, a response data packet is sent through the response channel of the second generation module, and a response data packet is received through the response channel of the first generation module.
[0045] Specifically, the port of the first generation module is connected to the port of the router to form a data transmission channel between the first generation module and the router. The request channel of the first generation module can be a channel carried by the data transmission channel between the first generation module and the router. The ports of the forward and backward hop routers are connected to form a data transmission channel between the routers, and the request channel of the router can be a channel carried by the data transmission channel between the routers. The port of the second generation module is connected to the port of the router to form a data transmission channel between the second generation module and the router. The request channel of the second generation module can be a channel carried by the data transmission channel between the second generation module and the router. Through the request channel of the first generation module, the request data packet can be transmitted from the port of the first generation module to the port of the router; through the request channel of the router, the request data packet can be transmitted between the ports of the router, and through the request channel of the second generation module, the request data packet can be transmitted from the port of the router to the second generation module, and finally the request data packet is parsed by the second generation module, and the request task is generated and sent to the slave device. The composition structure of the response channel is similar to that of the request channel, which will not be repeated here.
[0046] like Figure 1 As shown, including:
[0047] Step 110: Receive a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information.
[0048] Among them, the request task is initiated by the master device, and is a task for adding, deleting, modifying, or transmitting data to the slave device. The request task data is the data required to be transmitted during the execution of the request task. For example, in the case of a write address operation, the request task data can be the address to be written. The request routing information is the address, device ID, and transmission method required during the transmission of the request task in the on-chip network. The request address information is used to determine the address of the recipient of the request task, and the master device identifier is used to mark the initiator of the request task.
[0049] Step 120: Determine a storage location of the request task data in the request data packet according to the data volume of the request task data of the request task.
[0050] The data volume may be the memory capacity occupied by the stored data.
[0051] Furthermore, the request data packet includes a packet header and a packet body. The packet header is used to store control information, address information and master device identification information of task forwarding, and these information are stored in a preset storage space in the packet header. However, due to the different control information, address information and master device identification information of different tasks, the size of the occupied storage space will be different. Therefore, there will be unused storage space in the packet header, which is filled with automatically generated invalid information. Therefore, the method of the embodiment of the present invention can be used to store the request task data in the packet header to achieve the purpose of fully utilizing the data packet memory.
[0052] Optionally, if the sum of the data volume of the requested task data and the data volume of the preset control information is less than the length of the header of the request data packet, the requested task data is stored in the header of the request data packet; otherwise, the requested task data is stored in the packet body.
[0053] The preset control information is the protocol, address and software information required for data packet transmission. The length of the header of the request data packet is the total storage space size of the header of the data packet.
[0054] Specifically, if the request task data of the request task is relatively small, there is no need to apply for an additional package body, and the request task data can be directly stored in the package header. If the amount of the request task data is large and greater than the length of the package header of the request data packet, the request task data needs to be stored in the package header. In this way, the utilization of the package header space can be improved. It should be noted that the storage space of the package body is generally large. If the request task data is relatively small, but it is forcibly stored in the package body, most of the storage space in the package body will not be utilized, resulting in storage waste.
[0055] Step 130: Generate a request data packet based on the storage location, the request task data, the master device identification and the request address information.
[0056] Specifically, based on the storage location, the request task data can be stored in different locations of the request data packet to achieve rational use of the data packet space. Furthermore, when the request data packet is transmitted in the on-chip network, it is necessary to jump in multiple devices. Therefore, the request address information is used to determine the slave device that the request task needs to reach, and then the jump path can be determined based on the identification of the slave device.
[0057] Step 140: Based on the request channel, send the request data packet to the second generation module, so that the second generation module generates a request task according to the request data packet and sends the request task to the slave device.
[0058] Specifically, for a request data packet of the request type, it needs to be sent from the request channel of the first generation module to reach the second generation module. The second generation module will parse the request data packet into a request task and send the request task to the slave device. The slave device will generate a response task based on the request task.
[0059] Step 150: Receive a response data packet sent by the slave device through the response channel of the first generation module.
[0060] Among them, the response data packet is a data packet generated according to the response task, and the transmission direction is from the second generation module to the first generation module. If the request task corresponding to the request data packet is writing data, the response task corresponding to the response data packet can be whether the writing of data is successful.
[0061] Specifically, the response data packet needs to be sent out from the response channel of the second generation module and finally reach the response channel of the first generation module. Then the first generation module parses the response data packet, generates a response task, and sends it to the main device so that the main device can understand the result of the response.
[0062] Optionally, the request task corresponding to the request data packet includes: reading address, writing address and writing data, and the response task corresponding to the response data packet includes reading data and writing response.
[0063] It should be noted that in the prior art, the transmission of the master device and the slave device of the on-chip network relies on the AXI (Advanced Extensible Interface) protocol, which stipulates that the types of task transmission may include read address, write address, write data, read data and write response. Different types of tasks are transmitted in their unique channels. Therefore, the prior art has a certain complexity in the port setting, and the interconnection cost between devices is also increased due to the large number of channels. Therefore, the embodiment of the present invention converts different types of transmission tasks into corresponding request data packets and response data packets through the method of the embodiment of the present invention, through the first generation module and the second generation module, and then only the request channel and the response channel are used during transmission to reduce the number of channels used in the transmission, thereby improving the efficiency of the transmission. Further, the transmission task is converted into a transmission data packet, and the original AXI protocol will be adaptively modified to the custom protocol corresponding to the request data packet and the response data packet in the embodiment of the present invention. It should be noted that the purpose of converting from the AXI protocol to the custom protocol is to ensure that the data packet corresponding to the data task can be quickly transmitted in the on-chip network. When transmitted to the receiving device, since the receiving device may not support the custom protocol corresponding to the data packet, it is necessary to convert the data packet of the custom protocol into a transmission task of the AXI protocol to ensure that the AXI protocol is supported by the receiving device. The specific protocol conversion process and algorithm are not limited here. Furthermore, the protocol conversion, the generation of the corresponding data packet according to the transmission task, and the generation of the corresponding transmission task according to the data packet are specifically completed by the first generation module and the second generation module described in the embodiment of the present invention.
[0064] Figure 2A schematic diagram of the structure of the network on chip provided by an embodiment of the present invention, wherein the master device interface corresponds to the first generation module, and the slave device interface corresponds to the second generation module. When the request task of the master device passes through the master device interface, the request task will be converted into a request data packet, and then the request data packet will be transmitted through the router to reach the slave device interface, and the slave device interface will convert the request data packet into a request task, so that the slave device completes the corresponding request task. Correspondingly, the response task of the slave device will be converted into a response data packet through the slave device conversion interface, and then the response data packet will be sent to the master device interface through a multi-stage router, and the master device interface will convert the response data packet into a response task so that the master device can understand the response result. It should be noted that there is a handshake protocol between the master device interface and the router, between the slave device interface and the router, and between the routers. For example, the valid / ready protocol can be used. Only when the valid and ready signals are valid at the same time, the data of the current cycle will be received. The main reason for selecting the valid / ready protocol instead of the credit protocol is that in a huge network structure, long-distance transmission of signals is inevitable. In this case, a relay station is often required to handle timing challenges. If credit flow control is used, the size of the input buffer will continue to expand as the number of stations increases. When modular backend design is required for large on-chip networks, adding new stations will cause the readjustment of the block logic, increasing the complexity of the design. In contrast, the application of the valid / ready protocol ensures that the addition of stations will not affect the block logic, which helps the rapid convergence and stability of the backend design.
[0065] The embodiment of the present invention provides a data transmission method for a network on chip, the method comprising: receiving a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information; determining the storage location of the request task data in a request data packet according to the data volume of the request task data of the request task; generating a request data packet based on the storage location, the request task data, the master device identifier and the request address information; based on the request channel, sending the request data packet to a second generation module, so that the second generation module generates a request task according to the request data packet and sends the request task to a slave device; based on the response channel, receiving a response data packet sent by the second generation module. Specifically, the storage location of the request task data in the request data packet can be determined according to the data volume of the request task data, thereby improving the utilization efficiency of the storage space inside the data packet. The technical solution provided by the embodiment of the invention can improve the utilization efficiency of the data packet space and save storage space.
[0066] Embodiment 2
[0067] Figure 3A flowchart of a data transmission method of an on-chip network is provided for the second embodiment of the present invention, which specifically defines a method for generating a request data packet based on the storage location, the request task data, the master device identification and the request address information.
[0068] like Figure 3 As shown, including:
[0069] Step 201: Receive a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information.
[0070] Step 202: Determine the storage location of the request task data in the request data packet according to the data volume of the request task data of the request task.
[0071] Step 203: Determine the slave device identifier that receives the request task according to the request address information.
[0072] The request address information corresponds to a slave device of the on-chip network, and the slave device identifier of the slave device that receives the request task can be determined through the request address information.
[0073] Step 204: determine a jump path according to the slave device identifier and a preset routing jump table, wherein the jump path includes an output interface corresponding to each router when the request data packet jumps, and different output interfaces of the router are connected to different next-hop routers.
[0074] Among them, the routing jump table records various jump paths from the master device to the slave device. The jump paths are the routers that the request data packet needs to pass through during the on-chip network transmission process, and the output interfaces of the request data packet at each router.
[0075] Specifically, through the jump path, the output interface corresponding to the request data packet when the router jumps can be determined, and then sent to the next level router through the output interface until it reaches the second generation module.
[0076] Step 205: Determine source routing information according to the output interface of each router.
[0077] Specifically, source routing information can be generated according to the output interface of each router. The source routing information can be a jump code of a specific length. The length of the jump code can be determined by the number of jumps of the request task in the on-chip network router. Furthermore, each code can be defined by the output interface to ensure that the router parses each code bit and can determine the output interface for the request data packet.
[0078] Furthermore, the source routing information is stored in a specific area of the packet header, which is not limited here.
[0079] Step 206: Generate a request data packet based on the storage location, the request task data, the master device identification and the source routing information.
[0080] For example, Figure 4 A structural diagram of a request data packet provided for an embodiment of the present invention, specifically, a request task may include a read request task and a write request task, wherein a read request task may be a read address, and a write request task may be a write address and write data. Furthermore, the read request task itself only needs to transmit control information without data, and a read request packet can be generated directly according to the header of the read request packet. If the amount of data in the write request task data is small, such as data less than 64B, the data can be written into the header, and then a write request packet (request data packet) is generated only based on the header. For data greater than 64B, the data needs to be written into the packet body, and then a write request data packet is generated based on the header and body of the write request packet. The control information about the header of the request data packet may include the following:
[0081] The header tag of the data packet; the tail tag of the request data packet; the jump code of the request data packet; the packet type of the request data packet, such as read request, write request, read response or write response; including some protocol content supporting the AXI protocol: information of the channel of the write address or read address, such as axaddr, axburst, axlen, etc., where x represents R or W; and also includes the number of beats of the request task. Furthermore, the control information of the packet body may include: the header tag of the data packet; the tail tag of the data packet.
[0082] Step 207: The first generating module sends the request data packet to a router.
[0083] Step 208: Each of the routers parses the source routing information of the request data packet, and determines the output interface of each router for the request data packet.
[0084] Step 209: Send the request data packet to the second generation module through the output interface of each of the routers for the request data packet, so that the second generation module generates a request task according to the request data packet and sends the request task to the slave device.
[0085] Specifically, steps 207-209 are the transmission process of the request data packet in the on-chip network.
[0086] Optionally, the recording order of the output interface of each router in the source routing information is the same as the jumping order of the request data packet on the router. Therefore, starting from the lowest bit of the source routing information, each hop router can parse the encoding bits of the source routing information in sequence to determine the output interface and complete the forwarding of the request data packet.
[0087] Step 210: Based on the response channel, receive a response data packet sent by the second generation module.
[0088] Optionally, after receiving the response data packet, the method further includes: parsing the response data packet and converting the response data packet into a response task.
[0089] Specifically, since the main device itself may only support receiving response tasks and does not support direct parsing of data packets, after receiving the response data packet, the response data packet needs to be re-parsed into the corresponding response task, and then the main device can understand the response result through the response data in the response task.
[0090] The embodiment of the present invention provides a data transmission method for an on-chip network. Through the method of the embodiment of the present invention, the use efficiency of the memory space of the data packet can be reduced during the transmission of the data packet of the on-chip network, and the storage resources can be saved.
[0091] Embodiment 3
[0092] Figure 5 A flowchart of a data transmission method of a network on chip is provided for the third embodiment of the present invention, wherein the network on chip includes a master device, a slave device, a router, a first generation module and a second generation module, and the channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, which are applied to the second generation module. Specifically, this embodiment specifically describes the specific workflow of the second generation module after the second generation module receives the request data packet.
[0093] like Figure 5 Shown include:
[0094] Step 310: Based on the request channel, receive the request data packet sent by the master device, wherein the request data packet is generated based on the storage location, request task data, master device identification and request address information, and the storage location of the request task data in the request data packet is determined according to the data volume of the request task data.
[0095] Specifically, the request data packet received by the second generation module can be a request data packet generated by the method described above in the embodiment of the present invention, specifically: determining the storage location of the request task data in the request data packet according to the data volume of the request task data of the request task; generating the request data packet based on the storage location, the request task data, the master device identification and the request address information. A more specific generation method is not described here.
[0096] Step 320: Generate a request task according to the request data packet, and send the request task to the slave device.
[0097] Specifically, after receiving the request data packet, the second generation module will perform protocol conversion, convert the request data packet into a request task, and then send the request task to the slave device. The specific conversion process is not limited here.
[0098] Step 330: Receive a response task corresponding to the request task sent by the slave device, wherein the response task includes response task data and a master device identifier.
[0099] Specifically, the slave device may generate a response task according to the response task data and the master device identifier, and send the response task to the second generation module.
[0100] Step 340: Determine the storage location of the response task data in the response data packet according to the data volume of the response task data of the response task.
[0101] Specifically, the second generating module may determine the storage location of the response task data in the response data packet according to the data volume of the response task data.
[0102] Optionally, if the sum of the data volume of the response task data and the data volume of the preset control information is less than the length of the header of the response data packet, the response task data is stored in the header of the response data packet; otherwise, the response task data is stored in the packet body.
[0103] Step 350: Generate a response data packet based on the storage location, the response task data and the master device identification.
[0104] Among them, the master device identifier is used to determine the master device that needs to be returned to the response task. Further, step 350 includes: determining the jump path according to the master device identifier and a preset routing jump table, wherein the jump path includes the output interface corresponding to the response data packet when it jumps at each router, and different output interfaces of the router are connected to different next-hop routers; determining the source routing information according to the output interface of each router; generating a response data packet based on the storage location, the response task data and the source routing information.
[0105] Step 360: Based on the response channel, send the response data packet to the first generation module.
[0106] Optionally, this step includes: the second generation module sends the response data packet to the router; each of the routers parses the source routing information of the response data packet and determines the output interface of each router for the response data packet; and sends the response data packet to the first generation module through the output interface of each of the routers for the response data packet.
[0107] Optionally, after receiving the response data packet, the first generation module converts the response data packet into a response task and sends the response task to the master device.
[0108] Optionally, the request task corresponding to the request data packet includes: reading address, writing address and writing data, and the response task corresponding to the response data packet includes reading data and writing response.
[0109] It should be noted that the generation method of the response data packet and the transmission method of the response data packet in each router of the on-chip network are basically the same as the generation method of the request data packet and the transmission method of the request data packet in each router of the on-chip network in the embodiment of the present invention. Therefore, the specific explanation content is not repeated.
[0110] For example, Figure 6 A structural schematic diagram of a response data packet provided for an embodiment of the present invention, wherein the response data packet includes a write response data packet and a read response data packet, wherein the write response data packet may be a data packet corresponding to a write response task, and the response task corresponding to the read response data packet may be a read data task. Specifically, the write response packet does not carry data; the read response packet carries one beat of data, and the data is stored in the header of the read response packet. The control information of the write response packet / read response packet includes: a header tag of the response data packet; a tail tag of the response data packet; a jump code of the response data packet; a packet type of the response data packet, such as a read response or a write response; and includes some protocol content supporting the AXI protocol, such as the BID / RID of the AXI protocol and the status of the AXI response. Specifically, if the read response packet uses an independent header and body, the transmission ratio of valid data can only be improved when the amount of data is large enough. However, slave devices supporting the AXI protocol often allow read data of different read requests to be returned in a disordered and interleaved manner, which means that a larger buffer is required from the device interface to collect a sufficient amount of data. On the other hand, the bit width of the control information of the response packet is much smaller than that of the control information of the request packet. The control information and data information of the read response packet are combined and transmitted in one beat, and the signal width is acceptable.
[0111] Embodiment 4
[0112] Figure 7 A schematic diagram of the structure of a data transmission device of a network on chip provided in Embodiment 4 of the present invention. The network on chip includes a master device, a slave device, a router, a first generation module and a second generation module. The channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel. The data transmission device is configured in the first generation module and includes:
[0113] like Figure 7 As shown, including:
[0114] The receiving module 410 is used to receive a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information;
[0115] The storage module 420 is used to determine the storage location of the request task data in the request data packet according to the data volume of the request task data of the request task;
[0116] A generating module 430, configured to generate a request data packet based on the storage location, the request task data, the master device identifier and the request address information;
[0117] A sending module 440, based on the request channel, sends the request data packet to a second generating module, so that the second generating module generates a request task according to the request data packet, and sends the request task to the slave device;
[0118] The response module 450 is used to receive the response data packet sent by the second generation module based on the response channel.
[0119] The embodiment of the present invention provides a data transmission device of a network on chip, which receives a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information; determines the storage location of the request task data in a request data packet according to the data volume of the request task data of the request task; generates a request data packet based on the storage location, the request task data, the master device identifier and the request address information; based on the request channel, sends the request data packet to a second generation module, so that the second generation module generates a request task according to the request data packet and sends the request task to a slave device; based on the response channel, receives a response data packet sent by the second generation module. Specifically, the storage location of the request task data in the request data packet can be determined according to the data volume of the request task data, thereby improving the utilization efficiency of the internal storage space of the data packet. The technical solution provided by the embodiment of the present invention can improve the utilization efficiency of the data packet space and save storage resources.
[0120] Optionally, the storage module 420 is specifically used to: if the sum of the data volume of the requested task data and the data volume of the preset control information is less than the length of the header of the request data packet, then the requested task data is stored in the header of the request data packet; otherwise, the requested task data is stored in the packet body.
[0121] Optionally, the generating module 430 includes:
[0122] A slave device identification determination unit, used to determine the slave device identification that receives the request task according to the request address information;
[0123] A jump path determination unit, configured to determine a jump path according to the slave device identifier and a preset routing jump table, wherein the jump path includes an output interface corresponding to the request data packet when it jumps to each router, and different output interfaces of the router are connected to different next-hop routers;
[0124] A source routing information generating unit, used for determining source routing information according to the output interface of each router;
[0125] The data packet generating unit is used to generate a request data packet based on the storage location, the request task data, the master device identification and the source routing information.
[0126] The sending module 440 includes:
[0127] A first sending unit, configured for the first generating module to send the request data packet to a router;
[0128] A forwarding unit, configured for each of the routers to parse the source routing information of the request data packet and determine an output interface of each of the routers for the request data packet;
[0129] The second sending unit is used to send the request data packet to the second generating module through the output interface of each of the routers corresponding to the request data packet.
[0130] Optionally, the data transmission device of the on-chip network also includes a parsing module, which is used to parse the response data packet after receiving the response data packet sent by the second generation module, and convert the response data packet into a response task.
[0131] The data transmission device of the network on chip provided in the embodiment of the present invention can execute the data transmission method of the network on chip provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.
[0132] Embodiment 5
[0133] Figure 8 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0134] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0135] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0136] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as any one of the data transmission methods for the on-chip network of the master device in the embodiments of the present invention or the data transmission method for the on-chip network of the slave device in the embodiments of the present invention.
[0137] In some embodiments, any one of the data transmission methods for the on-chip network of the master device or the data transmission method for the on-chip network of the slave device in the embodiments of the present invention may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of any one of the data transmission methods for the on-chip network of the master device or the data transmission method for the on-chip network of the slave device in the embodiments of the present invention described above may be executed. Alternatively, in other embodiments, the processor 11 may be configured to execute any one of the data transmission methods for the on-chip network of the master device or the data transmission method for the on-chip network of the slave device in the embodiments of the present invention in any other appropriate manner (e.g., by means of firmware).
[0138] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0139] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0140] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0141] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0142] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0143] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0144] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0145] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A data transmission method of a network on chip, wherein the network on chip comprises a master device, a slave device, a router, a first generation module and a second generation module, characterized in that: The channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, which are applied to the first generation module and include: Receiving a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information; Determining a storage location of the request task data in the request data packet according to the data volume of the request task data of the request task; Generate a request data packet based on the storage location, the request task data, the master device identification and the request address information; Based on the request channel, sending the request data packet to a second generation module, so that the second generation module generates a request task according to the request data packet, and sends the request task to the slave device; Based on the response channel, a response data packet sent by the second generation module is received.
2. The method according to claim 1, characterized in that Determining the storage location of the request task data in the request data packet according to the data volume of the request task data of the request task includes: If the sum of the data volume of the requested task data and the data volume of the preset control information is less than the length of the header of the request data packet, the requested task data is stored in the header of the request data packet; otherwise, the requested task data is stored in the packet body.
3. The method according to claim 2, characterized in that The generating of the request data packet based on the storage location, the request task data, the master device identification and the request address information comprises: Determine the slave device identification that receives the request task according to the request address information; Determine a jump path according to the slave device identifier and a preset routing jump table, wherein the jump path includes an output interface corresponding to the request data packet when it jumps to each router, and different output interfaces of the router are connected to different next-hop routers; Determine source routing information according to the output interface of each router; A request data packet is generated based on the storage location, the request task data, the master device identification and the source routing information.
4. The method according to claim 3, characterized in that The step of sending the request data packet to a second generation module based on the request channel includes: The first generating module sends the request data packet to a router; Each of the routers parses the source routing information of the request data packet, and determines the output interface of each of the routers for the request data packet; The request data packet is sent to the second generation module through the output interface of each of the routers corresponding to the request data packet.
5. The method according to claim 1, characterized in that After receiving the response data packet sent by the second generating module, the method further includes: The response data packet is parsed, and the response data packet is converted into a response task.
6. A data transmission method for a network on chip, characterized in that: The on-chip network includes a master device, a slave device, a router, a first generation module and a second generation module, wherein the channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, which are applied to the second generation module and include: Based on the request channel, receiving a request data packet sent by the master device, wherein the request data packet is generated based on a storage location, request task data, a master device identifier and request address information, and the request task data is determined at a storage location of the request data packet according to a data volume of the request task data; Generate a request task according to the request data packet, and send the request task to the slave device; Receiving a response task corresponding to the request task sent by the slave device, wherein the response task includes response task data and a master device identifier; Determining a storage location of the response task data in the response data packet according to the data volume of the response task data of the response task; Generate a response data packet based on the storage location, the response task data and the master device identification; Based on the response channel, the response data packet is sent to a first generation module.
7. The method according to claim 6, characterized in that The request task corresponding to the request data packet includes: read address, write address and write data, and the response task corresponding to the response data packet includes read data and write response.
8. A data transmission device of a network on chip, the network on chip comprising a master device, a slave device, a router, a first generation module and a second generation module, characterized in that: The channels for data transmission of the first generation module, the router and the second generation module constitute a request channel and a response channel, and the data transmission device is configured in the first generation module, including: A receiving module, used for receiving a request task sent by a master device, wherein the request task includes request task data, a master device identifier and request address information; A storage module, used for determining a storage location of the request task data in the request data packet according to the data volume of the request task data of the request task; A generating module, used for generating a request data packet based on the storage location, the request task data, the master device identification and the request address information; A sending module, based on the request channel, sends the request data packet to a second generating module, so that the second generating module generates a request task according to the request data packet, and sends the request task to the slave device; A response module is used to receive a response data packet sent by the second generation module based on the response channel.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data transmission method of the on-chip network described in any one of claims 1-5 or the data transmission method of the on-chip network described in claim 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data transmission method of the on-chip network described in any one of claims 1 to 5 or the data transmission method of the on-chip network described in claim 6 when executed.