# US 2018/0322061 A1 · Streaming engine with compressed encoding for loop circular buffer sizes

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

- Number: US 2018/0322061 A1
- Document ID: US20180322061A1
- Status: Published application
- Kind: A1
- Application number: 15/971,875
- Filed: 2018-05-04
- Published: 2018-11-08
- Earliest claimed: 2016-12-20
- Assignees: Texas Instruments Incorporated
- Applicants: Texas Instruments Incorporated
- Inventors: Joseph Zbiciak
- Web page: https://patentgrep.com/patent/US20180322061A1

## CPC

- G06F 12/0862: with prefetch
- G06F 9/345: of multiple operands or results {(addressing multiple banks G06F12/06)}
- G06F 9/3552: {using wraparound, e.g. modulo or circular addressing}
- G06F 9/383: {Operand prefetching (cache prefetching G06F12/0862)}
- G06F 12/0207: {with multidimensional access, e.g. row/column, matrix}
- G06F 15/80: comprising an array of processing units with common control, e.g. single instruction multiple data processors (G06F15/82 takes precedence {; for correlation function computation G06F17/15})
- G06F 2212/6026: Prefetching based on access pattern detection, e.g. stride based prefetch
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A streaming engine employed in a digital data processor specifies a fixed read only data stream defined by plural nested loops. An address generator produces address of data elements for the nested loops. A steam head register stores data elements next to be supplied to functional units for use as operands. A stream template register specifies a circular address mode for the loop, first and second block size numbers and a circular address block size selection. For a first circular address block size selection the block size corresponds to the first block size number. For a first circular address block size selection the block size corresponds to the first block size number. For a second circular address block size selection the block size corresponds to a sum of the first block size number and the second block size number.

## Claims

### Claim 1

An address generator having a circular addressing mode, comprising:
an address adder including a plurality of AND gates for carry control between bits, each AND gate having a first input receiving a carry output of a prior bit, a second input receiving a corresponding bit of a carry control word and an output connected to a carry input of a next sequential bit;
an adder having a first input receiving a first block size number, a second input receiving a second block size number, a carry input to a least significant bit receiving a “1” input and an output generating a sum;
a multiplexer having a first input connected to said output of said adder, a second input receiving said second block size number, a control input responsive to a circular block size selection input, and an output supplying a selected input;
a lookup table storing carry control words indexed by said output of said multiplexer generating a carry control word corresponding to said output of said multiplexer, whereby upon selection of a first circular block size by said circular block size selection input, said lookup table supplying a carry control word to said adder to cause a circular block size equal to 2(A+N) where A is a first block size number and N is a predetermined integer constant, and upon selection of a second block size by said circular block size selection field, said lookup table supplying a carry control word to said adder to cause a circular block size equal to 2(A+B+1+N) where B is a second block size number.

### Claim 2 (depends on 1)

The address generator of claim 1, further comprising:
a definition template including a first block size field specifying said first block size number, a second block size field specifying said second block size number and a block size selection field; and
said address register generating addresses corresponding to said loop having circular addressing
upon selection of a first circular block size by said block size selection field, having a circular block size equal to 2(A+N) where A is the first block size number and N is a predetermined integer constant, and
upon selection of said second block size by said block size selection field, having a block size equal to 2(A+B+1+N) where B is the second block size number.

### Claim 3

A digital data processor comprising:
an instruction memory storing instructions each specifying a data processing operation and at least one data operand field;
an instruction decoder connected to said instruction memory for sequentially recalling instructions from said instruction memory and determining said specified data processing operation and said specified at least one operand;
at least one functional unit connected to said data register file and said instruction decoder for performing data processing operations upon at least one operand corresponding to an instruction decoded by said instruction decoder and storing results;
a streaming engine connected to said instruction decoder operable in response to a stream start instruction to recall from memory a stream of an instruction specified sequence of a plurality of data elements, said specified sequence including at least one loop having a circular addressing mode with a first circular block size number and a second circular block size number, said streaming engine including
an address generator for generating stream memory addresses corresponding to said stream of an instruction specified sequence of a plurality of data elements in said at least one loop employing circular addressing having a block size of a selected on of a first block size corresponding to said first block size number and a second block size corresponding to a sum of said first block size number and a second block size number,
a stream head register storing a data element of said stream next to be used by said at least one functional unit; and
wherein said at least one functional unit is responsive to a stream operand instruction to receive at least one operand from said stream head register.

### Claim 4 (depends on 3)

The digital data processor of claim 3, wherein:
said stream of the instruction specified plurality of data elements are specified at least in part by a stream definition template stored in a stream definition template register, said stream definition template specifying said first block size number, said second block size number and a block size selection field; and
said address register generating addresses corresponding to said loop having circular addressing
upon selection of a first circular block size by said block size selection field, having a circular block size equal to 2(A+N) where A is the first block size number and N is a predetermined integer constant, and
upon selection of said second block size by said block size selection field, having a block size equal to 2(A+B+1+N) where B is the second block size number.

### Claim 5 (depends on 4)

The digital data processor of claim 4, wherein:
said streaming engine further including
an adder having a first input receiving said first block size number from said stream template, a second input receiving said second block size number from said stream template, a carry input to a least significant bit receiving a “1” input and an output generating a sum,
a multiplexer having a first input connected to said output of said adder, a second input receiving said second block size number from said stream template, a control input responsive to said block size selection field, and an output supplying a selected input,
said an address generator including an address adder for said at least one loop having a circular addressing mode selected by said output of said multiplexer.

### Claim 6 (depends on 5)

The digital data processor of claim 5, wherein:
said streaming engine further comprising
a lookup table storing carry control words indexed by said output of said multiplexer generating a carry control word corresponding to said output of said multiplexer, and
wherein said address adder includes a plurality of AND gates for carry control between bits, each AND gate having a first input receiving a carry output of a prior bit, a second input receiving a corresponding bit of said carry control word output by said lookup table and an output connected to a carry input of a next sequential bit.

### Claim 7 (depends on 3)

The digital data processor of claim 3, wherein:
said stream operand instruction includes a stream operand read only instruction and a stream operand read and increment instruction;
said at least one functional unit receiving as an operand data stored in said stream head register in response to a stream operand read only instruction and a stream operand read and increment instruction; and
said streaming engine configured to store a next fetched data element in said stream head register in response to a stream operand read and increment instruction and deallocate a corresponding stream buffer cache line upon supply of all data elements stored therein.

### Claim 8 (depends on 7)

The digital data processor of claim 7, further comprising:
a data register file including a plurality of data registers designated by register number storing data;
wherein said instruction decoder is operable to
decode an instruction having a data operand field having a first subset of bit codings as a to supply data stored in a corresponding data register to a corresponding functional unit,
decode an instruction having a data operand field having a predetermined read bit coding as said stream operand read only instruction, and
decode an instruction having a data operand field having a predetermined read/advance bit coding as said stream operand read and increment instruction.

### Claim 9 (depends on 3)

The digital data processor of claim 3, wherein:
said instruction specified sequence of a plurality of data elements includes an instruction specified number of data elements having an instruction specified data size.

### Claim 10 (depends on 3)

The digital data processor of claim 3, wherein:
said stream head register is divided into lanes of said element data size; and
said streaming engine stores one data element of said stream in each lane of said stream head register.
