A round-robin priority arbitration method for network on chip
By adopting a full-queue circular priority arbitration method with a dual-cyclic queue structure and memory mechanism in the on-chip network, batch enqueuing of transmission requests within one clock cycle is realized, which solves the problem of large network delay in the existing technology and reduces the cost Transmission delay.
Patent Information
- Application Number
- CN202011552824.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-12-24
AI Technical Summary
The existing on-chip network round-robin priority arbitration method can easily lead to increased network latency when multiple master devices request to compete for the same transmission channel, because devices that fail to be marked may be selected again in the next clock cycle, resulting in a waste of clock cycles.
Adopting a double circular queue structure and memory mechanism, the first circular queue is used for device selection, and the second circular queue is used to store the transmission request of each main device, and implement batch enqueue of transactions within one clock cycle, and record the selection through the memory array The device avoids repeatedly entering the time slice and ensures that the transmission request is completed within one clock cycle.
It greatly reduces network transmission delay, avoids unnecessary waiting time for device requests, and improves network transmission efficiency.
Smart Images

Figure CN112685152B
Abstract
Description
Technical Field
[0001] The invention relates to the field of integrated circuit design, and in particular to an on-chip network cyclic priority arbitration method. Background Art
[0002] For on-chip networks, when there are multiple master device requests competing for the same transmission channel, the round-robin priority arbitration strategy is one of the most commonly used arbitration strategies. Round-robin priority is a fair priority. The basic idea of its arbitration is to select the request with the shortest time from multiple master device requests each time according to the time slice rotation method. Its implementation method generally adopts a circular queue. However, in the commonly used round-robin priority arbitration strategy, the following problems are prone to occur: whenever a master device request is dequeued from the circular queue, the master device port corresponding to the request is not marked. In the next round of time slice screening, the device may still be selected. If the request in the device is empty at this time, then a clock cycle is wasted. If there are n master devices, n clock cycles will be wasted. This method directly leads to: if there are n master device requests, these requests are dequeued separately, then the required clock cycle is 2n, which obviously causes a large network delay. Summary of the invention
[0003] Aiming at the problem of large network delay in the on-chip network round-robin priority arbitration method in the prior art, the present invention proposes an on-chip network round-robin priority arbitration method, which can simultaneously implement batch queueing of transactions within one clock cycle, thereby greatly reducing network transmission delay.
[0004] The present invention solves the technical problem by adopting the following technical solutions:
[0005] A network on chip circular priority arbitration method, characterized in that: the method adopts a double circular queue structure, the first circular queue is used to place all master devices, and is used to select devices when the time slice rotates, and the second circular queue is set inside each master device, each master device will make a number of transmission requests, and these requests are stored in a circular queue according to the first-in-first-out principle;
[0006] In order to reduce network transmission delay and avoid unnecessary waiting time for device requests, a full-queue round-robin priority arbitration method with a memory mechanism is proposed:
[0007] First, a memory array is set up to record the master devices selected by the time slice round-robin method;
[0008] Secondly, a method of batching transmission requests into a queue is proposed, that is, in one clock cycle, the requests of n master devices are queued at one time. The specific method is: if the transmission request of the currently selected master device is empty, and the memory array contains all the master device numbers, then the main thread is notified immediately to let the requests of each master device be queued at the same time. This method must first ensure that the master device with an empty transmission request will not enter the time slice repeatedly, and at the same time, it can realize batch queueing of transactions in one clock cycle, which greatly reduces the network transmission delay;
[0009] The on-chip network round-robin priority arbitration method can be decomposed into the following steps:
[0010] Step 1: The rising edge of a clock cycle of the main thread arrives;
[0011] Step 2 sets the minimum time min_time, which is used to compare and filter the earliest transmission request time, and defines the memory array mem_sel[M], which is used to store the devices selected each time, initialized to 0, and M is the total number of devices;
[0012] Step 3: Scan all master device ports in rotation order;
[0013] Step 4 determines whether the current master device is in an activated state. If yes, proceed to step 5; if not, return to step 3 and continue scanning other ports;
[0014] Step 5 determines whether the current master device contains the transaction that needs to be transmitted. If yes, go to step 6. If no, go directly to step 7.
[0015] Step 6: Take out the first transaction in the master device and record the time when the transaction entered the queue;
[0016] Step 7: Is the transaction time less than min_time? If yes, go to step 8; if no, go back to step 3;
[0017] Step 8: Select the current master device, update min_time, and add the selected device to mem_sel[M].
[0018] Step 9 determines whether the scan is completed, if yes, proceeds to step 10, if no, returns to step 3;
[0019] Step 10 determines whether the transaction queue of the currently selected master device is empty. If not, proceed to step 11; if yes, proceed to step 12.
[0020] Step 11: Take out the head element of the transaction queue of the selected master device and pass it out; return the device number of the selected master device and reset the port time of the current master device;
[0021] Step 12: Check whether the device number in mem_sel[M] includes all master devices. If yes, go to step 13; if no, go to step 15;
[0022] Step 13 sends a message to the main thread that the main device requests the transaction to be queued;
[0023] Step 14: During this clock cycle, each master device's request transaction is queued;
[0024] Step 15: This round of scanning arbitration ends, and the system waits for the rising edge of the next clock cycle to scan again.
[0025] In the on-chip network round-robin priority arbitration method, there are n master devices, with device numbers from 1 to n, stored in a circular queue called PortArray[n]. Each master device contains several transmission requests, which are placed in a circular queue of TransactionBuffer[]. Since the transmission requests in each master device are not necessarily the same, let m1, m2, ..., m n Corresponding to the 1st, 2nd, ..., nth master devices respectively, in each clock cycle, several master devices are arbitrated in a time slice rotation manner.
[0026] When a transmission request enters the transaction buffer pool TransactionBuffer of the i-th master device, the transmission request must include time information when entering the queue. All times need to be managed within a unified clock cycle. The time used in this method is local quantum time.
[0027] In the time slice rotation method of this method, all the master device ports are first scanned, and then the master device corresponding to the earliest transaction time is selected from the master devices in the activated state, the transaction of the head element of the master device queue is taken out and transmitted, and finally the port time of the current master device is updated.
[0028] The on-chip network master device priority arbitration method of the present invention adopts a double circular queue structure. The first circular queue is used to place all master devices for device selection when the time slice rotates. The second circular queue is set inside each master device. Since each master device will make several transmission requests, we store these requests in a circular queue according to the first-in-first-out principle. On the basis of the above structure, in order to reduce network transmission delay and avoid unnecessary waiting time for device requests, a full-queue circular priority arbitration strategy with a memory mechanism is proposed: first, a memory array is set, which is used to record the master devices selected by the time slice rotation method. Secondly, the transaction trigger mechanism of the main thread is changed. The traditional transaction enqueue method is: as long as the transmission request of the master device rotated by the time slice is empty, the main thread will be notified that the transmission request of the device can be enqueued. This method greatly increases the number of notifications and the number of transmission request enqueues, thereby increasing the delay of network transmission. A method of batch enqueuing transmission requests is proposed, that is, within one clock cycle, the requests of n master devices are enqueued at once. The specific method is: if the transmission request of the currently selected master device is empty, and the memory array contains all the master device numbers, then the main thread is notified immediately to let the requests of each master device be enqueued at the same time. This strategy must first ensure that the master device with an empty transmission request will not enter the time slice repeatedly, and at the same time, it can realize batch enqueuing of transactions in one clock cycle, which greatly reduces the network transmission delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of the double-circular queue structure of the present invention;
[0030] Figure 2 A schematic diagram of a transmission transaction queue of the present invention;
[0031] Figure 3 It is the overall flow chart of the time slice rotation of the present invention;
[0032] Figure 4 The figure is a flow chart of the full queue round-robin priority arbitration with a memory mechanism of the present invention. DETAILED DESCRIPTION
[0033] like Figure 1 , is a schematic diagram of the dual circular queue structure provided by an embodiment of the present invention. In this structure, it is assumed that there are n master devices, with device numbers from 1 to n, stored in a circular queue named PortArray[n]. Each master device contains several transmission requests, which are also placed in a circular queue of TransactionBuffer[]. Since the transmission requests in each master device are not necessarily the same, it is assumed that m1, m2, ..., m nThey correspond to the 1st, 2nd, ..., nth master devices respectively. In each clock cycle, several master devices are arbitrated in a time slice rotation manner.
[0034] like Figure 2 , is a schematic diagram of a transmission transaction queue provided by an embodiment of the present invention. When a transmission request enters the i-th master device, it must contain time information when entering the circular queue, so all times need to be managed within a unified clock cycle. The time used in the present invention is the local quantum time.
[0035] like Figure 3 , which is a general flow chart of the time slice rotation provided by the embodiment of the present invention. First, all the master device ports are scanned, and then the master device corresponding to the earliest transaction time is selected from the master devices in the activated state, and the transaction of the head element of the master device queue is taken out and transmitted, and finally the port time of the current master device is updated.
[0036] like Figure 4 As shown in FIG. 1 , a full queue round-robin priority arbitration strategy with a memory mechanism is provided in an embodiment of the present invention. The strategy can be decomposed into the following steps:
[0037] Step 1 The rising edge of a clock cycle of the main thread arrives.
[0038] Step 2 sets the minimum time min_time, which is used to compare and filter the earliest transmission request time. Define the memory array mem_sel[M], which is used to store the devices selected each time, initialized to 0, and M is the total number of devices.
[0039] Step 3 Scan all master device ports in a rotation order.
[0040] Step 4 determines whether the current master device is in an activated state. If yes, go to step 5. If not, go back to step 3 and continue scanning other ports.
[0041] Step 5 determines whether the current master device contains the transaction to be transmitted. If yes, go to step 6. If no, go directly to step 7.
[0042] Step 6 takes out the frontmost transaction in the master device and records the time when the transaction entered the queue.
[0043] Step 7: Is the transaction time less than min_time? If yes, go to step 8; if no, go back to step 3.
[0044] Step 8: Select the current master device, update min_time, and add the selected device to mem_sel[M].
[0045] Step 9 determines whether the scan is completed. If yes, go to step 10; if not, return to step 3.
[0046] Step 10 determines whether the transaction queue of the currently selected master device is empty. If not, proceed to step 11; if yes, proceed to step 12.
[0047] Step 11 takes out the head element of the transaction queue of the selected master device and transmits it; returns the device number of the selected master device and resets the port time of the current master device.
[0048] Step 12: Check whether the device number in mem_sel[M] includes all master devices. If yes, go to step 13; if no, go to step 15;
[0049] Step 13 sends a message to the main thread that the master device requests that the transaction needs to be queued.
[0050] Step 14: During this clock cycle, each master device's request transaction is queued.
[0051] Step 15: This round of scanning arbitration ends, and the system waits for the rising edge of the next clock cycle to scan again.
Claims
1. A method for round-robin priority arbitration of a network on chip, characterized in that: The on-chip network circular priority arbitration method adopts a double circular queue structure, the first circular queue is used to place all master devices for device selection when the time slice rotates, and the second circular queue is set inside each master device. Each master device will make a number of transmission requests, and these requests will be stored in a circular queue according to the first-in-first-out principle; In order to reduce network transmission delay and avoid unnecessary waiting time for device requests, a full-queue round-robin priority arbitration method with a memory mechanism is proposed: First, a memory array is set up to record the master devices selected by the time slice round-robin method; Secondly, a method of batch enqueuing transmission requests is proposed, that is, in one clock cycle, the requests of M master devices are enqueued at one time. Specifically, if the transmission request of the currently selected master device is empty, and the memory array contains all the master device numbers, then the main thread is notified immediately to let the requests of each master device be enqueued at the same time. This method of batch enqueuing transmission requests must first ensure that the master device with an empty transmission request will not enter the time slice repeatedly, and at the same time, it can realize batch enqueuing of transactions in one clock cycle, which greatly reduces the network transmission delay. The on-chip network round-robin priority arbitration method comprises the following steps: Step 1: The rising edge of a clock cycle of the main thread arrives; Step 2 sets the minimum time min_time, which is used to compare and filter the earliest transmission request time, and defines the memory array mem_sel[M], which is used to store the selected device each time, initialized to 0, and M is the number of all master devices; Step 3: Scan all master device ports in rotation order; Step 4 determines whether the current master device is in an activated state. If yes, proceed to step 5; if not, return to step 3 and continue scanning other ports; Step 5 determines whether the current master device contains the transaction that needs to be transmitted. If yes, go to step 6. If no, go directly to step 7. Step 6: Take out the first transaction in the current master device and record the time when the transaction entered the queue; Step 7 determines whether the transaction's queue entry time is less than min_time. If yes, go to step 8; if not, go back to step 3; Step 8: Select the current master device, update min_time, and add the selected device to mem_sel[M]. Step 9 determines whether the scan is completed, if yes, proceeds to step 10, if no, returns to step 3; Step 10 determines whether the transaction queue of the currently selected master device is empty. If not, proceed to step 11; If yes, go to step 12; Step 11: Take out the head element of the transaction queue of the selected master device and pass it out; Return the device number of the selected master device and reset the port time of the current master device; Step 12 determines whether the device number in mem_sel[M] includes all master devices. If yes, proceed to step 13; if not, proceed to step 15; Step 13 sends a message to the main thread that the main device requests the transaction to be queued; Step 14: During this clock cycle, each master device's request transaction is queued; Step 15: This round of scanning arbitration ends, and the system waits for the rising edge of the next clock cycle to scan again.
2. The on-chip network round-robin priority arbitration method according to claim 1, characterized in that: In the on-chip network round-robin priority arbitration method, there are M master devices with device numbers from 1 to M, which are stored in a circular queue called PortArray[M]. Each master device contains several transmission requests, which are placed in a circular queue called TransactionBuffer[]. Since the transmission requests in each master device are not necessarily the same, m1, m2, ..., mM are set to correspond to the transmission requests of the 1st, 2nd, ..., Mth master devices respectively. In each clock cycle, several master devices are arbitrated in a time slice rotation manner.
3. The on-chip network round-robin priority arbitration method according to claim 1, characterized in that: When a transmission request enters a master device transaction buffer pool TransactionBuffer, the transmission request must include time information when entering the queue. All times need to be managed within a unified clock cycle, and the time used is local quantum time.
4. The on-chip network round-robin priority arbitration method according to claim 1, characterized in that: When using the time slice rotation method for device selection, first scan all the master device ports, then select the master device corresponding to the earliest transaction time among the active master devices, take out the transaction of its head element, transmit it, and finally update the port time of the current master device.
