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.
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.
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.
To define and constraint the main architecture:
To perform the adequation and to generate the code:
dnl (c)INRIA 2001-2009 dnl SynDEx v7 executive macros specific to application tutorial/example6/example6 divert(-1) define(‘NOTRACEDEF’) define(‘NBITERATIONS’,3) define(‘BINPWD’, ‘pwd’) define(‘RSHELL’, ‘ssh’) define(‘conv’,‘ifelse( MGC,‘INIT’,‘dnl’, MGC,‘LOOP’,‘$2[0] = $1[0] + 1;’, MGC,‘END’,‘dnl’)’) divert divert(-1) divert‘’dnl—————- end of file ——————
dnl (c)INRIA 2001-2009 define(‘P1_hostname_’, HOSTNAME)dnlwhere HOSTNAME is the name of the remote workstation, as indicated in the Readme file under
Warning: the characters ‘ and ’ are different.
Warning: if you increase the number of processors in your architecture,
you must add other define statements with the corresponding “processor
name”, “remote worksation name” association.
dnl (c)INRIA 2001-2009 include(example6.m4m)
# (c)INRIA 2001-2009 A = example6 M4 = m4 export SynDEx_Path = SYNDEXPATH export Algo_Macros_Path = $(SynDEx_Path)/macros/algo_libraries export Archi_Macros_Path = $(SynDEx_Path)/macros/archi_libraries export M4PATH = $(Algo_Macros_Path):$(Archi_Macros_Path) CFLAGS = -DDEBUG VPATH = $(M4PATH) .PHONY: all clean all : $(A).mk $(A).run clean :: $(RM) $(A).mk $(A).mk : $(A).m4 syndex.m4m U.m4m $(A).m4m $(M4) $< >$@ root.libs = P1.libs = include $(A).mk
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.