|
@@ -114,28 +114,25 @@ fi
|
|
|
###############################################################################
|
|
|
|
|
|
#with or without automatic data transfers
|
|
|
-AC_MSG_CHECKING(Automatic Data transfers for Fpga driver)
|
|
|
-AC_ARG_ENABLE(autofpga, [AS_HELP_STRING([--enable-autofpga=<number>],
|
|
|
- [set 0 to disable])],
|
|
|
- autofpga=$enableval, autofpga=1)
|
|
|
+AC_MSG_CHECKING(automatic data transfers for FPGA driver)
|
|
|
+AC_ARG_ENABLE(autofpga, [AS_HELP_STRING([--disable-autofpga],
|
|
|
+ [disable automatic data transfers for FPGA driver])],
|
|
|
+ autofpga=$enableval, autofpga=yes)
|
|
|
AC_MSG_RESULT($autofpga)
|
|
|
-
|
|
|
-AC_DEFINE_UNQUOTED(STARPU_AUTOFPGA, [$autofpga],
|
|
|
- [automatic data transfer for Fpga])
|
|
|
+if test x$autofpga = xyes ; then
|
|
|
+ AC_DEFINE(STARPU_AUTOFPGA, [1], [automatic data transfer for Fpga])
|
|
|
+fi
|
|
|
|
|
|
#NUMBER OF FPGA DEVICES
|
|
|
-AC_MSG_CHECKING(maximum number of Fpga devices)
|
|
|
+AC_MSG_CHECKING(maximum number of FPGA devices)
|
|
|
AC_ARG_ENABLE(maxfpgadev, [AS_HELP_STRING([--enable-maxfpgadev=<number>],
|
|
|
[maximum number of FPGA devices])],
|
|
|
nmaxfpgadev=$enableval, nmaxfpgadev=12)
|
|
|
AC_MSG_RESULT($nmaxfpga)
|
|
|
+AC_DEFINE_UNQUOTED(STARPU_MAXFPGADEVS, [$nmaxfpgadev],[maximum number of FPGA devices])
|
|
|
|
|
|
-#nmaxfpgadev=60
|
|
|
-AC_DEFINE_UNQUOTED(STARPU_MAXFPGADEVS, [$nmaxfpgadev],
|
|
|
- [maximum number of Fpga devices])
|
|
|
-
|
|
|
AC_ARG_WITH([fpga],
|
|
|
- [AS_HELP_STRING([--with-fpga=<path>],[specify where Fpga lib is installed])],
|
|
|
+ [AS_HELP_STRING([--with-fpga=<path>],[specify where FPGA lib is installed])],
|
|
|
[fpga_dir="$withval"
|
|
|
enable_fpga=yes],
|
|
|
[enable_fpga=no]
|
|
@@ -146,17 +143,8 @@ AC_ARG_ENABLE(link-with-riffa, [AS_HELP_STRING([--disable-link-with-riffa],
|
|
|
AC_ARG_ENABLE(link-with-maxeler, [AS_HELP_STRING([--disable-link-with-maxeler],
|
|
|
[link with MAXELER])], [link_with_maxeler=$enableval], [link_with_maxeler=yes])
|
|
|
|
|
|
-
|
|
|
-AC_MSG_CHECKING(whether Fpga should be used)
|
|
|
-AC_MSG_RESULT($enable_fpga)
|
|
|
-AC_SUBST(STARPU_USE_FPGA,$enable_fpga)
|
|
|
-AM_CONDITIONAL(STARPU_USE_FPGA,test x$enable_fpga = xyes)
|
|
|
-if test x$enable_fpga = xyes; then
|
|
|
- AC_DEFINE(STARPU_USE_FPGA,[1],[Trying to set STARPU_USE_FPGA])
|
|
|
-fi
|
|
|
-
|
|
|
-if test x$enable_fpga = xyes; then
|
|
|
-
|
|
|
+if test x$enable_fpga = xyes
|
|
|
+then
|
|
|
fpga_include_dir="${fpga_dir}/include"
|
|
|
fpga_lib_dir="${fpga_dir}/lib"
|
|
|
|
|
@@ -170,7 +158,7 @@ if test x$enable_fpga = xyes; then
|
|
|
STARPU_FPGA_CPPFLAGS="`slic-config --cflags | sed s/\'//g | sed "s/-I /-I/"` $STARPU_FPGA_CPPFLAGS"
|
|
|
STARPU_FPGA_LDFLAGS="`slic-config --libs | sed s/\'//g | sed "s/-L /-L/" | sed "s/-L /-L/"`"
|
|
|
else
|
|
|
- STARPU_FPGA_LDFLAGS="-L$fpga_lib_dir -lfpga -lrt -lm"
|
|
|
+ STARPU_FPGA_LDFLAGS="-L$fpga_lib_dir -lfpga -lrt -lm"
|
|
|
fi
|
|
|
|
|
|
CPPFLAGS="${CPPFLAGS} ${STARPU_FPGA_CPPFLAGS} "
|
|
@@ -185,19 +173,32 @@ if test x$enable_fpga = xyes; then
|
|
|
[have_valid_fpga="yes"],
|
|
|
[have_valid_fpga="no"]
|
|
|
)
|
|
|
- AC_MSG_CHECKING(whether Fpga is working)
|
|
|
- if test x$have_valid_fpga = xyes; then
|
|
|
- AC_MSG_RESULT([:-)])
|
|
|
- else
|
|
|
- AC_MSG_RESULT([;(])
|
|
|
- fi
|
|
|
-
|
|
|
- LDFLAGS="${SAVED_LDFLAGS}"
|
|
|
- CPPFLAGS="${SAVED_CPPFLAGS}"
|
|
|
+ AC_MSG_CHECKING(whether FPGA is working)
|
|
|
+ AC_MSG_RESULT($have_valid_fpga)
|
|
|
|
|
|
AC_SUBST(STARPU_FPGA_CPPFLAGS)
|
|
|
AC_SUBST(STARPU_FPGA_LDFLAGS)
|
|
|
+ else
|
|
|
+ AC_MSG_CHECKING(whether FPGA is installed)
|
|
|
+ AC_MSG_RESULT([no])
|
|
|
fi
|
|
|
+ LDFLAGS="${SAVED_LDFLAGS}"
|
|
|
+ CPPFLAGS="${SAVED_CPPFLAGS}"
|
|
|
+
|
|
|
+ # in case FPGA was explicitely required, but is not available, this is an error
|
|
|
+ if test x$enable_fpga = xyes -a x$have_valid_fpga = xno; then
|
|
|
+ AC_MSG_ERROR([cannot find FPGA])
|
|
|
+ fi
|
|
|
+ # now we enable FPGA if and only if a proper setup is available
|
|
|
+ enable_fpga=$have_valid_fpga
|
|
|
+fi
|
|
|
+
|
|
|
+AC_MSG_CHECKING(whether FPGA should be used)
|
|
|
+AC_MSG_RESULT($enable_fpga)
|
|
|
+AC_SUBST(STARPU_USE_FPGA,$enable_fpga)
|
|
|
+AM_CONDITIONAL(STARPU_USE_FPGA,test x$enable_fpga = xyes)
|
|
|
+if test x$enable_fpga = xyes; then
|
|
|
+ AC_DEFINE(STARPU_USE_FPGA,[1],[FPGA support is activated])
|
|
|
fi
|
|
|
|
|
|
|