This invention relates to functional pipelines.
Parallel processing is an efficient form of information processing of concurrent events of a computing system. Parallel processing demands concurrent execution of many programs, in contrast to sequential processing. In the context of parallel processing, parallelism involves doing more than one thing at the same time. Unlike a serial paradigm where all tasks are performed sequentially at a single station or a pipelined machine where tasks are performed at specialized stations, with parallel processing, many stations are provided, each capable of performing and carrying out various tasks and functions simultaneously. A number of stations work simultaneously and independently on the same or common elements of a computing task. Accordingly, parallel processing solves various types of computing tasks and certain problems are suitable for solution by applying several instruction processing units and several data streams.
Architecture:
Referring to
The programming engines 16 each maintain program counters in hardware and states associated with the program counters. Effectively, corresponding sets of context or threads can be simultaneously active on each of the programming engines 16 while only one is actually operating at any one time.
In this example, eight programming engines 16a-16h are illustrated in
The eight programming engines 16a-16h access either the DRAM memory 14a or SRAM memory 14b based on characteristics of the data. Thus, low latency, low bandwidth data is stored in and fetched from SRAM memory 14b, whereas higher bandwidth data for which latency is not as important, is stored in and fetched from DRAM memory 14a. The programming engines 16a-16h can execute memory reference instructions to either the DRAM controller 18a or SRAM controller 18b.
The hardware-based multithreaded processor 12 also includes a processor core 20 for loading microcode control for the programming engines 16a-16h. In this example, the processor core 20 is an XScale™ based architecture.
The processor core 20 performs general purpose computer type functions such as handling protocols, exceptions, and extra support for packet processing where the programming engines 16 pass the packets off for more detailed processing such as in boundary conditions.
The processor core 20 has an operating system (not shown). Through the operating system (OS), the processor core 20 can call functions to operate on the programming engines 16a-16h. The processor core 20 can use any supported OS, in particular, a real time OS. For the core processor 20 implemented as an XScale™ architecture, operating systems such as Microsoft NT real-time, VXWorks and μCOS, or a freeware OS available over the Internet can be used.
Advantages of hardware multithreading can be explained by SRAM or DRAM memory accesses. As an example, an SRAM access requested by a context (e.g., Thread_0), from one of the programming engines 16 will cause the SRAM controller 18b to initiate an access to the SRAM memory 14b. The SRAM controller 18b accesses the SRAM memory 14b, fetches the data from the SRAM memory 14b, and returns data to a requesting programming engine 16.
During an SRAM access, if one of the programming engines 16a-16h had only a single thread that could operate, that programming engine would be dormant until data was returned from the SRAM memory 14b.
By employing hardware context swapping within each of the programming engines 16a-16h, the hardware context swapping enables other contexts with unique program counters to execute in that same programming engine. Thus, another thread e.g., Thread_1 can function while the first thread, Thread_0, is awaiting the read data to return. During execution, Thread_1 may access the DRAM memory 14a. While Thread_1 operates on the DRAM unit, and Thread_0 is operating on the SRAM unit, a new thread, e.g., Thread_2 can now operate in the programming engine 16. Thread_2 can operate for a certain amount of time until it needs to access memory or perform some other long latency operation, such as making an access to a bus interface. Therefore, simultaneously, the multi-threaded processor 12 can have a bus operation, an SRAM operation, and a DRAM operation all being completed or operated upon by one of the programming engines 16 and have one more threads or contexts available to process more work.
The hardware context swapping also synchronizes the completion of tasks. For example, two threads can access the shared memory resource, e.g., the SRAM memory 14b. Each one of the separate functional units, e.g., the SRAM controller 18b, and the DRAM controller 18a, when they complete a requested task from one of the programming engine threads or contexts reports back a flag signaling completion of an operation. When the programming engines 16a-16h receive the flag, the programming engines 16a-16h can determine which thread to turn on.
One example of an application for the hardware-based multithreaded processor 12 is as a network processor. As a network processor, the hardware-based multithreaded processor 12 interfaces to network devices such as a Media Access Controller (MAC) device, e.g., a 10/100BaseT Octal MAC 13a a or a Gigabit Ethernet device 13b. In general, as a network processor, the hardware-based multithreaded processor 12 can interface to any type of communication device or interface that receives or sends large amount of data. The computer processing system 10 functioning in a networking application can receive network packets and process those packets in a parallel manner.
Programming Engine Contexts
Referring to
In addition to event signals that are local to an executing thread, the programming engine 16a employs signaling states that are global. With signaling states, an executing thread can broadcast a signal state to all programming engines 16a-16h. Any and all threads in the programming engines can branch on these signaling states. These signaling states can be used to determine availability of a resource or whether a resource is due for servicing. The context event logic has arbitration for the eight (8) threads. In one example, the arbitration is a round robin mechanism. Other techniques could be used including priority queuing or weighted fair queuing.
As described above, the programming engine 16a supports multi-threaded execution of eight contexts. This allows one thread to start executing just after another thread issues a memory reference and must wait until that reference completes before doing more work. Multi-threaded execution is critical to maintaining efficient hardware execution of the programming engine 16a because memory latency is significant. Multi-threaded execution allows the programming engines 16 to hide memory latency by performing useful independent work across several threads.
The programming engine 16a, to allow for efficient context swapping, has its own register set, program counter, and context specific local registers. Having a copy per context eliminates the need to move context specific information to and from shared memory and programming engine registers for each context swap. Fast context swapping allows a context to do computation while other contexts wait for input-output (I/O), typically, external memory accesses to complete or for a signal from another context or hardware unit.
For example, the programming engine 16a executes the eight contexts by maintaining eight program counters and eight context relative sets of registers. There can be six different types of context relative registers, namely, general purpose registers (GPRs) 32, inter-programming agent registers (not shown), Static Random Access Memory (SRAM) input transfer registers 34, Dynamic Random Access Memory (DRAM) input transfer registers 36, SRAM output transfer registers 38, DRAM output transfer registers 40.
The GPRs 32 are used for general programming purposes. The GPRs 32 are read and written exclusively under program control. The GPRs 32, when used as a source in an instruction, supply operands to an execution datapath 44. When used as a destination in an instruction, the GPRs 32 are written with the result of the execution datapath 44. The programming engine 16a also includes I/O transfer registers 34, 36, 38 and 40 which are used for transferring data to and from the programming engine 16a and locations external to the programming engines 16a, e.g., the DRAM memory 14a, the SRAM memory 14b, and etc.
A local memory 42 is also used. The local memory 42 is addressable storage located in the programming engine 16a. The local memory 42 is read and written exclusively under program control. The local memory 42 also includes variables shared by all the programming engines 16a-16h. Shared variables are modified in various assigned tasks during functional pipeline stages by the programming engines 16a-16h, which are described next. The shared variables include a critical section, defining the read-modify-write times. The implementation and use of the critical section in the computing processing system 10 is also described below.
Functional Pipelining and Pipeline Stages
Referring to
In the functional pipeline unit 50, the contexts 58 of the programming engines 16a, namely, Programming Engine0.1 (PE0.1) through Programming Engine0.n (PE0.n), remain with the programming engine 16a while different functions are performed on the data packets 54 as time 66 progresses from time=0 to time=t. A programming execution time is divided into “m” functional pipeline stages or pipe-stages 60a-60m. Each pipeline stage of the pipeline stages 60a-60m performs different pipeline functions 62a, 64, or 62p on data in the pipeline.
The pipeline stage 60a is, for example, a regular time interval within which a particular processing function, e.g., the function 62 is applied to one of the data packets 54. A processing function 62 can last one or more pipelines stages 62. The function 64, for example, lasts two pipeline stages, namely pipeline stages 60b and 60c.
A single programming engine such as the programming engine 16a can constitute a functional pipeline unit 50. In the functional pipeline unit 50, the functions 62a, 64, and 62p move through the functional pipeline unit 50 from one programming engine 16 to another programming engine 16, as will be described next.
Referring to
Dividing the execution time of the programming engines 16 into functional pipeline stages 60a-60c results in more than one programming engine 16 executing an equivalent functional pipeline unit 70 in parallel. The functional pipeline stage 60a is distributed across two programming engines 16a and 16b, with each of the programming engines 16a and 16b executing eight contexts each.
In operation, each of the data packets 54 remains with one of the contexts 58 for a longer period of time as more programming engines 16 are added to the functional pipeline units 50 and 70. In this example, the data packet 54 remains with a context sixteen data packet arrival times (8 contexts×2 programming engines) because context PE0.1 is not required to accept another data packet 58 until the other contexts 58 have received their data packets.
In this example, the function 62 of the functional pipeline stage 60a can be passed from the programming engine 16a to the programming engine 16b. Passing of the function 62 is accomplished by passing the processing functions from one programming engine to another, as illustrated by dotted lines 80a-80c in
The number of functional pipeline stages 60a-60m is equal to the number of the programming engines 16a and 16b in the functional pipeline units 50 and 70. This ensures that a particular pipeline stage executes in only one programming engine 16 at any one time.
Referring to
In the critical sections 82a-82c and 84a-84c, the programming engine contexts 58a-58c are given exclusive access to the shared data 86a-86c (e.g., cyclic redundancy check residue (CRC), reassembly context, or a statistic) in external memory.
In operation, functions can be distributed across one or more functional pipeline stages 60a-60d. For example, the critical section 82a represents a section of code where only one programming engine context, in this case, the context 58a of the programming engine 16a, has exclusive modification privileges for a global resource (i.e., shared data 86a), such as a location in memory, at any one time. Thus, the critical section 82a provides exclusive modification privileges to a particular functional pipeline stage of the programming engine 16a. The critical section 82a also provides support for exclusive access between the contexts 58a-58c in the programming engines 16a-16c.
In certain implementations only one function modifies the shared data 86a-86c between the programming engines 16a-16c, to ensure exclusive modification privileges between the programming engines 16a-16c. The function that modifies the shared data 86a-86c executes, e.g., in a single functional pipeline stage 60a, and the functional pipeline unit 50 is designed so that only one programming engine from all the programming engines 16a-16c executes the functional pipeline stage 60a at any one time.
Still referring to
In this example, by optimizing the control flow through the functional pipeline units 50, 70, and 90, the architectural solution described above presents greater network processing power to the hardware-based multithreaded network processor 12.
In the functional pipeline unit 50, the programming engine 16a transitions into the critical section 82a of the functional pipeline stage 60a unless it can be assured that its “next” programming engine 16b has transitioned out of the critical section 82a. The programming engine 16b uses inter-thread signaling where the signaling states can be used to determine availability of a memory resource or whether a memory resource is due for servicing. There are four ways to signal a next context using inter-thread signaling:
Critical sections such as CRC calculations are performed in the order of incoming data packets 54a-54c because inter-thread signaling is performed in order.
When the functional pipeline stage 60a transition occurs between the programming engines 16a and 16b, the elasticity buffer 92, implemented as a ring, is used. Each functional pipeline stage 60a is implemented to execute within the time allocated to the functional pipeline stage 60a. However, the elasticity buffer 92 accommodates jitter in the execution of the functional pipeline unit 50. Thus, if a functional pipeline stage 60a falls behind in execution due to system anomalies such as high utilization of memory units over a short period of time, the elasticity buffer 92 allows the context 58a of the functional pipeline stage 60a to be buffered so that the previous functional pipeline stages will not be stalled waiting for the next pipeline stage to complete. The elasticity buffer 92 as shown in
By using the functional pipeline stages, as described above, the functional pipeline units 50, 70, and 90 cover memory latency and provides sufficient computation cycles for data packets 54 arriving faster than a single stream computation stage. By providing a mechanism for fast synchronization from one programming engine to the next programming engine which performs the same set of functions on a new set of data packets 54, parallel processing capability of the programming engines are greatly enhanced. Multiple means for passing functional state and control is thus provided.
Other Embodiments
In the example described above in conjunction with
It is to be understood that while the invention has been described in conjunction with the detailed description thereof, the foregoing description is intended to illustrate and not limit the scope of the invention, which is defined by the scope of the appended claims. Other aspects, advantages, and modifications are within the scope of the following claims.
This application is a continuation of, and claims priority to, U.S. patent application Ser. No. 10/053,172, filed Jan. 17, 2002 now U.S. Pat. No. 6,934,951, entitled “FUNCTIONAL PIPELINES”.
Number | Name | Date | Kind |
---|---|---|---|
3373408 | Ling | Mar 1968 | A |
3478322 | Evans | Nov 1969 | A |
3792441 | Wymore et al. | Feb 1974 | A |
3940745 | Sajeva | Feb 1976 | A |
4130890 | Adam | Dec 1978 | A |
4400770 | Chan et al. | Aug 1983 | A |
4514807 | Nogi | Apr 1985 | A |
4523272 | Fukunaga et al. | Jun 1985 | A |
4745544 | Renner et al. | May 1988 | A |
4866664 | Burkhardt, Jr. et al. | Sep 1989 | A |
5140685 | Sipple et al. | Aug 1992 | A |
5142683 | Burkhardt, Jr. et al. | Aug 1992 | A |
5155831 | Emma et al. | Oct 1992 | A |
5155854 | Flynn et al. | Oct 1992 | A |
5168555 | Byers et al. | Dec 1992 | A |
5173897 | Schrodi et al. | Dec 1992 | A |
5255239 | Taborn et al. | Oct 1993 | A |
5263169 | Genusov et al. | Nov 1993 | A |
5347648 | Stamm et al. | Sep 1994 | A |
5367678 | Lee et al. | Nov 1994 | A |
5390329 | Gaertner et al. | Feb 1995 | A |
5392391 | Caulk, Jr. et al. | Feb 1995 | A |
5392411 | Ozaki | Feb 1995 | A |
5392412 | McKenna | Feb 1995 | A |
5404464 | Bennett | Apr 1995 | A |
5404482 | Stamm et al. | Apr 1995 | A |
5432918 | Stamm | Jul 1995 | A |
5448702 | Garcia, Jr. et al. | Sep 1995 | A |
5450351 | Heddes | Sep 1995 | A |
5452437 | Richey et al. | Sep 1995 | A |
5459842 | Begun et al. | Oct 1995 | A |
5463625 | Yasrebi | Oct 1995 | A |
5467452 | Blum et al. | Nov 1995 | A |
5517648 | Bertone et al. | May 1996 | A |
5542070 | LeBlanc et al. | Jul 1996 | A |
5542088 | Jennings, Jr. et al. | Jul 1996 | A |
5544236 | Andruska et al. | Aug 1996 | A |
5550816 | Hardwick et al. | Aug 1996 | A |
5557766 | Takiguchi et al. | Sep 1996 | A |
5568617 | Kametani | Oct 1996 | A |
5574922 | James | Nov 1996 | A |
5592622 | Isfeld et al. | Jan 1997 | A |
5613071 | Rankin et al. | Mar 1997 | A |
5613136 | Casavant et al. | Mar 1997 | A |
5623489 | Cotton et al. | Apr 1997 | A |
5627829 | Gleeson et al. | May 1997 | A |
5630130 | Perotto et al. | May 1997 | A |
5644623 | Gutledge | Jul 1997 | A |
5649157 | Williams | Jul 1997 | A |
5659687 | Kim et al. | Aug 1997 | A |
5680641 | Sidman | Oct 1997 | A |
5689566 | Nguyen | Nov 1997 | A |
5689722 | Swarztrauber | Nov 1997 | A |
5699537 | Sharangpani et al. | Dec 1997 | A |
5717898 | Kagan et al. | Feb 1998 | A |
5721870 | Matsumoto | Feb 1998 | A |
5742587 | Zornig et al. | Apr 1998 | A |
5742782 | Ito et al. | Apr 1998 | A |
5742822 | Motomura | Apr 1998 | A |
5745913 | Pattin et al. | Apr 1998 | A |
5751987 | Mahant-Shetti et al. | May 1998 | A |
5761507 | Govett | Jun 1998 | A |
5761522 | Hisanaga et al. | Jun 1998 | A |
5781774 | Krick | Jul 1998 | A |
5784649 | Begur et al. | Jul 1998 | A |
5784712 | Byers et al. | Jul 1998 | A |
5796413 | Shipp et al. | Aug 1998 | A |
5797043 | Lewis et al. | Aug 1998 | A |
5809235 | Sharma et al. | Sep 1998 | A |
5809530 | Samra et al. | Sep 1998 | A |
5812868 | Moyer et al. | Sep 1998 | A |
5828746 | Ardon | Oct 1998 | A |
5828863 | Barrett et al. | Oct 1998 | A |
5832215 | Kato et al. | Nov 1998 | A |
5835755 | Stellwagen, Jr. | Nov 1998 | A |
5854922 | Gravenstein et al. | Dec 1998 | A |
5860158 | Pai et al. | Jan 1999 | A |
5886992 | Raatikaien et al. | Mar 1999 | A |
5887134 | Ebrahim | Mar 1999 | A |
5890208 | Kwon | Mar 1999 | A |
5892979 | Shiraki et al. | Apr 1999 | A |
5905876 | Pawlowski et al. | May 1999 | A |
5905889 | Wilhelm, Jr. | May 1999 | A |
5913059 | Torii | Jun 1999 | A |
5915123 | Mirsky et al. | Jun 1999 | A |
5937187 | Kosche et al. | Aug 1999 | A |
5938736 | Muller et al. | Aug 1999 | A |
5940612 | Brady et al. | Aug 1999 | A |
5940866 | Chisholm et al. | Aug 1999 | A |
5946487 | Dangelo | Aug 1999 | A |
5948081 | Foster | Sep 1999 | A |
5958031 | Kim | Sep 1999 | A |
5961628 | Nguyen et al. | Oct 1999 | A |
5970013 | Fischer et al. | Oct 1999 | A |
5978838 | Mohammed et al. | Nov 1999 | A |
5983274 | Hyder et al. | Nov 1999 | A |
6006321 | Abbott | Dec 1999 | A |
6012151 | Mano | Jan 2000 | A |
6014729 | Lannan et al. | Jan 2000 | A |
6023742 | Ebeling et al. | Feb 2000 | A |
6058168 | Braband | May 2000 | A |
6067300 | Baumert et al. | May 2000 | A |
6067585 | Hoang | May 2000 | A |
6070231 | Ottinger | May 2000 | A |
6072781 | Feeney et al. | Jun 2000 | A |
6073159 | Emer et al. | Jun 2000 | A |
6073215 | Snyder | Jun 2000 | A |
6079008 | Clery, III | Jun 2000 | A |
6085215 | Ramakrishnan et al. | Jul 2000 | A |
6085294 | Van Doren et al. | Jul 2000 | A |
6092127 | Tausheck | Jul 2000 | A |
6092158 | Harriman et al. | Jul 2000 | A |
6112016 | MacWilliams et al. | Aug 2000 | A |
6134665 | Klein et al. | Oct 2000 | A |
6141689 | Yasrebi | Oct 2000 | A |
6141765 | Sherman | Oct 2000 | A |
6144669 | Williams et al. | Nov 2000 | A |
6145054 | Mehrotra et al. | Nov 2000 | A |
6157955 | Narad et al. | Dec 2000 | A |
6160562 | Chin et al. | Dec 2000 | A |
6170051 | Dowling | Jan 2001 | B1 |
6182177 | Harriman | Jan 2001 | B1 |
6195676 | Spix et al. | Feb 2001 | B1 |
6199133 | Schnell | Mar 2001 | B1 |
6201807 | Prasanna | Mar 2001 | B1 |
6212542 | Kahle et al. | Apr 2001 | B1 |
6212611 | Nizar et al. | Apr 2001 | B1 |
6216220 | Hwang | Apr 2001 | B1 |
6223207 | Lucovsky et al. | Apr 2001 | B1 |
6223238 | Meyer et al. | Apr 2001 | B1 |
6223279 | Nishimura et al. | Apr 2001 | B1 |
6247025 | Bacon | Jun 2001 | B1 |
6256713 | Audityan et al. | Jul 2001 | B1 |
6266750 | DeHon et al. | Jul 2001 | B1 |
6272616 | Fernando et al. | Aug 2001 | B1 |
6275505 | O'Loughlin et al. | Aug 2001 | B1 |
6279113 | Vaidya | Aug 2001 | B1 |
6289011 | Seo et al. | Sep 2001 | B1 |
6298370 | Tang et al. | Oct 2001 | B1 |
6307789 | Wolrich et al. | Oct 2001 | B1 |
6324624 | Wolrich et al. | Nov 2001 | B1 |
6327650 | Bapst et al. | Dec 2001 | B1 |
6345334 | Nakagawa et al. | Feb 2002 | B1 |
6347344 | Baker et al. | Feb 2002 | B1 |
6356962 | Kasper et al. | Mar 2002 | B1 |
6360262 | Guenthner et al. | Mar 2002 | B1 |
6373848 | Allison et al. | Apr 2002 | B1 |
6389449 | Nermirovsky et al. | May 2002 | B1 |
6393483 | Latif et al. | May 2002 | B1 |
6415338 | Habot | Jul 2002 | B1 |
6426940 | Seo et al. | Jul 2002 | B1 |
6427196 | Adiletta et al. | Jul 2002 | B1 |
6430626 | Witkowski et al. | Aug 2002 | B1 |
6434145 | Opsasnick et al. | Aug 2002 | B1 |
6463072 | Wolrich et al. | Oct 2002 | B1 |
6532509 | Wolrich et al. | Mar 2003 | B1 |
6552826 | Adler et al. | Apr 2003 | B2 |
6560667 | Wolrich et al. | May 2003 | B1 |
6577542 | Wolrich et al. | Jun 2003 | B2 |
6584522 | Wolrich et al. | Jun 2003 | B1 |
6587906 | Wolrich et al. | Jul 2003 | B2 |
6606704 | Adiletta et al. | Aug 2003 | B1 |
6625654 | Wolrich et al. | Sep 2003 | B1 |
6631430 | Wolrich et al. | Oct 2003 | B1 |
6631462 | Wolrich et al. | Oct 2003 | B1 |
6661794 | Wolrich et al. | Dec 2003 | B1 |
6665755 | Modelski et al. | Dec 2003 | B2 |
6667920 | Wolrich et al. | Dec 2003 | B2 |
6668317 | Bernstein et al. | Dec 2003 | B1 |
6681300 | Wolrich et al. | Jan 2004 | B2 |
6694380 | Wolrich et al. | Feb 2004 | B1 |
6718457 | Tremblay et al. | Apr 2004 | B2 |
6745317 | Mirsky et al. | Jun 2004 | B1 |
6868476 | Rosenbluth et al. | Mar 2005 | B2 |
6876561 | Wolrich et al. | Apr 2005 | B2 |
6895457 | Wolrich et al. | May 2005 | B2 |
20020116587 | Modelski et al. | Aug 2002 | A1 |
20030067913 | Georgiou et al. | Apr 2003 | A1 |
20030069920 | Melvin et al. | Apr 2003 | A1 |
20030145159 | Adiletta et al. | Jul 2003 | A1 |
20030145173 | Wolrich et al. | Jul 2003 | A1 |
20040039895 | Wolrich et al. | Feb 2004 | A1 |
20040054880 | Bernstein et al. | Mar 2004 | A1 |
20040071152 | Wolrich et al. | Apr 2004 | A1 |
20040073728 | Wolrich et al. | Apr 2004 | A1 |
20040073778 | Adiletta et al. | Apr 2004 | A1 |
20040098496 | Wolrich et al. | May 2004 | A1 |
20040109369 | Wolrich et al. | Jun 2004 | A1 |
Number | Date | Country |
---|---|---|
0 379 709 | Aug 1990 | EP |
0 464 715 | Jan 1992 | EP |
0 633 678 | Jan 1995 | EP |
0 745 933 | Dec 1996 | EP |
0 809 180 | Nov 1997 | EP |
1 148 414 | Oct 2001 | EP |
59111533 | Jun 1984 | JP |
WO 9415287 | Jul 1994 | WO |
WO 9738372 | Oct 1997 | WO |
WO 0116769 | Mar 2001 | WO |
WO 0116770 | Mar 2001 | WO |
WO 0116782 | Mar 2001 | WO |
WO 0148596 | Jul 2001 | WO |
WO 0148606 | Jul 2001 | WO |
WO 0148619 | Jul 2001 | WO |
WO 0150247 | Jul 2001 | WO |
WO 0150679 | Jul 2001 | WO |
WO 0195101 | Dec 2001 | WO |
WO 0197020 | Dec 2001 | WO |
Number | Date | Country | |
---|---|---|---|
20050216710 A1 | Sep 2005 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 10053172 | Jan 2002 | US |
Child | 11092366 | US |