From the main window, choose File / Save as and save your sixth application under a new folder of your tutorial folder (eg. 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 and create a reference to this definition. Create the dependences between the references. Set it as main.
![]()
Figure 6.1: Main algorithm of the Example 6
To define and constraint the main arhcitecure:
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 substituted with the name of your remote station, as indicated in the Readme file under syndex-6.8.5/examples/tutorial/example6;
dnl (c)INRIA 2001-2009 include(example6.m4m)
# (c)INRIA 2001-2009 A = example6 M4 = gm4 export Algo_Macros_Path = ../../../macros/algo_libraries export Archi_Macros_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
The folder of the Example 6 must contain the following files:
To launch the execution, type the command gmake in the folder of the Example 6. To delete the file created during the compilation, type the command gmake clean.
From the main window, choose File / Close. In the dialog window, click on the Save button.