WO2022160307A1 - Router and system on chip - Google Patents

Router and system on chip Download PDF

Info

Publication number
WO2022160307A1
WO2022160307A1 PCT/CN2021/074543 CN2021074543W WO2022160307A1 WO 2022160307 A1 WO2022160307 A1 WO 2022160307A1 CN 2021074543 W CN2021074543 W CN 2021074543W WO 2022160307 A1 WO2022160307 A1 WO 2022160307A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
output port
input port
port
request message
Prior art date
Application number
PCT/CN2021/074543
Other languages
French (fr)
Chinese (zh)
Inventor
郭鑫
徐度
朱强
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2021/074543 priority Critical patent/WO2022160307A1/en
Priority to CN202180089309.0A priority patent/CN116686269A/en
Publication of WO2022160307A1 publication Critical patent/WO2022160307A1/en

Links

Images

Definitions

  • the present application relates to the field of chip technology, and in particular, to a router and a system-on-chip.
  • a network on chip is a communication method for a system on chip (SoC).
  • FIG. 1 shows a schematic diagram of an internal interconnection bus of an SoC.
  • the on-chip network router (router) is responsible for realizing the routing of the host (master) accessing the slave (slave): the router decides to schedule the corresponding message to an output node (another router or a slave) according to the access address sent by each host. machine).
  • FIG. 2 shows a possible schematic diagram of the internal structure of the router.
  • the router consists of two parts: an input port (inport) and an output port (outport).
  • the input port can be divided into multiple VCs (two VCs are divided as an example in Figure 2), and each VC corresponds to a first input first output (FIFO) VC queue.
  • the VC queue will send an arbitration request to the corresponding output port according to the currently scheduled packets.
  • the arbitor in the output port arbitrates out a certain VC queue of a certain input port to schedule packets according to the priority of each input port that sends the arbitration request.
  • bandwidth loss may occur when the above packet scheduling scheme is used.
  • VC such as VC0
  • input port 0 and input port 1 both needs to schedule packets to output port 0, both input port 0 and input port 1 send arbitration requests to output port 0.
  • input port 0 obtains arbitration, input port 0 can dispatch packets to output port 0, but input port 1 cannot temporarily dispatch packets to output port 0.
  • the VC0 queue in input port 1 is a FIFO structure, if the message scheduled to output port 1 (referred to as message 0) is not sent out on input port 1, even if there is still a need for scheduling in the VC0 queue of input port 1
  • message 0 the message scheduled to output port 1
  • packet 1 For packets sent to output port 1 (referred to as packet 1), input port 1 cannot apply to schedule packets to output port 1 due to the head of the VC0 queue. 1 is not used, so bandwidth is wasted.
  • Embodiments of the present application provide a router and a system-on-chip, which are used to improve bandwidth utilization when scheduling packets.
  • an embodiment of the present application provides a router, where the router includes multiple input ports and multiple output ports. Wherein, each input port of the multiple input ports is used to send a request message to the corresponding output port of each message for the multiple input packets; each output port of the multiple output ports is used to respond to the received request The message is arbitrated, sending a grant message to the arbitrated input port.
  • each input port when each input port sends a request message requesting scheduling packets to the output port, it can send requests to multiple output ports for multiple input packets, and the input port sends requests without any service type. limit.
  • the input port in the case where the request message sent by the input port to an output port is not arbitrated, the input port The port can also obtain arbitration of other output ports, and the phenomenon of head blocking of the VC queue described in the prior art will not occur, so the bandwidth utilization rate of the output port is high.
  • each input port is configured with a shared buffer, the shared buffer stores packets of multiple service types, and each input port is used to simultaneously send multiple packets stored in the shared buffer to each report.
  • the corresponding output port sends a request message, and after receiving the permission message sent by the corresponding output port, the corresponding message is scheduled and sent to the corresponding output port.
  • the shared cache can be implemented by random access memory RAM or registers.
  • the packets received by the input port are stored in the shared buffer.
  • the input port can simultaneously send request messages to the corresponding output ports for multiple messages in the shared buffer, so that multiple output ports can arbitrate the received request messages at the same time and determine the request message that has obtained the arbitration, which improves the message scheduling efficiency.
  • the storage space of the packets of the first service type may be set to be less than or equal to the first threshold value
  • the storage space of the packets of the second service type may be set to be less than or equal to the second threshold value.
  • each input port can maintain multiple linked lists, each linked list corresponds to the corresponding service type supported by the input port and the corresponding output port, and each linked list is used to record the corresponding service type that needs to be scheduled to the corresponding output port 's message.
  • each input port can respectively send a request message to the corresponding output port for each linked list in which the message to be scheduled is recorded, and after receiving the permission message sent by the corresponding output port, schedule the message recorded in the linked list and Send the message to the corresponding output port.
  • the router provided by the first aspect includes a first input port, a second input port, a first output port and a second output port.
  • the first input port may send a first request message to the first output port, where the first request message is used to instruct the first input port to request to schedule the first packet of the first service type to the first output port.
  • the second input port may send a second request message to the first output port, where the second request message is used to instruct the second input port to request to schedule a second packet of the first service type to the first output port; the second input port may also A third request message is sent to the second output port, where the third request message is used to instruct the second input port to request to schedule a third packet of the first service type to the second output port.
  • the first output port may arbitrate the first request message and the second request message, and send a first permission message to the first input port, where the first permission message is used to indicate that the first input port is allowed to schedule the first message to the first output port.
  • the second output port may arbitrate the third request message, and send a second permission message to the second input port, where the second permission message is used to indicate that the second input port is allowed to schedule the third packet to the second output port.
  • the second input port can also obtain the arbitration of the second output port.
  • the second input port since the input port can send request messages to the corresponding different output ports for messages that need to be scheduled to different output ports, the second input port schedules the second output port to the first output port.
  • the second input port can obtain the arbitration of the second output port and schedule the third message to the second output port, that is, the VC queue occurrence head mentioned in the prior art will not appear. Therefore, the bandwidth utilization rate of the output port is high.
  • the first input port may also send a first accept message to the first output port, where the first accept message is used to instruct the first input port to accept the permission of the first output port; schedule the first message to the first output port; sending a first release message to the first output port, where the first release message is used to indicate that the first packet scheduling is completed.
  • the transmission relationship between the first input port and the first output port can be locked.
  • the first input port sends a first release message to the first output port after the first packet scheduling is completed, the first output port is released, and the transmission relationship between the first input port and the first output port is released.
  • the first input port may resend the request message for the packet to be scheduled in the first shared buffer.
  • the first output port can receive the request message sent by the input port again, and arbitrate the received request message to start the next packet scheduling.
  • the second input port may also send a second accept message to the second output port, where the second accept message is used to instruct the second input port to accept the permission of the second output port; schedule the third message to the second output port; sending a second release message to the second output port, where the second release message is used to indicate that the scheduling of the third packet is completed.
  • the transmission relationship between the second input port and the second output port can be locked.
  • the second input port sends a second release message to the second output port after the third packet scheduling is completed, the second output port is released, and the transmission relationship between the second input port and the second output port is released.
  • the second input port may resend the request message for the packet to be scheduled in the second shared buffer.
  • the second output port can receive the request message sent by the input port again, and arbitrate the received request message to start the next packet scheduling.
  • the first input port may also send a fourth request message to the third output port among the plurality of output ports, where the fourth request message is used to instruct the first input port to request the third output port to schedule the first service type of the first service type to the third output port.
  • the third output port is used to arbitrate the fourth request message and send a third permission message to the first input port, and the third permission message is used to indicate that the first input port is allowed to schedule the fourth request message to the third output port. message.
  • both the first output port and the third output port decide that the first input port obtains the arbitration, and respectively send the first permission message and the third permission message to the first input port, and the first input port selects the first output port first.
  • the port schedules the first message, and sends the first accept message to the first output port. Since the third output port does not receive the accept message, the third output port can subsequently receive requests from other input ports for scheduling other packets, thereby improving the bandwidth utilization of the output port.
  • the first input port may also send a fifth request message to the first output port, where the fifth request message is used to instruct the first input port to request to schedule a fifth message of the second service type to the first output port
  • the first output port is further configured to arbitrate the fifth request message, and determine that the first input port is not allowed to schedule the fifth message.
  • the first input port sends request messages of two service types to the first output port at the same time, and the first output port arbitrates the two request messages (the first request message and the fifth request message) to determine the first request message.
  • a request message obtains arbitration, and a fifth request message does not obtain arbitration.
  • the first input port may also send a sixth request message to the second output port, where the sixth request message is used to instruct the first input port to request to schedule a sixth request of the first service type to the second output port message; the second output port is further configured to arbitrate the sixth request message to determine that the first input port is not allowed to schedule the sixth message.
  • the first input port also requests to schedule the sixth message of the first service type to the second output port
  • the second output port arbitrates the received third request message and the sixth request message, and determines to allow the third request message and the sixth request message.
  • the second input port schedules the third message, and the first input port is not allowed to schedule the sixth message. Therefore, the second output port sends the second permission message to the second input port and does not send the permission message to the first input port.
  • an embodiment of the present application further provides a system-on-chip, including a host, a slave, and the router provided in the first aspect and any possible design thereof, where the router is configured to route a packet sent by the host to the slave.
  • FIG. 1 is a schematic diagram of a SoC internal interconnection bus provided by the prior art
  • Fig. 2 is a kind of internal structure schematic diagram of router provided by prior art
  • FIG. 3 is a schematic diagram of head blocking at an input port provided by the prior art
  • FIG. 4 is a schematic diagram of a shared cache provided by an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a router according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an interaction flow between a first input port and a first output port according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of an interaction flow between a second input port and a second output port according to an embodiment of the present application
  • FIG. 8 is a schematic structural diagram of another router according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a system-on-chip provided by an embodiment of the present application.
  • the embodiments of the present application can be applied to the system-on-chip shown in FIG. 1 .
  • the system-on-chip includes a master, a router, and a slave.
  • the router is responsible for implementing the route for the host to access the slave: the router decides to route the corresponding message to an output node (the next-level router or the slave) according to the access address sent by each host.
  • the SoC shown in FIG. 1 includes two levels of routing: router 0 and router 1 are located at the first level, and router 2 and router 3 are located at the second level.
  • the first-level routing is used to schedule packets from the master to the second-level routing; the second-level routing is used to schedule packets from the first-level routing to the slave.
  • the SoC may include one-level routing or multiple-level routing, and is not limited to the two-level routing shown in FIG. 1 .
  • the number of masters, slaves and routers is not limited to that shown in FIG. 1 .
  • each router includes multiple input ports and multiple output ports.
  • the input port When an input port needs to dispatch packets to an output port, the input port sends an arbitration request to the output port, and the output port receives multiple arbitration requests according to the priority of each input port that sends the arbitration request , arbitrate out an input port for packet scheduling.
  • the input port includes multiple FIFO queues, and each FIFO queue is used to store a service type sent by an upper-level port (such as a host or an upper-level router) of the input port. message.
  • an upper-level port such as a host or an upper-level router
  • the input port stores the input message (for example, the message sent by the upper level) in the shared buffer.
  • the shared buffer can be used to store packets of various service types.
  • the packets are not stored in the form of queues in the shared buffer. Therefore, the packets in the shared buffer are not restricted by the FIFO rule during scheduling.
  • the shared buffer in each input port can be divided into a plurality of storage areas, including a plurality of first buffer areas and a second buffer area.
  • each first buffer area is used to store the message of a single service type sent by the upper level
  • the second buffer area can store the message of multiple service types.
  • the function of configuring the first buffer area is to enable the input port to receive messages of any service type sent by the upper level, that is, to reserve a certain storage space (also referred to as pre-processing) for the messages of each service type. keep credit). For example, if there are N types of services that can schedule packets on the input port, N ⁇ 1, then N first buffer areas can be configured in the shared buffer, and each first buffer area is used to store packets of a single service type. In the case that the storage of the second buffer area is full, since the first buffer area is also configured for each service type, the input port can still receive the packets of any service type sent by the upper level.
  • the first cache area and the second cache area may be divided from the hardware level or the software level.
  • the division method is not specifically limited. Assuming that random access memory (RAM) is used to instantiate the shared cache, then, in a possible example, part of the storage array in the RAM can be set to correspond to the first cache area, and another part of the storage array to correspond to the first cache area. Second cache area. In another possible example, part of the addressing space may be set to correspond to the first cache area, and another part of the addressing space may be set to correspond to the second cache area.
  • RAM random access memory
  • the first cache area and the second cache area are dynamically changed, and which arrays or which addresses correspond to a certain cache area are not strictly specified, as long as the shared cache is used for each service type Reserve a storage space (with the same size as the first cache area); for example, if the input port receives the message 1 of service type 1 sent by the upper level and stores it in the shared cache, then the storage area of the message 1 It can be regarded as the first buffer area reserved for service type 1; the input port receives the message 2 of service type 1 sent by the upper level and stores it in the shared cache, then the storage area of the message 2 can be regarded as The first buffer area reserved for service type 1, and the storage area of packet 1 is regarded as the second buffer area.
  • packets are not subject to the FIFO rule when scheduling.
  • the input port first receives the message 1 of service type 1 sent by the upper level and stores it in the shared buffer, and the message 1 needs to be dispatched to the output port 1; then, the input port receives the service type sent by the upper level.
  • the message 2 of 1 is stored in the shared buffer, and the message 2 needs to be dispatched to the output port 2.
  • the input port can send arbitration requests to output port 1 and output port 2 at the same time, and request to schedule message 1 and message 2 respectively. That is to say, for multiple packets that need to be dispatched to different output ports, the input port can send arbitration requests to corresponding different output ports for multiple packets.
  • the input port can schedule the message 1 to the output port 1; if the input port obtains arbitration on the output port 2, the input port can schedule the corresponding message 2 to the output port 2; if the input port is on the output port 1 and the output port 2. If both output port 2 obtains arbitration, the input port can select either scheduling packet 1 or scheduling packet 2.
  • This embodiment of the present application does not specifically limit the division manner of service types.
  • Embodiments of the present application provide a router.
  • the router includes multiple input ports and multiple output ports. Wherein, each input port is used to send a request message to the corresponding output port of each message for multiple input messages; each output port is used to arbitrate the received request message, and send permission to the input port that has obtained the arbitration information.
  • each input port when each input port sends a request message requesting a scheduling packet to an output port, it can send requests to multiple output ports for multiple input packets.
  • the input port sends requests without any service type. limit.
  • each input port can only send one request message to one output port for one service type, in the case where the request message sent by the input port to an output port is not arbitrated, the input port The port can also obtain arbitration of other output ports, and the phenomenon of head blocking of the VC queue described in the prior art will not occur, so the bandwidth utilization rate of the output port is high.
  • each input port is configured with a shared buffer, and the shared buffer stores packets of various service types.
  • Each input port is used to send multiple packets stored in the shared buffer to the corresponding output port of each packet at the same time.
  • the request message after receiving the permission message sent by the corresponding output port, schedule the corresponding message and send the message to the corresponding output port.
  • the packets received by the input port are stored in the shared buffer.
  • the input port can simultaneously send a request message to the corresponding output port for multiple packets in the shared buffer.
  • the input port may send a request message requesting to schedule packets of the first service type to the first output port, and also send a request message requesting to schedule packets of the first service type to the second output port.
  • the router 500 includes a first input port 501 , a second input port 502 , a first output port 503 and a second output port 504 .
  • the first input port 501 may send a first request message to the first output port 503, where the first request message is used to instruct the first input port 501 to request the first output port 503 to schedule a first packet of the first service type;
  • the second input port 502 may send a second request message to the first output port 503, where the second request message is used to instruct the second input port 502 to request to schedule a second packet of the first service type to the first output port 503;
  • the input port 502 may also send a third request message to the second output port 504, where the third request message is used to instruct the second input port 502 to request to schedule a third packet of the first service type to the second output port 504; the first output
  • the port 503 can arbitrate the first request message and the second request message, and send the first permission message to the first input port 501, where
  • the first input port 501 sends a first request message to the first output port 503 to request to schedule the first message; the second input port 502
  • the second request message and the third request message are sent to the first output port 503 and the second output port 504, respectively, to request scheduling of the second packet and the third packet. That is to say, in this embodiment of the present application, the input port may send request messages to the corresponding different output ports for packets that need to be dispatched to different output ports.
  • the second output port 504 sends the second request message and the third request message.
  • the first output port 503 After receiving the first request message and the second request message, the first output port 503 performs arbitration according to the priorities of the first input port 501 and the second input port 502, and determines that the first input port 501 obtains the arbitration and the second input port 502 obtains arbitration. Without obtaining arbitration, a transmission relationship may be established between the first input port 501 and the first output port 503 . Since the second input port 502 also sends a third request message to the second output port 504, after the second output port 504 performs arbitration, it is determined that the second input port 502 has obtained the arbitration, and there is no connection between the second input port 502 and the second output port 504. A transfer relationship can be established.
  • the second input port 502 can also obtain the arbitration of the second output port 504 .
  • the second input port 502 since the input port can send request messages to corresponding different output ports for packets that need to be dispatched to different output ports, the second input port 502 sends a request message to the first output port. 503
  • the second input port 502 can obtain the arbitration of the second output port 504 and schedule the third packet to the second output port 504, that is, the prior art does not occur.
  • the phenomenon of head blocking occurs in the mentioned VC queue, so the bandwidth utilization rate of the output port is high.
  • FIG. 5 only shows that the router 500 includes a first input port 501 , a second input port 502 , a first output port 503 and a second output port 504 .
  • the router 500 may include multiple input ports and multiple output ports, and the embodiments of the present application do not specifically limit the number of input ports and output ports.
  • the input port may send request messages to corresponding different output ports respectively for packets that need to be scheduled to different output ports.
  • multiple packets to be scheduled in the first input port 501 may be stored in the first shared buffer, and the scheduling order of the packets stored in the first shared buffer is not limited by the FIFO rule.
  • multiple packets that need to be scheduled in the second input port 502 can be stored in the second shared buffer, and the scheduling order of the packets stored in the second shared buffer is also not limited by the FIFO rule.
  • the second shared cache may be used to store packets of multiple service types.
  • the second shared buffer may include a plurality of third buffer areas and a fourth buffer area, and each third buffer area in the plurality of third buffer areas is used to For messages of service types (ie, a certain storage space is reserved for messages of each service type), the fourth cache area is used to store messages of multiple service types.
  • the first shared cache may include a plurality of first cache areas and a second cache area.
  • the router 500 may include multiple input ports, and each input port is configured with a shared cache.
  • the packets are not stored in the form of queues, and the scheduling order of each packet is not restricted by the FIFO rule.
  • the storage space of the packets of the first service type can be set to be less than or equal to the first threshold value
  • the storage space of the packets of the second service type can be set to be less than or equal to the second threshold value.
  • the first threshold value and the second threshold value may be the same or different.
  • the storage space of the packets of the first service type can be set to be less than or equal to the third threshold value, and the storage space of the packets of the second service type can be set to be less than or equal to the fourth threshold value.
  • the third threshold value and the fourth threshold value may be the same or different.
  • the first shared cache includes 16 storage spaces
  • an upper limit of storage space may be set for messages of each service type, or an upper limit of storage space may be set only for messages of some service types. For packets of different service types, the upper limit of the storage space can be the same or different.
  • the shared cache (such as the first shared cache or the second shared cache) configured in the input port may be implemented by RAM or registers, that is, RAM or registers may be used to instantiate the shared cache.
  • RAM or registers may be used to instantiate the shared cache.
  • each linked list corresponds to the corresponding service type supported by the input port and the corresponding output port, and each linked list is used to record the messages of the corresponding service type that need to be scheduled to the corresponding output port.
  • each input port can send a request message to the corresponding output port for each linked list in which the message to be scheduled is recorded, and after receiving the permission message sent by the corresponding output port, schedule the message recorded in the linked list and send it. The message is sent to the corresponding output port.
  • each linked list a scheduling sequence of packets of a certain service type that needs to be scheduled to a certain output port can be maintained.
  • the number of the maintained linked list for each input port is equal to the product of the number of service types supported by the input port and the number of output ports included in the router.
  • router 500 includes four input ports (input port 1, input port 2, input port 3, and input port 4) and four output ports (output port 1, output port 2, output port 3, and output port 4). ), assuming that each input port handles two service types, service type 1 and service type 2. Then, taking input port 1 as an example, assuming that 14 packets are stored in the shared buffer of input port 1, the service types and corresponding output ports of the 14 packets can be shown in Table 1 below.
  • business type 1 business type 2 output port 1 message 1 Message 2, Message 3 output port 2 Message 4, Message 5, Message 6 message 7 output port 3 Message 8, Message 9 Packet 10, Packet 11, Packet 12 output port 4 Message 13 Message 14
  • Each linked list records the scheduling sequence of multiple packets of one service type that need to be scheduled to one output port. For example, in the linked list maintained for the packets of service type 2 that need to be scheduled to output port 1, the scheduling sequence of packet 2 and packet 3 is recorded, that is, packet 2 is scheduled first, and then packet 3; , in the linked list maintained for the packets of service type 1 that need to be scheduled to output port 2, the scheduling sequence of packet 4, packet 5 and packet 6 is recorded, that is, packet 4 is scheduled first, and then packet 5 is scheduled. , and finally schedule packet 6.
  • the multiple linked lists maintained in the input port may also only record multiple packets of a certain service type that need to be scheduled to an output port, but for multiple The scheduling order of packets is not limited.
  • the content in the linked list of output port 1 - service type 1 in Table 1 is empty; after that, if input port 1 receives a message of service type 1 that needs to be scheduled to output port 1 again Packet 15, the content in the linked list of output port 1-service type 1 is modified to Packet 15.
  • the content in the linked list of output port 3-service type 2 in Table 1 is modified to message 11 and message 12; after that, if the input port 1 receives it again, it needs to be scheduled to If packets 16 and 17 of service type 2 of port 3 are output, the contents in the linked list of output port 3 - service type 2 are modified to packet 11 , packet 12 , packet 16 , and packet 17 .
  • each input port maintains a first-in, first-out queue for messages of each service type.
  • the packets that need to be dispatched to other output ports are blocked, resulting in other output ports not being used.
  • different linked lists are maintained in the shared cache for messages of different service types scheduled to different output ports. Then, the transmission of packets that need to be scheduled to different output ports does not affect each other, so that the bandwidth utilization rate of the output ports is improved.
  • the first input port 501 may also: send a first accept message to the first output port 503, where the first accept message is used to instruct the first input port 501 to accept the permission of the first output port 503;
  • the first packet is scheduled to the first output port 503;
  • the first release message is sent to the first output port 503, where the first release message is used to indicate that the first packet is scheduled to be completed.
  • the interaction flow between the first input port 501 and the first output port 503 may be as shown in FIG. 6 .
  • the first input port 501 can schedule the first packet from the first shared buffer to the first output port 503; after the first packet scheduling is completed, the first input port 501 can send the first release to the first output port 503 message to indicate the completion of the first packet scheduling.
  • the first output port 503 After the first release message is sent to the first output port 503, the first output port 503 is released, and the transmission relationship between the first input port 501 and the first output port 503 is released.
  • the first input port 501 may resend the request message (ie, start the next handshake application) for the packet to be scheduled in the first shared buffer.
  • the first output port 503 may receive the request message sent by the input port again, and perform arbitration on the received request message to start the next packet scheduling.
  • the message interaction between the two can be realized through four steps: 1.
  • the first input port 501 sends the first output port 503 the first message; A request message; 2.
  • the first output port 503 sends a first permission message to the first input port 501; 3.
  • the first output port 503 sends a first accept message to the first input port 501; 4.
  • the first output port 503 sends a first accept message to the first input port 501
  • the first input port 501 sends a first release message.
  • the above interaction process is referred to as a "four-step handshake mechanism", that is, a handshake between the first input port 501 and the first output port 503 is completed through the interaction of four messages.
  • the second input port 502 may further: send a second accept message to the second output port 504, where the second accept message is used to instruct the second input port 502 to accept the permission of the second output port 504;
  • the third packet is scheduled to the second output port 504;
  • the second release message is sent to the second output port 504, where the second release message is used to indicate that the scheduling of the third packet is completed.
  • the interaction flow between the second input port 502 and the second output port 504 may be as shown in FIG. 7 .
  • the second input port 502 can schedule the third packet from the second shared buffer to the second output port 504 ; after the scheduling of the third packet is completed, the second input port 502 can send a second release to the second output port 504 message to indicate that the scheduling of the third packet is complete.
  • the second output port 504 is released, and the transmission relationship between the second input port 502 and the second output port 504 is released.
  • the second input port 502 may resend the request message (ie, start the next handshake application) for the packet to be scheduled in the second shared buffer.
  • the second output port 504 may receive the request message sent by the input port again, and perform arbitration on the received request message to start the next packet scheduling.
  • the interaction process between the second input port 502 and the second output port 504 also adopts the aforementioned "four-step handshake mechanism", which will not be repeated here.
  • the interaction between input ports and output ports may be based on clock cycles.
  • the input port can send multiple request messages for the packets stored in the shared buffer according to the linked list maintained in the shared buffer.
  • the number of request messages sent by the input port in a certain clock cycle is the same as the number of linked lists maintained in the shared cache.
  • the input port can maintain different linked lists for messages of different service types scheduled to different output ports.
  • the shared buffer of input port 1 maintains a Eight linked lists, each of which records the scheduling sequence of multiple packets of one service type that need to be scheduled to one output port.
  • the input port 1 can send eight request messages, and the eight request messages are: 1. A request message requesting to dispatch the message 1 of service type 1 to the output port 1; 2. A request to the output port 1 A request message for port 1 to schedule message 2 of service type 2; 3. A request message for requesting to schedule message 4 of service type 1 to output port 2; 4. A request for scheduling message 7 of service type 2 to output port 2 5.
  • the input port can schedule packets to the output port. Specifically, taking the second input port 502 and the second output port 504 as an example, after the second input port 502 sends the second accept message to the second output port 504, the second input port 502 may send the second accept message at the clock
  • the cycle starts to schedule the third packet to the second output port 504 immediately, and the third packet may also start to be scheduled to the second output port 504 in the next clock cycle.
  • the scheduling of the third packet may be completed within one clock cycle, or may be completed within multiple clock cycles, depending on the size of the third packet.
  • the update of the linked list maintained in the shared cache can also be done on a clock cycle basis. That is, in each clock cycle, the specific content of the linked list maintained in the shared cache will be updated according to the reception and transmission of packets in the input port in the previous clock cycle.
  • the input port may send a request message requesting a scheduling message according to the updated linked list. That is to say, in each clock cycle, the linked list in the shared cache is updated, and the input port sends request messages to corresponding different output ports according to the updated linked list in the current clock cycle.
  • the interaction process of packet transmission between the first input port 501 and the first output port 503 and the interaction of packet transmission between the second input port 502 and the second output port 504 are mainly introduced process.
  • the router 500 may include more input ports and more output ports. Other scenarios are described below with a few specific examples.
  • the router 500 further includes a third output port; the first input port 501 is further configured to send a fourth request message to the third output port, and the fourth request message is used to instruct the first input port 501 to request to schedule the first service to the third output port Type of fourth message; the third output port is used to arbitrate the fourth request message, and send the third permission message to the first input port 501, and the third permission message is used to indicate that the first input port 501 is allowed to output to the third The port schedules the fourth packet.
  • the first input port 501 sends a request message for scheduling packets to both the first output port 503 and the third output port, and both the first output port 503 and the third output port rule that the first input port 501 obtains arbitration, And send the first permission message and the third permission message to the first input port 501 respectively, that is, the first input port 501 receives two permission messages.
  • the first input port 501 chooses to schedule the first message to the first output port 503 first, then the first input port 501 sends the first accept message to the first output port 503, but does not send the first message to the first output port 503.
  • Three output ports send accept messages.
  • the third output port Since the third output port does not receive the accept message, the third output port can subsequently receive requests from other input ports for scheduling other packets, thereby improving the bandwidth utilization of the output port.
  • the first input port 501 is further configured to send a fifth request message to the first output port 503, where the fifth request message is used to instruct the first input port 501 to request the first output port 503 to schedule a fifth message of the second service type;
  • the first output port 503 is further configured to arbitrate the fifth request message, and determine that the first input port 501 is not allowed to schedule the fifth message.
  • the second service type and the first service type are different service types.
  • the first input port 501 can send request messages of two service types to the first output port 503 at the same time, and the first output port 503 arbitrates the two request messages (the first request message and the fifth request message) , it is determined that the first request message has been arbitrated and the fifth request message has not been arbitrated, that is, it is determined that the first input port 501 is allowed to schedule messages of the first service type, and the first input port 501 is not allowed to schedule messages of the second service type.
  • the first input port 501 is further configured to: send a sixth request message to the second output port 504, where the sixth request message is used to instruct the first input port 501 to request to the second output port 504 to schedule a sixth packet of the first service type ;
  • the second output port 504 is further configured to arbitrate the sixth request message, and determine that the first input port 501 is not allowed to schedule the sixth message.
  • the first input port 501 also requests to schedule the sixth message of the first service type to the second output port 504, and the second output port 504 arbitrates the received third request message and the sixth request message, and determines The second input port 502 is allowed to schedule the third message, and the first input port 501 is not allowed to schedule the sixth message. Therefore, the second output port 504 sends the second permission message to the second input port 502 and does not send the permission message to the first input port 501 .
  • the first input port 501 sends a first request message to the first output port 503 to request scheduling of the first packet;
  • the second input port 502 sends a second request message and a third request message to the first output port 503 and the second output port 504 respectively, so as to request to schedule the second packet and the third packet.
  • the first output port 503 After receiving the first request message and the second request message, the first output port 503 performs arbitration according to the priorities of the first input port 501 and the second input port 502, and determines that the first input port 501 obtains the arbitration and the second input port 502 obtains arbitration.
  • a transmission relationship is established between the first input port 501 and the first output port 503 . Since the second input port 502 also sends a third request message to the second output port 504, after the second output port 504 performs arbitration, it is determined that the second input port 502 has obtained the arbitration, and the second input port 502 and the second output port 504 can also be established. transfer relationship.
  • the second input port 502 when the second input port 502 does not obtain arbitration from the first output port 503, because the second input port 502 also sends a third packet to the second output port 504 for the third packet of the first service type. request message, so that the second input port 502 can also obtain arbitration for the second output port 504 .
  • the router 500 since the input port can send request messages to the corresponding different output ports for packets that need to be scheduled to different output ports, the second input port 502 schedules the first output port 503.
  • the second input port 502 can obtain arbitration from the second output port 504, and the second input port 502 can schedule the third packet to the second output port 504, that is, no The phenomenon of head blocking occurs in the VC queue mentioned in the prior art, so the bandwidth utilization rate of the output port is high.
  • An embodiment of the present application further provides a router, and the router may be as shown in FIG. 8 .
  • the router includes input port 0, input port 1, output port 0, and output port 1. It can be understood that, for convenience of description, only two input ports and two output ports are shown here, but there may be more input ports and more output ports, depending on actual needs and actual application scenarios.
  • a shared buffer is configured in each input port.
  • the shared buffer includes a VC0 reserved buffer (VC0credit), a VC1 reserved buffer (VC1credit), and a common buffer (common buffer).
  • the VC0 reserved buffer and the VC1 reserved buffer in input port 0 can be regarded as a specific example of the aforementioned first buffer areas, and the general buffer in input port 0 can be regarded as a specific example of the aforementioned second buffer area .
  • the VC0 reserved buffer and the VC1 reserved buffer in input port 1 can be regarded as a specific example of the foregoing multiple third buffer areas, and the general buffer in input port 1 can be regarded as a specific example of the foregoing fourth buffer area.
  • the shared cache maintains different linked lists (states) for different service types and output ports, that is, four linked lists of VC0-output port 0, VC1-output port 0, VC0-output port 1 and VC1-output port 1 are maintained.
  • the input port can schedule the packets in the shared buffer according to the arbitration result of the output port and the linked list maintained by itself.
  • Each output port is configured with an arbiter, which is used to arbitrate the request messages sent by the input port for scheduling packets of different service types.
  • each output port includes arbiter 0, arbiter 1 and arbiter 2.
  • Arbiter 0 is used to arbitrate requests for scheduling packets of service type
  • arbiter 1 is used to arbitrate requests for scheduling packets of service type 1; Arbitration results are arbitrated to finally determine which request gets the arbitration.
  • arbiter 0 in output port 0 receives request 1 and request 2 of service type 0, and judges that request 1 obtains arbitration; arbiter 1 receives request 3 and request 4 of service type 1, judges that request 4 obtains arbitration; Arbiter 2 arbitrates the arbitration results of Arbiter 0 and Arbiter 1, and finally determines that Request 4 is arbitrated. Then, output port 0 determines that request 4 is arbitrated, and sends a permission message to the input port that sent request 4.
  • the interaction process between the input port and the output port may be as follows.
  • Input port 0 sends REQ to two output ports according to the scheduling requirement of each VC (a specific example of the foregoing request message). Specifically, input port 0 sends REQ1 for scheduling VC0 type packets and REQ2 for scheduling VC1 type packets to output port 0; input port 0 sends REQ3 for scheduling VC0 type packets and REQ4 for scheduling VC1 type packets to output port 1 .
  • input port 1 sends REQ to the two output ports according to the scheduling requirements of each VC. Specifically, input port 1 sends REQ5 for scheduling VC0 type packets and REQ6 for scheduling VC1 type packets to output port 0; input port 1 sends REQ7 for scheduling VC0 type packets and REQ8 for scheduling VC1 type packets to output port 1 .
  • arbiter 0 in the output port 0 receives REQ1 and REQ5, it arbitrates according to the priority and other conditions, and determines that REQ1 obtains the arbitration; after the arbiter 1 in the output port 0 receives REQ2 and REQ6, according to the priority and other conditions Arbitration is performed to determine that REQ2 has obtained the arbitration; arbiter 2 in output port 2 arbitrates the arbitration result of arbiter 0 (REQ1) and the arbitration result of arbiter 1 (REQ2), determines that REQ1 has obtained arbitration, and then returns to input port 0 GRANT (a specific example of the aforementioned first grant message), instructs REQ1 to obtain arbitration.
  • REQ1 arbiter 0
  • REQ2 arbitration result of arbiter 1
  • the arbiter 0 in output port 1 conducts arbitration according to the priority and other conditions, and determines that REQ7 wins the arbitration; after receiving REQ4 and REQ8, the arbiter 1 in the output port 1 performs arbitration according to the priority and other conditions. Arbitration is performed to determine that REQ8 has obtained the arbitration; arbiter 2 in output port 1 arbitrates the arbitration result of arbiter 0 (REQ7) and the arbitration result of arbiter 1 (REQ8), determines that REQ7 has obtained arbitration, and then returns to input port 1 GRANT (a specific example of the aforementioned second grant message), instructing REQ7 to obtain arbitration.
  • REQ7 arbitration result of arbiter 0
  • REQ8 arbitration result of arbiter 1
  • input port 0 dispatches REQ1 of VC0 type packets to output port 0 to obtain arbitration
  • input port 0 and output port 0 establish a transmission relationship
  • input port 1 dispatches VC0 type packets to output port 0 REQ5 did not receive arbitration.
  • input port 1 also sends REQ7 to output port 1 to request scheduling of VC0 type messages
  • REQ7 can obtain arbitration for output port 1. Therefore, the scheduling of VC0 type packets in input port 1 will not be blocked, that is, input port 1 can establish a transmission relationship with output port 1, and schedule VC0 type packets to output port 1. Therefore, using the router shown in Figure 8 can improve the bandwidth utilization of the output port.
  • the system-on-a-chip 900 includes a host 901 , a slave 902 and the aforementioned router 500 .
  • the router 500 is used to route the message sent by the master 901 to the slave 902 .

Abstract

A router and a system on chip, which are used for improving the utilization rate of bandwidths when scheduling packets. The router comprises a plurality of inports and a plurality of outports, wherein each inport is used to send, with regard to a plurality of input packets, a request message to the outports corresponding the respective packets; and each outport is used to arbitrate the received request message, and send a permission message to the inport which passes the arbitration. By means of the described solution, when sending, to outports, a request message requesting for the scheduling of packets, each inport can send a request to a plurality of outports respectively with regard to a plurality of input packets, and the sending of the request by the inport is not limited by a service type. Compared with the prior art, in the case where a request message sent by an inport to a certain outport has not passed the arbitration, the inport can also be arbitrated by other outports, and the utilization rate of the bandwidths of the outport is high.

Description

一种路由器及片上系统A router and system-on-chip 技术领域technical field
本申请涉及芯片技术领域,尤其涉及一种路由器及片上系统。The present application relates to the field of chip technology, and in particular, to a router and a system-on-chip.
背景技术Background technique
片上网络(network on chip,NoC)是片上系统(system on chip,SoC)的一种通信方法。图1示出了一种SoC内部互联总线的示意图。其中,片上网络路由器(router)负责实现主机(master)访问从机(slave)的路由:路由器根据每个主机发出的访问地址,决定将相应报文调度至某个输出节点(另一路由器或从机)。A network on chip (NoC) is a communication method for a system on chip (SoC). FIG. 1 shows a schematic diagram of an internal interconnection bus of an SoC. Among them, the on-chip network router (router) is responsible for realizing the routing of the host (master) accessing the slave (slave): the router decides to schedule the corresponding message to an output node (another router or a slave) according to the access address sent by each host. machine).
由于主机对从机有不同的业务访问需求,因此路由器内部设置有多个虚拟通道(virtual channel,VC),每个虚拟通道用于传输一种业务类型的报文。图2示出了路由器内部的一种可能的结构示意图。该路由器包括两部分:输入端口(inport)和输出端口(outport)。输入端口可以划分出多个VC(图2中以划分两个VC为例),每个VC对应一个先入先出(first input first output,FIFO)的VC队列。VC队列会根据当前需要调度的报文,向对应的输出端口发送仲裁请求。输出端口中的仲裁器(arbitor)在接收到多个仲裁请求的情况下,根据发送仲裁请求的各个输入端口的优先级,仲裁出某个输入端口的某个VC队列进行报文的调度。Since the host has different service access requirements for the slave, there are multiple virtual channels (virtual channels, VC) inside the router, and each virtual channel is used to transmit packets of one service type. FIG. 2 shows a possible schematic diagram of the internal structure of the router. The router consists of two parts: an input port (inport) and an output port (outport). The input port can be divided into multiple VCs (two VCs are divided as an example in Figure 2), and each VC corresponds to a first input first output (FIFO) VC queue. The VC queue will send an arbitration request to the corresponding output port according to the currently scheduled packets. In the case of receiving multiple arbitration requests, the arbitor in the output port arbitrates out a certain VC queue of a certain input port to schedule packets according to the priority of each input port that sends the arbitration request.
在一些场景下,采用上述报文调度方案会出现带宽损失的问题。如图3所示,当输入端口0和输入端口1的同一VC(比如VC0)均需要向输出端口0调度报文时,输入端口0和输入端口1都向输出端口0发送仲裁请求。假设输入端口0获得仲裁,那么输入端口0可以向输出端口0调度报文,输入端口1则暂时不能调度报文到输出端口0。由于输入端口1中的VC0队列是FIFO结构,因此输入端口1在调度至输出端口0的报文(简称报文0)未发送出去的情况下,即使输入端口1的VC0队列中还存在需要调度至输出端口1的报文(简称报文1),输入端口1由于VC0队列的头阻塞也无法申请向输出端口1调度报文,此时路由器的输出端口仅输出端口0在使用,而输出端口1未被使用,使得带宽被浪费。In some scenarios, bandwidth loss may occur when the above packet scheduling scheme is used. As shown in FIG. 3 , when the same VC (such as VC0) of input port 0 and input port 1 both needs to schedule packets to output port 0, both input port 0 and input port 1 send arbitration requests to output port 0. Assuming that input port 0 obtains arbitration, input port 0 can dispatch packets to output port 0, but input port 1 cannot temporarily dispatch packets to output port 0. Since the VC0 queue in input port 1 is a FIFO structure, if the message scheduled to output port 1 (referred to as message 0) is not sent out on input port 1, even if there is still a need for scheduling in the VC0 queue of input port 1 For packets sent to output port 1 (referred to as packet 1), input port 1 cannot apply to schedule packets to output port 1 due to the head of the VC0 queue. 1 is not used, so bandwidth is wasted.
综上,现有技术提供的报文调度方案中存在带宽浪费的问题。To sum up, there is a problem of wasting bandwidth in the packet scheduling solution provided by the prior art.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种路由器及片上系统,用以在调度报文时提高带宽的利用率。Embodiments of the present application provide a router and a system-on-chip, which are used to improve bandwidth utilization when scheduling packets.
第一方面,本申请实施例提供一种路由器,该路由器包括多个输入端口和多个输出端口。其中,多个输入端口中的每个输入端口用于针对输入的多个报文向各报文相应的输出端口发送请求消息;多个输出端口中的每个输出端口用于对接收到的请求消息进行仲裁,向获得仲裁的输入端口发送许可消息。In a first aspect, an embodiment of the present application provides a router, where the router includes multiple input ports and multiple output ports. Wherein, each input port of the multiple input ports is used to send a request message to the corresponding output port of each message for the multiple input packets; each output port of the multiple output ports is used to respond to the received request The message is arbitrated, sending a grant message to the arbitrated input port.
采用上述方案,每个输入端口在向输出端口发送请求调度报文的请求消息时,可以针对输入的多个报文分别向多个输出端口发送请求,输入端口发送请求时并不受业务类型的限制。与现有技术中每个输入端口针对一种业务类型仅可以向一个输出端口发送一条请求消息的方案相比,在输入端口向某个输出端口发送的请求消息未获得仲裁的情况下,该输 入端口还可以获得其他输出端口的仲裁,不会出现现有技术中所述的VC队列发生头阻塞的现象,因而输出端口的带宽利用率高。With the above solution, when each input port sends a request message requesting scheduling packets to the output port, it can send requests to multiple output ports for multiple input packets, and the input port sends requests without any service type. limit. Compared with the prior art scheme in which each input port can only send one request message to one output port for one service type, in the case where the request message sent by the input port to an output port is not arbitrated, the input port The port can also obtain arbitration of other output ports, and the phenomenon of head blocking of the VC queue described in the prior art will not occur, so the bandwidth utilization rate of the output port is high.
在一种可能的设计中,各输入端口中配置有共享缓存,共享缓存中存储有多种业务类型的报文,每个输入端口用于针对共享缓存中存储的多个报文同时向各报文相应的输出端口发送请求消息,在接收到相应输出端口发送的许可消息之后,调度相应报文并且发送该报文到相应输出端口。In a possible design, each input port is configured with a shared buffer, the shared buffer stores packets of multiple service types, and each input port is used to simultaneously send multiple packets stored in the shared buffer to each report. The corresponding output port sends a request message, and after receiving the permission message sent by the corresponding output port, the corresponding message is scheduled and sent to the corresponding output port.
其中,共享缓存可以通过随机存取存储器RAM或寄存器实现。Among them, the shared cache can be implemented by random access memory RAM or registers.
采用上述方案,在每个输入端口中,该输入端口接收到的报文均存储在共享缓存中。该输入端口可以针对共享缓存中的多个报文同时向相应的输出端口发送请求消息,使得多个输出端口可以同时对接收到的请求消息进行仲裁并确定获得仲裁的请求消息,提高了报文调度的效率。With the above solution, in each input port, the packets received by the input port are stored in the shared buffer. The input port can simultaneously send request messages to the corresponding output ports for multiple messages in the shared buffer, so that multiple output ports can arbitrate the received request messages at the same time and determine the request message that has obtained the arbitration, which improves the message scheduling efficiency.
进一步地,可以设定共享缓存中,第一业务类型的报文的存储空间小于或等于第一门限值,第二业务类型的报文的存储空间小于或等于第二门限值。Further, in the shared cache, the storage space of the packets of the first service type may be set to be less than or equal to the first threshold value, and the storage space of the packets of the second service type may be set to be less than or equal to the second threshold value.
采用上述方案,在共享缓存中,针对不同业务类型的报文设置不同的存储空间上限(水线),以避免共享缓存的存储空间被部分业务类型的报文占用,导致其他业务类型的报文的存储空间受限。With the above solution, in the shared cache, different storage space upper limits (waterlines) are set for packets of different service types, so as to avoid the storage space of the shared cache being occupied by packets of some service types, resulting in packets of other service types. storage space is limited.
此外,每个输入端口中可以维护有多个链表,每个链表对应于该输入端口支持的相应的业务类型和相应的输出端口,每个链表用于记录需要向相应输出端口调度的相应业务类型的报文。In addition, each input port can maintain multiple linked lists, each linked list corresponds to the corresponding service type supported by the input port and the corresponding output port, and each linked list is used to record the corresponding service type that needs to be scheduled to the corresponding output port 's message.
进一步地,每个输入端口可以针对记录有要调度的报文的各个链表向相应的输出端口分别发送请求消息,在接收到相应输出端口发送的许可消息之后,调度该链表中记录的报文并且发送该报文到相应输出端口。Further, each input port can respectively send a request message to the corresponding output port for each linked list in which the message to be scheduled is recorded, and after receiving the permission message sent by the corresponding output port, schedule the message recorded in the linked list and Send the message to the corresponding output port.
在一种可能的设计中,第一方面提供的路由器包括第一输入端口、第二输入端口、第一输出端口和第二输出端口。In a possible design, the router provided by the first aspect includes a first input port, a second input port, a first output port and a second output port.
第一输入端口可以向第一输出端口发送第一请求消息,第一请求消息用于指示第一输入端口请求向第一输出端口调度第一业务类型的第一报文。The first input port may send a first request message to the first output port, where the first request message is used to instruct the first input port to request to schedule the first packet of the first service type to the first output port.
第二输入端口可以向第一输出端口发送第二请求消息,第二请求消息用于指示第二输入端口请求向第一输出端口调度第一业务类型的第二报文;第二输入端口还可以向第二输出端口发送第三请求消息,第三请求消息用于指示第二输入端口请求向第二输出端口调度第一业务类型的第三报文。The second input port may send a second request message to the first output port, where the second request message is used to instruct the second input port to request to schedule a second packet of the first service type to the first output port; the second input port may also A third request message is sent to the second output port, where the third request message is used to instruct the second input port to request to schedule a third packet of the first service type to the second output port.
第一输出端口可以对第一请求消息和第二请求消息进行仲裁,向第一输入端口发送第一许可消息,第一许可消息用于指示允许第一输入端口向第一输出端口调度第一报文。The first output port may arbitrate the first request message and the second request message, and send a first permission message to the first input port, where the first permission message is used to indicate that the first input port is allowed to schedule the first message to the first output port. arts.
第二输出端口可以对第三请求消息进行仲裁,向第二输入端口发送第二许可消息,第二许可消息用于指示允许第二输入端口向第二输出端口调度第三报文。The second output port may arbitrate the third request message, and send a second permission message to the second input port, where the second permission message is used to indicate that the second input port is allowed to schedule the third packet to the second output port.
采用上述方案,第二输入端口在未获得第一输出端口的仲裁的情况下,第二输入端口还可以获得第二输出端口的仲裁。与现有技术相比,采用上述方案,由于输入端口针对需要调度至不同输出端口的报文,可以分别向相应的不同输出端口发送请求消息,因而第二输入端口向第一输出端口调度第二报文的请求未获得仲裁的情况下,第二输入端口可以获得第二输出端口的仲裁而向第二输出端口调度第三报文,即不会出现现有技术中提到的VC队列发生头阻塞的现象,因而输出端口的带宽利用率高。With the above solution, if the second input port does not obtain the arbitration of the first output port, the second input port can also obtain the arbitration of the second output port. Compared with the prior art, with the above solution, since the input port can send request messages to the corresponding different output ports for messages that need to be scheduled to different output ports, the second input port schedules the second output port to the first output port. In the case where the request for the message does not obtain arbitration, the second input port can obtain the arbitration of the second output port and schedule the third message to the second output port, that is, the VC queue occurrence head mentioned in the prior art will not appear. Therefore, the bandwidth utilization rate of the output port is high.
在一种可能的设计中,第一输入端口还可以向第一输出端口发送第一接受消息,第一接受消息用于指示第一输入端口接受第一输出端口的许可;将第一报文调度至第一输出端口;向第一输出端口发送第一释放消息,第一释放消息用于指示第一报文调度完成。In a possible design, the first input port may also send a first accept message to the first output port, where the first accept message is used to instruct the first input port to accept the permission of the first output port; schedule the first message to the first output port; sending a first release message to the first output port, where the first release message is used to indicate that the first packet scheduling is completed.
采用上述方案,第一输入端口向第一输出端口发送第一许可消息之后,可以锁定第一输入端口和第一输出端口之间的传输关系。第一输入端口在第一报文调度完成后向第一输出端口发送第一释放消息,第一输出端口被释放,第一输入端口和第一输出端口之间的传输关系解除。第一输入端口可以针对第一共享缓存中待调度的报文重新发送请求消息。第一输出端口可以再次接收输入端口发送的请求消息,并对接收到的请求消息进行仲裁,开始下一次报文调度。With the above solution, after the first input port sends the first permission message to the first output port, the transmission relationship between the first input port and the first output port can be locked. The first input port sends a first release message to the first output port after the first packet scheduling is completed, the first output port is released, and the transmission relationship between the first input port and the first output port is released. The first input port may resend the request message for the packet to be scheduled in the first shared buffer. The first output port can receive the request message sent by the input port again, and arbitrate the received request message to start the next packet scheduling.
在一种可能的设计中,第二输入端口还可以向第二输出端口发送第二接受消息,第二接受消息用于指示第二输入端口接受第二输出端口的许可;将第三报文调度至第二输出端口;向第二输出端口发送第二释放消息,第二释放消息用于指示第三报文调度完成。In a possible design, the second input port may also send a second accept message to the second output port, where the second accept message is used to instruct the second input port to accept the permission of the second output port; schedule the third message to the second output port; sending a second release message to the second output port, where the second release message is used to indicate that the scheduling of the third packet is completed.
采用上述方案,第二输入端口向第二输出端口发送第二许可消息之后,可以锁定第二输入端口和第二输出端口之间的传输关系。第二输入端口在第三报文调度完成后向第二输出端口发送第二释放消息,第二输出端口被释放,第二输入端口和第二输出端口之间的传输关系解除。第二输入端口可以针对第二共享缓存中待调度的报文重新发送请求消息。第二输出端口可以再次接收输入端口发送的请求消息,并对接收到的请求消息进行仲裁,开始下一次报文调度。With the above solution, after the second input port sends the second permission message to the second output port, the transmission relationship between the second input port and the second output port can be locked. The second input port sends a second release message to the second output port after the third packet scheduling is completed, the second output port is released, and the transmission relationship between the second input port and the second output port is released. The second input port may resend the request message for the packet to be scheduled in the second shared buffer. The second output port can receive the request message sent by the input port again, and arbitrate the received request message to start the next packet scheduling.
此外,第一输入端口还可以向多个输出端口中的第三输出端口发送第四请求消息,该第四请求消息用于指示第一输入端口请求向第三输出端口调度第一业务类型的第四报文;第三输出端口,用于对第四请求消息进行仲裁,向第一输入端口发送第三许可消息,第三许可消息用于指示允许第一输入端口向第三输出端口调度第四报文。In addition, the first input port may also send a fourth request message to the third output port among the plurality of output ports, where the fourth request message is used to instruct the first input port to request the third output port to schedule the first service type of the first service type to the third output port. Four packets; the third output port is used to arbitrate the fourth request message and send a third permission message to the first input port, and the third permission message is used to indicate that the first input port is allowed to schedule the fourth request message to the third output port. message.
采用上述方案,第一输出端口和第三输出端口均裁定第一输入端口获得仲裁,并分别向第一输入端口发送第一许可消息和第三许可消息,第一输入端口选择先向第一输出端口调度第一报文,向第一输出端口发送第一接受消息。由于第三输出端口未接收到接受消息,因而第三输出端口后续可以接收其他输入端口的请求,用于其他报文的调度,从而提高输出端口的带宽利用率。With the above solution, both the first output port and the third output port decide that the first input port obtains the arbitration, and respectively send the first permission message and the third permission message to the first input port, and the first input port selects the first output port first. The port schedules the first message, and sends the first accept message to the first output port. Since the third output port does not receive the accept message, the third output port can subsequently receive requests from other input ports for scheduling other packets, thereby improving the bandwidth utilization of the output port.
在一个可能的设计中,第一输入端口还可以向第一输出端口发送第五请求消息,第五请求消息用于指示第一输入端口请求向第一输出端口调度第二业务类型的第五报文;第一输出端口,还用于对第五请求消息进行仲裁,确定不允许第一输入端口调度第五报文。In a possible design, the first input port may also send a fifth request message to the first output port, where the fifth request message is used to instruct the first input port to request to schedule a fifth message of the second service type to the first output port The first output port is further configured to arbitrate the fifth request message, and determine that the first input port is not allowed to schedule the fifth message.
在上述方案中,第一输入端口同时向第一输出端口发送两种业务类型的请求消息,第一输出端口对这两条请求消息(第一请求消息和第五请求消息)进行仲裁,确定第一请求消息获得仲裁、第五请求消息未获得仲裁。In the above solution, the first input port sends request messages of two service types to the first output port at the same time, and the first output port arbitrates the two request messages (the first request message and the fifth request message) to determine the first request message. A request message obtains arbitration, and a fifth request message does not obtain arbitration.
在一种可能的设计中,第一输入端口还可以向第二输出端口发送第六请求消息,第六请求消息用于指示第一输入端口请求向第二输出端口调度第一业务类型的第六报文;第二输出端口,还用于对第六请求消息进行仲裁,确定不允许第一输入端口调度第六报文。In a possible design, the first input port may also send a sixth request message to the second output port, where the sixth request message is used to instruct the first input port to request to schedule a sixth request of the first service type to the second output port message; the second output port is further configured to arbitrate the sixth request message to determine that the first input port is not allowed to schedule the sixth message.
在上述方案中,第一输入端口还请求向第二输出端口调度第一业务类型的第六报文,第二输出端口对接收到的第三请求消息和第六请求消息进行仲裁,确定允许第二输入端口调度第三报文,不允许第一输入端口调度第六报文。因此,第二输出端口向第二输入端口发送第二许可消息,并未向第一输入端口发送许可消息。In the above solution, the first input port also requests to schedule the sixth message of the first service type to the second output port, and the second output port arbitrates the received third request message and the sixth request message, and determines to allow the third request message and the sixth request message. The second input port schedules the third message, and the first input port is not allowed to schedule the sixth message. Therefore, the second output port sends the second permission message to the second input port and does not send the permission message to the first input port.
第二方面,本申请实施例还提供一种片上系统,包括主机、从机以及第一方面及其任一可能的设计中提供的路由器,路由器用于将主机发送的报文路由至从机。In a second aspect, an embodiment of the present application further provides a system-on-chip, including a host, a slave, and the router provided in the first aspect and any possible design thereof, where the router is configured to route a packet sent by the host to the slave.
另外,第二方面中任一种可能设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。In addition, for the technical effects brought by any possible design manner in the second aspect, reference may be made to the technical effects brought about by different design manners in the first aspect, which will not be repeated here.
附图说明Description of drawings
图1为现有技术提供的一种SoC内部互联总线的示意图;1 is a schematic diagram of a SoC internal interconnection bus provided by the prior art;
图2为现有技术提供的一种路由器内部的结构示意图;Fig. 2 is a kind of internal structure schematic diagram of router provided by prior art;
图3为现有技术提供的一种输入端口发生头阻塞的示意图;3 is a schematic diagram of head blocking at an input port provided by the prior art;
图4为本申请实施例提供的一种共享缓存的示意图;4 is a schematic diagram of a shared cache provided by an embodiment of the present application;
图5为本申请实施例提供的一种路由器的结构示意图;FIG. 5 is a schematic structural diagram of a router according to an embodiment of the present application;
图6为本申请实施例提供的一种第一输入端口和第一输出端口的交互流程示意图;6 is a schematic diagram of an interaction flow between a first input port and a first output port according to an embodiment of the present application;
图7为本申请实施例提供的一种第二输入端口和第二输出端口的交互流程示意图;7 is a schematic diagram of an interaction flow between a second input port and a second output port according to an embodiment of the present application;
图8为本申请实施例提供的另一种路由器的结构示意图;FIG. 8 is a schematic structural diagram of another router according to an embodiment of the present application;
图9为本申请实施例提供的一种片上系统的结构示意图。FIG. 9 is a schematic structural diagram of a system-on-chip provided by an embodiment of the present application.
具体实施方式Detailed ways
下面,首先对本申请实施例的应用场景进行介绍。In the following, the application scenarios of the embodiments of the present application are first introduced.
本申请实施例可应用于图1所示的片上系统。该片上系统包括主机、路由器和从机。路由器负责实现主机访问从机的路由:路由器根据每个主机发出的访问地址,决定将相应报文路由至某个输出节点(下一级路由器或从机)。The embodiments of the present application can be applied to the system-on-chip shown in FIG. 1 . The system-on-chip includes a master, a router, and a slave. The router is responsible for implementing the route for the host to access the slave: the router decides to route the corresponding message to an output node (the next-level router or the slave) according to the access address sent by each host.
需要说明的是,图1所示的SoC中包括两级路由:路由器0和路由器1位于第一级,路由器2和路由器3位于第二级。第一级路由用于将报文从主机调度至第二级路由;第二级路由用于将报文从第一级路由调度至从机。实际应用中,SoC中可以包括一级路由,也可以包括多级路由,并不限于图1所示的两级路由。此外,主机、从机和路由器的数量也不限于图1中所示。It should be noted that the SoC shown in FIG. 1 includes two levels of routing: router 0 and router 1 are located at the first level, and router 2 and router 3 are located at the second level. The first-level routing is used to schedule packets from the master to the second-level routing; the second-level routing is used to schedule packets from the first-level routing to the slave. In practical applications, the SoC may include one-level routing or multiple-level routing, and is not limited to the two-level routing shown in FIG. 1 . In addition, the number of masters, slaves and routers is not limited to that shown in FIG. 1 .
在图1所示的SoC中,每个路由器包括多个输入端口和多个输出端口。当某个输入端口需要向某个输出端口调度报文时,该输入端口向该输出端口发送仲裁请求,输出端口在接收到多个仲裁请求的情况下根据发送仲裁请求的各个输入端口的优先级,仲裁出某个输入端口进行报文的调度。In the SoC shown in Figure 1, each router includes multiple input ports and multiple output ports. When an input port needs to dispatch packets to an output port, the input port sends an arbitration request to the output port, and the output port receives multiple arbitration requests according to the priority of each input port that sends the arbitration request , arbitrate out an input port for packet scheduling.
现有技术中,如图2所示,输入端口中包括多个FIFO队列,每个FIFO队列用于存储输入端口的上一级端口(比如主机或上一级路由)发送的一种业务类型的报文。In the prior art, as shown in FIG. 2 , the input port includes multiple FIFO queues, and each FIFO queue is used to store a service type sent by an upper-level port (such as a host or an upper-level router) of the input port. message.
与现有技术不同的是,本申请实施例中,输入端口将输入的报文(例如,上一级发送的报文)存储在共享缓存中。共享缓存可用于存储多种业务类型的报文,报文在共享缓存中并不是以队列的形式存储,因而共享缓存中的报文在调度时不受先进先出规则的限制。Different from the prior art, in this embodiment of the present application, the input port stores the input message (for example, the message sent by the upper level) in the shared buffer. The shared buffer can be used to store packets of various service types. The packets are not stored in the form of queues in the shared buffer. Therefore, the packets in the shared buffer are not restricted by the FIFO rule during scheduling.
具体地,如图4所示,每个输入端口中的共享缓存可以划分为多个存储区域,包括多个第一缓存区域以及一个第二缓存区域。其中,每个第一缓存区域用于存储上一级发送的、单一业务类型的报文,第二缓存区域可以存储多种业务类型的报文。Specifically, as shown in FIG. 4 , the shared buffer in each input port can be divided into a plurality of storage areas, including a plurality of first buffer areas and a second buffer area. Wherein, each first buffer area is used to store the message of a single service type sent by the upper level, and the second buffer area can store the message of multiple service types.
其中,配置第一缓存区域的作用是使得该输入端口可以接收上一级发送的任一业务类 型的报文,即为每一业务类型的报文预留一定的存储空间(也可以称为预留credit)。比如,输入端口可调度报文的业务类型有N种,N≥1,那么共享缓存中可以配置N个第一缓存区域,每个第一缓存区域用于存储单一业务类型的报文。在第二缓存区域存储已满的情况下,由于针对每一业务类型还配置有第一缓存区域,那么输入端口仍可以接收上一级发送的任一业务类型的报文。Among them, the function of configuring the first buffer area is to enable the input port to receive messages of any service type sent by the upper level, that is, to reserve a certain storage space (also referred to as pre-processing) for the messages of each service type. keep credit). For example, if there are N types of services that can schedule packets on the input port, N≥1, then N first buffer areas can be configured in the shared buffer, and each first buffer area is used to store packets of a single service type. In the case that the storage of the second buffer area is full, since the first buffer area is also configured for each service type, the input port can still receive the packets of any service type sent by the upper level.
需要说明的是,在输入端口的共享缓存中,第一缓存区域和第二缓存区域可以从硬件层面划分,也可以从软件层面划分,本申请实施例对第一缓存区域和第二缓存区域的划分方式不做具体限定。假设采用随机存取存储器(random access memory,RAM)来例化共享缓存,那么,在一种可能的示例中,可以设定RAM中的部分存储阵列对应第一缓存区域,另一部分存储阵列对应第二缓存区域。在另一种可能的示例中,可以设定部分寻址空间对应第一缓存区域,另一部分寻址空间对应第二缓存区域。在又一种可能的示例中,第一缓存区域和第二缓存区域是动态变化的,并不严格规定哪些阵列或哪些地址对应某一种缓存区域,只要在共享缓存中为每一种业务类型预留有(与第一缓存区域大小相同的)存储空间即可;比如,输入端口接收到上一级发送的业务类型1的报文1并存储在共享缓存中,那么报文1的存储区域可以视为为业务类型1预留的第一缓存区域;输入端口又接收到上一级发送的业务类型1的报文2并存储在共享缓存中,那么此时报文2的存储区域可以视为为业务类型1预留的第一缓存区域,报文1的存储区域则视为第二缓存区域。It should be noted that, in the shared cache of the input port, the first cache area and the second cache area may be divided from the hardware level or the software level. The division method is not specifically limited. Assuming that random access memory (RAM) is used to instantiate the shared cache, then, in a possible example, part of the storage array in the RAM can be set to correspond to the first cache area, and another part of the storage array to correspond to the first cache area. Second cache area. In another possible example, part of the addressing space may be set to correspond to the first cache area, and another part of the addressing space may be set to correspond to the second cache area. In another possible example, the first cache area and the second cache area are dynamically changed, and which arrays or which addresses correspond to a certain cache area are not strictly specified, as long as the shared cache is used for each service type Reserve a storage space (with the same size as the first cache area); for example, if the input port receives the message 1 of service type 1 sent by the upper level and stores it in the shared cache, then the storage area of the message 1 It can be regarded as the first buffer area reserved for service type 1; the input port receives the message 2 of service type 1 sent by the upper level and stores it in the shared cache, then the storage area of the message 2 can be regarded as The first buffer area reserved for service type 1, and the storage area of packet 1 is regarded as the second buffer area.
在共享缓存中,报文在调度时不受先进先出规则的限制。比如,输入端口先接收到上一级发送的业务类型1的报文1并存储在共享缓存中,报文1需要调度至输出端口1;然后,该输入端口接收到上一级发送的业务类型1的报文2并存储在共享缓存中,报文2需要调度至输出端口2。输入端口可以同时分别向输出端口1和输出端口2发送仲裁请求,分别请求调度报文1和报文2。也就是说,对于需要调度至不同输出端口的多个报文,输入端口可以针对多个报文分别向相应的不同输出端口发送仲裁请求,若该输入端口在输出端口1处获得仲裁,则该输入端口可以将报文1调度至输出端口1;若该输入端口在输出端口2获得仲裁,则该输入端口可以将相应的报文2调度至输出端口2;若该输入端口在输出端口1和输出端口2均获得仲裁,则该输入端口可以选择调度报文1或调度报文2。In a shared cache, packets are not subject to the FIFO rule when scheduling. For example, the input port first receives the message 1 of service type 1 sent by the upper level and stores it in the shared buffer, and the message 1 needs to be dispatched to the output port 1; then, the input port receives the service type sent by the upper level. The message 2 of 1 is stored in the shared buffer, and the message 2 needs to be dispatched to the output port 2. The input port can send arbitration requests to output port 1 and output port 2 at the same time, and request to schedule message 1 and message 2 respectively. That is to say, for multiple packets that need to be dispatched to different output ports, the input port can send arbitration requests to corresponding different output ports for multiple packets. If the input port obtains arbitration at output port 1, the The input port can schedule the message 1 to the output port 1; if the input port obtains arbitration on the output port 2, the input port can schedule the corresponding message 2 to the output port 2; if the input port is on the output port 1 and the output port 2. If both output port 2 obtains arbitration, the input port can select either scheduling packet 1 or scheduling packet 2.
此外,本申请实施例中,业务类型的划分可以有多种方式。比如,对传输时延敏感的报文被划分为一种业务类型,对传输时延不敏感的报文被划分为另一种业务类型;再比如,访问主机0的报文被划分为一种业务类型,访问主机1的报文被划分为另一种业务类型。本申请实施例对业务类型的划分方式不做具体限定。In addition, in this embodiment of the present application, there may be multiple manners for the division of service types. For example, packets that are sensitive to transmission delay are classified into one type of service, and packets that are not sensitive to transmission delay are classified into another type of service; for another example, packets that access host 0 are classified as one type of service. Service type, the packets accessing host 1 are classified into another service type. This embodiment of the present application does not specifically limit the division manner of service types.
下面将结合附图对本申请实施例作进一步地详细描述。The embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
需要说明的是,本申请实施例中,多个是指两个或两个以上。另外,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。It should be noted that, in the embodiments of the present application, multiple refers to two or more. In addition, in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing and describing, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
本申请实施例提供一种路由器。该路由器包括多个输入端口和多个输出端口。其中,每个输入端口用于针对输入的多个报文向各报文相应的输出端口发送请求消息;每个输出端口用于对接收到的请求消息进行仲裁,向获得仲裁的输入端口发送许可消息。Embodiments of the present application provide a router. The router includes multiple input ports and multiple output ports. Wherein, each input port is used to send a request message to the corresponding output port of each message for multiple input messages; each output port is used to arbitrate the received request message, and send permission to the input port that has obtained the arbitration information.
也就是说,每个输入端口在向输出端口发送请求调度报文的请求消息时,可以针对输入的多个报文分别向多个输出端口发送请求,输入端口发送请求时并不受业务类型的限制。与现有技术中每个输入端口针对一种业务类型仅可以向一个输出端口发送一条请求消息 的方案相比,在输入端口向某个输出端口发送的请求消息未获得仲裁的情况下,该输入端口还可以获得其他输出端口的仲裁,不会出现现有技术中所述的VC队列发生头阻塞的现象,因而输出端口的带宽利用率高。That is to say, when each input port sends a request message requesting a scheduling packet to an output port, it can send requests to multiple output ports for multiple input packets. The input port sends requests without any service type. limit. Compared with the prior art scheme in which each input port can only send one request message to one output port for one service type, in the case where the request message sent by the input port to an output port is not arbitrated, the input port The port can also obtain arbitration of other output ports, and the phenomenon of head blocking of the VC queue described in the prior art will not occur, so the bandwidth utilization rate of the output port is high.
此外,各输入端口中配置有共享缓存,共享缓存中存储有多种业务类型的报文,每个输入端口用于针对共享缓存中存储的多个报文同时向各报文相应的输出端口发送请求消息,在接收到相应输出端口发送的许可消息之后,调度相应报文并且发送该报文到相应输出端口。In addition, each input port is configured with a shared buffer, and the shared buffer stores packets of various service types. Each input port is used to send multiple packets stored in the shared buffer to the corresponding output port of each packet at the same time. In the request message, after receiving the permission message sent by the corresponding output port, schedule the corresponding message and send the message to the corresponding output port.
也就是说,在每个输入端口中,该输入端口接收到的报文均存储在共享缓存中。该输入端口可以针对共享缓存中的多个报文同时向相应的输出端口发送请求消息。比如,该输入端口可以向第一输出端口发送请求调度第一业务类型的报文的请求消息,同时也向第二输出端口发送请求调度第一业务类型的报文的请求消息。That is, in each input port, the packets received by the input port are stored in the shared buffer. The input port can simultaneously send a request message to the corresponding output port for multiple packets in the shared buffer. For example, the input port may send a request message requesting to schedule packets of the first service type to the first output port, and also send a request message requesting to schedule packets of the first service type to the second output port.
参见图5,在一个具体示例中,路由器500包括第一输入端口501、第二输入端口502、第一输出端口503和第二输出端口504。其中,第一输入端口501可以向第一输出端口503发送第一请求消息,第一请求消息用于指示第一输入端口501请求向第一输出端口503调度第一业务类型的第一报文;第二输入端口502可以向第一输出端口503发送第二请求消息,第二请求消息用于指示第二输入端口502请求向第一输出端口503调度第一业务类型的第二报文;第二输入端口502还可以向第二输出端口504发送第三请求消息,第三请求消息用于指示第二输入端口502请求向第二输出端口504调度第一业务类型的第三报文;第一输出端口503可以对第一请求消息和第二请求消息进行仲裁,向第一输入端口501发送第一许可消息,第一许可消息用于指示允许第一输入端口501向第一输出端口503调度第一报文;第二输出端口504可以对第三请求消息进行仲裁,向第二输入端口502发送第二许可消息,第二许可消息用于指示允许第二输入端口502向第二输出端口504调度第三报文。Referring to FIG. 5 , in a specific example, the router 500 includes a first input port 501 , a second input port 502 , a first output port 503 and a second output port 504 . The first input port 501 may send a first request message to the first output port 503, where the first request message is used to instruct the first input port 501 to request the first output port 503 to schedule a first packet of the first service type; The second input port 502 may send a second request message to the first output port 503, where the second request message is used to instruct the second input port 502 to request to schedule a second packet of the first service type to the first output port 503; The input port 502 may also send a third request message to the second output port 504, where the third request message is used to instruct the second input port 502 to request to schedule a third packet of the first service type to the second output port 504; the first output The port 503 can arbitrate the first request message and the second request message, and send the first permission message to the first input port 501, where the first permission message is used to indicate that the first input port 501 is allowed to schedule the first output port 503. message; the second output port 504 can arbitrate the third request message, and send a second permission message to the second input port 502, the second permission message is used to indicate that the second input port 502 is allowed to schedule the second output port 504. Three messages.
在本申请实施例提供的路由器500中,针对第一业务类型的报文,第一输入端口501向第一输出端口503发送第一请求消息,以请求调度第一报文;第二输入端口502分别向第一输出端口503和第二输出端口504发送第二请求消息和第三请求消息,以请求调度第二报文和第三报文。也就是说,本申请实施例中,输入端口针对需要调度至不同输出端口的报文,可以分别向相应的不同输出端口发送请求消息,比如第二输入端口502分别向第一输出端口503和第二输出端口504发送第二请求消息和第三请求消息。In the router 500 provided in this embodiment of the present application, for a message of the first service type, the first input port 501 sends a first request message to the first output port 503 to request to schedule the first message; the second input port 502 The second request message and the third request message are sent to the first output port 503 and the second output port 504, respectively, to request scheduling of the second packet and the third packet. That is to say, in this embodiment of the present application, the input port may send request messages to the corresponding different output ports for packets that need to be dispatched to different output ports. The second output port 504 sends the second request message and the third request message.
第一输出端口503接收到第一请求消息和第二请求消息后,根据第一输入端口501和第二输入端口502的优先级进行仲裁,确定第一输入端口501获得仲裁、第二输入端口502未获得仲裁,第一输入端口501和第一输出端口503之间可以建立传输关系。由于第二输入端口502还向第二输出端口504发送第三请求消息,第二输出端口504进行仲裁后确定第二输入端口502获得仲裁,第二输入端口502和第二输出端口504之间也可以建立传输关系。After receiving the first request message and the second request message, the first output port 503 performs arbitration according to the priorities of the first input port 501 and the second input port 502, and determines that the first input port 501 obtains the arbitration and the second input port 502 obtains arbitration. Without obtaining arbitration, a transmission relationship may be established between the first input port 501 and the first output port 503 . Since the second input port 502 also sends a third request message to the second output port 504, after the second output port 504 performs arbitration, it is determined that the second input port 502 has obtained the arbitration, and there is no connection between the second input port 502 and the second output port 504. A transfer relationship can be established.
路由器500中,第二输入端口502在未获得第一输出端口503的仲裁的情况下,第二输入端口502还可以获得第二输出端口504的仲裁。与现有技术相比,本申请实施例中,由于输入端口针对需要调度至不同输出端口的报文,可以分别向相应的不同输出端口发送请求消息,因而第二输入端口502向第一输出端口503调度第二报文的请求未获得仲裁的情况下,第二输入端口502可以获得第二输出端口504的仲裁而向第二输出端口504调度 第三报文,即不会出现现有技术中提到的VC队列发生头阻塞的现象,因而输出端口的带宽利用率高。In the router 500 , if the second input port 502 does not obtain the arbitration of the first output port 503 , the second input port 502 can also obtain the arbitration of the second output port 504 . Compared with the prior art, in this embodiment of the present application, since the input port can send request messages to corresponding different output ports for packets that need to be dispatched to different output ports, the second input port 502 sends a request message to the first output port. 503 In the case where the request for scheduling the second packet has not been arbitrated, the second input port 502 can obtain the arbitration of the second output port 504 and schedule the third packet to the second output port 504, that is, the prior art does not occur. The phenomenon of head blocking occurs in the mentioned VC queue, so the bandwidth utilization rate of the output port is high.
需要说明的是,为了便于说明,图5中仅示出了路由器500包括第一输入端口501、第二输入端口502、第一输出端口503和第二输出端口504。实际应用中,路由器500中可以包括多个输入端口和多个输出端口,本申请实施例对输入端口和输出端口的数量不做具体限定。It should be noted that, for convenience of description, FIG. 5 only shows that the router 500 includes a first input port 501 , a second input port 502 , a first output port 503 and a second output port 504 . In practical applications, the router 500 may include multiple input ports and multiple output ports, and the embodiments of the present application do not specifically limit the number of input ports and output ports.
本申请实施例提供的路由器500中,输入端口针对需要调度至不同输出端口的报文,可以分别向相应的不同输出端口发送请求消息。本申请实施例中,第一输入端口501中需要调度的多个报文可以存储在第一共享缓存中,第一共享缓存中存储的报文的调度顺序不受先进先出规则的限制。同样地,第二输入端口502中需要调度的多个报文可以存储在第二共享缓存中,第二共享缓存中存储的报文的调度顺序也不受先进先出规则的限制。In the router 500 provided in this embodiment of the present application, the input port may send request messages to corresponding different output ports respectively for packets that need to be scheduled to different output ports. In this embodiment of the present application, multiple packets to be scheduled in the first input port 501 may be stored in the first shared buffer, and the scheduling order of the packets stored in the first shared buffer is not limited by the FIFO rule. Similarly, multiple packets that need to be scheduled in the second input port 502 can be stored in the second shared buffer, and the scheduling order of the packets stored in the second shared buffer is also not limited by the FIFO rule.
以第二共享缓存为例,第二共享缓存中可以用于存储多种业务类型的报文。第二共享缓存可以包括多个第三缓存区域以及一个第四缓存区域,多个第三缓存区域中的每个第三缓存区域用于存储第二输入端口502的上一级端口发送的、单一业务类型的报文(即针对每一业务类型的报文预留一定的存储空间),第四缓存区域用于存储多种业务类型的报文。Taking the second shared cache as an example, the second shared cache may be used to store packets of multiple service types. The second shared buffer may include a plurality of third buffer areas and a fourth buffer area, and each third buffer area in the plurality of third buffer areas is used to For messages of service types (ie, a certain storage space is reserved for messages of each service type), the fourth cache area is used to store messages of multiple service types.
同样地,第一共享缓存可以包括多个第一缓存区域和一个第二缓存区域。Likewise, the first shared cache may include a plurality of first cache areas and a second cache area.
应理解,本申请实施例中,路由器500中可以包括多个输入端口,每个输入端口中均配置共享缓存。如前所述,在共享缓存中,报文不是以队列的形式存储,每个报文的调度顺序不受先进先出规则的限制。It should be understood that, in this embodiment of the present application, the router 500 may include multiple input ports, and each input port is configured with a shared cache. As mentioned above, in the shared cache, the packets are not stored in the form of queues, and the scheduling order of each packet is not restricted by the FIFO rule.
此外,在共享缓存中,可以针对不同业务类型的报文设置不同的存储空间上限(水线),以避免共享缓存的存储空间被部分业务类型的报文占用,导致其他业务类型的报文的存储空间受限。下面以针对第一共享缓存设置存储空间上限为例进行说明。In addition, in the shared cache, different storage space upper limits (watermarks) can be set for packets of different service types, so as to avoid the storage space of the shared cache being occupied by packets of some service types, resulting in the loss of packets of other service types. Storage space is limited. The following description takes setting the upper limit of the storage space for the first shared cache as an example for description.
比如,可以设定第一共享缓存中,第一业务类型的报文的存储空间小于或等于第一门限值,第二业务类型的报文的存储空间小于或等于第二门限值。其中,第一门限值与第二门限值可以相同,也可以不同。For example, in the first shared cache, the storage space of the packets of the first service type can be set to be less than or equal to the first threshold value, and the storage space of the packets of the second service type can be set to be less than or equal to the second threshold value. The first threshold value and the second threshold value may be the same or different.
再比如,可以设定第二缓存区域中,第一业务类型的报文的存储空间小于或等于第三门限值,第二业务类型的报文的存储空间小于或等于第四门限值。其中,第三门限值与第四门限值可以相同,也可以不同。For another example, in the second buffer area, the storage space of the packets of the first service type can be set to be less than or equal to the third threshold value, and the storage space of the packets of the second service type can be set to be less than or equal to the fourth threshold value. The third threshold value and the fourth threshold value may be the same or different.
示例性地,第一共享缓存中包括16个存储空间,路由器500支持的业务类型有两种,业务类型1和业务类型2,若为每种业务类型预留2个存储空间,则第二缓存区域包括12(16-2*2=12)个存储空间。那么,可以设定第二缓存区域中业务类型1的存储空间上限为8,业务类型2的存储空间上限为8;或者设定第二缓存区域中业务类型1的存储空间上限为6,业务类型2的存储空间上限为8。Exemplarily, the first shared cache includes 16 storage spaces, and the router 500 supports two service types, service type 1 and service type 2. If 2 storage spaces are reserved for each service type, the second cache The area includes 12 (16-2*2=12) storage spaces. Then, the upper limit of the storage space of service type 1 in the second cache area can be set to 8, and the upper limit of storage space of service type 2 can be set to 8; 2 has a storage cap of 8.
需要说明的是,本申请实施例中,可以对每种业务类型的报文均设定存储空间上限,也可以仅对部分业务类型的报文设定存储空间上限。不同业务类型的报文,其存储空间的上限值可以相同,也可以不同。It should be noted that, in this embodiment of the present application, an upper limit of storage space may be set for messages of each service type, or an upper limit of storage space may be set only for messages of some service types. For packets of different service types, the upper limit of the storage space can be the same or different.
实际应用中,输入端口中配置的共享缓存(比如第一共享缓存或第二共享缓存)可以通过RAM或寄存器实现,即可以采用RAM或寄存器来例化共享缓存。在输入端口调度报文的业务类型较多、数据量较大的情况下,与采用寄存器来例化共享缓存的方案相比,采用RAM例化共享缓存可以减少面积和功耗的损失。In practical applications, the shared cache (such as the first shared cache or the second shared cache) configured in the input port may be implemented by RAM or registers, that is, RAM or registers may be used to instantiate the shared cache. When there are many types of services and a large amount of data in the input port scheduling message, compared with the solution of using registers to instantiate the shared cache, the use of RAM to instantiate the shared cache can reduce the loss of area and power consumption.
此外,本申请实施例中,在输入端口的共享缓存中,可以针对需要向不同输出端口调度的不同业务类型的报文维护不同的链表(状态)。每个链表对应于该输入端口支持的相应的业务类型和相应的输出端口,每个链表用于记录需要向相应输出端口调度的相应业务类型的报文。In addition, in the embodiment of the present application, in the shared buffer of the input port, different linked lists (states) may be maintained for packets of different service types that need to be scheduled to different output ports. Each linked list corresponds to the corresponding service type supported by the input port and the corresponding output port, and each linked list is used to record the messages of the corresponding service type that need to be scheduled to the corresponding output port.
那么,每个输入端口可以针对记录有要调度的报文的各个链表向相应的输出端口分别发送请求消息,在接收到相应输出端口发送的许可消息之后,调度该链表中记录的报文并且发送该报文到相应输出端口。Then, each input port can send a request message to the corresponding output port for each linked list in which the message to be scheduled is recorded, and after receiving the permission message sent by the corresponding output port, schedule the message recorded in the linked list and send it. The message is sent to the corresponding output port.
具体地,每个链表中,可以维护有需要调度至某一输出端口的某一业务类型的报文的调度顺序。每个输入端口所述维护的链表的数量,等于该输入端口支持的业务类型的数量与路由器中包括的输出端口的数量的乘积。Specifically, in each linked list, a scheduling sequence of packets of a certain service type that needs to be scheduled to a certain output port can be maintained. The number of the maintained linked list for each input port is equal to the product of the number of service types supported by the input port and the number of output ports included in the router.
示例性地,路由器500中包括四个输入端口(输入端口1、输入端口2、输入端口3和输入端口4)和四个输出端口(输出端口1、输出端口2、输出端口3和输出端口4),假设每个输入端口处理的业务类型有两种,业务类型1和业务类型2。那么,以输入端口1为例,假设输入端口1的共享缓存中存储有14个报文,这14个报文的业务类型及对应的输出端口可以如下表1所示。Illustratively, router 500 includes four input ports (input port 1, input port 2, input port 3, and input port 4) and four output ports (output port 1, output port 2, output port 3, and output port 4). ), assuming that each input port handles two service types, service type 1 and service type 2. Then, taking input port 1 as an example, assuming that 14 packets are stored in the shared buffer of input port 1, the service types and corresponding output ports of the 14 packets can be shown in Table 1 below.
表1Table 1
   业务类型1business type 1 业务类型2business type 2
输出端口1output port 1 报文1message 1 报文2、报文3Message 2, Message 3
输出端口2output port 2 报文4、报文5、报文6Message 4, Message 5, Message 6 报文7message 7
输出端口3output port 3 报文8、报文9Message 8, Message 9 报文10、报文11、报文12Packet 10, Packet 11, Packet 12
输出端口4output port 4 报文13Message 13 报文14Message 14
在输入端口1的共享缓存中,可以维护有8(4*2=8)个链表。每个链表中记录有需要向一个输出端口调度的一种业务类型的多个报文的调度顺序。比如,针对需要调度至输出端口1的业务类型2的报文所维护的链表中,记录有报文2和报文3的调度顺序,即先调度报文2,后调度报文3;再比如,针对需要调度至输出端口2的业务类型1的报文所维护的链表中,记录有报文4、报文5和报文6的调度顺序,即先调度报文4,再调度报文5,最后调度报文6。In the shared buffer of input port 1, 8 (4*2=8) linked lists can be maintained. Each linked list records the scheduling sequence of multiple packets of one service type that need to be scheduled to one output port. For example, in the linked list maintained for the packets of service type 2 that need to be scheduled to output port 1, the scheduling sequence of packet 2 and packet 3 is recorded, that is, packet 2 is scheduled first, and then packet 3; , in the linked list maintained for the packets of service type 1 that need to be scheduled to output port 2, the scheduling sequence of packet 4, packet 5 and packet 6 is recorded, that is, packet 4 is scheduled first, and then packet 5 is scheduled. , and finally schedule packet 6.
需要说明的是,在另一种可能的示例中,输入端口中维护的多个链表中,也可以仅记录需要调度至某一输出端口的某一业务类型的多个报文,但是对多个报文的调度顺序不做限定。It should be noted that, in another possible example, the multiple linked lists maintained in the input port may also only record multiple packets of a certain service type that need to be scheduled to an output port, but for multiple The scheduling order of packets is not limited.
此外,需要说明的是,共享缓存中维护的链表的具体内容会根据该输入端口中报文的接收和发送情况进行更新。In addition, it should be noted that the specific content of the linked list maintained in the shared cache will be updated according to the reception and transmission of packets in the input port.
比如,在报文1已经调度完成后,表1中输出端口1-业务类型1这一链表中的内容为空;此后,若输入端口1再次接收到需要调度至输出端口1的业务类型1的报文15,则输出端口1-业务类型1这一链表中的内容修改为报文15。For example, after packet 1 has been scheduled, the content in the linked list of output port 1 - service type 1 in Table 1 is empty; after that, if input port 1 receives a message of service type 1 that needs to be scheduled to output port 1 again Packet 15, the content in the linked list of output port 1-service type 1 is modified to Packet 15.
再比如,在报文10已经调度完成后,表1中输出端口3-业务类型2这一链表中的内容修改为报文11、报文12;此后,若输入端口1再次接收到需要调度至输出端口3的业务类型2的报文16和报文17,则输出端口3-业务类型2这一链表中的内容修改为报文11、报文12、报文16、报文17。For another example, after the message 10 has been scheduled, the content in the linked list of output port 3-service type 2 in Table 1 is modified to message 11 and message 12; after that, if the input port 1 receives it again, it needs to be scheduled to If packets 16 and 17 of service type 2 of port 3 are output, the contents in the linked list of output port 3 - service type 2 are modified to packet 11 , packet 12 , packet 16 , and packet 17 .
现有技术中,每个输入端口针对每一种业务类型的报文维护一个先进先出的队列,在 需要调度至某一输出端口的某一业务类型的报文未获得仲裁时,该业务类型中需要调度至其他输出端口的报文即发生阻塞,导致其他输出端口未得到利用。而本申请实施例中,共享缓存中针对向不同输出端口调度的不同业务类型的报文维护不同的链表。那么,需要调度至不同输出端口的报文之间的传输互不影响,从而使得输出端口的带宽利用率得到了提高。In the prior art, each input port maintains a first-in, first-out queue for messages of each service type. The packets that need to be dispatched to other output ports are blocked, resulting in other output ports not being used. However, in the embodiment of the present application, different linked lists are maintained in the shared cache for messages of different service types scheduled to different output ports. Then, the transmission of packets that need to be scheduled to different output ports does not affect each other, so that the bandwidth utilization rate of the output ports is improved.
此外,本申请实施例中,第一输入端口501还可以:向第一输出端口503发送第一接受消息,第一接受消息用于指示第一输入端口501接受第一输出端口503的许可;将第一报文调度至第一输出端口503;向第一输出端口503发送第一释放消息,第一释放消息用于指示第一报文调度完成。具体地,第一输入端口501和第一输出端口503之间的交互流程可以如图6所示。In addition, in this embodiment of the present application, the first input port 501 may also: send a first accept message to the first output port 503, where the first accept message is used to instruct the first input port 501 to accept the permission of the first output port 503; The first packet is scheduled to the first output port 503; the first release message is sent to the first output port 503, where the first release message is used to indicate that the first packet is scheduled to be completed. Specifically, the interaction flow between the first input port 501 and the first output port 503 may be as shown in FIG. 6 .
第一输入端口501向第一输出端口503发送第一许可消息之后,第一输入端口501和第一输出端口503之间的传输关系已锁定。第一输入端口501可以将第一报文从第一共享缓存中调度至第一输出端口503;在第一报文调度完成后,第一输入端口501可以向第一输出端口503发送第一释放消息,以指示第一报文调度完成。After the first input port 501 sends the first permission message to the first output port 503, the transmission relationship between the first input port 501 and the first output port 503 is locked. The first input port 501 can schedule the first packet from the first shared buffer to the first output port 503; after the first packet scheduling is completed, the first input port 501 can send the first release to the first output port 503 message to indicate the completion of the first packet scheduling.
向第一输出端口503发送第一释放消息之后,第一输出端口503被释放,第一输入端口501和第一输出端口503之间的传输关系解除。第一输入端口501可以针对第一共享缓存中待调度的报文重新发送请求消息(即开始下一次握手申请)。第一输出端口503可以再次接收输入端口发送的请求消息,并对接收到的请求消息进行仲裁,开始下一次报文调度。After the first release message is sent to the first output port 503, the first output port 503 is released, and the transmission relationship between the first input port 501 and the first output port 503 is released. The first input port 501 may resend the request message (ie, start the next handshake application) for the packet to be scheduled in the first shared buffer. The first output port 503 may receive the request message sent by the input port again, and perform arbitration on the received request message to start the next packet scheduling.
第一输入端口501和第一输出端口503之间进行一次报文调度的过程中,二者之间的消息交互可以通过四个步骤实现:1第一输入端口501向第一输出端口503发送第一请求消息;2、第一输出端口503向第一输入端口501发送第一许可消息;3、第一输出端口503向第一输入端口501发送第一接受消息;4、第一输出端口503向第一输入端口501发送第一释放消息。本申请实施例中,将上述交互过程称为“四步握手机制”,即通过四条消息的交互完成第一输入端口501和第一输出端口503的一次握手。In the process of performing a message scheduling between the first input port 501 and the first output port 503, the message interaction between the two can be realized through four steps: 1. The first input port 501 sends the first output port 503 the first message; A request message; 2. The first output port 503 sends a first permission message to the first input port 501; 3. The first output port 503 sends a first accept message to the first input port 501; 4. The first output port 503 sends a first accept message to the first input port 501 The first input port 501 sends a first release message. In this embodiment of the present application, the above interaction process is referred to as a "four-step handshake mechanism", that is, a handshake between the first input port 501 and the first output port 503 is completed through the interaction of four messages.
此外,本申请实施例中,第二输入端口502还可以:向第二输出端口504发送第二接受消息,第二接受消息用于指示第二输入端口502接受第二输出端口504的许可;将第三报文调度至第二输出端口504;向第二输出端口504发送第二释放消息,第二释放消息用于指示第三报文调度完成。具体地,第二输入端口502和第二输出端口504之间的交互流程可以如图7所示。In addition, in this embodiment of the present application, the second input port 502 may further: send a second accept message to the second output port 504, where the second accept message is used to instruct the second input port 502 to accept the permission of the second output port 504; The third packet is scheduled to the second output port 504; the second release message is sent to the second output port 504, where the second release message is used to indicate that the scheduling of the third packet is completed. Specifically, the interaction flow between the second input port 502 and the second output port 504 may be as shown in FIG. 7 .
第二输入端口502向第二输出端口504发送第二许可消息之后,第二输入端口502和第二输出端口504之间的传输关系已锁定。第二输入端口502可以将第三报文从第二共享缓存中调度至第二输出端口504;在第三报文调度完成后,第二输入端口502可以向第二输出端口504发送第二释放消息,以指示第三报文调度完成。After the second input port 502 sends the second permission message to the second output port 504, the transmission relationship between the second input port 502 and the second output port 504 is locked. The second input port 502 can schedule the third packet from the second shared buffer to the second output port 504 ; after the scheduling of the third packet is completed, the second input port 502 can send a second release to the second output port 504 message to indicate that the scheduling of the third packet is complete.
向第二输出端口504发送第二释放消息之后,第二输出端口504被释放,第二输入端口502和第二输出端口504之间的传输关系解除。第二输入端口502可以针对第二共享缓存中待调度的报文重新发送请求消息(即开始下一次握手申请)。第二输出端口504可以再次接收输入端口发送的请求消息,并对接收到的请求消息进行仲裁,开始下一次报文调度。After the second release message is sent to the second output port 504, the second output port 504 is released, and the transmission relationship between the second input port 502 and the second output port 504 is released. The second input port 502 may resend the request message (ie, start the next handshake application) for the packet to be scheduled in the second shared buffer. The second output port 504 may receive the request message sent by the input port again, and perform arbitration on the received request message to start the next packet scheduling.
同样地,第二输入端口502和第二输出端口504之间的交互过程也采用前述“四步握 手机制”,此处不再赘述。Similarly, the interaction process between the second input port 502 and the second output port 504 also adopts the aforementioned "four-step handshake mechanism", which will not be repeated here.
具体地,在路由器500中,输入端口和输出端口之间的交互可以基于时钟周期进行。在每个时钟周期内,输入端口可以根据共享缓存中维护的链表,针对存储在共享缓存中的报文发送多个请求消息。具体地,输入端口在某个时钟周期内发送的请求消息的数量与共享缓存中维护的链表的数量相同。Specifically, in router 500, the interaction between input ports and output ports may be based on clock cycles. In each clock cycle, the input port can send multiple request messages for the packets stored in the shared buffer according to the linked list maintained in the shared buffer. Specifically, the number of request messages sent by the input port in a certain clock cycle is the same as the number of linked lists maintained in the shared cache.
如前所述,输入端口可以针对向不同输出端口调度的不同业务类型的报文维护不同的链表,比如在表1的示例中,在当前的时钟周期内,输入端口1的共享缓存中维护有八个链表,每个链表中记录有需要向一个输出端口调度的一种业务类型的多个报文的调度顺序。那么,在当前时钟周期内,输入端口1可以发送八个请求消息,这八个请求消息分别是:1、请求向输出端口1调度业务类型1的报文1的请求消息;2、请求向输出端口1调度业务类型2的报文2的请求消息;3、请求向输出端口2调度业务类型1的报文4的请求消息;4、请求向输出端口2调度业务类型2的报文7的请求消息;5、请求向输出端口3调度业务类型1的报文8的请求消息;6、请求向输出端口3调度业务类型2的报文10的请求消息;7、请求向输出端口4调度业务类型1的报文13的请求消息;8、请求向输出端口4调度业务类型2的报文14的请求消息。As mentioned above, the input port can maintain different linked lists for messages of different service types scheduled to different output ports. For example, in the example of Table 1, in the current clock cycle, the shared buffer of input port 1 maintains a Eight linked lists, each of which records the scheduling sequence of multiple packets of one service type that need to be scheduled to one output port. Then, in the current clock cycle, the input port 1 can send eight request messages, and the eight request messages are: 1. A request message requesting to dispatch the message 1 of service type 1 to the output port 1; 2. A request to the output port 1 A request message for port 1 to schedule message 2 of service type 2; 3. A request message for requesting to schedule message 4 of service type 1 to output port 2; 4. A request for scheduling message 7 of service type 2 to output port 2 5. A request message requesting to dispatch the message 8 of service type 1 to output port 3; 6. A request message requesting to dispatch the message 10 of service type 2 to output port 3; 7. Requesting to dispatch the service type to output port 4 1. A request message for the message 13; 8. A request message for requesting to dispatch the message 14 of the service type 2 to the output port 4.
当通过前述仲裁机制使得输入端口与输出端口建立传输关系后,输入端口可以向输出端口调度报文。具体地,以第二输入端口502和第二输出端口504为例,第二输入端口502向第二输出端口504发送第二接受消息之后,第二输入端口502可以在发送第二接受消息的时钟周期立即开始向第二输出端口504调度第三报文,也可以在下一个时钟周期开始向第二输出端口504调度第三报文。第三报文的调度可以在一个时钟周期之内完成,也可以在多个时钟周期内完成,视第三报文的大小而定。After the input port and the output port establish a transmission relationship through the aforementioned arbitration mechanism, the input port can schedule packets to the output port. Specifically, taking the second input port 502 and the second output port 504 as an example, after the second input port 502 sends the second accept message to the second output port 504, the second input port 502 may send the second accept message at the clock The cycle starts to schedule the third packet to the second output port 504 immediately, and the third packet may also start to be scheduled to the second output port 504 in the next clock cycle. The scheduling of the third packet may be completed within one clock cycle, or may be completed within multiple clock cycles, depending on the size of the third packet.
此外,共享缓存中维护的链表的更新也可以基于时钟周期进行。即,在每个时钟周期内,共享缓存中维护的链表的具体内容会根据上一时钟周期内该输入端口中报文的接收和发送情况进行更新。In addition, the update of the linked list maintained in the shared cache can also be done on a clock cycle basis. That is, in each clock cycle, the specific content of the linked list maintained in the shared cache will be updated according to the reception and transmission of packets in the input port in the previous clock cycle.
进一步地,在链表更新以后,输入端口可以根据更新后的链表发送请求调度报文的请求消息。也就是说,在每个时钟周期,共享缓存中的链表进行更新,输入端口在当前时钟周期根据更新后的链表分别向相应的不同输出端口发送请求消息。Further, after the linked list is updated, the input port may send a request message requesting a scheduling message according to the updated linked list. That is to say, in each clock cycle, the linked list in the shared cache is updated, and the input port sends request messages to corresponding different output ports according to the updated linked list in the current clock cycle.
在前面的示例中,主要介绍了第一输入端口501和第一输出端口503之间进行报文传输的交互过程,以及第二输入端口502和第二输出端口504之间进行报文传输的交互过程。实际应用中,路由器500中可以包括更多个输入端口和更多个输出端口。下面通过几个具体示例对其他场景进行介绍。In the previous example, the interaction process of packet transmission between the first input port 501 and the first output port 503 and the interaction of packet transmission between the second input port 502 and the second output port 504 are mainly introduced process. In practical applications, the router 500 may include more input ports and more output ports. Other scenarios are described below with a few specific examples.
情况一Case 1
路由器500还包括第三输出端口;第一输入端口501还用于向第三输出端口发送第四请求消息,第四请求消息用于指示第一输入端口501请求向第三输出端口调度第一业务类型的第四报文;第三输出端口用于对第四请求消息进行仲裁,向第一输入端口501发送第三许可消息,第三许可消息用于指示允许第一输入端口501向第三输出端口调度第四报文。The router 500 further includes a third output port; the first input port 501 is further configured to send a fourth request message to the third output port, and the fourth request message is used to instruct the first input port 501 to request to schedule the first service to the third output port Type of fourth message; the third output port is used to arbitrate the fourth request message, and send the third permission message to the first input port 501, and the third permission message is used to indicate that the first input port 501 is allowed to output to the third The port schedules the fourth packet.
在情况一中,第一输入端口501向第一输出端口503和第三输出端口均发送调度报文的请求消息,第一输出端口503和第三输出端口均裁定第一输入端口501获得仲裁,并分别向第一输入端口501发送第一许可消息和第三许可消息,即第一输入端口501接收到两条许可消息。在本申请实施例中,第一输入端口501选择先向第一输出端口503调度第一 报文,那么,第一输入端口501向第一输出端口503发送第一接受消息,而并未向第三输出端口发送接受消息。In case 1, the first input port 501 sends a request message for scheduling packets to both the first output port 503 and the third output port, and both the first output port 503 and the third output port rule that the first input port 501 obtains arbitration, And send the first permission message and the third permission message to the first input port 501 respectively, that is, the first input port 501 receives two permission messages. In this embodiment of the present application, the first input port 501 chooses to schedule the first message to the first output port 503 first, then the first input port 501 sends the first accept message to the first output port 503, but does not send the first message to the first output port 503. Three output ports send accept messages.
由于第三输出端口未接收到接受消息,因而第三输出端口后续可以接收其他输入端口的请求,用于其他报文的调度,从而提高输出端口的带宽利用率。Since the third output port does not receive the accept message, the third output port can subsequently receive requests from other input ports for scheduling other packets, thereby improving the bandwidth utilization of the output port.
情况二Case 2
第一输入端口501还用于向第一输出端口503发送第五请求消息,第五请求消息用于指示第一输入端口501请求向第一输出端口503调度第二业务类型的第五报文;第一输出端口503还用于对第五请求消息进行仲裁,确定不允许所述第一输入端口501调度第五报文。The first input port 501 is further configured to send a fifth request message to the first output port 503, where the fifth request message is used to instruct the first input port 501 to request the first output port 503 to schedule a fifth message of the second service type; The first output port 503 is further configured to arbitrate the fifth request message, and determine that the first input port 501 is not allowed to schedule the fifth message.
其中,第二业务类型和第一业务类型是不同的业务类型。Wherein, the second service type and the first service type are different service types.
也就是说,第一输入端口501可以同时向第一输出端口503发送两种业务类型的请求消息,第一输出端口503对这两条请求消息(第一请求消息和第五请求消息)进行仲裁,确定第一请求消息获得仲裁、第五请求消息未获得仲裁,即确定允许第一输入端口501调度第一业务类型的报文,不允许第一输入端口501调度第二业务类型的报文。That is to say, the first input port 501 can send request messages of two service types to the first output port 503 at the same time, and the first output port 503 arbitrates the two request messages (the first request message and the fifth request message) , it is determined that the first request message has been arbitrated and the fifth request message has not been arbitrated, that is, it is determined that the first input port 501 is allowed to schedule messages of the first service type, and the first input port 501 is not allowed to schedule messages of the second service type.
情况三Case three
第一输入端口501还用于:向第二输出端口504发送第六请求消息,第六请求消息用于指示第一输入端口501请求向第二输出端口504调度第一业务类型的第六报文;第二输出端口504还用于对第六请求消息进行仲裁,确定不允许第一输入端口501调度第六报文。The first input port 501 is further configured to: send a sixth request message to the second output port 504, where the sixth request message is used to instruct the first input port 501 to request to the second output port 504 to schedule a sixth packet of the first service type ; The second output port 504 is further configured to arbitrate the sixth request message, and determine that the first input port 501 is not allowed to schedule the sixth message.
也就是说,第一输入端口501还请求向第二输出端口504调度第一业务类型的第六报文,第二输出端口504对接收到的第三请求消息和第六请求消息进行仲裁,确定允许第二输入端口502调度第三报文,不允许第一输入端口501调度第六报文。因此,第二输出端口504向第二输入端口502发送第二许可消息,并未向第一输入端口501发送许可消息。That is to say, the first input port 501 also requests to schedule the sixth message of the first service type to the second output port 504, and the second output port 504 arbitrates the received third request message and the sixth request message, and determines The second input port 502 is allowed to schedule the third message, and the first input port 501 is not allowed to schedule the sixth message. Therefore, the second output port 504 sends the second permission message to the second input port 502 and does not send the permission message to the first input port 501 .
在一种示例中,采用本申请实施例提供的路由器500,针对第一业务类型的报文,第一输入端口501向第一输出端口503发送第一请求消息,以请求调度第一报文;第二输入端口502分别向第一输出端口503和第二输出端口504发送第二请求消息和第三请求消息,以请求调度第二报文和第三报文。第一输出端口503接收到第一请求消息和第二请求消息后,根据第一输入端口501和第二输入端口502的优先级进行仲裁,确定第一输入端口501获得仲裁、第二输入端口502未获得仲裁,第一输入端口501和第一输出端口503之间建立传输关系。由于第二输入端口502还向第二输出端口504发送第三请求消息,第二输出端口504进行仲裁后确定第二输入端口502获得仲裁,第二输入端口502和第二输出端口504也可以建立传输关系。In an example, using the router 500 provided in this embodiment of the present application, for a packet of the first service type, the first input port 501 sends a first request message to the first output port 503 to request scheduling of the first packet; The second input port 502 sends a second request message and a third request message to the first output port 503 and the second output port 504 respectively, so as to request to schedule the second packet and the third packet. After receiving the first request message and the second request message, the first output port 503 performs arbitration according to the priorities of the first input port 501 and the second input port 502, and determines that the first input port 501 obtains the arbitration and the second input port 502 obtains arbitration. Without obtaining arbitration, a transmission relationship is established between the first input port 501 and the first output port 503 . Since the second input port 502 also sends a third request message to the second output port 504, after the second output port 504 performs arbitration, it is determined that the second input port 502 has obtained the arbitration, and the second input port 502 and the second output port 504 can also be established. transfer relationship.
路由器500中,第二输入端口502在未获得第一输出端口503的仲裁的情况下,由于第二输入端口502还针对第一业务类型的第三报文向第二输出端口504发送了第三请求消息,因而第二输入端口502还可以获得第二输出端口504的仲裁。与现有技术相比,路由器500中,由于输入端口针对需要调度至不同输出端口的报文,可以分别向相应的不同输出端口发送请求消息,因而第二输入端口502向第一输出端口503调度第二报文的请求未获得仲裁的情况下,第二输入端口502可以获得第二输出端口504的仲裁,第二输入端口502可以向第二输出端口504调度第三报文,即不会出现现有技术中提到的VC队列发生头阻塞的现象,因而输出端口的带宽利用率高。In the router 500, when the second input port 502 does not obtain arbitration from the first output port 503, because the second input port 502 also sends a third packet to the second output port 504 for the third packet of the first service type. request message, so that the second input port 502 can also obtain arbitration for the second output port 504 . Compared with the prior art, in the router 500, since the input port can send request messages to the corresponding different output ports for packets that need to be scheduled to different output ports, the second input port 502 schedules the first output port 503. If the request for the second packet has not been arbitrated, the second input port 502 can obtain arbitration from the second output port 504, and the second input port 502 can schedule the third packet to the second output port 504, that is, no The phenomenon of head blocking occurs in the VC queue mentioned in the prior art, so the bandwidth utilization rate of the output port is high.
本申请实施例还提供一种路由器,该路由器可以如图8所示。该路由器包括输入端口 0、输入端口1、输出端口0和输出端口1。可以理解,为了便于描述,这里仅示出两个输入端口和两个输出端口,但是可以有更多个输入端口和更多个输出端口,取决于实际需要和实际的应用场景。该路由器要路由的业务类型可以有两种,业务类型0(VC0)和业务类型1(VC1)。可以理解,这里业务类型不限于两种,可以有更多种,取决于实际应用场景。An embodiment of the present application further provides a router, and the router may be as shown in FIG. 8 . The router includes input port 0, input port 1, output port 0, and output port 1. It can be understood that, for convenience of description, only two input ports and two output ports are shown here, but there may be more input ports and more output ports, depending on actual needs and actual application scenarios. There are two service types to be routed by the router, service type 0 (VC0) and service type 1 (VC1). It can be understood that the business types here are not limited to two, and there can be more, depending on the actual application scenario.
在每个输入端口中均配置有共享缓存。共享缓存中包括VC0预留缓存(VC0credit)、VC1预留缓存(VC1credit)以及通用缓存(common buffer)。其中,输入端口0中的VC0预留缓存、VC1预留缓存可以视为前述多个第一缓存区域的一个具体示例,输入端口0中的通用缓存可以视为前述第二缓存区域的一个具体示例。输入端口1中的VC0预留缓存、VC1预留缓存可以视为前述多个第三缓存区域的一个具体示例,输入端口1中的通用缓存可以视为前述第四缓存区域的一个具体示例。共享缓存中针对不同的业务类型及输出端口维护不同的链表(状态),即维护有VC0-输出端口0、VC1-输出端口0、VC0-输出端口1和VC1-输出端口1四个链表。输入端口可以根据输出端口的仲裁结果以及自身维护的链表调度共享缓存中的报文。A shared buffer is configured in each input port. The shared buffer includes a VC0 reserved buffer (VC0credit), a VC1 reserved buffer (VC1credit), and a common buffer (common buffer). The VC0 reserved buffer and the VC1 reserved buffer in input port 0 can be regarded as a specific example of the aforementioned first buffer areas, and the general buffer in input port 0 can be regarded as a specific example of the aforementioned second buffer area . The VC0 reserved buffer and the VC1 reserved buffer in input port 1 can be regarded as a specific example of the foregoing multiple third buffer areas, and the general buffer in input port 1 can be regarded as a specific example of the foregoing fourth buffer area. The shared cache maintains different linked lists (states) for different service types and output ports, that is, four linked lists of VC0-output port 0, VC1-output port 0, VC0-output port 1 and VC1-output port 1 are maintained. The input port can schedule the packets in the shared buffer according to the arbitration result of the output port and the linked list maintained by itself.
每个输出端口中配置有仲裁器,用于对输入端口发送的针对不同业务类型的报文进行调度的请求消息进行仲裁。具体地,每个输出端口中包括仲裁器0、仲裁器1和仲裁器2。仲裁器0用于对调度业务类型0的报文的请求进行仲裁,仲裁器1用于对调度业务类型1的报文的请求进行仲裁;仲裁器2用于根据仲裁器0和仲裁器1的仲裁结果进行仲裁,最终确定哪一请求获得仲裁。比如,输出端口0中的仲裁器0接收到业务类型0的请求1和请求2,判断请求1获得仲裁;仲裁器1接收到业务类型1的请求3和请求4,判断请求4获得仲裁;仲裁器2对仲裁器0和仲裁器1的仲裁结果进行仲裁,最终确定请求4获得仲裁。那么,输出端口0即确定请求4获得仲裁,向发送请求4的输入端口发送许可消息。Each output port is configured with an arbiter, which is used to arbitrate the request messages sent by the input port for scheduling packets of different service types. Specifically, each output port includes arbiter 0, arbiter 1 and arbiter 2. Arbiter 0 is used to arbitrate requests for scheduling packets of service type 0, arbiter 1 is used to arbitrate requests for scheduling packets of service type 1; Arbitration results are arbitrated to finally determine which request gets the arbitration. For example, arbiter 0 in output port 0 receives request 1 and request 2 of service type 0, and judges that request 1 obtains arbitration; arbiter 1 receives request 3 and request 4 of service type 1, judges that request 4 obtains arbitration; Arbiter 2 arbitrates the arbitration results of Arbiter 0 and Arbiter 1, and finally determines that Request 4 is arbitrated. Then, output port 0 determines that request 4 is arbitrated, and sends a permission message to the input port that sent request 4.
其中,本申请实施例中,输入端口和输出端口之间的交互过程可以如下。Wherein, in this embodiment of the present application, the interaction process between the input port and the output port may be as follows.
1、输入端口0根据每个VC的调度需求对两个输出端口发送REQ(前述请求消息的一个具体示例)。具体地,输入端口0向输出端口0发送调度VC0类型报文的REQ1和调度VC1类型报文的REQ2;输入端口0向输出端口1发送调度VC0类型报文的REQ3和调度VC1类型报文的REQ4。1. Input port 0 sends REQ to two output ports according to the scheduling requirement of each VC (a specific example of the foregoing request message). Specifically, input port 0 sends REQ1 for scheduling VC0 type packets and REQ2 for scheduling VC1 type packets to output port 0; input port 0 sends REQ3 for scheduling VC0 type packets and REQ4 for scheduling VC1 type packets to output port 1 .
同时,输入端口1根据每个VC的调度需求对两个输出端口发送REQ。具体地,输入端口1向输出端口0发送调度VC0类型报文的REQ5和调度VC1类型报文的REQ6;输入端口1向输出端口1发送调度VC0类型报文的REQ7和调度VC1类型报文的REQ8。At the same time, input port 1 sends REQ to the two output ports according to the scheduling requirements of each VC. Specifically, input port 1 sends REQ5 for scheduling VC0 type packets and REQ6 for scheduling VC1 type packets to output port 0; input port 1 sends REQ7 for scheduling VC0 type packets and REQ8 for scheduling VC1 type packets to output port 1 .
2、输出端口0中的仲裁器0收到REQ1和REQ5后,根据优先级等条件进行仲裁,确定REQ1获得仲裁;输出端口0中的仲裁器1收到REQ2和REQ6后,根据优先级等条件进行仲裁,确定REQ2获得仲裁;输出端口2中的仲裁器2对仲裁器0的仲裁结果(REQ1)和仲裁器1的仲裁结果(REQ2)进行仲裁,确定REQ1获得仲裁,然后向输入端口0返回GRANT(前述第一许可消息的一个具体示例),指示REQ1获得仲裁。2. After the arbiter 0 in the output port 0 receives REQ1 and REQ5, it arbitrates according to the priority and other conditions, and determines that REQ1 obtains the arbitration; after the arbiter 1 in the output port 0 receives REQ2 and REQ6, according to the priority and other conditions Arbitration is performed to determine that REQ2 has obtained the arbitration; arbiter 2 in output port 2 arbitrates the arbitration result of arbiter 0 (REQ1) and the arbitration result of arbiter 1 (REQ2), determines that REQ1 has obtained arbitration, and then returns to input port 0 GRANT (a specific example of the aforementioned first grant message), instructs REQ1 to obtain arbitration.
同时,输出端口1中的仲裁器0收到REQ3和REQ7后,根据优先级等条件进行仲裁,确定REQ7获得仲裁;输出端口1中的仲裁器1收到REQ4和REQ8后,根据优先级等条件进行仲裁,确定REQ8获得仲裁;输出端口1中的仲裁器2对仲裁器0的仲裁结果(REQ7)和仲裁器1的仲裁结果(REQ8)进行仲裁,确定REQ7获得仲裁,然后向输入端口1返回GRANT(前述第二许可消息的一个具体示例),指示REQ7获得仲裁。At the same time, after receiving REQ3 and REQ7, the arbiter 0 in output port 1 conducts arbitration according to the priority and other conditions, and determines that REQ7 wins the arbitration; after receiving REQ4 and REQ8, the arbiter 1 in the output port 1 performs arbitration according to the priority and other conditions. Arbitration is performed to determine that REQ8 has obtained the arbitration; arbiter 2 in output port 1 arbitrates the arbitration result of arbiter 0 (REQ7) and the arbitration result of arbiter 1 (REQ8), determines that REQ7 has obtained arbitration, and then returns to input port 1 GRANT (a specific example of the aforementioned second grant message), instructing REQ7 to obtain arbitration.
3、输入端口0收到GRANT后,向输出端口0返回ACCEPT(前述第一接受消息的一个具体示例);输入端口1收到GRANT后,向输出端口1返回ACCEPT(前述第二接受消息的一个具体示例)。3. After input port 0 receives GRANT, it returns ACCEPT (a specific example of the aforementioned first acceptance message) to output port 0; after input port 1 receives GRANT, it returns ACCEPT (one of the aforementioned second acceptance messages) to output port 1. specific example).
4、输入端口0向输出端口0返回ACCEPT后,即锁定了输入端口0与输出端口0的传输关系。此时,输入端口0开始向输出端口1调度VC0类型的报文,待发送完需要调度的报文后,返回SWITCH信号(前述第一释放消息的一个具体示例),释放输出端口0的仲裁锁定,开始下一次握手申请。4. After input port 0 returns ACCEPT to output port 0, the transmission relationship between input port 0 and output port 0 is locked. At this time, the input port 0 starts to schedule the VC0 type message to the output port 1. After sending the message that needs to be scheduled, it returns the SWITCH signal (a specific example of the aforementioned first release message) to release the arbitration lock of the output port 0. , to start the next handshake application.
输入端口1向输出端口1返回ACCEPT后,即锁定了输入端口1与输出端口1的传输关系。此时,输入端口1开始向输出端口1调度VC0类型的报文,待发送完需要调度的报文后,返回SWITCH信号(前述第二释放消息的一个具体示例),释放输出端口1的仲裁锁定,开始下一次握手申请。After input port 1 returns ACCEPT to output port 1, the transmission relationship between input port 1 and output port 1 is locked. At this time, the input port 1 starts to schedule the VC0 type message to the output port 1. After sending the message that needs to be scheduled, it returns the SWITCH signal (a specific example of the aforementioned second release message) to release the arbitration lock of the output port 1. , to start the next handshake application.
在图8所示的路由器中,输入端口0向输出端口0调度VC0类型报文的REQ1获得仲裁,输入端口0和输出端口0建立传输关系,而输入端口1向输出端口0调度VC0类型报文的REQ5未获得仲裁。由于输入端口1还向输出端口1发送了请求调度VC0类型报文的REQ7,REQ7可以获得输出端口1的仲裁。因此,输入端口1中VC0类型报文的调度不会发生阻塞,即输入端口1可以与输出端口1建立传输关系,向输出端口1调度VC0类型的报文。因此,采用图8所示的路由器,可以提高输出端口的带宽利用率。In the router shown in Figure 8, input port 0 dispatches REQ1 of VC0 type packets to output port 0 to obtain arbitration, input port 0 and output port 0 establish a transmission relationship, and input port 1 dispatches VC0 type packets to output port 0 REQ5 did not receive arbitration. Since input port 1 also sends REQ7 to output port 1 to request scheduling of VC0 type messages, REQ7 can obtain arbitration for output port 1. Therefore, the scheduling of VC0 type packets in input port 1 will not be blocked, that is, input port 1 can establish a transmission relationship with output port 1, and schedule VC0 type packets to output port 1. Therefore, using the router shown in Figure 8 can improve the bandwidth utilization of the output port.
需要说明的是,图8所示的路由器中未详尽描述的实现方式及其技术效果可以参见路由器500中的相关描述,此处不再赘述。It should be noted that, for the implementation manners and technical effects that are not described in detail in the router shown in FIG. 8 , reference may be made to the relevant descriptions in the router 500 , which will not be repeated here.
基于同一发明构思,本申请实施例还提供一种片上系统。参见图9,该片上系统900包括主机901、从机902和前述路由器500。Based on the same inventive concept, an embodiment of the present application also provides a system-on-chip. Referring to FIG. 9 , the system-on-a-chip 900 includes a host 901 , a slave 902 and the aforementioned router 500 .
其中,路由器500用于将主机901发送的报文路由至从机902。The router 500 is used to route the message sent by the master 901 to the slave 902 .
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (13)

  1. 一种路由器,其特征在于,包括:A router, characterized in that it includes:
    多个输入端口,所述多个输入端口中的每个输入端口用于针对输入的多个报文向各报文相应的输出端口发送请求消息;a plurality of input ports, each input port of the plurality of input ports is used for sending a request message to the output port corresponding to each message for the plurality of inputted messages;
    多个输出端口,所述多个输出端口中的每个输出端口用于对接收到的请求消息进行仲裁,向获得仲裁的输入端口发送许可消息。A plurality of output ports, each output port of the plurality of output ports is used to arbitrate the received request message, and send a permission message to the input port that has obtained the arbitration.
  2. 如权利要求1所述的路由器,其特征在于,各输入端口中配置有共享缓存,所述共享缓存中存储有多种业务类型的报文,每个输入端口用于针对共享缓存中存储的多个报文同时向各报文相应的输出端口发送请求消息,在接收到相应输出端口发送的许可消息之后,调度相应报文并且发送该报文到相应输出端口。The router according to claim 1, wherein each input port is configured with a shared cache, the shared cache stores packets of multiple service types, and each input port is used for multiple data stored in the shared cache. Each message sends a request message to the corresponding output port of each message at the same time. After receiving the permission message sent by the corresponding output port, the corresponding message is scheduled and sent to the corresponding output port.
  3. 如权利要求1或2所述的路由器,其特征在于,所述每个输入端口中维护有多个链表,每个链表对应于该输入端口支持的相应的业务类型和相应的输出端口,每个链表用于记录需要向相应输出端口调度的相应业务类型的报文。The router according to claim 1 or 2, wherein each input port maintains a plurality of linked lists, each linked list corresponds to a corresponding service type supported by the input port and a corresponding output port, each The linked list is used to record the packets of the corresponding service type that need to be scheduled to the corresponding output port.
  4. 如权利要求3所述的路由器,其特征在于,每个输入端口用于针对记录有要调度的报文的各个链表向相应的输出端口分别发送请求消息,在接收到相应输出端口发送的许可消息之后,调度该链表中记录的报文并且发送该报文到相应输出端口。The router according to claim 3, wherein each input port is used to send a request message to a corresponding output port for each linked list in which the message to be scheduled is recorded, and after receiving the permission message sent by the corresponding output port After that, schedule the message recorded in the linked list and send the message to the corresponding output port.
  5. 如权利要求1~4中任一项所述的路由器,其特征在于,所述多个输入端口中的第一输入端口,用于向第一输出端口发送第一请求消息,所述第一请求消息用于指示所述第一输入端口请求向所述第一输出端口调度第一业务类型的第一报文;The router according to any one of claims 1 to 4, wherein the first input port among the plurality of input ports is used to send a first request message to the first output port, the first request message The message is used to indicate that the first input port requests to schedule a first packet of the first service type to the first output port;
    所述多个输入端口中的第二输入端口,用于向所述第一输出端口发送第二请求消息,所述第二请求消息用于指示所述第二输入端口请求向所述第一输出端口调度所述第一业务类型的第二报文;向第二输出端口发送第三请求消息,所述第三请求消息用于指示所述第二输入端口请求向所述第二输出端口调度所述第一业务类型的第三报文;a second input port among the plurality of input ports, configured to send a second request message to the first output port, where the second request message is used to instruct the second input port to request the first output port The port schedules the second packet of the first service type; sends a third request message to the second output port, where the third request message is used to instruct the second input port to request the second output port to schedule all describe the third message of the first service type;
    所述多个输出端口中的第一输出端口,用于对所述第一请求消息和所述第二请求消息进行仲裁,向所述第一输入端口发送第一许可消息,所述第一许可消息用于指示允许所述第一输入端口向所述第一输出端口调度所述第一报文;a first output port among the plurality of output ports, configured to arbitrate the first request message and the second request message, and send a first permission message to the first input port, the first permission message The message is used to indicate that the first input port is allowed to schedule the first packet to the first output port;
    所述多个输出端口中的第二输出端口,用于对所述第三请求消息进行仲裁,向所述第二输入端口发送第二许可消息,所述第二许可消息用于指示允许所述第二输入端口向所述第二输出端口调度所述第三报文。a second output port among the plurality of output ports, configured to arbitrate the third request message, and send a second permission message to the second input port, where the second permission message is used to indicate that the The second input port schedules the third packet to the second output port.
  6. 如权利要求5所述的路由器,其特征在于,所述第一输入端口还用于:The router of claim 5, wherein the first input port is further used for:
    向所述第一输出端口发送第一接受消息,所述第一接受消息用于指示所述第一输入端口接受所述第一输出端口的许可;sending a first accept message to the first output port, where the first accept message is used to instruct the first input port to accept the permission of the first output port;
    将所述第一报文调度至所述第一输出端口;scheduling the first message to the first output port;
    向所述第一输出端口发送第一释放消息,所述第一释放消息用于指示所述第一报文调 度完成。A first release message is sent to the first output port, where the first release message is used to indicate that the first packet scheduling is completed.
  7. 如权利要求5或6所述的路由器,其特征在于,所述第一输入端口还用于:The router according to claim 5 or 6, wherein the first input port is further used for:
    向所述多个输出端口中的第三输出端口发送第四请求消息,所述第四请求消息用于指示所述第一输入端口请求向所述第三输出端口调度所述第一业务类型的第四报文;Send a fourth request message to a third output port of the plurality of output ports, where the fourth request message is used to instruct the first input port to request scheduling of the first service type to the third output port the fourth message;
    所述第三输出端口,用于对所述第四请求消息进行仲裁,向所述第一输入端口发送第三许可消息,所述第三许可消息用于指示允许所述第一输入端口向所述第三输出端口调度所述第四报文。The third output port is configured to arbitrate the fourth request message, and send a third permission message to the first input port, where the third permission message is used to indicate that the first input port is allowed to send the request to the first input port. The third output port schedules the fourth packet.
  8. 如权利要求5~7任一项所述的路由器,其特征在于,所述第二输入端口还用于:The router according to any one of claims 5 to 7, wherein the second input port is further used for:
    向所述第二输出端口发送第二接受消息,所述第二接受消息用于指示所述第二输入端口接受所述第二输出端口的许可;sending a second accept message to the second output port, where the second accept message is used to instruct the second input port to accept the permission of the second output port;
    将所述第三报文调度至所述第二输出端口;scheduling the third message to the second output port;
    向所述第二输出端口发送第二释放消息,所述第二释放消息用于指示所述第三报文调度完成。A second release message is sent to the second output port, where the second release message is used to indicate that the scheduling of the third packet is completed.
  9. 如权利要求5~8任一项所述的路由器,其特征在于,所述第一输入端口还用于:The router according to any one of claims 5 to 8, wherein the first input port is further used for:
    向所述第一输出端口发送第五请求消息,所述第五请求消息用于指示所述第一输入端口请求向所述第一输出端口调度第二业务类型的第五报文;sending a fifth request message to the first output port, where the fifth request message is used to instruct the first input port to request to schedule a fifth packet of the second service type to the first output port;
    所述第一输出端口,还用于对所述第五请求消息进行仲裁,确定不允许所述第一输入端口调度所述第五报文。The first output port is further configured to arbitrate the fifth request message, and determine that the first input port is not allowed to schedule the fifth message.
  10. 如权利要求5~9任一项所述的路由器,其特征在于,所述第一输入端口还用于:The router according to any one of claims 5 to 9, wherein the first input port is further used for:
    向所述第二输出端口发送第六请求消息,所述第六请求消息用于指示所述第一输入端口请求向所述第二输出端口调度所述第一业务类型的第六报文;sending a sixth request message to the second output port, where the sixth request message is used to instruct the first input port to request to schedule a sixth packet of the first service type to the second output port;
    所述第二输出端口,还用于对所述第六请求消息进行仲裁,确定不允许所述第一输入端口调度所述第六报文。The second output port is further configured to arbitrate the sixth request message, and determine that the first input port is not allowed to schedule the sixth message.
  11. 如权利要求2~10任一项所述的路由器,其特征在于,所述共享缓存中,所述第一业务类型的报文的存储空间小于或等于第一门限值,所述第二业务类型的报文的存储空间小于或等于第二门限值。The router according to any one of claims 2 to 10, wherein, in the shared cache, the storage space of the packets of the first service type is less than or equal to a first threshold value, and the second service The storage space of the type of message is less than or equal to the second threshold value.
  12. 如权利要求2~11任一项所述的路由器,其特征在于,所述共享缓存通过随机存取存储器RAM或寄存器实现。The router according to any one of claims 2 to 11, wherein the shared cache is implemented by a random access memory RAM or a register.
  13. 一种片上系统,其特征在于,包括主机、从机以及如权利要求1~12任一项所述的路由器,所述路由器用于将所述主机发送的报文路由至所述从机。A system-on-a-chip, comprising a host, a slave, and the router according to any one of claims 1 to 12, wherein the router is configured to route a packet sent by the host to the slave.
PCT/CN2021/074543 2021-01-30 2021-01-30 Router and system on chip WO2022160307A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/074543 WO2022160307A1 (en) 2021-01-30 2021-01-30 Router and system on chip
CN202180089309.0A CN116686269A (en) 2021-01-30 2021-01-30 Router and system on chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/074543 WO2022160307A1 (en) 2021-01-30 2021-01-30 Router and system on chip

Publications (1)

Publication Number Publication Date
WO2022160307A1 true WO2022160307A1 (en) 2022-08-04

Family

ID=82652933

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/074543 WO2022160307A1 (en) 2021-01-30 2021-01-30 Router and system on chip

Country Status (2)

Country Link
CN (1) CN116686269A (en)
WO (1) WO2022160307A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104617A (en) * 2014-08-07 2014-10-15 曙光信息产业(北京)有限公司 Message arbitration method and device
CN105721355A (en) * 2016-01-29 2016-06-29 浪潮(北京)电子信息产业有限公司 Method for transmitting message through network-on-chip route and network-on-chip route
US20170171115A1 (en) * 2015-02-03 2017-06-15 Netspeed Systems, Inc. Automatic buffer sizing for optimal network-on-chip design
CN111224883A (en) * 2019-11-26 2020-06-02 中国人民解放军国防科技大学 Tile structure of high-order router and high-order router constructed by tile structure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104104617A (en) * 2014-08-07 2014-10-15 曙光信息产业(北京)有限公司 Message arbitration method and device
US20170171115A1 (en) * 2015-02-03 2017-06-15 Netspeed Systems, Inc. Automatic buffer sizing for optimal network-on-chip design
CN105721355A (en) * 2016-01-29 2016-06-29 浪潮(北京)电子信息产业有限公司 Method for transmitting message through network-on-chip route and network-on-chip route
CN111224883A (en) * 2019-11-26 2020-06-02 中国人民解放军国防科技大学 Tile structure of high-order router and high-order router constructed by tile structure

Also Published As

Publication number Publication date
CN116686269A (en) 2023-09-01

Similar Documents

Publication Publication Date Title
US7143219B1 (en) Multilevel fair priority round robin arbiter
JP5036920B1 (en) RELAY DEVICE, RELAY DEVICE CONTROL METHOD, AND PROGRAM
US8155134B2 (en) System-on-chip communication manager
US7227841B2 (en) Packet input thresholding for resource distribution in a network switch
US8190801B2 (en) Interconnect logic for a data processing apparatus
US20080205432A1 (en) Network-On-Chip Environment and Method For Reduction of Latency
US20080232387A1 (en) Electronic Device and Method of Communication Resource Allocation
US20080186998A1 (en) Network-On-Chip Environment and Method for Reduction of Latency
US20070064699A1 (en) Method and apparatus for arbitrating data packets in a network system
US20030026206A1 (en) System and method for late-dropping packets in a network switch
US7020161B1 (en) Prescheduling arbitrated resources
US8040907B2 (en) Switching method
CN113110943B (en) Software defined switching structure and data switching method based on same
US8145823B2 (en) Parallel wrapped wave-front arbiter
WO2022160307A1 (en) Router and system on chip
US9703739B2 (en) Return available PPI credits command
US10091136B2 (en) On-chip network device capable of networking in dual switching network modes and operation method thereof
US6584531B1 (en) Arbitration circuit with plural arbitration processors using memory bank history
US9590924B1 (en) Network device scheduler and methods thereof
US9548947B2 (en) PPI de-allocate CPP bus command
US11768630B1 (en) Credit based memory scheduler
US9699107B2 (en) Packet engine that uses PPI addressing
US9413665B2 (en) CPP bus transaction value having a PAM/LAM selection code field
JP5691419B2 (en) Request transfer apparatus and request transfer method
CA2357582A1 (en) Slotted memory access method

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202180089309.0

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21921908

Country of ref document: EP

Kind code of ref document: A1