Streaming engine with stream metadata saving for context switching
AssigneeTexas Instruments Incorporated
InventorsJoseph Zbiciak, Timothy D. Anderson
Life of this patent
Estimating the term…
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 addresses of data elements. A steam head register stores data elements next to be supplied to functional units for use as operands. Stream metadata is stored in response to a stream store instruction. Stored stream metadata is restored to the stream engine in response to a stream restore instruction. An interrupt changes an open stream to a frozen state discarding stored stream data. A return from interrupt changes a frozen stream to an active state.
Claims20
A data processing apparatus comprising:
- a processing core;
- a memory;
- a register file;
- and
- a streaming engine configured to receive a plurality of data elements stored in the memory and to provide the plurality of data elements as a data stream to the processing core, the streaming engine including:
- an address generator to generate addresses corresponding to locations in the memory;
- a buffer to store the plurality of data elements received from the locations in the memory corresponding to the generated addresses;
- and
- an output to supply the plurality of data elements received from the memory to the processing core as the data stream, wherein the streaming engine is:
- responsive to a stream save instruction to store state metadata of the data stream into at least one register of the register file;
- and
- responsive to a stream restore instruction to recall the state metadata of the data stream from the at least one register of the register file, wherein:
- the state metadata includes a current address, the current address being generated by the address generator and corresponding to a next data element to be fetched from the memory;
- the data stream includes a plurality of loops, each loop having a total iteration count representing a number of times the loop is to repeat;
- and
- the state metadata additionally includes information indicating remaining iterations for each of the loops.
A data processing apparatus comprising:
- a processing core;
- a memory;
- a register file;
- and
- a streaming engine configured to receive a plurality of data elements stored in the memory and to provide the plurality of data elements as a data stream to the processing core, the streaming engine including:
- an address generator to generate addresses corresponding to locations in the memory, wherein the address generator includes an address register to store an address generated by the address generator which corresponds to a next element to be fetched from the memory;
- a buffer to store the plurality of data elements received from the locations in the memory corresponding to the generated addresses;
- and
- an output to supply the plurality of data elements received from the memory to the processing core as the data stream, wherein the streaming engine is:
- responsive to a stream save instruction to store state metadata of the data stream into at least one register of the register file;
- responsive to the stream save instruction to store the content of the address register into a first register of the at least one registers of the register file;
- responsive to a stream restore instruction to recall the state metadata of the data stream from the at least one register of the register file;
- and
- responsive to the stream restore instruction to store the content of the first register into the address register.
A data processing apparatus comprising:
- a processing core;
- a memory;
- a register file;
- and
- a streaming engine configured to receive a plurality of data elements stored in the memory and to provide the plurality of data elements as a data stream to the processing core, the streaming engine including:
- an address generator to generate addresses corresponding to locations in the memory;
- a buffer to store the plurality of data elements received from the locations in the memory corresponding to the generated addresses;
- and
- an output to supply the plurality of data elements received from the memory to the processing core as the data stream, wherein the streaming engine is:
- responsive to a stream save instruction to store state metadata of the data stream into at least one register of the register file;
- and
- responsive to a stream restore instruction to recall the state metadata of the data stream from the at least one register of the register file, wherein:
- after storing state meta data of the data stream into the at least one register of the register file in response to the stream save instruction, the streaming engine stops fetching the plurality of data elements of the data stream from the memory;
- the stream save instruction is issued in response to a context switch event;
- the context switch event is an interrupt event;
- the streaming engine is configured to be, at any time, in one of an inactive state, an active state, and a frozen state;
- when an interrupt event occurs while the streaming engine is in the inactive state or in the frozen state, the streaming engine does not change its current state;
- when an interrupt event occurs while the streaming engine is in the active state, the streaming engine changes from the active state to the frozen state;
- when a return from an interrupt even occurs while the streaming engine is in the inactive state, the streaming engine does not change its current state;
- and
- when a return from an interrupt even occurs while the streaming engine is in the frozen state, the streaming engine changes from the frozen state to the active state.
Dependencies are inferred from the claim text.