This application is related to application Ser. No. 10/184,772 titled “Scheduler for Streaming Vector Processor”, filed Jun. 28, 2002 and to application Ser. No. 10/184,583, titled “Reconfigurable Streaming Vector Processor”, filed Jun. 28, 2002.
This invention relates generally to the field of microprocessors. More particularly, certain embodiments consistent with this invention relate to a method and apparatus for dataflow graph compression for power and memory reduction.
VLIW (very long instruction word) processors are characterized by their ability to process multiple instructions in parallel using different functional units within the processor. Other processors, such as dual-path processors have a similar capability. A VLIW instruction comprises a number of sub-words or fields, each of which controls a functional unit within the processor. Fully parallel operation, in which all functional units are used at each time step, is rare. More commonly, many instructions contain “NOP” instructions in several of the sub-words or fields, indicating that the corresponding functional unit is not operated at that time step.
Power reduction in processors controlled by VLIWs or other multiple-instruction words is very important in handheld computing devices, such as PDAs, digital cameras, navigation devices and cellular telephone handsets that rely on battery power. Power reduction can be used to reduce the weight and/or increase the operating time of a device. Two techniques for power saving are (i) reducing memory accesses by reducing the size of the program of instructions (compression), and (ii) disabling hardware resources (memory and functional units) when they are not required.
VLIW compression schemes are used in many VLIW architectures (e.g., IA-64, StarCore, TI DSPs). The goal of these schemes is the elimination of all NOPs from the instruction stream. This reduces the memory requirements for the code, and it reduces the memory bandwidth required to fetch instructions.
In one method of power saving, special instructions are added to a processor to shut down the datapath elements under program control. In a further method, datapath elements are disabled based on an instruction pre-decode stage. The instruction words are examined and the datapath is dynamically disabled on an instruction-by-instruction basis. A disadvantage of these approaches is that they add to dataflow graph complexity.
In one method of compression, NOPs are eliminated from the code by rearranging the slices within VLIW words, so that NOP fields in sequential VLIWs line up (are at the same location in the VLIW word). This allows banks of memory to be powered off for periods of time, saving power. A disadvantage of this method is the complexity associated with rearranging the slices within VLIW words.
Certain embodiments consistent with the present invention relate generally to memory and power saving in microprocessors that use multiple-instruction control words. Objects, advantages and features of the invention will become apparent to those of ordinary skill in the art upon consideration of the following detailed description of the invention.
In accordance with certain embodiments of the invention is a mechanism for efficiently eliminating NOPs from multiple-instruction control words, while at the same time disabling unused elements in the processor and unused instruction memory banks. A multiple-instruction control word comprises a number of ordered fields, with each field containing an instruction for an element of the processor. The sequence of instructions for a loop is compressed by identifying a set of ‘aligned’ fields that contain NOP instructions in all of the control words of the sequence. The NOP instructions are ‘aligned’ if they occur at the same position within the control word, i.e. they are associated with the same element of the processor. The sequence of control words is then modified by removing the fields in the identified set of aligned fields containing NOP instructions and adding an identifier that identifies the set of fields removed. The sequence of control words is processed by fetching the identifier at the start the loop, then, for each control word in the sequence, fetching a control word and reconstructing the corresponding uncompressed control word by inserting NOP instructions into the compressed control word as indicated by the identifier. The identifier may be a bit-mask and may used to disable memory units and processing elements for the duration of the loop to reduce power consumption by the processor.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, together with objects and advantages thereof, will best be understood by reference to the following detailed description of certain illustrative embodiments consistent with the present invention when read in conjunction with the accompanying drawing(s), wherein:
While this invention is susceptible of embodiment in many different forms, there is shown in the drawings and will herein be described in detail one or more specific embodiments, with the understanding that the present disclosure is to be considered as exemplary of the principles of the invention and not intended to limit the invention to the specific embodiments shown and described. In the description below, like reference numerals are used to describe the same, similar or corresponding parts in the several Views of the drawings.
The invention is described with reference to a re-configurable streaming vector processor (RSVP). However, the invention is applicable to other processors that use multiple-instruction control words.
The RSVP is a statically scheduled VLIW machine that executes dataflow graphs on vector data (data streams) in a highly pipelined fashion. Typically, a dataflow graph is a representation of the entire inner loop of a computation. The VLIW nature of RSVP can be exploited to reduce the power in the RSVP datapath by disabling the portions of the datapath that are not utilized by a particular dataflow graph. This mechanism is simple, inexpensive, and provides significant power savings.
A dataflow graph in RSVP is represented as a collection of VLIW control words that are executed repeatedly as a loop. These control words contain sub-words or fields, each of which is responsible for controlling a portion of the datapath (datapath element). An exemplary dataflow graph is shown in
According to one aspect of the present invention, any columns that contain only NOPs are eliminated when the executable code is created. In addition, the VLIWs are compressed by removing these NOPs. A compression mask, shown as the last row in the
This approach is in contrast to prior techniques since the entire data graph is considered in the compression operation and only the NOPs that are naturally aligned are removed. The fields in the VLIWs are not rearranged to line up NOPs. Thus, the compression technique of the present invention is simple to implement and may be automated.
The resulting compressed VLIWs are shown in
One embodiment of a system for processing VLIW instructions is illustrated in
In addition, the compression mask is passed via link 112 to the datapath elements and is used to enable or disable the datapath elements. Since the mask locations map 1:1 to the datapath elements (control fields), the raw mask bits may be used to clock gate the datapath. The datapath element shutdown is initiated using the compression mask supplied in a header word associated with a dataflow graph. This mask is examined once, and for the duration of the dataflow graph in question, the affected function units remain disabled.
The task of MPEG4 encoding on an RSVP is now considered as an example. In MPEG4 encoding on the RSVP, there are 18 separate dataflow graphs. Upon averaging all 18 graphs, 52% of the datapath control fields in the VLIW word are unused, and the corresponding datapath elements can be disabled for the duration of the graph. In addition, approximately half of the VLIW memory banks can be disabled.
The present invention combines both memory and datapath power reduction in a single mechanism.
Those of ordinary skill in the art will recognize that the present invention has been described in terms of exemplary embodiments based upon use of dataflow graphs for an RSVP. However, the invention should not be so limited, since the present invention could be implemented using hardware component equivalents such as special purpose hardware and/or dedicated processors, which are equivalents to the invention as, described and claimed. Similarly, general purpose computers, microprocessor based computers, digital signal processors, microcontrollers, dedicated processors, custom circuits, ASICS and/or dedicated hard wired logic may be used to construct alternative equivalent embodiments of the present invention.
While the invention has been described in conjunction with specific embodiments, it is evident that many alternatives, modifications, permutations and variations will become apparent to those of ordinary skill in the art in light of the foregoing description. Accordingly, it is intended that the present invention embrace all such alternatives, modifications and variations as fall within the scope of the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
3718912 | Hasbrouck et al. | Feb 1973 | A |
4128880 | Cray, Jr. | Dec 1978 | A |
4744043 | Kloker | May 1988 | A |
4760545 | Inagami et al. | Jul 1988 | A |
4807183 | Kung et al. | Feb 1989 | A |
4825361 | Omoda et al. | Apr 1989 | A |
4918600 | Harper et al. | Apr 1990 | A |
5206822 | Taylor | Apr 1993 | A |
5317734 | Gupta | May 1994 | A |
5367494 | Shebanow et al. | Nov 1994 | A |
5390352 | Kinoshita | Feb 1995 | A |
5418953 | Hunt et al. | May 1995 | A |
5423040 | Epstein et al. | Jun 1995 | A |
5450607 | Kowalczyk et al. | Sep 1995 | A |
5495617 | Yamada | Feb 1996 | A |
5542084 | Lowe, Jr. | Jul 1996 | A |
5652909 | Kodosky | Jul 1997 | A |
5697788 | Ohta | Dec 1997 | A |
5717947 | Gallup et al. | Feb 1998 | A |
5719998 | Ku et al. | Feb 1998 | A |
5734863 | Kodosky et al. | Mar 1998 | A |
5742821 | Prasanna | Apr 1998 | A |
5764787 | Nickerson | Jun 1998 | A |
5790877 | Nishiyama et al. | Aug 1998 | A |
5805614 | Norris | Sep 1998 | A |
5821934 | Kodosky et al. | Oct 1998 | A |
5826080 | Dworzecki | Oct 1998 | A |
5852729 | Limberis et al. | Dec 1998 | A |
5881257 | Glass et al. | Mar 1999 | A |
5881263 | York et al. | Mar 1999 | A |
5887183 | Agarwal et al. | Mar 1999 | A |
5893143 | Tanaka et al. | Apr 1999 | A |
5936953 | Simmons | Aug 1999 | A |
5966528 | Wilkinson et al. | Oct 1999 | A |
5969975 | Glass et al. | Oct 1999 | A |
5999736 | Gupta et al. | Dec 1999 | A |
6052766 | Betker et al. | Apr 2000 | A |
6064819 | Franssen et al. | May 2000 | A |
6104962 | Sastry | Aug 2000 | A |
6112023 | Dave et al. | Aug 2000 | A |
6128775 | Chow et al. | Oct 2000 | A |
6173389 | Pechanek et al. | Jan 2001 | B1 |
6192384 | Daily et al. | Feb 2001 | B1 |
6202130 | Scales et al. | Mar 2001 | B1 |
6253372 | Komatsu et al. | Jun 2001 | B1 |
6370560 | Robertazzi et al. | Apr 2002 | B1 |
6381687 | Sandstrom et al. | Apr 2002 | B2 |
6430671 | Smith | Aug 2002 | B1 |
6437804 | Ibe et al. | Aug 2002 | B1 |
6442701 | Hurd | Aug 2002 | B1 |
6490612 | Jones et al. | Dec 2002 | B1 |
6513107 | Ansari | Jan 2003 | B1 |
6571016 | Mehrotra et al. | May 2003 | B1 |
6588009 | Guffens et al. | Jul 2003 | B1 |
6598221 | Pegatoquet et al. | Jul 2003 | B1 |
6629123 | Hunt | Sep 2003 | B1 |
6647546 | Hinker et al. | Nov 2003 | B1 |
6665749 | Ansari | Dec 2003 | B1 |
6732354 | Ebeling et al. | May 2004 | B2 |
6745160 | Ashar et al. | Jun 2004 | B1 |
6792445 | Jones et al. | Sep 2004 | B1 |
6795908 | Lee et al. | Sep 2004 | B1 |
6898691 | Blomgren et al. | May 2005 | B2 |
7000232 | Jones et al. | Feb 2006 | B2 |
7010788 | Rehg et al. | Mar 2006 | B1 |
20020080795 | Van Wageningen et al. | Jun 2002 | A1 |
20020112228 | Granston et al. | Aug 2002 | A1 |
20020120923 | Granston et al. | Aug 2002 | A1 |
20030128712 | Moriwaki et al. | Jul 2003 | A1 |
20040003206 | May et al. | Jan 2004 | A1 |
20040117595 | Norris | Jun 2004 | A1 |
20050053012 | Moyer | Mar 2005 | A1 |
20050055534 | Moyer | Mar 2005 | A1 |
20050055543 | Moyer | Mar 2005 | A1 |
Number | Date | Country | |
---|---|---|---|
20050050300 A1 | Mar 2005 | US |