The invention relates to a parallel multithread processor (PMT) with split contexts, which contains two or more parallel-connected standard processor root units (SPRE) for instruction execution of program instructions for different threads. The multithread processor has two or more context memories, which each temporarily store a current processor state of a thread which is currently being executed, and a thread monitoring unit, by means of which each standard processor root unit can be connected to each context memory.
Embedded processors and their architectures are measured by their computation power, their power consumption, their throughput, their costs and their real-time capability. The principle of pipelining is used in order to increase the throughput and the processor speed. The basic idea of pipelining is to subdivide any desired instructions or commands into processing phases with the same time duration. A pipeline with different processing elements is possible when the processing of an instruction can itself be split into a number of phases with disjunct process steps which can be carried out successively (as described in T. Bayerlein, O. Hagenbruch: “Taschenbuch Mikroprozessortechnik” [Microprocessor technology manual], 2nd Edition Fachbuchverlag Leipzig from the Karl Hanser Verlag Munich-Vienna, ISBN 3-446-21686-3). The original two instruction execution phases of the von Neumann model, specifically instruction fetching and instruction processing, are in this case further subdivided, since this subdivision into two phases has been found to be too coarse for pipelining. The pipeline variant which is essentially used for RISC processors contains four instruction processing phases, specifically instruction fetching, instruction coding/operand fetching (instruction decoding/operand fetch), instruction execution and write-back.
In the first phase, the instruction fetching phase, the instructions are loaded from the memory into a pipeline register for the processor.
The second instruction phase, which is an instruction decoding/operand fetching phase, comprises two data-independent process steps, specifically instruction decoding and fetching operands. In the instruction decoding step, the data coded in the instruction code is decoded in a first data processing step. In this case, the operation rule (opcode), the addresses of the operands to be loaded, the type of addressing and further additional signals which significantly influence the subsequent instruction execution phases are determined in a known manner. In the operand fetching processing step, all of the addressed operands are loaded from the registers for the processor.
In the third instruction phase, the instruction execution phase, the computation operations are executed in accordance with the decoding commands or instructions. The operation itself, as well as the circuit paths and processor registers used in the process, depend essentially on the nature of the instruction to be processed.
The results of the operations, including so-called additional signals, status flags or flags, are stored in the appropriate registers or external memories in a known manner in the fourth and final phase, the write-back phase. This phase completes the arithmetic processing of a machine command or machine instruction.
A conventional computer architecture for a von Neumann machine has a standard processor unit SPE which processes instructions or program commands for a thread T (monitoring thread).
A standard processor unit SPE essentially has an instruction fetch unit BHE, an instruction decoding/operand fetch unit BD/OHE, an instruction execution unit BAE and a write-back unit ZSE, as well as a pipeline register, a processor monitoring unit PKE, register files K, a program counting register PZR and a data bus DB.
A thread T denotes a monitoring thread for a code, a source code or a program, with data relationships existing within a thread T and with weak data relationships existing between different threads T (as described in Chapter 3 of T. Bayerlein, O. Hagenbruch: “Taschenbuch Mikroprozessortechnik” [Microprocessor technology manual], 2nd Edition Fachbuchverlag Leipzig from the Karl Hanser Verlag Munich-Vienna, ISBN 3-446-21686-3).
One characteristic of a process is that a process always accesses its own memory area. A process comprises two or more threads. Accordingly, a thread is a program part of a process step. A context of a thread is the processor state of a processor which is processing this thread or instructions for this thread. The context of a thread is accordingly defined as a temporary processor state during the processing of the thread by this processor. The context is helped by the hardware of the processor, specifically the program counting register PZR or program counter PC, the register file or context memory K, and the status register SR associated with it.
The instruction decoding/operand fetch unit BD/OHE for the standard processor unit SPE decodes a j-th instruction Ikj for a thread T-k in each clock cycle ti. Based on the example shown in
Since it has not been possible for the instruction decoding/operand fetch unit BD/OHE to process any instructions for a certain number of clock cycles owing to the latency time caused by the instruction I12, the instruction decoding/operand fetch unit does not decode the instruction IA3 until the clock cycle tx.
The standard processor unit SPE according to the prior art processes commands and instructions for a specific thread T-A at each time (here: t1, t2, tx). This simple computer architecture results in a problem when the thread T-A to be processed is temporarily blocked. There may be various reasons for temporary blocking of a thread T, for example as a result of a latency time when accessing an external memory or an internal register.
Temporary blocking of the standard processor unit SPE occurs when the processor pipeline or the instruction decoder cannot process any further program command or any further instruction for a thread T, or cannot decode them.
If a thread T which has been processed by the standard processor unit SPE is temporarily blocked, then the standard processor unit SPE is also blocked for this time. Blocking considerably reduces the performance and throughput of a processor. The probability of a thread T being blocked by internal blocking (for example as a result of a latency time for a register access) or by external blocking (for example in the event of a cache miss), is referred to as the blocking probability pT for that thread. If it is assumed that the blocking probability for a thread T is pT, then the blocking probability pVN for the von Neumann machine illustrated schematically in
A multithread processor MT is a processor which uses hardware to process a number of contexts by providing a program counting register PZR, a register bank RB and a status register SR for each of this number of contexts.
a illustrates, schematically, a conventional multithread processor MT, in which a standard processor unit SPE is processing a number of threads T or monitoring threads, light-weight tasks, separate program codes, and common data areas. In
If the pipeline for the standard processor unit SPE becomes blocked when carrying out an instruction or a program command for a thread T, signals which can be used to control the thread switching are generated within the SPE.
b shows a schematic block diagram of a conventional multithread processor MT according to the prior art with a connection to an instruction memory BS and a connection to a data bus DB. A conventional multithread processor MT according to the prior art essentially has a standard processor unit SPE, N context memories K for N threads T, a thread monitoring unit TKE and a processor monitoring unit PKE. The said components of the multithread processor MT are essentially connected to one another via data lines DL, address lines AL and multiplexers M′, M″. Each of the N context memories K has a program counting register PZR, a register bank RB and a status register SR. An N×1 multiplexer M′ is used to apply data from the N program counting registers PZR for the N context memories K to an address line AL, which is connected to the instruction memory BS. Based on these addresses, the instructions I for the respective threads T which are stored in the instruction memory BS are fetched from the instruction memory BS, and are made available to the standard processor unit SPE. The standard processor unit SPE has an instruction decoding/operand fetch unit BD/OHE, an instruction execution unit BAE and a write-back unit ZSE, corresponding to the phases of the pipeline method.
The instructions I, which result from the instruction fetches, for the N threads T are decoded in the instruction decoding/operand fetch unit BD/OHE, and the addressed operands are read from the register bank RB or from the status register SR of the appropriate context memory K for the associated thread T via an N×1 multiplexer M′. The instruction execution unit BAE then executes the decoded instruction I for the thread T with its associated operands, and passes the result of the operation as well as potential flag data characters and additional characters to the write-back unit ZSE. In the case of a memory instruction, the write-back unit ZSE if necessary writes the received data to the data bus DB or, via a 1×N multiplexer, to the respective context memory K. In this case, the results of the arithmetic/logic operations are stored in the associated register bank RB, and the flags and additional characters are stored in the associated status register SR.
The flag or additional characters in the status register SR are provided via an N×1 multiplexer M′ to the processor monitoring unit PKE, which uses internal control signals ISS to control the instruction decoding/operand fetch unit BD/OHE, the instruction execution unit BAE and the write-back unit ZSE.
The thread monitoring unit TKE controls the processes of writing to and reading the context memory K via the respective multiplexers M′, M″ by means of multiplexer control signals <t>. In a multiplexer control signal <t>, t denotes a thread number for a thread T. The thread monitoring unit TKE uses internal event control signals ESS′ and external control signals ESS″ as an input, with the internal event control signals ESS′ being produced by the standard processor unit SPE, and the external event control signals ESS″ being produced by external devices, such as external memories or the program code.
a shows one known development of the prior art, with a number of multithread processors MT in this case being used in parallel. In this case, a dedicated set of context memories K is available to each standard processor SPE, with the context memories K being hard-wired to the respective standard processor unit SPE.
a shows a parallel multithread processor MT, having two standard processor units SPE-A, SPE-B and four context memories for four disjunct threads T-A, T-B, T-C and T-D. The threads T-A, T-B and their hardware implementations and context memories K-A, K-B are permanently connected or hard-wired to the standard processor unit SPE-A. In a corresponding way, the threads T-C, T-D and their context memories K-C, K-D, respectively, are permanently connected or hard-wired to the standard processor unit SPE-B.
b shows two instruction decoding/operand fetch units BD/OHE for two parallel standard processor units SPE-A, SPE-B, with the blocking probability of the overall system being the same as the blocking probability of a multithread processor MT as shown in
An object of at least some embodiments of the present invention is thus to provide a multithread processor which has a reduced blocking probability and a relatively high throughput or performance.
The idea on which the present invention is based is essentially for the N threads and their corresponding N context memories not to be subdivided into sets as in the case of the conventional multithread processors according to the prior art, with each of these threads being directly connected or wired to an associated standard processor root unit, but for the context memories to be provided such that each standard processor root unit (SPRE) has access to each context memory.
According to the invention, the instructions for the N threads or the N context memories are distributed dynamically between the M standard root processor units.
In this case, the N context memories and M standard processor root units are connected by means of multiplexers. When the respective instruction or the respective program command is executed in each pipeline stage of each respective processor or each respective standard processor root unit, the corresponding context is selected via the multiplexers, with each instruction or each program command requiring its corresponding context within the standard processor root unit. Control signals <t,p> are used for selection of the appropriate context, with t denoting the thread number and p denoting the standard processor root number or number of the standard processor root unit. The control signals <t,p> control or switch the multiplexers.
According to the invention, a multithread processor is provided for this purpose, which has M parallel-connected standard processor root units, which provide instruction execution of program instructions for different threads, in which case the standard processor root units can be connected to two or more (N) context memories, which each temporarily store a current state of a thread. The connections are controlled by means of a thread monitoring unit, by means of which each standard processor root unit can be connected to each context memory.
The advantages of the arrangement according to the invention are, in particular, that the association of N threads and N context memories with M standard processor root units results in a minimal blocking probability and a high throughput.
The use of standard processor root unit means that the entire system, essentially the total number of standard processor root units and the total number of threads, is scaleable, and individual components can also be replaced easily.
Since the standard processor root units comply with the pipeline principle according to von Neumann, this furthermore results in a deterministic instruction execution time, which provides the arrangement according to the invention with a real-time capability.
Advantageous developments of the parallel multithread processor (PMT) with split contexts can be found in the dependent claims.
According to one preferred development, each standard processor root unit has an instruction decoder.
According to one preferred development, each standard processor root unit has an operand fetch unit.
The instruction decoder decodes the program instruction, and potential operands are fetched by means of the operand fetch unit from the context memory selected by means of the control signals <t,p>, for further processing.
An instruction execution unit carries out the arithmetic/logic function to be executed, using the fetched operands.
A write-back unit writes the results of the arithmetic/logic operations and, optionally, additional characters or flags by means of multiplexers and appropriate control signals <t,p> to the context memories and to the data memory, respectively.
According to a further preferred development of the invention, each standard processor root unit has an associated processor monitoring unit.
The processor monitoring unit controls each processing phase or pipeline stage for each standard processor root unit individually, by means of internal control signals for each pipeline stage.
According to a further preferred development of the invention, each context memory has a program counting register, a register bank and a status register.
The program counting register is used for temporary storage of a program counter, which is used to control the fetching of the instructions for the respective threads from the instruction memory.
The register bank is used for temporary storage of operands, with operands on the one hand being written to the operand fetch unit and, downstream from the subsequent instruction execution unit, being written once again by the write-back unit to the registers, with potentially new data contents.
The status register is used for temporary storage of additional characters or status flags, with the additional characters or status flags being available as an input signal not only for further arithmetic/logic operations but also for the processor monitoring unit.
According to a further preferred development of the invention, the number M of standard processor root units is less than or equal to the number N of context memories. This results in sufficient instructions from different threads for the M standard processors being available at all times in the instruction buffer stores, so that there are no latency times, or only minimal latency times.
According to a further preferred development of the invention, the arrangement according to the invention has at least one instruction buffer store which can be split into N instruction buffer stores which can be addressed by the thread monitoring unit, in which case the N instruction buffer stores can be connected to each standard processor root unit.
The N instruction buffer stores mean that instructions for the N threads are available to the M standard processor root units at all times, thus minimizing the blocking probability, owing to reduced waiting times.
According to a further preferred development of the invention, the instruction buffer stores can be connected to an instruction memory in order to allow the thread monitoring unit to read program instructions, with the program instructions which are read from the instruction memory being addressed by the program counting registers for the context memories.
According to a further preferred development of the invention, up to M instructions are read at the same time from the instruction buffer store (6).
The addressing of the program instructions which are read, by the program counting registers for the context memories and their control by the thread monitoring unit by means of the control signals <t,p> control the filling of the instruction buffer stores by the thread monitoring unit on a clock-cycle sensitive basis, that is to say the control process is carried out in such a way that each pipeline stage for each standard processor root unit is connected by means of the appropriate context in each clock cycle. The central control by the thread monitoring unit allows optimized filling of the instruction buffer stores, and thus allows the blocking probabilities to minimized.
According to a further preferred development of the invention, the data which is calculated by the standard process root units is transferred via a data bus to a data memory. The calculated data can be stored externally by means of this external interface via a data bus to a data memory.
According to a further preferred development of the invention, each standard processor root unit processes the program instructions supplied from the thread monitoring unit, sequentially by means of a pipeline method. In consequence, two or more instructions are held virtually at the same time in the instruction processing phase of a processor, with each instruction, connected to the appropriate context, being located exclusively in one pipeline stage and thus in an exclusively associated part of the process. The provision of the pipeline method results in an increase in the throughput of a standard processor root unit.
According to a further preferred development of the invention, each standard processor root unit processes a program instruction supplied to it, provided that this is not a data access instruction, within a predetermined number of clock cycles.
According to a further preferred development of the invention, the number of instruction buffer stores which are provided is equal to the number of context memories, so that a dedicated instruction buffer store is available for each thread and context memory, with the instruction buffer store preferably temporarily storing program instructions, and passing them on, on the basis of the FIFO organization (first in/first out).
This has the advantage that the instructions for each thread are in an organized form upstream of the standard processor root units. This minimizes the switching time for a thread change for a standard processor root unit.
According to a further preferred development of the invention, the thread monitoring unit receives event control signals on the input side, temporarily stores internal states, and generates multiplexer control signals on the output side.
According to a further preferred development of the invention, the event control signals which are received by the thread monitoring unit comprise both internal event control signals and external event control signals.
According to a further preferred development of the invention, the internal event control signals are produced by the standard processor root units.
The thread monitoring unit thus receives data relating to the operating mode in which the individual standard processor root units are operating, so that the thread monitoring unit can react appropriately to the various operating modes of the individual standard processor root units. The thread monitoring unit uses this data to generate the control signals <t,p>, which are sent to the appropriate multiplexers, in order to control the multiplexers, on a clock-cycle sensitive basis.
According to a further preferred development of the invention, the external event control signals are produced by external devices, such as an interrupt, or by external memories.
According to a further preferred development of the invention, the standard processor root units may comprise a part of a digital signal processor, of a protocol processor or of a universal processor (general purpose processor).
According to a further preferred development of the invention, the instruction execution unit for the standard processor root unit may be an arithmetic/logic unit (ALU) or an address generator unit (AGU).
According to a further preferred development of the invention, an instruction fetch unit is formed by a multiplexer, N data lines, N instruction buffer stores, N data lines and a multiplexer.
According to a further preferred development of the invention, the thread monitoring unit drives switching networks as a function of the event control signals. In this case, the thread monitoring unit supports the following functionalities:
The thread monitoring unit decides which N threads are selected in order that instructions for these N threads are fetched by the instruction fetch unit from the instruction memory. If N instructions can be fetched by two or more threads at the same time by the instruction fetch unit from the instruction memory, the thread monitoring unit provides the appropriate N thread numbers t.
The thread monitoring unit dynamically decides which of the M standard processor root units will be allocated to the respective thread, in order that the program instruction or the instruction for a thread is fetched by the instruction fetch unit from the instruction memory, and is supplied to the pipeline for the selected standard processor root unit. If M program instructions are passed on at the same time from the instruction buffer stores to the respective pipeline, the thread monitoring unit provides the appropriate standard processor root number for the corresponding standard processor root unit.
An instruction for a thread T-k which has been fetched by the instruction fetch unit is temporarily stored in the appropriate instruction buffer store which is provided for the thread T-k. In this case, that multiplexer which connects the appropriate program instruction from the instruction fetch unit to the corresponding instruction buffer store for the thread T-k is controlled by the multiplexer control signals <t,p> generated by the thread monitoring unit.
In the pipeline stage for the instruction decoding/operand fetch unit BD/OHE, the appropriate delayed control signal <t,p> controls a multiplexer, which connects the appropriate context to the corresponding pipeline stage, such that the register bank is connected to the appropriate standard processor root unit. Downstream of the instruction execution unit and the write-back unit, the control signal <t,p> which has once again been delayed controls a multiplexer, which connects each standard processor root unit with the appropriate context memory, such that it is possible to write to the appropriate context memories and register banks.
In the event of a program instruction for a thread <t> which initiates blocking, an exception event signal <e> is generated by the appropriate standard processor root unit, with the exception event signal <e> being part of the internal event control signals for each standard processor root unit.
When the respective exception event signal <e> occurs, the thread number for the blocked thread <t> is temporarily stored in a thread number buffer store within the thread monitoring unit, with the waiting thread T then waiting for a thread reactivation signal <x>.
A thread reactivation signal <x> is part of the external event control signals. The thread number buffer store for the waiting threads T can store all of the thread numbers for the N threads <t=[t1, . . . ,tn]> at the same time, if all M processors are blocked.
When the corresponding exception event signal <e> occurs, the standard processor root unit number <p> at which the blocked thread has been processed is stored in a standard processor root number buffer store, which is provided within the thread monitoring unit. The standard processor root number <p> can be bridged, that is to say it can be passed on without being temporarily stored, in order to reduce the thread switching overhead.
When an exception event signal <e> occurs, a switching trigger signal is generated within the thread monitoring unit by the waiting thread T in order to indicate to the thread monitoring unit whether there is a free processor and a ready thread T. The next instructions or the next program instruction are or is driven by the thread monitoring unit.
When a thread reactivation signal <x> occurs, a thread number <t> is transferred from the waiting register within the thread monitoring unit to a ready register, which is provided within the thread monitoring unit. The thread number <t> can be bridged, that is to say it can be passed on without being temporarily stored, in order to reduce the thread switching overhead.
According to a further preferred development of the invention, the thread monitoring unit has at least one thread number buffer store, which stores a queue of threads, with at least the thread number and the corresponding thread state (ready, waiting) being provided for one thread.
According to a further preferred development of the invention, the thread monitoring unit has at least one standard processor root number buffer store. This temporarily stores the standard processor root number, which references a standard processor root unit which is available for processing program instructions and is not processing any program instructions in the current clock cycle.
According to a further preferred development of the invention, the thread number buffer store and the standard processor root number buffer store are each in the form of a FIFO memory (first in/first out).
According to a further preferred development of the invention, a thread number, which references a thread T, is temporarily stored in the thread number buffer store for the thread monitoring unit as a function of the event control signals, if the thread T is not being processed by a standard processor root unit. According to a further preferred development of the invention, at most N thread numbers are fetched by means of the switching network from the thread number buffer store as a function of the event control signals, in order to produce a fetched thread number and in order to process program instructions for that thread T.
According to a further preferred development of the invention, a standard processor root number which references a specific standard processor root unit is temporarily stored in the standard processor root number buffer store as a function of the event control signals, if no program instructions for a thread T are being processed by the specific standard processor root unit.
According to a further preferred development of the invention, at most M standard processor root numbers are fetched by means of the switching network from the standard processor root number buffer store as a function of the event control signals in order to produce at most M fetched standard processor root numbers, so that program instructions are processed by the standard processor root units which have been referenced by means of the standard processor root numbers.
According to a further preferred development of the invention, the thread monitoring unit generates a multiplexer control signal by means of a thread number which has been fetched from the thread number buffer store and by means of a standard processor root number which has been fetched from the standard processor root number buffer store, such that the program instructions for the thread T which is referenced by means of the fetched thread number is processed by the standard processor root unit which is referenced by means of the fetched standard processor root number.
According to a further preferred development of the invention, the multiplexer control signal <t,p> for the respective correct clock cycle controls the N×M and the M×N multiplexers in each case when the address of the program instruction or the program instruction for the thread T which is referenced by means of the thread number and is intended to be processed by the standard processor root unit referenced by means of the standard processor root number is located at the appropriate point in the parallel multithread processor.
Exemplary embodiments of the invention will be explained in more detail in the following description and are illustrated in the drawings. Identical reference symbols in the figures denote identical or functionally identical elements.
In the figures:
a shows a flowchart of a conventional multithread processor according to the prior art,
b shows a block diagram of a conventional multithread processor according to the prior art,
a shows a schematic illustration of a parallel multithread processor according to the prior art,
b shows a flowchart of a conventional parallel multithread processor according to the prior art,
a shows a schematic illustration of a parallel multithread processor according to the invention, with a split context according to one preferred embodiment of the invention,
b shows a flow chart of the thread processing by the parallel multithread processor according to the invention with a split context,
c shows an extension to a parallel multithread processor with a split context according to one preferred embodiment of the invention as shown in
d shows a mechanism for fully-networked thread distribution for a parallel multithread processor according to the invention with a split context,
e shows a block diagram of a parallel multithread processor with a split context according to one preferred embodiment of the invention, and
f shows a schematic block diagram of the thread monitoring unit according to the invention for the parallel multithread processor according to the invention with a split context.
Identical reference symbols in the figures denote identical or functionally identical elements.
Although the present invention is described in the following text with reference to processors or microprocessors and their architectures, it is not restricted to these, but may be used in many ways.
a shows, schematically, an arrangement according to the invention of a parallel multithread processor 1. A parallel multithread processor 1 comprises, inter alia, a number M of standard processor root units 2 and a number N of threads T, with an associated context memory 3 being provided, in the form of hardware, for each thread T. The N context memories 3 are connected to the M standard processor root units 2 via M×N or N×M multiplexers 11, 10 (not shown). According to the invention there is no fixed association between the N context memories 3 or the N threads T, and the M standard processor root units 2. The lack of the fixed association between the context memories 3 and the standard processor root units 2 increases the flexibility of the computer architecture such that the total number of possible tuples <t,p> is increased considerably, with a thread t being processed, controlled by the multiplexer control signal <t>, at the time t by a standard processor root unit 2, controlled by the multiplexer control signal <p>. The increased flexibility in the association of the thread T with a standard processor root unit 2 results in the overall system having a reduced blocking probability, a shorter latency time for a memory access and, in consequence, a higher throughput and performance.
According to
or the thread T-4 at the times t1, t2, t3, with one standard processor root unit 2-i in each case processing a different thread T-j at a time t1, t2 and t3. According to this example, the overall system is blocked when more than two threads are temporarily blocked at a defined time t.
p2 is the blocking probability for the given example (two standard processor root units processing four threads) according to the arrangement of a parallel multithread processor MT without split context (
The arrangement according to the invention, that is to say a parallel multithread processor 1 with a split context, has a lower blocking probability than the arrangement according to the prior art. The lower blocking probability increases the throughput of the overall system in comparison to the arrangement according to the prior art, and latency times are reduced.
c shows an extension to
d shows a mechanism for fully-networked thread distribution for a parallel multithread processor according to the invention with a split context, in which a parallel multithread processor 1 according to the invention with split contexts processes instructions for different threads T even in the event of potential blocking, using the example from
d shows how the two instruction decoding/operand fetch units 2′ for the two standard processor root units 2-1, 2-2 process instructions for the threads T-1, T-2, T-3 and T-4 in a chronological sequence. Before the time t1, the instruction decoding/operand fetch unit 2′-1 for the standard processor root unit 2-1 is processing instructions for the thread T-1. In the illustrated example, the instruction I14 for the thread T-1 is temporarily blocked at the time t1. Since the standard processor root unit 2-2 is processing the instruction I24 for the thread T-2 at the time t1, the threads T-3 and T-4 are also available to the standard processor root unit 2-1 at the time t1. The standard processor root unit 2-1 is assigned the instruction I31 for the thread 3 by the thread monitoring unit 4. The instruction decoding/operand fetch unit 2′-1 for the standard processor root unit 2-1 can thus process the instruction I31 for the thread T-3 at the time t1, and is therefore not blocked. From then on, the instruction decoding/operand fetch unit 2′-1 for the standard processor root unit 2-1 processes instructions for the thread T-3 until the thread T-3 is temporarily blocked. At the time t2, an instruction for the thread T-2 is temporarily blocked. This blocked instruction I26, like the previously blocked instruction I14, is written back to the appropriate context memory K, and is substituted by the instruction I41 for the thread T-4. The standard processor root unit 2-2 is thus not blocked at the time t2, either.
e shows a block diagram of one particularly preferred embodiment of a parallel multithread processor 1 according to the invention with split contexts. The multithread processor 1 has connections for an instruction memory 7 and for a data bus 8. Furthermore, the multithread processor 1 contains M standard processor root units 2-1, . . . ,2-M, N context memories 3-1, . . . ,3-N, a thread monitoring unit 4, M processor monitoring units 5-1, . . . ,5-M, N instruction buffer stores 6-1, . . . ,6-N, N×M multiplexers 10 and M×N multiplexers 11.
Each standard processor root unit 2 has an instruction decoding/operand fetch unit 2′, an instruction execution unit 2″ and a write-back unit 2′″, with the instruction decoding/operand fetch unit 2′, the instruction execution unit 2″ and the write-back unit 2′″ being arranged downstream from a pipeline method, in order to process instructions.
The instruction fetch unit (17) according to the invention has a multiplexer (11), N data lines (14-4), N instruction buffer stores (6), N data lines (14-5) and a multiplexer (10).
An associated process monitoring unit 5-i is provided for each standard processor root unit 2-i. A processor monitoring unit 5-i controls its associated standard processor root unit 2-i by means of internal control signals 12-i. A first internal control signal 12′-i for the instruction decoding/operand fetch unit in this case controls the instruction decoding/operand fetch unit 2′-i. A second internal control signal 12″-i for the instruction execution unit controls the instruction execution unit 2″-i, and a third internal control signal 12′″-i for the write-back unit controls the write-back unit 2′″-i.
Each context memory 3-j has a program counting register 3′-j, a register bank 3″-j and a status register 3′″-j. The program counting register 3′-j temporarily stores a program counter for a thread T-j. The contents of the N program counting registers 3′ for N threads T are applied to an M-channel address bus 16 via an N×M multiplexer 10.
The M instructions, which are referenced by the data contents of the program counting registers 3′, for threads T are read via an M-channel data bus 13 from the instruction memory 7 by the instruction unit 17. The data contents which are read are transferred via an M×N multiplexer 11 to N instruction buffer stores 6. An associated instruction buffer store 6 is provided for each of the N threads T. M commands are applied to M data lines 14-1 via an N×M multiplexer 10 from the N instruction buffer stores 6. The M instructions or commands which are on the data lines 14-1 are distributed between the M standard processor root units 2.
The instruction decoding/operand fetch unit 2′-i for the standard processor root units 2-i decodes, for example, an instruction for the thread T-j. The decoded instruction for the thread T-j includes, inter alia, addresses of operands which are required to carry out the next instruction. The addressed data contents of the operands are stored in a context memory 3-j which is associated with the thread T-j, to be more precise in the register bank 3′-j for the context memory 3-j.
The data contents of the operands are transferred via an N×M multiplexer 10 from the register bank 3′-j for the context memory 3-j to the instruction decoding/operand fetch unit 2′-i for the standard processor root unit 2-i, with the multiplexer 10 being controlled by the thread monitoring unit 4 by means of the multiplexer control signal <t,p>(e). This multiplexing is controlled via the control signals <t,p> such that the correct context memory 3-j is connected to the appropriate pipeline stage of the correct standard processor root unit 2-i.
The instruction execution unit 2″-i for the standard processor root unit 2-i carries out the arithmetic/logic operation contained in the instruction for the thread T-j, using the operands which have been fetched from the register bank 3′-j.
Once the arithmetic/logic operation has been carried out with the operands that have been fetched, the result of the operation for the thread T-j as well as additional characters and flags are applied by the write-back unit 2′″-i to a data line 14-2.
The same data contents are potentially applied to a data line 14-3, in addition to the data line 14-2, when a memory instruction occurs. The M data lines 14-3 are provided for connecting the multithread processor 1 to the data bus 8. The data contents of the M results of the M standard processor root units are transferred via the data bus 8 to an external memory.
The result of the operation for the thread T-j as well as the additional characters and flags are accepted by the data line 14-2 via an M×N multiplexer 11, and the result of the arithmetic/logic operation is transferred to the register bank 3′-j for the context memory 3-j, and additional characters and flags are transferred to the status register 3″-j for the context memory 3-j.
The data contents of the N status registers 3″ are transferred by means of an N×M multiplexer 10 to the processor monitoring units 5. The processor monitoring unit 5 contains a processor monitoring unit 5-i for each standard processor root unit 2-i. The processor monitoring unit 5-i calculates internal control signals 12 from the data contents from the status registers 3′″, specifically an internal control signal for the instruction decoding/operand fetch unit 12′, an internal control signal for the instruction execution unit 12″, and an internal control signal for the write-back unit 12′″.
The thread monitoring unit 4 controls the multiplexers 10 and 11, respectively, via the multiplexer control signals <t,p>(a)-<t,p>(f). By way of example, a multiplexer control signal <t,p> indicates which thread T-j will be processed by which standard processor root unit 2-i, with t being a thread number for the respective thread T, and p being a standard processor root unit number for the respective standard processor root unit 2.
An N×M multiplexer 10 has the function of applying the data from an N-channel data bus to an M-channel bus.
An M×N multiplexer 11 has the function of applying the data from an M-channel data bus to an N-channel data bus.
The M internal event control signals 9′ include, inter alia, data relating to blocked threads T, internal interrupts, waiting times and exception event signals <e>, and make this data available to the thread monitoring unit 4.
External event control signals 9″ are provided for the thread monitoring unit 4 by external devices. Examples of this include external interrupts, which are generated by external devices.
f shows a schematic block diagram of the thread monitoring unit according to the invention for the parallel multithread processor according to the invention with a split context.
The thread monitoring unit 4 has a switching network 18, a thread number buffer store 19 and a standard processor root number buffer store 20.
On the input side, the thread monitoring unit 4 receives the internal event control signals 9′-1 to 9′-N, and the external event control signals 9″. The event control signals 9 which are received on the input side, are processed by means of the switching network 18, the thread number buffer store 19 and the standard processor root number buffer store 20. The processing results in the generation of the multiplexer control signals <t,p>(a)-<t,p>f), which are sent in the correct clock cycle to the corresponding N×M multiplexers 10 (which are not shown) and to the corresponding M×N multiplexers 11 (which not shown).
Although the present invention has been described above with reference to preferred exemplary embodiments, it is not restricted to them but can be modified in many ways.
Number | Date | Country | Kind |
---|---|---|---|
103 53 268 | Nov 2003 | DE | national |
Number | Name | Date | Kind |
---|---|---|---|
5349680 | Fukuoka | Sep 1994 | A |
5361337 | Okin | Nov 1994 | A |
6253313 | Morrison et al. | Jun 2001 | B1 |
6507862 | Joy et al. | Jan 2003 | B1 |
6629237 | Wolrich et al. | Sep 2003 | B2 |
Number | Date | Country | |
---|---|---|---|
20050198476 A1 | Sep 2005 | US |