[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3419 - in gnuradio/branches/developers/jcorgan/wip: .
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r3419 - in gnuradio/branches/developers/jcorgan/wip: . config gnuradio-core/src/lib/runtime gnuradio-core/src/python/gnuradio/gr gnuradio-examples/python/audio gnuradio-examples/python/channel-coding gnuradio-examples/python/gmsk2 gr-trellis/src/lib usrp/host/apps |
Date: |
Fri, 25 Aug 2006 18:19:18 -0600 (MDT) |
Author: jcorgan
Date: 2006-08-25 18:19:17 -0600 (Fri, 25 Aug 2006)
New Revision: 3419
Added:
gnuradio/branches/developers/jcorgan/wip/config/grc_build.m4
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/audio/audio_fft.py
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization.py
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py
Modified:
gnuradio/branches/developers/jcorgan/wip/Makefile.am
gnuradio/branches/developers/jcorgan/wip/config/Makefile.am
gnuradio/branches/developers/jcorgan/wip/config/grc_ezdop.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_core.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_examples.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_atsc.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_alsa.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_jack.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_oss.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_osx.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_portaudio.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_windows.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_comedi.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_error_correcting_codes.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_ezdop.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_gsm_fr_vocoder.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radar.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radio_astronomy.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_rdf.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_trellis.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_usrp.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_video_sdl.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_wxgui.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_mblock.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_pmt.m4
gnuradio/branches/developers/jcorgan/wip/config/grc_usrp.m4
gnuradio/branches/developers/jcorgan/wip/config/macosx_audiounit.m4
gnuradio/branches/developers/jcorgan/wip/configure.ac
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.cc
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.h
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.i
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/python/gnuradio/gr/flow_graph.py
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/README
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_tcm_combined.py
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/gmsk2/tunnel.py
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/Makefile.am
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.cc.t
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.h.t
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.cc
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.h
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.h.t
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.i.t
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.cc
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.h
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.i
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.cc
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.h
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.i
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.cc
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.h
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.i
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.cc
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.h
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.cc
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.h
gnuradio/branches/developers/jcorgan/wip/usrp/host/apps/Makefile.am
Log:
Merged -r3357:3418 from trunk into jcorgan/wip.
Modified: gnuradio/branches/developers/jcorgan/wip/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/Makefile.am 2006-08-26
00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/Makefile.am 2006-08-26
00:19:17 UTC (rev 3419)
@@ -26,5 +26,5 @@
configure \
config.h.in
-SUBDIRS = @subdirs@
-DIST_SUBDIRS = @subdirs@ @failed_subdirs@
+SUBDIRS = @build_dirs@
+DIST_SUBDIRS = @build_dirs@ @skipped_dirs@
Modified: gnuradio/branches/developers/jcorgan/wip/config/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/Makefile.am 2006-08-26
00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/Makefile.am 2006-08-26
00:19:17 UTC (rev 3419)
@@ -31,6 +31,7 @@
cppunit.m4 \
gr_as.m4 \
gr_boost.m4 \
+ grc_build.m4 \
grc_gnuradio_core.m4 \
grc_gnuradio_examples.m4 \
grc_gr_atsc.m4 \
Copied: gnuradio/branches/developers/jcorgan/wip/config/grc_build.m4 (from rev
3418, gnuradio/trunk/config/grc_build.m4)
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_build.m4
(rev 0)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_build.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -0,0 +1,50 @@
+dnl 2006 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+dnl Boston, MA 02111-1307, USA.
+
+# Create --enable-foo argument for named component, create variables as needed
+# $1 is component name
+AC_DEFUN([GRC_ENABLE],[
+ AC_ARG_ENABLE([$1],[ --enable-$1 Fail build if $1 fails
configuration],[],
+ [[enable_]m4_bpatsubst($1,-,_)=$enable_all_components])
+])
+
+# Conditionally build named component.
+# $1 is component name
+# $2 is executed if configuration passes and build is desired
+# Use $passed=no to indicate configuration failure
+# Any other value of $passed, including blank, assumes success
+AC_DEFUN([GRC_BUILD_CONDITIONAL],[
+ if test x$passed = xno; then
+ skipped_dirs="$skipped_dirs $1"
+ if test x$[enable_]m4_bpatsubst($1,-,_) = xyes; then
+ AC_MSG_ERROR([Component $1 has errors, stopping.])
+ else
+ AC_MSG_RESULT([Not building component $1.])
+ fi
+ else
+ if test x$[enable_]m4_bpatsubst($1,-,_) != xno; then
+ $2
+ build_dirs="$build_dirs $1"
+ AC_MSG_RESULT([Component $1 passed configuration checks, building.])
+ else
+ skipped_dirs="$skipped_dirs $1"
+ AC_MSG_RESULT([Component $1 passed configuration checks, but not
building.])
+ fi
+ fi
+])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_ezdop.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_ezdop.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_ezdop.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_EZDOP],[
- AC_CONFIG_SRCDIR([ezdop/src/host/ezdop/ezdop.h])
+ GRC_ENABLE([ezdop])
AC_CONFIG_FILES([ \
ezdop/Makefile \
@@ -31,32 +31,37 @@
ezdop/src/host/tests/Makefile \
])
- succeeded=yes
+ passed=yes
# Firmware build requires Atmel AVR microcontroller port of GCC
AC_PATH_PROG([AVRGCC], [avr-gcc -v], [no])
if test x$AVRGCC = xno; then
- succeeded=no
+ passed=no
+ AC_MSG_RESULT([ezdop requires avr-gcc, not found.])
fi
# ...and binutils
AC_PATH_PROG([AVROBJCOPY], [avr-objcopy], [no])
if test x$AVROBJCOPY = xno; then
- succeeded=no
+ passed=no
+ AC_MSG_RESULT([ezdop requires avr binutils, not found.])
fi
# ...and standard library (test not working yet)
- #AC_CHECK_HEADERS([avr/io.h],[],[succeeded=no])
+ #AC_CHECK_HEADERS([avr/io.h],[],
+ # [passed=no;AC_MSG_RESULT([ezdop requires avr glibc, not found.])])
# Device access is via libftdi
AC_LANG_PUSH(C)
- AC_CHECK_HEADERS([ftdi.h],[],[succeeded=no])
+ AC_CHECK_HEADERS([ftdi.h],[],
+ [passed=no;AC_MSG_RESULT([ezdop requires ftdi.h, not found.])])
save_LIBS="$LIBS"
- AC_SEARCH_LIBS([ftdi_init], [ftdi],[FTDI_LIBS="$LIBS"],[succeeded=no])
+ AC_SEARCH_LIBS([ftdi_init], [ftdi],[FTDI_LIBS="$LIBS"],
+ [passed=no;AC_MSG_RESULT([ezdop requires libftdi, not found.])])
LIBS="$save_LIBS"
AC_LANG_POP
-
- if test x$succeeded = xyes; then
+
+ GRC_BUILD_CONDITIONAL([ezdop],[
EZDOP_INCLUDES='-I$(top_srcdir)/ezdop/src/host/ezdop/
-I$(top_srcdir)/ezdop/src/firmware/'
EZDOP_LIBS='-lezdop'
AC_SUBST(FTDI_LIBS)
@@ -64,9 +69,5 @@
AC_SUBST(EZDOP_LIBS)
AC_SUBST(AVRGCC)
AC_SUBST(AVROBJCOPY)
-
- subdirs="$subdirs ezdop"
- else
- failed="$failed ezdop"
- fi
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_core.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_core.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_core.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GNURADIO_CORE],[
- AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc])
+ GRC_ENABLE([gnuradio-core])
AC_CONFIG_FILES([ \
gnuradio-core/Makefile
@@ -51,13 +51,14 @@
gnuradio-core/src/python/gnuradio/gruimpl/Makefile \
gnuradio-core/src/tests/Makefile \
gnuradio-core/src/utils/Makefile \
- ])
+ ])
+
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gnuradio-core],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ AC_CONFIG_COMMANDS([run_tests_core], [chmod +x
gnuradio-core/src/python/gnuradio/gr/run_tests])
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_core], [chmod +x
gnuradio-core/src/python/gnuradio/gr/run_tests])
-
- dnl kludge up initial swig dependency file
- AC_CONFIG_COMMANDS([swig_deps], [touch
gnuradio-core/src/lib/swig/gnuradio_swig_python.d])
-
- subdirs="$subdirs gnuradio-core"
+ dnl kludge up initial swig dependency file
+ AC_CONFIG_COMMANDS([swig_deps], [touch
gnuradio-core/src/lib/swig/gnuradio_swig_python.d])
+ ])
])
Modified:
gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_examples.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_examples.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gnuradio_examples.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,9 +18,9 @@
# Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GNURADIO_EXAMPLES],[
- AC_CONFIG_SRCDIR([gnuradio-examples/README])
+ GRC_ENABLE([gnuradio-examples])
- AC_CONFIG_FILES([\
+ AC_CONFIG_FILES([ \
gnuradio-examples/Makefile \
gnuradio-examples/python/Makefile \
gnuradio-examples/python/audio/Makefile \
@@ -30,7 +30,8 @@
gnuradio-examples/python/mc4020/Makefile \
gnuradio-examples/python/usrp/Makefile \
gnuradio-examples/python/multi_usrp/Makefile \
- ])
+ ])
- subdirs="$subdirs gnuradio-examples"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gnuradio-examples])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_atsc.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_atsc.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_atsc.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_ATSC],[
- AC_CONFIG_SRCDIR([gr-atsc/src/lib/atsc.i])
+ GRC_ENABLE([gr-atsc])
AC_CONFIG_FILES([\
gr-atsc/Makefile \
@@ -29,8 +29,9 @@
gr-atsc/src/python/run_tests \
])
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_atsc], [chmod +x
gr-atsc/src/python/run_tests])
-
- subdirs="$subdirs gr-atsc"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gr-atsc],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ AC_CONFIG_COMMANDS([run_tests_atsc], [chmod +x
gr-atsc/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_alsa.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_alsa.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_alsa.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_AUDIO_ALSA],[
- AC_CONFIG_SRCDIR([gr-audio-alsa/src/audio_alsa.i])
+ GRC_ENABLE([gr-audio-alsa])
AC_CONFIG_FILES([ \
gr-audio-alsa/Makefile \
@@ -26,16 +26,13 @@
gr-audio-alsa/src/run_tests \
])
- succeeded=yes
- PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[],[succeeded=no])
- if test $succeeded = yes; then
- AC_SUBST(ALSA_LIBS)
+ passed=yes
+ PKG_CHECK_MODULES(ALSA, alsa >= 0.9,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-alsa requires package alsa, not
found.])])
+ GRC_BUILD_CONDITIONAL([gr-audio-alsa],[
+ AC_SUBST(ALSA_LIBS)
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_alsa], [chmod +x
gr-audio-alsa/src/run_tests])
- subdirs="$subdirs gr-audio-alsa"
- else
- AC_MSG_RESULT([failed: $ALSA_PKG_ERRORS])
- failed="$failed gr-audio-alsa"
- fi
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_jack.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_jack.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_jack.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_AUDIO_JACK],[
- AC_CONFIG_SRCDIR([gr-audio-jack/src/audio_jack.i])
+ GRC_ENABLE([gr-audio-jack])
AC_CONFIG_FILES([ \
gr-audio-jack/Makefile \
@@ -26,16 +26,13 @@
gr-audio-jack/src/run_tests \
])
- succeeded=yes
- PKG_CHECK_MODULES(JACK, jack >= 0.8,[],[succeeded=no])
- if test $succeeded = yes; then
- AC_SUBST(JACK_LIBS)
+ passed=yes
+ PKG_CHECK_MODULES(JACK, jack >= 0.8,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-jack requires package jack, not
found.])])
+ GRC_BUILD_CONDITIONAL([gr-audio-jack],[
+ AC_SUBST(JACK_LIBS)
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_jack], [chmod +x
gr-audio-jack/src/run_tests])
- subdirs="$subdirs gr-audio-jack"
- else
- AC_MSG_RESULT([failed: $JACK_PKG_ERRORS])
- failed="$failed gr-audio-jack"
- fi
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_oss.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_oss.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_oss.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_AUDIO_OSS],[
- AC_CONFIG_SRCDIR([gr-audio-oss/src/audio_oss.i])
+ GRC_ENABLE([gr-audio-oss])
AC_CONFIG_FILES([ \
gr-audio-oss/Makefile \
@@ -26,27 +26,24 @@
gr-audio-oss/src/run_tests \
])
- succeeded=yes
-
+ passed=yes
case $target in
*-*-netbsd*)
- AC_HAVE_LIBRARY(ossaudio,[],[succeeded=no])
- if test $succeeded = yes; then
+ AC_HAVE_LIBRARY(ossaudio,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-oss requires library
ossaudio, not found.])])
+ if test x$passed != xno; then
OSS_LIBS=-lossaudio
AC_MSG_RESULT([Using OSS library $OSS_LIBS])
fi
;;
*)
- AC_CHECK_HEADER(sys/soundcard.h,[],[succeeded=no])
+ AC_CHECK_HEADER(sys/soundcard.h,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-oss requires
sys/soundcard.h, not found.])])
esac
- if test $succeeded = yes; then
+ GRC_BUILD_CONDITIONAL([gr-audio-oss],[
AC_SUBST(OSS_LIBS)
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_oss], [chmod +x
gr-audio-oss/src/run_tests])
- subdirs="$subdirs gr-audio-oss"
- else
- AC_MSG_RESULT([failed: $OSS_PKG_ERRORS])
- failed="$failed gr-audio-oss"
- fi
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_osx.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_osx.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_osx.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,21 +18,20 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_AUDIO_OSX],[
- AC_CONFIG_SRCDIR([gr-audio-osx/src/audio_osx.i])
-
+ GRC_ENABLE([gr-audio-osx])
+
AC_CONFIG_FILES([ \
gr-audio-osx/Makefile \
gr-audio-osx/src/Makefile \
gr-audio-osx/src/run_tests \
])
- succeeded=yes
- MACOSX_AUDIOUNIT([],[succeeded=no])
- if test $succeeded = yes; then
+ passed=yes
+ MACOSX_AUDIOUNIT([],
+ [passed=no;AC_MSG_RESULT([gr-audio-osx requires AudioUnit, not
found.])])
+
+ GRC_BUILD_CONDITIONAL([gr-audio-osx],[
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_osx], [chmod +x
gr-audio-osx/src/run_tests])
- subdirs="$subdirs gr-audio-osx"
- else
- failed="$failed gr-audio-osx"
- fi
+ ])
])
Modified:
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_portaudio.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_portaudio.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_portaudio.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_AUDIO_PORTAUDIO],[
- AC_CONFIG_SRCDIR([gr-audio-portaudio/src/audio_portaudio.i])
+ GRC_ENABLE([gr-audio-portaudio])
AC_CONFIG_FILES([ \
gr-audio-portaudio/Makefile \
@@ -26,16 +26,13 @@
gr-audio-portaudio/src/run_tests \
])
- succeeded=yes
- PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[],[succeeded=no])
+ passed=yes
+ PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-portaudio requires package
portaudio, not found.])])
- if test $succeeded = yes; then
+ GRC_BUILD_CONDITIONAL([gr-audio-portaudio],[
AC_SUBST(PORTAUDIO_LIBS)
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_portaudio], [chmod +x
gr-audio-portaudio/src/run_tests])
- subdirs="$subdirs gr-audio-portaudio"
- else
- AC_MSG_RESULT([failed: $PORTAUDIO_PKG_ERRORS])
- failed="$failed gr-audio-portaudio"
- fi
+ ])
])
Modified:
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_windows.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_windows.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_audio_windows.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_AUDIO_WINDOWS],[
- AC_CONFIG_SRCDIR([gr-audio-windows/src/audio_windows.i])
+ GRC_ENABLE([gr-audio-windows])
AC_CONFIG_FILES([ \
gr-audio-windows/Makefile \
@@ -26,17 +26,14 @@
gr-audio-windows/src/run_tests \
])
- succeeded=yes
- AC_HAVE_LIBRARY(winmm,[],[succeeded=no])
+ passed=yes
+ AC_HAVE_LIBRARY(winmm,[],
+ [passed=no;AC_MSG_RESULT([gr-audio-windows requires library winmm, not
found.])])
- if test $succeeded = yes; then
+ GRC_BUILD_CONDITIONAL([gr-audio-windows],[
WINAUDIO_LIBS=-lwinmm
AC_SUBST(WINAUDIO_LIBS)
-
dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_windows], [chmod +x
gr-audio-windows/src/run_tests])
- subdirs="$subdirs gr-audio-windows"
- else
- failed="$failed gr-audio-windows"
- fi
+ AC_CONFIG_COMMANDS([run_tests_audio_windows], [chmod +x
gr-audio-windows/src/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_comedi.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_comedi.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_comedi.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_COMEDI],[
- AC_CONFIG_SRCDIR([gr-comedi/src/comedi.i])
+ GRC_ENABLE([gr-comedi])
AC_CONFIG_FILES([ \
gr-comedi/Makefile \
@@ -26,16 +26,13 @@
gr-comedi/src/run_tests \
])
- succeeded=yes
- PKG_CHECK_MODULES(COMEDI, comedilib >= 0.7,[],[succeeded=no])
- if test $succeeded = yes; then
- AC_SUBST(COMEDI_LIBS)
+ passed=yes
+ PKG_CHECK_MODULES(COMEDI, comedilib >= 0.7,[],
+ [passed=no;AC_MSG_RESULT([gr-comedi requires comedilib, not found.])])
+ GRC_BUILD_CONDITIONAL([gr-comedi],[
+ AC_SUBST(COMEDI_LIBS)
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_comedi], [chmod +x
gr-comedi/src/run_tests])
- subdirs="$subdirs gr-comedi"
- else
- AC_MSG_WARN([$COMEDI_PKG_ERRORS])
- failed="$failed gr-comedi"
- fi
+ ])
])
Modified:
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_error_correcting_codes.m4
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_error_correcting_codes.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_error_correcting_codes.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_ERROR_CORRECTING_CODES],[
- AC_CONFIG_SRCDIR([gr-error-correcting-codes/src/lib/ecc.i])
+ GRC_ENABLE([gr-error-correcting-codes])
AC_CONFIG_FILES([\
gr-error-correcting-codes/Makefile \
@@ -31,8 +31,9 @@
gr-error-correcting-codes/src/python/run_tests \
])
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_error_correcting_codes], [chmod +x
gr-error-correcting-codes/src/python/run_tests])
-
- subdirs="$subdirs gr-error-correcting-codes"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gr-error-correcting-codes],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ AC_CONFIG_COMMANDS([run_tests_error_correcting_codes], [chmod +x
gr-error-correcting-codes/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_ezdop.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_ezdop.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_ezdop.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_EZDOP],[
- AC_CONFIG_SRCDIR([gr-ezdop/src/lib/ezdop.i])
+ GRC_ENABLE([gr-ezdop])
AC_CONFIG_FILES([ \
gr-ezdop/Makefile \
@@ -28,21 +28,18 @@
gr-ezdop/src/python/run_tests \
])
+ passed=yes
# Don't do gr-ezdop if ezdop failed
# There *has* to be a better way to check if a value is in a string
- succeeded=yes
- for dir in $failed
+ for dir in $skipped_dirs
do
if test $dir = ezdop; then
- succeeded=no
+ passed=no
fi
done
- if test $succeeded = yes; then
+ GRC_BUILD_CONDITIONAL([gr-ezdop],[
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_ezdop], [chmod +x
gr-ezdop/src/python/run_tests])
- subdirs="$subdirs gr-ezdop"
- else
- failed="$failed gr-ezdop"
- fi
+ ])
])
Modified:
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_gsm_fr_vocoder.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_gsm_fr_vocoder.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_gsm_fr_vocoder.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_GSM_FR_VOCODER],[
- AC_CONFIG_SRCDIR([gr-gsm-fr-vocoder/src/lib/gsm_full_rate.i])
+ GRC_ENABLE([gr-gsm-fr-vocoder])
AC_CONFIG_FILES([\
gr-gsm-fr-vocoder/Makefile \
@@ -29,8 +29,9 @@
gr-gsm-fr-vocoder/src/python/run_tests \
])
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_gsm], [chmod +x
gr-gsm-fr-vocoder/src/python/run_tests])
-
- subdirs="$subdirs gr-gsm-fr-vocoder"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gr-gsm-fr-vocoder],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ AC_CONFIG_COMMANDS([run_tests_gsm], [chmod +x
gr-gsm-fr-vocoder/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radar.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radar.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radar.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_RADAR],[
- AC_CONFIG_SRCDIR([gr-radar/src/python/usrp_rx_radar.py])
+ GRC_ENABLE([gr-radar])
AC_CONFIG_FILES([\
gr-radar/Makefile \
@@ -29,8 +29,9 @@
gr-radar/src/python/run_tests \
])
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_radar], [chmod +x
gr-radar/src/python/run_tests])
-
- subdirs="$subdirs gr-radar"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gr-radar],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ AC_CONFIG_COMMANDS([run_tests_radar], [chmod +x
gr-radar/src/python/run_tests])
+ ])
])
Modified:
gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radio_astronomy.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radio_astronomy.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_radio_astronomy.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_RADIO_ASTRONOMY],[
- AC_CONFIG_SRCDIR([gr-radio-astronomy/src/lib/ra.i])
+ GRC_ENABLE([gr-radio-astronomy])
AC_CONFIG_FILES([\
gr-radio-astronomy/Makefile \
@@ -28,8 +28,9 @@
gr-radio-astronomy/src/python/run_tests \
])
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_astronomy], [chmod +x
gr-radio-astronomy/src/python/run_tests])
-
- subdirs="$subdirs gr-radio-astronomy"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gr-radio-astronomy],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ AC_CONFIG_COMMANDS([run_tests_astronomy], [chmod +x
gr-radio-astronomy/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_rdf.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_rdf.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_rdf.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_RDF],[
- AC_CONFIG_SRCDIR([gr-rdf/README])
+ GRC_ENABLE([gr-rdf])
AC_CONFIG_FILES([\
gr-rdf/Makefile \
@@ -27,8 +27,9 @@
gr-rdf/src/python/Makefile \
])
- dnl run_tests is created from run_tests.in. Make it executable.
- dnl AC_CONFIG_COMMANDS([run_tests_rdf], [chmod +x
gr-rdf/src/python/run_tests])
-
- subdirs="$subdirs gr-rdf"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gr-rdf],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ dnl AC_CONFIG_COMMANDS([run_tests_rdf], [chmod +x
gr-rdf/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_trellis.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_trellis.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_trellis.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_TRELLIS],[
- AC_CONFIG_SRCDIR([gr-trellis/src/lib/trellis.i])
+ GRC_ENABLE([gr-trellis])
AC_CONFIG_FILES([\
gr-trellis/Makefile \
@@ -29,8 +29,9 @@
gr-trellis/src/python/run_tests \
])
- dnl run_tests is created from run_tests.in. Make it executable.
- AC_CONFIG_COMMANDS([run_tests_gr_trellis], [chmod +x
gr-trellis/src/python/run_tests])
-
- subdirs="$subdirs gr-trellis"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([gr-trellis],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ AC_CONFIG_COMMANDS([run_tests_gr_trellis], [chmod +x
gr-trellis/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_usrp.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_usrp.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_usrp.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_USRP],[
- AC_CONFIG_SRCDIR([gr-usrp/src/usrp1.i])
+ GRC_ENABLE([gr-usrp])
AC_CONFIG_FILES([ \
gr-usrp/Makefile \
@@ -26,21 +26,19 @@
gr-usrp/src/run_tests \
])
- # Don't do gr-usrp if usrp failed
+ passed=yes
+ # Don't do gr-usrp if usrp skipped
# There *has* to be a better way to check if a value is in a string
- succeeded=yes
- for dir in $failed
+ for dir in $skipped_dirs
do
- if test $dir = usrp; then
- succeeded=no
+ if test x$dir = xusrp; then
+ AC_MSG_RESULT([Component gr-usrp requires usrp, which is not being
built.])
+ passed=no
fi
done
- if test $succeeded = yes; then
+ GRC_BUILD_CONDITIONAL([gr-usrp],[
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_usrp], [chmod +x gr-usrp/src/run_tests])
- subdirs="$subdirs gr-usrp"
- else
- failed="$failed gr-usrp"
- fi
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_video_sdl.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_video_sdl.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_video_sdl.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_VIDEO_SDL],[
- AC_CONFIG_SRCDIR([gr-video-sdl/src/video_sdl.i])
+ GRC_ENABLE([gr-video-sdl])
AC_CONFIG_FILES([ \
gr-video-sdl/Makefile \
@@ -26,21 +26,15 @@
gr-video-sdl/src/run_tests \
])
- succeeded=yes
- dnl Check for SDL
+ passed=yes
SDL_VERSION=1.2.0
- AM_PATH_SDL($SDL_VERSION,[],[succeeded=no])
+ AM_PATH_SDL($SDL_VERSION,[],
+ [passed=no;AC_MSG_RESULT([gr-video-sdl requires library sdl, not
found.])])
- if test $succeeded = yes; then
- #AM_CFLAGS="$AM_CFLAGS $SDL_CFLAGS"
- #AM_LDFLAGS="$AM_LDFLAGS $SDL_LIBS"
+ GRC_BUILD_CONDITIONAL([gr-video-sdl],[
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
-
dnl run_tests is created from run_tests.in. Make it executable.
AC_CONFIG_COMMANDS([run_tests_sdl], [chmod +x
gr-video-sdl/src/run_tests])
- subdirs="$subdirs gr-video-sdl"
- else
- failed="$failed gr-video-sdl"
- fi
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_gr_wxgui.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_gr_wxgui.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_gr_wxgui.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_GR_WXGUI],[
- AC_CONFIG_SRCDIR([gr-wxgui/src/python/stdgui.py])
+ GRC_ENABLE([gr-wxgui])
AC_CONFIG_FILES([ \
gr-wxgui/Makefile \
@@ -26,9 +26,13 @@
gr-wxgui/src/python/Makefile \
])
+ # FIXME: this breaks pkgsrc by calling python without a version number
+ # gdt--patch welcome :-)
if python -c 'import wx'; then
- subdirs="$subdirs gr-wxgui"
+ passed=yes
else
- failed="$failed gr-wxgui"
+ passed=no
fi
+
+ GRC_BUILD_CONDITIONAL([gr-wxgui])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_mblock.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_mblock.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_mblock.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_MBLOCK],[
- AC_CONFIG_SRCDIR([mblock/src/lib/mb_mblock.h])
+ GRC_ENABLE([mblock])
AC_CONFIG_FILES([\
mblock/Makefile \
@@ -27,8 +27,19 @@
mblock/src/lib/Makefile
])
- dnl run_tests is created from run_tests.in. Make it executable.
- dnl AC_CONFIG_COMMANDS([run_tests_mblock], [chmod +x
mblock/src/python/run_tests])
+ passed=yes
+ # Don't do mblock if pmt skipped
+ # There *has* to be a better way to check if a value is in a string
+ for dir in $skipped_dirs
+ do
+ if test x$dir = xpmt; then
+ AC_MSG_RESULT([Component mblock requires pmt, which is not being
built.])
+ passed=no
+ fi
+ done
- subdirs="$subdirs mblock"
+ GRC_BUILD_CONDITIONAL([mblock],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ dnl AC_CONFIG_COMMANDS([run_tests_mblock], [chmod +x
mblock/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_pmt.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_pmt.m4 2006-08-26
00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_pmt.m4 2006-08-26
00:19:17 UTC (rev 3419)
@@ -18,7 +18,7 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_PMT],[
- AC_CONFIG_SRCDIR([pmt/src/lib/pmt.h])
+ GRC_ENABLE([pmt])
AC_CONFIG_FILES([\
pmt/Makefile \
@@ -27,8 +27,9 @@
pmt/src/lib/Makefile
])
- dnl run_tests is created from run_tests.in. Make it executable.
- dnl AC_CONFIG_COMMANDS([run_tests_pmt], [chmod +x
pmt/src/python/run_tests])
-
- subdirs="$subdirs pmt"
+ passed=yes
+ GRC_BUILD_CONDITIONAL([pmt],[
+ dnl run_tests is created from run_tests.in. Make it executable.
+ dnl AC_CONFIG_COMMANDS([run_tests_pmt], [chmod +x
pmt/src/python/run_tests])
+ ])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/grc_usrp.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/grc_usrp.m4 2006-08-26
00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/grc_usrp.m4 2006-08-26
00:19:17 UTC (rev 3419)
@@ -18,57 +18,47 @@
dnl Boston, MA 02111-1307, USA.
AC_DEFUN([GRC_USRP],[
- AC_CONFIG_SRCDIR([usrp/host/lib/usrp_prims.h])
+ GRC_ENABLE([usrp])
AC_CONFIG_FILES([ \
- usrp/Makefile \
- usrp/usrp.pc \
- usrp/usrp.iss \
- usrp/doc/Doxyfile \
- usrp/doc/Makefile \
- usrp/doc/other/Makefile \
- usrp/host/Makefile \
- usrp/host/misc/Makefile \
- usrp/host/lib/Makefile \
- usrp/host/lib/std_paths.h \
- usrp/host/swig/Makefile \
- usrp/host/apps/Makefile \
- usrp/firmware/Makefile \
- usrp/firmware/include/Makefile \
- usrp/firmware/lib/Makefile \
- usrp/firmware/src/Makefile \
- usrp/firmware/src/common/Makefile \
- usrp/firmware/src/usrp2/Makefile \
- usrp/fpga/Makefile \
- usrp/fpga/rbf/Makefile \
+ usrp/Makefile \
+ usrp/usrp.pc \
+ usrp/usrp.iss \
+ usrp/doc/Doxyfile \
+ usrp/doc/Makefile \
+ usrp/doc/other/Makefile \
+ usrp/host/Makefile \
+ usrp/host/misc/Makefile \
+ usrp/host/lib/Makefile \
+ usrp/host/lib/std_paths.h \
+ usrp/host/swig/Makefile \
+ usrp/host/apps/Makefile \
+ usrp/firmware/Makefile \
+ usrp/firmware/include/Makefile \
+ usrp/firmware/lib/Makefile \
+ usrp/firmware/src/Makefile \
+ usrp/firmware/src/common/Makefile \
+ usrp/firmware/src/usrp2/Makefile \
+ usrp/fpga/Makefile \
+ usrp/fpga/rbf/Makefile \
])
- AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
- AM_CONDITIONAL(HAS_XMLTO, test x$XMLTO = xyes)
-
# gnulib.
# FIXME: this needs to fail gracefully and continue, not implemented yet
UTILS_FUNC_MKSTEMP
- succeeded=yes
- dnl Checks for library functions.
- USRP_LIBUSB([],[succeeded=no])
- USRP_SET_FUSB_TECHNIQUE([],[succeeded=no])
-
- dnl check for firmware cross compilation tools
- dnl check for SDCC 2.4.0
- USRP_SDCC([2.4.0],[],[succeeded=no])
-
+ # These checks don't fail
+ AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
+ AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
+ AC_C_BIGENDIAN
+ AC_CHECK_HEADERS([byteswap.h])
AC_CHECK_FUNCS([getrusage sched_setscheduler])
AC_CHECK_FUNCS([sigaction snprintf])
- dnl we use these to handle possible byteswapping to and from the USRP.
- AC_CHECK_HEADERS([byteswap.h])
- AC_C_BIGENDIAN
+ passed=yes
+ USRP_LIBUSB([],[passed=no;AC_MSG_RESULT([Unable to configure USB
dependency.])])
+ USRP_SET_FUSB_TECHNIQUE([],[passed=no;AC_MSG_RESULT([Unable to set fast
USB technique.])])
+ USRP_SDCC([2.4.0],[],[passed=no;AC_MSG_RESULT([Unable to find firmware
compiler.])])
- if test $succeeded = yes; then
- subdirs="$subdirs usrp"
- else
- failed="$failed usrp"
- fi
+ GRC_BUILD_CONDITIONAL([usrp])
])
Modified: gnuradio/branches/developers/jcorgan/wip/config/macosx_audiounit.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/config/macosx_audiounit.m4
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/config/macosx_audiounit.m4
2006-08-26 00:19:17 UTC (rev 3419)
@@ -22,24 +22,14 @@
darwin*);;
*)
audiounitok=no
- AC_MSG_WARN([gr-audio-osx requires darwin or MacOS X.])
+ AC_MSG_RESULT([gr-audio-osx requires darwin or MacOS X.])
esac
- AC_CHECK_HEADERS([AudioUnit/AudioUnit.h],
- [],
- [
- audiounitok=no,
- AC_MSG_WARN([gr-audio-osx requires AudioUnit/AudioUnit.h, which is
available on MacOS X.])
- ]
- )
+ AC_CHECK_HEADERS([AudioUnit/AudioUnit.h],[],
+ [audiounitok=no;AC_MSG_RESULT([gr-audio-osx requires
AudioUnit/AudioUnit.h, which is available on MacOS X.])])
- AC_CHECK_HEADERS([AudioToolbox/AudioToolbox.h],
- [],
- [
- audiounitok=no,
- AC_MSG_WARN([gr-audio-osx requires AudioToolbox/AudioToolbox.h,
which is available on MacOS X.])
- ]
- )
+ AC_CHECK_HEADERS([AudioToolbox/AudioToolbox.h],[],
+ [audiounitok=no;AC_MSG_RESULT([gr-audio-osx requires
AudioToolbox/AudioToolbox.h, which is available on MacOS X.])])
if test $audiounitok = yes; then
ifelse([$1], , :, [$1])
Modified: gnuradio/branches/developers/jcorgan/wip/configure.ac
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/configure.ac 2006-08-26
00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/configure.ac 2006-08-26
00:19:17 UTC (rev 3419)
@@ -23,6 +23,7 @@
AC_CANONICAL_HOST
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE(gnuradio,2.8svn)
+AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc])
GR_X86_64 dnl check for lib64 suffix
LF_CONFIGURE_CC
@@ -149,64 +150,69 @@
dnl Component specific configuration
dnl The order of the GR_ macros determines the order of compilation
-subdirs="config"
+AC_ARG_ENABLE(
+ [all-components],
+ [ --enable-all-components Build all components or stop on failed
dependencies]
+)
+
+build_dirs="config"
GRC_GNURADIO_CORE
GRC_GNURADIO_EXAMPLES
GRC_USRP
GRC_GR_USRP dnl this must come after GRC_USRP
GRC_GR_AUDIO_ALSA
-#GRC_GR_AUDIO_JACK
+GRC_GR_AUDIO_JACK
GRC_GR_AUDIO_OSS
-#GRC_GR_AUDIO_OSX
-#GRC_GR_AUDIO_PORTAUDIO dnl ***NOT TESTED***
-#GRC_GR_AUDIO_WINDOWS dnl ***NOT TESTED***
-#GRC_GR_ATSC
-#GRC_GR_COMEDI
-#dnl GRC_GR_ERROR_CORRECTING_CODES dnl disabled until fix for ticket:36
-#GRC_GR_GSM_FR_VOCODER
-#GRC_GR_RADAR
-#GRC_GR_RADIO_ASTRONOMY
-#GRC_GR_VIDEO_SDL
+GRC_GR_AUDIO_OSX
+GRC_GR_AUDIO_PORTAUDIO
+GRC_GR_AUDIO_WINDOWS
+GRC_GR_ATSC
+GRC_GR_COMEDI
+GRC_GR_ERROR_CORRECTING_CODES
+GRC_GR_GSM_FR_VOCODER
+GRC_GR_RADAR
+GRC_GR_RADIO_ASTRONOMY
+GRC_GR_TRELLIS
+GRC_GR_VIDEO_SDL
GRC_GR_WXGUI
-#GRC_PMT
-#GRC_MBLOCK dnl this must come after GRC_PMT
-#GRC_GR_TRELLIS
+GRC_PMT
+GRC_MBLOCK dnl this must come after GRC_PMT
GRC_EZDOP
GRC_GR_EZDOP dnl this must come after GRC_EZDOP
+GRC_GR_RDF
-dnl Has list of successfully configured components
-AC_SUBST([subdirs],$subdirs)
-AC_SUBST([failed_subdirs], $failed)
+# Each component is now either to be built, was skipped, or failed dependencies
+AC_SUBST([build_dirs], [$build_dirs])
+AC_SUBST([skipped_dirs], [$skipped_dirs])
AC_CONFIG_FILES([\
- Makefile \
- config/Makefile
+ Makefile \
+ config/Makefile
])
AC_OUTPUT
echo
-echo "*******************************************************************"
+echo "*********************************************************************"
echo The following GNU Radio components have been successfully configured:
echo
-for dir in $subdirs
+for dir in $build_dirs
do
echo $dir
done
echo
-if test "$failed" != ""; then
- echo However, the following components did not configure successfully due
to
- echo missing dependencies:
+echo You my now run the 'make' command to build these components.
+echo
+if test "$skipped_dirs" != ""; then
+ echo
"*********************************************************************"
+ echo The following components were skipped either because you asked not
+ echo to build them or they didn\'t pass configuration checks:
echo
- for dir in $failed
+ for dir in $skipped_dirs
do
echo $dir
done
echo
- echo You may still run the 'make' command to build the successfully
configured
- echo components.
+ echo These components will not be built.
echo
- #exit 1
fi
-echo You my now run the 'make' command to build these packages.
-echo
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -179,11 +179,14 @@
}
gr_buffer_reader_sptr
-gr_buffer_add_reader (gr_buffer_sptr buf, int history)
+gr_buffer_add_reader (gr_buffer_sptr buf, int nzero_preload)
{
+ if (nzero_preload < 0)
+ throw std::invalid_argument("gr_buffer_add_reader: nzero_preload must be
>= 0");
+
gr_buffer_reader_sptr r (new gr_buffer_reader (buf,
buf->index_sub(buf->d_write_index,
- history-1)));
+
nzero_preload)));
buf->d_readers.push_back (r.get ());
return r;
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.h
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.h
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.h
2006-08-26 00:19:17 UTC (rev 3419)
@@ -73,7 +73,7 @@
friend class gr_buffer_reader;
friend gr_buffer_sptr gr_make_buffer (int nitems, size_t sizeof_item);
- friend gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int
history);
+ friend gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int
nzero_preload);
protected:
char *d_base; // base address of
buffer
@@ -129,8 +129,11 @@
};
-//! create a new gr_buffer_reader and attach it to buffer \p buf
-gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int history);
+/*!
+ * \brief create a new gr_buffer_reader and attach it to buffer \p buf
+ * \param nzero_preload -- number of zero items to "preload" into buffer.
+ */
+gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int
nzero_preload);
//! returns # of gr_buffers currently allocated
long gr_buffer_ncurrently_allocated ();
@@ -179,7 +182,7 @@
private:
friend class gr_buffer;
- friend gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int
history);
+ friend gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int
nzero_preload);
gr_buffer_sptr d_buffer;
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.i
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.i
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/gr_buffer.i
2006-08-26 00:19:17 UTC (rev 3419)
@@ -43,7 +43,7 @@
%ignore gr_buffer_reader;
%rename(buffer_add_reader) gr_buffer_add_reader;
-gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int history);
+gr_buffer_reader_sptr gr_buffer_add_reader (gr_buffer_sptr buf, int
nzero_preload);
class gr_buffer_reader {
public:
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/lib/runtime/qa_gr_buffer.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -88,7 +88,7 @@
int read_counter = 0;
gr_buffer_sptr buf (gr_make_buffer (nitems, sizeof (int)));
- gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 1));
+ gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 0));
int sa;
@@ -163,7 +163,7 @@
int nitems = (64 * (1L << 10)) / sizeof (int); // 64K worth of ints
gr_buffer_sptr buf (gr_make_buffer (nitems, sizeof (int)));
- gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 1));
+ gr_buffer_reader_sptr r1 (gr_buffer_add_reader (buf, 0));
int read_counter = 0;
int write_counter = 0;
@@ -237,7 +237,7 @@
for (int i = 0; i < N; i++){
read_counter[i] = 0;
- reader[i] = gr_buffer_add_reader (buf, 1);
+ reader[i] = gr_buffer_add_reader (buf, 0);
}
for (int lc = 0; lc < 1000; lc++){
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/python/gnuradio/gr/flow_graph.py
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/python/gnuradio/gr/flow_graph.py
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-core/src/python/gnuradio/gr/flow_graph.py
2006-08-26 00:19:17 UTC (rev 3419)
@@ -151,7 +151,7 @@
upstream_block = e.src.block
upstream_port = e.src.port
upstream_buffer = upstream_block.detail().output(upstream_port)
- d.set_input(our_port, buffer_add_reader(upstream_buffer,
m.history()))
+ d.set_input(our_port, buffer_add_reader(upstream_buffer,
m.history()-1))
def topological_sort (self, all_v):
Copied:
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/audio/audio_fft.py
(from rev 3418, gnuradio/trunk/gnuradio-examples/python/audio/audio_fft.py)
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/audio/audio_fft.py
(rev 0)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/audio/audio_fft.py
2006-08-26 00:19:17 UTC (rev 3419)
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+#
+# Copyright 2004,2005 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+from gnuradio import gr, gru, audio
+from gnuradio import eng_notation
+from gnuradio.eng_option import eng_option
+from gnuradio.wxgui import stdgui, fftsink, waterfallsink, scopesink, form,
slider
+from optparse import OptionParser
+import wx
+import sys
+
+class app_flow_graph(stdgui.gui_flow_graph):
+ def __init__(self, frame, panel, vbox, argv):
+ stdgui.gui_flow_graph.__init__(self)
+
+ self.frame = frame
+ self.panel = panel
+
+ parser = OptionParser(option_class=eng_option)
+ parser.add_option("-W", "--waterfall", action="store_true",
default=False,
+ help="Enable waterfall display")
+ parser.add_option("-S", "--oscilloscope", action="store_true",
default=False,
+ help="Enable oscilloscope display")
+ parser.add_option("-I", "--audio-input", type="string", default="",
+ help="pcm input device name. E.g., hw:0,0 or
/dev/dsp")
+ parser.add_option("-r", "--sample-rate", type="eng_float",
default=48000,
+ help="set sample rate to RATE (48000)")
+
+ (options, args) = parser.parse_args()
+ sample_rate = int(options.sample_rate)
+
+ if len(args) != 0:
+ parser.print_help()
+ sys.exit(1)
+
+ self.show_debug_info = True
+
+ # build the graph
+ if options.waterfall:
+ self.scope = \
+ waterfallsink.waterfall_sink_f (self, panel, fft_size=1024,
sample_rate=sample_rate)
+ elif options.oscilloscope:
+ self.scope = scopesink.scope_sink_f(self, panel,
sample_rate=sample_rate)
+ else:
+ self.scope = fftsink.fft_sink_f (self, panel, fft_size=1024,
sample_rate=sample_rate, fft_rate=30)
+
+ self.src = audio.source (sample_rate, options.audio_input)
+
+ self.connect(self.src, self.scope)
+
+ self._build_gui(vbox)
+
+ # set initial values
+
+ def _set_status_msg(self, msg):
+ self.frame.GetStatusBar().SetStatusText(msg, 0)
+
+ def _build_gui(self, vbox):
+
+ def _form_set_freq(kv):
+ return self.set_freq(kv['freq'])
+
+ vbox.Add(self.scope.win, 10, wx.EXPAND)
+
+ #self._build_subpanel(vbox)
+
+ def _build_subpanel(self, vbox_arg):
+ # build a secondary information panel (sometimes hidden)
+
+ # FIXME figure out how to have this be a subpanel that is always
+ # created, but has its visibility controlled by foo.Show(True/False)
+
+ def _form_set_decim(kv):
+ return self.set_decim(kv['decim'])
+
+ if not(self.show_debug_info):
+ return
+
+ panel = self.panel
+ vbox = vbox_arg
+ myform = self.myform
+
+ #panel = wx.Panel(self.panel, -1)
+ #vbox = wx.BoxSizer(wx.VERTICAL)
+
+ hbox = wx.BoxSizer(wx.HORIZONTAL)
+ hbox.Add((5,0), 0)
+
+ myform['decim'] = form.int_field(
+ parent=panel, sizer=hbox, label="Decim",
+ callback=myform.check_input_and_call(_form_set_decim,
self._set_status_msg))
+
+ hbox.Add((5,0), 1)
+ myform['address@hidden'] = form.static_float_field(
+ parent=panel, sizer=hbox, label="address@hidden")
+
+ hbox.Add((5,0), 1)
+ myform['dbname'] = form.static_text_field(
+ parent=panel, sizer=hbox)
+
+ hbox.Add((5,0), 1)
+ myform['baseband'] = form.static_float_field(
+ parent=panel, sizer=hbox, label="Analog BB")
+
+ hbox.Add((5,0), 1)
+ myform['ddc'] = form.static_float_field(
+ parent=panel, sizer=hbox, label="DDC")
+
+ hbox.Add((5,0), 0)
+ vbox.Add(hbox, 0, wx.EXPAND)
+
+
+def main ():
+ app = stdgui.stdapp(app_flow_graph, "Audio FFT", nstatus=1)
+ app.MainLoop()
+
+if __name__ == '__main__':
+ main ()
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/README
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/README
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/README
2006-08-26 00:19:17 UTC (rev 3419)
@@ -18,8 +18,13 @@
./test_sccc_soft.py fsm_files/awgn1o2_4.fsm fsm_files/awgn1o2_4_msb.fsm 8.0
100
./test_sccc_turbo.py fsm_files/awgn1o2_4.fsm fsm_files/awgn1o2_4_msb.fsm 5.0
100
+./test_viterbi_equalization.py 12.0 100
+./test_viterbi_equalization1.py 12.0 100
+
+
In your terminal you will see something like this:
+
$ ./test_tcm.py fsm_files/awgn1o2_4.fsm 6.0 1000
100 98 9.80e-01 102400 9 8.79e-05
200 198 9.90e-01 204800 20 9.77e-05
@@ -36,11 +41,11 @@
which gives you information about the:
number of transmitted packets
number of packets in error
-iestimated packet error rate
-number of transmitted shorts
-number of shorts in error
-estimated (short) error rate
+estimated packet error rate
+number of transmitted shorts (or symbols, or bits, depending on the specific
program)
+number of shorts (or symbols, or bits) in error
+estimated short (or symbol, or bit) error rate
-1.10e-03 is the error rate estimate by sending 1000 packets of
-1024 shorts each, using an 1/2 4-state convolutional code and QPSK
-modulation through an AWGN with Es/N0 = 6.0 dB
+for instance, the final number 1.10e-03 is the error rate estimate by sending
1000
+packets of 1024 shorts each, using an 1/2 4-state convolutional code
+and QPSK modulation through an AWGN with Es/N0 = 6.0 dB
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_tcm_combined.py
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_tcm_combined.py
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_tcm_combined.py
2006-08-26 00:19:17 UTC (rev 3419)
@@ -13,7 +13,7 @@
# TX
src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,K/16) # packet size in shorts
+ src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack
shorts to symbols compatible with the FSM input cardinality
enc = trellis.encoder_ss(f,0) # initial state = 0
mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
@@ -25,7 +25,7 @@
# RX
- va =
trellis.viterbi_combined_s(f,dimensionality,constellation,K/bitspersymbol,0,-1,trellis.TRELLIS_EUCLIDEAN)
# Put -1 if the Initial/Final states are not set.
+ va =
trellis.viterbi_combined_s(f,K,0,-1,dimensionality,constellation,trellis.TRELLIS_EUCLIDEAN)
# Put -1 if the Initial/Final states are not set.
fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack
FSM input symbols to shorts
dst = gr.check_lfsr_32k_s();
Copied:
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization.py
(from rev 3418,
gnuradio/trunk/gnuradio-examples/python/channel-coding/test_viterbi_equalization.py)
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization.py
(rev 0)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization.py
2006-08-26 00:19:17 UTC (rev 3419)
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+
+from gnuradio import gr
+from gnuradio import audio
+from gnuradio import trellis
+from gnuradio import eng_notation
+import math
+import sys
+import fsm_utils
+
+def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed):
+ fg = gr.flow_graph ()
+
+ # TX
+ src = gr.lfsr_32k_source_s()
+ src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack
shorts to symbols compatible with the FSM input cardinality
+ enc = trellis.encoder_ss(f,0) # initial state = 0
+ # essentially here we implement the combination of modulation and channel
as a memoryless modulation (the memory induced by the channel is hidden in the
FSM)
+ mod = gr.chunks_to_symbols_sf(tot_constellation,dimensionality)
+
+ # CHANNEL
+ add = gr.add_ff()
+ noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+
+ # RX
+ metrics =
trellis.metrics_f(f.O(),dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN)
# data preprocessing to generate metrics for Viterbi
+ va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are
not set.
+ fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack
FSM input symbols to shorts
+ dst = gr.check_lfsr_32k_s();
+
+ fg.connect (src,src_head,s2fsmi,enc,mod)
+ fg.connect (mod,(add,0))
+ fg.connect (noise,(add,1))
+ fg.connect (add,metrics)
+ fg.connect (metrics,va,fsmi2s,dst)
+
+ fg.run()
+
+ ntotal = dst.ntotal ()
+ nright = dst.nright ()
+ runlength = dst.runlength ()
+ #print ntotal,nright,runlength
+
+ return (ntotal,ntotal-nright)
+
+
+
+
+def main(args):
+ nargs = len (args)
+ if nargs == 2:
+ esn0_db=float(args[0])
+ rep=int(args[1])
+ else:
+ sys.stderr.write ('usage: test_viterbi_equalization.py Es/No_db
repetitions\n')
+ sys.exit (1)
+
+ # system parameters
+ Kb=128*16 # packet size in bits (multiple of 16)
+ modulation = fsm_utils.pam4 # see fsm_utlis.py for available predefined
modulations
+ channel = fsm_utils.c_channel # see fsm_utlis.py for available predefined
test channels
+ f=trellis.fsm(len(modulation[1]),len(channel)) # generate the FSM
automatically
+ bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM
input symbol
+ K=Kb/bitspersymbol # packet size in trellis steps
+
+ tot_channel = fsm_utils.make_isi_lookup(modulation,channel,True) #
generate the lookup table (normalize energy to 1)
+ dimensionality = tot_channel[0]
+ tot_constellation = tot_channel[1]
+ N0=pow(10.0,-esn0_db/10.0); # noise variance
+ if len(tot_constellation)/dimensionality != f.O():
+ sys.stderr.write ('Incompatible FSM output cardinality and lookup
table size.\n')
+ sys.exit (1)
+
+
+ tot_s=0 # total number of transmitted shorts
+ terr_s=0 # total number of shorts in error
+ terr_p=0 # total number of packets in error
+
+ for i in range(rep):
+
(s,e)=run_test(f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,-long(666+i))
# run experiment with different seed to get different noise realizations
+ tot_s=tot_s+s
+ terr_s=terr_s+e
+ terr_p=terr_p+(terr_s!=0)
+ if ((i+1)%100==0) : # display progress
+ print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s,
'%.2e' % ((1.0*terr_s)/tot_s)
+ # estimate of the (short or bit) error rate
+ print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' %
((1.0*terr_s)/tot_s)
+
+
+
+if __name__ == '__main__':
+ main (sys.argv[1:])
+
Copied:
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py
(from rev 3418,
gnuradio/trunk/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py)
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py
(rev 0)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py
2006-08-26 00:19:17 UTC (rev 3419)
@@ -0,0 +1,103 @@
+#!/usr/bin/env python
+
+from gnuradio import gr
+from gnuradio import audio
+from gnuradio import trellis
+from gnuradio import eng_notation
+import math
+import sys
+import random
+import fsm_utils
+
+def run_test
(f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,seed):
+ fg = gr.flow_graph ()
+ L = len(channel)
+
+ # TX
+ # this for loop is TOO slow in python!!!
+ packet = [0]*(K+2*L)
+ random.seed(seed)
+ for i in range(len(packet)):
+ packet[i] = random.randint(0, 2**bitspersymbol - 1) # random symbols
+ for i in range(L): # first/last L symbols set to 0
+ packet[i] = 0
+ packet[len(packet)-i-1] = 0
+ src = gr.vector_source_s(packet,False)
+ mod = gr.chunks_to_symbols_sf(modulation[1],modulation[0])
+
+ # CHANNEL
+ isi = gr.fir_filter_fff(1,channel)
+ add = gr.add_ff()
+ noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+
+ # RX
+ skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since
you know they are coming from the L zero symbols
+ #metrics =
trellis.metrics_f(f.O(),dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN)
# data preprocessing to generate metrics for Viterbi
+ #va = trellis.viterbi_s(f,K+L,-1,0) # Put -1 if the Initial/Final states
are not set.
+ va =
trellis.viterbi_combined_s(f,K+L,0,0,dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN)
# using viterbi_combined_s instead of metrics_f/viterbi_s allows larger packet
lengths because metrics_f is complaining for not being able to allocate large
buffers. This is due to the large f.O() in this application...
+ dst = gr.vector_sink_s()
+
+ fg.connect (src,mod)
+ fg.connect (mod,isi,(add,0))
+ fg.connect (noise,(add,1))
+ #fg.connect (add,metrics)
+ #fg.connect (metrics,va,dst)
+ fg.connect (add,skip,va,dst)
+
+ fg.run()
+
+ data = dst.data()
+ ntotal = len(data) - L
+ nright=0
+ for i in range(ntotal):
+ if packet[i+L]==data[i]:
+ nright=nright+1
+ #else:
+ #print "Error in ", i
+
+ return (ntotal,ntotal-nright)
+
+
+def main(args):
+ nargs = len (args)
+ if nargs == 2:
+ esn0_db=float(args[0])
+ rep=int(args[1])
+ else:
+ sys.stderr.write ('usage: test_viterbi_equalization1.py Es/No_db
repetitions\n')
+ sys.exit (1)
+
+ # system parameters
+ Kb=128*16 # packet size in bits (multiple of 16)
+ modulation = fsm_utils.pam4 # see fsm_utlis.py for available predefined
modulations
+ channel = fsm_utils.c_channel # see fsm_utlis.py for available predefined
test channels
+ f=trellis.fsm(len(modulation[1]),len(channel)) # generate the FSM
automatically
+ bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM
input symbol
+ K=Kb/bitspersymbol # packet size in trellis steps
+
+ tot_channel = fsm_utils.make_isi_lookup(modulation,channel,True) #
generate the lookup table (normalize energy to 1)
+ dimensionality = tot_channel[0]
+ tot_constellation = tot_channel[1]
+ N0=pow(10.0,-esn0_db/10.0); # noise variance
+ if len(tot_constellation)/dimensionality != f.O():
+ sys.stderr.write ('Incompatible FSM output cardinality and lookup
table size.\n')
+ sys.exit (1)
+
+ tot_s=0 # total number of transmitted shorts
+ terr_s=0 # total number of shorts in error
+ terr_p=0 # total number of packets in error
+
+ for i in range(rep):
+
(s,e)=run_test(f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,-long(666+i))
# run experiment with different seed to get different noise realizations
+ tot_s=tot_s+s
+ terr_s=terr_s+e
+ terr_p=terr_p+(terr_s!=0)
+ if ((i+1)%100==0) : # display progress
+ print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s,
'%.2e' % ((1.0*terr_s)/tot_s)
+ # estimate of the (short or symbol) error rate
+ print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' %
((1.0*terr_s)/tot_s)
+
+
+
+if __name__ == '__main__':
+ main (sys.argv[1:])
Modified:
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/gmsk2/tunnel.py
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/gmsk2/tunnel.py
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gnuradio-examples/python/gmsk2/tunnel.py
2006-08-26 00:19:17 UTC (rev 3419)
@@ -88,17 +88,18 @@
class my_graph(gr.flow_graph):
- def __init__(self, mod_class, demod_class, tx_subdev_spec, rx_subdev_spec,
- bitrate, decim_rate, interp_rate, spb,
- bt, rx_callback, options):
+ def __init__(self, mod_class, demod_class,
+ tx_subdev_spec, rx_subdev_spec,
+ rx_callback,
+ options, kwargs):
gr.flow_graph.__init__(self)
self.txpath = transmit_path(self, mod_class, tx_subdev_spec,
- bitrate, interp_rate, spb,
- bt, options)
+ options.bitrate, options.interp,
options.spb,
+ options.tx_gain, options, kwargs)
self.rxpath = receive_path(self, demod_class, rx_subdev_spec,
- bitrate, decim_rate, spb,
- rx_callback, options)
+ options.bitrate, options.decim, options.spb,
+ rx_callback, options, {})
def send_pkt(self, payload='', eof=False):
return self.txpath.send_pkt(payload, eof)
@@ -181,23 +182,28 @@
parser = OptionParser (option_class=eng_option)
parser.add_option("-f", "--freq", type="eng_float", default=423.1e6,
- help="set Tx and Rx frequency to FREQ
[default=%default]", metavar="FREQ")
+ help="set Tx and Rx frequency to FREQ
[default=%default]",
+ metavar="FREQ")
parser.add_option("-r", "--bitrate", type="eng_float", default=None,
help="specify bitrate. spb and interp will be derived.")
parser.add_option("-g", "--rx-gain", type="eng_float", default=27,
help="set rx gain")
+ parser.add_option("-p", "--tx-gain", type="eng_float", default=100,
+ help="set tx gain")
parser.add_option("-T", "--tx-subdev-spec", type="subdev", default=None,
help="select USRP Tx side A or B")
parser.add_option("-R", "--rx-subdev-spec", type="subdev", default=None,
help="select USRP Rx side A or B")
- parser.add_option("-S", "--spb", type="int", default=None, help="set
samples/baud [default=%default]")
+ parser.add_option("-S", "--spb", type="int", default=None,
+ help="set samples/baud [default=%default]")
parser.add_option("-d", "--decim", type="intx", default=None,
help="set fpga decim rate to DECIM [default=%default]")
parser.add_option("-i", "--interp", type="intx", default=None,
help="set fpga interpolation rate to INTERP
[default=%default]")
parser.add_option("-c", "--carrier-threshold", type="eng_float",
default=30,
help="set carrier detect threshold (dB)
[default=%default]")
- parser.add_option("", "--bt", type="float", default=0.3, help="set
bandwidth-time product [default=%default]")
+ parser.add_option("", "--bt", type="float", default=0.3,
+ help="set bandwidth-time product [default=%default]")
parser.add_option("","--tun-device-filename", default="/dev/net/tun",
help="path to tun device file [default=%default]")
parser.add_option("-v","--verbose", action="store_true", default=False)
@@ -211,6 +217,10 @@
if options.freq < 1e6:
options.freq *= 1e6
+ mod_kwargs = {
+ 'bt' : options.bt,
+ }
+
# open the TUN/TAP interface
(tun_fd, tun_ifname) = open_tun_interface(options.tun_device_filename)
@@ -244,9 +254,8 @@
# build the graph (PHY)
fg = my_graph(blks.gmsk2_mod, blks.gmsk2_demod,
options.tx_subdev_spec, options.rx_subdev_spec,
- options.bitrate, options.decim, options.interp,
- options.spb, options.bt, mac.phy_rx_callback,
- options)
+ mac.phy_rx_callback,
+ options, mod_kwargs)
mac.set_flow_graph(fg) # give the MAC a handle for the PHY
@@ -269,6 +278,7 @@
print "Failed to set Rx frequency to %s" %
(eng_notation.num_to_str(options.freq),)
raise SystemExit
+ print "Tx gain: ", options.tx_gain
fg.rxpath.set_gain(options.rx_gain)
print "Rx gain_range: ", fg.rxpath.subdev.gain_range(), " using",
fg.rxpath.gain
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/Makefile.am
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/Makefile.am
2006-08-26 00:19:17 UTC (rev 3419)
@@ -82,7 +82,7 @@
$(GNURADIO_CORE_LIBS) \
-lstdc++
-trellis.cc trellis.py: $(ALL_IFILES)
+trellis.cc trellis.py: $(ALL_IFILES) $(grinclude_HEADERS)
$(SWIG) $(SWIGPYTHONARGS) -module trellis -o trellis.cc $(LOCAL_IFILES)
# These headers get installed in ${prefix}/include/gnuradio
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.cc.t
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.cc.t
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.cc.t
2006-08-26 00:19:17 UTC (rev 3419)
@@ -52,8 +52,8 @@
d_FSM (FSM),
d_K (K),
d_S0 (S0),
- d_SK (SK),
- d_trace(FSM.S()*K)
+ d_SK (SK)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_FSM.O()));
set_output_multiple (d_K);
@@ -81,9 +81,10 @@
const std::vector<int> &PI,
int K,
int S0,int SK,
- const float *in, @TYPE@ *out,
- std::vector<int> &trace)
+ const float *in, @TYPE@ *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
int alphai;
float norm,mm,minm;
@@ -158,7 +159,7 @@
const float *in = (const float *) input_items[m];
@TYPE@ *out = (@TYPE@ *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.h.t
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.h.t
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_X.h.t
2006-08-26 00:19:17 UTC (rev 3419)
@@ -45,7 +45,7 @@
int d_K;
int d_S0;
int d_SK;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend @SPTR_NAME@ address@hidden@ (
const fsm &FSM,
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -52,8 +52,8 @@
d_FSM (FSM),
d_K (K),
d_S0 (S0),
- d_SK (SK),
- d_trace(FSM.S()*K)
+ d_SK (SK)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_FSM.O()));
set_output_multiple (d_K);
@@ -81,9 +81,10 @@
const std::vector<int> &PI,
int K,
int S0,int SK,
- const float *in, unsigned char *out,
- std::vector<int> &trace)
+ const float *in, unsigned char *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
int alphai;
float norm,mm,minm;
@@ -158,7 +159,7 @@
const float *in = (const float *) input_items[m];
unsigned char *out = (unsigned char *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.h
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.h
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_b.h
2006-08-26 00:19:17 UTC (rev 3419)
@@ -45,7 +45,7 @@
int d_K;
int d_S0;
int d_SK;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend trellis_viterbi_b_sptr trellis_make_viterbi_b (
const fsm &FSM,
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,35 +34,35 @@
@SPTR_NAME@
address@hidden@ (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
{
- return @SPTR_NAME@ (new @NAME@ (FSM,D,TABLE,K,S0,SK,TYPE));
+ return @SPTR_NAME@ (new @NAME@ (FSM,K,S0,SK,D,TABLE,TYPE));
}
@NAME@::@NAME@ (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, -1, sizeof (float)),
gr_make_io_signature (1, -1, sizeof (@TYPE@))),
d_FSM (FSM),
- d_D (D),
- d_TABLE (TABLE),
d_K (K),
d_S0 (S0),
d_SK (SK),
- d_TYPE (TYPE),
- d_trace(FSM.S()*K)
+ d_D (D),
+ d_TABLE (TABLE),
+ d_TYPE (TYPE)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_D));
set_output_multiple (d_K);
@@ -88,14 +88,15 @@
const std::vector<int> &OS,
const std::vector<int> &PS,
const std::vector<int> &PI,
+ int K,
+ int S0,int SK,
int D,
const std::vector<float> &TABLE,
- int K,
- int S0,int SK,
trellis_metric_type_t TYPE,
- const float *in, @TYPE@ *out,
- std::vector<int> &trace)
+ const float *in, @TYPE@ *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
float *metric = new float[O];
int alphai;
@@ -173,7 +174,7 @@
const float *in = (const float *) input_items[m];
@TYPE@ *out = (@TYPE@ *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_D,d_TABLE,d_K,d_S0,d_SK,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.h.t
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.h.t
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.h.t
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,52 +34,52 @@
@SPTR_NAME@ address@hidden@ (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
class @NAME@ : public gr_block
{
fsm d_FSM;
- int d_D;
- std::vector<float> d_TABLE;
int d_K;
int d_S0;
int d_SK;
+ int d_D;
+ std::vector<float> d_TABLE;
trellis_metric_type_t d_TYPE;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend @SPTR_NAME@ address@hidden@ (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
@NAME@ (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<int> trace () const { return d_trace; }
void forecast (int noutput_items,
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.i.t
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.i.t
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_X.i.t
2006-08-26 00:19:17 UTC (rev 3419)
@@ -26,11 +26,11 @@
@SPTR_NAME@ address@hidden@ (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
@@ -39,20 +39,20 @@
private:
@NAME@ (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<short> trace () const { return d_trace; }
};
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,35 +34,35 @@
trellis_viterbi_combined_b_sptr
trellis_make_viterbi_combined_b (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
{
- return trellis_viterbi_combined_b_sptr (new trellis_viterbi_combined_b
(FSM,D,TABLE,K,S0,SK,TYPE));
+ return trellis_viterbi_combined_b_sptr (new trellis_viterbi_combined_b
(FSM,K,S0,SK,D,TABLE,TYPE));
}
trellis_viterbi_combined_b::trellis_viterbi_combined_b (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
: gr_block ("viterbi_combined_b",
gr_make_io_signature (1, -1, sizeof (float)),
gr_make_io_signature (1, -1, sizeof (unsigned
char))),
d_FSM (FSM),
- d_D (D),
- d_TABLE (TABLE),
d_K (K),
d_S0 (S0),
d_SK (SK),
- d_TYPE (TYPE),
- d_trace(FSM.S()*K)
+ d_D (D),
+ d_TABLE (TABLE),
+ d_TYPE (TYPE)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_D));
set_output_multiple (d_K);
@@ -88,14 +88,15 @@
const std::vector<int> &OS,
const std::vector<int> &PS,
const std::vector<int> &PI,
+ int K,
+ int S0,int SK,
int D,
const std::vector<float> &TABLE,
- int K,
- int S0,int SK,
trellis_metric_type_t TYPE,
- const float *in, unsigned char *out,
- std::vector<int> &trace)
+ const float *in, unsigned char *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
float *metric = new float[O];
int alphai;
@@ -173,7 +174,7 @@
const float *in = (const float *) input_items[m];
unsigned char *out = (unsigned char *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_D,d_TABLE,d_K,d_S0,d_SK,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.h
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.h
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.h
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,52 +34,52 @@
trellis_viterbi_combined_b_sptr trellis_make_viterbi_combined_b (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
class trellis_viterbi_combined_b : public gr_block
{
fsm d_FSM;
- int d_D;
- std::vector<float> d_TABLE;
int d_K;
int d_S0;
int d_SK;
+ int d_D;
+ std::vector<float> d_TABLE;
trellis_metric_type_t d_TYPE;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend trellis_viterbi_combined_b_sptr trellis_make_viterbi_combined_b (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
trellis_viterbi_combined_b (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<int> trace () const { return d_trace; }
void forecast (int noutput_items,
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.i
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.i
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_b.i
2006-08-26 00:19:17 UTC (rev 3419)
@@ -26,11 +26,11 @@
trellis_viterbi_combined_b_sptr trellis_make_viterbi_combined_b (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
@@ -39,20 +39,20 @@
private:
trellis_viterbi_combined_b (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<short> trace () const { return d_trace; }
};
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,35 +34,35 @@
trellis_viterbi_combined_i_sptr
trellis_make_viterbi_combined_i (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
{
- return trellis_viterbi_combined_i_sptr (new trellis_viterbi_combined_i
(FSM,D,TABLE,K,S0,SK,TYPE));
+ return trellis_viterbi_combined_i_sptr (new trellis_viterbi_combined_i
(FSM,K,S0,SK,D,TABLE,TYPE));
}
trellis_viterbi_combined_i::trellis_viterbi_combined_i (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
: gr_block ("viterbi_combined_i",
gr_make_io_signature (1, -1, sizeof (float)),
gr_make_io_signature (1, -1, sizeof (int))),
d_FSM (FSM),
- d_D (D),
- d_TABLE (TABLE),
d_K (K),
d_S0 (S0),
d_SK (SK),
- d_TYPE (TYPE),
- d_trace(FSM.S()*K)
+ d_D (D),
+ d_TABLE (TABLE),
+ d_TYPE (TYPE)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_D));
set_output_multiple (d_K);
@@ -88,14 +88,15 @@
const std::vector<int> &OS,
const std::vector<int> &PS,
const std::vector<int> &PI,
+ int K,
+ int S0,int SK,
int D,
const std::vector<float> &TABLE,
- int K,
- int S0,int SK,
trellis_metric_type_t TYPE,
- const float *in, int *out,
- std::vector<int> &trace)
+ const float *in, int *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
float *metric = new float[O];
int alphai;
@@ -173,7 +174,7 @@
const float *in = (const float *) input_items[m];
int *out = (int *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_D,d_TABLE,d_K,d_S0,d_SK,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.h
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.h
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.h
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,52 +34,52 @@
trellis_viterbi_combined_i_sptr trellis_make_viterbi_combined_i (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
class trellis_viterbi_combined_i : public gr_block
{
fsm d_FSM;
- int d_D;
- std::vector<float> d_TABLE;
int d_K;
int d_S0;
int d_SK;
+ int d_D;
+ std::vector<float> d_TABLE;
trellis_metric_type_t d_TYPE;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend trellis_viterbi_combined_i_sptr trellis_make_viterbi_combined_i (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
trellis_viterbi_combined_i (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<int> trace () const { return d_trace; }
void forecast (int noutput_items,
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.i
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.i
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_i.i
2006-08-26 00:19:17 UTC (rev 3419)
@@ -26,11 +26,11 @@
trellis_viterbi_combined_i_sptr trellis_make_viterbi_combined_i (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
@@ -39,20 +39,20 @@
private:
trellis_viterbi_combined_i (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<short> trace () const { return d_trace; }
};
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,35 +34,35 @@
trellis_viterbi_combined_s_sptr
trellis_make_viterbi_combined_s (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
{
- return trellis_viterbi_combined_s_sptr (new trellis_viterbi_combined_s
(FSM,D,TABLE,K,S0,SK,TYPE));
+ return trellis_viterbi_combined_s_sptr (new trellis_viterbi_combined_s
(FSM,K,S0,SK,D,TABLE,TYPE));
}
trellis_viterbi_combined_s::trellis_viterbi_combined_s (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE)
: gr_block ("viterbi_combined_s",
gr_make_io_signature (1, -1, sizeof (float)),
gr_make_io_signature (1, -1, sizeof (short))),
d_FSM (FSM),
- d_D (D),
- d_TABLE (TABLE),
d_K (K),
d_S0 (S0),
d_SK (SK),
- d_TYPE (TYPE),
- d_trace(FSM.S()*K)
+ d_D (D),
+ d_TABLE (TABLE),
+ d_TYPE (TYPE)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_D));
set_output_multiple (d_K);
@@ -88,14 +88,15 @@
const std::vector<int> &OS,
const std::vector<int> &PS,
const std::vector<int> &PI,
+ int K,
+ int S0,int SK,
int D,
const std::vector<float> &TABLE,
- int K,
- int S0,int SK,
trellis_metric_type_t TYPE,
- const float *in, short *out,
- std::vector<int> &trace)
+ const float *in, short *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
float *metric = new float[O];
int alphai;
@@ -173,7 +174,7 @@
const float *in = (const float *) input_items[m];
short *out = (short *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_D,d_TABLE,d_K,d_S0,d_SK,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.h
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.h
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.h
2006-08-26 00:19:17 UTC (rev 3419)
@@ -34,52 +34,52 @@
trellis_viterbi_combined_s_sptr trellis_make_viterbi_combined_s (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
class trellis_viterbi_combined_s : public gr_block
{
fsm d_FSM;
- int d_D;
- std::vector<float> d_TABLE;
int d_K;
int d_S0;
int d_SK;
+ int d_D;
+ std::vector<float> d_TABLE;
trellis_metric_type_t d_TYPE;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend trellis_viterbi_combined_s_sptr trellis_make_viterbi_combined_s (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
trellis_viterbi_combined_s (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<int> trace () const { return d_trace; }
void forecast (int noutput_items,
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.i
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.i
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_combined_s.i
2006-08-26 00:19:17 UTC (rev 3419)
@@ -26,11 +26,11 @@
trellis_viterbi_combined_s_sptr trellis_make_viterbi_combined_s (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
@@ -39,20 +39,20 @@
private:
trellis_viterbi_combined_s (
const fsm &FSM,
- int D,
- const std::vector<float> &TABLE,
int K,
int S0,
int SK,
+ int D,
+ const std::vector<float> &TABLE,
trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
- int D () const { return d_D; }
- std::vector<float> TABLE () const { return d_TABLE; }
int K () const { return d_K; }
int S0 () const { return d_S0; }
int SK () const { return d_SK; }
+ int D () const { return d_D; }
+ std::vector<float> TABLE () const { return d_TABLE; }
trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<short> trace () const { return d_trace; }
};
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -52,8 +52,8 @@
d_FSM (FSM),
d_K (K),
d_S0 (S0),
- d_SK (SK),
- d_trace(FSM.S()*K)
+ d_SK (SK)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_FSM.O()));
set_output_multiple (d_K);
@@ -81,9 +81,10 @@
const std::vector<int> &PI,
int K,
int S0,int SK,
- const float *in, int *out,
- std::vector<int> &trace)
+ const float *in, int *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
int alphai;
float norm,mm,minm;
@@ -158,7 +159,7 @@
const float *in = (const float *) input_items[m];
int *out = (int *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.h
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.h
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_i.h
2006-08-26 00:19:17 UTC (rev 3419)
@@ -45,7 +45,7 @@
int d_K;
int d_S0;
int d_SK;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend trellis_viterbi_i_sptr trellis_make_viterbi_i (
const fsm &FSM,
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.cc
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.cc
2006-08-26 00:19:17 UTC (rev 3419)
@@ -52,8 +52,8 @@
d_FSM (FSM),
d_K (K),
d_S0 (S0),
- d_SK (SK),
- d_trace(FSM.S()*K)
+ d_SK (SK)//,
+ //d_trace(FSM.S()*K)
{
set_relative_rate (1.0 / ((double) d_FSM.O()));
set_output_multiple (d_K);
@@ -81,9 +81,10 @@
const std::vector<int> &PI,
int K,
int S0,int SK,
- const float *in, short *out,
- std::vector<int> &trace)
+ const float *in, short *out)//,
+ //std::vector<int> &trace)
{
+ std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
int alphai;
float norm,mm,minm;
@@ -158,7 +159,7 @@
const float *in = (const float *) input_items[m];
short *out = (short *) output_items[m];
for (int n=0;n<nblocks;n++) {
-
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]),d_trace);
+
viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]));//,d_trace);
}
}
Modified:
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.h
===================================================================
---
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.h
2006-08-26 00:04:17 UTC (rev 3418)
+++
gnuradio/branches/developers/jcorgan/wip/gr-trellis/src/lib/trellis_viterbi_s.h
2006-08-26 00:19:17 UTC (rev 3419)
@@ -45,7 +45,7 @@
int d_K;
int d_S0;
int d_SK;
- std::vector<int> d_trace;
+ //std::vector<int> d_trace;
friend trellis_viterbi_s_sptr trellis_make_viterbi_s (
const fsm &FSM,
Modified: gnuradio/branches/developers/jcorgan/wip/usrp/host/apps/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/wip/usrp/host/apps/Makefile.am
2006-08-26 00:04:17 UTC (rev 3418)
+++ gnuradio/branches/developers/jcorgan/wip/usrp/host/apps/Makefile.am
2006-08-26 00:19:17 UTC (rev 3419)
@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common
-INCLUDES = $(USRP_INCLUDES)
+INCLUDES = $(USRP_INCLUDES) $(BOOST_CFLAGS)
USRP_LIB = $(top_builddir)/usrp/host/lib/libusrp.la
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3419 - in gnuradio/branches/developers/jcorgan/wip: . config gnuradio-core/src/lib/runtime gnuradio-core/src/python/gnuradio/gr gnuradio-examples/python/audio gnuradio-examples/python/channel-coding gnuradio-examples/python/gmsk2 gr-trellis/src/lib usrp/host/apps,
jcorgan <=