IP Library › Granted Patent US 12,118,358
Granted Patent B2
US 12,118,358 · App. 17/583,380 · Granted Oct 15, 2024

One-dimensional zero padding in a stream of matrix elements

Inventors: Son Hung Tran (Murphy, TX); Shyam Jagannathan (Bangalore, IN); Timothy David Anderson (University Park, TX)
Assignee: Texas Instruments Incorporated
G06F9/3016G06F9/30014G06F9/30036G06F9/30043G06F9/30098G06F9/30101G06F9/30112G06F9/30145G06F9/32G06F9/345G06F9/3802G06F9/383G06F9/3867G06F11/00G06F11/1048G06F12/0811G06F12/0875G06F12/0897G06F15/8015G06F9/3822G06F11/10G06F17/16G06F2212/452G06F2212/60G06F2212/604
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,118,358
App. No.
17/583,380
Granted
Oct 15, 2024
Kind
B2
Abstract

Software instructions are executed on a processor within a computer system to configure a streaming engine with stream parameters to define a multidimensional array. The stream parameters define a size for each dimension of the multidimensional array and a specified width for a selected dimension of the array. Data is fetched from a memory coupled to the streaming engine responsive to the stream parameters. A stream of vectors is formed for the multidimensional array responsive to the stream parameters from the data fetched from memory. When the selected dimension in the stream of vectors exceeds the specified width, the streaming engine inserts null elements into each portion of a respective vector for the selected dimension that exceeds the specified width in the stream of vectors. Stream vectors that are completely null are formed by the streaming engine without accessing the system memory for respective data.

Claims (70)

1. A method comprising:

receiving a set of parameters that defines a size of an array in a dimension and defines a set of loops, wherein the set of loops includes a first loop;

for a first iteration of the first loop:

retrieving a first set of data from a memory;

for a second iteration of the first loop:

retrieving a second set of data from the memory; and

based on the size of the array in the dimension, replacing a portion of the second set of data with a first set of null elements to generate a third set of data;

for a third iteration of the first loop:

based on the size of the array in the dimension, generating a fourth set of data that includes a second set of null elements, wherein:

the generating of the second set of null elements of the fourth set of data does not include an access of the memory; and

providing the first set of data, the third set of data, and the fourth set of data.

2. The method of claim 1 , wherein the set of parameters specifies a null value for the first set of null elements and the second set of null elements.

3. The method of claim 1 , wherein each element of the first set of null elements and the second set of null elements has a value of zero.

4. The method of claim 1 , wherein:

the retrieving of the first set of data includes:

generating a first set of addresses;

translating the first set of addresses using a table look-aside buffer to generate a second set of addresses; and

retrieving the first set of data from the memory using the second set of addresses; and

the generating of the second set of null elements of the fourth set of data does not include an access of the table look-aside buffer.

5. The method of claim 1 , wherein the providing of the first set of data, the third set of data, and the fourth set of data includes providing a stream of vectors corresponding to the first set of data, the third set of data, and the fourth set of data.

6. The method of claim 5 , wherein the set of parameters specifies an element size of the array, a number of elements in each vector of the stream of vectors, and a number of vectors in the stream of vectors.

7. The method of claim 5 , wherein the receiving of the set of parameters, the retrieving of the first set of data, the retrieving of the second set of data, the generating of the fourth set of data, and the providing of the first set of data, the third set of data, and the fourth set of data are performed in response to a stream open command that specifies a register storing the set of parameters from among a set of registers.

8. The method of claim 1 , wherein the generating of the second set of null elements includes:

maintaining a count based on the size of the array in the dimension; and

generating a null element of the second set of null elements based on the count reaching zero.

9. The method of claim 1 , wherein:

the memory is an L2 cache memory; and

the retrieving of the first set of data retrieves the first set of data from the L2 cache memory by bypassing an L1 cache memory coupled to the L2 cache memory.

10. A device comprising:

a register configured to store a set of parameters that defines a size of an array in a dimension and defines a loop; and

a memory configured to store the array;

a circuit coupled to the register and the memory and configured to:

for a first iteration of the loop:

retrieve a first set of data from the memory;

for a second iteration of the loop:

retrieve a second set of data from the memory; and

based on the size of the array in the dimension, replace a portion of the second set of data with a first set of null elements to produce generate a third set of data;

for a third iteration of the loop:

based on the size of the array in the dimension, generate a fourth set of data that includes a second set of null elements, wherein:

generation of the second set of null elements of the fourth set of data does not include an access of the memory; and

provide the first set of data, the third set of data, and the fourth set of data.

11. The device of claim 10 , wherein the set of parameters specifies a null value for the first set of null elements and the second set of null elements.

12. The device of claim 10 , wherein each element of the first set of null elements and the second set of null elements has a value of zero.

13. The device of claim 10 , wherein:

the circuit includes a table look-aside buffer;

the circuit is configured to retrieve the first set of data by:

generating a first set of addresses;

translating the first set of addresses using the table look-aside buffer to generate a second set of addresses; and

retrieving the first set of data from the memory using the second set of addresses; and

generation of the second set of null elements of the fourth set of data does not include an access of the table look-aside buffer.

14. The device of claim 10 , wherein the circuit is configured to provide the first set of data, the third set of data, and the fourth set of data as a stream of vectors.

15. The device of claim 14 , wherein the set of parameters specifies an element size of the array, a number of elements in each vector of the stream of vectors, and a number of vectors in the stream of vectors.

16. The device of claim 10 , wherein the circuit is configured to generate the second set of null elements by:

maintaining a count based on the size of the array in the dimension; and

generating a null element of the second set of null elements based on the count reaching zero.

17. A device comprising:

a processor core comprising a register configured to store a set of parameters that defines a size of an array in a dimension and defines a loop;

a level one (L1) cache memory coupled to the processor core;

a level two (L2) cache memory coupled to the L1 cache memory; and

a circuit coupled between the processor core and the L2 cache memory in parallel with the L1 cache memory, wherein the circuit is configured to:

receive the set of parameters from the processor core;

for a first iteration of the loop, retrieve a first set of data from the L2 cache memory;

for a second iteration of the loop, based on the size of the array in the dimension, generate a second set of data that includes a set of null elements, wherein:

generation of the set of null elements of the second set of data does not include an access of the L2 cache memory; and

provide the first set of data and the second set of data.

18. The device of claim 17 , wherein:

the set of null elements is a first set of null elements; and

the circuit is configured to, for a third iteration of the loop:

retrieve a third set of data from the L2 cache memory; and

based on the size of the array in the dimension, replace a portion of the third data set of data with a second set of null elements.

Continuity (6)
Continuation 16420447 · May 23, 2019
Continuation In Part 16227238 · Dec 20, 2018
Continuation 15429205 · Feb 10, 2017
Division 14331986 · Jul 15, 2014
Provisional Application 61846148 · Jul 15, 2013
Related Publication 20220147484A1 · May 12, 2022
Cited By (1)
US 12,530,196