# US 12,223,323 B2 · Out-of-order vector iota calculations

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

- Number: US 12,223,323 B2
- Document ID: US12223323B2
- Status: Granted
- Kind: B2
- Application number: 18/337,652
- Filed: 2023-06-20
- Published: 2024-06-06
- Granted: 2025-02-11
- Earliest claimed: 2022-12-02
- Assignees: SiFive, Inc.
- Applicants: SiFive, Inc.
- Inventors: Yueh Chi Wu; Nicolas Rémi Brunie
- Web page: https://patentgrep.com/patent/US12223323B2

## CPC

- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30018: {Bit or string instructions}
- G06F 9/30038: {using a mask}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/3836: {Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for executing vector iota (viota) operation is disclosed. The method includes fetching a viota instruction, decoding the viota instruction into multiple viota micro-operations (uops), computing a first element viota value of a respective viota uop, determining a respective last element viota value of the respective viota uop based on the first element viota value of the respective uop, and writing the respective last element viota value of the respective viota uop to an allocated physical register. Each viota uop of the multiple viota uops has multiple elements, and each element has a viota value corresponding to a sum of active mask bits of preceding elements of the viota uops. The multiple elements of each viota uop comprise at least a first element that has a starting bit position of a respective uop and a last element that has an ending bit position of the respective uop.

## Claims

### Claim 1

A method for executing vector iota (viota) operation, the method comprising:
decoding a fetched viota instruction into viota micro-operations (uops), wherein:
each viota uop of the viota uops has multiple elements, each element having a viota value corresponding to a sum of active mask bits of preceding elements of the viota uops; and
the multiple elements of each viota uop comprise at least a first element that has a starting bit position of a respective uop and a last element that has an ending bit position of the respective uop;
computing a first element viota value of a respective viota uop;
determining a respective last element viota value of the respective viota uop based on the first element viota value of the respective uop; and
writing the respective last element viota value of the respective viota uop to an allocated physical register.

### Claim 2 (depends on 1)

The method of claim 1, wherein the viota instruction is decoded into viota uops in out-of-order.

### Claim 3 (depends on 1)

The method of claim 1, wherein computing the first element viota value of the respective viota uop is performed without waiting for a result of a last element viota value of a preceding viota uop that precedes the respective viota uop.

### Claim 4 (depends on 1)

The method of claim 1, wherein computing the first element viota value of the respective viota uop is performed without relying on a computed value of a last element viota value of a preceding viota uop that precedes the respective viota uop.

### Claim 5 (depends on 1)

The method of claim 1, wherein computing the first element viota value of the respective viota uop includes:
determining the first element viota value of the respective viota uop based on summing of active mask bits of all preceding viota uops which precede the respective viota uop.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining the respective last element viota value of the respective viota uop based on the first element viota value of the respective uop comprises:
adding the first element viota value of the respective viota uop to a sum of active mask bits that correspond to all elements of the respective viota uop that exclude or precede the last element of the respective viota uop.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
after writing the respective last element viota value of the respective viota uop to an allocated physical register, retiring the viota uop.

### Claim 8

A non-transitory computer readable medium comprising a circuit representation that, when processed by a computer, is used to program or manufacture an integrated circuit comprising:
a processor including circuitry configured to:
fetch a vector iota (viota) instruction, wherein the viota instruction includes executable instructions for a viota operation that reads a source vector mask register and writes to each element of a destination vector register group a sum of bits of elements in a mask register;
decode a fetched viota instruction into viota micro-operations (uops), wherein:
each viota uop of the viota uops has multiple elements, each element having a viota value corresponding to a sum of active mask bits of preceding elements of the viota uops; and
the multiple elements of each viota uop comprise at least a first element that has a starting bit position of a respective uop and a last element that has an ending bit position of the respective uop;
compute a first element viota value of the respective viota uop;
determine a respective last element viota value of the respective viota uop based on the first element viota value of the respective uop; and
write the respective last element viota value of the respective viota uop to an allocated physical register.

### Claim 9 (depends on 8)

The non-transitory computer readable medium of claim 8, wherein the viota instruction is decoded into the viota uops in out-of-order.

### Claim 10 (depends on 8)

The non-transitory computer readable medium of claim 8, wherein to compute the first element viota value of the respective viota uop is to be performed without waiting for a result of a last element viota value of a preceding viota uop that precedes the respective viota uop.

### Claim 11 (depends on 8)

The non-transitory computer readable medium of claim 8, wherein to compute the first value of the respective viota uop is to be performed without relying on a computed value of a last element viota value of a preceding viota uop that precedes the respective viota uop.

### Claim 12 (depends on 8)

The non-transitory computer readable medium of claim 8, wherein to compute the first element viota value of the respective viota uop comprises to:
determine the first element viota value of the respective viota uop based on summing of active mask bits of all preceding viota uops which precede the respective viota uop.

### Claim 13 (depends on 12)

The non-transitory computer readable medium of claim 12, wherein to determine the respective last element viota value of the respective viota uop based on the first element viota value of the respective uop comprises to:
add the first element viota value of the respective viota uop to a sum of active mask bits that correspond to all elements of the respective viota uop that exclude or precede the last element of the respective viota uop.

### Claim 14 (depends on 13)

The non-transitory computer readable medium of claim 13, wherein the processor is further configured to:
after writing the respective last element viota value of the respective viota uop to an allocated physical register, retire the viota uop.

### Claim 15

An integrated circuit comprising:
a vector pipeline; and
a vector processor configured to:
decode a fetched viota instruction into out-of-order viota micro-operations (uops), wherein:
each viota uop of the viota uops has multiple elements, each element having a viota value corresponding to a sum of active mask bits of preceding elements of the viota uops; and
the multiple elements of each viota uop comprise at least a first element that has a starting bit position of a respective uop and a last element that has an ending bit position of the respective uop;
compute a first element viota value of the respective viota uop; and
determine a respective last element viota value of the respective viota uop based on the first element viota value of the respective uop.

### Claim 16 (depends on 15)

The integrated circuit of claim 15, wherein to compute the first element viota value of the respective viota uop is to be performed without waiting for a result of a last element viota value of a preceding viota uop that precedes the respective viota uop.

### Claim 17 (depends on 15)

The integrated circuit of claim 15, wherein to compute the first value of the respective viota uop is to be performed without relying on a computed value of a last element viota value of a preceding viota uop that precedes the respective viota uop.

### Claim 18 (depends on 15)

The integrated circuit of claim 15, wherein to compute the first value of the respective viota uop comprises to:
determine the first element viota value of the respective viota uop based on summing of active mask bits of all preceding viota uops which precede the respective viota uop.

### Claim 19 (depends on 18)

The integrated circuit of claim 18, wherein to determine the respective last element viota value of the respective viota uop based on the first element viota value of the respective uop comprises to:
add the first element viota value of the respective viota uop to a sum of active mask bits of mask slices that correspond to all elements of the respective viota uop that exclude or precede the last element of the respective viota uop.

### Claim 20 (depends on 19)

The integrated circuit of claim 19, wherein the vector processor is further configured to:
write the respective last element viota value of the respective viota uop to an allocated physical register.
