Abstract:
A method is described for simulating a hexagonal array of computer processors or memories in a computer in which the processor and/or memories are physically connected in a rectilinear grid. The grid provides for communication between adjacent processors in both the horizontal and vertical directions. Thus, it provides physical connections between each processor and four nearest neighbor processors. Each processor is provided with two additional nearest neighbor processors by providing communication between each processor of the array and two additional adjacent processors located on different diagonals in the array. As a result of this arrangement the two additional processors are located either in the same column but in different rows adjacent to the row in which the neighboring processor is located or they are in the same row but in different columns adjacent to the column in which the neighboring processor is located. These additional communication patterns for all the processors add to the rectilinear array a zig zag communication pattern running through the array in either the vertical or horizontal direction.

Description:
This is a continuation of application Ser. No. 07/275,694, filed Nov. 23, 1988 which is a continuation of Ser. No. 06/825,510, filed Feb. 3, 1986, both are now abandoned. 
    
    
     CROSS REFERENCE TO RELATED APPLICATIONS 
     Related applications are &#34;Parallel Processor&#34;, Ser. No. 499,474 now U.S. Pat. No. 4,814,973 and &#34;Parallel Processor/Memory Circuit&#34;, Ser. No. 499,471, now U.S. Pat. No. 4,709,327 both filed May 31, 1983, &#34;Method and Apparatus for Routing Message Packets&#34;, Ser. No. 671,835, filed Nov. 15, 1984 now U.S. Pat. No. 4,598,400, &#34;Method and Apparatus for Interconnecting Processors in a Hyper-Dimensional Array&#34;, Ser. No. 740,943, filed May 31, 1985, now abandoned and &#34;Method and Apparatus for Simulating Systems Described by Partial Differential Equations&#34;, Ser. No. 814,348, filed Dec. 27, 1985, now U.S. Pat. No. 4,809,202 all of which are incorporated herein by reference. 
     BACKGROUND OF THE INVENTION 
     This relates to a method of simulating a hexagonal array of computer processors and/or memories and in particular to a method of simulating such arrays in a computer in which individual processors and/or memories are physically connected in a rectilinear grid. 
     Computer memories are typically organized in serial order at consecutive memory addresses or locations. The physical location of the memories usually is in the same numerical order as their addresses. 
     In parallel computers, processors are sometimes organized in a rectilinear array in which each processor is physically connected to adjacent processors in the same row and column. Thus each processor is connected to its nearest neighbor processors to the north, east, south and west. In the Connection Machine (Reg. TM) Computer that is described in the above referenced &#39;474 application, each processor in an array of thousands of processors has its own memory and each processor/memory is connected in two different networks, one of which is a rectilinear array. 
     In certain applications it is desirable to interconnect processors and/or memories in more complicated networks than a rectilinear array. For example, as set forth in the above referenced application, &#34;Method and Apparatus for Simulating Systems Described by Partial Differential Equations&#34;, it has been found possible to use cellular automata to simulate systems described by partial differential equations. In a preferred embodiment of that invention a two dimensional space is tesselated into a cellular array of regular hexagons and the simulation is performed by considering interactions between each hexagonal cell and its six nearest neighbors. To facilitate such simulation, it is desirable to represent each cell as a memory location and/or processing element that interacts with six nearest neighbors. Because of the enormous number of identical calculations that are required to perform the simulations described in &#34;Method and Apparatus for Simulating Systems Described by Partial Differential Equations&#34;, it is also desirable to perform such calculations on a massively parallel processor such as the Connection Machine Computer. In that computer, however, as in many other parallel computers, individual processors are connected in a rectilinear array and not in a hexagonal array. 
     SUMMARY OF THE INVENTION 
     I have discovered a method of simulating a hexagonal array of computer processors or memories in a computer in which the processor and/or memories are physically connected in a rectilinear grid. 
     The grid provides for communication between adjacent processors in both the horizontal and vertical directions. Thus, it provides physical connections between each processor and four nearest neighbor processors. In accordance with my invention, each processor is provided with two additional nearest neighbor processors by providing communication between each processor of the array and two additional adjacent processors located on different diagonals in the array. As a result of this arrangement the two additional processors are located either in the same column but in different rows adjacent to the row in which the neighboring processor is located or they are in the same row but in different columns adjacent to the column in which the neighboring processor is located. These additional communication patterns for all the processors add to the rectilinear array a zig zag communication pattern running through the array in either the vertical or horizontal direction. 
    
    
     BRIEF DESCRIPTION OF DRAWINGS 
     These and other objects, features and advantages of the invention will be more readily apparent from the following detailed description of the preferred embodiment of the invention in which: 
     FIG. 1 is a schematic illustration of a Connection Machine Computer that depicts the rectilinear array of processor/memories in which the invention may be practiced; and 
     FIG. 2 is a schematic illustration depicting the connection pattern of processor/memories in accordance with the invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The present invention is intended to be implemented in a massively parallel single instruction multiple data (SIMD) computer such as the Connection Machine Computer described in detail in application Ser. No. 499,474. 
     As shown in FIG. 1A of that application which is reproduced in FIG. 1, the computer system comprises a mainframe computer 10, a microcontroller 20, an array 30 of parallel processing integrated circuits 35, a data source 40, a first buffer and multiplexer/demultiplexer 50, first, second, third and fourth bidirectional bus control circuits 60, 65, 70, 75, a second buffer and multiplexer/demultiplexer 80, and a data sink 90. Mainframe computer 10 may be a suitably programmed commercially available general purpose computer such as a VAX (™) computer manufactured by Digital Equipment Corp. Microcontroller 20 is an instruction sequencer of conventional design for generating a sequence of instructions that are applied to array 30 by means of a thirty-two bit parallel bus 22. Microcontroller 20 receives from array 30 a signal on line 26. This signal is a general purpose or GLOBAL signal that can be used for data output and status information. Bus 22 and line 26 are connected in parallel to each IC 35. As a result, signals from microcontroller 20 are applied simultaneously to each IC 35 in array 30 and the signal applied to microcontroller 20 on line 26 is formed by combining the signal outputs from all of ICs 35 of the array. 
     In the embodiment of the Connection Machine Computer used in the practice of the present invention, array 30 contains 2048 (=2 11 ) identical ICs 35; and each IC 35 contains 16 (=2 4 ) identical processor/memories 36. Thus, the entire array 30 contains 32,768 (=2 15 ) identical processor/memories 36. 
     Processor/memories 36 are organized and interconnected in two geometries. The geometry of interest to the present invention is a conventional two-dimensional grid pattern in which the processor/memories are organized in a rectangular array of 128×256 processor/memories and connected to their four nearest neighbors in the array. For convenience, the sides of this array are identified as NORTH, EAST, SOUTH and WEST. 
     To connect each processor/memory to its four nearest neighbors, the individual processor/memories are connected by electrical conductors between adjacent processor/memories in each row and each column of the grid as shown in FIGS. 6A and 7A of the &#39;474 application; and the four nearest neighbors of an IC except those on the edges of the array will be recognized to be the four ICs immediately adjacent that IC on the North, East, South and West. 
     The rectilinear array of processor/memories 36 is schematically illustrated in FIG. 2. As shown therein the processor/memories 36 are interconnected by horizontal and vertical lines 120, 125, respectively. The horizontal lines represent the EAST and WEST connections between adjacent processor/memories in the rectilinear grid of the Connection Machine Computer and the vertical lines represent the NORTH and SOUTH connections between adjacent processor/memories. These connections are implemented in the form of physical wires between the adjacent processor/memories in the rectilinear grid. 
     As indicated in &#34;A Method and Apparatus for Simulating Systems Described by Partial Differential Equations&#34;, it sometimes is desirable to interconnect processors and/or memories in a more complicated network than a rectilinear array. Of particular interest is the need to provide for interaction between each processor/memory and six neighboring processors so as to simulate a two dimensional space that has been tesselated into a cellular array of regular hexagons. 
     In accordance with the invention, this is accomplished by connecting each processor/memory to two other neighboring processor/memories along two different diagonals 130, 135 of the grid. In the embodiment shown in FIG. 2, the same connection pattern is applied uniformly to all the processor/memories on the odd rows of the grid. As will be apparent this also defines the connection pattern for the processor/memories on the interlineated even rows. As a result, this connection pattern zig-zags down the columns of the grid. Alternatively, the same connection pattern could be applied uniformly to all the processor/memories on the odd colums of the grid in which case the pattern would zig-zag along the rows of the grid. 
     The zig-zag connection pattern is not implemented by physical wires between processor/memories. Rather, it is implemented in the computer in software so that the computer shifts data diagonally from a source to a destination by first shifting the data from a source processor/memory to the adjacent processor/memory in either the horizontal or vertical direction and then shifting the data in the other rectilinear direction to the destination processor/memory. 
     In providing six nearest neighbors for each processor/memory, the zig-zag pattern of FIG. 2 supports movement of data along three axes spaced 60 degrees apart from each other in a pattern characteristic of a hexagonal grid. This is achieved by defining the axes of the grid as: (1) the horizontal or EAST-WEST connections; (2) a succession of alternating vertical and diagonal connections running from the upper left to lower right of the grid and (3) a succession of alternating vertical and diagonal connections running from the upper right to the lower left. As shown in FIG. 2, the rate of movement along such diagonal axes is exactly the same as in a hexagonal array, namely two cells up or down for each cell to the right or left. 
     This definition of axes can also be related to the six faces 0-5 of the hexagon as shown in FIG. 2. In the case of an even row, faces 0 and 3 are on the EAST-WEST axis; faces 1 and 4 are on the same axis even though face 1 is associated with the diagonal to the upper right and face 4 is associated with the downward vertical; and faces 2 and 5 are on the same axis even though face 2 is associated with the upward vertical and face 5 with the diagonal to the lower right. In the case of an odd row, faces 0 and 3 are again on the EAST-WEST axis; faces 1 and 4 are on the same axis even though face 1 is associated with the upward vertical and face 4 is associated with the diagonal to the lower left; and faces 2 and 5 are on the same axis even though face 2 is associated with the diagonal to the upper left and face 5 is associated with the downward vertical. 
     In the event the zig-zag pattern runs along the rows, the three axes are defined as: (1) the vertical or NORTH-SOUTH connections; (2) a succession of alternating horizontal and diagonal connections running from upper left to the bottom right; and (3) a succession of alternating horizontal and diagonal connections running from the upper right to the bottom left. 
     To implement the hexagonal simulation in the rectilinear array of processor/memories, it is necessary to understand the way in which the processor/memories are organized in the array. Each processor/memory has an address. Illustratively, these addresses are assigned in consecutive number order in a raster pattern starting with the cell in the upper left hand corner of the two-dimensional space, followed by the cell immediately to its right on the horizontal or 0-axis, and so forth to the upper right hand corner, then to the cell on the left hand side on the row immediately below the first row, the cell immediately to its right and so forth to the cell on the bottom row at the lower right hand corner of the array. Thus, in the case of the 256×128 array of processor/memories, the relative addresses assigned to the processors in the upper left hand corner of the array are: 
     
                       TABLE I______________________________________0000      0001   0002        0003 . . .0256      0257   0258        0259 . . .0512      0513   0514        0515 . . .0768      0769   0770        0771 . . .1024      1025   1026        1027 . . .. . .     . . .  . . .       . . .                             . . .______________________________________ 
    
     Consistent with the illustration of FIG. 2, for a processor/memory in an even row, the six nearest neighbor processor/memories are those immediately to the left and right of the processor/memory on the same row and those immediately above and below it in the same column and the two processor/memories in the column to the right and in the immediately adjacent rows. For a processor/memory in an odd row, the six nearest neighbor processor/memories are those immediately to the left and right of the processor/memory on the same row and those immediately above and below it in the same column and the two processor/memories in the column to the left and in the immediately adjacent rows. 
     Accordingly, if y is the number of memory addresses per row in the rectilinear array (256 in the example of Table I) and x is the difference in adjacent memory addresses (1 in the example of Table I), the distances to the nearest neighbor processor/memories for a processor/memory (proc/mem) in an even row are given by: 
     
                       TABLE II______________________________________ - x      ##STR1##          + x;______________________________________ 
    
     Similarly, the distances to the nearest neighbor cells for a cell in an odd row are given by: 
     
                       TABLE III______________________________________ - x      ##STR2##          + x.______________________________________ 
    
     If the even rows are offset to the left of the odd rows, instead of to the right as assumed in FIG. 2, then Table II will depict the distances between cells for a cell in an odd row and Table III the distances between cells for a cell in an even row. 
     A computer program for shifting data in this fashion so as to simulate a hexagonal array is attached hereto as Appendix I. The program is written in Common LISP (as described in Steele, Guy, Common LISP: The Language, Digital Press, Burlington, Mass. (1984)). The coordinates in memory of the nearest neighbor cells are defined by the function CELL-NEIGHBOR-LOCATION. This function, for example, specifies that the coordinates of the nearest neighbor cell to the right of the cell at memory location x,y are obtained by incrementing x by one. Likewise, the coordinates of the nearest neighbor cell to the upper right are obtained by decrementing y and if y is even (i.e., the cell is in an even row) incrementing x. As will be apparent, this function implements the relationships set forth in Tables II and III. 
     The present invention is also compatible with another feature of the Connection Machine Computer: its ability to subdivide each processor memory into several units that function identically. In effect, each unit operates as a separate processor/memory (known as a virtual processor) sharing the RAM, ALU and flag controller of one physical processor/memory. The subdivision of one physical processor/memory into several is accomplished by partitioning the memory in each physical processor/memory in the same fashion and providing in microcontroller 20 of FIG. 1 the capacity of having each physical processor memory operate first on one portion of the partitioned memory, then on the next portion of the partitioned memory and so on through each cell value stored in the memory. 
     As will be apparent to those skilled in the art, numerous modifications may be made within the scope of the above described invention. ##SPC1##