# US 10,481,870 B2 · Circuit to perform dual input value absolute value and sum operation

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

- Number: US 10,481,870 B2
- Document ID: US10481870B2
- Status: Granted
- Kind: B2
- Application number: 15/594,223
- Filed: 2017-05-12
- Published: 2018-11-15
- Granted: 2019-11-19
- Earliest claimed: 2017-05-12
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Artem Vasilyev; Albert Meixner; Jason Redgrave
- Web page: https://patentgrep.com/patent/US10481870B2

## CPC

- G06F 7/50: Adding; Subtracting (G06F7/483 - G06F7/491, G06F7/544 - G06F7/556 take precedence)
- G06F 9/3001: {Arithmetic instructions}
- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30134: {Register stacks; shift registers}
- G06F 9/3893: {controlled in tandem, e.g. multiplier-accumulator}
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G11C 19/38: two-dimensional [2D], e.g. horizontal and vertical shift registers
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G11C: STATIC STORES (semiconductor memory devices H10B)

## Abstract

An execution unit is described. The execution unit includes an arithmetic logic unit (ALU) circuit having a first input to receive a first value and a second input to receive a second value. The ALU circuit includes circuitry to determine an absolute value of the first value and to add the absolute value to the second value. The first input is coupled to a first data path having register space and an output of another ALU of the execution unit circuit as alternative sources of the first value. The second input is coupled to a second data path having the register space as a source for the second value.

## Claims

### Claim 1

An execution unit circuit, comprising a pair of arithmetic logic units (ALUs) configured to perform a sum of absolute difference computation, wherein the pair of ALUs comprise:
a first ALU that comprises a first input to receive a first input value X and a second input to receive a second input value Y, and
a second ALU that comprises a third input to receive a third input value Z and a fourth input to receive an output of the first ALU,
wherein the execution unit circuit is configured to perform a sum of absolute difference computation using ALU operations comprising:
computing, by the first ALU of the pair of ALUs, a difference value Q between the first input value X and the second input value Y,
computing a result of the sum of absolute difference computation including:
adding, by the second ALU of the pair of ALUs, a sum of the third input value Z to the difference value Q whenever Q is positive, or
subtracting, by the second ALU of the pair of ALUs, the difference value Q from the third input value Z whenever Q is negative, and
outputting the computed result of the sum of absolute difference computation.

### Claim 2 (depends on 1)

The execution unit circuit of claim 1, wherein the circuitry second ALU comprises an adder circuit.

### Claim 3 (depends on 1)

The execution unit circuit of claim 1, wherein the execution unit circuit is configured to compute the sum of absolute difference computation in response to receiving a single instruction.

### Claim 4 (depends on 3)

The execution unit circuit of claim 3, wherein the execution unit circuit is configured to compute the sum of absolute difference computation using at most two ALU operations.

### Claim 5 (depends on 1)

The execution unit circuit of claim 1, wherein the execution unit circuit is configured to execute an absolute difference instruction that when executed causes the execution unit circuit to compute an absolute difference between a first value specified by a first input operand of the absolute difference instruction and a second value specified by a second input operand of the absolute difference instruction,
wherein during execution of the absolute difference instruction, the second ALU is configured to receive a difference between the first value and the second value computed by the first ALU and to perform operations comprising:
adding a zero value to the difference whenever the difference is positive, or
subtracting the difference from a zero value whenever the difference is negative.

### Claim 6 (depends on 5)

The execution unit circuit of claim 5, wherein the second ALU is configured to receive the zero value from external register space of the execution unit circuit.

### Claim 7 (depends on 3)

The execution unit circuit of claim 3, wherein the third input value Z is specified as an operand of the single instruction.

### Claim 8

A method for performing a sum of absolute difference computation by an execution unit circuit comprising a pair of arithmetic logic units (ALUs), wherein the method comprises:
receiving, by a first ALU of the pair of ALUs, a first input value X and a second input value Y;
computing, by the first ALU of the pair of ALUs, a difference value Q between the first input value X and the second input value Y;
receiving, by a second ALU of the pair of ALUs, a third input value Z and the difference value Q output by the first ALU;
computing a result of the sum of absolute difference computation including:
adding, by the second ALU of the pair of ALUs, a sum of the third input value Z to the difference value Q whenever Q is positive, or
subtracting, by the second ALU of the pair of ALUs, the difference value Q from the third input value Z whenever Q is negative; and
outputting the computed result of the sum of absolute difference computation.

### Claim 9 (depends on 8)

The method of claim 8, wherein the second ALU comprises an adder circuit.

### Claim 10 (depends on 8)

The method of claim 8, wherein the execution unit circuit performs the sum of absolute difference computation in response to receiving a single instruction.

### Claim 11 (depends on 10)

The method of claim 10, wherein the execution unit circuit performs the sum of absolute difference computation using at most two ALU operations.

### Claim 12 (depends on 10)

The method of claim 10, wherein the third input value Z is specified as an operand of the single instruction.

### Claim 13 (depends on 8)

The method of claim 8, further comprising:
executing, by the execution unit, an absolute difference instruction between a first value specified by a first input operand of the absolute difference instruction and a second value specified by a second input operand of the absolute difference instruction, including:
receiving, by the second ALU, a difference between the first value and the second value computed by the first ALU; and
adding a zero value to the difference whenever the difference is positive, or
subtracting the difference from a zero value whenever the difference is negative.

### Claim 14 (depends on 13)

The method of claim 13, further comprising receiving, by the second ALU, the zero value from external register space of the execution unit circuit.

### Claim 15

An image processor comprising a plurality of execution unit circuits, wherein each execution unit circuit comprises:
a first input to receive a first input value X;
a second input to receive a second input value Y;
a third input to receive a third input value Z; and
means for computing a sum of absolute difference computation from the first input value X, the second input value Y, and the third input value Z using at most two arithmetic logic unit operations.

### Claim 16 (depends on 15)

The image processor of claim 15, wherein each execution unit circuit comprises respective means for computing the sum of absolute difference computation in response to receiving a single instruction.
