# US 2019/0377581 A1 · Processing apparatus and controlling method for processing apparatus

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

- Number: US 2019/0377581 A1
- Document ID: US20190377581A1
- Status: Published application
- Kind: A1
- Application number: 16/423,898
- Filed: 2019-05-28
- Published: 2019-12-12
- Earliest claimed: 2018-06-07
- Assignees: Fujitsu Limited
- Applicants: Fujitsu Limited
- Inventors: Sota Sakashita; Norihito Gomyo
- Web page: https://patentgrep.com/patent/US20190377581A1

## CPC

- G06F 9/3842: {Speculative instruction execution}
- G06F 9/30098: {Register arrangements}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/3016: {Decoding the operand specifier, e.g. specifier format}
- G06F 9/30196: {using decoder, e.g. decoder per instruction set, adaptable or programmable decoders}
- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F 9/384: {Register renaming}
- G06F 9/38585: {with result invalidation, e.g. nullification}
- G06F 9/544: {Buffers; Shared memory; Pipes}
- G06F 21/52: during program execution, e.g. stack integrity {; Preventing unwanted data erasure; Buffer overflow}
- G06F 21/554: {involving event detection and direct action}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A processing apparatus includes a processor. The processor stores a plurality of instruction codes, each of the plurality of instruction codes is a result of decoding of an instruction, selects an instruction code that is ready to be input from the stored instruction codes, when the selected instruction code is an operation instruction, uses for the processing, a register for processing corresponding to a write destination of the operation instruction, after detecting that operands to be used for the processing are ready, in the next cycle, issues a subsequent instruction, and when the selected instruction code is a memory access instruction, uses for the address calculation, the register, writes a processing result and load data that have been temporarily written in a buffer for register update from the buffer to the register at the time of instruction completion, after the completion of the memory access instruction, issues a subsequent instruction.

## Claims

### Claim 1

A processing apparatus comprising:
a memory; and
a processor coupled to the memory and configured to:
store a plurality of instruction codes, each of the plurality of instruction codes is a result of decoding of an instruction,
select an instruction code that is ready to be input from the stored instruction codes,
when the selected instruction code is an operation instruction, used for processing, a register for processing corresponding to a write destination of the operation instruction, after detecting that operands to be used for the processing are ready, in the next cycle, issue a subsequent instruction, and
when the selected instruction code is a memory access instruction, used for address calculation, the register, write a processing result and load data that have been temporarily written in a buffer for register update from the buffer to the register at the time of instruction completion, after the completion of the memory access instruction, issue a subsequent instruction.

### Claim 2 (depends on 1)

The processing apparatus according to claim 1, wherein the processor is configured to:
determine whether or not the memory access instruction is speculative based on a state of a preceding instruction, and
issue a subsequent instruction after the completion of the memory access instruction.

### Claim 3 (depends on 1)

The processing apparatus according to claim 1, wherein the processor is configured to:
interpret the instruction,
set information for distinguishing whether the instruction is a memory access instruction or an operation instruction, and
allocate the buffer to the register.

### Claim 4 (depends on 1)

The processing apparatus according to claim 1,
wherein when the selected instruction is the memory access instruction, the processor is configured to:
execute the processing by referring to the register without referring to the buffer,
execute the writing from the buffer to the register after the instruction has been completed and it has been confirmed that the instruction is not speculative and is not canceled, and
when a speculative execution is canceled without completion of a preceding instruction, the memory access instruction is canceled without a speculative access to a data cache.

### Claim 5 (depends on 1)

The processing apparatus according to claim 1, further comprising:
a register management circuit having a table that records a first number of the buffer allocated by the decode circuit to the register; and
a reorder buffer configured to complete the instructions in accordance with an original order,
wherein the reorder buffer receives a second number from the decode circuit, receives the first number from the register management circuit, and sends the second number and the first number to the execution circuit at the time of instruction completion, and
the execution circuit writes the data in the buffer to the register and performs the processing to be performed at the time of the completion of the instruction to reflect the results of the processing and load in the register such that the result is observable from software.

### Claim 6 (depends on 1)

The processing apparatus according to claim 1, wherein the execution circuit includes a fixed-point arithmetic circuit configured to read the data in the register and use the read data for processing of the calculation instruction; and an address calculation circuit configured to read the data in the buffer and use the read data for calculation of the memory access instruction, and
the processing apparatus further comprising a data cache configured to input an address calculated by the address calculation circuit and read the data.

### Claim 7 (depends on 1)

The processing apparatus according to claim 1, wherein each of a plurality of entries in the reservation station holds a signal that indicates whether or not the processing refers to the register and a signal that indicates whether it is possible to read data from an entry corresponding to the buffer, and the number of the respective signals corresponds to the number of source operands used for the processing.

### Claim 8

A control method executed by a processor included in a processing apparatus, the control method comprising:
storing a plurality of instruction codes, each of the plurality of instruction codes is a result of decoding of an instruction;
selecting an instruction code that is ready to be input from the stored instruction codes;
when the selected instruction code is an operation instruction, used for processing, a register for processing corresponding to a write destination of the operation instruction, after detecting that operands to be used for the processing are ready, in the next cycle, issuing a subsequent instruction; and
when the selected instruction code is a memory access instruction, used for address calculation, the register, writing a processing result and load data that have been temporarily written in a buffer for register update from the buffer to the register at the time of instruction completion, after the completion of the memory access instruction, issuing a subsequent instruction.

### Claim 9 (depends on 8)

The control method according to claim 8, further comprising:
determining whether or not the memory access instruction is speculative based on a state of a preceding instruction; and
issuing a subsequent instruction after the completion of the memory access instruction.

### Claim 10 (depends on 8)

The control method according to claim 8, further comprising:
interpreting the instruction;
setting information for distinguishing whether the instruction is a memory access instruction or an operation instruction; and
allocating the buffer to the register.

### Claim 11 (depends on 8)

The control method according to claim 8, further comprising:
when the selected instruction is the memory access instruction;
executing the processing by referring to the register without referring to the buffer;
executing the writing from the buffer to the register after the instruction has been completed and it has been confirmed that the instruction is not speculative and is not canceled; and
when a speculative execution is canceled without completion of a preceding instruction, the memory access instruction is canceled without a speculative access to a data cache.

### Claim 12 (depends on 8)

The control method according to claim 8, further comprising:
storing a first number of the buffer allocated to the register;
completing the instructions in accordance with an original order;
receiving the first number of the buffer and a second number of the register;
sending the first number and the second number at the time of instruction completion;
writing the data in the buffer to the register;
performing the processing to be performed at the time of the completion of the instruction; and
reflecting the results of the processing and load in the register such that the result is observable from software.

### Claim 13 (depends on 8)

The control method according to claim 8, further comprising:
when an instruction is a calculation instruction, reading the data in the register and using the read data for processing of the calculation instruction;
when an instruction is a memory access instruction, reading the data in the buffer and using the read data for address calculation of the memory access instruction;
inputting a calculated address; and
reading the data.

### Claim 14 (depends on 8)

The control method according to claim 8, further comprising
holding a signal that indicates whether or not the processing refers to the register and a signal that indicates whether it is possible to read data from an entry corresponding to the buffer, and the number of the respective signals corresponds to the number of source operands used for the processing.

### Claim 15

A control method comprising:
storing an original instruction;
interpreting the original instruction;
inputting an interpreted instruction, based on the interpreting, to a reservation station;
storing the interpreted instruction in the reservation station;
determining, by the reservation station, whether to input an instruction code to a fixed-point arithmetic circuit or an address calculation circuit;
transmitting a general-purpose register (GPR) number and a GPR update buffer (GUB) number to a register;
allocating a GUB to a GPR that is a write destination of an operation instruction;
transmitting the GPR number and the GUB number to an execution circuit; and
processing the operation instruction based on the GPR number and the GUB number.

### Claim 16 (depends on 15)

The control method of claim 15, wherein the determining comprises selecting the instruction code from a plurality of instruction codes.

### Claim 17 (depends on 16)

The control method of claim 16, further comprising inputting the instruction code selected in out-of-order execution based on an original instruction order of a program.
