# US 10,956,086 B2 · Memory controller

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

- Number: US 10,956,086 B2
- Document ID: US10956086B2
- Status: Granted
- Kind: B2
- Application number: 16/259,862
- Filed: 2019-01-28
- Published: 2019-09-05
- Granted: 2021-03-23
- Earliest claimed: 2018-01-29
- Assignees: Micron Technology, Inc.
- Applicants: Micron Technology, Inc.
- Inventors: Tony M. Brewer
- Web page: https://patentgrep.com/patent/US10956086B2

## CPC

- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 9/3004: {to perform operations on memory}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0683: {Plurality of storage devices}
- G06F 9/30076: {to perform miscellaneous control operations, e.g. NOP}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/526: {Mutual exclusion algorithms}
- G06F 12/0815: Cache consistency protocols
- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 13/1668: {Details of memory controller}
- G06F 2212/1008: Correctness of operation, e.g. memory ordering
- G06F 2212/1024: Latency reduction
- G06F 2212/452: Instruction code
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory controller circuit is disclosed which is coupleable to a first memory circuit, such as DRAM, and includes: a first memory control circuit to read from or write to the first memory circuit; a second memory circuit, such as SRAM; a second memory control circuit adapted to read from the second memory circuit in response to a read request when the requested data is stored in the second memory circuit, and otherwise to transfer the read request to the first memory control circuit; predetermined atomic operations circuitry; and programmable atomic operations circuitry adapted to perform at least one programmable atomic operation. The second memory control circuit also transfers a received programmable atomic operation request to the programmable atomic operations circuitry and sets a hazard bit for a cache line of the second memory circuit.

## Claims

### Claim 1

A memory controller circuit coupleable to a first memory circuit, the memory controller comprising:
a first memory control circuit coupleable to the first memory circuit, the first memory control circuit configured to read or load requested data from the first memory circuit in response to a read request and to write or store requested data to the first memory circuit in response to a write request;
a second memory circuit;
predetermined atomic operations circuitry configured to perform at least one predetermined atomic operation of a plurality of predetermined atomic operations in response to an atomic operation request designating the at least one predetermined atomic operation;
programmable atomic operations circuitry configured to perform at least one programmable atomic operation of a plurality of programmable atomic operations in response to an atomic operation request designating the at least one programmable atomic operation; and
a second memory control circuit coupled to the second memory circuit, the second memory control circuit configured to read or load the requested data from the second memory circuit directly in response to a read request and directly in response to the atomic operation request when the requested data is stored in the second memory circuit, and to transfer the read request and the atomic operation request to the first memory control circuit when the requested data is not stored in the second memory circuit, the second memory control circuit further configured, in response to an atomic operation request designating the at least one predetermined atomic operation and a memory address, to transfer read data and the atomic operation request designating the at least one predetermined atomic operation to the predetermined atomic operations circuitry, to set a hazard bit stored in a memory hazard register corresponding to the memory address, to write resulting data from the predetermined atomic operation in the second memory circuit directly in response to the atomic operation request designating the at least one predetermined atomic operation and, following writing of the resulting data, to reset or clear the set hazard bit.

### Claim 2 (depends on 1)

The memory controller circuit of claim 1, wherein the plurality of predetermined atomic operations comprises at least two predetermined atomic operations selected from the group consisting of: Fetch-and-AND, Fetch-and-OR, Fetch-and-XOR, Fetch-and-Add, Fetch-and-Subtract, Fetch-and-Increment, Fetch-and-Decrement, Fetch-and-Minimum, Fetch-and-Maximum, Fetch-and-Swap, Compare-and-Swap, and combinations thereof.

### Claim 3 (depends on 1)

The memory controller circuit of claim 1, wherein the programmable atomic operations circuitry comprises:
an instruction cache storing a plurality of processor instructions corresponding to the at least one programmable atomic operation;
an execution queue storing a thread identifier corresponding to the programmable atomic operation;
a core control circuit coupled to the instruction cache and to the execution queue, the core control circuit configured, in response to the thread identifier corresponding to the programmable atomic operation, to select a starting or next instruction or instruction address in the instruction cache for execution of the programmable atomic operation; and
a processor core configured to execute at least one instruction for the programmable atomic operation and to generate resulting data.

### Claim 4 (depends on 3)

The memory controller circuit of claim 3, wherein the programmable atomic operations circuitry further comprises:
a memory controller interface circuit coupled to the processor core, the memory controller interface circuit configured to receive the resulting data and to transfer the resulting data to the second memory control circuit to write the resulting data to the second memory circuit.

### Claim 5 (depends on 4)

The memory controller circuit of claim 4, further comprising:
a network communication interface coupleable to a communication network and coupled to the memory controller interface circuit, the network communication interface configured to prepare and transmit a response data packet having the resulting data on the communication network.

### Claim 6 (depends on 3)

The memory controller circuit of claim 3, wherein the programmable atomic operations circuitry further comprises:
at least one data buffer to store operand data and interim results generated from executing the at least one instruction for the programmable atomic operation.

### Claim 7 (depends on 3)

The memory controller circuit of claim 3, wherein the programmable atomic operations circuitry further comprises:
a network command queue coupled to the processor core, the network command queue storing the resulting data; and
a network communication interface coupled to the network command queue and coupleable to a communication network, the network communication interface configured to prepare and transmit a response data packet having the resulting data on the communication network.

### Claim 8 (depends on 3)

The memory controller circuit of claim 3, wherein the processor core is coupled to a data buffer, and wherein the processor core is further configured to execute a load non-buffered instruction to determine if an operand is stored in the data buffer and, when the data is not stored in the data buffer, to generate a read request to the second memory control circuit and when the operand data is obtained, to not store the operand data in the data buffer.

### Claim 9 (depends on 3)

The memory controller circuit of claim 3, wherein the processor core is further configured to execute a store and clear lock instruction to generate an atomic write request to the second memory control circuit, the atomic write request having the resulting data and a designation to reset or clear a memory hazard bit following writing of the resulting data to the second memory circuit.

### Claim 10 (depends on 3)

The memory controller circuit of claim 3, wherein the processor core is further configured to execute an atomic return instruction to reset or clear a memory hazard bit following writing of the resulting data to the second memory circuit.

### Claim 11 (depends on 3)

The memory controller circuit of claim 3, wherein the processor core is further configured to execute an atomic return instruction to generate a response data packet having the resulting data.

### Claim 12 (depends on 3)

The memory controller circuit of claim 3, wherein the processor core is further configured to execute an atomic return instruction to complete an atomic operation.

### Claim 13 (depends on 1)

The memory controller circuit of claim 1, wherein the atomic operation request designating the at least one programmable atomic operation comprises a physical memory address, a programmable atomic operations identifier, and at least one thread state register value.

### Claim 14 (depends on 13)

The memory controller circuit of claim 13, wherein the programmable atomic operations circuitry further comprises:
at least one register storing thread state information.

### Claim 15 (depends on 14)

The memory controller circuit of claim 14, wherein the programmable atomic operations circuitry is further configured, in response to receiving the atomic operation request designating the at least one programmable atomic operation, to initialize the at least one register with the physical memory address, any data corresponding to the memory address, and the at least one thread state register value.

### Claim 16 (depends on 1)

The memory controller circuit of claim 1, further comprising:
a network communication interface coupleable to a communication network and coupled to the first memory control circuit and to the second memory control circuit, the network communication interface configured to decode a plurality of request packets received from the communication network, and to prepare and transmit a plurality of response data packets on the communication network.

### Claim 17 (depends on 1)

The memory controller circuit of claim 1, wherein the programmable atomic operations circuitry is configured to perform user-defined atomic operations, multi-cycle operations, floating point operations, and multi-instruction operations.

### Claim 18 (depends on 1)

The memory controller circuit of claim 1, further comprising:
a write merge circuit configured to write or store data read from the first memory circuit to the second memory circuit.

### Claim 19 (depends on 1)

The memory controller circuit of claim 1, wherein the second memory control circuit is further configured to transfer read data and the atomic operation request designating the at least one programmable atomic operation to the programmable atomic operations circuitry.

### Claim 20 (depends on 1)

The memory controller circuit of claim 1, wherein the second memory control circuit is further configured to write or store data to the second memory circuit directly in response to a write request and directly in response to the atomic operation request designating the at least one programmable atomic operation.

### Claim 21 (depends on 1)

The memory controller circuit of claim 1, wherein the second memory control circuit is further configured, in response to a write request designating a memory address in the second memory circuit, to set a hazard bit stored in a memory hazard register corresponding to the memory address and, following writing or storing data to the second memory circuit at the memory address, to reset or clear the set hazard bit.

### Claim 22 (depends on 1)

The memory controller circuit of claim 1, wherein the second memory control circuit is further configured, in response to a write request having write data and designating a memory address in the second memory circuit, to transfer current data stored at the memory address to the first memory control circuit to write the current data to the first memory circuit, and to overwrite the current data in the second memory circuit with the write data.

### Claim 23 (depends on 1)

The memory controller circuit of claim 1, wherein the second memory control circuit is further configured, in response to a write request having write data and designating a memory address in the second memory circuit, to set a hazard bit stored in a memory hazard register corresponding to the memory address, to transfer current data stored at the memory address to the first memory control circuit to write the current data to the first memory circuit, to overwrite the current data in the second memory circuit with the write data and, following writing or storing the write data to the second memory circuit at the memory address, to reset or clear the set hazard bit.

### Claim 24 (depends on 1)

The memory controller circuit of claim 1, wherein the second memory control circuit is further configured, in response to an atomic operation request designating the at least one programmable atomic operation and a memory address, to transfer the atomic operation request to the programmable atomic operations circuitry and to set a hazard bit stored in a memory hazard register corresponding to the memory address.

### Claim 25 (depends on 1)

The memory controller circuit of claim 1, wherein the first memory control circuit comprises:
a plurality of memory bank request queues storing a plurality of read or write requests to the first memory circuit;
a scheduler circuit coupled to the plurality of memory bank request queues, the scheduler circuit configured to select a read or write request of the plurality of read or write requests from the plurality of memory bank request queues and to schedule the read or write request for access to the first memory circuit; and
a first memory access control circuit coupled to the scheduler circuit, the first memory access control circuit configured to read or load data from the first memory circuit and to write or store data to the first memory circuit.

### Claim 26 (depends on 25)

The memory controller circuit of claim 25, wherein the first memory control circuit further comprises:
a plurality of memory request queues storing a plurality of memory requests;
a request selection multiplexer configured to select a memory request from the plurality of memory request queues;
a plurality of memory data queues storing data corresponding to the plurality of memory requests; and
a data selection multiplexer configured to select data from the plurality of memory data queues, the selected data corresponding to the selected memory request.

### Claim 27 (depends on 1)

The memory controller circuit of claim 1, wherein the second memory control circuit comprises:
a network request queue storing a read request or a write request;
an atomic operation request queue storing an atomic operation request;
an inbound request multiplexer couple to the network request queue and to the atomic operation request queue, the inbound request multiplexer configured to select a request from the network request queue or the atomic operation request queue;
a memory hazard control circuit having one or more memory hazard registers; and
a second memory access control circuit coupled to the memory hazard control circuit and to the inbound request multiplexer, the second memory access control circuit configured to read or load data from the second memory circuit or to write or store data to the second memory circuit in response to the selected request, and to signal the memory hazard control circuit to set or clear a hazard bit stored in the one or more memory hazard registers.

### Claim 28 (depends on 27)

The memory controller circuit of claim 27, wherein the second memory control circuit further comprises:
a delay circuit coupled to the second memory access control circuit; and
an inbound control multiplexer configured to select an inbound network request which requires accessing the first memory circuit or to select a cache eviction request from the second memory circuit when a cache line of the second memory circuit contains data which is to be written to the first memory circuit prior to being overwritten by data from a read request or a write request.

### Claim 29 (depends on 1)

The memory controller circuit of claim 1, wherein the memory controller circuit is coupled to a communication network for routing of a plurality of write data request packets, a plurality of read data request packets, a plurality of predetermined atomic operations request packets, a plurality of programmable atomic operation request packets to the memory controller circuit, and routing of a plurality of response data packets from the memory controller circuit to a request source address.

### Claim 30 (depends on 1)

The memory controller circuit of claim 1, wherein the programmable atomic operations circuitry comprises:
a processor circuit coupled to the first memory control circuit through an unswitched, direct communication bus.

### Claim 31 (depends on 1)

The memory controller circuit of claim 1, wherein the first memory control circuit, the second memory circuit, the second memory control circuit, the predetermined atomic operations circuitry, and the programmable atomic operations circuitry are embodied as a single integrated circuit or as a single system-on-a-chip (SOC).

### Claim 32 (depends on 1)

The memory controller circuit of claim 1, wherein the first memory control circuit, the second memory circuit, the second memory control circuit, and the predetermined atomic operations circuitry are embodied as a first integrated circuit, and the programmable atomic operations circuitry is embodied as a second integrated circuit coupled through an unswitched, direct communication bus to the first integrated circuit.

### Claim 33 (depends on 1)

The memory controller circuit of claim 1, wherein the programmable atomic operations circuitry is configured to generate a read request and generate a write request to the second memory circuit.

### Claim 34 (depends on 1)

The memory controller circuit of claim 1, wherein the programmable atomic operations circuitry is configured to perform arithmetic operations, logic operations, and control flow decisions.

### Claim 35 (depends on 1)

The memory controller circuit of claim 1, wherein the first memory circuit comprises dynamic random access memory (DRAM) circuitry and the second memory circuit comprises static random access memory (SRAM) circuitry.

### Claim 36

A method of using a memory controller circuit to perform a programmable atomic operation, the memory controller circuit coupleable to a first memory circuit, the method comprising:
using a first memory control circuit coupleable to the first memory circuit, reading or loading requested data from the first memory circuit directly in response to a read request and directly in response to an atomic operation request, and writing or storing requested data to the first memory circuit in response to a write request;
using a second memory control circuit coupled to a second memory circuit, reading or loading the requested data from the second memory circuit in response to a read request and directly in response to an atomic operation request when the requested data is stored in the second memory circuit, and transferring the read request and the atomic operation request to the first memory control circuit when the requested data is not stored in the second memory circuit;
using predetermined atomic operations circuitry, performing at least one predetermined atomic operation of a plurality of predetermined atomic operations in response to an atomic operation request designating the at least one predetermined atomic operation;
using programmable atomic operations circuitry, performing at least one programmable atomic operation of a plurality of programmable atomic operations in response to an atomic operation request designating the at least one programmable atomic operation; and
using the second memory control circuit, in response to an atomic operation request designating the at least one predetermined atomic operation and a memory address, transferring the read data and the atomic operation request to the predetermined atomic operations circuitry, setting a hazard bit stored in a memory hazard register corresponding to the memory address, writing resulting data from the predetermined atomic operation in the second memory circuit directly in response to the atomic operation request designating the at least one predetermined atomic operation and, following writing of the resulting data, resetting or clearing the set hazard bit.

### Claim 37 (depends on 36)

The method of claim 36, wherein the programmable atomic operations circuitry comprises a processor core coupled to a data buffer, and wherein the method further comprises:
using the processor core, executing a load non-buffered instruction to determine if an operand is stored in the data buffer and, when the data is not stored in the data buffer, generating a read request to the second memory control circuit.

### Claim 38 (depends on 36)

The method of claim 36, wherein the programmable atomic operations circuitry comprises a processor core, and wherein the method further comprises:
using the processor core, executing a store and clear lock instruction to generate an atomic write request to the second memory control circuit, the atomic write request having the resulting data and a designation to reset or clear a memory hazard bit following writing of the resulting data to the second memory circuit.

### Claim 39 (depends on 36)

The method of claim 36, wherein the programmable atomic operations circuitry comprises a processor core, and wherein the method further comprises:
using the processor core, executing an atomic return instruction to reset or clear a memory hazard bit following writing of the resulting data to the second memory circuit.

### Claim 40 (depends on 36)

The method of claim 36, wherein the programmable atomic operations circuitry comprises a processor core, and wherein the method further comprises:
using the processor core, executing an atomic return instruction to generate a response data packet having the resulting data.

### Claim 41 (depends on 36)

The method of claim 36, wherein the programmable atomic operations circuitry comprises a processor core, and wherein the method further comprises:
using the processor core, executing an atomic return instruction to complete an atomic operation.

### Claim 42 (depends on 36)

The method of claim 36, wherein the atomic operation request designating the at least one programmable atomic operation comprises a physical memory address, a programmable atomic operations identifier, and at least one thread state register value.

### Claim 43 (depends on 42)

The method of claim 42, wherein the programmable atomic operations circuitry further comprises at least one register storing thread state information, and wherein the method further comprises:
using the programmable atomic operations circuitry, in response to receiving the atomic operation request designating the at least one programmable atomic operation, initializing the at least one register with the physical memory address, any data corresponding to the memory address, and the at least one thread state register value.

### Claim 44 (depends on 36)

The method of claim 36, further comprising:
using the second memory control circuit, transferring read data and the atomic operation request designating the at least one programmable atomic operation to the programmable atomic operations circuitry.

### Claim 45 (depends on 36)

The method of claim 36, further comprising:
using the second memory control circuit, in response to a write request designating a memory address in the second memory circuit, setting a hazard bit stored in a memory hazard register corresponding to the memory address and, following writing or storing data to the second memory circuit at the memory address, resetting or clearing the set hazard bit.

### Claim 46 (depends on 36)

The method of claim 36, further comprising:
using the second memory control circuit, in response to a write request having write data and designating a memory address in the second memory circuit, transferring current data stored at the memory address to the first memory control circuit to write the current data to the first memory circuit, and overwriting the current data in the second memory circuit with the write data.

### Claim 47 (depends on 36)

The method of claim 36, further comprising:
using the second memory control circuit, in response to a write request having write data and designating a memory address in the second memory circuit, setting a hazard bit stored in a memory hazard register corresponding to the memory address, transferring current data stored at the memory address to the first memory control circuit to write the current data to the first memory circuit, overwriting the current data in the second memory circuit with the write data and, following writing or storing the write data to the second memory circuit at the memory address, resetting or clearing the set hazard bit.

### Claim 48 (depends on 36)

The method of claim 36, further comprising:
using the second memory control circuit, in response to an atomic operation request designating the at least one programmable atomic operation and a memory address, transferring the atomic operation request to the programmable atomic operations circuitry and setting a hazard bit stored in a memory hazard register corresponding to the memory address.

### Claim 49

A memory controller coupleable to a first memory circuit, the memory controller comprising:
a first memory control circuit coupleable to the first memory circuit, the first memory control circuit comprising:
a plurality of memory bank request queues storing a plurality of read or write requests to the first memory circuit;
a scheduler circuit coupled to the plurality of memory bank request queues, the scheduler circuit configured to select a read or write request of the plurality of read or write requests from the plurality of memory bank request queues and to schedule the read or write request for access to the first memory circuit; and
a first memory access control circuit coupled to the scheduler, the first memory access control circuit configured to read or load requested data from the first memory circuit and to write or store requested data to the first memory circuit;
a second memory circuit;
predetermined atomic operations circuitry configured to perform at least one predetermined atomic operation of a plurality of predetermined atomic operations;
programmable atomic operations circuitry configured to perform at least one programmable atomic operation of a plurality of programmable atomic operations and, in response to receiving an atomic operation request designating the at least one programmable atomic operation, to initialize at least one register with a physical memory address, any data corresponding to the memory address, and at least one thread state register value; and
a second memory control circuit coupled to the second memory circuit, the second memory control circuit comprising:
at least one input request queue storing a read or write request;
a memory hazard control circuit having a memory hazard register; and
a second memory access control circuit configured to read or load the requested data from the second memory circuit directly in response to a read request and directly in response to the atomic operation request when the requested data is stored in the second memory circuit, and to transfer the read request and the atomic operation request to the first memory control circuit when the requested data is not stored in the second memory circuit, the second memory control circuit further configured, in response to an atomic operation request designating the at least one predetermined atomic operation and a memory address, to transfer read data and the atomic operation request designating the at least one predetermined atomic operation to the predetermined atomic operations circuitry, to set a hazard bit stored in the memory hazard register corresponding to the memory address, to write resulting data from the predetermined atomic operation in the second memory circuit directly in response to the atomic operation request designating the at least one predetermined atomic operation and, following writing of the resulting data, to reset or clear the set hazard bit.
