# US 2020/0264931 A1 · Allocation of Memory

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

- Number: US 2020/0264931 A1
- Document ID: US20200264931A1
- Status: Published application
- Kind: A1
- Application number: 16/791,323
- Filed: 2020-02-14
- Published: 2020-08-20
- Earliest claimed: 2019-02-14
- Assignees: Imagination Technologies Limited
- Applicants: Imagination Technologies Limited
- Inventors: Isuru Herath; Richard Broadhurst
- Web page: https://patentgrep.com/patent/US20200264931A1

## CPC

- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 12/0284: {Multiple user address space allocation, e.g. using different base addresses (interprocessor communication G06F15/163)}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0673: {Single storage device}
- G06F 9/30101: {Special purpose registers}
- G06F 9/30123: {according to context, e.g. thread buffers}
- G06F 9/324: {using program counter relative addressing}
- G06F 9/5016: {the resource being the memory}
- G06F 12/0223: {User address space allocation, e.g. contiguous or non contiguous base addressing}
- G06F 2209/507: Low-level
- G06F 2212/1024: Latency reduction
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods of memory allocation in which registers referenced by different groups of instances of the same task are mapped to individual logical memories. Other example methods describe the mapping of registers referenced by a task to different banks within a single logical memory and in various examples this mapping may take into consideration which bank is likely to be the dominant bank for the particular task and the allocation for one or more other tasks.

## Claims

### Claim 1

A method of memory allocation in a processing system, the processing system comprising a plurality of logical memories and the method comprising:
creating tasks, each of the tasks comprising a plurality of separate instances, each instance operating on a different data item;
grouping instances of one of the tasks into one or more groups;
for each of the groups, mapping registers referenced by the group to one of the plurality of logical memories based on a pre-defined allocation scheme adjusted by a current value of a group counter; and
adjusting the group counter for each of the tasks.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the group counter is adjusted for a task by incrementing the group counter for a previous task by one.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the instances of the task are grouped into G groups, where G is an integer, and wherein the group counter is adjusted for a task by incrementing the group counter for a previous task by G.

### Claim 4 (depends on 1)

The method according to claim 1, wherein mapping registers referenced by the group to one of the plurality of logical memories based on a pre-defined allocation scheme adjusted by a current value of a group counter comprises:
mapping registers referenced by the group to one of the plurality of logical memories based on a pre-defined sequence of the plurality of logical memories in the processing system, starting at a position in the sequence specified by the current value of the group counter.

### Claim 5 (depends on 1)

The method according to claim 1, wherein each of the logical memories comprises a plurality of memory banks, and wherein the method further comprises:
allocating a bank counter value to the task;
and wherein mapping registers referenced by the group to one of the plurality of logical memories based on a pre-defined allocation scheme adjusted by a current value of a group counter further comprises:
mapping registers referenced by the task to memory banks in one of the plurality of logical memories, wherein said one of the plurality of logical memories comprises b banks, wherein b is an integer, and wherein the mapping is based on b and the allocated bank counter value.

### Claim 6 (depends on 5)

The method according to claim 5, wherein allocating a bank counter value to the task comprises allocating a current value of the bank counter to the task, wherein the value of the bank counter is adjusted for each of the tasks.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the value of the bank counter is adjusted by incrementing the bank counter for a previous task.

### Claim 8 (depends on 6)

The method according to claim 6, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories comprises:
mapping registers referenced by the task to memory banks in said one of the plurality of logical memories according to:
(bank number)=((register number)+(allocated bank counter value)) mod b,
where bank number is an identifier for a memory bank and register number is an identifier for a register.

### Claim 9 (depends on 6)

The method according to claim 6, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories comprises:
calculating a memory address for a register based on a base pointer for the task, a register offset determined from the register number and a bank offset determined from the allocated bank counter value.

### Claim 10 (depends on 6)

The method according to claim 6, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories comprises:
updating a base pointer for the task based on the allocated bank counter value; and
calculating a memory address for a register based on the updated base pointer for the task and a register offset determined from the register number.

### Claim 11 (depends on 5)

The method according to claim 5, wherein allocating a bank counter value to the task comprises allocating a current value of the bank counter to the task and the method further comprises:
identifying a dominant bank associated with the task and
adjusting the bank counter value for allocation to a next task,
and wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories comprises:
mapping registers in the task to memory banks in said one of the plurality of logical memories based on b, the allocated bank counter value and the dominant bank for the task.

### Claim 12 (depends on 11)

The method according to claim 11, wherein adjusting the bank counter value comprises incrementing the bank counter value.

### Claim 13 (depends on 11)

The method according to claim 11, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories based on b, the allocated bank counter value and the dominant bank for the task comprises:
mapping registers referenced by the task to memory banks in said one of the plurality of logical memories based on b, the allocated bank counter value and the dominant bank for the task according to:
(bank number)=((register number)+(bank difference)) mod b, and
(bank difference)=(allocated bank counter value)−(dominant bank number)
where bank number is an identifier for a memory bank, dominant bank number is an identifier for the dominant bank of the task and register number is an identifier for a register.

### Claim 14 (depends on 11)

The method according to claim 11, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories based on b, the allocated bank counter value and the dominant bank for the task comprises:
calculating a memory address for a register based on a base pointer for the task, a register offset determined from the register number and a bank difference offset determined from the allocated bank counter value and the dominant bank of the task.

### Claim 15 (depends on 11)

The method according to claim 11, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories based on b, the allocated bank counter value and the dominant bank for the task comprises:
updating a base pointer for the task based on the allocated bank counter value and the dominant bank for the task; and
calculating a memory address for a register based on the updated base pointer for the task and a register offset determined from the register number.

### Claim 16 (depends on 5)

The method according to claim 5, wherein the method further comprises:
identifying a dominant bank associated with the task,
and wherein allocating a bank counter value to the task comprises:
allocating a bank counter value to the task based on the dominant bank for the task and a stored dominant bank mask; and
updating the dominant bank mask based on the allocation.

### Claim 17 (depends on 16)

The method according to claim 16, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories comprises:
mapping registers referenced by the task to memory banks in said one of the plurality of logical memories according to:
(bank number)=((register number)+(allocated bank counter value)) mod b,
where bank number is an identifier for a memory bank and register number is an identifier for a register.

### Claim 18 (depends on 16)

The method according to claim 16, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories comprises:
calculating a memory address for a register based on a base pointer for the task, a register offset determined from the register and a bank offset determined from the allocated bank counter value.

### Claim 19 (depends on 16)

The method according to claim 16, wherein mapping registers referenced by the task to memory banks in one of the plurality of logical memories comprises:
updating a base pointer for the task based on the allocated bank counter value; and
calculating a memory address for a register based on the updated base pointer for the task and a register offset determined from the register number.

### Claim 20

A processing system comprising:
a plurality of logical memories;
a group counter;
a task creation module configured to create tasks, each of the tasks comprising a plurality of separate instances, each instance operating on a different data item;
a scheduler configured to group instances of one of the tasks into one or more groups; and
an address generation unit configured, for each of the groups, to map registers referenced by the group to one of the plurality of logical memories based on a pre-defined allocation scheme adjusted by a current value of the group counter;
and wherein either the task creation module or the scheduler is further configured to adjust the group counter for each of the tasks.
