Next: How to Load the
Up: Code generation
Previous: Overview
  Contents
Each macro-executive source file must be first translated by the GNU
m4 macroprocessor, into a text file in the language preferred for the
processor (usually assembler for efficiency, sometimes C or another
high-level language for portability). This translation relies on
several files included in the following order:
- the first macro-call of the macro-executive source:
"include(syndex.m4x)", includes the file syndex.m4x, which defines
all the SynDEx generic (processor-independent) macros, which rely on
low-level specific macros expected to be defined by the following
included files;
- the second macro-call of the macro-executive source:
"processor_(processorType, processorName, applicationName, version,
date)" (where "processorType", "processorName", and
"applicationName" respectively stand for the processor type name,
the processor name, and the application name, as specified under
SynDEx), includes:
- the file processorType.m4x, which defines low-level macros
specific to the processorType,
- the file applicationName.m4x, which defines application-specific macros,
- the file processorName.m4x, if it exists, which defines macros specific to processorName only.
- then, after the memory-allocation macro-calls, each
communication sequence starts with a "thread_(mediaType, mediaName,
processorNames)" macro-call (where "mediaType", "mediaName", and
"processorNames" repectively stand for the medium type name, the medi
name, and the list of the names of the processors connected to the
medium, as specified under SynDEx), which includes the file
mediaType.m4x, which defines low-level communication macros specific
to the medium type.
These indirected inclusions, through the names specified under SynDEx,
provide a very flexible and powerful mechanism needed to support
efficiently heterogeneous architectures, with heterogeneous languages
and compilation chains.
Then each macroprocessed text file must be compiled with the adequate
compiler, and linked with the adequate linker against separately
compatibly-compiled application-specific files and/or
processor-specific libraries, for those macros which cannot simply
inline the desired code, but instead must call separately compiled
codes.
Next: How to Load the
Up: Code generation
Previous: Overview
  Contents
Julien Forget
2003-03-21