# US 2020/0394039 A1 · Processor with Multiple Load Queues

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

- Number: US 2020/0394039 A1
- Document ID: US20200394039A1
- Status: Published application
- Kind: A1
- Application number: 16/437,739
- Filed: 2019-06-11
- Published: 2020-12-17
- Earliest claimed: 2019-06-11
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Aditya Kesiraju; Mridul Agarawal; Nikhil Gupta
- Web page: https://patentgrep.com/patent/US20200394039A1

## CPC

- G06F 9/3824: {Operand accessing}
- G06F 9/3834: {Maintaining memory consistency}
- G06F 9/3842: {Speculative instruction execution}
- G06F 9/3856: {Reordering of instructions, e.g. using queues or age tags}
- G06F 9/3861: {Recovery, e.g. branch miss-prediction, exception handling (error detection or correction G06F11/00)}
- G06F 9/3867: {using instruction pipelines}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In an embodiment, a processor includes a load/store unit that executes load/store operations. The load/store unit may implement a two-level load queue. One of the load queues, referred to as a load retirement queue (LRQ), may track load operations from initial execution to retirement. Ordering constraints may be enforced using the LRQ. The other load queue, referred to as a load execution queue (LEQ), may track loads from initial execution to forwarding of data. Replay may be managed by the LEQ. In an embodiment, the LEQ may be smaller than the LRQ, which may permit the management of replay while still meeting timing requirements. Additionally, the larger LRQ may permit more load operations to be pending (not retired) in the processor, widening the window for out of order execution and supporting potentially higher processor performance.

## Claims

### Claim 1

A processor comprising a load/store unit configured to execute load/store operations, the load/store unit comprising:
a first load queue, the first load queue including a first control circuit;
a second load queue, the second load queue including a second control circuit;
wherein the first control circuit is configured to allocate a first entry in the first load queue to a first load executed by the load/store unit and the second control circuit is configured to allocate a second entry in the second load queue to the first load, wherein the first control circuit is configured to track the first load in the first load queue until data is successfully forwarded for the first load to a target register of the first load, and wherein the second control circuit is configured to track the first load in the second load queue until the first load retires, and wherein the first control circuit is configured to replay the first load from the first queue in response to the first load being executed but experiencing one or more conditions that prevent the load from forwarding data, and wherein the second control circuit is configured to enforce ordering requirements on the first load in the second load queue.

### Claim 2 (depends on 1)

The processor as recited in claim 1 wherein the load/store unit comprises a plurality of load execution pipelines, and wherein the first load queue has a plurality of banks, and a number of banks in the plurality of banks in the first load queue is equal to a number of the plurality of load execution pipelines, and wherein the first control circuit comprises a plurality of first control circuits in the plurality of banks.

### Claim 3 (depends on 2)

The processor as recited in claim 2 wherein each bank of the plurality of banks is coupled to a respective pipeline of the plurality of load execution pipelines.

### Claim 4 (depends on 3)

The processor as recited in claim 3 wherein a given control circuit of the plurality of first control circuits is configured to issue replaying loads from a given bank of the plurality of banks in the respective pipeline to which the given bank is coupled.

### Claim 5 (depends on 3)

The processor as recited in claim 3 further comprising a data cache coupled to the load/store unit, wherein a second load is replayed during an initial execution in response to missing in the data cache, and wherein the first load queue is configured to use the respective pipeline that is coupled to a second bank of the plurality of banks to forward fill data for the second load to a target of the second load during a cache fill of the data accessed by the second load, wherein the second load is stored in the second bank.

### Claim 6 (depends on 2)

The processor as recited in claim 2 wherein the plurality of first control circuits are configured to allocate loads to banks of the first load queue independent of which pipeline of the plurality of load execution pipelines initially execute the loads.

### Claim 7 (depends on 1)

The processor as recited in claim 1 wherein the first control circuit is configured to dequeue the first load from the first queue responsive to successfully forwarding data for the first load, and wherein the second control circuit is configured to retain the first load in the second queue subsequent to the successfully forwarding responsive to the first load not being ready to retire.

### Claim 8 (depends on 1)

The processor as recited in claim 1 wherein the second control circuit is configured to detect an ordering violation for the first load subsequent to the first load successfully forwarding data, and the second control circuit is configured to signal a redirect on the first load in response to the ordering violation.

### Claim 9 (depends on 8)

The processor as recited in claim 8 further comprising a reorder buffer coupled to receive the redirect and flush operations that are subsequent to the first load in program order.

### Claim 10 (depends on 9)

The processor as recited in claim 9 wherein the processor is configured to refetch the first load and subsequent operations for re-execution in response to the redirect.

### Claim 11

A processor comprising a load/store unit configured to execute load/store operations, the load/store unit comprising:
a first load queue; and
a second load queue;
wherein the load/store unit is configured to allocate a first entry in the first load queue and a second entry in the second load queue to a first load executed by the load/store unit, and wherein the load/store unit is configured to retain the first entry for the first load until the data for the first load is successfully forwarded to a target of the first load, and wherein the load/store unit is configured to retain the second entry for the first load until the first load is retired.

### Claim 12 (depends on 11)

The processor as recited in claim 11 wherein the load/store unit is configured to replay loads from the first load queue when the loads have been unsuccessful in forwarding data in previous executions of the loads.

### Claim 13 (depends on 11)

The processor as recited in claim 11 wherein the load/store unit is configured to detect ordering violations for loads in the second load queue.

### Claim 14 (depends on 12)

The processor as recited in claim 12 wherein the second load queue has a larger number of entries than a number of entries in the first load queue.

### Claim 15 (depends on 11)

The processor as recited in claim 11 wherein the load/store unit comprises a plurality of load execution pipelines, and wherein the first load queue has a plurality of banks, and a number of banks in the plurality of banks in the first load queue is equal to a number of the plurality of load execution pipelines.

### Claim 16 (depends on 15)

The processor as recited in claim 15 wherein each bank of the plurality of banks is coupled to a respective pipeline of the plurality of load execution pipelines.

### Claim 17 (depends on 16)

The processor as recited in claim 16 wherein the load/store unit is configured to issue replaying loads from a given bank of the plurality of banks in the respective pipeline to which the given bank is coupled.

### Claim 18

A method comprising:
issuing a first load to execute in a load/store unit;
allocating a first entry in a first load queue in the load/store unit and a second entry in a second load queue in the load/store unit to the first load during execution of the first load in the load/store unit;
retaining the first entry for the first load until the first load successfully forwards data to a target of the first load; and
retaining the second entry for the first load unit the first load retires.

### Claim 19 (depends on 18)

The method as recited in claim 18 further comprising replaying the first load from the first entry.

### Claim 20 (depends on 18)

The method as recited in claim 18 further comprising detecting an ordering violation for the first load in the second entry.
