Previous Up Next

Chapter 6  Example 6: algorithm, architecture, adequation, and code generation

From the principal window, choose File / Save as and save your sixth application under a new folder of your tutorial folder (e.g. my_example6) with the name example6.

6.1  The main algorithm

Create the main algorithm algo (cf. figure 6.1) using the library int for the operations In<1> (input), cste2<{2}> (cst), add<1> (Arit_add), mul<1> (Arit_mul), visuadd<1>, and visumul<1> (output). For the operation conv, create a function definition conv, create a reference to this definition, and give it a duration. Create the dependences between the references. Set it as main.


Figure 6.1: Main algorithm of the Example 6

Warning: it is necessary that the sensor “in” should be distributed onto the processor “root”, i.e. on the local machine, in order that it operates properly.

6.2  The main architecture

To define and constraint the main architecture:

6.3  The adequation and the code generation

To perform the adequation and to generate the code:

where SYNDEXPATH is the absolute path of the SynDEx distribution.
Warning: in the previous makefile the statements $(RM) $(A).mk and $(M4) $< >$@ must begin with a tab character.
The folder of the Example 6 must contain the following files:

To launch the execution, type the command make in the folder of the Example 6. To delete the file created during the compilation, type the command gmake clean.

From the principal window, choose File / Close. In the dialog window, click on the Save button.


Previous Up Next