The present invention relates to a circuit configuration for a data processing system for executing a plurality of tasks by way of a central processing unit, and to a corresponding method for executing a plurality of tasks in a data-processing system.
In data-processing systems, for example in computer and microprocessor systems, control units, or peripheral units as well as other information-processing systems, so-called central processing units (CPUs) of a computer, or also merely simple arithmetic logic units (ALUs), are often used for the purpose of calculation and data processing. Corresponding memories such as RAM, ROM, EPROM, EEPROM, etc. are also used to store programs and data. The processor or CPU executes or carries out a program, which as a rule can be made up of various sub-programs that in turn can be dedicated to different tasks (multitasking).
The task that is to be executed by the CPU is decided on ad hoc based on a current scenario, i.e., which tasks are requesting execution at that point in time. It is possible in this context for different tasks to be given different priorities, so that upon execution of the tasks, the respective priority assigned to the tasks is complied with and the highest-priority task is correspondingly processed on a priority basis. This occurs, for example, by way of a so-called interrupt, which corresponds to a brief interruption in a program in order to carry out another higher-priority or time-critical processing operation of another task. In this context, firstly an interrupt request is made, after which an interrupt routine is implemented and the previously processed task is interrupted, and after termination of the interrupt, that task is continued at the interrupt point. This means that as a rule, a current request of a highest-priority task is processed on a priority basis, and a task already being processed is instead interrupted. The relevant interrupt authorizes the CPU to jump into a relevant program segment.
The aforesaid multitasking can also bring about so-called “time sharing,” which appears to serve multiple users simultaneously. In general, “multitasking” refers to a CPU's ability to execute multiple tasks concurrently, the various processes being activated in constant alternation at such short intervals as to create an impression of simultaneity.
Selection of the priorities to be assigned to individual tasks, and the respective execution times of high-priority tasks, can also, however, cause low-priority tasks to be executed infrequently and in some cases not at all. This is the case when aforementioned interrupt queries are arriving almost continuously, so that the execution of a low-priority task cannot be completed. This case forces a respective user to take actions that guarantee a so-called “worst case execution time” (WCET), i.e., a maximum execution time, and thus ensure a minimum CPU execution capacity for each task to be performed. It has been found, however, that such guarantees can be extremely complex, and moreover can limit the performance of the underlying system. In addition, this requires an interrupt controller with a priority controller. An interrupt controller is a functional unit that is responsible for accepting and distributing interrupts.
It would therefore be desirable to provide a capability for utilizing the available execution capacity of a central calculation unit or CPU in such a way as to guarantee, in simple fashion, that each task to be executed, of whatever priority, is executed within a specific time.
An example circuit configuration is provided, which is implemented in a data-processing architecture, and is configured to correspondingly apportion, to the processing unit (CPU or ALU) available to the system, the tasks that are to be processed. Suitable embodiments of the circuit configuration presented according to the present invention, and of the example method presented according to the present invention, are described below.
In one example embodiment, a circuit configuration for a data-processing system for executing a plurality of tasks by way of a central processing unit having a processing capacity assigned to the processing unit is made available, the circuit configuration exerting control in such a way that the processing capacity of the processing unit is distributed among the respective tasks, uniformly and independently of a demand of the respective tasks, until they are respectively executed, and the processing unit is assigned to the respective tasks for processing in time-offset fashion. The circuit configuration proposed according to the present invention thus distributes the processing or calculation capacity made available by a central processing unit uniformly among all tasks requiring processing. No prioritization of the tasks to be processed is therefore required, and the aforementioned worst case execution time (WCET) is moreover thereby also automatically accurately determined. In addition, the processing unit is allocated to each task independently of a separate request on the part of the task to be processed. This reduces the calculation time for all tasks to be processed to 1/n (for n tasks), although this does not signify a limitation if that calculation time is sufficient for each of the tasks to be processed.
Utilization of the circuit configuration proposed according to the present invention, and execution of the method proposed according to the present invention, moreover make it possible to predict accurately when a processing operation of the respective tasks is complete.
The method and the circuit configuration proposed according to the present invention can be implemented in a so-called multi-channel sequencer (MCS) of a generic timer module (GTM).
The multi-channel sequencer services multiple channels. According to the present invention, provision can be made that the circuit configuration is configured to allocate to each of the tasks to be processed a respective channel having its own registers, and to select the respective registers and correspondingly connect them to the processing unit in accordance with the assignment of the respective task to the processing unit.
Provision is further made, in accordance with a further embodiment of the circuit configuration proposed according to the present invention, for the circuit configuration to be configured to assign the processing unit respectively to each of the tasks for a constant time unit that is identical for all tasks. If a processing operation requires multiple time units, for example when copying data from RAM into a register or vice versa, the processing can then if applicable be subdivided into sub-tasks each with one time unit, the sub-tasks being executed sequentially, but interrupted by the respective other tasks, for one time unit each. This means that in the case in which multiple time units are required for processing of the task, an assignment of the processing unit to the task occurs repeatedly and preferably periodically, with a period corresponding to one processing cycle of the processing unit.
Provision can be made in this context that the time duration corresponds to one timing cycle of a clock cycle of the processing unit, and the timing cycle is determined by the length of the clock cycle and the number of channels or tasks to be performed.
In a further embodiment of the circuit configuration proposed according to the present invention, provision can be made that the circuit configuration is configured to perform an execution of instructions of the respective registers of the respective channels of the tasks in a pipeline having multiple stages, the respective registers being switched over, at the time of execution, into correspondingly clocked pipeline registers of the pipeline, and the pipeline registers being processed in a time segment in parallel but for different channels in each case.
Provision can be made in this context that, for example, an instruction decoding operation and a memory access for a first task occur respectively in time segments in which the processing unit is assigned to a second task. This would correspond to two-stage pipelining, or to a two-stage pipeline architecture.
The present invention furthermore relates to a corresponding method for executing multiple tasks in a data processing system using a central processing unit having a processing capacity assigned to the processing unit. In this context, the processing capacity of the processing unit is distributed among the respective tasks uniformly and independently of a demand of the respective tasks. In the individual time units resulting therefrom, the corresponding tasks are processed in time-offset fashion until they are respectively executed.
It is possible in this case that a respective channel having registers is allocated to each of the tasks, and that the respective registers are selected and correspondingly connected to the processing unit in accordance with the assignment of the respective tasks to the central processing unit.
It is further possible for an execution of instructions of the respective registers of the channels allocated to the respective tasks to be performed in a pipeline having multiple pipeline stages, the respective registers being switched over, at the time of execution, into correspondingly clocked pipeline registers of the pipeline, and the pipeline stages being processed in a time segment in parallel but for different channels in each case.
Further advantages and example embodiments of the present invention are evident from the description and from the figures.
It is understood that the features described above and explained below are usable not only in the particular combination indicated, but also in other combinations or in isolation, without departing from the scope of the present invention.
The present invention is depicted schematically in the figures on the basis of example embodiments, and is described in detail with reference to the figures, in which a detailed description of structure and function will be given.
The example method according to the present invention can be implemented, for example, in this kind of multi-channel sequencer (MCS) of a generic timer module (TGM). The MCS services multiple channels T, for example eight or 16, corresponding to the tasks to be processed. This means that one channel is allocated to each task to be processed. MCS 100 possesses a central processing unit 10 and a memory (RAM) 20. In the case depicted here, for example, T channels are serviced by the MCS 100, each channel possessing its own microprogram that is housed at different locations in the memory. To execute that program, each channel possesses its own instruction register (IR) 35, its own instruction counter (PC) 25, its own status register (STA) 45, and its own so-called general purpose register (GPR) 55 having respectively N registers that, in the present depiction, are labeled 0 to N−1. This means that in the MCS architecture 100 depicted here, T instruction registers (T*IR) 35, T instruction counters (T*PC) 25, and T status registers (STA) 45 are present, identified in each case by an indicated superimposition of the corresponding symbols. Each channel furthermore possesses its own interface 30 through which data in the respective GPRs 55 can be synchronously updated, i.e., without waiting for processing of a corresponding channel, and data can be outputted. Interface 30 can be, for example, an advanced routing unit interface (ARU interface). The plurality of interfaces 30, corresponding to the number of channels to be processed, is once again depicted in
All the channels serviced by MCS 100 use the same arithmetic logic unit (ALU) 10, the same instruction decoder 40, the same instruction predecoder 50, the same RAM 20, and the same address decoder 15 for RAM 20, as depicted in
The execution of instructions can be performed, for example, as depicted in
Stage 0 RAM access decoding
Stage 1 RAM access
Stage 2 Instruction pre-decoding
Stage 3 Instruction execution
In stage 0, addresses and control signals are first created for the RAM access pending in the next pipeline stage. A RAM access can be the reading of a datum or of an instruction, or the writing of a datum. In the case of reading of an instruction, the address is created from the relevant instruction counter (PC). This pipeline stage is depicted in
In stage 1, access to working memory (RAM) then takes place, the corresponding instruction being loaded from working memory. This pipeline stage is depicted in
In stage 2 an instruction pre-decoding then takes place. This pipeline stage is depicted in
In stage 3, lastly, instruction execution occurs, this being performed for all tasks by one and the same processing unit, namely ALU 10 that is depicted here. This pipeline stage is depicted in
All the pipeline stages 0, 1, 2, 3 are processed in parallel, but in each case for a different channel or a task allocated to the corresponding channel.
This can be described in detail as follows: If channel C0, here designated 204, for example begins first with decoding of the RAM address, at the next timing cycle channel C0 will execute the RAM access, while channel C1, here designated 206, is busy decoding the RAM address. The corresponding “own” registers T*PC and T*IR, depicted in
For the further pipeline stages 1, 2, and 3, a processing operation of the respective channels begins in each case with an offset of one timing cycle.
Provision is made here, for the first pipeline stage (stage 1), that during processing cycle 202 with the value “t” for the counter, the zero-th channel C0 (t) 204, first channel C1 (t) 206, second channel C2 (t) 208, etc. are executed. At the end of the processing cycle, a T−2-th channel CT-2 (t) 216 and T−1-th channel CT-1 (t) 218 are processed. In the next processing cycle with the value “t+1” for the counter, in sequence, firstly a time slot 250 of CPU 60 is made available and the zero-th channel C0 (t) 220, first channel C1 (t) 222, etc. are executed.
For the second pipeline stage (stage 2), what likewise occurs during the first processing cycle 202 (offset by one timing cycle) is first an execution of the zero-th channel C0 (t) 204 and of first channel C1 (t) 206. These are later followed by a T−3-th channel CT-3 (t) 214 and the T−2-th channel CT-2 (t) 216. In the next processing cycle with the value “t+1” for the counter, to begin with firstly the T−1-th channel CT-1 (t) 218 is executed, then a time slot 250 for the CPU is made available, and then the zero-th channel C0 (t+1) 220, etc. is executed.
For the third pipeline stage (stage 3) during the first processing cycle 202 the zero-th channel C0 (t) 204 is processed. At the end of the first processing cycle 202 with a value “t”, execution of a T−4-th channel CT-4 (t) 212 and of T−3-th channel CT-3 (t) 214 occurs. In the next processing cycle with a value “t+1” for the counter, firstly execution of the T−2-th channel Ct-2 (t) 216 and of the T−1-th channel CT-1 (t) 218 occurs.
A special register TRG 75 depicted in
Instruction predecoder 50, depicted in
The example circuit configuration according to the present invention has a substantial effect on the latency time of an instruction execution operation.
Number | Date | Country | Kind |
---|---|---|---|
10 2010 003 512 | Mar 2010 | DE | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP2011/054019 | 3/17/2011 | WO | 00 | 12/26/2012 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2011/120814 | 10/6/2011 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
20030046517 | Lauterbach | Mar 2003 | A1 |
20130081041 | Boehl et al. | Mar 2013 | A1 |
Number | Date | Country |
---|---|---|
0 947 926 | Oct 1999 | EP |
Entry |
---|
Translation of International Preliminary Report on Patentability, PCT International Application No. PCT/EP2011/054019, Oct. 2, 2012. |
International Search Report, PCT International Application No. PCT/EP2011/054019, dated Jul. 7, 2011. |
Tanenbaum, A.S, “Modern Operating Systems: Processes and Threads,” Modern Operating Systems, pp. 71-73, 81, pp. 146-147 (2001). |
Number | Date | Country | |
---|---|---|---|
20130104141 A1 | Apr 2013 | US |