# US 6,732,253 B1 · Loop handling for single instruction multiple datapath processor architectures

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 6,732,253 B1
- Document ID: US6732253B1
- Status: Granted
- Kind: B1
- Application number: 09/711,556
- Filed: 2000-11-13
- Granted: 2004-05-04
- Earliest claimed: 2000-11-13
- Assignees: ChipWrights Design, Inc.
- Inventors: John Redford
- Web page: https://patentgrep.com/patent/US6732253B1

## CPC

- G06F 9/3455: {using stride}
- G06F 9/325: {for loops, e.g. loop detection or loop counter}
- G06F 9/345: of multiple operands or results {(addressing multiple banks G06F12/06)}
- G06F 9/3885: {using a plurality of independent parallel functional units}
- G06F 15/8007: {single instruction multiple data [SIMD] multiprocessors}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of controlling the enabling of processor datapaths in a SIMD processor during a loop processing operation is described. The information used by the method includes an allocation between the data items and a memory, a size of the array, and a number of remaining parallel passes of the datapaths in the loop processing operation. A computer instruction is also provided, which includes a loop handling instruction that specifies the enabling of one of a plurality of processor datapaths during processing an array of data items. The instruction includes a count field that specifies the number of remaining parallel loop passes to process the array and a count field that specifies the number of serial loop passes to process the array. Different instructions can be used to handle different allocations of passes to parallel datapaths. The instruction also uses information about the total number of datapaths.

## Claims

### Claim 1

A method of controlling whether to enable a datapath included in a plurality of processor datapaths that can process data elements in an array, the plurality of processor datapaths comprising part of an SIMD processor, the method comprising:
determining whether to enable the datapath to process one of said data elements based on information about parameters of the SIMD processor and the array;
wherein the information comprises an allocation between the data elements and a memory, a total number of parallel loop passes needed to process the data elements in a loop processing operation performed by the plurality of processor datapaths, a size of the array, a remaining number of parallel loop passes needed to process the data elements in the loop processing operation, and a number of processor datapaths.

### Claim 2 (depends on 1)

The method of claim 1, wherein the allocation between the data elements and the memory is unity-stride.

### Claim 3 (depends on 2)

The method of claim 2, wherein the total number of parallel loop passes is determined by dividing a total number of serial loop passes needed to process the data elements in the array by the number of processor datapaths and rounding a resulting dividend up to a next integer.

### Claim 4 (depends on 3)

The method of claim 3, wherein determining comprises:
calculating the total number of parallel loop passes minus the number of remaining parallel loop passes to obtain a resulting difference;
multiplying the resulting difference by a sum of the number of processor datapaths and a datapath number to obtain a resulting product; and
determining if the resulting product is less than the total number of serial loop passes.

### Claim 5 (depends on 1)

The method of claim 1, wherein the allocation between the data elements and the memory is contiguous stride.

### Claim 6 (depends on 5)

The method of claim 5, wherein the total number of parallel loop passes is determined by dividing a total number of serial loop passes needed to process the data elements in the array by the number of datapaths and rounding a resulting dividend up to a next integer.

### Claim 7 (depends on 6)

The method of claim 6, wherein determining comprises:
determining whether the total number of parallel loop passes multiplied by a datapath number plus the total number of parallel loop passes minus the number of remaining parallel loop passes is less than the total number of serial loop passes.

### Claim 8 (depends on 1)

The method of claim 1, wherein the allocation is striped stride.

### Claim 9 (depends on 8)

The method of claim 8, wherein determining comprises:
determining whether the total number of parallel loop passes times a datapath number plus the total number of parallel loop passes minus the number of remaining parallel loop passes is less than a total number of serial loop passes needed to process the data elements in the array.

### Claim 10

A computer readable medium that stores a computer instruction, the computer instruction comprising:
a loop handling instruction that specifies selective enabling of one of a plurality of processor datapaths during processing of an array of data elements in a pass of a loop processing operation performed by the processor datapaths, the selective enabling being based on whether a condition in said computer instruction is met; and
a parallel count field that specifies a number of remaining parallel loop passes needed to process the array in the loop processing operation.

### Claim 11 (depends on 10)

The computer readable medium of claim 10, wherein the computer instruction further comprises:
a serial count field that specifies a number of serial loop passes needed to process the array via at least some of the processor datapaths.
