# US 2004/0083352 A1 · Method and apparatus for reducing instruction pipeline stalls

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

- Number: US 2004/0083352 A1
- Document ID: US20040083352A1
- Status: Published application
- Kind: A1
- Application number: 10/356,984
- Filed: 2003-02-03
- Published: 2004-04-29
- Earliest claimed: 2002-10-29
- Assignees: Broadcom Corporation
- Inventors: Yung-Hsiang Lee
- Web page: https://patentgrep.com/patent/US20040083352A1

## CPC

- G06F 9/3808: {for instruction reuse, e.g. trace cache, branch target cache}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus are disclosed for enhancing the pipelined instruction transfer and execution performance of a computer architecture by reducing instruction stalls due to branch and jump instructions. Trace cache within a computer architecture is used to receive computer instructions at a first rate and to store the computer instructions as traces of instructions. An instruction execution pipeline is also provided to receive, decode, and execute the computer instructions at a second rate that is less than the first rate. A mux is also provided between the trace cache and the instruction execution pipeline to select a next instruction to be loaded into the instruction execution pipeline from the trace cache based, in part, on a branch result fed back to the mux from the instruction execution pipeline.

## Claims

### Claim 1

In a computer architecture for executing computer instructions, a method to reduce the occurrence of instruction execution pipeline stalls due to branch instructions and jump instructions, said method comprising:
providing an instruction transfer bandwidth associated with a trace cache of said computer architecture that is greater than an instruction execution bandwidth of said computer architecture; and
feeding back branch results of executed branch instructions and using said instruction transfer bandwidth in order to transfer only correct next instructions into an instruction execution pipeline based on said branch results of said executed branch instructions such that the occurrence of instruction execution stalls within said instruction execution pipeline is reduced.

### Claim 2 (depends on 1)

The method of claim 1 further comprising providing at least one branch delay slot for each of said branch instructions.

### Claim 3 (depends on 1)

The method of claim 1 wherein said instruction transfer bandwidth is at least twice said instruction execution bandwidth.

### Claim 4 (depends on 1)

The method of claim 1 wherein said instruction execution bandwidth corresponds to one instruction per clock cycle of said computer architecture.

### Claim 5 (depends on 1)

The method of claim 1 wherein said instruction transfer bandwidth corresponds to at least two instructions per clock cycle of said computer architecture.

### Claim 6 (depends on 1)

The method of claim 1 wherein any fed-back branch result of said branch results determines which of two possible instructions is transferred next into said instruction execution pipeline for subsequent execution.

### Claim 7 (depends on 1)

The method of claim 1 wherein at least two instructions are transferred from an instruction cache of said computer architecture to said trace cache of said computer architecture during a single instruction execution time.

### Claim 8 (depends on 1)

The method of claim 1 wherein a current pointer is pointing to a current trace of instructions within said trace cache of said computer architecture when an instruction of said current trace is within said instruction execution pipeline.

### Claim 9 (depends on 1)

The method of claim 1 wherein a branch pointer is updated to point to a branch trace of instructions within said trace cache based on a branch instruction within a current trace of instructions to be executed.

### Claim 10 (depends on 1)

The method of claim 1 wherein any fed-back branch result of said branch results determines which trace in said trace cache is to be loaded next into said instruction execution pipeline.

### Claim 11

In a computer architecture for executing computer instructions, apparatus to reduce the occurrence of instruction execution pipeline stalls due to branch instructions and jump instructions, said apparatus comprising:
trace cache that receives computer instructions at a first rate and stores said computer instructions as traces of instructions;
an instruction execution pipeline that receives, decodes, and executes computer instructions at a second rate that is less than said first rate; and
a mux that selects a next instruction to be loaded into said instruction execution pipeline from said trace cache based, in part, on a branch result fed back from said instruction execution pipeline to said mux.

### Claim 12 (depends on 11)

The apparatus of claim 11 wherein said instruction execution pipeline comprises:
an instruction register that receives said next instruction from said trace cache by way of said mux;
an instruction decoder that receives said next instruction from said instruction register and generates a decoded instruction; and
an instruction executor that receives said decoded instruction from said instruction decoder and executes said decoded instruction.

### Claim 13 (depends on 12)

The apparatus of claim 12 wherein said instruction executor comprises:
a data register that stores data words associated with said decoded instruction; and
a results register that stores a result of executing said decoded instruction using said data words.

### Claim 14 (depends on 11)

The apparatus of claim 11 further comprising:
instruction cache that sends said computer instructions to said trace cache at said first rate; and
memory that sends said computer instructions to said instruction cache at said second rate.

### Claim 15 (depends on 11)

The apparatus of claim 11 wherein said branch result is generated by the execution of a branch instruction.

### Claim 16 (depends on 11)

The apparatus of claim 11 wherein said second rate corresponds to one instruction per clock cycle of said computer architecture.

### Claim 17 (depends on 11)

The apparatus of claim 11 wherein said instruction execution pipeline accommodates at least one branch delay slot for each branch instruction.

### Claim 18 (depends on 11)

The apparatus of claim 11 wherein said first rate corresponds to at least two instructions per clock cycle of said computer architecture.

### Claim 19 (depends on 11)

The apparatus of claim 11 wherein at least two instructions are transferred from said instruction cache to said trace cache based on said branch result.

### Claim 20 (depends on 12)

The apparatus of claim 12 wherein a current pointer points to a current trace of instructions within said trace cache to be executed and a branch pointer points to a branch trace of instructions within said trace cache based on a branch instruction of said current trace of instructions to be executed.
