A crossbar matrix weight dynamic scheduling method and device, chip
By configuring cache space and counters in the crossbar switch and dynamically scheduling queue weights, the problem of low cache resource utilization in the crossbar switch is solved, and fast data scheduling and efficient resource utilization are achieved.
Patent Information
- Application Number
- CN202211397085.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-09
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-11-09
AI Technical Summary
During the data interconnection process within the chip, the large volume and sudden bursts of data at the input ports of the crossbar switch lead to prolonged occupation of cache resources, reducing resource utilization efficiency.
By configuring a buffer space at each inlet port of the cross switch, using a counter to count the number of requests, dividing the resource occupancy status intervals, configuring the weight of the queues according to the resource occupancy status, and performing dynamic scheduling to prioritize the processing of data requests from high-priority queues.
It improves the utilization rate of the internal buffer resources of the crossbar switch, avoids the situation where the buffer resources are occupied for a long time when a large amount of data is suddenly input to the port, and ensures that the data is quickly scheduled and output.
Smart Images

Figure CN115756837B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of crossbar, in particular to a crossbar matrix weight dynamic scheduling method and device, and a chip. BACKGROUND
[0002] With the rapid growth of computing data in a chip, internal data interconnection is becoming a bottleneck. Crossbar is responsible for the task of internal multi-port data interconnection of the chip. Since the data volume of each input port of the crossbar is large, and there is a burst in a short time, the accumulated data will occupy the cache resources for a long time, reducing the resource utilization efficiency, so it is particularly important to improve the utilization rate of cache resources in the crossbar. SUMMARY
[0003] The present application aims to solve at least one of the above technical defects.
[0004] To this end, the present application aims to provide a crossbar matrix weight dynamic scheduling method and device, and a chip to solve the problems mentioned in the background art and overcome the deficiencies in the prior art.
[0005] In order to achieve the above-mentioned purpose, the embodiment of the present application provides a crossbar matrix weight dynamic scheduling method, comprising the following steps:
[0006] Step S1, the crossbar is provided with a plurality of input ports and output ports, each of the input ports is configured with a cache space, the cache space corresponds to the input port one by one, wherein when a data request enters the input port, the data request first enters the cache space;
[0007] Step S2, each of the input ports receives the data request and parses the destination output port address carried in the data request, stores the data into the corresponding queue according to the destination output port address, and sets the resource occupation state of the current queue according to the data request amount, and then sends the resource occupation state of the queue to the corresponding output port;
[0008] Step S3, the output port of the crossbar configures the weight of each queue according to the resource occupation state, forms a weight configuration table of the queue as a queue polling arbitration sequence basis, and arbitrates the data request in each queue according to the priority relationship of the weight of the queue, and outputs the data.
[0009] It is preferred that in the step S1, each of the cache spaces comprises a plurality of queues, and each of the queues corresponds to an output port of the crossbar according to the destination output port address.
[0010] Preferably, in the step S2, a counter is arranged at each of the input ports, and the counter is used to count the data request amount in the queue of the corresponding input port; then, a plurality of resource occupation state intervals are divided according to the data request amount, each of the resource occupation state intervals corresponds to a resource occupation state, and a plurality of resource occupation states are obtained, and the resource occupation state of each queue at the input port is identified.
[0011] Preferably, in the step S2, a plurality of resource occupation state intervals are divided according to the data request amount, each of the resource occupation state intervals corresponds to a signal line, and the queue in the resource occupation state corresponding to the resource occupation state interval transmits the data request to the corresponding output port through the corresponding signal line.
[0012] Preferably, at least two threshold values are set according to the data request amount and the data capacity of the queue, and a plurality of resource occupation state intervals are divided according to the threshold values, each of the resource occupation state intervals corresponds to a resource occupation state.
[0013] Preferably, in the step S3, each of the queues is marked with a weight value, and the weight value is used as the basis for the polling arbitration sequence, wherein, for a queue with a high weight, the queue has the highest priority in the polling, and all data requests in the queue are read preferentially; for a queue with a low weight, a data request is read from the queue with the low weight, and then the queue is suspended and does not participate in the current arbitration.
[0014] The embodiment of the application also provides a crossbar matrix weight dynamic scheduling device, which comprises a cache space, a resource occupation state setting module, a weight configuration module and a polling arbitration module, wherein,
[0015] The crossbar is provided with a plurality of input ports and output ports, the cache space is arranged at each of the input ports, and each of the cache spaces corresponds to the input port in one-to-one correspondence, wherein, when a data request enters the input port, the data request first enters the cache space; the data request is received by each of the input ports, and a destination output port address carried in the data request is parsed, and the data is stored in the corresponding cache queue according to the destination output port address;
[0016] The resource occupation state setting module is used to count the data request amount of each of the input ports, and set the resource occupation state of the current queue according to the data request amount, and then the resource occupation state of the queue is sent to the corresponding output port;
[0017] The weight configuration module is arranged at the out port, and is configured to configure the weight of each queue according to the resource occupation state, and form a weight configuration table of the queue.
[0018] The polling arbitration module arbitrates the data requests in each queue according to the priority relationship of the weight of the queue according to the weight configuration table as the queue polling arbitration sequence basis, and outputs data.
[0019] According to the preferred embodiment of any of the above solutions, the crossbar matrix weight dynamic scheduling device further comprises a counter configured to count the amount of data requests in the buffer space queue corresponding to the in port; and the resource occupation state setting module is configured to divide a plurality of resource occupation state intervals according to the amount of data requests, and each resource occupation state interval corresponds to a resource occupation state, thereby obtaining a plurality of resource occupation states for identifying the resource occupation state of each queue at the in port.
[0020] According to the preferred embodiment of any of the above solutions, the resource occupation state setting module divides a plurality of resource occupation state intervals according to the amount of data requests, and each resource occupation state interval corresponds to a signal line, and the queue in the resource occupation state corresponding to the resource occupation state interval transmits the data request to the corresponding out port through the corresponding signal line.
[0021] According to the preferred embodiment of any of the above solutions, the resource occupation state setting module sets at least two threshold values according to the amount of data requests and the data capacity of the queue, and divides a plurality of resource occupation state intervals according to the threshold values, and each resource occupation state interval corresponds to a resource occupation state.
[0022] According to the preferred embodiment of any of the above solutions, the polling arbitration module is configured to mark each queue with a weight value, and the weight value is used as the queue polling arbitration sequence basis, wherein the queue with a high weight has the highest priority in polling, and all data requests in the queue are read preferentially; and the queue with a low weight is read with one data request, and then the queue is suspended and does not participate in the current arbitration.
[0023] Another embodiment of the application provides a chip comprising the crossbar matrix weight dynamic scheduling device provided in the above embodiments.
[0024] Compared with the prior art, the application has the following beneficial effects relative to the prior art: according to how much the data buffer resource of each port of the crossbar is occupied, the scheduling weight is configured, the more the resource occupation, the greater the scheduling weight, and the data is output faster. The situation that a large amount of buffer resources are occupied for a long time when a port bursts input a large amount of data is avoided, and the utilization rate of the internal buffer resources of the crossbar is improved.
[0025] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following description and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0026] The above and / or additional aspects and advantages of the application will become apparent and be readily understood by considering the following detailed description, including the accompanying drawings, in which:
[0027] Figure 1 A flow chart of the crossbar matrix weight dynamic scheduling method according to the embodiment of the application;
[0028] Figure 2 A schematic diagram of the crossbar according to the embodiment of the application;
[0029] Figure 3 A schematic diagram of the weight allocation table according to the embodiment of the application;
[0030] Figure 4 A structural diagram of the crossbar matrix weight dynamic scheduling device according to the embodiment of the application.
[0031] REFERENCE NUMERALS
[0032] 1, buffer space; 2, counter; 3, resource occupation state setting module; 4, weight configuration module; 5, polling arbitration module. DETAILED DESCRIPTION
[0033] Embodiments of the application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the application, and cannot be understood as a limitation of the application.
[0034] The application provides a cross switch matrix weight dynamic scheduling method and device and chip.The cross switch comprises a plurality of input ports and a plurality of output ports, and is internally composed of an entry buffer and an exit scheduler.
[0035] The application will be described in detail below. Figures 1 to 3 The application will be described in detail below.
[0036] As shown in the figure, the cross switch matrix weight dynamic scheduling method of the embodiment of the application comprises the following steps: Figure 1
[0037] Step S1, the cross switch is provided with a plurality of input ports and output ports, and each input port is configured with a buffer space, and the buffer space is in one-to-one correspondence with the input port. Figure 2 When data requests enter the input ports, the data requests first enter the buffer spaces, each buffer space comprises a plurality of queues, and each queue corresponds to an output port of the cross switch.
[0038] Step S2, each input port receives a data request, and a destination output port address carried in the data request is parsed, and the data is stored in the corresponding buffer queue according to the destination output port address.
[0039] According to the data request amount counted by the counter, a plurality of resource occupation state intervals are divided, each resource occupation state interval corresponds to a resource occupation state, and then a plurality of resource occupation states are obtained.
[0040] Specifically, according to the data request amount counted by the counter, a plurality of resource occupation state intervals are divided, each interval corresponds to a signal line, and the queue in the resource occupation state corresponding to the resource occupation state interval transmits the data request to the corresponding output port through the signal line.
[0041] In a further embodiment of the application, at least two threshold values are set comprehensively according to the data request amount counted by the counter and the data capacity of the queue.
[0042] It should be noted that the data request amount is the number of data requests received by the counter from the ingress port. The data capacity of the queue is the maximum amount of data that the queue can accommodate, which can be understood as the queue depth.
[0043] (1) Two threshold values
[0044] The first threshold value and the second threshold value are set, and three intervals are divided according to the first threshold value and the second threshold value, and then the resource occupation state is set according to the intervals.
[0045] When the data request amount received by the queue at the ingress port is less than the first threshold value, it indicates that the data request amount in the queue is small, and is marked as state 0;
[0046] When the data request amount received by the queue at the ingress port is greater than the first threshold value and less than the second threshold value, it indicates that the data request amount in the queue is in a moderate non-saturated state, and is marked as state 1;
[0047] When the data request amount received by the queue at the ingress port is greater than the second threshold value, it indicates that the data request amount in the queue is in a saturated state, and is marked as state 2.
[0048] The following takes a crossbar switch (6 ingress ports and 6 egress ports) as an example for description.
[0049] The crossbar switch includes 6 ingress ports and 6 egress ports, and each ingress port has 6 queues, so the 6 queues correspond to 6 egress ports respectively. The egress port extracts data requests from the corresponding 6 queues in the 6 ingress ports. The 6 queues of each ingress port can be counted, that is, the number of data requests in the queue is counted.
[0050] When the counter counts 12 data requests, according to the data request amount at the ingress port and the data capacity of the queue, the first threshold value is set to 4 and the second threshold value is set to 8, and the state is divided as follows:
[0051] When the data request amount received by the queue at the ingress port is less than the first threshold value 4, it indicates that the queue request is small, and the resource occupation state interval is divided as: 0-4, and is marked as resource occupation state 0;
[0052] When the data request amount received by the queue at the ingress port is greater than the first threshold value 4 and less than the second threshold value 8, it indicates that the queue has a certain amount of data requests but not too many, and the resource occupation state interval is divided as: 4-8, and is marked as resource occupation state 1;
[0053] When the data request amount received by the queue at the entry port is greater than the second threshold value 8, it indicates that the data request of the queue is large, i.e. the queue is in the full request state, and the resource occupation state interval is divided as 8-12, marked as resource occupation state 2.
[0054] The three intervals are represented by three signal lines in the circuit, and each signal line represents the state of the queue at the entry port. Each interval corresponds to a resource occupation state, and three resource occupation states are obtained.
[0055] (2) More than two threshold values
[0056] In addition, when more than two threshold values are set, multiple threshold intervals are divided according to the demand.
[0057] For example, when three threshold values are set, four intervals are divided according to the demand.
[0058] When the data request amount received by the queue at the entry port is less than the first threshold value, it indicates that the data request in the queue is small, and is marked as state 0.
[0059] When the data request amount received by the queue at the entry port is greater than the first threshold value and less than the second threshold value, it indicates that the data request amount in the queue is in the medium non-saturated state, and is marked as state 1.
[0060] When the data request amount received by the queue at the entry port is greater than the second threshold value and less than the third threshold value, it indicates that the data request amount in the queue is in the saturated state, and is marked as state 2.
[0061] When the data request amount received by the queue at the entry port is greater than the third threshold value, it indicates that the data request amount in the queue is in the high saturated state, and is marked as state 3.
[0062] The following takes a crossbar switch (6 entry ports and 6 exit ports) as an example for description.
[0063] The crossbar switch includes 6 entry ports and 6 exit ports, and each entry port has 6 queues, so the 6 queues correspond to 6 exits respectively. The exit port extracts data requests from the corresponding 6 queues in the 6 entries. The 6 queues of each entry port can be counted, i.e. the number of data requests in the queue is counted.
[0064] When the counter counts 20 data requests, according to the data request amount at the entry port and the data capacity of the queue, the first threshold value is set to 4, the second threshold value is set to 8, and the third threshold value is set to 12, and the state is divided as follows:
[0065] When the data request amount received by the queue at the entry port is less than the first threshold value 4, it indicates that the queue request is small, and the resource occupation state interval is divided as 0-4, and marked as resource occupation state 0;
[0066] When the data request amount received by the queue at the entry port is greater than the first threshold value 4 and less than the second threshold value 8, it indicates that the queue has a certain amount of data request but not too much, and the resource occupation state interval is divided as 4-8, and marked as resource occupation state 1;
[0067] When the data request amount received by the queue at the entry port is greater than the second threshold value 8 and less than the third threshold value 12, it indicates that the queue has more data request, i.e. the queue is in a multiple request state, and at this time the resource occupation state interval is divided as 8-12, and marked as resource occupation state 2;
[0068] When the data request amount received by the queue at the entry port is greater than the third threshold value 12, it indicates that the data request amount in the queue is in a high saturation state, and the resource occupation state interval is divided as 12-20, and marked as resource occupation state 3.
[0069] The four intervals are represented by four signal lines in the circuit, and each signal line represents the state of the queue at the entry port. Each interval corresponds to a resource occupation state, and four resource occupation states are obtained.
[0070] It should be noted that the four resource occupation states can generally meet the use.
[0071] The resource occupation state, i.e. state 0, 1, 2, and 3, identifies the resource occupation state of each queue at the entry port, sets the resource occupation state of the current queue, and the four states correspond to four signal lines. The resource occupation state is transmitted to the corresponding exit port of the queue through the four signal lines, and the exit port allocates weights according to the state.
[0072] It should be noted that the threshold value can be set as needed, i.e. when the data request amount received by the entry port is known, the purpose of dynamically adjusting the resource occupation state of each queue can be achieved by adjusting the threshold value.
[0073] Step S3, the exit port of the crossbar receives the transmitted resource occupation state of the queue, and configures the weight of each queue according to the resource occupation state, forming a weight configuration table of the queue. The weight configuration table determines the weight priority of the queue in the arbitration order of the exit port in each round of scheduling according to the resource occupation state of the above-mentioned counter. According to the weight configuration table as the basis of the queue polling arbitration order, the data requests in each queue are polled and arbitrated according to the priority relationship of the weight of the queue, and the data is output.
[0074] Specifically, the weight of each queue is configured according to the resource occupation state, including: the queue in state 0 is configured with weight 1, the queue in state 1 is configured with weight 2, the queue in state 2 is configured with weight 3, and the queue in state 3 is configured with weight 4, wherein the processing priority of weight 1, weight 2, weight 3 and weight 4 is sequentially increased.
[0075] It should be noted that since the 6 input ports of the cross switch are equivalently set, only one configuration table is needed.
[0076] Then, each queue is marked with a weight value, and the weight value is used as the basis for the queue polling arbitration order, wherein for a queue with high weight, the queue is in the highest priority in polling, and all data requests in the queue are read first; for a queue with low weight, a data request is read from the queue with low weight, and the queue is suspended and does not participate in the current arbitration.
[0077] Specifically, the weight configuration table is located at the out queue, and the 6 input ports correspond to 6 resource occupation states. Each resource occupation state is transmitted to the out port through a signal line, and there are 6 states. According to the weight requirement, for example, state 0 is configured with the lowest weight, weight 1, and state 3 is configured with the highest weight, weight 4. For example, the queue in state 0 is assigned weight 1, the queue in state 1 is assigned weight 2, the queue in state 3 is assigned weight 3, and the queue in state 4 is assigned weight 4. The above completes the weight configuration, and the weight configuration represents the subsequent polling order.
[0078] The out port will randomly select a request from one of the 6 queues for arbitration. If a queue has high weight, 4 requests will be continuously read from the queue with high weight; if the weight is low, only one request will be read from the queue with low weight, and then the queue will be suspended and will not participate in the current arbitration.
[0079] When the states of the 6 queues are transmitted to the out port, assuming that the out port is in the initial state, first, all queues are in the suspended state, according to the above described corresponding relationship (the queue in state 0 is assigned weight 1, the queue in state 1 is assigned weight 2, the queue in state 3 is assigned weight 3, and the queue in state 4 is assigned weight 4), the 6 queues will be marked with a weight value, and then according to the weight value, the polling arbitration rule is used to follow a certain order, for example, the queue from the entry 0 is in the highest priority in polling, and the request of this queue is read first, i.e. the priority.
[0080] When all queues are suspended, the weight is re-assigned.
[0081] Reference Figure 3 A typical weight configuration table is designed as follows, taking a 4x4 cross switch as an example:
[0082] The weight distribution table of each output port is determined by the state of the resource occupation count of each input port, and the weight of the queue in the output port is determined by the state of the queue in the input port queue. The queue in the state 0 is allocated a weight of 1, the queue in the state 1 is allocated a weight of 2, the queue in the state 3 is allocated a weight of 3, and the queue in the state 4 is allocated a weight of 4. The resource occupation state of each input port is associated with the scheduling weight through the index, and the weight distribution table is updated in real time.
[0083] Before the scheduling of each output port, the indication state of all input ports is in the suspended state, at this time, the weight value of each input port in the output port is set according to the weight distribution table, and the port in the highest priority is selected according to the polling arbitration. When the output port completes a data transmission, the corresponding input port weight value is reduced by 1. If the weight of a certain input port is reduced to 0, the port is in the suspended state and loses the qualification of participating in the scheduling, and the next input port is selected according to the priority order of the polling arbitration. At the same time, if the weight of a certain input port is 1 and the port is selected at this time, but there is no request in the corresponding input port queue at present, the port will be directly suspended and lose the qualification of participating in the scheduling.
[0084] When all input port queues are suspended, the state of all ports corresponding to the scheduler is reset to non-suspended, and the queue weight value of each input port corresponding to each input port is updated according to the real-time updated weight distribution table, and the priority of the polling arbitration is updated, and a new round of scheduling is started.
[0085] For example, if the weight distribution table of the output port a at time 1 is A:1, B:3, C:2, D:4, the priority order of the polling arbitration is B->C->D->A, and there are requests in the a0, a1, a2 and a3 queues, the output port a will first complete 3 times of data transmission with the input port B, then complete 2 times of data transmission with the input port C, then complete 4 times of data transmission with the input port D, and finally complete 1 time of data transmission with the input port A. Then the weight is updated according to the weight distribution table, and the polling priority order is changed to C->D->A->B. In the above scenario, there is no request in the a0 queue (only the count state of the input port queue is not 0, which means that there must be a request buffer), after the output port a completes 4 times of transmission with the input port D, the weight is directly updated according to the weight distribution table, and the polling priority order is changed to C->D->A->B.
[0086] The input port of the application can classify the incoming requests and store them in the fifo corresponding to the output port one by one, that is, an NxN structure, each input port has N fifos, and the whole structure has N^2 fifos, that is Figure 3The design can avoid the problem that one entry port can only match one exit port in the traditional VOQ, and can match multiple exit ports at the same time. One exit port can still match one entry port at the same time.
[0087] As shown in the figure, the crossbar matrix weight dynamic scheduling device of the embodiment of the application comprises a cache space 1, a counter 2, a resource occupation state setting module 3, a weight configuration module 4 and a polling arbitration module 5. Figure 4
[0088] Specifically, the crossbar is provided with multiple entry ports and exit ports, the cache space 1 is arranged at each entry port, and each cache space 1 corresponds to an entry port one by one. When a data request enters the entry port, the data request first enters the cache space 1, each cache space 1 comprises multiple queues, and each queue corresponds to an exit port of the crossbar; the data request is received by each entry port, and the destination exit port address carried in the data request is parsed, and the data is stored in the corresponding cache queue according to the destination exit port address.
[0089] The counter 2 is arranged at the entry port and is used for counting the data request amount in the queue corresponding to the entry port.
[0090] The resource occupation state setting module 3 is used for dividing multiple intervals according to the data request amount, corresponding one resource occupation state to each interval, and obtaining multiple resource occupation states, identifying the resource occupation state of each queue at the entry port, setting the resource occupation state of the current queue, and then sending the resource occupation state of the queue to the corresponding exit port.
[0091] Specifically, the resource occupation state setting module 3 divides multiple resource occupation state intervals according to the data request amount, corresponding one resource occupation state to each resource occupation state interval, and obtaining multiple resource occupation states, identifying the resource occupation state of each queue at the entry port, setting the resource occupation state of the current queue, and then sending the resource occupation state of the queue to the corresponding exit port.
[0092] Specifically, the resource occupation state setting module 3 divides multiple resource occupation state intervals according to the data request amount, and each interval corresponds to a signal line. The queue in the resource occupation state interval corresponding to the resource occupation state transmits the data request to the corresponding exit port through the signal line.
[0093] In a further embodiment of the application, the resource occupation state setting module 3 can also set at least two threshold values according to the data request amount and the data capacity of the queue, divide multiple resource occupation state intervals according to the threshold values, and correspond one resource occupation state to each resource occupation state interval.
[0094] It should be noted that the data request amount is the number of data requests received by the counter from the ingress port. The data capacity of the queue is the maximum amount of data that the queue can accommodate, which can be understood as the queue depth.
[0095] (1) Two threshold values
[0096] The resource occupation state setting module 3 sets the first threshold value and the second threshold value, divides three intervals according to the first threshold value and the second threshold value, and sets the resource occupation state according to the intervals.
[0097] When the data request amount counted by the counter is less than the first threshold value, it indicates that the data request amount in the queue is small, and the resource occupation state setting module 3 marks it as state 0.
[0098] When the data request amount counted by the counter is greater than the first threshold value and less than the second threshold value, it indicates that the data request amount in the queue is in a moderate non-saturated state, and the resource occupation state setting module 3 marks it as state 1.
[0099] When the counter is greater than the second threshold value, it indicates that the data request amount in the queue is in a saturated state, and the resource occupation state setting module 3 marks it as state 2.
[0100] The following takes a crossbar switch (6 ingress ports and 6 egress ports) as an example for description.
[0101] The crossbar switch includes 6 ingress ports and 6 egress ports. Each ingress port has 6 queues, and the 6 queues correspond to 6 egress ports respectively. The egress port extracts data requests from the corresponding 6 queues in the 6 ingress ports. The 6 queues of each ingress port can be counted, that is, the number of data requests in the queue is counted.
[0102] When the counter counts 12 data requests, the resource occupation state setting module 3 sets the first threshold value to 4 and the second threshold value to 8 according to the data request amount at the ingress port and the data capacity of the queue, and performs state division as follows:
[0103] When the data request amount received by the queue at the ingress port is less than the first threshold value 4, it indicates that the queue request is small, and the resource occupation state interval is divided as 0-4. The resource occupation state setting module 3 marks it as resource occupation state 0.
[0104] When the data request amount received by the queue at the ingress port is greater than the first threshold value 4 and less than the second threshold value 8, it indicates that the queue has a certain amount of data requests but not too many, and the resource occupation state interval is divided as 4-8. The resource occupation state setting module 3 marks it as resource occupation state 1.
[0105] When the data request amount received by the queue at the entry port is greater than the second threshold value 8, it indicates that the data request amount of the queue is large, i.e. the queue is in a full request state, at this time the resource occupation state interval is divided as: 8-12, and the resource occupation state setting module 3 is marked as resource occupation state 2.
[0106] The three intervals are represented by three signal lines in the circuit, and each signal line represents the state of the queue at this entry port. Each interval corresponds to a resource occupation state, and three resource occupation states are obtained.
[0107] (2) More than two threshold values
[0108] In addition, when the resource occupation state setting module 3 sets more than two threshold values, multiple threshold interval is divided according to the demand.
[0109] For example, when the resource occupation state setting module 3 sets three threshold values, four intervals are divided according to the demand.
[0110] When the data request amount received by the queue at the entry port is less than the first threshold value, it indicates that the data request amount in the queue is small, and the resource occupation state setting module 3 is marked as state 0.
[0111] When the data request amount received by the queue at the entry port is greater than the first threshold value and less than the second threshold value, it indicates that the data request amount in the queue is in a medium non-saturated state, and the resource occupation state setting module 3 is marked as state 1.
[0112] When the data request amount received by the queue at the entry port is greater than the second threshold value and less than the third threshold value, it indicates that the data request amount in the queue is in a saturated state, and the resource occupation state setting module 3 is marked as state 2.
[0113] When the data request amount received by the queue at the entry port is greater than the third threshold value, it indicates that the data request amount in the queue is in a high saturated state, and the resource occupation state setting module 3 is marked as state 3.
[0114] The following takes a crossbar switch (6 entry ports and 6 exit ports) as an example for description.
[0115] The crossbar switch includes 6 entry ports and 6 exit ports, and each entry port has 6 queues, so the 6 queues correspond to 6 exits respectively. The exit port extracts data requests from the corresponding 6 queues in the 6 entries. The 6 queues of each entry port can be counted, i.e. the number of the queue is counted.
[0116] When the counter counts 20 data requests, the resource occupation state setting module 3 sets the first threshold value as 4, the second threshold value as 8 and the third threshold value as 12 according to the data request amount at the entry port and the data capacity of the queue, and performs state division as follows:
[0117] When the data request amount received by the queue at the entry port is less than the first threshold value 4, it indicates that the queue request is small, and the resource occupation state interval is divided as 0-4, and the resource occupation state setting module 3 marks it as resource occupation state 0;
[0118] When the data request amount received by the queue at the entry port is greater than the first threshold value 4 and less than the second threshold value 8, it indicates that the queue has a certain amount of data requests but not too many, and the resource occupation state interval is divided as 4-8, and the resource occupation state setting module 3 marks it as resource occupation state 1;
[0119] When the data request amount received by the queue at the entry port is greater than the second threshold value 8 and less than the third threshold value 12, it indicates that the queue has more data requests, i.e. the queue is in a multiple request state, and at this time the resource occupation state interval is divided as 8-12, and the resource occupation state setting module 3 marks it as resource occupation state 2;
[0120] When the data request amount received by the queue at the entry port is greater than the third threshold value 12, it indicates that the data request amount in the queue is in a high saturation state, and the resource occupation state interval is divided as 12-20, and the resource occupation state setting module 3 marks it as resource occupation state 3.
[0121] The four intervals are represented by four signal lines on the circuit, and each signal line represents the state of the queue at the entry port. Each interval corresponds to a resource occupation state, and four resource occupation states are obtained.
[0122] It should be noted that the four resource occupation states can generally meet the use.
[0123] The resource occupation state, i.e. state 0, 1, 2 and 3, identifies the resource occupation state of each queue at the entry port, sets the resource occupation state of the current queue, and the four states correspond to four signal lines, and the resource occupation state is transmitted to the corresponding exit port of the queue through the four signal lines, and the exit port allocates weights according to the state.
[0124] It should be noted that the threshold value can be set as needed, i.e. when the data request amount received by the entry port is known, the purpose of dynamically adjusting the resource occupation state of each queue can be achieved by adjusting the threshold value.
[0125] The weight configuration module 4 is arranged at the out port, receives the resource occupation state of the transmitted queue, and configures the weight of each queue according to the resource occupation state to form a weight configuration table of the queue.
[0126] Specifically, the weight of each queue is configured according to the resource occupation state, including: configuring the weight 1 for the queue in state 0, configuring the weight 2 for the queue in state 1, configuring the weight 3 for the queue in state 2, and configuring the weight 4 for the queue in state 3, wherein the processing priority of the weight 1, the weight 2, the weight 3 and the weight 4 is sequentially increased.
[0127] The polling arbitration module 5 takes the weight configuration table as the queue polling arbitration sequence basis, and arbitrates the data request in each queue according to the priority relationship of the weight of the queue, and outputs the data.
[0128] Specifically, the polling arbitration module 5 is used for marking each queue with a weight value, and taking the weight value as the queue polling arbitration sequence basis, wherein for the queue with high weight, the queue is in the highest priority in polling, and all data requests in the queue are read preferentially; for the queue with low weight, a data request is read from the queue with low weight, and then the queue is suspended and does not participate in the current arbitration.
[0129] The embodiment of the application further provides a chip comprising the crossbar matrix weight dynamic scheduling device provided by the above-mentioned embodiment of the application.
[0130] Compared with the prior art, the application has the following beneficial effects: according to how much the data buffer resource of each port of the crossbar is occupied, the scheduling weight is configured, the larger the resource occupation amount is, the larger the scheduling weight is, and the data is output faster. The situation that a large amount of buffer resources are occupied for a long time when a large amount of data is input to the port is avoided, and the utilization rate of the internal buffer resource of the crossbar is improved. Through counting the independent requests of the in port, the request congestion of the in port can be recorded, and through the threshold grading mechanism for the counter and taking the counter as the basis of the weight distribution table of the out port, the request of the in port with high load can be processed quickly, and the fairness can be improved through the superposition polling mechanism.
[0131] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0132] It will be understood by those within the art that, in light of the present disclosure, many changes can be made to the specific embodiments described without departing from the spirit and scope of the application. Thus, the scope of the present application should not be limited by the foregoing description, but should be defined only by the following claims.
[0133] Although the embodiments of the present application have been shown and described above, it should be understood by those having ordinary skill in the art that such embodiments are presented by way of example only, and not limitation, as any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the present application. The scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A method for dynamic scheduling of weights in a crossbar matrix, characterized in that, The method comprises the following steps: Step S1, the crossbar switch is provided with a plurality of input ports and output ports, each of the input ports is configured with a cache space, the cache space corresponds to the input port one by one, wherein when a data request enters the input port, the data request first enters the cache space; Step S2, each of the input ports receives the data request and parses the destination output port address carried in the data request, and stores the data into the corresponding queue according to the destination output port address; The data request amount of each of the input ports is counted, and the resource occupation state of the current queue is set according to the data request amount, and then the resource occupation state of the queue is sent to the corresponding output port; Step S3, the output port of the crossbar switch configures the weight of each of the queues according to the resource occupation state, forms the weight configuration table of the queue, and takes the queue polling arbitration sequence as the basis, and polls the data request in each queue according to the priority relationship of the weight of the queue, and outputs the data; In the step S2, a counter is arranged at each of the input ports, the counter is used to count the data request amount in the cache space queue corresponding to the input port; then a plurality of resource occupation state intervals are divided according to the data request amount, each of the resource occupation state intervals corresponds to a resource occupation state, and a plurality of resource occupation states are obtained, and the resource occupation state of each queue at the input port is identified; At least two threshold values are set comprehensively according to the data request amount and the data capacity of the queue, a plurality of resource occupation state intervals are divided according to the threshold values, and each of the resource occupation state intervals corresponds to a resource occupation state; In the step S3, each of the queues is marked with a weight value, and the weight value is taken as the basis of the queue polling arbitration sequence, wherein for the queue with high weight, the queue is in the highest priority in polling, and all data requests in the queue are read preferentially; For the queue with low weight, a data request is read from the queue with low weight, and the queue is suspended and does not participate in the current arbitration.
2. The crossbar matrix weight dynamic scheduling method of claim 1, wherein, In the step S1, each of the cache spaces comprises a plurality of queues, and each of the queues corresponds to an output port of the crossbar switch according to the destination output port address.
3. The crossbar matrix weight dynamic scheduling method of claim 2, wherein, In the step S2, a plurality of resource occupation state intervals are divided according to the data request amount, each of the resource occupation state intervals corresponds to a signal line, and the queue in the resource occupation state corresponding to the resource occupation state interval transmits the data request to the corresponding output port through the corresponding signal line.
4. A crossbar matrix weight dynamic scheduling apparatus, characterized by, It comprises: The cache space, the resource occupation state setting module, the weight configuration module and the polling arbitration module, wherein the crossbar switch is provided with a plurality of input ports and output ports, the cache space is arranged at each of the input ports, and each of the cache spaces corresponds to the input port one by one, wherein when a data request enters the input port, the data request first enters the cache space; receiving the data request by each of the input ports, and parsing the destination output port address carried in the data request, and storing the data into the corresponding cache queue according to the destination output port address; the resource occupation state setting module is configured to count the data request amount of each of the input ports, and set the resource occupation state of the current queue according to the data request amount, and then send the resource occupation state of the queue to the corresponding output port; the weight configuration module is configured to set at the output port, and is configured to configure the weight of each of the queues according to the resource occupation state, and form a weight configuration table of the queue; the polling arbitration module is configured to perform polling arbitration on the data request in each of the queues according to the priority relationship of the weight of the queue according to the weight configuration table as the queue polling arbitration sequence basis, and output data; the resource occupation state setting module is configured to divide a plurality of resource occupation state intervals according to the data request amount, each of the resource occupation state intervals corresponds to a signal line, and the queue in the resource occupation state corresponding to the resource occupation state interval transmits the data request to the corresponding output port through the corresponding signal line; the resource occupation state setting module is configured to set at least two threshold values according to the data request amount and the data capacity of the queue, and divide a plurality of resource occupation state intervals according to the threshold values, each of the resource occupation state intervals corresponds to a resource occupation state; the polling arbitration module is configured to mark each of the queues with a weight value, and use the weight value as the queue polling arbitration sequence basis, wherein, for the queue with high weight, the queue is in the highest priority in polling, and all data requests in the queue are read preferentially; for the queue with low weight, a data request is read from the queue with low weight, and then the queue is suspended and does not participate in the current arbitration; the device further includes a counter, and the counter is configured to count the data request amount in the cache space queue at the corresponding input port; then, the resource occupation state setting module divides a plurality of resource occupation state intervals according to the data request amount, each of the resource occupation state intervals corresponds to a resource occupation state, and then a plurality of resource occupation states are obtained, and the resource occupation state of each queue at the input port is identified.
5. A chip, characterized by The chip comprises the device of claim 4.
Citation Information
Patent Citations
Low-time delay crossbar switch scheduling method suitable for network on chip
CN107360107A
Exchange system based on crossbars with buffer
CN1874292A