doppler spreading files from pathsim
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 12 Feb 2014 02:47:02 +0000 (02:47 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 12 Feb 2014 02:47:02 +0000 (02:47 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1401 01035d8c-6547-0410-b346-abe4f91aad63

12 files changed:
codec2-dev/Makefile.in
codec2-dev/configure
codec2-dev/octave/fdmdv_demod.m
codec2-dev/octave/ldpc.m
codec2-dev/octave/ldpcdec.m
codec2-dev/octave/test_qpsk.m
codec2-dev/raw/sine1k_2Hz_spread.raw [new file with mode: 0644]
codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw [new file with mode: 0644]
codec2-dev/src/lsp.c
codec2-dev/stm32/Makefile
codec2-dev/stm32/README.txt
codec2-dev/unittest/mksine.c

index ae9bb67618c51ab40594b4f80e06f331bcf0aebf..8f84043605ca439c89b7817838cb635907515d18 100644 (file)
@@ -491,7 +491,8 @@ distdir: $(DISTFILES)
              || exit 1; \
          fi; \
        done
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+       -find "$(distdir)" -type d ! -perm -755 \
+               -exec chmod u+rwx,go+rx {} \; -o \
          ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
          ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
index b93f58a45443498e9303891018a7a70d59d6fa1f..5ec4561a8f61330695380685fad7451980fc2e73 100755 (executable)
@@ -136,31 +136,6 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-# Use a proper internal environment variable to ensure we don't fall
-  # into an infinite loop, continuously re-executing ourselves.
-  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
-    _as_can_reexec=no; export _as_can_reexec;
-    # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
-  fi
-  # We don't want this to propagate to other subprocesses.
-          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -194,8 +169,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
+test x\$exitcode = x0 || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -357,14 +331,6 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -486,10 +452,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
-  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
-  # already done that, so ensure we don't try to do so again and fall
-  # in an infinite loop.  This has already happened in practice.
-  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -524,16 +486,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
+    # In both cases, we have to default to `cp -p'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
+      as_ln_s='cp -p'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -pR'
+    as_ln_s='cp -p'
   fi
 else
-  as_ln_s='cp -pR'
+  as_ln_s='cp -p'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -545,8 +507,28 @@ else
   as_mkdir_p=false
 fi
 
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1683,7 +1665,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        test -x conftest$ac_exeext
+        $as_test_x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -2388,7 +2370,7 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
          if test $ac_prog = install &&
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
@@ -2557,7 +2539,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AWK="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2691,7 +2673,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2731,7 +2713,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2805,7 +2787,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2845,7 +2827,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2898,7 +2880,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2939,7 +2921,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -2997,7 +2979,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3041,7 +3023,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3487,7 +3469,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-struct stat;
+#include <sys/types.h>
+#include <sys/stat.h>
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3864,7 +3847,7 @@ do
     for ac_prog in sed gsed; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_SED" || continue
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
 case `"$ac_path_SED" --version 2>&1` in
@@ -3940,7 +3923,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4006,7 +3989,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -4073,7 +4056,7 @@ do
     for ac_prog in fgrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_FGREP" || continue
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
 case `"$ac_path_FGREP" --version 2>&1` in
@@ -4326,7 +4309,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4370,7 +4353,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4696,7 +4679,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4736,7 +4719,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5011,7 +4994,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AR="${ac_tool_prefix}ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5051,7 +5034,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_AR="ar"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5116,7 +5099,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5156,7 +5139,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5215,7 +5198,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5255,7 +5238,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5820,7 +5803,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5860,7 +5843,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5912,7 +5895,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -5952,7 +5935,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6004,7 +5987,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6044,7 +6027,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_LIPO="lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6096,7 +6079,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6136,7 +6119,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_OTOOL="otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6188,7 +6171,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -6228,7 +6211,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -10962,16 +10945,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
+    # In both cases, we have to default to `cp -p'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
+      as_ln_s='cp -p'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -pR'
+    as_ln_s='cp -p'
   fi
 else
-  as_ln_s='cp -pR'
+  as_ln_s='cp -p'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -11031,16 +11014,28 @@ else
   as_mkdir_p=false
 fi
 
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -11201,7 +11196,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
index dc553127754c61e319dc02f4b39134f75069c55d..2e403cc62c20aa9177e11569e74e0bb5dc9036cf 100644 (file)
@@ -111,7 +111,7 @@ function fdmdv_demod(rawfilename, nbits, NumCarriers, errorpatternfilename, symb
     rx_filt = rx_filter(rx_baseband, nin);
 
     [rx_symbols rx_timing] = rx_est_timing(rx_filt, rx_baseband, nin);
-    
+
     rx_timing_log = [rx_timing_log rx_timing];
     nin = M;
     if rx_timing > 2*M/P
@@ -139,7 +139,7 @@ function fdmdv_demod(rawfilename, nbits, NumCarriers, errorpatternfilename, symb
       else
          sync_track = 0; 
       end
-
+      
       if (track == 1) && (sync_track == 1)
           dual_rx_symbols(Nc+1:2*Nc) = rx_symbols(1:Nc).*conj(prev_rx_symbols(1:Nc)./abs(prev_rx_symbols(1:Nc)));
           dual_rx_symbols_float32 = []; k = 1;
index a8bbedbc921fc72e3c7a3e7833b459c5c0df7c4b..e69d1f27f71ad0683dd1938f56717c2462f8eefc 100644 (file)
@@ -3,6 +3,7 @@
 \r
 1;\r
 \r
+\r
 function code_param = ldpc_init(rate, framesize, modulation, mod_order, mapping)\r
     [code_param.H_rows, code_param.H_cols, code_param.P_matrix] = InitializeWiMaxLDPC( rate, framesize,  0 );\r
     code_param.data_bits_per_frame = length(code_param.H_cols) - length( code_param.P_matrix );\r
@@ -10,6 +11,7 @@ function code_param = ldpc_init(rate, framesize, modulation, mod_order, mapping)
     code_param.bits_per_symbol = log2(mod_order);\r
 endfunction\r
 \r
+\r
 % Gray coded QPSK modulation function\r
 \r
 function symbol = qpsk_mod(two_bits)\r
@@ -22,6 +24,16 @@ function symbol = qpsk_mod(two_bits)
     endswitch\r
 endfunction\r
 \r
+\r
+% Gray coded QPSK demodulation function\r
+\r
+function two_bits = qpsk_demod(symbol)\r
+    bit0 = real(symbol*exp(j*pi/4)) < 0;\r
+    bit1 = imag(symbol*exp(j*pi/4)) < 0;\r
+    two_bits = [bit1 bit0];\r
+endfunction\r
+\r
+\r
 % inserts a unique word into a frame of bits.  The UW bits are spread\r
 % throughout the input frame 2 bits at a time.\r
 \r
index 91e89411d840cbf9d5fc4184573e0a1e02599fa8..6f71f832bc63e735fd7dca0e3ee2a58511b057c2 100644 (file)
@@ -4,7 +4,7 @@
 % LDPC decoder test program, given a file of QPSK symbols (IQIQ floats), \r
 % performs frame sync, decodes, and measures BER.\r
 \r
-function ldpcdec(filename)\r
+function ldpcdec(filename, Eprob)\r
 \r
   % Start CML library\r
 \r
@@ -33,7 +33,9 @@ function ldpcdec(filename)
   decoder_type = 0;\r
   max_iterations = 100;\r
   EsNo = 4;\r
-  Eprob = 0.0;\r
+  if (nargin == 1)\r
+    Eprob = 0.0;\r
+  end\r
 \r
   nbitspervocoderframe = 52;\r
   nvocoderframes = 8;\r
@@ -50,6 +52,8 @@ function ldpcdec(filename)
   Nframes = 100;\r
   uw = [1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0];\r
 \r
+  Nc = 18;\r
+\r
   % repeat same simulated vocoder data to ease testing\r
 \r
   vd = round( rand( 1, nbitspervocoderframe*nvocoderframes) );\r
@@ -58,7 +62,7 @@ function ldpcdec(filename)
 \r
   mcwfilename = strcat(filename,"_modcodeword.bin");\r
   fm=fopen(mcwfilename,"rb");\r
-  etfilename = strcat(filename,"_et.bin");\r
+  etfilename = strcat(filename,"_modcodeword_et.bin");\r
   fet=fopen(etfilename ,"rb");\r
   epfilename = strcat(filename,".err");\r
   fep=fopen(epfilename ,"wb");\r
@@ -75,12 +79,15 @@ function ldpcdec(filename)
   mod_codeword = zeros(1, code_param.code_bits_per_frame/2);\r
   lmod_codeword = code_param.code_bits_per_frame/2;\r
 \r
-  Terrs = 0; Ferrs = 0; Tbits = 0; Tframes = 0; nerr = [];\r
+  Terrs = 0; Trawerrs = 0; Ferrs = 0; Tbits = 0; Tframes = 0; nerr = []; nrawerr = [];\r
   corr = []; n = 0;\r
   sync_state = 0; sync_count = 0;\r
   mod_unpackedmodem_log = [];\r
   sync_state_log = [];\r
   entered_track_log = [];\r
+  sig_pwr_log = [];\r
+\r
+  symbols = erasures = 0;\r
 \r
   [mod_unpackedmodem_float32, count] = fread(fm,nbitspermodemframe, "float32");\r
   if (fet == -1)\r
@@ -94,8 +101,8 @@ function ldpcdec(filename)
 \r
       mod_unpackedmodem = mod_unpackedmodem_float32(1:2:nbitspermodemframe) + j*mod_unpackedmodem_float32(2:2:nbitspermodemframe);\r
       mod_unpackedmodem_log = [mod_unpackedmodem_log mod_unpackedmodem];\r
-      erasures = rand(1,length(mod_unpackedmodem)) < Eprob; \r
-      mod_unpackedmodem(erasures) = 0;\r
+      %erasures = rand(1,length(mod_unpackedmodem)) < Eprob; \r
+      %mod_unpackedmodem(erasures) = 0;\r
 \r
       % keep buffer of one entire codeword\r
 \r
@@ -134,7 +141,83 @@ function ldpcdec(filename)
                                  ones(1,length(uw)/2) * qpsk_mod([0 0]) ...\r
                                  tmp((code_param.data_bits_per_frame/2 - length(uw)/2+1):length(tmp)) ];\r
  \r
-          % LDPC decode\r
+          % determine BER stats of raw data before decoding\r
+\r
+          raw_bits = zeros(1, code_param.data_bits_per_frame - length(uw));\r
+          for i=1:(code_param.data_bits_per_frame - length(uw))/2\r
+              raw_bits(2*(i-1)+1:2*i) = qpsk_demod(mod_codeword_deinter(i));\r
+          end\r
+          error_positions = xor(vd, raw_bits);\r
+          Nerrs = sum(error_positions);\r
+          Trawerrs += Nerrs;\r
+          nrawerr(Tframes) = Nerrs;\r
+\r
+          % Determine Es/N for each carrier. For this codeword we assume\r
+          % across codeword (currently 320ms) signal is stationary.\r
+          % So for each carrier signal level is constant, so we can\r
+          % average across all symols of that carrier to get a better\r
+          % estimate of the carrier power.  The spectral noise density\r
+          % No will be the same for the bandwidth of each carrier.  So\r
+          % we can use noise samples from all symbols together to get\r
+          % a better estimate of the noise power.\r
+          \r
+          sig_pwr(Tframes,:) = zeros(1,Nc);\r
+          noise_samples = [];\r
+          for n=1:Nc\r
+\r
+            % extract a vector of one carrier's symbols for this codeword\r
+            % rotate so that decision boundaries are now real and imag axis\r
+\r
+            r = mod_codeword(n:Nc:length(mod_codeword)) .* exp(j*pi/4);\r
+\r
+            sig_est = mean(abs(r));\r
+\r
+            % The noise is the variance of symbols (samples) about the actual symbol position\r
+            % we reflect all symbols into the first quadrant to simplify things, as the actual\r
+            % received symbol isn't matter, just the noise around it.  We model the received\r
+            % symbol based on the estimated signal level.\r
+\r
+            refl_symbols = abs(real(r)) + j*abs(imag(r));    \r
+            est_symbols = exp(j*pi/4)*sig_est*ones(1,length(r));\r
+            noise_samples = [ noise_samples (est_symbols - refl_symbols)];\r
+                       \r
+            sig_pwr(Tframes,n) = sig_est .^ 2;\r
+          end\r
+          noise_pwr(Tframes) = var(noise_samples);\r
+          %plot(real(refl_symbols), imag(refl_symbols), '+');\r
+          %hold on;\r
+          %plot(real(exp(j*pi/4)*sig_est*ones(1,length(r))), imag(exp(j*pi/4)*sig_est*ones(1,length(r))), 'r+');\r
+          %hold off;\r
+          %printf("SNR: %f\n", 10*log10(sig_est*sig_est/noise_pwr(Tframes)));\r
\r
+          % Set erasures for carrier beneath a certain Es/N\r
+          \r
+          for n=1:Nc\r
+              symbols++;\r
+              EsN(n) = 10*log10(sig_pwr(Tframes,n)/noise_pwr(Tframes));\r
+              if (EsN(n) < 1)\r
+                 %mod_codeword(n:Nc:length(mod_codeword)) = 0;    \r
+                 %printf("Tframes: %d n: %d EsN = %3.2fdB\n", Tframes, n, EsN(n)); \r
+                 erasures++;                                     \r
+              end\r
+          end\r
+\r
+          % De-interleave again with erasures set ----------------------\r
+\r
+          % remove UW symbols\r
+\r
+          mod_codeword_no_uw = remove_uw_symbols(mod_codeword, code_param.data_bits_per_frame/2 - length(uw)/2, length(uw)/2);\r
+          mod_codeword_no_uw = [mod_codeword_no_uw mod_codeword((code_param.data_bits_per_frame/2+1):code_param.code_bits_per_frame/2)];\r
+\r
+          tmp = deinterleave_symbols(interleaver, mod_codeword_no_uw);\r
+        \r
+          % insert known symbols at end of data\r
+\r
+          mod_codeword_deinter = [ tmp(1:(code_param.data_bits_per_frame/2 - length(uw)/2)) ...\r
+                                 ones(1,length(uw)/2) * qpsk_mod([0 0]) ...\r
+                                 tmp((code_param.data_bits_per_frame/2 - length(uw)/2+1):length(tmp)) ];\r
+\r
+          % LDPC decode ------------------------------------------------\r
 \r
           detected_data = ldpc_dec(code_param, max_iterations, demod_type, decoder_type, mod_codeword_deinter, EsNo);\r
 \r
@@ -142,7 +225,7 @@ function ldpcdec(filename)
 \r
           vd_rx = detected_data(1:(code_param.data_bits_per_frame - length(uw)));\r
 \r
-          % measure BER\r
+          % measure coded BER\r
 \r
           error_positions = xor(vd, vd_rx);\r
           Nerrs = sum(error_positions);\r
@@ -176,8 +259,8 @@ function ldpcdec(filename)
 \r
   fclose(fep);\r
 \r
-  fprintf(1,"\nFrames: %d bits: %d errors: %d BER = %f FER = %f\n", Tframes, Tbits, Terrs, Terrs/Tbits, Ferrs/Tframes);\r
-\r
+  printf("\nFrames: %d bits: %d errors: %d Raw BER = %f Coded BER = %f FER = %f\n", Tframes, Tbits, Terrs, Trawerrs/Tbits, Terrs/Tbits, Ferrs/Tframes);\r
+  printf("Symbols: %d Erasures: %d  %f\n", symbols, erasures, erasures/symbols);\r
   figure(8)\r
   clf;\r
   [n m] = size(mod_unpackedmodem_log);\r
@@ -189,7 +272,29 @@ function ldpcdec(filename)
   subplot(311)\r
   plot(sync_state_log);\r
   subplot(312)\r
-  plot(entered_track_log);\r
+  plot(nrawerr);\r
   subplot(313)\r
   plot(nerr);\r
+\r
+  figure(10);\r
+  plot(10*log10(sig_pwr(:,3)./noise_pwr(:)),'b');\r
+  hold on;\r
+  plot(10+10*log10(noise_pwr(:)));\r
+  plot(10+10*log10(sig_pwr(:,3)),'r');\r
+%  for n=2:Nc\r
+%    plot(n*10+10*log10(sig_pwr(:,n)./noise_pwr(:,n)));\r
+%    plot(n*10+10*log10(sig_pwr(:,n)),'r');\r
+%  end\r
+  hold off;\r
+\r
+  y = 1:Tframes;\r
+  x = 1:Nc;\r
+  z = 10*log10(sig_pwr(:,:)./((noise_pwr(:)*ones(1, Nc))));\r
+  %printf("mean SNR = %3.2fdB\n", mean(z));\r
+  figure(11);\r
+  imagesc(x,y,z);\r
+  figure(12);\r
+  mesh(x,y,z);\r
+  axis([1 Nc 1 Tframes 5 15]);\r
+\r
 endfunction\r
index fdb22d34324268dd7986cb88b232d5066f261e09..6b39f0aedf70daf77a23bfe7ff8ff26b1bf5353d 100644 (file)
@@ -77,6 +77,7 @@ function sim_out = ber_test(sim_in, modulation)
     tx_filter_memory = zeros(1, Nfilter);\r
     rx_filter_memory = zeros(1, Nfilter);\r
     s_delay_line_filt = zeros(1,Nfiltsym);\r
+    tx_bits_delay_line_filt = zeros(1,Nfiltsym*bps);\r
     hf_sim_delay_line = zeros(1,M+Nhfdelay);\r
 \r
     for ne = 1:length(Esvec)\r
@@ -154,10 +155,10 @@ function sim_out = ber_test(sim_in, modulation)
                    hf_sim_delay_line(1:Nhfdelay) = hf_sim_delay_line(M+1:M+Nhfdelay);\r
                    hf_sim_delay_line(Nhfdelay+1:M+Nhfdelay) = tx_filt;\r
 \r
-                   if (sc > (length(spread)-M))\r
+                   if ((sc+M) > length(spread)) || ((sc+M) > length(spread_2ms))\r
                        sc =1 ;\r
                    end\r
-                   tx_filt = tx_filt.*spread(sc:sc+M-1)' + hf_sim_delay_line(1:M).*spread_2ms(sc+sc+M-1);\r
+                   tx_filt = tx_filt.*spread(sc:sc+M-1)' + hf_sim_delay_line(1:M).*spread_2ms(sc:sc+M-1)';\r
                    sc += M;\r
 \r
                    % normalise so average HF power C=1\r
@@ -181,12 +182,19 @@ function sim_out = ber_test(sim_in, modulation)
                rx_filter_memory(1:Nfilter-M) = rx_filter_memory(1+M:Nfilter);\r
                rx_filt_log = [rx_filt_log rx_filt];\r
 \r
-               % delay in tx data to compensate for filtering\r
+               % delay in tx symbols to compensate for filtering\r
+               % delay, as tx symbols are used as pilot symbols input\r
+               % to phase est\r
 \r
                s_delay_line_filt(1:Nfiltsym-1) = s_delay_line_filt(2:Nfiltsym);\r
                s_delay_line_filt(Nfiltsym) = s(k);\r
-               tx_bits(2*(k-1)+1:2*k) = qpsk_demod(s_delay_line_filt(1));\r
-               s(k) = s_delay_line_filt(1);   % input to phase est later\r
+               s(k) = s_delay_line_filt(1);  \r
+\r
+               % delay in tx bits to compensate for filtering delay\r
+\r
+               tx_bits_delay_line_filt(1:(Nfiltsym-1)*bps) = tx_bits_delay_line_filt(bps+1:Nfiltsym*bps);\r
+               tx_bits_delay_line_filt((Nfiltsym-1)*bps+1:Nfiltsym*bps) = tx_bits((k-1)*bps+1:k*bps);\r
+               tx_bits((k-1)*bps+1:k*bps) = tx_bits_delay_line_filt(1:bps);\r
 \r
                s_ch(k) = rx_filt;               \r
             end\r
@@ -251,9 +259,9 @@ function sim_out = ber_test(sim_in, modulation)
         TERvec(ne) = Terrs;\r
         FERvec(ne) = Ferrs;\r
         BERvec(ne) = Terrs/Tbits;\r
-        printf("  Terrs: %d BER %f BER theory %f C %f N %f Es %f No %f Es/No %f\n\n", Terrs,\r
-               Terrs/Tbits, 0.5*erfc(sqrt(EsNo/2)), var(tx_filt_log), var(noise_log),\r
-               var(tx_filt_log)/Rs, var(noise_log)/Fs, (var(tx_filt_log)/Rs)/(var(noise_log)/Fs));\r
+        %printf("  Terrs: %d BER %f BER theory %f C %f N %f Es %f No %f Es/No %f\n\n", Terrs,\r
+        %       Terrs/Tbits, 0.5*erfc(sqrt(EsNo/2)), var(tx_filt_log), var(noise_log),\r
+        %       var(tx_filt_log)/Rs, var(noise_log)/Fs, (var(tx_filt_log)/Rs)/(var(noise_log)/Fs));\r
     end\r
     \r
     Ebvec = Esvec - 10*log10(bps);\r
@@ -295,35 +303,37 @@ endfunction
 \r
 % Start simulations ---------------------------------------\r
 \r
-sim_in.Esvec            = 1:10\r
+sim_in.Esvec            = 1:12\r
 sim_in.Ntrials          = 100;\r
-sim_in.framesize        = 30;\r
+sim_in.framesize        = 100;\r
+sim_in.Rs               = 100;\r
 sim_in.phase_offset     = 0;\r
-sim_in.phase_est        = 1;\r
+sim_in.phase_est        = 0;\r
 sim_in.w_offset         = 0;\r
 sim_in.plot_scatter     = 0;\r
-sim_in.Rs               = 100;\r
-sim_in.hf_sim           = 1;\r
-sim_in.hf_delay_ms      = 2;\r
+sim_in.hf_sim           = 0;\r
 \r
 sim_qpsk                = ber_test(sim_in, 'qpsk');\r
-\r
-sim_in.phase_offset     = 0;\r
+sim_dqpsk               = ber_test(sim_in, 'dqpsk');\r
+sim_in.phase_est        = 1;\r
+sim_qpsk_coh            = ber_test(sim_in, 'qpsk');\r
+sim_in.hf_delay_ms      = 2;\r
+sim_in.hf_sim           = 1;\r
+sim_qpsk_hf             = ber_test(sim_in, 'qpsk');\r
 sim_in.phase_est        = 0;\r
-sim_in.w_offset         = 0;  \r
-sim_in.plot_scatter     = 1;\r
-sim_in.Esvec            = 70;\r
-sim_in.hf_sim           = 0;\r
-sim_qpsk_scatter        = ber_test(sim_in, 'dqpsk');\r
+sim_dqpsk_hf            = ber_test(sim_in, 'dqpsk');\r
 \r
 figure(1); \r
 clf;\r
-semilogy(sim_qpsk.Ebvec, sim_qpsk.BERvec)\r
+semilogy(sim_qpsk.Ebvec, sim_qpsk.BERvec,'b;qpsk;')\r
 hold on;\r
-semilogy(sim_qpsk.Ebvec, sim_qpsk.BER_theoryvec,'r;theory;')\r
-%semilogy(sim_qpsk_coh.Ebvec, sim_qpsk_coh.BERvec,'r;coherent;')\r
+semilogy(sim_qpsk.Ebvec, sim_qpsk.BER_theoryvec,'r;qpsk theory;')\r
+semilogy(sim_dqpsk.Ebvec, sim_dqpsk.BERvec,'g;dqpsk;')\r
+semilogy(sim_qpsk_coh.Ebvec, sim_qpsk_coh.BERvec,'k;qpsk coh;')\r
+semilogy(sim_qpsk_hf.Ebvec, sim_qpsk_hf.BERvec,'c;qpsk hf;')\r
+semilogy(sim_dqpsk_hf.Ebvec, sim_dqpsk_hf.BERvec,'m;dqpsk hf;')\r
 hold off;\r
 xlabel('Eb/N0')\r
 ylabel('BER')\r
-grid\r
+grid("minor")\r
 \r
diff --git a/codec2-dev/raw/sine1k_2Hz_spread.raw b/codec2-dev/raw/sine1k_2Hz_spread.raw
new file mode 100644 (file)
index 0000000..2ab521f
Binary files /dev/null and b/codec2-dev/raw/sine1k_2Hz_spread.raw differ
diff --git a/codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw b/codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw
new file mode 100644 (file)
index 0000000..d694d23
Binary files /dev/null and b/codec2-dev/raw/sine1k_2ms_delay_2Hz_spread.raw differ
index 47001c1efde15a28f29cf73b3d5161ed1b9a6b57..c5167b7a46806249c1966fb57db94898dc217186 100644 (file)
@@ -212,7 +212,7 @@ int lpc_to_lsp (float *a, int lpcrdr, float *freq, int nb, float delta)
            interval between xl and xr and repeat till root is located
            within the specified limits  */
 
-           if((psumr*psuml)<0.0){
+           if(((psumr*psuml)<0.0) || (psumr == 0.0)){
                roots++;
 
                psumm=psuml;
index 8eaf9d15808b68917cae15e834f81f80190ae36e..583105e35e934b401f9d14e34619f3ae4b576393 100644 (file)
@@ -110,7 +110,7 @@ OBJS = $(SRCS:.c=.o)
 
 ###################################################
 
-all: libstm32f4.a $(PROJ_NAME).elf fft_test.elf dac_ut.elf dac_play.elf adc_ut.elf
+all: libstm32f4.a $(PROJ_NAME).elf fft_test.elf dac_ut.elf dac_play.elf adc_ut.elf timer_ut.elf
 
 dl/$(PERIPHLIBZIP):
        mkdir -p dl
@@ -166,6 +166,16 @@ src/init.c
 adc_ut.elf: $(ADC_UT_SRCS)
        $(CC) $(CFLAGS) $^ -o $@ $(LIBPATHS) $(LIBS)
 
+TIMER_UT_SRCS=\
+gdb_stdio.c \
+src/timer_ut.c \
+src/system_stm32f4xx.c \
+src/startup_stm32f4xx.s \
+src/init.c
+
+timer_ut.elf: $(TIMER_UT_SRCS)
+       $(CC) $(CFLAGS) $^ -o $@ $(LIBPATHS) $(LIBS)
+
 clean:
        rm -f *.o
        rm -f *.elf
index eb23863076964d2025d00d97403e2408f9ca312b..0a8885eae37789c43b5275a6ab571f7bcb79e3df 100644 (file)
@@ -55,7 +55,7 @@ Getting Started
 
 . In _another_ console start gdb:
 
-   $ ~/codec2-dev/stm32$ ~/gcc-arm-none-eabi-4_7-2013q1-20130313-linux.tar.bz2 stm32f4_codec2.elf
+   $ ~/codec2-dev/stm32$ ~/gcc-arm-none-eabi-4_7-2013q1/bin/arm-none-eabi-gdb stm32f4_codec2.elf
 
    (gdb) tar ext :4242
 
index f501f06a9018a0c3a9c757b1a109fe9630ac194f..0c77c5f60571d3abc1c641d25b8b658aa62df2ae 100644 (file)
@@ -13,7 +13,7 @@
 
 #define TWO_PI     6.283185307
 #define FS         8000.0
-#define AMP        32767.0
+#define AMP        10000.0
 
 int main(int argc, char *argv[]) {
     FILE *f;