# US 2014/0195781 A1 · Structured control instruction fetch unit

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

- Number: US 2014/0195781 A1
- Document ID: US20140195781A1
- Status: Published application
- Kind: A1
- Application number: 13/737,894
- Filed: 2013-01-09
- Published: 2014-07-10
- Earliest claimed: 2013-01-09
- Assignees: King Abdulaziz City for Science and Technology; King Fahd University of Petroleum and Minerals
- Applicants: King Fahd University of Petroleum and Minerals; King Abdulaziz City for Science and Technology
- Inventors: MUHAMED FAWZI MUDAWAR
- Web page: https://patentgrep.com/patent/US20140195781A1

## CPC

- G06F 9/30: Arrangements for executing machine instructions, e.g. instruction decode (for executing microinstructions G06F9/22)
- G06F 9/30047: {Prefetch instructions; cache control instructions}
- G06F 9/3005: {to perform operations for flow control}
- G06F 9/30065: {Loop control instructions; iterative instructions, e.g. LOOP, REPEAT}
- G06F 9/30069: {Instruction skipping instructions, e.g. SKIP}
- G06F 9/30072: {to perform conditional operations, e.g. using predicates or guards}
- G06F 9/30149: {of variable length instructions}
- G06F 9/3017: {Runtime instruction translation, e.g. macros}
- G06F 9/322: {for non-sequential address}
- G06F 9/323: {for indirect branch instructions}
- G06F 9/325: {for loops, e.g. loop detection or loop counter}
- G06F 9/3802: {Instruction prefetching}
- G06F 9/3804: {for branches, e.g. hedging, branch folding}
- G06F 9/3806: {using address prediction, e.g. return stack, branch history buffer}
- G06F 9/3814: {Implementation provisions of instruction buffers, e.g. prefetch buffer; banks}
- G06F 9/3842: {Speculative instruction execution}
- G06F 9/3854: {Instruction completion, e.g. retiring, committing or graduating}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The structured control instruction fetch unit is a structured instruction stream controller that processes expand (XP), expand register indirect (XPR), loop (LOOP), and break (BRK) instructions for structured control. The fetch unit processes stop bits that mark the end of instruction blocks. Any instruction can be marked with a stop bit to indicate that it is the last one in an instruction block. All instructions are encoded with a predicate to reduce the use of control instructions and to simplify the control. A control stack guides instruction fetching by storing return addresses, loop block addresses, loop predicates, and loop counters. Control instructions and stop bits manage operation of the control stack. An instruction unit feeds execution units and includes a set-associative instruction cache, a control stack, an instruction buffer that decouples instruction fetching from execution, instruction decoders, and program counter (PC) control logic.

## Claims

### Claim 1

A structured control instruction fetch unit, comprising:
a stack controller;
a control stack having an address stack and a counter stack, the stack controller managing the control stack; and
execution units in operable communication with the control stack;
wherein the structured control instruction fetch unit is configured for processing fixed format block structured instructions, the fixed format block structured instructions having a control instruction including a predicate field, an opcode field, an offset field, and a stop field, the instructions being processes via the control stack, the stack controller feeding the fixed format block structured instructions to the execution units, the execution units executing blocks of the instructions based on the content of the predicate, opcode, offset, and stop fields, the execution units terminating execution of the instruction blocks upon reading stop bits in the stop fields; and
wherein the instruction blocks are executed by the execution units in direct correspondence with blocks of high-level code, the structured control instruction fetch unit implementing loops and nested block expansions without the necessity of low level branch and jump instructions.

### Claim 2 (depends on 1)

The structured control instruction fetch unit according to claim 1, wherein said stack controller further comprises means for storing return addresses, loop block addresses, loop predicates, and loop counters, thereby guiding instruction fetching of the structured control instruction fetch unit.

### Claim 3 (depends on 2)

The structured control instruction fetch unit according to claim 2, further comprising means for recursively and non-recursively expanding said instruction blocks.

### Claim 4 (depends on 3)

The structured control instruction fetch unit according to claim 3, wherein said instruction block has a first instruction and a last instruction, the first instruction being a target of said control instruction and the last instruction of said instruction block including an asserted stop bit in said stop field.

### Claim 5 (depends on 4)

The structured control instruction fetch unit according to claim 4, wherein said stack controller further comprises:
means for placing an address of a LOOP control instruction on said address stack;
means for placing a loop count defined by said LOOP control instruction on said counter stack;
means for executing a block of instructions pointed to by the LOOP address on said address stack a number of times indicated by the loop count on said counter stack; and
means for detecting the end of said loop block of instructions based on assertion of said stop bit.

### Claim 6 (depends on 5)

The structured control instruction fetch unit according to claim 5, wherein said stack controller further comprises:
means for terminating an outer block of instructions containing said LOOP control instruction based on assertion of a stop bit in said LOOP control instruction; and
means for continuing said outer block of instructions containing said LOOP control instruction based on non-assertion of said stop bit in said LOOP control instruction.

### Claim 7 (depends on 6)

The structured control instruction fetch unit according to claim 6, wherein said stack controller further comprises:
means for skipping instructions within a functional block of instructions based on execution of a BRK control instruction within the functional block of instructions; and
means for premature termination of said loop block of instructions based on execution of the BRK control instruction within said loop block of instructions.

### Claim 8 (depends on 7)

The structured control instruction fetch unit according to claim 7, wherein said means for recursively and non-recursively expanding said instruction blocks further comprises means for determining a target instruction block address based on a pseudo-direct offset field in an XP (Expand) said control instruction.

### Claim 9 (depends on 8)

The structured control instruction fetch unit according to claim 8, wherein said means for recursively and non-recursively expanding said instruction blocks further comprises means for determining a target instruction block address based on a register field and a register-indirect offset field in an XPR (Expand Register Indirect) control instruction.

### Claim 10 (depends on 9)

The structured control instruction fetch unit according to claim 9, further comprising means for unconditionally executing said control instruction based on a hard-coded default value pointed to by said predicate field.

### Claim 11 (depends on 10)

The structured control instruction fetch unit according to claim 10, further comprising means for conditionally executing said control instruction based on a programmer-determined value pointed to by said predicate field.

### Claim 12 (depends on 11)

The structured control instruction fetch unit according to claim 11, further comprising means for placing said return address associated with said control instruction on said address stack.

### Claim 13 (depends on 11)

The structured control instruction fetch unit according to claim 11, further comprising means for placing on said address stack a loop return address, a loop block address, and a loop predicate associated with said LOOP control instruction.

### Claim 14 (depends on 13)

The structured control instruction fetch unit according to claim 13, further comprising means for speculatively expanding a conditional instruction block, including:
means for marking the conditional instruction block with a programmer-specified value in said predicate field; and
means for placing a BRK control instruction in line within the conditional instruction block as an alternative instruction executing when said programmer-specified predicate is not true.

### Claim 15 (depends on 13)

The structured control instruction fetch unit according to claim 13, wherein said means for determining said target instruction block address based on said pseudo-direct offset field in said XP (Expand) control instruction further comprises means for concatenating contents of said pseudo-direct offset field with upper address bits of a program counter maintained by said fetch unit, thereby computing said target instruction block address.

### Claim 16 (depends on 13)

The structured control instruction fetch unit according to claim 13, wherein said means for determining said target instruction block address based on said register field and said register-indirect offset field in said XPR (Expand Register Indirect) control instruction further comprises means for performing a bit-wise logical OR operation using contents of said register-indirect offset field with contents of said register field, thereby computing said target instruction block address.

### Claim 17 (depends on 13)

The structured control instruction fetch unit according to claim 13, wherein memory management of said block instructions includes a set associative cache memory in operable communication with a decode and program counter control logic portion of said structured control instruction fetch unit.
