Chip with multi-tasking processing and resource management method thereof

By designing a resource controller in the chip and using single-bit pointer values ​​and conversion circuits for resource management, the problem of excessive use rights occupies memory during multitasking of a single chip is solved, and efficient resource management and storage cost are achieved.

CN114385343BActive Publication Date: 2025-05-23REALTEK SEMICON CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011117817.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-19
Publication Date
2025-05-23
Estimated Expiration
2040-10-19

AI Technical Summary

Technical Problem

Due to limited hardware resources, a single chip cannot authorize the processor to perform multitasking without restrictions, resulting in excessive memory occupancy of use rights and huge storage costs.

Method used

Design a multi-tasking chip, using a resource controller to control hardware resources through storage circuits, processing circuits and conversion circuits, and using single-bit pointer values ​​and conversion circuits to achieve efficient management and authorization of resources.

Benefits of technology

By reducing the memory size of available resources in the resource controller, the storage cost is reduced and the chip's multitasking capability is achieved. Compared with the prior art, memory storage space is reduced by at least 30%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114385343B_ABST
    Figure CN114385343B_ABST
Patent Text Reader

Abstract

A chip with multi-tasking processing includes multiple control circuits and a resource controller. Each control circuit is used to issue a work request, execute a work program corresponding to the authorization code according to an authorization code, and generate an end signal when the work program ends. The resource controller includes a storage circuit, a processing circuit and a conversion circuit. The storage circuit stores multiple pointer values. The number of bits of each pointer value is one. The processing circuit updates a state of an indicator value associated with the authorization code corresponding to the work program according to each end signal. The conversion circuit is used to respond to each work request, and when the state of at least one of each indicator value is that there are resources, an authorization code associated with an indicator value with a resource state is output, and when the state of the indicator values ​​is that there are no resources, no authorization code is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a multi-task processing technology, and in particular to a chip and a method for managing and controlling multi-task processing resources. Background Art

[0002] Generally, when a single chip is in operation, due to the limited hardware resources in the chip, the chip cannot authorize the processor in the chip to perform multi-tasking without restriction. Therefore, the chip uses its resource controller to control the hardware resources to ensure the number of tasks that the single chip can perform simultaneously, and to prevent its workload from exceeding its load. For example, the processor first sends a work request to the resource controller, and the resource controller determines whether the number of resources is sufficient. If the number of resources is sufficient, the resource controller sends the use right to the processor that issued the work request. The processor can only work after obtaining the use right, and returns the use right to the resource controller after completing the work. The number of the aforementioned use rights is equivalent to the number of resources, and the size of the memory occupied by each use right in the resource controller is proportional to the number of resources. Therefore, when the multi-tasking capability of the single chip is stronger, the number of use rights and the memory occupied by each use right will be larger, and the memory used to store those use rights will be more, resulting in huge storage costs. Summary of the invention

[0003] In view of the above reasons, the present invention provides a chip with multi-tasking processing and a resource management method thereof to reduce the situation where usage rights occupy a large amount of memory.

[0004] In some embodiments, a chip with multi-tasking processing includes multiple control circuits and a resource controller. Each control circuit is used to issue a work request, execute a work program corresponding to the authorization code according to an authorization code, and generate an end signal corresponding to the authorization code when the work program ends. The resource controller is coupled to the control circuit. The resource controller includes a storage circuit, a processing circuit and a conversion circuit. The storage circuit stores a plurality of pointer values, wherein the number of bits of each pointer value is one, and each pointer value is associated with one of the authorization codes. The processing circuit is coupled to the storage circuit. The processing circuit updates a state of an indicator value associated with the authorization code corresponding to the work program according to each end signal. The conversion circuit is coupled to the storage circuit and the processing circuit. The conversion circuit is used to respond to each work request, and when the state of at least one of the indicator values ​​is a resource, an authorization code associated with an indicator value with a resource state is output, and when the state of the indicator values ​​is all a resource-free state, no authorization code is output.

[0005] Therefore, according to some embodiments, the storage cost is greatly reduced by using a pointer value stored in the resource controller with a single bit. Each indicator value of the resource controller only needs a single bit, and the manufacturing cost of the entire resource controller is greatly reduced. According to some embodiments, the conversion circuit is used to convert the pointer value of only a single bit into different authorization codes. When the resource controller receives a request from the control circuit, an available indicator value is selected, and the control conversion circuit is controlled to convert the available pointer value into a corresponding authorization code. The control circuit that issues the request performs the work according to the corresponding authorization code. In this way, the chip can have the ability of multi-tasking. Therefore, the resource controller can achieve the effect of resource control and storage cost reduction by having only a single-bit pointer value and a conversion circuit. Compared with the prior art, the memory size used to store available resources in the resource controller is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1 A block diagram of a chip with multi-tasking processing according to some embodiments of the present invention is shown.

[0007] Figure 2 A block diagram illustrating a resource controller according to some embodiments of the present invention.

[0008] Figure 3 A schematic diagram showing bytes composed of pointer values ​​according to some embodiments of the present invention.

[0009] Figure 4 Schematic diagram showing a look-up table of a conversion circuit according to some embodiments of the present invention.

[0010] Figure 5 A block diagram illustrating a resource controller according to some embodiments of the present invention.

[0011] Figure 6 A block diagram illustrating a resource controller according to some embodiments of the present invention.

[0012] Figure 7 A schematic flow chart showing a resource control method for multi-tasking according to some embodiments of the present invention. DETAILED DESCRIPTION

[0013] Reference Figure 1, a block diagram of a chip 100 with multi-tasking processing in some embodiments of the present invention is shown. In some embodiments, the chip 100 with multi-tasking processing includes a plurality of control circuits 110A to 110C and a resource controller 120. The control circuits 110A to 110C are coupled to the resource controller 120. In some embodiments, the chip 100 with multi-tasking processing includes a plurality of control circuits 110A to 110C, a resource controller 120, and a chip circuit 130. The control circuits 110A to 110C are coupled to the resource controller 120 and the chip circuit 130. In some embodiments, the coupling between the internal components of the chip 100 (such as the control circuits 110A to 110C, the resource controller 120, and the chip circuit 130) is, for example, but not limited to, a control signal, a data bus, and an address bus (external bus). Here, the control circuits 110A to 110C are generally multiple, but the present invention is not limited thereto.

[0014] The chip 100 is a chip having control circuits 110A to 110C and a resource controller 120, such as but not limited to a system on a chip (SOC). In some embodiments, the chip 100 is a system chip having a central processing unit, a graphics processing unit (GPU), an image processing unit (Image processing Unit) and a memory resource controller (Memory resource controller), the control circuits 110A to 110C can be the central processing unit, the graphics processing unit and the image processing unit respectively, and the resource controller 120 can be a memory resource controller. The chip circuit 130 is the circuit of the chip 100 other than the control circuits 110A to 110C and the resource controller 120, such as but not limited to a power management circuit, a peripheral interface circuit, a bus, a special function circuit, an input / output port, a data compressor (Compressor) and a direct memory access controller (Direct Memory Access, DMA), etc.

[0015] In some embodiments, the resource controller 120 includes a storage circuit 122, a processing circuit 123, and a conversion circuit 124. The resource controller 120 is used to control the number of available resources of the chip 100, and when there are available resources, authorize the control circuits 110A to 110C to execute a working program to control the operation of the chip circuit 130 (described in detail later). The storage circuit 122 is a memory inside the resource controller 120, but the present invention is not limited thereto. In some embodiments, the storage circuit 122 can be a memory outside the resource controller 120, and the resource controller 120 is coupled to the storage circuit 122. The processing circuit 123 is coupled to the storage circuit 122 and the conversion circuit 124. The conversion circuit 124 is coupled to the storage circuit 122 and the processing circuit 123. In some embodiments, the coupling between the internal components of the resource controller 120 (e.g., the storage circuit 122, the processing circuit 123, and the conversion circuit 124) is, for example, but not limited to, a data bus and an address bus (internal bus).

[0016] Each control circuit 110A to 110C is used to issue a work request. Specifically, each control circuit 110A to 110C issues a work request to the resource controller 120 according to its work requirements. For example, when the first control circuit 110A has a work requirement, the first control circuit 110A issues a work request to the resource controller 120; when the third control circuit 110C has a work requirement, the third control circuit 110C issues a work request to the resource controller 120. The work request may be a level signal or an instruction, such as but not limited to a high and / or low level signal, a reduced instruction set (RISC) and / or a complex instruction set (CISC).

[0017] The conversion circuit 124 of the resource controller 120 is used to respond to each work request. Specifically, the conversion circuit 124 is activated in response to each work request. For example, when the first control circuit 110A sends a work request to the resource controller 120, the conversion circuit 124 is activated in response to the work request from the first control circuit 110A; when the third control circuit 110C sends a work request to the resource controller 120, the conversion circuit 124 is activated in response to the work request from the third control circuit 110C. In some embodiments, Figure 2 As shown, Figure 2A block diagram of a resource controller 120 according to some embodiments of the present invention is shown. The resource controller 120 further includes a detection circuit 125. The detection circuit 125 is coupled to the control circuits 110A to 110C and the conversion circuit 124. The detection circuit 125 is used to detect a work request from the control circuits 110A to 110C, and when a work request is detected, the detection circuit 125 sends a start signal to the conversion circuit 124, so that the conversion circuit 124 starts in response to the start signal. The detection circuit 125 can be a signal receiver.

[0018] Please refer to Figure 3 , Figure 3 Schematic diagram of bytes composed of indicator values ​​200_0 to 200_7 according to some embodiments of the present invention. The storage circuit 122 is used to store multiple indicator values ​​200_0 to 200_7. The storage circuit 122 can be, but is not limited to, any one of a static random access memory (SRAM), an instruction register, an address register, a general purpose register, a flag register, and a cache, or any combination thereof. The data stored in the storage circuit 122 is for the resource controller 120 to control the available resources of the chip 100 and the authorization control circuits 110A to 110C to execute the working program. In some embodiments, the storage circuit 122 also stores the address parameters corresponding to each indicator value 200_0 to 200_7.

[0019] The number of bits of each indicator value 200_0 to 200_7 is one. The number of indicator values ​​200_0 to 200_7 is equivalent to the resources of the chip 100, that is, when the resources of the chip 100 are more, the number of indicator values ​​200_0 to 200_7 is more. The status of the indicator values ​​200_0 to 200_7 is divided into "resources available" (available resources) and "no resources" (no available resources) according to whether the resources are available. When the chip 100 is initialized (that is, before all control circuits 110A to 110C have not issued any work request), the status of all indicator values ​​200_0 to 200_7 is "resources available". When the chip 100 starts to operate, the status of some indicator values ​​200_0 to 200_7 becomes "no resources", indicating that some resources of the chip 100 are used, and the status of the remaining indicator values ​​200_0 to 200_7 is "resources available". When the chip 100 is fully loaded, the status of all indicator values ​​200_0 to 200_7 is “resource available”.

[0020] In some embodiments, Figure 3 As shown, the pointer values ​​200_0 to 200_7 can be combined into one byte. For example, if the number of the pointer values ​​200_0 to 200_7 is eight, they can be combined into one octet.

[0021] In some embodiments, the indicator values ​​200_0 to 200_7 may be logic values ​​or digital signals. In some embodiments, when the indicator values ​​200_0 to 200_7 are resources, the indicator values ​​200_0 to 200_7 are logic values ​​1 or digital signals 1; when the indicator values ​​200_0 to 200_7 are no resources, the indicator values ​​200_0 to 200_7 are logic values ​​0 or digital signals 0, but are not limited thereto. In other embodiments, when the indicator values ​​200_0 to 200_7 are resources, the indicator values ​​200_0 to 200_7 are logic values ​​0 or digital signals 0; when the indicator values ​​200_0 to 200_7 are no resources, the indicator values ​​200_0 to 200_7 are logic values ​​1 or digital signals 1.

[0022] Each indicator value 200_0 to 200_7 is associated with an authorization code. The resource controller 120 responds to a work request issued by a control circuit (taking 110A as an example), and when the status of at least one indicator value 200_0 to 200_7 is that there are resources, it issues the authorization code associated with the indicator value 200_0 to 200_7 with the status of having resources (referred to as the indicator value with the resource status) to the first control circuit 110A, and the first control circuit 110A performs its work according to the authorization code.

[0023] Specifically, the conversion circuit 124 of the resource controller 120 responds to each work request, and when the state of at least one of at least one indicator value 200_0 to 200_7 is a resource-available state, the conversion circuit 124 outputs an authorization code associated with one of the indicator values ​​200_0 to 200_7 with a resource state. When the state of all the pointer values ​​200_0 to 200_7 is a resource-free state, the conversion circuit 124 does not output any authorization code. For example, the conversion circuit 124 responds to the work request from the first control circuit 110A, the conversion circuit 124 determines the status of the pointer values ​​200_0 to 200_7, and when the status of at least one of the pointer values ​​200_0 to 200_7 is that there are resources (for example, the second and fourth pointer values ​​200_1, 200_3), the conversion circuit 124 outputs the authorization code associated with one (200_1) of the pointer values ​​(200_1, 200_3) with the resource status to the first control circuit 110A; when the conversion circuit 124 responds to the work request from the third control circuit 110C, and there is still a pointer value (the fourth pointer value 200_3) with the resource status, the conversion circuit 124 outputs the authorization code associated with one (the fourth pointer value 200_3) of the pointer values ​​with the resource status to the third control circuit 110C. If the status of the indicator values ​​200_0 to 200_7 are all no resources, the conversion circuit 124 does not output any authorization code to any control circuit 110A to 110C. The authorization code may be, for example but not limited to, a logic value, a serial number or a digital signal.

[0024] Please also see Figure 3and Figure 4 , Figure 4 A schematic diagram of a comparison table 300 of the conversion circuit 124 of some embodiments of the present invention is shown. In some embodiments, the number of digits of the authorization code is greater than the number of digits of the pointer values ​​200_0 to 200_7. For example Figure 4 As shown, the number of digits of the authorization code is three, and the number of digits of the pointer values ​​200_0 to 200_7 is one, which means that the chip 100 has eight multi-task resources available. In some embodiments, the number of logical values ​​that can be combined with the number of digits of the authorization code is the number of pointer values ​​200_0 to 200_7. For example, if the number of pointer values ​​200_0 to 200_7 is two hundred and fifty-six, then the number of digits of the authorization code is eight and the number of logical values ​​that can be combined with them is two hundred and fifty-six (that is, the number of authorization codes is two hundred and fifty-six). In some embodiments, the authorization codes all have the same number of digits.

[0025] After receiving the authorization code, the control circuits 110A to 110C execute a work program corresponding to the authorization code according to the authorization code. In some embodiments, the control circuits 110A to 110C execute a work program corresponding to the authorization code according to the authorization code to control the operation of the chip circuit 130. For example, the control circuits 110A to 110C that receive the authorization code transmit the authorization code, a header, and an instruction to the chip circuit 130, and the chip circuit 130 responds to the authorization code and the header, and executes the corresponding operation according to the instruction. Here, the header represents the state that the work program is executed. In some embodiments, the header may have a product serial number of the corresponding control circuit 110A to 110C, etc.

[0026] When the control circuits 110A to 110C terminate the work program, they generate an end signal corresponding to the authorization code and send the end signal to the resource controller 120, which indicates that the control circuits 110A to 110C complete the work program and want to return the authorized resources to the chip 100. The end signal may include the authorization code corresponding to the work program and a header. Here, the header indicates that the work program is in the terminated state.

[0027] The processing circuit 123 of the resource controller 120 updates the status of the indicator values ​​200_0 to 200_7 associated with the authorization code corresponding to the work program according to each end signal from the control circuits 110A to 110C. For example, the processing circuit 123 obtains the end signal from the first control circuit 110A, and confirms that the work program of the first control circuit 110A has ended according to the header of the end signal, and further confirms that the first control circuit 110A intends to return the resources to the chip 100. The processing circuit 123 updates the status of the indicator values ​​200_0 to 200_7 associated with the authorization code (i.e., the authorization code corresponding to the ended work program, such as the authorization code corresponding to the ended work program of the first control circuit 110A) in the storage circuit 122 according to the authorization code of the end signal (i.e., the authorization code corresponding to the ended work program, such as the authorization code corresponding to the ended work program of the first control circuit 110A), so as to complete the process of returning the resources to the chip 100 by the first control circuit 110A.

[0028] In some embodiments, the processing circuit 123 updates the status of the indicator values ​​200_0 to 200_7 associated with the authorization code corresponding to the work program from no resources to resources according to each end signal from the control circuits 110A to 110C. That is, the control circuits 110A to 110C return the resources to the chip 100. For example, the processing circuit 123 obtains the indicator values ​​200_0 to 200_7 associated with the authorization code of each end signal from the control circuits 110A to 110C through the conversion circuit 124, and updates the status of the obtained indicator values ​​200_0 to 200_7 from no resources to resources in the storage circuit 122. In some embodiments, the processing circuit 123 searches the comparison table 300 (such as Figure 4 As shown), to obtain the index value 200_0 to 200_7 associated with the authorization code of each end signal. In some embodiments, as Figure 2 As shown, the detection circuit 125 is also coupled to the processing circuit 123 , and the processing circuit 123 receives each end signal from the control circuits 110A to 110C via the detection circuit 125 .

[0029] Therefore, in some embodiments, the resource controller 120 controls the number of available resources of the chip 100 through the indicator values ​​200_0 to 200_7, and when there are available resources, converts the indicator values ​​200_0 to 200_7 with resource status into authorization codes via the conversion circuit 124 to authorize the control circuits 110A to 110C (output the authorization codes associated with the indicator values ​​200_0 to 200_7 with resource status to the corresponding control circuits 110A to 110C), so that the control circuits 110A to 110C execute the working program to control the operation of the chip circuit 130, and after the working program is completed, the control circuits 110A to 110C return the resources to the chip 100.

[0030] In some embodiments, the resource controller 120 can complete the management of the resources of the chip 100 by having only a single bit and a conversion circuit 124 for each indicator value 200_0 to 200_7, so that the chip 100 has the ability to process multiple tasks and achieves the effect of reducing storage costs. For example, if the existing resource control technology is used, such as the chip 100 directly storing the authorization code in the storage circuit 122 (for example, the chip has 256 available resources, and directly stores 256 eight-bit authorization codes in the storage circuit 122), it will cause a huge storage cost (for example, occupying 2,048 bits (256 multiplied by 8 bits)), and the size of the memory occupied by each authorization code in the resource controller 120 is proportional to the number of resources. Therefore, when the multi-tasking capability of the chip 100 is stronger, the number of authorization codes will be increased. The larger the memory occupied by each authorization code; or for example, integrating four resource controllers 120 that control sixty-four resources, four resource controllers 120 that control one hundred and twenty-eight resources, three resource controllers 120 that control two hundred and fifty-six resources, two resource controllers 120 that control five hundred and twelve resources, one resource controller 120 that controls seven hundred and sixty-eight resources, and one resource controller 120 that controls one thousand and twenty-four resources, the required memory storage space is 117,481 square microns (μm^2). Here, the resource controller 120 stores the pointer values ​​200_0 to 200_7 having only a single bit and the conversion circuit 124 through the storage circuit 122, which can reduce the memory storage space by at least 30% compared to the prior art, for example, only 256 bits of memory are occupied (obtained by multiplying the 256 pointer values ​​200_0 to 200_7 by one bit), and when the multi-tasking capability of the chip 100 is stronger, the occupied memory capacity can be further reduced compared to the prior art; or for example, by integrating the resource controller 120 of the aforementioned example, the required memory storage space can be reduced to 32,166 square micrometers (μm^2).

[0031] In some embodiments, when the conversion circuit 124 outputs the authorization code, the processing circuit 123 changes the status of the indicator values ​​200_0 to 200_7 associated with the currently output authorization code to no resources. When the conversion circuit 124 outputs the authorization code to the control circuits 110A to 110C, a status control signal is sent to the processing circuit 123. The processing circuit 123 is activated according to the status control signal, and changes the status of the indicator values ​​200_0 to 200_7 associated with the currently output authorization code by the conversion circuit 124 from having resources to having no resources in the storage circuit 122. That is, after the resource controller 120 distributes resources to the control circuits 110A to 110C, the status of the indicator values ​​200_0 to 200_7 is changed to having no resources. The status control signal can be a high level signal or a low level signal.

[0032] In some embodiments, each control circuit 110A to 110C issues a work request at a different time point. For example, after the first control circuit 110A issues a work request, the second control circuit 110B issues a work request at a time point ten microseconds later than the first control circuit 110A, and the third control circuit 110C issues a work request at a time point ten microseconds later than the second control circuit 110B. Of course, the present invention is not limited to this. In some embodiments, each control circuit 110A to 110C can issue a work request based on its own frequency signal, and since each control circuit 110A to 110C can issue a work request based on its work requirements, the time point at which each control circuit 110A to 110C issues a work request can be the same or different. In some embodiments, each control circuit 110A to 110C generates an end signal corresponding to the authorization code after completing its work program, and when there is still a work requirement, it issues another work request to the resource controller 120.

[0033] In some embodiments, the conversion circuit 124 is a logic circuit having one or more input terminals and one or more output terminals. The input terminal of the conversion circuit 124 is coupled to the storage circuit 122, and when it is detected that the state of at least one indicator value 200_0 to 200_7 is that there is a resource, at least one logic result is output at the output terminal of the conversion circuit 124, that is, after the pointer value 200_0 to 200_7 is input to the logic circuit via the input terminal, the authorization code (logic result) is output at the output terminal. The logic circuit can be, but not limited to, a logic gate, or a combination of multiple logic gates, wherein the logic gate is, for example, but not limited to, an inverter, an AND gate, an OR gate, an exclusive OR gate, a buffer gate, or other logic gates. The logic result can be a combination of logic 0 and logic 1. In some embodiments, the input terminal of the conversion circuit 124 is also coupled to the control circuits 110A to 110C to receive and respond to work requests from the control circuits 110A to 110C.

[0034] In some embodiments, Figure 4 As shown, the comparison table 300 associates the index values ​​200_0 to 200_7 with different authorization codes. For example, the comparison table 300 associates different index values ​​200_0 to 200_7 with authorization codes with different logic values. In some embodiments, the authorization codes in the comparison table 300 all have the same number of digits.

[0035] In some embodiments, the conversion circuit 124 of the resource controller 120 detects the status of the indicator values ​​200_0 to 200_7 in response to each work request from the control circuits 110A to 110C, and when the status of at least one of the indicator values ​​200_0 to 200_7 is that there are resources, one of the indicator values ​​200_0 to 200_7 with resource status is selected, and based on the selected indicator value 200_0 to 200_7 and the comparison table 300, the authorization code associated with the selected indicator value 200_0 to 200_7 is obtained, and the authorization code associated with the selected indicator value 200_0 to 200_7 is output to the control circuit 110A to 110C corresponding to the responded work request.

[0036] For example, taking the first control circuit 110A and the third control circuit 110C as an example, the third control circuit 110C issues a work request later than the first control circuit 110A, and the conversion circuit 124 first responds to the work request from the first control circuit 110A and detects the status of the indicator values ​​200_0 to 200_7. When the status of at least one indicator value 200_0 to 200_7 is that there is a resource, one of the indicator values ​​200_0 to 200_7 with a resource status is selected (that is, one of the available resources is selected), and the comparison table 300 is searched according to the selected indicator value 200_0 to 200_7, and the authorization code associated with the selected indicator value 200_0 to 200_7 is obtained. For example, taking the first indicator value 200_0 as an example, if Figure 4As shown, the authorization code associated with the first indicator value 200_0 is a logical value "000". Then, the conversion circuit 124 outputs the authorization code associated with the selected indicator value 200_0 to 200_7 to the first control circuit 110A. After responding to the work request from the first control circuit 110A, the conversion circuit 124 responds to the work request from the third control circuit 110C, and when there are still indicator values ​​200_0 to 200_7 in the state of having resources, selects another indicator value 200_0 to 200_7 from the indicator values ​​200_0 to 200_7 in the state of having resources (for example, the second indicator value 200_1 is that there are resources, that is, the second indicator value 200_1 is selected) and searches the comparison table 300 to obtain the authorization code associated with the selected another indicator value 200_0 to 200_7 (for example, the second indicator value 200_1) and outputs the authorization code associated with the selected another indicator value 200_0 to 200_7 to the third control circuit 110C.

[0037] In some embodiments, the conversion circuit 124 may detect the states of the pointer values ​​200_0 to 200_7 by a combination of one or more logic gates. For example, taking the case where the presence of resources and the absence of resources are represented by logic "1" and logic "0" respectively, the input end of the conversion circuit 124 inputs a byte composed of pointer values ​​200_0 to 200_7 and a logic value having the same number of bits as the byte, and the values ​​of the bits of the logic value are all 0, and the logic results are output from multiple output ends of the conversion circuit 124 through an OR gate, wherein each output end corresponds to each pointer value 200_0 to 200_7 respectively. The conversion circuit 124 detects the logic values ​​of the output ends to obtain the states of the pointer values ​​200_0 to 200_7. For example, if the logic value of the output end is 1, it means that the corresponding pointer value 200_0 to 200_7 has resources; if the logic value of the output end is 0, it means that the corresponding pointer value 200_0 to 200_7 has no resources, but the present invention is not limited to this, and other logic gates or other logic values ​​can be input to the input end of the conversion circuit 124 to detect the states of the pointer values ​​200_0 to 200_7.

[0038] In some embodiments, the comparison table 300 can be implemented by a logic circuit. For example, the logic circuit used to implement the comparison table 300 has multiple input terminals and multiple output terminals. The input terminals correspond to the index values ​​200_0 to 200_7 respectively. The input terminals have a detection function, and when the logic value is detected to be 1, a default logic result is output by the multiple output terminals. When different input terminals detect a logic value of 1, the multiple output terminals output corresponding different default logic results. However, the present invention is not limited to this, and the default logic result can be output when the logic value of the input terminal is detected to be 0.

[0039] Reference Figure 5 , Figure 5 The block diagram of the resource controller 120 of some embodiments of the present invention is shown. The resource controller 120 further includes a loop circuit 126, which is coupled to the storage circuit 122 and the conversion circuit 124. The conversion circuit 124 detects the status of the indicator values ​​200_0 to 200_7 in response to each work request from the control circuits 110A to 110C, and if the status of at least one of the indicator values ​​200_0 to 200_7 is that there is a resource, the conversion circuit 124 selects one of the indicator values ​​200_0 to 200_7 in the resource status in a loop manner through the loop circuit 126. For example, when the conversion circuit 124 of the resource controller 120 responds to a work request and confirms that the state of at least one indicator value 200_0 to 200_7 is that there are resources, the conversion circuit 124 selects, from the bytes composed of the pointer values ​​200_0 to 200_7 of the storage circuit 122 through the circulation circuit 126, an indicator value 200_0 to 200_7 that has a state of having resources and whose associated authorization code is output to the control circuits 110A to 110C a relatively low number of times compared to other indicator values ​​200_0 to 200_7 that have a state of having resources, thereby forming a circulation method so that all resources possessed by the chip 100 can be evenly distributed and used.

[0040] For example, if the indicator values ​​200_0 to 200_7 are all resource-available, and the number of times the authorization code associated with the first indicator value 200_0 is output to the control circuits 110A to 110C is relatively low compared to other indicator values ​​200_1 to 200_7 (e.g., the second indicator value 200_1 to the eighth indicator value 200_7), the conversion circuit 124 selects the first pointer value 200_0 through the loop circuit 126. In some embodiments, if the number of times the authorization code associated with each indicator value 200_0 to 200_7 with resource status is output to the control circuits 110A to 110C is the same, the conversion circuit 124 randomly selects one of the indicator values ​​200_0 to 200_7 with resource status through the loop circuit 126. For example, the conversion circuit 124 randomly selects one of the indicator values ​​200_0 to 200_7 with resource status through a random function through the loop circuit 126. In some embodiments, the loop circuit 126 can be implemented by a logic circuit composed of one or more logic gates. In some embodiments, the storage circuit 122 stores the number of times each authorization code is output to the control circuits 110A to 110C.

[0041] Reference Figure 6, a block diagram of a resource controller 120 according to an embodiment of the present invention is shown. The resource controller 120 further includes a first-in-first-out circuit 128, which is coupled to the storage circuit 122 and the conversion circuit 124. The conversion circuit 124 detects the status of the pointer values ​​200_0 to 200_7 in response to each work request from the control circuits 110A to 110C, and if the status of at least one of the pointer values ​​200_0 to 200_7 is that there is a resource, the conversion circuit 124 selects one of the pointer values ​​200_0 to 200_7 with a resource status in a first-in-first-out manner through the first-in-first-out circuit 128. For example, each pointer value 200_0 to 200_7 corresponds to an address parameter, and the address parameter corresponding to each pointer value 200_0 to 200_7 with a resource status is stored in the storage circuit 122 in a stack manner. When the conversion circuit 124 of the resource controller 120 responds to the work request and confirms that the state of at least one pointer value 200_0 to 200_7 is that there is a resource, the pointer value 200_0 to 200_7 corresponding to the address parameter that is first stored (entered) in the stack of the storage circuit 122 compared to other address parameters is selected from the storage circuit 122 through the first-in-first-out circuit 128. After the conversion circuit 124 outputs the authorization code associated with the selected pointer value 200_0 to 200_7, the address parameter corresponding to the selected pointer value 200_0 to 200_7 is cleared from the stack of the storage circuit 122. When the processing circuit 123 updates the state of the pointer value 200_0 to 200_7 according to the end signal, the processing circuit 123 controls the storage circuit 122 and stores the address parameter corresponding to the updated pointer value 200_0 to 200_7 in the stack of the storage circuit 122 through the first-in-first-out circuit 128, thereby forming a first-in-first-out method.

[0042] For example, if in the stack of the storage circuit 122, the address parameter corresponding to the first pointer value 200_0 is first stored (entered) in the stack of the storage circuit 122 compared to the address parameters corresponding to the other pointer values ​​200_1 to 200_6 (the second pointer value 200_1 to the seventh pointer value 200_6), the conversion circuit 124 selects the first pointer value 200_0 through the first-in-first-out circuit 128, and after the authorization code associated with the first pointer value 200_0 is output by the conversion circuit 124, the conversion circuit 124 clears the address parameter corresponding to the first pointer value 200_0 from the stack of the storage circuit 122 through the first-in-first-out circuit 128, and when the processing circuit 123 updates the state of the eighth pointer value 200_7 according to the end signal, the processing circuit 123 stores the address parameter corresponding to the eighth pointer value 200_7 in the stack of the storage circuit 122. In some embodiments, the first-in-first-out circuit 128 can be implemented by a logic circuit composed of one or more logic gates.

[0043] Reference Figure 1 and Figure 7 , Figure 7 A flowchart of a resource control method for multi-tasking processing according to some embodiments of the present invention is shown. In some embodiments, a resource control method for multi-tasking processing is suitable for a chip 100, the chip 100 includes a plurality of control circuits 110A to 110C and a resource controller 120, and the resource control method for multi-tasking processing includes:

[0044] Step S701: Each control circuit 110A to 110C issues a work request according to its work requirements;

[0045] Steps S705 and S707: the resource controller 120 or its conversion circuit 124 responds to each work request, the resource controller 120 or its conversion circuit 124 determines the state of the pointer value 200_0 to 200_7, wherein the resource controller 120 or its storage circuit 122 stores a plurality of pointer values ​​200_0 to 200_7, each pointer value 200_0 to 200_7 has a digit, and each pointer value is associated with one of the plurality of authorization codes;

[0046] Step S709: When at least one of the indicator values ​​200_0 to 200_7 is in the state of having resources, the resource controller 120 or its conversion circuit 124 outputs the authorization code associated with one of the indicator values ​​200_0 to 200_7 in the state of having resources to the control circuit 110A to 110C corresponding to the responded work request;

[0047] Step S711: When the status of the indicator values ​​200_0 to 200_7 are all no resources, the resource controller 120 or its conversion circuit 124 does not output any authorization code;

[0048] Step S713: The control circuits 110A to 110C that receive the authorization code execute a working procedure corresponding to the authorization code according to the authorization code;

[0049] Step S715: The corresponding control circuit 110A to 110C generates an end signal corresponding to the authorization code when the working procedure ends; and

[0050] Step S717: The resource controller 120 or the processing circuit 123 of the resource controller 120 updates the status of the indicator values ​​200_0 to 200_7 associated with the authorization code corresponding to the work program (the work program corresponding to the end signal) in the storage circuit 122 according to each end signal.

[0051] In some embodiments, the step of issuing a work request in step S701 of the multi-tasking resource control method further includes that each control circuit 110A to 110C can issue a work request at a different time point. In other embodiments, each control circuit 110A to 110C can issue a work request at the same time point. In some embodiments, the step of issuing a work request in step S701 of the multi-tasking resource control method further includes that when the control circuit 110A to 110C ends the work program, the corresponding control circuit 110A to 110C generates an end signal corresponding to the authorization code and issues another work request (i.e., a new work request corresponding to the new work program, which is different from the work request corresponding to the ended work program).

[0052] In some embodiments, the chip 100 also includes a chip circuit 130, and the step of executing the working procedure of step S713 of the multi-tasking resource management method also includes the control circuit 110A to 110C receiving the authorization code executing a working procedure corresponding to the authorization code according to the authorization code to control the operation of the chip circuit 130.

[0053] In some embodiments, the step of outputting the authorization code in step S709 of the resource control method for multi-tasking further includes, when the conversion circuit 124 outputs the authorization code, changing the status of the indicator values ​​200_0 to 200_7 associated with the currently output authorization code from having resources to having no resources by the resource controller 120 or its processing circuit 123. In some embodiments, the step of updating the status of the indicator values ​​200_0 to 200_7 in step S717 of the resource control method for multi-tasking further includes, according to each end signal, the resource controller 120 or its processing circuit 123 updating the status of the indicator values ​​200_0 to 200_7 associated with the authorization code corresponding to the work program from having no resources to having resources.

[0054] In some embodiments, the conversion circuit 124 has a comparison table 300 , which associates the indicator values ​​200_0 to 200_7 with different authorization codes respectively. The steps of determining the status of the indicator values ​​200_0 to 200_7 and outputting the authorization code in steps S705 to S711 of the resource control method for multi-task processing further include: using the resource controller 120 or its conversion circuit 124 to detect the status of the indicator values ​​200_0 to 200_7 in response to each work request; when the status of at least one of the indicator values ​​200_0 to 200_7 is that there are resources, using the resource controller 120 or its conversion circuit 124 to select one of the indicator values ​​200_0 to 200_7 with resource status; and using the resource controller 120 or its conversion circuit 124 to obtain the authorization code associated with the selected indicator value 200_0 to 200_7 according to the selected indicator value 200_0 to 200_7 and the comparison table 300, and outputting the authorization code associated with the selected indicator value 200_0 to 200_7 to the control circuit 110A to 110C corresponding to the responded work request.

[0055] In some embodiments, the step in which the conversion circuit 124 of the multi-tasking resource control method selects one of the indicator values ​​200_0 to 200_7 with resource status also includes the resource controller 120 or its conversion circuit 124 selecting one of the indicator values ​​200_0 to 200_7 with resource status in a cyclic manner through the loop circuit 126 of the resource controller 120.

[0056] In some embodiments, the step in which the conversion circuit 124 of the multi-tasking resource control method selects one of the indicator values ​​200_0 to 200_7 in the resource-available state also includes the resource controller 120 or its conversion circuit 124 selecting one of the indicator values ​​200_0 to 200_7 in the resource-available state in a first-in-first-out manner through the first-in-first-out circuit 128 of the resource controller 120.

[0057] Therefore, according to some embodiments, the storage cost is greatly reduced by using a pointer value stored in the resource controller with a single bit. Each indicator value of the resource controller only needs a single bit, and the manufacturing cost of the entire resource controller is greatly reduced. According to some embodiments, the conversion circuit is used to convert the pointer value of only a single bit into different authorization codes. When the resource controller receives a request from the control circuit, an available indicator value is selected, and the control conversion circuit is controlled to convert the available pointer value into a corresponding authorization code. The control circuit that issued the request performs the work according to the corresponding authorization code, thereby, the chip can have the ability of multi-tasking. Therefore, the resource controller can achieve the effect of resource control and storage cost reduction by having only a single-bit pointer value and a conversion circuit. Compared with the prior art, the memory size used to store available resources in the resource controller is greatly reduced.

[0058] Description of Reference Numerals

[0059] 100: Chip

[0060] 110A~110C: Control circuit

[0061] 120: Resource Controller

[0062] 122: Storage circuit

[0063] 123: Processing circuit

[0064] 124:Conversion circuit

[0065] 125: Detection circuit

[0066] 126: Loop Circuit

[0067] 128: First-in-first-out circuit

[0068] 130: Chip Circuit

[0069] 200_0~200_7: Index value

[0070] 300: Comparison table

[0071] S701~S717: Steps

Claims

1. A chip with multitasking capabilities, include: A plurality of control circuits, each of which is used to issue a work request, execute a work program corresponding to the authorization code according to an authorization code, and generate an end signal corresponding to the authorization code when the work program ends; as well as A resource controller coupled to the plurality of control circuits, the resource controller comprising: a storage circuit for storing a plurality of index values, wherein each index value has a digit of one, and each index value is associated with one of a plurality of authorization codes; a processing circuit coupled to the storage circuit, for updating a state of the indicator value associated with the authorization code corresponding to the working procedure according to each of the end signals; and A conversion circuit is coupled to the storage circuit and the processing circuit, and is used to respond to each of the work requests. When the state of at least one of the multiple indicator values ​​is that there are resources, the authorization code associated with one of the indicator values ​​in the resource state is output; when the state of the multiple indicator values ​​is that there are no resources, no authorization code is output.

2. The chip with multi-tasking processing according to claim 1, It is characterized in that The number of digits of each of the authorization codes is greater than the number of digits of each of the indicator values.

3. The chip with multi-tasking processing according to claim 1, It is characterized in that When the conversion circuit outputs the authorization code, the processing circuit changes the state of the indicator value associated with the currently output authorization code to the no resource.

4. The chip with multi-tasking processing according to claim 1, It is characterized in that The processing circuit updates the status of the indicator value associated with the authorization code corresponding to the work program to "there are resources" according to each end signal.

5. The chip with multi-tasking processing according to claim 1, It is characterized in that The conversion circuit has a comparison table, which associates the multiple indicator values ​​with different authorization codes respectively. The conversion circuit detects the status of the multiple indicator values ​​in response to each work request. When the status of at least one of the multiple indicator values ​​is that there are resources, one of the indicator values ​​in the resource status is selected, and based on the selected indicator value and the comparison table, the authorization code associated with the selected indicator value is obtained, and the authorization code associated with the selected indicator value is output to the control circuit corresponding to the responded work request.

6. The chip with multi-tasking processing according to claim 5, It is characterized in that The resource controller further includes a circulation circuit coupled to the storage circuit and the conversion circuit. The conversion circuit selects one of the plurality of indicator values ​​of the resource status in a circulation manner through the circulation circuit.

7. The chip with multi-tasking processing according to claim 5, It is characterized in that The resource controller further includes a first-in-first-out circuit coupled to the storage circuit and the conversion circuit. The conversion circuit selects one of the plurality of indicator values ​​with resource status in a first-in-first-out manner through the first-in-first-out circuit.

8. The chip with multi-tasking processing according to claim 1, It is characterized in that It also includes a chip circuit coupled to the plurality of control circuits, each of the control circuits executes the working program corresponding to the authorization code according to the authorization code to control the operation of the chip circuit.

9. The chip with multi-tasking processing according to claim 1, It is characterized in that Each of the control circuits issues the work request at a different time point.

10. The chip with multi-tasking processing according to claim 1, It is characterized in that When the working procedure is finished, each control circuit generates the end signal corresponding to the authorization code and issues another working request.

Citation Information

Patent Citations

  • Short messaging service (SMS) based data exchange method

    CN103944860A

  • MCU security protection identity authentication device and method

    CN107977568A