# US 10,956,155 B2 · Memory load to load fusing

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

- Number: US 10,956,155 B2
- Document ID: US10956155B2
- Status: Granted
- Kind: B2
- Application number: 16/421,463
- Filed: 2019-05-23
- Published: 2019-09-12
- Granted: 2021-03-23
- Earliest claimed: 2017-03-14
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Paul E. Kitchin; Rama S. Gopal; Karthik Sundaram
- Web page: https://patentgrep.com/patent/US10956155B2

## CPC

- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/35: Indirect addressing
- G06F 9/3826: {Bypassing or forwarding of data results, e.g. locally between pipeline stages or within a pipeline stage}
- G06F 9/3838: {Dependency mechanisms, e.g. register scoreboarding}
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 2212/452: Instruction code
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and a method to cascade execution of instructions in a load-store unit (LSU) of a central processing unit (CPU) to reduce latency associated with the instructions. First data stored in a cache is read by the LSU in response a first memory load instruction of two immediately consecutive memory load instructions. Alignment, sign extension and/or endian operations are performed on the first data read from the cache in response to the first memory load instruction, and, in parallel, a memory-load address-forwarded result is selected based on a corrected alignment of the first data read in response to the first memory load instruction to provide a next address for a second of the two immediately consecutive memory load instructions. Second data stored in the cache is read by the LSU in response to the second memory load instruction based on the selected memory-load address-forwarded result.

## Claims

### Claim 1

A method to cascade execution of instructions of a central processing unit (CPU), comprising:
reading first data stored in a first cache in response to a first memory load instruction;
comparing a destination address of a second memory load instruction to a source address of the first memory load instruction, the second memory load instruction being subsequent to the first memory load instruction;
performing in parallel based on the destination address of the second memory load instruction matching the source address of the first memory load instruction:
one or more of alignment, sign extension, and endian operations on the first data, and
selecting a next memory address based on a corrected alignment of the first data for the second memory load instruction; and
reading second data using the next memory address in response to the second memory load instruction.

### Claim 2 (depends on 1)

The method of claim 1, wherein the first memory load instruction comprises a byte-aligned memory address, and
wherein the first memory load instruction comprises no sign extension.

### Claim 3 (depends on 2)

The method of claim 2, wherein the first memory load instruction comprises a 4 byte aligned memory address.

### Claim 4 (depends on 2)

The method of claim 2, wherein the second memory load instruction is dependent upon the first memory load instruction to produce the next address for the second memory load instruction.

### Claim 5 (depends on 1)

The method of claim 1, wherein reading of the first data occurs during a first execution cycle, and
wherein the alignment, sign extension and/or endian operations on the first data, and the selecting of the next memory address occurs in a second execution cycle that is immediately subsequent to the first execution cycle.

### Claim 6 (depends on 1)

The method of claim 1, further comprising looking up a translation lookaside buffer and a cache tag array based on the second memory load instruction to determine a stored location of the second data.

### Claim 7 (depends on 6)

The method of claim 6, wherein the stored location of the second data is one of the first cache and a second cache.

### Claim 8 (depends on 7)

The method of claim 7, wherein the first cache comprises a data cache.

### Claim 9 (depends on 1)

The method of claim 1, further comprising reading the first data stored in the first cache by one of a load store unit (LSU) and a data prefetching unit.

### Claim 10 (depends on 1)

The method of claim 1, wherein reading the first data further comprises reading the first data and a first instruction stored in the first cache in response to the first memory load instruction of two consecutive memory load instructions,
wherein the first instruction is a direct branch control transfer instruction.

### Claim 11

A central processing unit (CPU), comprising:
a load data alignment logic circuit to perform one or more of alignment, sign extension and endian operations on a first data received from a cache in response to a first memory load instruction; and
a selector logic circuit in parallel to the load data alignment logic circuit, the selector logic circuit to perform in parallel temporally with the load data alignment logic circuit a selection of a next memory address for a second memory load instruction subsequent to the first memory load instruction, the next memory address for the second memory load instruction being determined by a comparison of a source address of the first memory load instruction and a destination address of the second memory load instruction, the selected next memory address being used to read second data from the cache in response to the second memory load instruction.

### Claim 12 (depends on 11)

The CPU of claim 11, wherein the first memory load instruction comprises a byte-aligned memory address, and
wherein the first memory load instruction comprises no sign extension.

### Claim 13 (depends on 12)

The CPU of claim 12, wherein the first memory load instruction comprises a 4 byte aligned memory address.

### Claim 14 (depends on 12)

The CPU of claim 12, wherein the second memory load instruction is dependent upon the first memory load instruction to produce the next address for the second memory load instruction.

### Claim 15 (depends on 11)

The CPU of claim 11, wherein the CPU reads the first data and a first instruction from the cache during a first execution cycle of the CPU, and
wherein the alignment, sign extension and/or endian operations performed by the load data alignment logic circuit and the selection of the next memory address performed by the selector logic circuit occurs in a second execution cycle of the CPU that is immediately subsequent to the first execution cycle of the CPU.

### Claim 16 (depends on 11)

The CPU of claim 11, further comprising a translation lookaside buffer and a cache tag array that determine a stored location of the second data based on the second memory load instruction.

### Claim 17 (depends on 16)

The CPU of claim 16, wherein the stored location of the second data is one of a first cache and a second cache.

### Claim 18 (depends on 17)

The CPU of claim 17, further comprising the cache, wherein the cache comprises a data cache.

### Claim 19 (depends on 11)

The CPU of claim 11, wherein the load data alignment logic circuit and the selector logic circuit are part of one of a load store unit (LSU) and a data prefetching unit.

### Claim 20 (depends on 11)

The CPU of claim 11, wherein the load data alignment logic circuit further performs one or more of alignment, sign extension and endian operations on the first data and a first instruction received from the cache in response to the first memory load instruction of two consecutive memory load instructions, and
wherein the first instruction is a direct branch control transfer instruction.
