# US 2006/0155924 A1 · Hardware stack having entries with a data portion and associated counter

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

- Number: US 2006/0155924 A1
- Document ID: US20060155924A1
- Status: Published application
- Kind: A1
- Application number: 11/012,688
- Filed: 2004-12-15
- Published: 2006-07-13
- Earliest claimed: 2004-12-15
- Assignees: Intel Corporation
- Inventors: Michael Dwyer; Hong Jiang; Thomas Piazza
- Web page: https://patentgrep.com/patent/US20060155924A1

## CPC

- G06F 7/785: {having a sequence of storage locations each being individually accessible for both enqueue and dequeue operations, e.g. using a RAM}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

According to some embodiments, determining a new value to be pushed onto a hardware stack having n entries is determined. Each entry in the stack may include a data portion and an associated counter. If the new value equals the data portion of the entry associated with a current top of stack pointer, the counter associated with that entry is incremented. If the new value does not equal the data portion associated with the current top of stack pointer, the new value is stored in the data portion of the next entry and the current top of stack pointer is advanced.

## Claims

### Claim 1

A method, comprising:
determining a new value to be pushed onto a hardware stack having n entries, n being an integer greater than 1, each entry including a data portion and an associated counter;
if the new value equals the data portion of the entry associated with a current top of stack pointer, incrementing the counter associated with that entry; and
if the new value does not equal the data portion associated with the current top of stack pointer, storing the new value in the data portion of the next entry and incrementing the current top of stack pointer.

### Claim 2 (depends on 1)

The method of claim 1, wherein the counter is incremented by 1 if the new value equals the data portion associated with the current top of stack pointer.

### Claim 3 (depends on 1)

The method of claim 1, wherein the current top of stack pointer is incremented by 1 if the new value does not equal the data portion associated with the current top of stack pointer.

### Claim 4 (depends on 1)

The method of claim 1, wherein the new value is selected from a set of n potential values.

### Claim 5 (depends on 4)

The method of claim 4, wherein the data portion is n bits wide.

### Claim 6 (depends on 5)

The method of claim 5, wherein the new value cannot equal a prior value pushed onto the hardware stack other than the value stored in the data portion associated with the current top of stack pointer.

### Claim 7 (depends on 6)

The method of claim 6, wherein bits in value pushed onto the hardware stack can (i) change from 0 to 1 but not from 1 to 0 as compared to the last value pushed onto the hardware stack, or (ii) change from 1 to 0 but not from 0 to 1 as compared to the last value pushed onto the hardware stack.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
determining a second value to be pushed onto the hardware stack;
determining that second value equals the data portion of the entry associated with the current top of stack pointer;
determining that the counter associated with the current top of stack pointer equals a maximum value; and
storing the second value in the data portion of the next entry, incrementing or initializing the counter associated with the next entry, and incrementing the current top of stack pointer.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
determining that a value is to be popped from the hardware stack;
retrieving the value stored in the data portion associated with the current top of stack pointer; and
decrementing the counter associated with the current top of stack pointer.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
determining that the counter associated with the current top of stack pointer equals a minimum value; and
decrementing the current top of stack pointer.

### Claim 11 (depends on 1)

The method of claim 1, wherein the hardware stack is associated with a loop stack of an n-channel single instruction, multiple-data execution engine.

### Claim 12 (depends on 11)

The method of claim 11, wherein the new value is associated with an evaluation of a loop instruction based on multiple operands of data.

### Claim 13 (depends on 1)

The method of claim 1, wherein the hardware stack is associated with a conditional stack of an n-channel single instruction, multiple-data execution engine.

### Claim 14 (depends on 13)

The method of claim 13, wherein the new value is associated with an evaluation of a conditional instruction based on multiple operands of data.

### Claim 15

An apparatus, comprising:
a last-in, first-out hardware stack having n data registers, n being an integer greater than 1;
n counter registers, each counter register being associated with one of the data registers; and
a top of stack pointer register.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the hardware stack is associated with an n-channel single instruction, multiple-data execution engine.

### Claim 17 (depends on 16)

The apparatus of claim 16, further comprising:
an n-bit loop mask vector, wherein the loop mask vector is to store loop information associated with a loop instruction for multiple channels of the execution engine.

### Claim 18 (depends on 16)

The apparatus of claim 16, further comprising:
an n-bit conditional mask vector, wherein the conditional mask vector is to store results of evaluations of: (i) an IF instruction condition and (ii) data associated with multiple channels of the execution engine.

### Claim 19

An article, comprising:
a storage medium having stored thereon instructions that when executed by a machine result in the following:
determining a value to be pushed onto a hardware stack having n entries, n being an integer greater than 1, each entry including a n-bit data portion and an associated counter,
if the value is the same as the data portion of the entry associated with a stack pointer, incrementing the counter associated with that entry by 1, and
if the value does not equal the data portion associated with the stack pointer, storing the value in the data portion of the next entry and incrementing the stack pointer by 1.

### Claim 20 (depends on 19)

The article of claim 19, wherein execution of the instructions further results in:
determining that a value is to be popped from the hardware stack,
retrieving the value stored in the data portion associated with the stack pointer, and
decrementing the counter associated with the stack pointer by 1.

### Claim 21 (depends on 19)

The article of claim 19, wherein execution of the instructions further results in:
determining that the counter associated with the stack pointer is 0; and
decrementing the stack pointer by 1.

### Claim 22

A system, comprising:
an n-channel single instruction, multiple-data execution engine, n being an integer greater than 1;
a last-in, first-out hardware stack, including:
n data registers;
n counter registers, each counter register being associated with one of the data registers, and
a top of stack pointer register; and
a graphics memory unit.

### Claim 23 (depends on 22)

The system of claim 22, further comprising:
an n-bit loop mask vector, wherein the loop mask vector is to store loop information associated with a loop instruction for multiple channels of the execution engine.

### Claim 24 (depends on 22)

The system of claim 22, further comprising:
an n-bit conditional mask vector, wherein the conditional mask vector is to store results of evaluations of: (i) an IF instruction condition and (ii) data associated with multiple channels of the execution engine.
