eTPU_C Glossary


The eTPU has an architecutre all its own, so it brings a lot of terminology with it.

These are some common eTPU_C terms.


A keyword used in #pragma ETPU_function statements to indicate Alternate Channel Encoding.


The eTPU hardware attached to each pair of input and output pins. During ETPU_function execution, access to the channel hardware takes place through the channel structure.

channel conditions

The collection of channel states that invoke an eTPU function. They include timebase matches or pin transitions, flag states, and host service requests. They are specified by logical operations in the top-level if()/else if()/else structure of an ETPU_function.

channel structure

A C structure specially interpreted by the compiler. Using the channel structure generates eTPU subinstructions. The associated chan type is declared in etpuc.h.

common function frame

A function frame shared by all channels configured for ETPU_functions in the group.


Data Input Output Buffer. A register used for indirect operations on PRAM. eTPU_C makes heavy use of it in generated code. You can access it directly with variables of type register_diob.


One of two eTPU execution engines in a typical eTPU implementation. Each engine has its own ALU, registers, and channel hardware. Two engines share code memory, parameter ram, and the interface to the host.

entry table

A table that holds entry points for all threads of all ETPU_functions. eTPU_C generates this structure automatically.

It can be relocated using the #pragma entryaddr directive.


A C function specially declared as an entry point for eTPU programs.

Fractional Math

Math operations on values between 0 and 1, or -1 and 1.

On eTPU_C, fract24 variables hold 24-bit values. Though eTPU_C does have specific fractional math capability, fractional operations may also be accomplished by regular math operations.

Function Frame

The logical allocation of PRAM for ETPU_function parameters and static variables.

Each assignment of an EPTU_function to a channel has a separate function frame.


One or more global variable, C function, or ETPU_function declarations, logically related and declared to be a logical unit with a name. May be safely re-used on multiple sets of channels.


A variable that exists outside function scope, but within the scope of a Group. Not accessible to functions outside the Group.


The processor that has one or more eTPUs as peripherals.

The processor is responsible for programming the eTPU, setting up eTPU function parameters, and starting it.

Host Interface Files

Files generated by eTPU_C for the use of the compiler creating the host program. eTPU_C can generate useful information with Host Interface Macros.

Host Interface Macros

Built-in macros expanded into information about the program by eTPU_C. eTPU_C can generate Host Interface Files to communicate this information to the host.

Host Service Request

An interrupt issued by the host processor.

To respond to a host service request, the ETPU_function must test the hsr variable in the uppermost if()/else if()/else structure. Omitting the test is equivalent to testing against 0, the do-nothing setting for the host-side request register.

if()/else if()/else structure

Specially-optimized code in an ETPU_function.

This uppermost code in an ETPU_function is a series of tests of the condition codes. This code never results in generated instructions: the compiler populates the entry table based on the tests.


The Multiple Input Signature Calculator.

eTPU_C calculates the appropriate signature value and makes it available to host interface files with the ::ETPUmisc host interface macro.


Parameters are variables holding information passed from host to eTPU functions, or function to subordinate function.

ETPU_function parameters are declared exactly as other C function parameters. ETPU_function parameters are configured by the host processor during initialization, and remain in force until the host changes the channel's configuration.


Parameter RAM. The RAM shared by one or more eTPU engines and the host. eTPU_C generates host interface information for this RAM. The host program allocates RAM space for the ETPU_function parameters and statics during ETPU_function and channel initialization.

Previously described as SPRAM (Shared Parameter RAM).

preloaded parameters

Parameters that are loaded into the P and DIOB registers at the beginning of thread execution. eTPU will preload either parameters 0 and 1, or 2 and 3, depending upon the setting in the entry table.

The compiler selects which parameters to preload, based on generated code. The setting appears in the listing file, in the entry:

 00C4 40 80        03 S02 P01 ME 0200  HSR 1     lsr x ... 

The setting appears in the sixth field: P01 for preload 0 and 1, P23 for preload 2 and 3.

post processing macros

An alternative name for host interface macros.


A keyword used in #pragma ETPU_function statements to indicate Standard Channel Encoding.

standard header files

The files commonly #included into eTPU_C program modules.

  • etpuc.h defines channel structure, registers and processors specific constants.

  • etpuc_common.h assigns common names and operation definitions using the eTPU channel instructions.

  • etpuc_util.h eTPU application utilities including angle math.


An entry point and code run in response to certain channel conditions. Effectively, the body of one branch of the top-level if()/else if()/else structure of an ETPU_function.