| CPC G06F 9/5005 (2013.01) [G06F 21/44 (2013.01); G06F 2209/503 (2013.01)] | 14 Claims |

|
1. An integrated circuit, comprising:
a plurality of control circuits, wherein each of the control circuits sends a work request, execute a work procedure according to an authorization code corresponding to the work procedure, and generate a completion signal corresponding to the authorization code after the work procedure is completed; and
a resource controller coupled to the control circuits comprising:
a storage circuit stores a plurality of index values, wherein each of the index values is associated with one of the authorization codes;
a processor circuit coupled to the storage circuit and updates, according to each of the completion signals, a status of the index value associated with the authorization code corresponding to the work procedure; and
a conversion circuit coupled to the storage circuit and the processor circuit, and in response to each of the work requests, outputs, when the status of at least one of the index values is resource-available, the authorization code associated with the index value having a status that is resource-available, and output no authorization code when the status of none of the index values is resource-available;
wherein, the conversion circuit has a comparison table used to respectively associate the index values with different authorization codes, detects the status of each of the index values in response to each of the work requests, selects, when the status of at least one of the index values is resource-available, one of the index values whose status is resource-available, obtains the authorization code associated with the selected index value according to the selected index value and the comparison table, and outputs the authorization code associated with the selected index value to the control circuit corresponding to the corresponding work request to which a response is made;
wherein, the resource controller further comprises a cyclic circuit coupled to the storage circuit and the conversion circuit, and the conversion circuit cyclically selects, through the cyclic circuit, one of the index values that are resource-available and with which the authorization code is output to the control circuits for a smaller number of times compared to other index values that are resource-available;
wherein, when the authorization code associated with each of the index values that are resource-available is output to the control circuits for the same number of times, the conversion circuit randomly selects, through the cyclic circuit, one of the index values that are resource-available.
|