Abstract:
A processor architecture arrangement for emulated shared memory (ESM) architectures, comprises a number of, preferably a plurality of, multi-threaded processors each provided with interleaved inter-thread pipeline, wherein the pipeline comprises a plurality of functional units arranged in series for executing arithmetic, logical and optionally further operations on data, wherein one or more functional units of lower latency are positioned prior to the memory access segment in said pipeline and one or more long latency units (LLU) for executing more complex operations associated with longer latency are positioned operatively in parallel with the memory access segment. In some embodiments, the pipeline may contain multiple branches in parallel with the memory access segment, each branch containing at least one long latency unit.

Description:
FIELD OF THE INVENTION 
       [0001]    Generally the present invention pertains to computer science and computer architectures. In particular, the invention relates to the execution of long latency operations in connection with emulated shared memory architectures. 
       BACKGROUND 
       [0002]    In SMAs (shared memory architecture), data and program partitioning is typically carried out by placing data requiring processing by multiple threads into the shared memory and splitting program more independently to processors, thus making programming easier compared to message passing (MPA) architectures in which processing happens always locally and the programmer is responsible for moving data around accordingly. Unfortunately most SMAs use a distributed shared memory architecture consisting of multiple interconnected processor-cache pairs, which makes cache coherency (and therefore latency tolerance) and synchronicity maintenance very expensive. This may even ruin their performance in communication intensive problems. 
         [0003]    To tackle e.g. the above problem, the emulated shared memory (ESM), or shared memory emulation, architectures have been introduced. They incorporate a set of multithreaded processors that are connected via a high-throughput intercommunication network to a common uniformly and synchronously accessible shared memory. The memory system latency is hidden by overlapping on-going memory references and a special low-cost synchronization mechanism is established guaranteeing synchronicity at machine instruction level. The ESM systems provide the user with perception of ideal shared memory even though the actual hardware architecture comprises a physically distributed memory. From a theoretical standpoint, these architectures attempt to emulate the abstract parallel random access machine (PRAM) that is commonly used as a model for describing and analyzing the intrinsic parallelism of computational problems as well as performance and cost of executing parallel algorithms due to its simplicity and expressivity. A PRAM model generally refers to a set of processors working under the same clock and a uniform single step accessible shared memory connected to them. 
         [0004]    Accordingly, ESM is a feasible technique to address programmability and performance scalability concerns of chip multiprocessors (CMP) as it yields implied synchrony in the execution of machine instructions, efficient latency hiding technique, and sufficient bandwidth to route all the memory references even with heavy random and concurrent access workloads. Synchronous execution is considered to make programming easier as a programmer does not need to synchronize the threads of execution explicitly after each global memory access but can rely on the hardware to take care of that automatically, whereas e.g. in message passing architectures (MPA), a programmer is responsible for explicitly defining communication, synchronizing subtasks, and describing data and program partitioning between threads making MPAs difficult to program. Latency hiding used in shared memory emulation makes use of the high-throughput computing scheme, where other threads are executed while a thread refers to the global shared memory. Since the throughput computing scheme employs parallel slackness extracted from the available thread-level parallelism, it is considered to provide enhanced scalability in contrast to traditional symmetric multiprocessors and non-uniform memory access (NUMA) systems relying on snooping or directory-based cache coherence mechanisms and therefore suffering from limited bandwidth or directory access delays and heavy coherence traffic maintenance. 
         [0005]    Recently, scalable ESM architectures have been suggested incorporating step caches to implement the concurrent read concurrent write (CRCW) memory access variant of PRAM, which further simplifies programming and increases performance by a logarithmic factor in certain cases. Also a mechanism to support constant execution time multi(-prefix)operations—implementing even stronger multioperation concurrent read concurrent write (MCRCW) variant of the PRAM model—has been implemented with the help of scratchpads that are attached to step caches in order to bound the associativity of step caches. For instance, publications 1: M. Forsell, Step Caches—a Novel Approach to Concurrent Memory Access on Shared Memory MP-SOCs, In the Proceedings of the 23th IEEE NORCHIP Conference, Nov. 21-22, 2005, Oulu, Finland, 74-77, 2: M. Forsell, Reducing the associativity and size of step caches in CRCW operation, In the Proceeding of 8th Workshop on Advances in Parallel and Distributed Computational Models (in conjunction with the 20 th  IEEE International Parallel and Distributed Processing Symposium, IPDPS&#39;06), Apr. 25, 2006, Rhodes, Greece, 3: M. Forsell, Realizing Multioperations for Step Cached MP-SOCs, In the Proceedings of the International Symposium on System-on-Chip 2006 (SOC&#39;06), Nov. 14-16, 2006, Tampere, Finland, 77-82., 4: M. Forsell, TOTAL ECLIPSE—An Efficient Architectural Realization of the Parallel Random Access Machine, In Parallel and Distributed Computing Edited by Alberto Ros, INTECH, Vienna, 2010, 39-64., and 5: M. Forsell and J. Roivainen, Supporting Ordered Multiprefix Operations in Emulated Shared Memory CMPs, In the Proceedings of the 2011 International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA&#39;11), Jul. 18-21, 2011, Las Vegas, USA, 506-512, contemplate different aspects of such a solution and are thereby incorporated herein by reference in their entireties. Multi(-prefix)operations can be defined for many basic operations, e.g. ADD, SUB, MAX etc., and considered as parallel primitives due to the capability to express parallel algorithms. They can be used for synchronization and parallel data structures simultaneously accessed by several processors without race conditions and other anomalies of architectures executing threads asynchronously. 
         [0006]    In  FIG. 1 , a high-level illustration of a scalable architecture to emulate shared memory on a silicon platform is shown. It comprises a set of processors (cores) P 1 , P 2 , P 3 , . . . ,Pp  102  connected to a physically distributed, but logically shared (data) memory M 1 , M 2 , M 3 , . . . ,Mp  112  via a physically scalable high bandwidth interconnection network  108 . Active memory units  110  in connection with data memory  112  can be considered as memory control logic units utilized to process the memory references. The active memory units  110  are arranged to manage computation related to cases in which multiple memory references are targeted to the same memory location during e.g. multi(-prefix) operations, for instance. Instruction memory modules I 1 , I 2 , I 3 , . . . , Ip  104  are configured to carry the program code for each processor  102 . To efficiently emulate shared memory by the distributed memory-based implementation, the processors  102  are multithreaded utilizing a Tp-stage cyclic, interleaved inter-thread pipeline (Tp≧the average latency of the network). The PRAM model is linked to the architecture such that a full cycle in the pipeline corresponds typically to a single PRAM step. During a step of multi-threaded execution (regarding the pipeline in overall, i.e. all pipeline stages including the actual execution stage), each thread of each processor of the CMP executes an instruction including at most one shared memory reference sub-instruction. Therefore a step lasts for multiple, at least Tp+1 clock cycles. 
         [0007]    In the depicted architecture, step caches are generally associative memory buffers in which data stays valid only to the end of ongoing step of multithreaded execution. The main contribution of step caches to concurrent accesses is that they step-wisely filter out everything but the first reference for each referenced memory location. This reduces the number of requests per location from P Tp down to P allowing them to be processed sequentially on a single ported memory module assuming Tp≧P. Scratchpads are addressable memory buffers that are used to store memory access data to keep the associativity of step caches limited in implementing multioperations with the help of step caches and minimal on-core and off-core ALUs (arithmetic logic unit) that take care of actual intra-processor and inter-processor computation for multioperations. Scratchpads may be coupled with step caches to establish so-called scratchpad step cache units S 1 , S 2 , S 3 , . . . ,Sp  106 . 
         [0008]    One underlying idea of the reviewed solution is indeed in the allocation of each processor core  102  with a set of threads that are executed efficiently in an interleaved manner and hiding the latency of the network. As a thread makes a memory reference, the executed thread is changed and the next thread can make its memory request and so on. No memory delay will occur provided that the reply of the memory reference of the thread arrives to the processor core before the thread is put back to execution. This requires that the bandwidth of the network is high enough and hot spots can be avoided in pipelined memory access traffic. Synchronicity between consecutive instructions can be guaranteed by using an elastic synchronization wave between the steps, for instance. 
         [0009]      FIG. 2  shows, at  200 , one illustration of an ESM CMP architecture incorporating e.g. the aforementioned active memory units  112 B (with ALU and fetcher) in connection with data memory modules  112  and scratchpads  206 B. The network  108  may be a mesh-like interconnection network acting as a high-bandwidth pipelined memory system with switches  108 B. The memory access latency is hidden by executing other threads while a thread is referencing the uniformly accessible distributed shared memory via the network  108 . Congestion of references and hot spots in communication can be avoided with an efficient dead-lock free intercommunication architecture featuring high bandwidth (bisection BW≧P/4) and randomized hashing of memory locations over the distributed memory modules. Execution of instructions happens in steps corresponding to a single PRAM step during which each thread executes a single instruction. 
         [0010]    Despite of the many aforementioned advantages, ESM systems have appeared difficult to realize in truly optimal fashion. A physically feasible memory unit (MU) making use of step cache and scratchpad techniques to support strong concurrent memory access and multi(-prefix)operations is easily comprehensible as one key component of powerful emulated shared memory architecture like REPLICA (REmoving Performance and programmability LImitations of Chip multiprocessor Architectures), which is basically a configurable ESM. Such MU may be configured to send the outgoing memory references to the shared memory system as well as wait and receive possible replies therefrom, for example. 
         [0011]      FIG. 3  represents, at  300 , a high-level block diagram and pipeline of a typical MCRCW ESM processor making use of e.g. step caches. A processor in a step cache-based MCRCW (C)ESM CMP comprises A ALUs, M memory units (MU), a distributed or unified register block, a sequencer and some glue logic. In the figure Ax  302  refers to ALU x, IF  308  refers to instruction fetch logic, MEM  304  refers to memory unit stage, OS  306  refers to operand selection logic and SEQ  310  refers to sequencer. As implied in the figure, there are ALUs  302  logically positioned prior to and after the memory unit wait segment. 
         [0012]    Generally, integer-based arithmetic operations taken care of by ALUs in the modern processor architectures include addition, subtraction, multiplication and division. Further, the ALUs are often responsible for performing logical operations that may incorporate comparing e.g. two data elements to each other to sort out which was smaller/bigger or whether they were equal, and making related decisions based on the outcome of such comparisons. 
         [0013]    Yet, specialized functional units may be allocated for executing certain specific tasks and operations involving calculations of particular complexity, for instance. Execution of such complex or otherwise special operations could require additional logic or hardware, and take a greater number of clock cycles or generally just take longer, i.e. cause a longer latency, to complete in contrast to e.g. basic ALU operations. 
         [0014]    In processor architectures, several parallel processing paths may be provided, each potentially provided with special purpose or specific task to be performed using the hardware disposed on that particular path. Nevertheless, the latency caused by the associated elements and related processing taking place in the paths often adds to the overall execution time of instructions proceeding in the processor pipeline structure. 
       SUMMARY OF THE INVENTION 
       [0015]    The objective is to at least alleviate one or more problems described hereinabove not yet fully satisfactorily addressed by the known ESM arrangements, and to provide a feasible solution for executing long latency operations, such as division or application-specific operations, effectively thereat. 
         [0016]    The objective is achieved by embodiments of processor architecture in accordance with the present invention. 
         [0017]    Accordingly, in one aspect of the present invention a processor architecture arrangement for emulated shared memory (ESM) architectures, comprises 
         [0018]    a number of, preferably a plurality of, multi-threaded processors each provided with interleaved inter-thread pipeline, 
         [0019]    wherein the pipeline comprises a plurality of functional units arranged in series for executing arithmetic, logical and optionally further operations on data, wherein one or more functional units of lower latency are positioned prior to the memory access segment in said pipeline and one or more long latency units for executing more complex operations associated with longer latency are positioned operatively in parallel with the memory access segment. 
         [0020]    Optionally, there also are one or more functional units in the plurality functionally located after the memory access segment, which units are preferably at least generally, i.e. regarding at least most such units, of lower latency. 
         [0021]    In one embodiment the plurality of functional units comprises a number of ALUs. 
         [0022]    In another, supplementary or alternative, embodiment, a further number of long latency units including at least one unit are positioned operatively in parallel with the aforementioned one or more long latency units. Optionally, the pipeline may thereby contain two or more branches or branch portions at least during the memory access segment (in parallel therewith) wherein each branch incorporates at least one dedicated long latency unit configured to operate during memory access. Logically, these mutually parallel branches may be located in series with the remaining functional units preceding and following the memory access segment. 
         [0023]    In a further embodiment, at least two or more of the included long latency units are chained together into at least one chain, wherein data may be passed from one unit to another. The chained functional units may be configured to execute mutually different operations on the input data (operands), for example. 
         [0024]    Yet, in a further embodiment, at least part of the functional units are controlled through predetermined (sub-)instruction operation field(s) and associated values provided in the instruction, or ‘instruction word’. 
         [0025]    Still in a further embodiment, an operand for a functional unit is determined in the operand select stage of pipeline in accordance with the operand selection field(s) (values) given in the instruction (word). Operand for a functional unit may also be inherited from a previous functional unit connected thereto in the same chain. Connections between functional units may be enabled by a number of multiplexers controlled by the instruction words. 
         [0026]    In a further embodiment, at least one long latency unit is configured to execute division, square-root or application-specific operations. The long latency units may supplement (more traditional) ALU(s) in bringing in versatile arithmetics or generally operation support to the pipeline and overall processor architecture in question. 
         [0027]    In a further embodiment, at least one long latency unit is internally pipelined. 
         [0028]    The utility of the present invention is due to several issues depending on the embodiment. It basically allows the execution of long latency operations such as divisions in emulated shared memory computers within a single step of multithreaded execution even though such operations typically take multiple execution steps. Because the memory wait segment of the pipeline may be practically merged with the logic implementing long latency operations, the programmer sees the long latency operations executing in a single step, and the latency arising from the execution is hidden within the latency in any case caused by the memory access. The obtained benefits in terms of performance increase are evident in the context of e.g. multicore processor-based computers and their programming. 
         [0029]    The expression “a number of” refers herein to any positive integer starting from one (1), e.g. to one, two, or three. 
         [0030]    The expression “a plurality of” refers herein to any positive integer starting from two (2), e.g. to two, three, or four. 
         [0031]    The terms “operatively”, “logically” and “functionally” are used herein inter-changeably particularly in connection with expressions relating to “parallelism”, “parallel elements”, or “parallel functionalities” to differentiate from physical or merely physical parallelism, i.e. merely physically parallel layout of elements. 
         [0032]    Different embodiments of the present invention are disclosed in the dependent claims. 
     
    
     
       BRIEF DESCRIPTION OF THE RELATED DRAWINGS 
         [0033]    Next the invention is described in more detail with reference to the appended drawings in which 
           [0034]      FIG. 1  is a block diagram of a feasible scalable architecture to emulate shared memory on a silicon platform. 
           [0035]      FIG. 2  is another representation of a feasible ESM architecture, essentially CMP ESM architecture. 
           [0036]      FIG. 3  is a high-level block diagram and pipeline representation of an embodiment of an MCRCW ESM processor. 
           [0037]      FIG. 4  illustrates an embodiment of the pipeline architecture in accordance with the present invention. 
           [0038]      FIG. 5  illustrates another embodiment of the pipeline architecture in accordance with the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0039]      FIGS. 1-3  were already contemplated hereinbefore in connection with the description of both background and historical data relating to the origin of the present invention. 
         [0040]      FIG. 4  illustrates one embodiment of the present invention incorporating ESM pipeline architecture  400  with a plurality (N) of long latency units (LLU)  402   b  as well as other functional units (FU) such as (ordinary or lower latency) ALUs  402 ,  402   c.  These other functional units such as ALUs may be positioned before  402  and after  402   c  the memory access segment  412  and thus, the LLUs  402   b.    
         [0041]    The layout of the functional units  402 ,  402   b,    402   c  is merely exemplary in the figure and in other embodiments, the positioning, number and nature/latency thereof may diverge from the illustrated one. The functional units  402 ,  402   b,    402   c  have been provided with unique identifiers in connection with general identifiers A(LU) and LLU to bring forward the fact that the units  402 ,  402   b,    402   c  may mutually differ, also within the same general type (A/LLU) in terms of structure and/or functionality. However, at least some of the units  402 ,  402   b,    402   c  may be mutually similar in terms of structure and/or operation. 
         [0042]    IF  408  refers to instruction fetch logic, MEM  412   a  refers to a single memory unit stage typically lasting for a clock cycle, and OS  406  refers to operand selection logic with register file read/write access actions. SEQ  410  refers to a sequencer. 
         [0043]    Generally, the operands are selected by the responsible logic  406  in the beginning of the pipeline according to the corresponding operand selection field(s) in the instruction words. The operands may be passed to the functional units via a number of register pipes. 
         [0044]    As mentioned hereinbefore, the long latency units  402   b  may have been designed for executing more complex operations, e.g. division and application-specific operations, and potentially organized as one or more chains of units residing in parallel with the memory unit wait segment and connected in the middle of the overall ALU chain or pipeline structure  414 . 
         [0045]    By disposing at least some long latency units  402   b  functionally and temporally in parallel with the memory access segment  412  incorporating a plurality of memory (wait) stages  412   a,  as shown in the figure, the execution time of long latency operations may be scaled down to a single ESM step. The LLUs  402   b  may advantageously execute their tasks simultaneously with the memory access operation. 
         [0046]    Considering the execution process of instructions involving LLU(s) in more detail, the LLUs  402   b  are preferably controlled with dedicated field(s) in the instruction word just like the rest of the functional units in the ESM. Operands for these operations may be selected in the operand select (OS) stage  406  of the pipeline, or they can alternatively be inherited from the results produced by the ALUs  402  residing in the chain before the memory wait segment  412 . 
         [0047]    The long latency operations are then executed in the order specified by the placement of and/or connections between the LLUs  402   b.    
         [0048]    Generally, two or more functional units  402 ,  402   b,    402   c  (mutually similar or different) such as LLUs or e.g. a combination of ALUs  402 ,  402   c  and LLUs  402   b  may be chained together such that data may be passed from one unit to another. The chained functional units may be configured to execute mutually different operations on the input data (operands). 
         [0049]    The results of long latency operations can, for example, be used as operands for the rest of the ALUs  402   c  or sequencer  410 . In order to have full throughput, LLUs  402   b  shall be internally pipelined. 
         [0050]    As a result, a programmer can apply up to N long latency operations during a single step of execution. These operations can even be dependent on each other if they are placed into a chain of units accordingly. And what is remarkable, the suggested solution does not generally increase the length of the processor pipeline. Naturally, the executed memory operation shall be independent of the long latency operations executed meanwhile within a step of execution. 
         [0051]    The varying physical dimensions of the depicted entities representing functional units such as LLUs  402   b  and ALUs  402 ,  402   c  indicate the fact that the complexity or latency of the LLUs  402   b  and/or other functional units  402 ,  402   c  applied may mutually vary as well. Areas covered by the rectangles/lengths of the rectangles in vertical direction imply the execution time or latency of the corresponding units, i.e. ALUs  402 ,  402   c  associated with shorter latency are depicted as shorter/smaller rectangles as the LLUs  402   b.    
         [0052]    In some embodiments, a number of functional units such as LLUs  402   b  may be introduced to the pipeline such that more complex/more latency-causing unit(s) are located therein later (considering the execution flow) than the unit(s) of lesser complexity/latency. And with particular reference to the memory access segment  412 , the more complex unit(s) may be disposed substantially in parallel with the end portion of the segment preceded by the simpler ones, for example. 
         [0053]      FIG. 5  illustrates another embodiment of the pipeline architecture  500  in accordance with the present invention. 
         [0054]    Also in this embodiment, IF  408  refers to instruction fetch logic, MEM  412   a  refers to a single memory unit stage typically lasting for a clock cycle, OS  406  refers to operand selection logic with register file read/write access actions, and SEQ  410  refers to a sequencer. 
         [0055]    In this embodiment, the pipeline comprises separate, functionally and logically parallel, branches  500   a,    500   b  of long latency units (LLU)  502   a,    502   b  respectively for performing related long latency operations. A branch  502   a,    502   b  may comprise only one LLU or a plurality of LLUs and optionally one or more other functional units (FU) such as multiple ALUs for carrying out operations such as predetermined arithmetic and logical operations on the data provided thereto. The branches may be of limited length and be preceded and/or followed by common, shared, pipeline segment(s). 
         [0056]    The parallel branches  500   a,    500   b  of the pipeline may exist in parallel with the memory access segment  412  only (the visualized case), or extend beyond that, thus potentially also preceding or following the memory access segment  412 . In some embodiments, the branches may, on the other hand, define a pipeline segment that is shorter than the memory access segment  412 . Accordingly, the actual functional units such as LLUs located in the parallel branches  500   a,  may also be configured as mutually substantially (functionally/temporally) parallel as indicated in the figure, wherein LLUs  502   a,    502   b  have been depicted as fully parallel relative to the pipeline. 
         [0057]    By way of example, latency or complexity of each particular functional unit is again depicted in the figure by the size, or length, of the corresponding block. In the shown embodiment, the branches contain equal number of equally complex (same or similar latency-causing) LLUs  502 , but a person skilled in the art certainly realizes that in various other feasible embodiments, a number of LLUs within a branch and/or between branches may be of mutually different complexity/latency. In some embodiments, the LLUs positioned in the branches are selected so that the latencies caused by the parallel branches are substantially equal and/or remain within the overall duration of the memory access segment  412 . In some embodiments, LLU with longer latency is disposed later in the pipeline than LLU with shorter latency. 
         [0058]    Two or more, optionally all, LLUs  502   a,    502   b  disposed in each branch  500   a,    500   b  may have been chained according to the principles set forth hereinbefore to pass data therebetween, etc. Chaining may increase the obtained performance through exploitation of available virtual instruction-level parallelism. 
         [0059]    Generally, the functional units  402 ,  402   b,    402   c,    502   a,    502   b  may be controlled by VLIW-style sub-instruction operation fields, for instance. After the target operation has been executed by a functional unit, the result may be made available to the functional unit(s) situated after that unit in the respective chain via elements including e.g. multiplexers controlled by the current instruction word. 
         [0060]    Ultimately, a skilled person may, on the basis of this disclosure and general knowledge, apply the provided teachings in order to implement the scope of the present invention as defined by the appended claims in each particular use case with necessary modifications, deletions, and additions, if any. Generally, the various principles set forth herein could be also at least selectively utilized in processor architectures not falling under the ESM definition adopted herein, as being readily understood by the persons skilled in the art.