ADAPTIVE INSTRUCTION PROCESSING BY ARRAY PROCESSOR HAVING PROCESSOR IDENTIFICATION AND DATA DEPENDENT STATUS REGISTERS IN EACH PROCESSING ELEMENT

Abstract: Equipping individual processing elements with instruction derivation means provides an array processor with adaptive spatial-dependent and data-­ dependent processing capability. The instruction becomes variable, at the processing element level, in response to spatial and data parameters of the data stream. An array processor can be optimized, for example, to carry out very different instructions on spatial-dependent data such as blank margin surrounding the black lines of a sketch. Similarly, the array processor can be optimized for data-dependent values, for example to execute different in­ structions for positive data values than for negative data values. Providing each processing element with a processor identification register permits an easy setup by flowing the setup values to the individual processing elements, together with setup of condition control values. Each individual adaptive processing element responds to the composite values of original setup and of the data stream to derive the instruction for execution during the cycle. In the usual operation, each adaptive processing element is individually addressed to set up a base instruction; it also is conditionally set up to execute a derived instruction instead of the base instruction. An array processor made up of adaptive processing elements can adapt dynamically to changes in its input data stream, and thus can be dynamically optimized, resulting in greatly en­ hanced performance at very low incremental cost.

Description: This invention relates generally to array processors, for example image processors which process data streams passing through arrays of processing elements, each processing element executing an assigned instruction. Typical array processors are described in the following references:- NCR GEOMETRIC ARITHMETIC PARALLEL PROCESSOR, product specification NCR45CG72, NCR Corp., Dayton, OH, 84, pp. 1-12, shows physical characteristics of a representative array processor. Cloud et al, HIGHER EFFICIENCY FOR PARALLEL PROCESSORS, IEEEE Southcon, reprint published by NCR Corporation Mircro-electronics Div., For Collins, Collins, CO, pp 1-7, shows details of operation of NCR's geometric arithmetic parallel processor (GAPP). Current computer systems are categorised, according to instruction stream and data stream, into four classes. They are: SISD (Single Instruction stream Single Data stream). SIMD (Single Instruction stream Multiple Data stream). MISD (Multiple Instruction stream Single Data stream). MIMD (Multiple Instruction stream Multiple Data stream). Commercially available supercomputers are exemplified by the Cyber series from CDC, the CRAY series from CRAY Research and the NEC AP series. All these machines are of MISD architecture and require a long setup time for setting up the instruction pipe to process a vector. The overhead is large if the frequency of the pipe setup is high or the vector is short; the performance is consequently low in such cases. Data dependence in a loop degrades the performance of these supercomputers. The machines are either prevented from presetting the pipe until the data dependence is resolved (e.g. status is known exactly) or will set up the pipe for one path (e.g. status is true) when higher probability. The former case delays the execution while the latter case involves the resetting of the pipe (i.e. increase the pipe setup frequency) if the "guess" is wrong. Both cases degrade the performance. The lack of spatial and/or data adaptation leads to the following drawbacks: 1. Data-dependent operations are processed sequentially, which leads to a waste of the parallel hardware, hence to lower performance; 2. Data with spatial significance are treated as exception, which prevent the parallel opportunity; 3. Interconnections of parallel computers are fixed, which restricts the algorithm versatility; 4. Complementary operations (e.g. SEND/RECEIVE pair) caused by data or spatial dependence are performed sequentially, which implies longer execution time; 5. Communication bandwidth is accordingly wasted; 6. Different copies of the program must be generated for processing elements (PEs) with different spatial conditions, which leads to larger software effort. (1)Data-Dependent Parallel Processing Current parallel computers are efficient in processing a loop with a long running index, but do not support efficiently the loop with data dependence. Specifically, one type of data independent loop is shown as follows: The processing can be very well supported by most known SIMD, MISD and MIMD machines. But when the data dependence is added to the program as shown in the following, no existing parallel machines can handle it efficiently. (2)Spatial-dependent Parallel Processing In image processing and other applications where data are associated with spatial conditions, data are not handled homogeneously, but rather are subject to their spatial dependence. For example, the data on the boundary of an image are treated differently from the other non-boundary data; this is one type of spatial dependence reflected by data. In this situation, there are two major drawbacks when applying parallel processing: 1. The degree of parallelism can only be extended to the homogeneous part of the data; consequently, the non-homogeneous data (e.g. boundary) are forced to be processed sequentially. This degrades the performance of a parallel system; 2. The program (or coding) for the non-homogeneous data differs from the program for their homogeneous counterpart; therefore, more than one copy of the coding must be prepared. This leads to larger software effort. There is described in European Patent Application EP-A-0121763 an array processor in which individual processors in the array include a programmable logic array which serves as a presettable instruction decoder the output of which can be modified in response to applied data to provide a simple choice of processor operation. While providing some degree of adaptability, the range of alternative functions is severely limited, as indicated in Table 2 on page 29 of this application. In particular there is no provision for the type of adaptation required by the examples discussed above. Another approach is described in US Patent No. 3,287,702. Here, individual processors can be preset by a central controller to operate in one of a number of modes to adapt the array to the requirements of particular applications. No facility is provided for adjusting the operation of the individual processors dynamically after the various mode registers have been reloaded, which precludes effective solution of the problems discussed above. According to the invention we provide an array processor having a control unit with instruction issuing capability and having an array of individual processing elements for processing data according to instructions applied simultaneously to processing elements by the control unit, each processing element having processing means and input/output means connected to other processing elements characterised in that selected processing elements each include an instruction adapter having a processor identification register, a bit group selector an agreement verifier and an instruction modifier, said processor identification register, bit group selector and agreement verifier serving to define a movable window to select modifier bits for application to said instruction modifier. In order that the invention may be well understood, a preferred embodiment thereof will now be described with reference to the accompanying drawings, in which: BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an array processor with one representative adaptive processing element presented in block diagram according to the invention. FIG. 2 is a detailed block diagram of the instruction adapter IA of FIG. 1. FIG. 3 is a detailed block diagram of an instruction adapter according to a simplified embodiment. FIG. 4 is a detailed block diagram of an instruction adapter for a multidimensional network array processor. FIG. 5 is a detailed block diagram of a further embodiment of the instruction adapter. DESCRIPTION OF A PREFERRED EMBODIMENT OF THE INVENTION The adaptive instruction processor assigns a processor identification (PID) to each adaptive processing element in the parallel computer. It collects a set of data-dependent-status (DDS) bits from the arithmetic & logic unit (ALU) of the adaptive processing element. It then uses an Instruction Adapter (IA) to derive the instruction subject to the spatial dependence and data dependence reflected by the PID, DDS and the original instruction. FIG. 1 shows the array processor, which is similar in concept and operation to array processors known in the art, except in so far as handling of data dependencies and spatial dependencies is concerned. The image processor comprises adaptive processing element array 1 and array controller 2, both of which are shown schematically. Array controller 2 provides a set of instructions on instruction line 3, and provides a communication path 4 for input and output data. Processing element array 1 contains a great number of individual adaptive processing elements 5, each of which is equipped for adaptation according to this invention. Processing element array 1 might contain conventional processing elements 6, so long as there is awareness of which type of processing element is in each location, and housekeeping is done accordingly, but this is not preferred. It is preferred to make all the processing elements identical adaptive processing elements, and where conventional performance is desired, to adapt those elements, for example, those identified as elements 6, to perform conventionally. Image processing proceeds in conventional image processor fashion so far as dataflow is concerned; data enter the processing element array and flow from processing element to processing element in accordance with initial data values as modified by processing elements through which the data pass, without intervening access to system memory. The individual processing elements are set up prior to dataflow commencement. In a conventional image processor, there is little chance to alter the setup during execution because for all practical purposes the exact position of data during execution is unknown. In essence, an image processor, once set up, is for the duration of the execution a specialized, fixed operation computer. This invention provides for dynamic changes of setup during execution, by equipping each of the multiplicity of adaptable adaptive processing elements with its own processor identification register, its own data dependent status register, and its own instruction adaptation mechanism which is responsive to the composite of processor identification data, status data, and the applied instruction to provide internal selection of operation for the adaptive processing element. On a system basis, this provides convenient adaptation to spatial and data dependencies, which permits system optimization for the type of data being processed. A representative one of the many adaptive processing elements 5, adaptive processing element 7, is shown in greater detail. Communication path 70, local memory 71, and arithmetic and logic unit (ALU) 72 are conventional, similar in scope and effect to the analogous items in a conventional processing element. In general, these items can function to accept an assignment (instruction) and execute the assignment on each item of data as it is presented. The computation cycle, shown simplified in time line 8, uses an original instruction, shown simplified in original instruction view 9, to derive an instruction for execution. In operation, the original instruction, spatial dependent status and data dependent status values are available early in a cycle, as shown by values X,Y,Z on time line 8. The derived instruction then becomes available for control of computation C. Adaptability is provided by instruction adapter (IA) 73, which accepts from original instruction line 74 an instruction invoking adaptability, performs appropriate tests on data as presented, determines from test results whether to adapt by deriving a substitute instruction, and provides the substitute derived instruction to ALU 72 on derived instruction line 75. The ALU includes or serves as a data dependent status register (DDS) to provide freshly processed data dependent status bits back on DDS test data line 76 to IA 73. The adaptability invoking instruction, presented on adaptability control line 74, is made available to spatial dependent status block (SDS) 77, to dependence select and verify block (DSV) 78, and to instruction modify and extend block (IME) 79. The instruction adapter (IA) block 73 accepts an original instruction (of the type which invokes its own modification under specified circumstances) and generates, as output, a derived instruction on line 75 to ALU block 72. This controls the operations of the adaptive processing element. A typical instruction set, such as that shown in NCR45CG72, 1984, at page 7, includes a micro-NOP instruction, several load/store instructions for inter-processing-element communication, and arithmetic/logic operations. FIG. 1 illustrates the instruction format of the derived instruction at inset derived instruction view 80. The derived instruction has an "agreement bit" inserted to the input instruction in one or more prescribed bit positions. The "agreement bit" is a function of the PID, DDS and the input instruction while the "prescribed bit position" can be predetermined from the format of the input instruction and the derived instruction. The "agreement bit" can also overwrite the bits of the input instruction at the prescribed positions. The individual adaptive processing element remains quite simple. Three major building blocks are registers, shift registers and multiplexers, all of which are common parts available from a number of suppliers and familiar to those skilled in the art. Such parts are described in THE TTL DATA BOOK FOR DESIGN ENGINEERS, Second Edition, Texas Instruments Corporation, LCC4112 74062-116-AI, pp. 7-471;7-316; and 7-181. The following examples are typical of building blocks appropriate for selection: FIG. 2 shows the structure of the instruction adapter (IA) 73, which contains three functional blocks as follows: 1. Spatial dependent status block (SDS) 77; 2. Dependence select and verify block (DSV) 78; and 3. Instruction modify and extend block (B) 79. The Spatial Dependence Status (SDS) block 77 accepts part of the input instruction as control and produces SDS bits as output to indicate the spatial dependence. This block contains a PID register 81 whose content is the PID of the PE. The PID register can be preloaded by the input instruction. The content of the PID register 81 must be correlated to spatial location, for example x-y coordinates. It also contains a shift register 82 of the same size as PID register 81. The shift register 82 can perform a logic-shift operation, one bit at a time, in either direction. This mechanism allows for any bit group of the PID register to be available on line 88 as the input to the DSV block 78. The second functional block is the "Dependence Select and Verify (DSV)" block 78. The DSV block 78 contains a multiplexer 83 to select some of the SDS bits or DDS bits. A template register 84 is included in this block for matching, masking and comparing purpose. The selected dependent bits and the template are passed to the "agreement verifier" 85 to generate an "agreement bit." Template register 84 contains decision threshold information, preset at initialization. In a typical operation, all template registers are set to the same value to mask a certain subgroup of bits. On a particular cycle, all shift registers are operated similarly, according to instruction, to accomplish sampling of a group of bits in the related PID register and align those bits appropriately. The template register and shift register together function so as to select the interested bits from the PID. The usual operation is as a movable window, including two consecutive bits to assign the hardware differently for different items of interest or different image subsets. The agreement verifier can perform COMPARE, AND, OR and XOR operations. In summary, the DSV block accepts SDS bits and DDS bits as input, and generates the "agreement bit" as output. The DSV block accepts part of the input instruction as control. The DDS bits indicate the nature of the data and are used for data adaptation. Common DDS bits include positive/negative, zero/non-zero, positive/non-positive, true/false, greater/equal/less, even/odd. Any other status that can be derived from the Arithmetic Logic Unit (ALU) 72 of the adaptable processing element 7 can be identified by status bits. The third block is the "instruction modify and extend (IME)" block 79. The IME block 79 accepts the agreement bit and the input instruction as inputs, and generates the derived instruction as output. The IME block 79 has a "bit overwriter" to replace some bits of the input instruction by the agreement bit at the prescribed positions. The block also has a "bit inserter" which inserts the agreement bit into the input instruction at the prescribed positions. The selection of overwriting or insertion or both, and the prescribing of the positions, are controlled by part of the input instruction. With these three functional blocks, the IA can perform the following "dependent operations" to facilitate the spatial and/or data adaptation: (1) detecting any one bit of DDS being "1"; (2) detecting the i-th bit of the PID register being "1"; and (3) detecting any M contiguous bits of the PID register matching to the template where M is smaller or equal to the total number of bits of the PID. The above-described generic embodiment encompasses the invention. Specific implementations can be a partial collection of each functional block. Implementation of Simplified Adaptive Processing Element A very efficient simplified implementation of the Instruction Adaptor (IA) 73 is illustrated in Figure 3. The content of the PID register 81 is copied to a logical shift register (LSR) 91 which can perform logic-shift operations in both directions. The bits shifted out from them and the rightmost bit of the logical shift-register 91 are the SDS bits. A multiplexer then selects one of the SDS or DDS bit as the agreement bit. Such an implementation can perform one dimensional and two dimensional operations. This implementation is suitable for an adaptive processing element with less complexity, because of the elimination of the template register 84 (FIG. 2) and the agreement verifier 85. Implementation for Multidimensional Network FIG. 4 shows the spatial dependent status block generalized to detect spatial dependence of a multidimensional interconnection network of a parallel computer, such as an array in 2D or a pyramid in 3D. The PID register may be considered as comprising K sections 1-K. The shift register 92, which is analogous to the shift registers 82 and 91 in FIGs. 1-2, in SDS block 77, is partitioned into K sections, where K is the dimension of the network. Each section manipulates the spatial dependence for one dimension of the network. The rightmost and the leftmost bits of each section are SDS bits which are passed to the multiplexer 83 in the DSV block 78 for spatial dependence detection. APPLICATIONS AND BENEFITS (1) Data-Dependent and Spatial-Dependent Parallel Processing With adaptive instruction processing according to the invention, one can restructure as follows: Complementary operations are possible. An example of the complementary operation is the +/- (add or subtract) pair. The "agreement" bit is derived from the "condition," which can be data-dependent or spatial-dependent. As the result of the restructuring, the sequential execution of action 1/action 2 can be totally parallelized into one unified action 3. The problem can also be restructured in the following way: An "agreement" bit is derived from the "condition" and is used to generate an "address offset" by either overwriting or inserting the appropriate field of the input instruction. The code for action 1 and action 2 are then structured D distance apart where D is equal to the "address offset." During the runtime, each PE will"jump" to the right entry of the code according to the spatial condition of the data. Note that only one version of the coding is necessary. A non-homogeneous problem due to the spatial dependence can be converted to a homogeneous one by this invention, so that the degree of parallelism can be more extensive and software effort can be reduced. (2) Universal Network Emulation This invention resolves the spatial dependence due to the relative or absolute position (or coordinate) of PEs in a parallel computer which has one single fixed baseline network to connect the PEs in the system. It is advantageous from an algorithm development point of view to have more than one network (or interconnection) embedded in a parallel processing system, because no single network optimally matches to various algorithms. In a parallel system with such network emulation capability, a network can be emulated from the baseline interconnection via using the adaptive instruction processor. For example, the pyramid network can be emulated from the baseline array interconnection of size NxN by the adaptive instruction processor. The PID register of each adaptive processing element in the array is loaded with the appropriate Cartesian coordinate value (x, y). At time t=1, all PEs are active. At t=2, only adaptive processing elements with x or y equals to the multiple of 2 are active. At t=3, only adaptive processing elements with x or y equals to the multiple of 4 are active. In summary, at t=i only adaptive processing elements with x or y equals to the multiple of 2x(i-1) are active. The above-described procedure emulates a pyramid network of shrinkage 2 (i.e. for every further time step, only 1/4 of the total PEs are connected with distance one) from the baseline array network. The control of the emulation can be done by examining the content of the two-dimensional PID register and activates the PE if the "agreement" bit is true. The same adaptive instruction processor can also be applied to the emulation of networks such as tree, ring and perfect shuffle etc. from a baseline interconnection. The network emulation is a very powerful mechanism in producing multiple parallel architectures from a single PE type. Along with the economic and logistic benefits, the algorithm can have a better match to the architecture, so that the performance can be increased. Because only one element type is required, such emulation scheme is especially suitable for VLSI implementation. (3) Complementary Operations A complementary operation is a pair of operations that can be distributed between two adaptive processing elements and executed simultaneously. Examples of the complementary operations include the SEND/RECEIVE pair for interprocessor communication and the Butterfly computation of FFT (Fast Fourier Transform). Another example is the +/- instruction described in application (1). When applied to the complementary operations, the adaptive instruction scheme can speed the execution and save communication bandwidth. Consider the SEND/RECEIVE example for the SIMD array architecture. One adaptive processing element (based on the knowledge of its position in the array, i.e., spatial knowledge) sends data through an interconnection to its neighbor PE while its neighbor PE (based on this spatial knowledge) receives these data through the same interconnection. The operation can be accomplished in one cycle using one unit of communication bandwidth for one datum. For the SIMD architecture without topology-dependent adaptation, the same operation needs two execution cycles and/or two units of communication bandwidth. In the case of Butterfly computation, sequential execution in a conventional image processor may require 4 cycles. With the adaptive instruction processor, it can be reduced to 2 cycles, (with 2 adaptive processing elements) or even to 1 cycle (with 4 adaptive processing elements). This is achieved by first sending the instruction ADD/SUB to all adaptive processing elements. Each adaptive processing element then maps the instruction into either ADD or SUB according to its spatial condition. Application of complementary operations are not limited to the above examples. In fact, many other applications can be found in image processing, computer vision, digital signal processing, mathematical transformation and general scientific computation. (4) Adaptive Supercomputer Adaptive instruction processing can resolve the data dependent problem and increase the performance of a supercomputer. An instruction called OPA/OPB (operation A or operation B) can be defined and one agreement bit selected to adapt the instruction. The derived instruction will execute OPA if the agreement bit is "1" or OPB if the agreement bit is "0." The pipe within the supercomputers can be set up in advance for instruction OPA/OPB and the vector execution can be started once the agreement bit is available. The probability of"guessing right"is always"1"because of the data adaptation. EXAMPLE ILLUSTRATING THE INVENTION This example illustrates the adaptive instruction processor operating in a spatial adaptation case. With the aid of Figure 5, this example shows how an original instruction is modified as a function of the Processor IDentification (PID). As a result, the following computation can be executed efficiently. A simplified original instruction and derived instructions are depicted first as a background; then a design realizing the invention is detailed in Figure 5 with companion description. Instruction Format Among the M bits of the original instruction, the K-th bit controls the action of either SEND/REC or +/- as described below: In contrast to the original instruction, the derived instruction has two bits, the r-th and the r+1-th bit, pertinent to this example. The action of the adaptive processing element is prescribed as follows: For instance, the PE performs "+" when the r-th bit of the modified instruction is "0" and the r+1-th bit is "1." A Sample Design for the Invention Figure 5 shows another embodiment using multiple multiplexers. A portion of the original instruction commands the shift register 91, which contains the processor identification PID, to SHIFT RIGHT one bit position; as a result, the least significant bit in the processor identifiction register (LSBPID) is placed in one of the inputs to the Dependence Selection and Verify (DSV) Block 78. Figure 5 illustrates a sample design to translate the K-th bit (I<K>) of the original instruction into the r-th and the r+1-th bits (IM<r> and IM<r+1>) of the modified instruction according to the Least Significant Bit of PID (LSBPID, i.e. PID<0>). Another portion of the original instruction on adaptability control lines 74′ then commands the DSV block 78 to SELECT the LSBPID as the output of the multiplexer in DSV Block. Consequently, LSBPID is placed on the line of "agreement bit." As the inputs of the Instruction Modify and Extend (IME) Block 79, the "agreement bit" (now carrying the LSBPID) and the original instruction (carrying I<K> and other bits) are routed into a set of multiplexers 84-86 to produce the derived instruction. J multiplexers are required for a J-bit derived instruction, one multiplexer to produce one bit of the derived instruction. To produce IM<r>, the original instruction command the "multiplexer r" to SELECT I<K> as the output. Similarly, the original instruction commands "multiplexer r+1" to SELECT the "agreement bit" as IM<r+1>. A table below shows the relationship among the original instruction (I<K>), the LSBPID and the modified instruction (IM<r> and IM<r+1>), which demonstrates the realization of the invention via the design illustrated in Figure 5.

Claims: An array processor having a control unit (2) with instruction issuing capability and having an array of individual processing elements (7) for processing data according to instructions applied simultaneously to processing elements by the control unit, each processing element having processing means (72) and input/output means (70) connected to other processing elements characterised in that selected processing elements each include an instruction adapter (73) having a processor identification register (81), a bit group selector (82) an agreement verifier (85) and an instruction modifier (70), said processor identification register, bit group selector and agreement verifier serving to define a movable window to select modifier bits for application to said instruction modifier. A processor as claimed in claim 1, wherein said bit group selector is a shift register connected to perform logic shift operations on the contents of said processor identification register, further including a template register (84) adapted to select data for application to said agreement verifier. A processor as claimed in claim 2, wherein said processor identification register is divided into sections 1....K-1, K and said shift register is similarly divided into section 1...K-1, K and interconnected section by section with said processor identification register (81 ). A processor as claimed in any of claims 1 to 3 wherein said agreement verifier comprises a tree of multiplexers arrayed to provide agreement bit values as a composite function of original instruction and data values to said instruction modifier.

Inventors: LI, HUNGWEN, WANG, CHING-CHY
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1987
Main classification: G06F15
IPC codes: G06F15, F02B75, G06T1, G06F9