Communication device, data storage method, chip and electronic equipment

By implementing virtual channels to share storage resources and splitting virtual input/output channels in communication devices, the problems of low storage resource utilization and channel congestion are solved, thereby improving the utilization efficiency of storage resources.

CN120880929AActive Publication Date: 2025-10-31MOORE THREADS TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511387358.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2025-10-31
Estimated Expiration
2045-09-26

AI Technical Summary

Technical Problem

In the prior art, the independent use of storage resources for each virtual transmission channel in a communication device leads to low storage resource utilization, and other channel resources cannot be effectively utilized when a virtual channel is blocked.

Method used

By implementing multiple virtual channels sharing storage resources in the communication device, using buffers and control and storage modules to provide indexes for message packets, determine storage locations, and store message packets in corresponding entries, the virtual input channel is further divided into virtual input sub-channels and virtual output sub-channels to solve the blocking problem.

Benefits of technology

It improves the utilization rate of storage resources within the communication device, solves the problem of unreasonable congestion of virtual channels, and increases the number of resources available for storing new message packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880929A_ABST
    Figure CN120880929A_ABST
Patent Text Reader

Abstract

The invention relates to the field of communication, and provides a communication device, a data storage method, a chip and electronic equipment. The device comprises a buffer, a control and storage module and a plurality of virtual input channels, the control and storage module comprises a plurality of entries, at least one entry is shared by the virtual input channels, and each entry corresponds to an index; the device receives a message packet through any one virtual input channel; the buffer is used for providing an index for the message packet; and the control and storage module is used for determining items for storing the message packets according to the indexes and storing the message packets into the corresponding items. In the communication device provided by the embodiment of the invention, the plurality of virtual channels can share the storage resources of the communication device, so that the utilization rate of the storage resources in the communication device is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communications, and more particularly to a communication device, a data storage method, a chip, and an electronic device. Background Technology

[0002] Network on Chip (NoC) is a system within a chip used to implement communication between multiple masters and multiple slaves. NoC includes several communication devices, and physical transmission channels exist between these devices. To improve the utilization of these physical transmission channels, existing technologies have proposed Virtual-Channel (VC) technology. Through time-division multiplexing, the physical transmission channel is divided into multiple independent virtual transmission channels, allowing each virtual transmission channel to use the physical transmission channel in different time slices.

[0003] However, to ensure the independence of multiple virtual transmission channels, existing communication devices require dedicated storage resources for each virtual transmission channel to store the data transmitted through that channel. If only one virtual transmission channel is used within a certain period, the storage resources corresponding to the other virtual transmission channels will be idle, reducing the utilization rate of storage resources within the communication device. Summary of the Invention

[0004] In view of this, this disclosure proposes a communication device, a data storage method, a chip, and an electronic device. In the communication device of the embodiments of this disclosure, multiple virtual channels can share the storage resources of the communication device, thereby improving the utilization rate of storage resources within the communication device.

[0005] According to one aspect of this disclosure, a communication device is provided, the device including a buffer, a control and storage module, and multiple virtual input channels, the control and storage module including multiple entries, wherein at least one entry is shared by the multiple virtual input channels, and each entry corresponds to an index; the device receives a message packet through any one of the virtual input channels; the buffer is used to provide an index for the message packet; the control and storage module is used to determine the entry for storing the message packet according to the index, and store the message packet into the corresponding entry.

[0006] In one possible implementation, the message packet includes first data and second data, wherein the first data is the metadata of the message packet and the second data is the payload data of the message packet.

[0007] In one possible implementation, the device further includes multiple physical input ports, multiple physical output ports, and multiple virtual output channels. The communication device connects to a lower-level communication device through the physical output ports. Each virtual input channel includes multiple virtual input sub-channels, and each virtual input sub-channel corresponds to a physical output port of the device. Each virtual output channel includes multiple virtual output sub-channels, and each virtual output sub-channel corresponds to a physical output port of the lower-level communication device. The message packet is received through one of the multiple virtual input sub-channels. The control and storage module is further configured to: when storing the first data, write the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet to the entry storing the first data; select a first target entry from the entries storing valid first data; determine the virtual output sub-channel according to the first target entry; and output the data stored in the first target entry through the virtual output sub-channel; release the first target entry; and output the index corresponding to the first target entry to the buffer.

[0008] In one possible implementation, the control and storage module includes a control queue and a memory. The control queue includes a plurality of first entries, and the memory includes a plurality of second entries. Each index corresponds to a first entry and a second entry. The control queue is used to determine the first entry for storing the first data according to the index and store the first data into the corresponding first entry. The memory is used to determine the second entry for storing the second data according to the index and store the second data into the corresponding second entry.

[0009] In one possible implementation, the control queue is further configured to use the second entry corresponding to the first target entry as the second target entry, and control the memory to read out the second data stored in the second target entry; specifically, the control queue is configured to merge the first data stored in the first target entry and the second data stored in the second target entry, and then output them through the virtual output sub-channel; the control queue is further configured to control the memory to release the second target entry when the first target entry is released.

[0010] In one possible implementation, the device further includes a topology storage module for storing the topology of the on-chip network where the communication device resides. The first data includes a source device identifier and a destination device identifier. Specifically, the control and storage module is used to: determine, when storing the first data, the position of the communication device on the transmission path of the message packet and the maximum number of physical input / output ports of all communication devices in the topology, based on the first data and the topology; determine the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet based on the position, the maximum number, and the number of the virtual input channel corresponding to the message packet; and write the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet into the entry storing the first data.

[0011] In one possible implementation, the multiple virtual output sub-channels of the communication device serve as multiple virtual input sub-channels of the lower-level communication device. The device further includes a statistics module, which counts the number of free entries shared by all virtual input sub-channels in the lower-level communication device, and the number of free entries private to each virtual input sub-channel in the lower-level communication device. Specifically, the control and storage module is used to: filter entries that meet a first preset condition from entries storing valid first data to obtain a first candidate group, where the first preset condition is that the duration of data stored in the current entry is greater than that of other entries storing the same virtual input sub-channel identifier; filter entries that meet a second preset condition from the first candidate group based on the identifiers of the virtual output sub-channels stored in each entry and the statistical results of the statistics module to obtain a second candidate group, where the second preset condition is that the number of available free entries for the virtual input sub-channel corresponding to the identifier of the virtual output sub-channel stored in the current entry in the lower-level communication device is greater than the number of entries used to store the message packet corresponding to the current entry; and select at least one entry from the second candidate group as the first target entry.

[0012] In one possible implementation, the first data includes a data duration, and the control and storage module is specifically used to group the entries storing the valid first data, with each group storing the same identifier for the virtual input sub-channel; and to filter out the entries with the longest data duration in each group based on the data duration stored in each entry, thereby obtaining a first candidate group.

[0013] In one possible implementation, among the entries storing valid first data, entries corresponding to the same virtual input sub-channel belong to the linked list corresponding to that virtual input sub-channel. The control and storage module is further configured to, when storing the first data, use the entry storing the first data as the tail of the linked list corresponding to the determined virtual input sub-channel; specifically, the control and storage module is configured to obtain a first candidate group based on the entries at the head of each linked list.

[0014] In one possible implementation, the available free entries for any virtual input subchannel include all or part of the free entries shared by all virtual input subchannels, as well as the free entries private to that virtual input subchannel.

[0015] In one possible implementation, any virtual input subchannel may have available free entries, including free entries shared by all virtual input subchannels.

[0016] In one possible implementation, any virtual input subchannel may have available free entries, including free entries private to that virtual input subchannel.

[0017] In one possible implementation, the control and storage module is specifically used to: determine a first value X and a second value Y based on the maximum quantity, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; when the communication device is the first communication device on the transmission path of the message packet, multiply the number of the virtual input channel corresponding to the message packet by the second value, and the product is the identifier of the virtual input sub-channel corresponding to the message packet; when the communication device is not the first communication device on the transmission path of the message packet, use the identifier of the virtual output sub-channel corresponding to the message packet in the upper-level communication device as the identifier of the virtual input sub-channel corresponding to the message packet.

[0018] In one possible implementation, the control and storage module is specifically used to: determine a first value X and a second value Y based on the maximum quantity, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; when the communication device is the last communication device on the transmission path of the message packet, multiply the number of the virtual input channel corresponding to the message packet by the second value, and the product is the identifier of the virtual output sub-channel corresponding to the message packet; when the communication device is not the last communication device on the transmission path of the message packet, multiply the number of the virtual input channel corresponding to the message packet by the second value, and then add it to the number of the physical output port used by the lower-level communication device on the transmission path of the message packet, as the identifier of the virtual output sub-channel corresponding to the message packet.

[0019] According to another aspect of this disclosure, a data storage method is provided, the method being applied to a communication device, the device including a buffer, a control and storage module, and multiple virtual input channels, the control and storage module including multiple entries, wherein at least one entry is shared by the multiple virtual input channels, and each entry corresponds to an index; the device receives a message packet through any one of the virtual input channels, the method including: using the buffer to provide an index for the message packet; using the control and storage module to determine the entry for storing the message packet according to the index, and storing the message packet into the corresponding entry.

[0020] In one possible implementation, the message packet includes first data and second data, wherein the first data is the metadata of the message packet and the second data is the payload data of the message packet.

[0021] In one possible implementation, the device further includes multiple physical input ports, multiple physical output ports, and multiple virtual output channels. The communication device connects to a lower-level communication device through the physical output ports. Each virtual input channel includes multiple virtual input sub-channels, and each virtual input sub-channel corresponds to a physical output port of the device. Each virtual output channel includes multiple virtual output sub-channels, and each virtual output sub-channel corresponds to a physical output port of the lower-level communication device. The message packet is received through one of the multiple virtual input sub-channels. The method further includes: when storing the first data, the control and storage module writes the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet to the entry storing the first data; the control and storage module selects a first target entry from the entries storing valid first data, determines a virtual output sub-channel according to the first target entry, and outputs the data stored in the first target entry through the virtual output sub-channel; the control and storage module releases the first target entry and outputs the index corresponding to the first target entry to the buffer.

[0022] In one possible implementation, the control and storage module includes a control queue and a memory. The control queue includes a plurality of first entries, and the memory includes a plurality of second entries. Each index corresponds to a first entry and a second entry. The step of storing the message packet into the corresponding entry includes: the control queue determining a first entry for storing the first data according to the index, and storing the first data into the corresponding first entry; the memory determining a second entry for storing the second data according to the index, and storing the second data into the corresponding second entry.

[0023] In one possible implementation, the method further includes: the control queue takes the second entry corresponding to the first target entry as the second target entry, and controls the memory to read out the second data stored in the second target entry; the step of outputting the data stored in the first target entry through the virtual output sub-channel includes: the control queue merges the first data stored in the first target entry with the second data stored in the second target entry, and then outputs them through the virtual output sub-channel; the method further includes: when the control queue releases the first target entry, it controls the memory to release the second target entry.

[0024] In one possible implementation, the device further includes a topology storage module for storing the topology of the on-chip network where the communication device resides. The first data includes a source device identifier and a destination device identifier. The step of writing the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet to the entry storing the first data includes: determining, based on the first data and the topology, the position of the communication device on the transmission path of the message packet, and the maximum number of physical input / output ports of all communication devices in the topology; determining the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet based on the position, the maximum number, and the number of the virtual input channel corresponding to the message packet; and writing the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet to the entry storing the first data.

[0025] In one possible implementation, the multiple virtual output sub-channels of the communication device serve as multiple virtual input sub-channels of the lower-level communication device. The device further includes a statistics module, and the method further includes: using the statistics module to count the number of free entries shared by all virtual input sub-channels in the lower-level communication device, and the number of free entries private to each virtual input sub-channel in the lower-level communication device; selecting a first target entry from entries storing valid first data includes: filtering entries that meet a first preset condition from entries storing valid first data to obtain a first candidate group, wherein the first preset condition is that the data duration stored in the current entry is greater than that of other entries storing the same virtual input sub-channel identifier as the current entry; filtering entries that meet a second preset condition from the first candidate group based on the identifier of the virtual output sub-channel stored in each entry and the statistical results of the statistics module to obtain a second candidate group, wherein the second preset condition is that the number of available free entries for the virtual input sub-channel corresponding to the identifier of the virtual output sub-channel stored in the current entry in the lower-level communication device is greater than the number of entries used to store the message packet corresponding to the current entry; selecting at least one entry from the second candidate group as the first target entry.

[0026] In one possible implementation, the first data includes a data duration, and the step of filtering entries that meet a first preset condition from the entries storing valid first data to obtain a first candidate group includes: grouping the entries storing valid first data, with each group storing the same identifier for a virtual input sub-channel; and filtering the entries with the longest data duration in each group based on the data duration of each entry to obtain a first candidate group.

[0027] In one possible implementation, among the entries storing valid first data, entries corresponding to the same virtual input sub-channel belong to the linked list corresponding to that virtual input sub-channel. The method further includes: when storing the first data, using the entry storing the first data as the tail of the linked list corresponding to the determined virtual input sub-channel; the step of filtering entries that meet the first preset condition from the entries storing valid first data to obtain the first candidate group includes: obtaining the first candidate group based on the entries at the head of each linked list.

[0028] In one possible implementation, the available free entries for any virtual input subchannel include all or part of the free entries shared by all virtual input subchannels, as well as the free entries private to that virtual input subchannel.

[0029] In one possible implementation, any virtual input subchannel may have available free entries, including free entries shared by all virtual input subchannels.

[0030] In one possible implementation, any virtual input subchannel may have available free entries, including free entries private to that virtual input subchannel.

[0031] In one possible implementation, determining the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet based on the location, the maximum quantity, and the number of the virtual input channel corresponding to the message packet includes: determining a first value X and a second value Y based on the maximum quantity, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; when the communication device is the first communication device on the transmission path of the message packet, multiplying the number of the virtual input channel corresponding to the message packet by the second value, and the product is the identifier of the virtual input sub-channel corresponding to the message packet; when the communication device is not the first communication device on the transmission path of the message packet, using the identifier of the virtual output sub-channel corresponding to the message packet in the upstream communication device as the identifier of the virtual input sub-channel corresponding to the message packet.

[0032] In one possible implementation, determining the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet based on the position, the maximum quantity, and the number of the virtual input channel corresponding to the message packet includes: determining a first value X and a second value Y based on the maximum quantity, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; when the communication device is the last communication device on the transmission path of the message packet, multiplying the number of the virtual input channel corresponding to the message packet by the second value, and the product is the identifier of the virtual output sub-channel corresponding to the message packet; when the communication device is not the last communication device on the transmission path of the message packet, multiplying the number of the virtual input channel corresponding to the message packet by the second value, and then adding it to the number of the physical output port used by the lower-level communication device on the transmission path of the message packet, as the identifier of the virtual output sub-channel corresponding to the message packet.

[0033] According to another aspect of this disclosure, a chip is provided that includes the communication device described above.

[0034] According to another aspect of this disclosure, an electronic device is provided, including the chip described above.

[0035] A communication device according to an embodiment of this disclosure includes a buffer, a control and storage module, and multiple virtual input channels. The control and storage module includes multiple entries, at least one of which is shared by the multiple virtual input channels, meaning the device supports multiple virtual channels sharing storage resources. Each entry corresponds to an index. When the device receives a message packet through any virtual input channel, the buffer provides an index for the message packet, and the control and storage module determines the entry for storing the message packet based on the index, storing the message packet into the corresponding entry. With multiple virtual channel resources shared, the device can accurately locate the storage position of the message packet, ensuring successful storage. Compared to prior art communication devices, the storage resources available for a single virtual input channel are increased, improving the utilization rate of storage resources within the communication device.

[0036] The communication device of this disclosure further divides the virtual input channel / virtual output channel into virtual input sub-channels / virtual output sub-channels corresponding to different physical input ports / physical output ports. This ensures that when a virtual output sub-channel is blocked and cannot be used, other virtual output sub-channels can still be used normally when the corresponding physical output port is open. This solves the problem of unreasonable blocking of virtual channels and increases the number of storage resources that can be used to store new message packets.

[0037] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0038] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0039] Figure 1 A schematic diagram showing the structure of a communication device using existing channel virtualization technology.

[0040] Figure 2 This illustrates exemplary application scenarios of a communication device according to embodiments of the present disclosure.

[0041] Figure 3 A schematic diagram showing the topology of an on-chip network according to an embodiment of the present disclosure is provided.

[0042] Figure 4 A schematic diagram showing the structure of a communication device according to an embodiment of the present disclosure is provided.

[0043] Figure 5 A schematic diagram illustrating the correspondence between entries and indexes in a control and storage module according to an embodiment of the present disclosure is shown.

[0044] Figure 6 A schematic diagram showing the configuration of a first selector in a control and storage module according to an embodiment of the present disclosure is provided.

[0045] Figure 7a A schematic diagram illustrating the splitting of a virtual input channel according to an embodiment of this disclosure is shown.

[0046] Figure 7b A schematic diagram illustrating the splitting of virtual output channels according to an embodiment of this disclosure is shown.

[0047] Figure 7c A schematic diagram showing the structure of a control and storage module according to an embodiment of the present disclosure is provided.

[0048] Figure 7d A schematic diagram illustrating the correspondence between the index, the first entry, and the second entry according to an embodiment of this disclosure is provided.

[0049] Figure 7e A schematic diagram showing the configuration of a third selector in a memory according to an embodiment of the present disclosure is provided.

[0050] Figure 8 A schematic diagram showing the structure of a communication device according to an embodiment of the present disclosure is provided.

[0051] Figure 9 A schematic diagram illustrating the data storage of the control and storage module according to an embodiment of the present disclosure is shown.

[0052] Figure 10A schematic diagram illustrating the data storage of the control and storage module according to an embodiment of the present disclosure is shown.

[0053] Figure 11 A schematic diagram illustrating the flow of a data storage method according to an embodiment of the present disclosure is shown. Detailed Implementation

[0054] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0055] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof. The terminology used throughout the description is illustrative and not intended to be limiting. Those skilled in the art will understand that a variety of embodiments, differing from the illustrative details, may be implemented. In some embodiments, well-known structures, components, signals, computer program instructions, and techniques are not shown in detail to avoid obscuring the methods described herein.

[0056] The use of the term "automatic" in this invention can refer to a fully automatic or semi-automatic implementation of certain aspects of the implementation controlled by a user or administrator, depending on the specific implementation desired by those skilled in the art. Different terms used in this invention, such as module, element, NoC component, network element, router, switch, network interface, link, or low-power module, are interchangeably considered as NoC components.

[0057] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.

[0058] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.

[0059] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0060] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can 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 in order to highlight the main points of this disclosure.

[0061] Figure 1 A schematic diagram showing the structure of a communication device using existing channel virtualization technology.

[0062] like Figure 1 As shown, the communication device 200 includes: input units 210-1 to 210-N (collectively referred to as input units 210, where N is an integer greater than 1), output units 230-1 to 230-M (collectively referred to as output units 230, where M is an integer greater than 1), a routing table 220, a VC allocator 222, a switch allocator 224, and a switch 226. Each input unit 210 is used to connect to the output units (not shown) of other communication devices. Each output unit 230 is used to connect to the input units of other communication devices. A physical transmission channel is formed between the connected input units and output units. For input units, this physical transmission channel can be a physical input channel; for output units, this physical transmission channel can be a physical output channel.

[0063] The channel virtualization method of the communication device 200 is as follows: Sufficient storage resources are reserved in the input unit 210 for the physical input channel to which the input unit 210 belongs, enabling the physical input channel to be time-division multiplexed into multiple virtual input channels. Each virtual input channel has independent storage resources, used to store message packets input through the virtual input channel and the status information of the virtual input channel, etc. Sufficient storage resources are reserved in the output unit 230 for the physical output channel to which the output unit 230 belongs, enabling the physical output channel to be time-division multiplexed into multiple virtual output channels. Each virtual output channel has independent storage resources, used to store the status information of the virtual output channel, the number of available credits, etc.

[0064] When a message packet is received through a virtual input channel, the message packet will be stored in the storage resources corresponding to the virtual input channel. When the communication device determines that the message packet needs to be output through any output unit, it can select a virtual output channel obtained by time-division multiplexing the physical output channel to output the message packet according to the status information stored in the output unit.

[0065] For example, input unit 210 includes input state machine groups 214-1 to 214-N (collectively referred to as input state machine group 214, including one or more input state machines) and VC buffer groups 212-1 to 212-N (collectively referred to as VC buffer group 212, including one or more VC buffers). Input state machine group 214 stores the state information of the input unit, such as idle, requesting the routing table, requesting the VC distributor, requesting the switching distributor, etc. VC buffer group 212 stores the message packets and control methods of each virtual input channel related to the input unit 210 to which VC buffer group 212 belongs. The data and control methods of different virtual input channels are stored in different VC buffers.

[0066] Output unit 230 includes output state machine groups 234-1 to 234-M (collectively referred to as output state machine group 234, including one or more output state machines) and VC buffer status register groups 232-1 to 232-M (collectively referred to as VC buffer status register group 232, including one or more VC buffer status registers). Output state machine group 234 stores the status information of the output unit, such as idle or allocated. VC buffer status register group 232 stores information such as the number of available credits for each virtual output channel associated with the output unit 230 to which VC buffer status register group 232 belongs. Since the virtual output channels of this level communication device serve as virtual input channels for lower-level communication devices, the number of available credits for a virtual output channel indicates the number of storage resources (such as VC buffers) available for that virtual output channel when it serves as a virtual input channel in the lower-level communication device. Information such as the number of available credits for different virtual output channels is stored in different VC buffer status registers. If the number of available credits for a virtual output channel is insufficient, message packets cannot be output through that virtual output channel.

[0067] The message packet is received and stored by any one of the input units 210. The routing table 220 is used to find the corresponding output unit 230 in the communication device 200 (i.e., which output unit 230 the message packet needs to be output through) based on the destination device identifier in the message packet. The VC distributor 222 is used to allocate a virtual output channel for the message packet according to the corresponding output unit 230. The switch distributor 224 is used to allocate a time slice for the virtual output channel corresponding to the message packet. During this time slice, the switch 226 connects the input unit 210 and the output unit 230 corresponding to the message packet, so that the message packet is output through the allocated virtual output channel.

[0068] The disadvantages of this communication device are as follows:

[0069] On the one hand, the purpose of setting up virtual input / output channels is to improve the utilization rate of physical transmission channels. Therefore, the more virtual input / output channels are used, the greater the utilization rate of physical transmission channels. If only one virtual input channel is used within a certain period of time, the storage resources corresponding to other virtual input channels will be idle, resulting in a decrease in the storage resource utilization rate of the communication device.

[0070] On the other hand, existing communication devices output message packets according to the order in which they are received. If message packet 1 and message packet 2, received sequentially by the same communication device, need to be output to the same communication device via the same output unit, then the virtual output channels allocated to the two message packets by the same communication device will also correspond to the same output unit. If the two message packets happen to be allocated to the same virtual output channel, and the physical output port of the first received message packet 1 is blocked in the lower-level communication device, then the first received message packet 1 will not be output. Even if the physical output port of the second received message packet 2 is open in the lower-level communication device, since the unoutput message packet 1 is the message packet that the virtual output channel needs to output first, the second received message packet 2 cannot be output either, reducing the communication efficiency of the communication device. In addition, output unit blocking will also cause the VC buffer resources to be occupied by unoutput message packets for a long time, reducing the storage resources available for storing new message packets.

[0071] In view of this, this disclosure proposes a communication device, a data storage method, a chip, and an electronic device. In the communication device of the embodiments of this disclosure, multiple virtual channels can share the storage resources of the communication device, thereby improving the utilization rate of storage resources within the communication device.

[0072] Furthermore, the communication device in this embodiment further divides the virtual input channel / virtual output channel into virtual input sub-channels / virtual output sub-channels corresponding to different physical input ports / physical output ports. This ensures that when a virtual output sub-channel is blocked and cannot be used due to the blockage of its corresponding physical output port, other virtual output sub-channels can still be used normally when their corresponding physical output ports are open. This solves the problem of unreasonable blocking of virtual channels and increases the number of storage resources available for storing new message packets.

[0073] Figure 2 This illustrates exemplary application scenarios of a communication device according to embodiments of the present disclosure.

[0074] like Figure 2As shown, the computing system 100 is located on a chip and includes an on-chip network 110 for connecting a memory controller 150 (as a slave), an interconnect link 160, and multiple clients (as masters). The clients include a central processing unit 140 (CPU Complex), a graphics processing unit 142 (GPU), and a hub 144. The memory controller 150 is the interface for connecting the memory 152. The interconnect link 160 is used for inter-chip interconnection and may be, for example, NvLink, Peripheral Component Interconnect Express (PCIe), Compute Express Link (CXL), etc. The hub 144 is used for exchanging information with a multimedia engine 146. This disclosure does not limit the specific number and type of masters and slaves. For example, clients may also include a display, one or more input / output peripherals (I / O), a network interface card (NIC), etc.

[0075] The on-chip network 110 uses system-level networking technology to transmit data within the chip. Compared to traditional bus architectures, the on-chip network 110 provides a high-bandwidth, low-latency, and scalable switching network. In some implementations, the topology of the on-chip network 110 may be butterfly, ring, mesh, torus, etc.

[0076] Figure 3 A schematic diagram showing the topology of an on-chip network according to an embodiment of the present disclosure is provided.

[0077] like Figure 3 As shown, the on-chip network 110 may include communication devices 602, 604, 606, 608, 612, 614, 616, 618, 622, 624, 626, 628, 630, 632, 634, 636, 638, 640, and 642, wherein communication devices 602, 604, 606, and 608 are connected to the host, and communication devices 612, 614, 616, and 618 are connected to the slave. The communication devices may be routers, etc., and this embodiment does not limit the specific type of communication device.

[0078] A host device can generate a message packet to be sent to a slave device. The host device is the source device of the message packet, and the slave device is the destination device of the message packet. The message packet can be input into the on-chip network through a communication device connected to the host device, output to a communication device connected to the slave device through the communication device in the on-chip network, and then output to the slave device through the communication device.

[0079] For example, graphics processor 142 can generate message packets to be sent to memory controller 150. Assuming graphics processor 142 is connected to communication device 602 and memory controller 150 is connected to communication device 616, the message packets can be input to the on-chip network via communication device 602, output to communication device 616 via communication devices 602, 622, 628, 642, and 638, and then output to memory controller 150 via communication device 616. Memory controller 150 can further output the message packets to memory 152 for storage.

[0080] Figure 4 A schematic diagram showing the structure of a communication device according to an embodiment of the present disclosure is provided.

[0081] like Figure 4 As shown, in one possible implementation, this disclosure proposes a communication device, which includes a buffer, a control and storage module, and multiple virtual input channels.

[0082] The control and storage module includes multiple entries, at least one of which is shared by multiple virtual input channels, and each entry corresponds to an index;

[0083] The device receives message packets through any virtual input channel;

[0084] Buffers are used to provide indexes for message packets;

[0085] The control and storage module is used to determine the entry for storing message packets based on the index and store the message packets into the corresponding entry.

[0086] For example, a communication device may include multiple virtual input channels, which may be obtained through time-division multiplexing using channel virtualization technology as described in the prior art. The communication device can receive message packets through any one of the virtual input channels.

[0087] In one possible implementation, the message packet includes first data and second data. The first data is the metadata of the message packet, and the second data is the payload data of the message packet. This disclosure does not limit the specific content of the first and second data. An exemplary data structure for the first data is given below.

[0088] The communication device also includes a buffer, a control, and a storage module. The control and storage module comprises multiple entries. These entries can be implemented using static random access memory (SRAM) or a register array.

[0089] In the control and storage module, each entry corresponds to an index. The buffer is used to provide an index for the message packet, and the control and storage module is used to determine the entry for storing the message packet according to the index.

[0090] The amount of data that can be received by the virtual input channel per clock cycle is limited. If the message packet is too large, it can be received in multiple clock cycles. The buffer provides an index for the message packet in each clock cycle. The maximum number of indexes provided by the buffer in each clock cycle depends on the amount of data that can be received by the virtual input channel per clock cycle and the amount of data that can be stored in each entry. For example, if the amount of data that can be received by the virtual input channel per clock cycle is equal to K times the amount of data that can be stored in a single entry (K is a positive integer), the maximum number of indexes provided by the buffer in each clock cycle can be equal to K.

[0091] In one example, the correspondence between the entries and indexes in the control and storage module can be set in a direct mapping manner. Figure 5 A schematic diagram showing the correspondence between the entries and indexes in the control and storage module according to an embodiment of the present disclosure.

[0092] As Figure 5 shown, the buffer includes 16 third entries (C1 - C16), and each third entry stores an index. The control and storage module includes 16 entries (A1 - A16). When the value of the index is i (0 < i ≤ 16, i is an integer), it corresponds to the i-th entry of the control and storage module.

[0093] Those skilled in the art should understand that as long as different indexes correspond to different entries in the control and storage module, the present disclosure does not limit the setting method of the correspondence between the entries and indexes in the control and storage module. Those skilled in the art should understand that the buffer and the control and storage module may include more or fewer entries, and the present disclosure does not limit this.

[0094] In one example, the buffer uses a pointer to allocate an index for the message packet. When the message packet is input, the index pointed to by the pointer is the index provided to the message packet. The buffer can be a sequential stack buffer. In the initial state, the pointer can point to the first third entry C1. After providing the index stored in the j-th third entry (0 < j ≤ 16, i is an integer) to the message packet, the pointer can be moved to point to the (j + 1)-th third entry. As Figure 5 shown, the pointer currently points to the index stored in the 8th third entry C8. Assuming that a single entry can completely store the message packet, the index stored in the third entry C8 is the index provided to the message packet. After providing the index stored in the third entry C8 to the message packet, the pointer can be moved to point to the index stored in the 9th third entry C9.

[0095] Those skilled in the art should understand that if the pointer initially points to the 16th third entry C16, then after providing the index of the jth third entry to the message packet, the pointer can be moved to point to the (j-1)th third entry. This embodiment of the present disclosure does not restrict the direction of pointer movement.

[0096] Some operations may cause a reset, such as restarting the communication device. After a reset, the pointer returns to its initial state, and the index stored in each entry of the buffer is reset to the value corresponding to the entry's number. For example, after a reset, the index stored in entry C1 of the buffer is 1, and the index stored in entry C2 is 2.

[0097] The buffer can output the index provided to the message packet to the control and storage module. The control and storage module can determine the entry for storing the message packet based on the index and store the message packet in the determined entry. In this way, the communication device can complete the storage of message packets.

[0098] In one example, the control and storage module may be equipped with a first selector, which can be used to determine the entry for storing message packets and store the message packets into the determined entry.

[0099] The following describes an exemplary method of using a first selector to determine the entry for storing the message packet and storing the message packet into the determined entry.

[0100] Figure 6 A schematic diagram showing the configuration of a first selector in a control and storage module according to an embodiment of the present disclosure is provided.

[0101] like Figure 6 As shown, the first selector is located in the control and storage module. The input of the first selector is used to receive message packets, and the 16 outputs are connected to 16 entries A1-A16 respectively.

[0102] The first selector decodes the index into a 16-bit mask. When the index value is i, it determines that the entry for storing the message packet is the i-th entry. The i-th bit of the mask is decoded as 1, and the other bits are decoded as 0. The value of the i-th bit of the mask determines the connection state between the input and the i-th output of the first selector. When the value is 0, the input and the i-th output of the first selector are disconnected; when the value is 1, the input and the i-th output are connected, and the message packet can be stored in the i-th entry. In this case, the first selector can store the message packet in the determined entry according to the index.

[0103] Those skilled in the art will understand that the structure and decoding method of the first selector are not limited to the examples described above. As long as the first selector in the control and storage module can determine the entry for storing the message packet, the message packet can be stored into the determined entry. The control and storage module may also use other methods to determine the entry for storing the message packet and store the message packet into the determined entry. This disclosure does not limit this approach.

[0104] The control and storage module includes at least one entry shared by multiple virtual input channels. Those skilled in the art will understand that the number of shared entries does not need to be fixed, as long as there are enough entries to share. For example, assuming there are two virtual input channels, IVC1 and IVC2, with IVC1 and IVC2 sharing 8 entries, IVC1 having 4 private entries, and IVC2 having 4 private entries, then if only IVC1 is used during a certain period, there are 12 available entries and only 4 idle entries. However, according to the prior art, with 16 VC buffers, IVC1 corresponds to 8 VC buffers, and IVC2 corresponds to 8 VC buffers, resulting in 8 available VC buffers and 8 idle VC buffers. Clearly, the communication device of this disclosure has more usable storage resources and fewer idle storage resources, improving the utilization rate of storage resources within the communication device.

[0105] A communication device according to an embodiment of this disclosure includes a buffer, a control and storage module, and multiple virtual input channels. The control and storage module includes multiple entries, at least one of which is shared by the multiple virtual input channels, meaning the device supports multiple virtual channels sharing storage resources. Each entry corresponds to an index. When the device receives a message packet through any virtual input channel, the buffer provides an index for the message packet, and the control and storage module determines the entry for storing the message packet based on the index, storing the message packet into the corresponding entry. With multiple virtual channel resources shared, the device can accurately locate the storage position of the message packet, ensuring successful storage. Compared to prior art communication devices, the storage resources available for a single virtual input channel are increased, improving the utilization rate of storage resources within the communication device.

[0106] In one possible implementation, the device further includes multiple physical input ports, multiple physical output ports, and multiple virtual output channels, with the communication device connecting to a lower-level communication device via the physical output ports.

[0107] Each virtual input channel includes multiple virtual input sub-channels, and each virtual input sub-channel corresponds to a physical output port of the device;

[0108] Each virtual output channel includes multiple virtual output sub-channels, and each virtual output sub-channel corresponds to a physical output port of the lower-level communication device.

[0109] The message packet is received through one of multiple virtual input sub-channels, and the control and storage module is also used for...

[0110] When storing the first data, the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet are written to the entry storing the first data;

[0111] Select a first target entry from the entries storing valid first data, determine a virtual output sub-channel based on the first target entry, and output the data stored in the first target entry through the virtual output sub-channel;

[0112] Release the first target entry and output the index corresponding to the first target entry to the buffer.

[0113] For example, a communication device may include multiple physical input ports, multiple physical output ports, and multiple virtual output channels. The multiple virtual output channels may be obtained through time-division multiplexing using channel virtualization technology, as is currently available. Multiple virtual input channels can be multiplexed for each physical input port, and multiple virtual output channels can be multiplexed for each physical output port.

[0114] As described above, any physical input port on the communication device may communicate with any physical output port on the same communication device. Therefore, for each virtual input channel, multiple virtual input sub-channels can be further subdivided, so that each virtual input sub-channel corresponds to a physical output port.

[0115] Figure 7a A schematic diagram illustrating the splitting of a virtual input channel according to an embodiment of this disclosure is shown.

[0116] by Figure 3 Taking the communication device 622 shown as an example, the communication device 622 includes two physical output ports q0 and q1. Figure 7a As shown, assuming the communication device 622 also includes virtual input channels IVC1 and IVC2, virtual input channel IVC1 can be further subdivided into two virtual input sub-channels IVC1_1 and IVC1_2. Virtual input channel IVC2 can be further subdivided into two virtual input sub-channels IVC2_1 and IVC2_2. IVC1_1 and IVC2_1 can correspond to physical output port q0, and IVC1_2 and IVC2_2 can correspond to physical output port q1.

[0117] Any physical output port on a communication device is connected to a physical input port of a lower-level communication device. However, within the lower-level communication device, that physical input port may communicate with any physical output port on that lower-level communication device. Therefore, each virtual output channel of the current-level communication device can be further subdivided into multiple virtual output sub-channels, such that each virtual output sub-channel corresponds to a physical output port of the lower-level communication device.

[0118] Figure 7b A schematic diagram illustrating the splitting of virtual output channels according to an embodiment of this disclosure is shown.

[0119] by Figure 3 Taking the communication device 622 shown as an example, the lower-level communication device of communication device 622 is communication device 628, which includes two physical output terminals p0 and p1. Figure 7b As shown, assuming the communication device 622 also includes virtual output channels OVC1 and OVC2, virtual output channel OVC1 can be further subdivided into two virtual output sub-channels OVC1_1 and OVC1_2. Virtual output channel OVC2 can be further subdivided into two virtual output sub-channels OVC2_1 and OVC2_2. OVC1_1 and OVC2_1 can correspond to physical output port p0, and OVC1_2 and OVC2_2 can correspond to physical output port p1.

[0120] The message packet received by the local communication device through any virtual input channel may be received through one of the multiple virtual input sub-channels included in that virtual input channel. The control and storage module is further configured to, when storing the first data, write the identifiers of the virtual input sub-channel (i.e., the virtual input sub-channel in the local communication device that receives the message packet) and the virtual output sub-channel (i.e., the virtual output sub-channel in the local communication device that outputs the message packet) corresponding to the message packet into the entries stored in the first data. An example of determining the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet is given later.

[0121] It should be understood that as long as an entry stores valid first data, it means that the communication device at this level has a message packet to be sent. Therefore, the control and storage module is also used to select a first target entry from the entries storing valid first data, determine a virtual output sub-channel based on the selected first target entry, and output the data stored in the first target entry through the virtual output sub-channel. An exemplary method for selecting a first target entry from the entries storing valid first data is given below.

[0122] The selected first target entry stores the identifier of the virtual output sub-channel, and the determined virtual output sub-channel can be indicated by this identifier.

[0123] Once the data stored in the entry is output, the data stored in the entry becomes invalid. Therefore, the control and storage module can release the selected first target entry and output the number of the released first target entry as an index to the buffer.

[0124] After receiving an index from the control and storage module, the buffer can determine that the entry corresponding to that index in the control and storage module has been released. When the pointer initially points to the first third entry and is currently pointing to the j-th third entry, the pointer can be moved to point to the (j-1)-th third entry. Simultaneously, the received index is written to the (j-1)-th third entry. For example... Figure 5 As shown, the pointer is currently pointing to the index stored in the 8th third entry C8. If index 5 (not shown) is received, the pointer can be moved to point to the 7th third entry C7, and index 5 can be written into entry C7.

[0125] Those skilled in the art should understand that if the pointer initially points to the 16th third entry and the pointer currently points to the jth third entry, then after providing the index of the jth third entry to the message packet, the pointer can be moved to point to the (j+1)th third entry. The embodiments of this disclosure do not restrict the direction of pointer movement.

[0126] In this scenario, if message packet 1 and message packet 2, received sequentially by the current communication device, need to be output to the next-level communication device via the same physical output port, but are output through different output ports in the next-level communication device, then the virtual output sub-channels allocated by the current communication device for the two message packets will be different. Even if the physical output port of the first received message packet 1 is blocked in the next-level communication device, as long as the physical output port of the second received message packet 2 is open in the next-level communication device, the current communication device can use the virtual output sub-channel allocated for message packet 2 to output message packet 2, thereby improving the communication efficiency of the communication device. The storage resources in the current communication device used to store message packet 2 can be released in a timely manner, increasing the storage resources available for storing new message packets.

[0127] The following describes an exemplary data structure for the first data.

[0128] In one possible implementation, the first data includes one or more of the following: source device identifier, destination device identifier, packet priority, quality of service parameters, data length, and data duration.

[0129] For example, the message packet is initially sent by the host, which acts as the source device, and the first data may include the source device identifier. The destination slave device is known to which the message packet will be sent, and the first data may include the destination device identifier.

[0130] Some message packets are more important and can have a higher priority; therefore, the first data packet may include the message packet priority. Message packets with higher priority can be output first.

[0131] The Quality of Service (QoS) parameter of a message packet can be further divided into various types of parameters related to the transmission quality of the message packet, such as bandwidth, latency, and packet loss rate. Message packets with better QoS parameters are given priority for output.

[0132] The data length of the message packet is not fixed, so the first data may include the data length of the message packet.

[0133] Since message packets are generated at different times, their duration can be recorded using data expiration. Message packets with longer expiration periods are prioritized for output.

[0134] Those skilled in the art will understand that the first data may include more or less content, and the embodiments disclosed herein do not limit the specific content included in the first data.

[0135] Figure 7c A schematic diagram showing the structure of a control and storage module according to an embodiment of the present disclosure is provided.

[0136] like Figure 7c As shown, in one possible implementation, the control and storage module includes a control queue and a memory. The control queue includes multiple first entries, and the memory includes multiple second entries. Each index corresponds to one first entry and one second entry.

[0137] The control queue is used to determine the first entry for storing the first data based on the index, and to store the first data into the corresponding first entry.

[0138] The memory is used to determine the second entry for storing the second data based on the index, and to store the second data into the corresponding second entry.

[0139] For example, the control and storage module may include a control queue and a memory. The control queue includes multiple first entries, and the memory includes multiple second entries. Each index corresponds to one first entry and one second entry.

[0140] The control queue is used to determine the first entry for storing the first data based on the index, and then stores the first data into the corresponding first entry. The memory is used to determine the second entry for storing the second data based on the index, and then stores the second data into the corresponding second entry.

[0141] At this time, the maximum number of indexes provided by the buffer per clock cycle depends on the amount of data that the virtual input channel can receive per clock cycle and the amount of data that the second entry can store. For example, if the amount of data that the virtual input channel can receive per clock cycle is K times the amount of data that the second entry can store (K is a positive integer), the maximum number of indexes provided by the buffer per clock cycle can be equal to K.

[0142] In one example, the correspondence relationship among the index, the first entry, and the second entry can be set in a direct mapping manner. Figure 7d A schematic diagram showing the correspondence relationship among the index, the first entry, and the second entry according to an embodiment of the present disclosure.

[0143] As Figure 7d shown, the buffer includes 16 third entries (C1 - C16), and each third entry stores an index. The control queue includes a total of 16 first entries (D1 - D16), and the memory includes a total of 16 second entries (B1 - B16). When the value of the index is i (0 < i ≤ 16, i is an integer), it corresponds to the i-th first entry and the i-th second entry.

[0144] Those skilled in the art should understand that as long as different indexes correspond to different first entries and different second entries, the present disclosure embodiment does not limit the setting manner of the index, the first entry, and the second entry. Those skilled in the art should understand that the buffer, the control queue, and the memory may include more or fewer entries, and the present disclosure embodiment does not limit this.

[0145] In one example, the buffer uses a pointer to allocate an index to the message packet. Its exemplary implementation has been described above and will not be elaborated here.

[0146] The buffer can output the indexes provided to the message packet to the control queue and the memory respectively. The control queue can determine the first entry for storing the first data according to the index, and store the first data into the determined first entry. The memory can determine the second entry for storing the second data according to the index, and store the second data into the determined second entry. In this way, the communication device can complete the storage of the message packet.

[0147] In one example, a first selector can be set in the control queue, and the first selector can be used to determine the first entry for storing the first data, and store the first data into the determined first entry. A first selector can be set in the memory, and the first selector can be used to determine the second entry for storing the second data, and store the second data into the determined second entry.

[0148] For an exemplary manner of using the first selector to determine the entry for storing data and storing the data into the entry, reference can be made to Figure 6 and related descriptions, which will not be elaborated here.

[0149] The control queue includes at least one first entry shared by multiple virtual input channels, and the memory includes at least one second entry shared by multiple virtual input channels. Those skilled in the art will understand that the shared first / second entries need not be fixed, as long as there are enough first / second entries to share.

[0150] In one possible implementation, the control queue is further used to take the second entry corresponding to the first target entry as the second target entry, and the control memory reads out the second data stored in the second target entry;

[0151] The control queue is specifically used to merge the first data stored in the first target entry with the second data stored in the second target entry, and then output the data through the virtual output sub-channel.

[0152] The control queue is also used to control the memory to release the second target entry when the first target entry is released.

[0153] For example, since the first entry is the one that stores the first data, and the second entry does not store the first data, the control queue can select the first target entry from the entries that store valid first data. Furthermore, the control queue can also be used to select the second entry corresponding to the first target entry as the second target entry, and control the memory to read the second data stored in the second target entry.

[0154] For example, according to Figure 7d As shown in the diagram, the control queue can output the number of the selected first target entry as an index to the memory. The memory may also include a third selector, which can be used to determine the output of the second target entry based on the index from the control queue, and read out the second data stored in the second target entry.

[0155] The following describes an exemplary method for using a third selector to determine the second entry of the output second data.

[0156] Figure 7e A schematic diagram showing the configuration of a third selector in a memory according to an embodiment of the present disclosure is provided.

[0157] like Figure 7e As shown, the third selector is located in the memory. The 16 input terminals of the third selector are connected to 16 second entries B1-B16 respectively, and the output terminal is used to output the second data.

[0158] The third selector decodes the index from the control queue into a 16-bit mask. When the index value is i, it determines the second data stored in the i-th second entry, decoding the i-th bit of the mask as 1 and the other bits as 0. The value of the i-th bit of the mask determines the connection state between the i-th input and output of the third selector. When the value is 0, the i-th input and output of the third selector are disconnected; when the value is 1, the i-th input and output of the third selector are connected, and the second data is output from the i-th second entry. In this case, the third selector can output the second data stored in the determined second entry according to the number.

[0159] Once the stored second data is output, the data stored in the second entry and the corresponding first entry become invalid. Therefore, the control queue can release the selected first target entry. When releasing the first target entry, the control memory releases the second target entry. Since the index of the first target entry is the same as the index of the second target entry, the control queue can output the index of the first target entry to the buffer.

[0160] After receiving an index from the control queue, the buffer can update its stored index and move its pointer. An exemplary implementation has been described above and will not be repeated here.

[0161] By controlling the queue and storing the first and second data respectively, the timing of the communication device is improved and the efficiency is increased.

[0162] The following describes an exemplary method for determining the identifiers of the virtual input subchannel and virtual output subchannel corresponding to a message packet.

[0163] Figure 8 A schematic diagram showing the structure of a communication device according to an embodiment of the present disclosure is provided.

[0164] like Figure 8 As shown, in one possible implementation, the device further includes a topology storage module for storing the topology of the on-chip network where the communication device resides. The first data includes a source device identifier and a destination device identifier. The control and storage module is specifically used for...

[0165] When storing the first data, the location of the communication device on the transmission path of the message packet and the maximum number of physical input / output ports of all communication devices in the topology are determined based on the first data and the topology.

[0166] Based on the location, maximum quantity, and the number of the virtual input channel corresponding to the message packet, determine the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet, and write the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet to the entry storing the first data.

[0167] For example, the communication device may include a topology storage module for storing the topology of the on-chip network in which the communication device resides. An exemplary topology can be found in [reference needed]. Figure 3 .

[0168] The first data includes the source device identifier and the destination device identifier. Based on the first data and the topology, the control and storage module can determine the position of the communication device on the transmission path of the message packet, as well as the maximum number of physical input / output ports of all communication devices in the topology. Figure 3 In the example, the maximum number of physical input / output ports for all communication devices in the topology is 2.

[0169] The virtual input channel number corresponding to the message packet is known. Based on the determined location, the determined maximum quantity, and the virtual input channel number corresponding to the message packet, the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet can be determined. The determined identifiers can be written into the entry storing the first data.

[0170] The virtual input sub-channels and virtual output sub-channels of the communication device in this embodiment are determined based on the Next-hop-Output Queueing (NOQ). A hop refers to a transmission path that passes through a communication device.

[0171] The following provides an exemplary method for determining the identifier of the virtual input subchannel corresponding to a message packet.

[0172] In one possible implementation, the control and storage module is specifically used for,

[0173] Based on the maximum quantity, determine the first value X and the second value Y, where X is the minimum bit width of the physical input / output ports of all communication devices, and Y = 2^X, where X and Y are positive integers;

[0174] When the communication device is the first communication device on the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and the product is the identifier of the virtual input sub-channel corresponding to the message packet.

[0175] When the communication device is not the first communication device on the transmission path of the message packet, the identifier of the virtual output sub-channel corresponding to the message packet in the upper-level communication device is used as the identifier of the virtual input sub-channel corresponding to the message packet.

[0176] For example, such as Figure 3As shown, assuming the source device of the message packet is communication device 602 and the destination device is communication device 616, the transmission path of the message packet could be 602-622-628-642-638-616. Assume the virtual input channel number corresponding to the message packet is 1.

[0177] The maximum number of physical input / output ports for all communication devices is 2. First, based on this maximum number, a first value X can be determined, where X is the minimum bit width of all physical input / output ports for all communication devices. Based on the first value X, a second value Y can be determined, where Y is the alignment value for the maximum number, Y = 2^X. For example, when the maximum number is 2, since 2^1 ≥ 2 > 2^0, X can be equal to 1, and Y can be equal to 2.

[0178] When the communication device is the first communication device on the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and the product is the identifier of the virtual input sub-channel corresponding to the message packet. For example, when communication device 602 is the local communication device and is the first communication device on the transmission path of the message packet, the identifier of the virtual input sub-channel of the message packet in communication device 602 can be 1×2=2.

[0179] Since the virtual output subchannel of the current communication device also serves as the virtual input subchannel of the next lower-level communication device, when the current communication device is not the first communication device in the transmission path of the message packet, it can be determined that the virtual output subchannel determined after the message packet enters the next higher-level communication device is the same as the virtual input subchannel of the message packet in the current communication device. In this case, the identifier of the virtual output subchannel corresponding to the message packet in the next higher-level communication device can be directly used as the identifier of the virtual input subchannel corresponding to the message packet. For example, when communication device 622 is the current communication device, it is not the first communication device in the transmission path of the message packet, and its next higher-level communication device is communication device 602. In this case, the identifier of the virtual input subchannel of the message packet in communication device 622 can be the same as the identifier of the virtual output subchannel of the message packet in communication device 602.

[0180] In this way, the identifier of the virtual input sub-channel corresponding to the message packet in each communication device can be accurately calculated.

[0181] The following provides an exemplary method for determining the identifier of the virtual output subchannel corresponding to a message packet.

[0182] In one possible implementation, the control and storage module is specifically used for,

[0183] Based on the maximum quantity, determine the first value X and the second value Y, where X is the minimum bit width of the physical input / output ports of all communication devices, and Y = 2^X, where X and Y are positive integers;

[0184] When the communication device is the last communication device on the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and the product is the identifier of the virtual output sub-channel corresponding to the message packet.

[0185] When the communication device is not the last communication device on the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and then added to the number of the physical output port used by the lower-level communication device on the transmission path of the message packet, as the identifier of the virtual output sub-channel corresponding to the message packet.

[0186] For example, such as Figure 3 As shown, assume the message packet transmission path is 602-622-628-642-638-616. Assume the virtual input channel number corresponding to the message packet is 1.

[0187] The maximum number of physical input / output ports for all communication devices is 2. In this case, the first value X can be equal to 1, and the second value Y can be equal to 2. Exemplary methods for determining X and Y have been described above and will not be repeated here.

[0188] When the communication device is the last communication device in the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and the product is the identifier of the virtual output sub-channel corresponding to the message packet. For example, when communication device 616 is the communication device at this level and is the last communication device in the transmission path of the message packet, the identifier of the virtual output sub-channel of the message packet in communication device 616 can be 1×2=2.

[0189] When the communication device is not the last communication device in the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and then added to the number of the physical output port used by the lower-level communication device in the transmission path of the message packet. This multiplication is used as the identifier of the virtual output sub-channel corresponding to the message packet. For example, when communication device 622 is the local communication device, it is not the first communication device in the transmission path of the message packet. Its lower-level communication device is communication device 628, and the message packet needs to be output using physical output port p0 on communication device 628. Then, the identifier of the virtual output sub-channel of the message packet in communication device 622 can be 1×2+0=2.

[0190] In this way, the identifier of the virtual output sub-channel corresponding to the message packet in each communication device can be accurately calculated.

[0191] Similarly, assuming message packet 1 is transmitted via transmission path 602-622-628-642-638-616, the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to message packet 1 in each communication device are as follows:

[0192] The identifier of the virtual input sub-channel corresponding to the message packet in the communication device 602 can be 1×2=2; the message packet is output through the physical output port q1 in the lower-level communication device 622 of the communication device 602, and the identifier of the virtual output sub-channel corresponding to the message packet in the communication device 602 can be 1×2+1=3.

[0193] The identifier of the virtual input sub-channel corresponding to the message packet in the communication device 622 can be 3; the message packet is output through the physical output port p0 in the lower-level communication device 628 of the communication device 622, and the identifier of the virtual output sub-channel corresponding to the message packet in the communication device 622 can be 1×2+0=2.

[0194] The identifier of the virtual input sub-channel corresponding to the message packet in communication device 628 can be 2; the lower-level communication device 642 of communication device 628 has only one physical output port, and the number of this physical output port is 0 by default. The identifier of the virtual output sub-channel corresponding to the message packet in communication device 628 can be 1×2+0=2;

[0195] The identifier of the virtual input sub-channel corresponding to the message packet in communication device 642 can be 2; the lower-level communication device 638 of communication device 642 has only one physical output port, and the number of this physical output port is 0 by default. The identifier of the virtual output sub-channel corresponding to the message packet in communication device 642 can be 1×2+0=2;

[0196] The identifier of the virtual input sub-channel corresponding to the message packet in communication device 638 can be 2; the downstream communication device 616 of communication device 638 is already the last communication device on the transmission path, and by default, the message packet is output through the physical output port numbered 0 in communication device 616. The identifier of the virtual output sub-channel corresponding to the message packet in communication device 638 can be 1×2+0=2;

[0197] The identifier of the virtual input sub-channel corresponding to the message packet in communication device 616 can be 2; since communication device 616 is the last communication device on the transmission path, the identifier of the virtual output sub-channel corresponding to the message packet in communication device 616 can be 1×2=2.

[0198] The following describes an exemplary method for the control and storage module to select the first target entry.

[0199] In one possible implementation, multiple virtual output sub-channels of the communication device serve as multiple virtual input sub-channels of the lower-level communication device.

[0200] The device also includes a statistics module, which counts the number of free entries shared by all virtual input sub-channels in the lower-level communication device, as well as the number of free entries private to each virtual input sub-channel in the lower-level communication device.

[0201] The control and storage module is specifically used to filter out entries that meet the first preset condition from the entries that store valid first data, and obtain the first candidate group. The first preset condition is that the data storage duration of the current entry is greater than the identifier of other entries that store the same virtual input sub-channel as the current entry.

[0202] Based on the identifier of the virtual output sub-channel stored in each entry and the statistical results of the statistical module, entries that meet the second preset condition are selected from the first candidate group to obtain the second candidate group. The second preset condition is that the number of available free entries in the virtual input sub-channel corresponding to the identifier of the virtual output sub-channel stored in the current entry in the lower-level communication device is greater than the number of entries used to store the message packet corresponding to the current entry.

[0203] Select at least one entry from the second candidate group as the first target entry.

[0204] For example, such as Figure 8 As shown, the device also includes a statistics module, which counts the number of free entries shared by all virtual input sub-channels in the lower-level communication device, as well as the number of free entries private to each virtual input sub-channel in the lower-level communication device. Free entries include entries without stored data and entries that have stored data but have been released.

[0205] Since only one virtual output subchannel can use the physical output port at any given time, the control and storage module can first filter out entries that meet the first preset condition from the entries that store valid first data to obtain the first candidate group. The first preset condition is that the data duration stored in the current entry is greater than the identifier of other entries that store the same virtual input subchannel as the current entry.

[0206] The following describes an exemplary method for filtering entries that meet the first preset condition.

[0207] In one possible implementation, the first data includes the data duration, and the control and storage module is specifically used for...

[0208] The entries storing valid first data are grouped, and the entries within each group store the same identifier for the virtual input sub-channel;

[0209] Based on the data duration of each entry, the entry with the longest data duration in each group is selected to obtain the first candidate group.

[0210] For example, since the control and storage module writes the identifier of the virtual input sub-channel to the entry when storing the first data, the entries storing valid first data can be grouped according to the identifier of the virtual input sub-channel, so that the entries in each group store the same identifier of the virtual input sub-channel, and the entries in different groups store different identifiers of the virtual input sub-channel.

[0211] Figure 9 A schematic diagram illustrating the data storage of the control and storage module according to an embodiment of the present disclosure is shown.

[0212] like Figure 9 As shown, in the control and storage module, entries A2, A4, A6-A9, A11, and A13 store valid first data. The virtual input sub-channels stored in entries A2, A4, A6, and A8 are identified as IVC0, and the virtual input sub-channels stored in entries A7, A9, A11, and A13 are identified as IVC1. The virtual output sub-channels stored in entries A2, A6, A9, and A13 are identified as OVC0, and the virtual output sub-channels stored in entries A4, A7, A8, and A11 are identified as OVC1.

[0213] In this case, two groups can be obtained. Entries A2, A4, A6, and A8 form the first group, corresponding to the virtual input sub-channel IVC0, while entries A7, A9, A11, and A13 form the second group, corresponding to the virtual input sub-channel IVC1.

[0214] The first data includes the data duration, which can be used to filter out the entries with the longest data duration stored in each group to obtain the first candidate group.

[0215] like Figure 9 As shown, the data duration of item A2 in the first group is the longest, and the data duration of item A13 in the second group is the longest. Therefore, the first candidate group may include items A2 and A13.

[0216] In this scenario, for the same virtual transmission sub-channel, the first data of a message packet with a longer data duration input through that virtual transmission sub-channel can be output earlier. Furthermore, there is no need to establish additional relationships between entries, reducing the implementation complexity of the control and storage modules.

[0217] The following describes another exemplary method for filtering entries that meet the first preset condition.

[0218] In one possible implementation, among the entries storing valid first data, entries corresponding to the same virtual input sub-channel belong to the linked list corresponding to that virtual input sub-channel.

[0219] The control and storage module is also used to, when storing the first data, use the entry storing the first data as the tail of the linked list corresponding to the determined virtual input sub-channel;

[0220] The control and storage module is specifically used to obtain the first candidate group based on the entry at the head of each linked list.

[0221] For example, an association can be established in the control and storage module for entries storing valid data, so that entries corresponding to the same virtual input sub-channel belong to the linked list corresponding to that virtual input sub-channel.

[0222] When storing the first data, a virtual input sub-channel is determined based on the first data, and the entry storing the first data can be used as the tail of the linked list corresponding to the virtual input sub-channel.

[0223] Figure 10 A schematic diagram illustrating the data storage of the control and storage module according to an embodiment of the present disclosure is shown.

[0224] like Figure 10 As shown, in the control and storage module, entries A2, A4, A6-A9, A11, and A13 store valid first data. The virtual input sub-channels stored in entries A2, A4, A6, and A8 are identified as IVC0, and the virtual input sub-channels stored in entries A7, A9, A11, and A13 are identified as IVC1. The virtual output sub-channels stored in entries A2, A6, A9, and A13 are identified as OVC0, and the virtual output sub-channels stored in entries A4, A7, A8, and A11 are identified as OVC1.

[0225] In this case, there are two linked lists in the control and storage module. The first linked list corresponds to the virtual input sub-channel IVC0 and includes entries A2, A4, A6, and A8, where entry A2 is the head and entry A8 is the tail. The second linked list corresponds to the virtual input sub-channel IVC1 and includes entries A7, A9, A11, and A13, where entry A13 is the head and entry A7 is the tail.

[0226] Since the entry storing the first piece of data is used as the tail of the linked list, the data duration of the entry at the head of the linked list must be longer than that of other entries in the list. Therefore, the entry at the head of each linked list is the one that satisfies the first preset condition. When filtering entries that satisfy the first preset condition, simply find the entry at the head of each linked list. For example... Figure 10 As shown, entries A2 and A13 are the heads of the linked list, so the first candidate group may include entries A2 and A13.

[0227] This method simplifies the process of selecting entries that meet the first preset condition. Furthermore, the first data may not include the data's lifespan, reducing storage costs for the control and storage modules.

[0228] like Figure 9 and Figure 10 As shown, since the identifier of the virtual input sub-channel is added when storing the first data, the entries corresponding to the same virtual input sub-channel can be non-contiguous entries.

[0229] The virtual output sub-channel of the current communication device serves as the virtual input sub-channel of the next-level communication device. This means that message packets output through the virtual output sub-channel of the current communication device, after being input into the next-level communication device, should be stored in a available free entry in the corresponding virtual input sub-channel. In this case, if there are insufficient free entries in the corresponding virtual input sub-channel of the next-level communication device for a particular virtual output sub-channel, then message packets output by the current communication device's virtual output sub-channel will block the physical output port of the current communication device.

[0230] Based on this, entries that meet the second preset condition can be selected from the first candidate group according to the identifier of the virtual output sub-channel stored in each entry and the statistical results of the statistical module, to obtain the second candidate group. The second preset condition is that the number of available free entries in the lower-level communication device corresponding to the identifier of the virtual output sub-channel stored in the current entry is greater than the number of entries used to store the message packet corresponding to the current entry.

[0231] There are several ways to calculate the number of available free entries for a virtual input subchannel.

[0232] The following describes a first exemplary method for calculating the number of available free entries for a virtual input subchannel.

[0233] In one possible implementation, the available free entries for any virtual input subchannel include all or part of the free entries shared by all virtual input subchannels, as well as the free entries private to that virtual input subchannel.

[0234] For example, assuming there are 4 shared free entries for all virtual input subchannels and 1 private free entry for virtual input subchannel IVC0, and all shared free entries and all private free entries for IVC0 can be used by IVC0, then the number of free entries usable by IVC0 can be 5. If an entry in the first candidate group belongs to message packet 1, and the virtual input subchannel corresponding to the identifier of the virtual output subchannel stored in that entry is IVC0, and storing message packet 1 requires 4 entries, since 5 > 4, this entry satisfies the second preset condition.

[0235] For example, suppose all virtual input subchannels share 4 free entries, and virtual input subchannel IVC0 has 1 private free entry. If only half of the shared free entries are available for IVC0 to use, and all of IVC0's private free entries are available for IVC0 to use, then the number of free entries available for IVC0 can be 3. If an entry in the first candidate group belongs to message packet 1, and the virtual input subchannel corresponding to the identifier of the virtual output subchannel stored in that entry is IVC0, and storing message packet 1 requires 4 entries, since 3 < 4, this entry does not meet the second preset condition.

[0236] The following describes a second exemplary method for calculating the number of available free entries for a virtual input subchannel.

[0237] In one possible implementation, any virtual input subchannel may have available free entries, including free entries shared by all virtual input subchannels.

[0238] For example, at least one entry can be shared by multiple virtual input channels, and a virtual input channel includes a virtual input sub-channel, so at least one entry can be shared by multiple virtual input sub-channels.

[0239] For example, assuming all virtual input subchannels share 4 free entries, and virtual input subchannel IVC0 has no private entries, all shared free entries can be used by IVC0, then the number of free entries usable by IVC0 can be 4. If an entry in the first candidate group belongs to message packet 1, and the virtual input subchannel corresponding to the identifier of the virtual output subchannel stored in that entry is IVC0, and storing message packet 1 requires 4 entries, since 4=4, this entry satisfies the second preset condition.

[0240] The following describes a third exemplary method for calculating the number of available free entries for a virtual input subchannel.

[0241] In one possible implementation, any virtual input subchannel may have available free entries, including free entries private to that virtual input subchannel.

[0242] For example, assuming all virtual input subchannels share 4 free entries, and virtual input subchannel IVC0 has 1 private free entry, only the private free entry of IVC0 can be used by IVC0, then the number of free entries that IVC0 can use is 1. If an entry in the first candidate group belongs to message packet 1, and the virtual input subchannel corresponding to the identifier of the virtual output subchannel stored in that entry is IVC0, and storing message packet 1 requires 4 entries, since 1 < 4, this entry does not meet the second preset condition.

[0243] This approach makes it more flexible to calculate the number of available free entries for virtual input sub-channels.

[0244] Those skilled in the art should understand that the number of available free entries for a virtual input subchannel can also be calculated in other ways. For example, the available free entries for a virtual input subchannel may include a portion of the free entries shared by all virtual input subchannels. The embodiments of this disclosure do not limit the specific calculation method for the number of available free entries for a virtual input subchannel.

[0245] Entries from the second candidate group can be selected for output. Optionally, entries with higher message packet priority, better quality of service parameters, or longer data duration can be prioritized. The number of selected entries can be less than or equal to the maximum number of indices provided by the buffer of the lower-level communication device per clock cycle. This disclosure does not limit the specific method or number of entries selected from the second candidate group.

[0246] Those skilled in the art should understand that the control and storage module may select entries in ways other than those described above. For example, if the control and storage module cannot determine the duration of the data stored in an entry, it may directly filter entries that meet the second preset condition from the entries that store valid first data, and then further filter entries from the entries that meet the second preset condition based on priority and other information. The embodiments of this disclosure do not limit the specific way in which the control and storage module selects entries.

[0247] Items can be selected from the control queue. The control and storage module may include a scheduler (not shown), which may be located outside the control queue and can select items. This disclosure does not limit the specific object in the control and storage module that performs the task of selecting items.

[0248] The steps described above—selecting entries, merging data, outputting data (message packets), releasing entries, transferring the index of the released entries to the buffer, and updating the buffer's index storage—can all be completed within one clock cycle. An interface (not shown) can be set between the buffer, control queue, and memory; this interface includes one or more buffers to receive and transmit data.

[0249] Figure 11 A schematic diagram illustrating the flow of a data storage method according to an embodiment of the present disclosure is shown.

[0250] like Figure 11 As shown in the embodiments of this disclosure, a data storage method is also proposed. This method is applied to a communication device, which includes a buffer, a control and storage module, and multiple virtual input channels.

[0251] The control and storage module includes multiple entries, at least one of which is shared by multiple virtual input channels, and each entry corresponds to an index;

[0252] The device receives a message packet through any virtual input channel, and the method includes:

[0253] Step S21: Use a buffer to provide an index for the message packet;

[0254] Step S22: Use the control and storage module to determine the entry for storing the message packet according to the index, and store the message packet into the corresponding entry.

[0255] In one possible implementation, the message packet includes first data and second data, wherein the first data is the metadata of the message packet and the second data is the payload data of the message packet.

[0256] In one possible implementation, the device further includes multiple physical input ports, multiple physical output ports, and multiple virtual output channels. The communication device connects to a lower-level communication device through the physical output ports. Each virtual input channel includes multiple virtual input sub-channels, and each virtual input sub-channel corresponds to a physical output port of the device. Each virtual output channel includes multiple virtual output sub-channels, and each virtual output sub-channel corresponds to a physical output port of the lower-level communication device. The message packet is received through one of the multiple virtual input sub-channels. The method further includes: when storing the first data, the control and storage module writes the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet to the entry storing the first data; the control and storage module selects a first target entry from the entries storing valid first data, determines a virtual output sub-channel according to the first target entry, and outputs the data stored in the first target entry through the virtual output sub-channel; the control and storage module releases the first target entry and outputs the index corresponding to the first target entry to the buffer.

[0257] In one possible implementation, the control and storage module includes a control queue and a memory. The control queue includes a plurality of first entries, and the memory includes a plurality of second entries. Each index corresponds to a first entry and a second entry. The step of storing the message packet into the corresponding entry includes: the control queue determining a first entry for storing the first data according to the index, and storing the first data into the corresponding first entry; the memory determining a second entry for storing the second data according to the index, and storing the second data into the corresponding second entry.

[0258] In one possible implementation, the method further includes: the control queue takes the second entry corresponding to the first target entry as the second target entry, and controls the memory to read out the second data stored in the second target entry; the step of outputting the data stored in the first target entry through the virtual output sub-channel includes: the control queue merges the first data stored in the first target entry with the second data stored in the second target entry, and then outputs them through the virtual output sub-channel; the method further includes: when the control queue releases the first target entry, it controls the memory to release the second target entry.

[0259] In one possible implementation, the device further includes a topology storage module for storing the topology of the on-chip network where the communication device resides. The first data includes a source device identifier and a destination device identifier. The step of writing the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet to the entry storing the first data includes: determining, based on the first data and the topology, the position of the communication device on the transmission path of the message packet, and the maximum number of physical input / output ports of all communication devices in the topology; determining the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet based on the position, the maximum number, and the number of the virtual input channel corresponding to the message packet; and writing the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet to the entry storing the first data.

[0260] In one possible implementation, the multiple virtual output sub-channels of the communication device serve as multiple virtual input sub-channels of the lower-level communication device. The device further includes a statistics module, and the method further includes: using the statistics module to count the number of free entries shared by all virtual input sub-channels in the lower-level communication device, and the number of free entries private to each virtual input sub-channel in the lower-level communication device; selecting a first target entry from entries storing valid first data includes: filtering entries that meet a first preset condition from entries storing valid first data to obtain a first candidate group, wherein the first preset condition is that the data duration stored in the current entry is greater than that of other entries storing the same virtual input sub-channel identifier as the current entry; filtering entries that meet a second preset condition from the first candidate group based on the identifier of the virtual output sub-channel stored in each entry and the statistical results of the statistics module to obtain a second candidate group, wherein the second preset condition is that the number of available free entries for the virtual input sub-channel corresponding to the identifier of the virtual output sub-channel stored in the current entry in the lower-level communication device is greater than the number of entries used to store the message packet corresponding to the current entry; selecting at least one entry from the second candidate group as the first target entry.

[0261] In one possible implementation, the first data includes a data duration, and the step of filtering entries that meet a first preset condition from the entries storing valid first data to obtain a first candidate group includes: grouping the entries storing valid first data, with each group storing the same identifier for a virtual input sub-channel; and filtering the entries with the longest data duration in each group based on the data duration of each entry to obtain a first candidate group.

[0262] In one possible implementation, among the entries storing valid first data, entries corresponding to the same virtual input sub-channel belong to the linked list corresponding to that virtual input sub-channel. The method further includes: when storing the first data, using the entry storing the first data as the tail of the linked list corresponding to the determined virtual input sub-channel; the step of filtering entries that meet the first preset condition from the entries storing valid first data to obtain the first candidate group includes: obtaining the first candidate group based on the entries at the head of each linked list.

[0263] In one possible implementation, the available free entries for any virtual input subchannel include all or part of the free entries shared by all virtual input subchannels, as well as the free entries private to that virtual input subchannel.

[0264] In one possible implementation, any virtual input subchannel may have available free entries, including free entries shared by all virtual input subchannels.

[0265] In one possible implementation, any virtual input subchannel may have available free entries, including free entries private to that virtual input subchannel.

[0266] In one possible implementation, determining the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet based on the location, the maximum quantity, and the number of the virtual input channel corresponding to the message packet includes: determining a first value X and a second value Y based on the maximum quantity, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; when the communication device is the first communication device on the transmission path of the message packet, multiplying the number of the virtual input channel corresponding to the message packet by the second value, and the product is the identifier of the virtual input sub-channel corresponding to the message packet; when the communication device is not the first communication device on the transmission path of the message packet, using the identifier of the virtual output sub-channel corresponding to the message packet in the upstream communication device as the identifier of the virtual input sub-channel corresponding to the message packet.

[0267] In one possible implementation, determining the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet based on the position, the maximum quantity, and the number of the virtual input channel corresponding to the message packet includes: determining a first value X and a second value Y based on the maximum quantity, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; when the communication device is the last communication device on the transmission path of the message packet, multiplying the number of the virtual input channel corresponding to the message packet by the second value, and the product is the identifier of the virtual output sub-channel corresponding to the message packet; when the communication device is not the last communication device on the transmission path of the message packet, multiplying the number of the virtual input channel corresponding to the message packet by the second value, and then adding it to the number of the physical output port used by the lower-level communication device on the transmission path of the message packet, as the identifier of the virtual output sub-channel corresponding to the message packet.

[0268] This disclosure also proposes a chip including the communication device described above. This disclosure does not limit the specific type of chip, as long as the chip has a master and slave device that need to communicate, or the chip is connected to a master and slave device that need to communicate.

[0269] This disclosure also proposes an electronic device including the chip described above. The electronic device may be a terminal device or a server; this disclosure does not limit the specific type of electronic device.

[0270] The flowcharts and block diagrams in the accompanying drawings 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 a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0271] While the invention is readily adaptable to various modifications and alternatives, specific embodiments are illustrated by way of example in the following figures and described in detail herein. However, it should be understood that the figures and their detailed description are not intended to limit the invention to the specific forms disclosed; rather, the invention is intended to cover all modifications, equivalents, and alternatives falling within the scope of the invention as defined in the appended claims. It is noteworthy that the inclusion and positional relationships of the various module components in the figures are exemplary and can be varied. Taking computing system 100 as an example, some components are depicted within the communication device in the figures, but in other embodiments, one or more of these components may also be used outside the communication device. For example, in some embodiments, one or more of these components include a topology storage module, a statistics module, etc. Therefore, the further description provided in the figures also applies to circuitry and hardware / software control logic external to the communication device.

[0272] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A communication device, characterized in that, The device includes a buffer, a control and storage module, and multiple virtual input channels. The control and storage module includes multiple entries, at least one of which is shared by multiple virtual input channels, and each entry corresponds to an index; The device receives message packets through any virtual input channel; The buffer is used to provide an index for the message packet; The control and storage module is used to determine the entry for storing the message packet according to the index, and to store the message packet into the corresponding entry.

2. The apparatus according to claim 1, characterized in that, The message packet includes first data and second data, wherein the first data is the metadata of the message packet and the second data is the payload data of the message packet.

3. The apparatus according to claim 2, characterized in that, The device also includes multiple physical input ports, multiple physical output ports, and multiple virtual output channels. The communication device connects to lower-level communication devices through the physical output ports. Each virtual input channel includes multiple virtual input sub-channels, and each virtual input sub-channel corresponds to a physical output port of the device; Each virtual output channel includes multiple virtual output sub-channels, and each virtual output sub-channel corresponds to a physical output port of the lower-level communication device. The message packet is received through one of the plurality of virtual input sub-channels, and the control and storage module is further configured to, When storing the first data, the identifiers of the virtual input sub-channel and virtual output sub-channel corresponding to the message packet are written to the entry storing the first data; Select a first target entry from the entries storing valid first data, determine a virtual output sub-channel based on the first target entry, and output the data stored in the first target entry through the virtual output sub-channel; Release the first target entry and output the index corresponding to the first target entry to the buffer.

4. The apparatus according to claim 3, characterized in that, The control and storage module includes a control queue and a memory. The control queue includes multiple first entries, and the memory includes multiple second entries. Each index corresponds to one first entry and one second entry. The control queue is used to determine the first entry for storing the first data according to the index, and to store the first data into the corresponding first entry; The memory is used to determine the second entry for storing the second data according to the index, and to store the second data into the corresponding second entry.

5. The apparatus according to claim 4, characterized in that, The control queue is also used to take the second entry corresponding to the first target entry as the second target entry, and control the memory to read out the second data stored in the second target entry; The control queue is specifically used to merge the first data stored in the first target entry with the second data stored in the second target entry, and then output the data through the virtual output sub-channel. The control queue is also used to control the memory to release the second target entry when the first target entry is released.

6. The apparatus according to claim 3 or 5, characterized in that, The device further includes a topology storage module for storing the topology of the on-chip network where the communication device resides. The first data includes a source device identifier and a destination device identifier. The control and storage module is specifically used for... When storing the first data, the position of the communication device on the transmission path of the message packet and the maximum number of physical input / output ports of all communication devices in the topology are determined based on the first data and the topology. Based on the location, the maximum quantity, and the number of the virtual input channel corresponding to the message packet, determine the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet, and write the identifier of the virtual input sub-channel and the identifier of the virtual output sub-channel corresponding to the message packet into the entry storing the first data.

7. The apparatus according to claim 3 or 5, characterized in that, The multiple virtual output sub-channels of the communication device serve as multiple virtual input sub-channels of the lower-level communication device. The device also includes a statistics module, which counts the number of free entries shared by all virtual input sub-channels in the lower-level communication device, as well as the number of free entries private to each virtual input sub-channel in the lower-level communication device. The control and storage module is specifically used to filter out entries that meet a first preset condition from entries that store valid first data, and obtain a first candidate group. The first preset condition is that the data storage duration of the current entry is greater than that of other entries that store the same virtual input sub-channel identifier as the current entry. Based on the identifier of the virtual output sub-channel stored in each entry and the statistical results of the statistical module, entries that meet the second preset condition are selected from the first candidate group to obtain the second candidate group. The second preset condition is that the number of available free entries in the virtual input sub-channel corresponding to the identifier of the virtual output sub-channel stored in the current entry in the lower-level communication device is greater than the number of entries used to store the message packet corresponding to the current entry. At least one entry from the second candidate group is selected as the first target entry.

8. The apparatus according to claim 7, characterized in that, The first data includes the data duration, and the control and storage module is specifically used for, The entries storing valid first data are grouped, and the entries within each group store the same identifier for the virtual input sub-channel; Based on the data duration of each entry, the entry with the longest data duration in each group is selected to obtain the first candidate group.

9. The apparatus according to claim 7, characterized in that, Among the entries storing valid first data, those corresponding to the same virtual input sub-channel belong to the linked list corresponding to that virtual input sub-channel. The control and storage module is further configured to, when storing the first data, use the entry storing the first data as the tail of the linked list corresponding to the determined virtual input sub-channel; The control and storage module is specifically used to obtain the first candidate group based on the entry at the head of each linked list.

10. The apparatus according to claim 7, characterized in that, The available free entries for any virtual input subchannel include all or part of the free entries shared by all virtual input subchannels, as well as the free entries private to that virtual input subchannel.

11. The apparatus according to claim 7, characterized in that, Free entries available for any virtual input subchannel, including free entries shared by all virtual input subchannels.

12. The apparatus according to claim 7, characterized in that, Any available free entries for any virtual input subchannel, including free entries private to that virtual input subchannel.

13. The apparatus according to claim 6, characterized in that, The control and storage module is specifically used for, Based on the maximum quantity, determine the first value X and the second value Y, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; When the communication device is the first communication device on the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and the product is the identifier of the virtual input sub-channel corresponding to the message packet; When the communication device is not the first communication device on the transmission path of the message packet, the identifier of the virtual output sub-channel corresponding to the message packet in the upper-level communication device is used as the identifier of the virtual input sub-channel corresponding to the message packet.

14. The apparatus according to claim 6, characterized in that, The control and storage module is specifically used for, Based on the maximum quantity, determine the first value X and the second value Y, where X is the minimum bit width of the physical input / output ports of all communication devices, Y = 2^X, and X and Y are positive integers; When the communication device is the last communication device on the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and the product is the identifier of the virtual output sub-channel corresponding to the message packet; When the communication device is not the last communication device on the transmission path of the message packet, the number of the virtual input channel corresponding to the message packet is multiplied by the second value, and then added to the number of the physical output port used by the lower-level communication device on the transmission path of the message packet, as the identifier of the virtual output sub-channel corresponding to the message packet.

15. A data storage method, characterized in that, The method is applied to a communication device, which includes a buffer, a control and storage module, and multiple virtual input channels. The control and storage module includes multiple entries, at least one of which is shared by multiple virtual input channels, and each entry corresponds to an index; The device receives a message packet through any virtual input channel, and the method includes: Use the buffer to provide an index for the message packet; The control and storage module uses the index to determine the entry for storing the message packet and stores the message packet into the corresponding entry.

16. A chip, characterized in that, The communication device includes any one of claims 1-14.

17. An electronic device, characterized in that, Includes the chip described in claim 16.

Citation Information

Patent Citations

  • Memory controller with virtual controller mode

    CN109690508A

  • Circuit module, credit control method, integrated circuit, and storage medium

    CN114490456A

  • Transmission of address translation type packets

    CN117716679A

  • Reconfigurable router architecture based on buffer sharing and dynamic routing method

    CN120499067A

  • Combined buffering of infiniband virtual lanes and queue pairs

    US7327749B1