Merge branch 'vrt' of http://gnuradio.org/git/jblum
authorJohnathan Corgan <jcorgan@corganenterprises.com>
Wed, 21 Oct 2009 21:20:15 +0000 (14:20 -0700)
committerJohnathan Corgan <jcorgan@corganenterprises.com>
Wed, 21 Oct 2009 21:20:15 +0000 (14:20 -0700)
Merge fix: added GRUEL_INCLUDES to vrt Makefile
Merge fix: added missing include in gr-vrt

* 'vrt' of http://gnuradio.org/git/jblum:
  query the model number from the host
  fix so all handlers get called on event
  simplfied the code while i was looking at it
  added access methods for gps stuff
  added access methods and parsing for caldiv if context
  use existing utility method
  reading the lo back and storing it
  use the new htonll and vrt types to send cal and lo freqs
  checking for if context packets and setting up the payload pointer and size
  Reading 64 bit freq out of chunk of context packet.
  copied over vrt context and type headers, updated bits.h as well
  Dump IF-Context packets in hex.
  use gruel/inet.h instead of arap/inet.h
  fix white space
  made rxdspno a parameter for: start/stop streaming, and quadradio32fc

163 files changed:
.gitattributes [new file with mode: 0644]
.gitignore
Makefile.common
config/gr_fortran.m4
config/gr_pwin32.m4
config/gr_python.m4
config/gr_set_md_cpu.m4
config/gr_version.m4
config/grc_gnuradio_examples.m4
config/grc_gr_msdd6000.m4
config/grc_gr_qtgui.m4
config/grc_grc.m4
config/grc_gruel.m4
config/usrp_libusb.m4 [changed mode: 0644->0755]
debian/bin/gen-install-files.sh
debian/control
gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc
gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h
gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i
gnuradio-core/src/lib/general/gr_mpsk_receiver_cc.cc
gnuradio-core/src/lib/io/gr_histo_sink_f.cc
gnuradio-core/src/lib/io/gr_histo_sink_f.h
gnuradio-core/src/lib/missing/Makefile.am
gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am
gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py
gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py [new file with mode: 0644]
gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py
gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py [new file with mode: 0644]
gnuradio-examples/Makefile.am
gnuradio-examples/grc/.gitignore [new file with mode: 0644]
gnuradio-examples/grc/Makefile.am [new file with mode: 0644]
gnuradio-examples/grc/audio/cvsd_sweep.grc [new file with mode: 0644]
gnuradio-examples/grc/audio/dial_tone.grc [new file with mode: 0644]
gnuradio-examples/grc/demod/mpsk_demod.grc [new file with mode: 0644]
gnuradio-examples/grc/demod/pam_timing.grc [new file with mode: 0644]
gnuradio-examples/grc/simple/ber_simulation.grc [new file with mode: 0644]
gnuradio-examples/grc/simple/dpsk_loopback.grc [new file with mode: 0644]
gnuradio-examples/grc/simple/var_sink_taps.grc [new file with mode: 0644]
gnuradio-examples/grc/simple/variable_config.grc [new file with mode: 0644]
gnuradio-examples/grc/trellis/interference_cancellation.grc [new file with mode: 0644]
gnuradio-examples/grc/trellis/readme.txt [new file with mode: 0644]
gnuradio-examples/grc/usrp/usrp2_const_wave.grc [new file with mode: 0644]
gnuradio-examples/grc/usrp/usrp2_dpsk_mod.grc [new file with mode: 0644]
gnuradio-examples/grc/usrp/usrp2_fft.grc [new file with mode: 0644]
gnuradio-examples/grc/usrp/usrp_two_tone_loopback.grc [new file with mode: 0644]
gnuradio-examples/grc/usrp/usrp_wbfm_receive.grc [new file with mode: 0644]
gnuradio-examples/grc/xmlrpc/readme.txt [new file with mode: 0644]
gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc [new file with mode: 0644]
gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py [new file with mode: 0644]
gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc [new file with mode: 0644]
gnuradio-examples/python/digital/benchmark_qt_loopback.py
gnuradio-examples/python/digital/benchmark_qt_loopback2.py [new file with mode: 0755]
gnuradio-examples/python/digital/qt_digital_window.py
gnuradio-examples/python/digital/qt_digital_window.ui
gnuradio-examples/python/digital/qt_digital_window2.py [new file with mode: 0644]
gnuradio-examples/python/digital/qt_digital_window2.ui [new file with mode: 0644]
gr-atsc/src/lib/Makefile.am
gr-audio-osx/src/audio_osx.h
gr-audio-osx/src/audio_osx_sink.cc
gr-audio-osx/src/audio_osx_source.cc
gr-audio-osx/src/circular_buffer.h
gr-noaa/apps/demod_hrpt_file.grc
gr-noaa/apps/demod_hrpt_file.py
gr-noaa/lib/noaa_hrpt_sync_fb.cc
gr-qtgui/src/lib/Makefile.am
gr-qtgui/src/lib/spectrumdisplayform.ui
gr-usrp/src/Makefile.am
gr-utils/src/python/pyqt_plot.py
gr-utils/src/python/pyqt_plot.ui
gr-vrt/src/vrt_source_32fc.cc
gr-wxgui/src/python/common.py
gr-wxgui/src/python/const_window.py
gr-wxgui/src/python/constants.py
gr-wxgui/src/python/fft_window.py
gr-wxgui/src/python/histo_window.py
gr-wxgui/src/python/number_window.py
gr-wxgui/src/python/scope_window.py
gr-wxgui/src/python/scopesink_gl.py
gr-wxgui/src/python/waterfall_window.py
grc/Makefile.am
grc/blocks/Makefile.am
grc/blocks/block_tree.xml
grc/blocks/gr_chunks_to_symbols.xml
grc/blocks/gr_copy.xml
grc/blocks/gr_delay.xml
grc/blocks/gr_packed_to_unpacked_xx.xml
grc/blocks/gr_pfb_clock_sync.xml [new file with mode: 0644]
grc/blocks/gr_stream_mux.xml [new file with mode: 0644]
grc/blocks/gr_unpacked_to_packed_xx.xml
grc/blocks/usrp2_sink_xxxx.xml
grc/blocks/usrp2_source_xxxx.xml
grc/blocks/wxgui_constellationsink2.xml
grc/blocks/wxgui_fftsink2.xml
grc/blocks/wxgui_histosink2.xml
grc/blocks/wxgui_numbersink2.xml
grc/blocks/wxgui_scopesink2.xml
grc/blocks/wxgui_waterfallsink2.xml
grc/examples/.gitignore [deleted file]
grc/examples/Makefile.am [deleted file]
grc/examples/audio/.gitignore [deleted file]
grc/examples/audio/cvsd_sweep.grc [deleted file]
grc/examples/audio/dial_tone.grc [deleted file]
grc/examples/simple/.gitignore [deleted file]
grc/examples/simple/ber_simulation.grc [deleted file]
grc/examples/simple/dpsk_loopback.grc [deleted file]
grc/examples/simple/var_sink_taps.grc [deleted file]
grc/examples/simple/variable_config.grc [deleted file]
grc/examples/trellis/.gitignore [deleted file]
grc/examples/trellis/interference_cancellation.grc [deleted file]
grc/examples/trellis/readme.txt [deleted file]
grc/examples/usrp/.gitignore [deleted file]
grc/examples/usrp/usrp2_const_wave.grc [deleted file]
grc/examples/usrp/usrp2_dpsk_mod.grc [deleted file]
grc/examples/usrp/usrp2_fft.grc [deleted file]
grc/examples/usrp/usrp_two_tone_loopback.grc [deleted file]
grc/examples/usrp/usrp_wbfm_receive.grc [deleted file]
grc/examples/xmlrpc/.gitignore [deleted file]
grc/examples/xmlrpc/readme.txt [deleted file]
grc/examples/xmlrpc/xmlrpc_client.grc [deleted file]
grc/examples/xmlrpc/xmlrpc_client_script.py [deleted file]
grc/examples/xmlrpc/xmlrpc_server.grc [deleted file]
grc/gui/BlockTreeWindow.py
grc/python/Param.py
grc/python/extract_docs.py
grc/todo.txt
gruel/src/lib/Makefile.am
usrp/doc/Makefile.am
usrp/host/apps/Makefile.am
usrp/host/apps/burn-db-eeprom
usrp/host/include/usrp/Makefile.am
usrp/host/include/usrp/db_wbxng.h [new file with mode: 0644]
usrp/host/lib/Makefile.am
usrp/host/lib/circular_buffer.h
usrp/host/lib/circular_linked_list.h
usrp/host/lib/darwin_libusb.h
usrp/host/lib/db_boards.cc
usrp/host/lib/db_wbxng.cc [new file with mode: 0644]
usrp/host/lib/db_wbxng_adf4350.cc [new file with mode: 0644]
usrp/host/lib/db_wbxng_adf4350.h [new file with mode: 0644]
usrp/host/lib/db_wbxng_adf4350_regs.cc [new file with mode: 0644]
usrp/host/lib/db_wbxng_adf4350_regs.h [new file with mode: 0644]
usrp/host/lib/fusb_darwin.cc
usrp/host/lib/fusb_darwin.h
usrp/host/lib/usrp_basic.h.in [deleted file]
usrp/host/lib/usrp_dbid.dat
usrp/host/lib/usrp_prims_common.cc
usrp/host/lib/usrp_prims_libusb0.cc
usrp/host/lib/usrp_prims_libusb1.cc
usrp2/fpga/top/u2_fpga/.gitignore [deleted file]
usrp2/fpga/top/u2_fpga/Makefile [deleted file]
usrp2/fpga/top/u2_fpga/u2_fpga.ise [deleted file]
usrp2/fpga/top/u2_fpga/u2_fpga.ucf [deleted file]
usrp2/fpga/top/u2_fpga/u2_fpga_top.prj [deleted file]
usrp2/fpga/top/u2_fpga/u2_fpga_top.v [deleted file]
usrp2/fpga/top/u2_rev1/.gitignore [new file with mode: 0644]
usrp2/fpga/top/u2_rev1/Makefile [new file with mode: 0644]
usrp2/fpga/top/u2_rev1/u2_fpga.ise [new file with mode: 0644]
usrp2/fpga/top/u2_rev1/u2_fpga.ucf [new file with mode: 0755]
usrp2/fpga/top/u2_rev1/u2_fpga_top.prj [new file with mode: 0644]
usrp2/fpga/top/u2_rev1/u2_fpga_top.v [new file with mode: 0644]
vrt/lib/Makefile.am

diff --git a/.gitattributes b/.gitattributes
new file mode 100644 (file)
index 0000000..49a0e14
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# The following turn off LF->CRLF conversion for some files on Windows.
+# these conversions cause syntax errors on MinGW/MSYS.  They should not
+# have any effect on non-Windows systems or on Cygwin.  Any files that
+# required svn:eof-style=lf under subversion should be included here.
+#
+*.m4   -crlf
+*.ac   -crlf
+*.scm  -crlf
index b333709ee11bbe673fcfbfc4fd94f0ee99cce818..dba263ac2390a610095a01829bbe41eb7ec33ac9 100644 (file)
@@ -16,6 +16,7 @@
 *.lo
 *.py[oc]
 *.gz
+*.exe
 *.patch
 *~
 \#*#
@@ -23,6 +24,7 @@
 .libs
 TAGS
 *-stamp
+!.gitattributes
 !.gitignore
 make.log
 /configure
index e36b49e8e7fd59ba641a7873b0120e83916c3d58..aca56b34aeac948d2a9757a878d7a780f54931fa 100644 (file)
@@ -108,7 +108,7 @@ exampledir = $(datadir)/gnuradio/examples
 
 # Base directory for documentation (docdir undefined in autoconf < 1.60)
 docdir ?= $(datadir)/doc/$(PACKAGE)
-gr_docdir = $(docdir)-$(VERSION)
+gr_docdir = $(docdir)-$(DOCVER)
 
 # System configuration files
 gr_prefsdir = $(GR_PREFSDIR)
index a558b2f7e3f00eaecddd39bc5248a0ece883c543..03105204304b5e1f0e28c3eec121aa54b1ef1702 100644 (file)
@@ -28,6 +28,6 @@ AC_DEFUN([GR_FORTRAN],[
     then
         AC_PROG_F77
         AC_F77_LIBRARY_LDFLAGS
-       AC_PROG_CC dnl bux fix to restore $ac_ext
     fi
+    AC_PROG_CC dnl bux fix to restore $ac_ext
 ])
index 7b99cba6b7301de4f0c2720ab8d096cfd6e85b91..495e9dd4d39dba2246bbe9a48ef9fbd6715c2ec6 100644 (file)
@@ -99,6 +99,9 @@ struct timespec {
        long    tv_nsec;
 };
 #endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); }
 #endif
 
index 7479f0533dc921853d8e5bf6057344d007bdc855..43ccfc01575f5e0c53cab03a12f603e92c10c64b 100644 (file)
@@ -123,6 +123,12 @@ print path
              ;;
            esac
 
+           case $host_os in
+                *mingw* )
+             # Python 2.5 requires ".pyd" instead of ".dll" for extensions
+             PYTHON_LDFLAGS="-shrext .pyd ${PYTHON_LDFLAGS}"
+           esac
+
            AC_SUBST(PYTHON_LDFLAGS)
        fi
 ])
index d8714c4a71861a87466ccee3c01e478295aaaf34..7ebf88a66428d73309c626e6467686d43bed9457 100644 (file)
@@ -50,8 +50,32 @@ AC_DEFUN([GR_SET_MD_CPU],[
   AC_ARG_WITH(md-cpu,
        AC_HELP_STRING([--with-md-cpu=ARCH],[set machine dependent speedups (auto)]),
                [cf_with_md_cpu="$withval"],
-               [cf_with_md_cpu="$host_cpu"])
-
+               [
+  dnl see if the user has specified --host or --build, via 'cross_compiling'
+  if test "$cross_compiling" != no; then
+    dnl when cross-compiling, because the user specified it either via
+    dnl --target or --build, just keep the user's specs & hope for the best.
+    cf_with_md_cpu="$host_cpu"
+  else
+    dnl when the user didn't specify --target or --build, on Darwin 10
+    dnl (OSX 10.6.0 and .1) and GNU libtoool 2.2.6, 'configure' doesn't
+    dnl figure out the CPU type correctly, so do it by hand here using
+    dnl the sizeof (void*): if 4 then use i386, and otherwise use x86_64.
+    case "$host_os" in
+     *darwin*10*)
+      AC_CHECK_SIZEOF(void*)
+      if test "$ac_cv_sizeof_voidp" = 4; then
+       cf_with_md_cpu="i386"
+      else
+       cf_with_md_cpu="x86_64"
+      fi
+      ;;
+     *)
+      cf_with_md_cpu="$host_cpu"
+      ;;
+    esac
+  fi
+  ])
   case "$cf_with_md_cpu" in
    x86 | i[[3-7]]86)   MD_CPU=x86      MD_SUBCPU=x86 ;;
    x86_64)             MD_CPU=x86      MD_SUBCPU=x86_64 ;;
index 4f45f0efa348a3ff68aaa4034ab7bb1a9f52d758..3360b7d54d4372754e4226e5db86ab75784b5cfc 100644 (file)
@@ -40,6 +40,7 @@ AC_DEFUN([GR_VERSION],[
   if test "$MINOR_VERSION" == "git"; then
     dnl 3.3git-xxx-gxxxxxxxx
     RELEASE=$RELEASE$MINOR_VERSION
+    DOCVER=$RELEASE
     if test "$GIT_VERSION" != "" ; then
       RELEASE=$RELEASE-$GIT_VERSION
     fi
@@ -47,6 +48,7 @@ AC_DEFUN([GR_VERSION],[
     if test "$MAINT_VERSION" == "git" ; then
       dnl 3.3.1git-xxx-gxxxxxxxx
       RELEASE=$RELEASE.$MINOR_VERSION$MAINT_VERSION
+      DOCVER=$RELEASE
       if test "$GIT_VERSION" != "" ; then
         RELEASE=$RELEASE-$GIT_VERSION
       fi
@@ -61,9 +63,12 @@ AC_DEFUN([GR_VERSION],[
           dnl 3.3.0.1, 3.3.1.1
           RELEASE=$RELEASE.$MAINT_VERSION
         fi
+       DOCVER=$RELEASE
       fi
     fi
   fi
 
   AC_MSG_NOTICE([GNU Radio Release $RELEASE])
+  AC_SUBST(RELEASE)
+  AC_SUBST(DOCVER)
 ])
index 3225f3ab510f130d5dd7723b3df39de1b2bf3403..4d6116c70f1b142b2d7174545ae6c29ac5a38a2e 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc.
+dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2009 Free Software Foundation, Inc.
 dnl 
 dnl This file is part of GNU Radio
 dnl 
@@ -27,13 +27,14 @@ AC_DEFUN([GRC_GNURADIO_EXAMPLES],[
         gnuradio-examples/Makefile \
        gnuradio-examples/c++/Makefile \
        gnuradio-examples/python/Makefile \
+       gnuradio-examples/grc/Makefile \
        gnuradio-examples/python/apps/hf_explorer/Makefile \
        gnuradio-examples/python/apps/hf_radio/Makefile \
        gnuradio-examples/python/apps/Makefile \
        gnuradio-examples/python/audio/Makefile \
        gnuradio-examples/python/digital/Makefile \
        gnuradio-examples/python/digital_voice/Makefile \
-        gnuradio-examples/python/digital-bert/Makefile \
+       gnuradio-examples/python/digital-bert/Makefile \
        gnuradio-examples/python/mp-sched/Makefile \
        gnuradio-examples/python/multi-antenna/Makefile \
        gnuradio-examples/python/multi_usrp/Makefile \
index 6d40e893111e7263026c200fd427372ed473bf2a..0c6fc320ed5998c4eda3fe63509803285fc2b52f 100644 (file)
@@ -29,7 +29,7 @@ AC_DEFUN([GRC_GR_MSDD6000],[
     dnl Don't do gr-msdd6000 if gnuradio-core skipped
     GRC_CHECK_DEPENDENCY(gr-msdd6000, gnuradio-core)
 
-    AC_CHECK_HEADERS(netinet/in.h arpa/inet.h sys/socket.h netdb.h)
+    AC_CHECK_HEADERS(netinet/in.h arpa/inet.h sys/socket.h netdb.h, [], [passed=no])
 
     GRC_BUILD_CONDITIONAL([gr-msdd6000],[
         dnl run_tests is created from run_tests.in.  Make it executable.
index d9700776cae2fc994f2e954ff06093fafdc632e9..84514d7ce9ad9f18091cc8f66201a336489737f1 100644 (file)
@@ -86,12 +86,6 @@ AC_DEFUN([GRC_GR_QTGUI],[
        AC_SUBST(QT_UIC_EXEC)
     fi
 
-    if test "$passed" = "no"; then
-        AM_CONDITIONAL(BUILD_QT, false)
-    else
-       AM_CONDITIONAL(BUILD_QT, true)
-    fi
-
     AC_CONFIG_FILES([ \
         gr-qtgui/Makefile \
         gr-qtgui/src/Makefile \
index 7ee009faee171785f7ef76e57fbafbeec99f083e..16720b8fed4cf5f5396f906fdae0a7695bfc380d 100644 (file)
@@ -50,7 +50,6 @@ AC_DEFUN([GRC_GRC],[
         grc/Makefile \
         grc/base/Makefile \
         grc/blocks/Makefile \
-        grc/examples/Makefile \
         grc/freedesktop/Makefile \
         grc/grc_gnuradio/Makefile \
         grc/gui/Makefile \
index 7295714341b63edcb9ad43417db5933aeffe2a34..d8ac95fed63265dd3fa7a11b3e0f49a0cb14f615 100644 (file)
@@ -25,6 +25,10 @@ AC_DEFUN([GRC_GRUEL],[
     dnl   with : if the --with code didn't error out
     dnl   yes  : if the --enable code passed muster and all dependencies are met
     dnl   no   : otherwise
+    if test $passed = yes; then
+       dnl Don't do gruel if guile not available
+       GRC_CHECK_GUILE(gruel)
+    fi
     if test $passed != with; then
        dnl how and where to find INCLUDES and LA and such
        gruel_INCLUDES="\
old mode 100644 (file)
new mode 100755 (executable)
index 73872ea..428a579
@@ -24,45 +24,100 @@ dnl Boston, MA 02110-1301, USA.
 
 
 AC_DEFUN([USRP_LIBUSB], [
-  libusbok=yes
+  dnl Use PKGCONFIG to check for packages first, then check to
+  dnl make sure the USB_* variables work (whether from PKGCONFIG
+  dnl or overridden by the user)
+
+  libusbok=no
   have_libusb1=no
-  if test [x]$1 = xyes; then
-    PKG_CHECK_MODULES(USB, libusb-1.0, [have_libusb1=yes], [
-      AC_LANG_PUSH(C)
-      AC_CHECK_HEADERS([libusb-1.0/libusb.h], [have_libusb1=yes],
-                       [libusbok=no; AC_MSG_RESULT([USRP requires libusb-1.0. libusb.h not found. See http://www.libusb.org])])
-      AC_SEARCH_LIBS(libusb_bulk_transfer, [usb-1.0], [USB_LIBS="$LIBS"],
-                     [libusbok=no; AC_MSG_RESULT([USRP requires libusb-1.0. libusb_bulk_transfer not found. See http://www.libusb.org])])
-      AC_LANG_POP
+  if test x$1 = xyes; then
+    PKG_CHECK_MODULES(USB, libusb-1.0, [
+      libusbok=yes
+      have_libusb1=yes
+      usb_header='libusb-1.0/libusb.h'
+      usb_lib_func='libusb_bulk_transfer'
+      usb_lib_name='usb-1.0'
     ])
   else
-    PKG_CHECK_MODULES(USB, libusb, [], [
+    dnl not using libusb1 (for now); see if legacy version is found.
+    dnl it might be installed under the name either 'libusb' or
+    dnl 'libusb-legacy', or just available via the
+    dnl user's shell environment
+
+    dnl see if the pkgconfig module 'libusb' is available
+    PKG_CHECK_MODULES(USB, libusb, [libusbok=yes], [libusbok=no])
+    dnl PKG_CHECK_MODULES does not work correctly when embedded
+    if test $libusbok = no; then
+      dnl if not, see if the pkgconfig module 'libusb-legacy' is available
+      PKG_CHECK_MODULES(USB, [libusb-legacy], [libusbok=yes], [libusbok=no])
+    fi
+    dnl set variables for further testing
+    usb_header='usb.h'
+    usb_lib_func='usb_bulk_write'
+    usb_lib_name='usb'
+  fi
+  if test x$1 != xyes || test $have_libusb1 = yes; then
+    dnl Either (1) libusb1 was specified and found; or
+    dnl (2) libusb1 was not specified. Restart checking.
+    libusbok=yes
+
+    dnl Verify that $usb_header is a valid header, and if so,
+    dnl then verify that $usb_lib_func can be found in the
+    dnl library $usb_lib_name.
+
+    dnl If PKGCONFIG found variable USB_INCLUDEDIR, and it is
+    dnl not empty, use it for checking for $usb_header.
+    dnl Otherwise, maybe the user's shell environment is already
+    dnl configured to find this header.
+
+    AC_LANG_PUSH(C)
+    save_CPPFLAGS="$CPPFLAGS"
+    if test x$USB_INCLUDEDIR != x; then
+      USB_INCLUDES="-I$USB_INCLUDEDIR"
+      CPPFLAGS="$CPPFLAGS $USB_INCLUDES"
+      AC_SUBST(USB_INCLUDES)
+    fi
+    AC_CHECK_HEADERS([$usb_header], [], [libusbok=no])
+    CPPFLAGS="$save_CPPFLAGS"
+    AC_LANG_POP(C)
+
+    if test $libusbok = no; then
+      AC_MSG_RESULT([USRP requires libusb header '$usb_header' which was not found or was not usable. See http://www.libusb.org])
+    else
+
+      dnl found the header; now make sure the library is OK
+      dnl On Darwin, need to include the IOKit library.     
+
       AC_LANG_PUSH(C)
-      AC_CHECK_HEADERS([usb.h], [],
-                       [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://www.libusb.org])])
       save_LIBS="$LIBS"
+      LIBS=""
       case "$host_os" in
         darwin*)
-          LIBS="$LIBS -lIOKit"
+          USB_LIBS="$USB_LIBS -lIOKit"
+          LIBS="$USB_LIBS"
+          ;;
+        *) ;;
+      esac
+      AC_CHECK_LIB([$usb_lib_name], [$usb_lib_func], [], [
+        libusbok=no
+        AC_MSG_RESULT([USRP requires library '$usb_lib_name' with function '$usb_lib_func', which was either not found or was not usable. See http://www.libusb.org])
+      ])
+      case "$host_os" in
+        cygwin* | mingw*)
+          USB_LIBS="$LIBS"
           ;;
         *) ;;
       esac
-
-      AC_SEARCH_LIBS(usb_bulk_write, [usb], [USB_LIBS="$LIBS"],
-                     [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb_bulk_write not found. See http://www.libusb.org])])
       LIBS="$save_LIBS"
-      AC_LANG_POP
-    ])
-  fi
-
-  if x$USB_INCLUDEDIR != x; then
-    USB_INCLUDES=-I$USB_INCLUDEDIR
+      AC_LANG_POP(C)
+    fi
   fi
-
-  if test x$libusbok = xyes; then
+  if test $libusbok = yes; then
     AC_SUBST(USB_LIBS)
     ifelse([$2], , :, [$2])
   else
+    USB_INCLUDES=
+    USB_LIBS=
     ifelse([$3], , :, [$3])
   fi
 ])
index 5e900095a97a97a34be04357be55b69005ba137e..45296bff689371e940ce950833fb13507125e66b 100755 (executable)
@@ -433,6 +433,12 @@ $EXTRACT gnuradio-examples/python/pfb/Makefile dist_ourdata_DATA >>$NAME
 $EXTRACT gnuradio-examples/python/usrp/Makefile dist_ourdata_SCRIPTS >>$NAME
 $EXTRACT gnuradio-examples/python/usrp2/Makefile dist_ourdata_SCRIPTS >>$NAME
 $EXTRACT gnuradio-examples/python/usrp2/Makefile dist_ourdata_DATA >>$NAME
+$EXTRACT gnuradio-examples/grc/Makefile dist_audiodata_DATA >>$NAME
+$EXTRACT gnuradio-examples/grc/Makefile dist_demoddata_DATA >>$NAME
+$EXTRACT gnuradio-examples/grc/Makefile dist_simpledata_DATA >>$NAME
+$EXTRACT gnuradio-examples/grc/Makefile dist_trellisdata_DATA >>$NAME
+$EXTRACT gnuradio-examples/grc/Makefile dist_usrpdata_DATA >>$NAME
+$EXTRACT gnuradio-examples/grc/Makefile dist_xmlrpcdata_DATA >>$NAME
 
 # gnuradio-pager
 NAME=debian/gnuradio-pager.install
@@ -492,11 +498,6 @@ $EXTRACT grc/Makefile dist_etc_DATA >>$NAME
 $EXTRACT grc/base/Makefile ourpython_PYTHON >>$NAME
 $EXTRACT grc/base/Makefile dist_ourdata_DATA >>$NAME
 $EXTRACT grc/blocks/Makefile dist_ourdata_DATA >>$NAME
-$EXTRACT grc/examples/Makefile dist_audiodata_DATA >>$NAME
-$EXTRACT grc/examples/Makefile dist_simpledata_DATA >>$NAME
-$EXTRACT grc/examples/Makefile dist_trellisdata_DATA >>$NAME
-$EXTRACT grc/examples/Makefile dist_usrpdata_DATA >>$NAME
-$EXTRACT grc/examples/Makefile dist_xmlrpcdata_DATA >>$NAME
 $EXTRACT grc/freedesktop/Makefile dist_ourdata_DATA >>$NAME
 $EXTRACT grc/freedesktop/Makefile dist_bin_SCRIPTS >>$NAME
 $EXTRACT grc/grc_gnuradio/Makefile root_python_PYTHON >>$NAME
index a7b33f0be2d1b5ab8b007ba5ab5713ffa6bee5d1..0760ddaec682887a9387a4b6e232dc0deb1404c3 100644 (file)
@@ -551,16 +551,6 @@ XB-Python-Version: ${python:Versions}
 Description: GNU Radio Utilities
  This package provides commonly used utilities for GNU Radio
 
-Package: gnuradio-examples
-Architecture: any
-Depends: ${python:Depends}, python-gnuradio-core
-Provides: ${python:Provides}
-Recommends: python-gnuradio-wxgui, python-gnuradio
-Section: comm
-XB-Python-Version: ${python:Versions}
-Description: GNU Radio Example Programs
- This package provides examples of GNU Radio usage using Python.
-
 Package: gnuradio-pager
 Architecture: any
 Depends: ${python:Depends}, ${shlibs:Depends}, python-gnuradio-usrp
@@ -621,6 +611,16 @@ XB-Python-Version: ${python:Versions}
 Description: The GNU Radio Companion
  GRC is a graphical flowgraph editor for the GNU Software Radio
 
+Package: gnuradio-examples
+Architecture: any
+Depends: ${python:Depends}, python-gnuradio-core, gnuradio-companion
+Provides: ${python:Provides}
+Recommends: python-gnuradio-wxgui, python-gnuradio
+Section: comm
+XB-Python-Version: ${python:Versions}
+Description: GNU Radio Example Programs
+ This package provides examples of GNU Radio usage using Python.
+
 ################################################################################
 # Documentation packages                                                       #
 ################################################################################
index 8971d3d39bb5001598559ddee61a6b039c208894..d00ba67398543b2713b471675ca9810872d690cf 100644 (file)
@@ -64,6 +64,8 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate,
 
   // Store the last filter between calls to work
   d_last_filter = 0;
+
+  d_start_index = 0;
   
   d_filters = std::vector<gr_fir_ccf*>(d_int_rate);
 
@@ -148,7 +150,7 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items,
     return 0;               // history requirements may have changed.
   }
 
-  int i = 0, j, count = 0;
+  int i = 0, j, count = d_start_index;
   gr_complex o0, o1;
 
   // Restore the last filter position
@@ -184,14 +186,17 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items,
       d_acc = fmodf(d_acc, 1.0);
     }
     if(i < noutput_items) {              // keep state for next entry
-      count++;                           // we have fully consumed another input
+      float ss = (int)(j / d_int_rate);  // number of items to skip ahead by
+      count += ss;                       // we have fully consumed another input
       j = j % d_int_rate;                // roll filter around
     }
   }
 
-  // Store the current filter position
+  // Store the current filter position and start of next sample
   d_last_filter = j;
+  d_start_index = std::max(0, count - ninput_items[0]);
 
-  consume_each(count);
+  // consume all we've processed but no more than we can
+  consume_each(std::min(count, ninput_items[0]));
   return i;
 }
index d4c886ec378b439458914ca51c15e1ab6e0cc9be..bc5b91a5ecba420dc0495feae201992cafe51d50 100644 (file)
@@ -118,6 +118,7 @@ class gr_pfb_arb_resampler_ccf : public gr_block
   float                    d_flt_rate;          // residual rate for the linear interpolation
   float                    d_acc;
   unsigned int             d_last_filter;
+  int                      d_start_index;
   unsigned int             d_taps_per_filter;
   bool                    d_updated;
 
index 91cbf74c6bf59b9fff636db12b7f02f2f4579c12..433b7d6133f4c04e6991e6af34d94dd44fe68e2e 100644 (file)
 #include <gr_io_signature.h>
 #include <gr_math.h>
 
-gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (float sps, float gain,
+gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (double sps, float gain,
                                                       const std::vector<float> &taps,
                                                       unsigned int filter_size,
-                                                      float init_phase)
+                                                      float init_phase,
+                                                      float max_rate_deviation)
 {
   return gr_pfb_clock_sync_ccf_sptr (new gr_pfb_clock_sync_ccf (sps, gain, taps,
                                                                filter_size,
-                                                               init_phase));
+                                                               init_phase,
+                                                               max_rate_deviation));
 }
 
-
-gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (float sps, float gain,
+int ios[] = {sizeof(gr_complex), sizeof(float), sizeof(float), sizeof(float)};
+std::vector<int> iosig(ios, ios+sizeof(ios)/sizeof(int));
+gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (double sps, float gain,
                                              const std::vector<float> &taps,
                                              unsigned int filter_size,
-                                             float init_phase)
+                                             float init_phase,
+                                             float max_rate_deviation)
   : gr_block ("pfb_clock_sync_ccf",
              gr_make_io_signature (1, 1, sizeof(gr_complex)),
-             gr_make_io_signature2 (2, 2, sizeof(gr_complex), sizeof(float))),
-    d_updated (false), d_sps(sps), d_alpha(gain)
+             gr_make_io_signaturev (1, 4, iosig)),
+    d_updated (false), d_nfilters(filter_size),
+    d_max_dev(max_rate_deviation)
 {
   d_nfilters = filter_size;
+  d_sps = floor(sps);
 
   // Store the last filter between calls to work
   // The accumulator keeps track of overflow to increment the stride correctly.
   // set it here to the fractional difference based on the initial phaes
-  // assert(init_phase <= 2*M_PI);
-  float x = init_phase / (2*M_PI); //normalize initial phase
-  d_acc = x*(d_nfilters-1);
-  d_last_filter = (int)floor(d_acc);
-  d_acc = fmodf(d_acc, 1);
-  d_start_count = 0;
-  
+  set_alpha(gain);
+  set_beta(0.25*gain*gain);
+  d_k = init_phase;
+  d_rate = (sps-floor(sps))*(double)d_nfilters;
+  d_rate_i = (int)floor(d_rate);
+  d_rate_f = d_rate - (float)d_rate_i;
+  d_filtnum = (int)floor(d_k);
 
   d_filters = std::vector<gr_fir_ccf*>(d_nfilters);
   d_diff_filters = std::vector<gr_fir_ccf*>(d_nfilters);
 
   // Create an FIR filter for each channel and zero out the taps
   std::vector<float> vtaps(0, d_nfilters);
-  for(unsigned int i = 0; i < d_nfilters; i++) {
+  for(int i = 0; i < d_nfilters; i++) {
     d_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps);
     d_diff_filters[i] = gr_fir_util::create_gr_fir_ccf(vtaps);
   }
@@ -85,7 +91,7 @@ gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (float sps, float gain,
 
 gr_pfb_clock_sync_ccf::~gr_pfb_clock_sync_ccf ()
 {
-  for(unsigned int i = 0; i < d_nfilters; i++) {
+  for(int i = 0; i < d_nfilters; i++) {
     delete d_filters[i];
   }
 }
@@ -95,7 +101,7 @@ gr_pfb_clock_sync_ccf::set_taps (const std::vector<float> &newtaps,
                                 std::vector< std::vector<float> > &ourtaps,
                                 std::vector<gr_fir_ccf*> &ourfilter)
 {
-  unsigned int i,j;
+  int i,j;
 
   unsigned int ntaps = newtaps.size();
   d_taps_per_filter = (unsigned int)ceil((double)ntaps/(double)d_nfilters);
@@ -114,13 +120,13 @@ gr_pfb_clock_sync_ccf::set_taps (const std::vector<float> &newtaps,
   // Partition the filter
   for(i = 0; i < d_nfilters; i++) {
     // Each channel uses all d_taps_per_filter with 0's if not enough taps to fill out
-    ourtaps[i] = std::vector<float>(d_taps_per_filter, 0);
+    ourtaps[d_nfilters-1-i] = std::vector<float>(d_taps_per_filter, 0);
     for(j = 0; j < d_taps_per_filter; j++) {
-      ourtaps[i][j] = tmp_taps[i + j*d_nfilters];  // add taps to channels in reverse order
+      ourtaps[d_nfilters - 1 - i][j] = tmp_taps[i + j*d_nfilters];
     }
     
     // Build a filter for each channel and add it's taps to it
-    ourfilter[i]->set_taps(ourtaps[i]);
+    ourfilter[i]->set_taps(ourtaps[d_nfilters-1-i]);
   }
 
   // Set the history to ensure enough input items for each filter
@@ -133,38 +139,53 @@ void
 gr_pfb_clock_sync_ccf::create_diff_taps(const std::vector<float> &newtaps,
                                        std::vector<float> &difftaps)
 {
+  float maxtap = 1e-20;
   difftaps.clear();
   difftaps.push_back(0); //newtaps[0]);
   for(unsigned int i = 1; i < newtaps.size()-1; i++) {
-    difftaps.push_back(newtaps[i+1] - newtaps[i-1]);
+    float tap = newtaps[i+1] - newtaps[i-1];
+    difftaps.push_back(tap);
+    if(tap > maxtap) {
+      maxtap = tap;
+    }
   }
   difftaps.push_back(0);//-newtaps[newtaps.size()-1]);
+
+  // Scale the differential taps; helps scale error term to better update state
+  // FIXME: should this be scaled this way or use the same gain as the taps?
+  for(unsigned int i = 0; i < difftaps.size(); i++) {
+    difftaps[i] /= maxtap;
+  }
 }
 
 void
 gr_pfb_clock_sync_ccf::print_taps()
 {
-  unsigned int i, j;
+  int i, j;
+  printf("[ ");
   for(i = 0; i < d_nfilters; i++) {
-    printf("filter[%d]: [%.4e, ", i, d_taps[i][0]);
+    printf("[%.4e, ", d_taps[i][0]);
     for(j = 1; j < d_taps_per_filter-1; j++) {
       printf("%.4e,", d_taps[i][j]);
     }
-    printf("%.4e]\n", d_taps[i][j]);
+    printf("%.4e],", d_taps[i][j]);
   }
+  printf(" ]\n");
 }
 
 void
 gr_pfb_clock_sync_ccf::print_diff_taps()
 {
-  unsigned int i, j;
+  int i, j;
+  printf("[ ");
   for(i = 0; i < d_nfilters; i++) {
-    printf("filter[%d]: [%.4e, ", i, d_dtaps[i][0]);
+    printf("[%.4e, ", d_dtaps[i][0]);
     for(j = 1; j < d_taps_per_filter-1; j++) {
       printf("%.4e,", d_dtaps[i][j]);
     }
-    printf("%.4e]\n", d_dtaps[i][j]);
+    printf("%.4e],", d_dtaps[i][j]);
   }
+  printf(" ]\n");
 }
 
 
@@ -172,8 +193,7 @@ std::vector<float>
 gr_pfb_clock_sync_ccf::channel_taps(int channel)
 {
   std::vector<float> taps;
-  unsigned int i;
-  for(i = 0; i < d_taps_per_filter; i++) {
+  for(int i = 0; i < d_taps_per_filter; i++) {
     taps.push_back(d_taps[channel][i]);
   }
   return taps;
@@ -183,8 +203,7 @@ std::vector<float>
 gr_pfb_clock_sync_ccf::diff_channel_taps(int channel)
 {
   std::vector<float> taps;
-  unsigned int i;
-  for(i = 0; i < d_taps_per_filter; i++) {
+  for(int i = 0; i < d_taps_per_filter; i++) {
     taps.push_back(d_dtaps[channel][i]);
   }
   return taps;
@@ -199,7 +218,13 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
 {
   gr_complex *in = (gr_complex *) input_items[0];
   gr_complex *out = (gr_complex *) output_items[0];
-  float *err = (float *) output_items[1];
+
+  float *err, *outrate, *outk;
+  if(output_items.size() > 2) {
+    err = (float *) output_items[1];
+    outrate = (float*)output_items[2];
+    outk = (float*)output_items[3];
+  }
   
   if (d_updated) {
     d_updated = false;
@@ -209,50 +234,50 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
   // We need this many to process one output
   int nrequired = ninput_items[0] - d_taps_per_filter;
 
-  int i = 0, count = d_start_count;
-  float error = 0;
+  int i = 0, count = 0;
+  float error, error_r, error_i;
 
   // produce output as long as we can and there are enough input samples
   while((i < noutput_items) && (count < nrequired)) {
-    out[i] = d_filters[d_last_filter]->filter(&in[count]);
-    error =  (out[i] * d_diff_filters[d_last_filter]->filter(&in[count])).real();
-    err[i] = error;
-
-    d_acc += d_alpha*error;
-    gr_branchless_clip(d_acc, 1);
-
-    int newfilter;
-    newfilter = (int)((float)d_last_filter + d_acc);
-    if(newfilter != (int)d_last_filter)
-      d_acc = 0.5;
-
-    if(newfilter >= (int)d_nfilters) {
-      d_last_filter = newfilter - d_nfilters;
-      count++;
+    d_filtnum = (int)floor(d_k);
+
+    // Keep the current filter number in [0, d_nfilters]
+    // If we've run beyond the last filter, wrap around and go to next sample
+    // If we've go below 0, wrap around and go to previous sample
+    while(d_filtnum >= d_nfilters) {
+      d_k -= d_nfilters;
+      d_filtnum -= d_nfilters;
+      count += 1;
     }
-    else if(newfilter < 0) {
-      d_last_filter = d_nfilters + newfilter;
-      count--;
-    }
-    else {
-      d_last_filter = newfilter;
+    while(d_filtnum < 0) {
+      d_k += d_nfilters;
+      d_filtnum += d_nfilters;
+      count -= 1;
     }
 
+    out[i] = d_filters[d_filtnum]->filter(&in[count]);
+    gr_complex diff = d_diff_filters[d_filtnum]->filter(&in[count]);
+    error_r  = out[i].real() * diff.real();
+    error_i  = out[i].imag() * diff.imag();
+    error = (error_i + error_r) / 2.0;       // average error from I&Q channel
+
+    // Run the control loop to update the current phase (k) and tracking rate
+    d_k = d_k + d_alpha*error + d_rate_i + d_rate_f;
+    d_rate_f = d_rate_f + d_beta*error;
+    
+    // Keep our rate within a good range
+    d_rate_f = gr_branchless_clip(d_rate_f, d_max_dev);
+
     i++;
-    count += d_sps;
-  }
+    count += (int)floor(d_sps);
 
-  // Set the start index at the next entrance to the work function
-  // if we stop because we run out of input items, jump ahead in the
-  // next call to work. Otherwise, we can start at zero.
-  if(count > nrequired) {
-    d_start_count = count - (nrequired);
-    consume_each(ninput_items[0]-d_taps_per_filter);
-  }
-  else {
-    d_start_count = 0;
-    consume_each(count);
+    if(output_items.size() > 2) {
+      err[i] = error;
+      outrate[i] = d_rate_f;
+      outk[i] = d_k;
+    }
   }
-  
+  consume_each(count);
+
   return i;
 }
index 1a04e55c7598ed24fe3321242d1460df3fb1da53..a07192a7f34dcfeb52b4f2290601bf3bc632e705 100644 (file)
 
 class gr_pfb_clock_sync_ccf;
 typedef boost::shared_ptr<gr_pfb_clock_sync_ccf> gr_pfb_clock_sync_ccf_sptr;
-gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (float sps, float gain,
-                                                          const std::vector<float> &taps,
-                                                          unsigned int filter_size=32,
-                                                          float init_phase=0);
+gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (double sps, float gain,
+                                                      const std::vector<float> &taps,
+                                                      unsigned int filter_size=32,
+                                                      float init_phase=0,
+                                                      float max_rate_deviation=1.5);
 
 class gr_fir_ccf;
 
@@ -50,31 +51,38 @@ class gr_pfb_clock_sync_ccf : public gr_block
   /*!
    * Build the polyphase filterbank timing synchronizer.
    */
-  friend gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (float sps, float gain,
+  friend gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (double sps, float gain,
                                                                const std::vector<float> &taps,
                                                                unsigned int filter_size,
-                                                               float init_phase);
+                                                               float init_phase,
+                                                               float max_rate_deviation);
 
   bool                    d_updated;
-  unsigned int             d_sps;
+  double                   d_sps;
+  double                   d_sample_num;
   float                    d_alpha;
-  unsigned int             d_nfilters;
+  float                    d_beta;
+  int                      d_nfilters;
   std::vector<gr_fir_ccf*> d_filters;
   std::vector<gr_fir_ccf*> d_diff_filters;
   std::vector< std::vector<float> > d_taps;
   std::vector< std::vector<float> > d_dtaps;
-  float                    d_acc;
-  unsigned int             d_last_filter;
-  unsigned int             d_start_count;
-  unsigned int             d_taps_per_filter;
+  float                    d_k;
+  float                    d_rate;
+  float                    d_rate_i;
+  float                    d_rate_f;
+  float                    d_max_dev;
+  int                      d_filtnum;
+  int                      d_taps_per_filter;
 
   /*!
    * Build the polyphase filterbank timing synchronizer.
    */
-  gr_pfb_clock_sync_ccf (float sps, float gain,
+  gr_pfb_clock_sync_ccf (double sps, float gain,
                         const std::vector<float> &taps,
                         unsigned int filter_size,
-                        float init_phase);
+                        float init_phase,
+                        float max_rate_deviation);
   
   void create_diff_taps(const std::vector<float> &newtaps,
                        std::vector<float> &difftaps);
@@ -96,6 +104,20 @@ public:
    */
   void print_taps();
   void print_diff_taps();
+
+  void set_alpha(float alpha)
+  {
+    d_alpha = alpha;
+  }
+  void set_beta(float beta)
+  {
+    d_beta = beta;
+  }
+
+  void set_max_rate_deviation(float m)
+  {
+    d_max_dev = m;
+  }
   
   int general_work (int noutput_items,
                    gr_vector_int &ninput_items,
index 729d4a1aa905ab1bc0bb1747acb058775ef0014a..197984287171a68ba2578a6a628800f9621d9e75 100644 (file)
 
 GR_SWIG_BLOCK_MAGIC(gr,pfb_clock_sync_ccf);
 
-gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (float sps, float gain,
+gr_pfb_clock_sync_ccf_sptr gr_make_pfb_clock_sync_ccf (double sps, float gain,
                                                       const std::vector<float> &taps,
                                                       unsigned int filter_size=32,
-                                                      float init_phase=0);
+                                                      float init_phase=0,
+                                                      float max_rate_deviation=1.5);
 
 class gr_pfb_clock_sync_ccf : public gr_block
 {
  private:
-  gr_pfb_clock_sync_ccf (float sps, float gain,
+  gr_pfb_clock_sync_ccf (double sps, float gain,
                         const std::vector<float> &taps,
                         unsigned int filter_size,
-                        float init_phase);
+                        float init_phase,
+                        float max_rate_deviation);
 
  public:
   ~gr_pfb_clock_sync_ccf ();
@@ -46,4 +48,7 @@ class gr_pfb_clock_sync_ccf : public gr_block
   std::vector<float> diff_channel_taps(int channel);
   void print_taps();
   void print_diff_taps();
+  void set_alpha(float alpha);
+  void set_beta(float beta);
+  void set_max_rate_deviation(float m);
 };
index 49bbb8d36048338d687339da480e0d116689fef1..1efa827035da7848338c24a982a46db2dcd61987 100644 (file)
@@ -265,8 +265,6 @@ gr_mpsk_receiver_cc::phase_error_tracking(gr_complex sample)
 
   // Make phase and frequency corrections based on sampled value
   phase_error = (*this.*d_phase_error_detector)(sample);
-
-  phase_error = gr_branchless_clip(phase_error, 1.0);
     
   d_freq += d_beta*phase_error;             // adjust frequency based on error
   d_phase += d_freq + d_alpha*phase_error;  // adjust phase based on error
index a923a7e45428529d11a0043ea425de6604249ba5..2885fe428a12575cfa04f4e59139b049885c763d 100644 (file)
@@ -53,7 +53,6 @@ gr_histo_sink_f::gr_histo_sink_f (gr_msg_queue_sptr msgq)
   : gr_sync_block ("histo_sink_f", gr_make_io_signature (1, 1, sizeof (float)), gr_make_io_signature (0, 0, 0)),
   d_msgq (msgq), d_num_bins(11), d_frame_size(1000), d_sample_count(0), d_bins(NULL), d_samps(NULL)
 {
-  pthread_mutex_init(&d_mutex, 0);
   //allocate arrays and clear
   set_num_bins(d_num_bins);
   set_frame_size(d_frame_size);
@@ -61,7 +60,6 @@ gr_histo_sink_f::gr_histo_sink_f (gr_msg_queue_sptr msgq)
 
 gr_histo_sink_f::~gr_histo_sink_f (void)
 {
-  pthread_mutex_destroy(&d_mutex);
   delete [] d_samps;
   delete [] d_bins;
 }
@@ -72,7 +70,7 @@ gr_histo_sink_f::work (int noutput_items,
   gr_vector_void_star &output_items)
 {
   const float *in = (const float *) input_items[0];
-  pthread_mutex_lock(&d_mutex);
+  gruel::scoped_lock guard(d_mutex);   // hold mutex for duration of this function
   for (unsigned int i = 0; i < (unsigned int)noutput_items; i++){
     d_samps[d_sample_count] = in[i];
     d_sample_count++;
@@ -82,7 +80,6 @@ gr_histo_sink_f::work (int noutput_items,
       clear();
     }
   }
-  pthread_mutex_unlock(&d_mutex);
   return noutput_items;
 }
 
@@ -148,22 +145,20 @@ gr_histo_sink_f::get_num_bins(void){
  **************************************************/
 void
 gr_histo_sink_f::set_frame_size(unsigned int frame_size){
-  pthread_mutex_lock(&d_mutex);
+  gruel::scoped_lock guard(d_mutex);   // hold mutex for duration of this function
   d_frame_size = frame_size;
   /* allocate a new sample array */
   delete [] d_samps;
   d_samps = new float[d_frame_size];
   clear();
-  pthread_mutex_unlock(&d_mutex);
 }
 
 void
 gr_histo_sink_f::set_num_bins(unsigned int num_bins){
-  pthread_mutex_lock(&d_mutex);
+  gruel::scoped_lock guard(d_mutex);   // hold mutex for duration of this function
   d_num_bins = num_bins;
   /* allocate a new bin array */
   delete [] d_bins;
   d_bins = new unsigned int[d_num_bins];
   clear();
-  pthread_mutex_unlock(&d_mutex);
 }
index 640398c60a4a1d960e132f42f436b16610b1c486..8ba45ec55cf5713856e8dd895c7bb37051b902b9 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <gr_sync_block.h>
 #include <gr_msg_queue.h>
-#include <pthread.h>
+#include <gruel/thread.h>
 
 class gr_histo_sink_f;
 typedef boost::shared_ptr<gr_histo_sink_f> gr_histo_sink_f_sptr;
@@ -45,7 +45,7 @@ private:
   unsigned int d_sample_count;
   unsigned int *d_bins;
   float *d_samps;
-  pthread_mutex_t d_mutex;
+  gruel::mutex d_mutex;
 
   friend gr_histo_sink_f_sptr gr_make_histo_sink_f (gr_msg_queue_sptr msgq);
   gr_histo_sink_f (gr_msg_queue_sptr msgq);
index 08e521cb362a04bff8d5ecb3e003a1ec1de49d9b..2383709101db330fa6f5cac5351b42a768b80372 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2003,2004,2008 Free Software Foundation, Inc.
+# Copyright 2003,2004,2008,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -33,6 +33,14 @@ EXTRA_DIST =                         \
 
 noinst_LTLIBRARIES = libmissing.la
 
-libmissing_la_SOURCES =        \
-       bug_work_around_8.cc    \
+libmissing_la_common_SOURCES = \
+       bug_work_around_8.cc
+
+powerpc_CODE = \
        posix_memalign.cc       
+
+if MD_CPU_powerpc
+libmissing_la_SOURCES = $(libmissing_la_common_SOURCES) $(powerpc_CODE)
+else
+libmissing_la_SOURCES = $(libmissing_la_common_SOURCES)
+endif
index f0825b15135fb7cfe19c508578c9466ec2c106c4..68d68362363fb10a1c9c466969bf6fb01b0e9fc3 100644 (file)
@@ -31,7 +31,9 @@ grblkspython_PYTHON =         \
        am_demod.py             \
        channel_model.py        \
        dbpsk.py                \
+       dbpsk2.py               \
        dqpsk.py                \
+       dqpsk2.py               \
        d8psk.py                \
        filterbank.py           \
        fm_demod.py             \
index 3147bfa2ab4f4f102b27121083368394063148c7..860015c3f02ab33621e576fd7b5aad9d2329741e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2005,2006,2007 Free Software Foundation, Inc.
+# Copyright 2005,2006,2007,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -251,20 +251,20 @@ class dbpsk_demod(gr.hier_block2):
         # symbol clock recovery
         if not self._mm_gain_mu:
             self._mm_gain_mu = 0.1
-            
+
         self._mm_omega = self._samples_per_symbol
         self._mm_gain_omega = .25 * self._mm_gain_mu * self._mm_gain_mu
         self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
-        fmin = -0.1
-        fmax = 0.1
+        fmin = -0.25
+        fmax = 0.25
         
         self.receiver=gr.mpsk_receiver_cc(arity, 0,
-                                         self._costas_alpha, self._costas_beta,
-                                         fmin, fmax,
-                                         self._mm_mu, self._mm_gain_mu,
-                                         self._mm_omega, self._mm_gain_omega,
-                                         self._mm_omega_relative_limit)
-
+                                          self._costas_alpha, self._costas_beta,
+                                          fmin, fmax,
+                                          self._mm_mu, self._mm_gain_mu,
+                                          self._mm_omega, self._mm_gain_omega,
+                                          self._mm_omega_relative_limit)
+            
         # Do differential decoding based on phase change of symbols
         self.diffdec = gr.diff_phasor_cc()
 
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py
new file mode 100644 (file)
index 0000000..4541b45
--- /dev/null
@@ -0,0 +1,351 @@
+#
+# Copyright 2005,2006,2007 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 3, 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., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+# See gnuradio-examples/python/digital for examples
+
+"""
+differential BPSK modulation and demodulation.
+"""
+
+from gnuradio import gr, gru, modulation_utils
+from math import pi, sqrt
+import psk
+import cmath
+from pprint import pprint
+
+# default values (used in __init__ and add_options)
+_def_samples_per_symbol = 2
+_def_excess_bw = 0.35
+_def_gray_code = True
+_def_verbose = False
+_def_log = False
+
+_def_costas_alpha = 0.1
+_def_timing_alpha = 0.100
+_def_timing_beta = 0.010
+_def_timing_max_dev = 1.5
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#                             DBPSK modulator
+# /////////////////////////////////////////////////////////////////////////////
+
+class dbpsk2_mod(gr.hier_block2):
+
+    def __init__(self,
+                 samples_per_symbol=_def_samples_per_symbol,
+                 excess_bw=_def_excess_bw,
+                 gray_code=_def_gray_code,
+                 verbose=_def_verbose,
+                 log=_def_log):
+        """
+       Hierarchical block for RRC-filtered differential BPSK modulation.
+
+       The input is a byte stream (unsigned char) and the
+       output is the complex modulated signal at baseband.
+        
+       @param samples_per_symbol: samples per baud >= 2
+       @type samples_per_symbol: integer
+       @param excess_bw: Root-raised cosine filter excess bandwidth
+       @type excess_bw: float
+        @param gray_code: Tell modulator to Gray code the bits
+        @type gray_code: bool
+        @param verbose: Print information about modulator?
+        @type verbose: bool
+        @param log: Log modulation data to files?
+        @type log: bool
+       """
+
+       gr.hier_block2.__init__(self, "dbpsk_mod",
+                               gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+                               gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+
+        self._samples_per_symbol = samples_per_symbol
+        self._excess_bw = excess_bw
+        self._gray_code = gray_code
+
+        if not isinstance(self._samples_per_symbol, int) or self._samples_per_symbol < 2:
+            raise TypeError, ("sbp must be an integer >= 2, is %d" % self._samples_per_symbol)
+        
+       ntaps = 11 * self._samples_per_symbol
+
+        arity = pow(2,self.bits_per_symbol())
+        
+        # turn bytes into k-bit vectors
+        self.bytes2chunks = \
+          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
+
+        if self._gray_code:
+            self.symbol_mapper = gr.map_bb(psk.binary_to_gray[arity])
+        else:
+            self.symbol_mapper = gr.map_bb(psk.binary_to_ungray[arity])
+
+        self.diffenc = gr.diff_encoder_bb(arity)
+
+        self.chunks2symbols = gr.chunks_to_symbols_bc(psk.constellation[arity])
+
+        # pulse shaping filter
+       self.rrc_taps = gr.firdes.root_raised_cosine(
+           self._samples_per_symbol,   # gain (samples_per_symbol since we're
+                                        # interpolating by samples_per_symbol)
+           self._samples_per_symbol,   # sampling rate
+           1.0,                        # symbol rate
+           self._excess_bw,            # excess bandwidth (roll-off factor)
+            ntaps)
+       self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol,
+                                                   self.rrc_taps)
+
+       # Connect
+        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
+                     self.chunks2symbols, self.rrc_filter, self)
+
+        if verbose:
+            self._print_verbage()
+            
+        if log:
+            self._setup_logging()
+            
+
+    def samples_per_symbol(self):
+        return self._samples_per_symbol
+
+    def bits_per_symbol(self=None):   # static method that's also callable on an instance
+        return 1
+    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
+
+    def add_options(parser):
+        """
+        Adds DBPSK modulation-specific options to the standard parser
+        """
+        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
+                          help="set RRC excess bandwith factor [default=%default]")
+        parser.add_option("", "--no-gray-code", dest="gray_code",
+                          action="store_false", default=True,
+                          help="disable gray coding on modulated bits (PSK)")
+    add_options=staticmethod(add_options)
+
+    def extract_kwargs_from_options(options):
+        """
+        Given command line options, create dictionary suitable for passing to __init__
+        """
+        return modulation_utils.extract_kwargs_from_options(dbpsk2_mod.__init__,
+                                                            ('self',), options)
+    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
+
+
+    def _print_verbage(self):
+        print "\nModulator:"
+        print "bits per symbol:     %d" % self.bits_per_symbol()
+        print "Gray code:           %s" % self._gray_code
+        print "RRC roll-off factor: %.2f" % self._excess_bw
+
+    def _setup_logging(self):
+        print "Modulation logging turned on."
+        self.connect(self.bytes2chunks,
+                     gr.file_sink(gr.sizeof_char, "tx_bytes2chunks.dat"))
+        self.connect(self.symbol_mapper,
+                     gr.file_sink(gr.sizeof_char, "tx_graycoder.dat"))
+        self.connect(self.diffenc,
+                     gr.file_sink(gr.sizeof_char, "tx_diffenc.dat"))
+        self.connect(self.chunks2symbols,
+                     gr.file_sink(gr.sizeof_gr_complex, "tx_chunks2symbols.dat"))
+        self.connect(self.rrc_filter,
+                     gr.file_sink(gr.sizeof_gr_complex, "tx_rrc_filter.dat"))
+              
+
+# /////////////////////////////////////////////////////////////////////////////
+#                             DBPSK demodulator
+#
+#      Differentially coherent detection of differentially encoded BPSK
+# /////////////////////////////////////////////////////////////////////////////
+
+class dbpsk2_demod(gr.hier_block2):
+
+    def __init__(self,
+                 samples_per_symbol=_def_samples_per_symbol,
+                 excess_bw=_def_excess_bw,
+                 costas_alpha=_def_costas_alpha,
+                 timing_alpha=_def_timing_alpha,
+                 timing_max_dev=_def_timing_max_dev,
+                 gray_code=_def_gray_code,
+                 verbose=_def_verbose,
+                 log=_def_log):
+        """
+       Hierarchical block for RRC-filtered differential BPSK demodulation
+
+       The input is the complex modulated signal at baseband.
+       The output is a stream of bits packed 1 bit per byte (LSB)
+
+       @param samples_per_symbol: samples per symbol >= 2
+       @type samples_per_symbol: float
+       @param excess_bw: Root-raised cosine filter excess bandwidth
+       @type excess_bw: float
+        @param costas_alpha: loop filter gain
+        @type costas_alpha: float
+        @param timing_alpha: timing loop alpha gain
+        @type timing_alpha: float
+        @param timing_max: timing loop maximum rate deviations
+        @type timing_max: float
+        @param gray_code: Tell modulator to Gray code the bits
+        @type gray_code: bool
+        @param verbose: Print information about modulator?
+        @type verbose: bool
+        @param debug: Print modualtion data to files?
+        @type debug: bool
+       """
+        
+       gr.hier_block2.__init__(self, "dbpsk2_demod",
+                               gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                               gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
+                               
+        self._samples_per_symbol = samples_per_symbol
+        self._excess_bw = excess_bw
+        self._costas_alpha = costas_alpha
+        self._timing_alpha = timing_alpha
+        self._timing_beta = _def_timing_beta
+        self._timing_max_dev=timing_max_dev
+        self._gray_code = gray_code
+        
+        if samples_per_symbol < 2:
+            raise TypeError, "samples_per_symbol must be >= 2, is %r" % (samples_per_symbol,)
+
+        arity = pow(2,self.bits_per_symbol())
+
+        # Automatic gain control
+        self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100)
+        #self.agc = gr.feedforward_agc_cc(16, 1.0)
+
+        self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
+        # Allow a frequency swing of +/- half of the sample rate
+        fmin = -0.5
+        fmax = 0.5
+        
+        self.clock_recov = gr.costas_loop_cc(self._costas_alpha,
+                                             self._costas_beta,
+                                             fmax, fmin, arity)
+
+        # symbol timing recovery with RRC data filter
+        nfilts = 32
+        ntaps = 11 * samples_per_symbol*nfilts
+        taps = gr.firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(self._samples_per_symbol), self._excess_bw, ntaps)
+        self.time_recov = gr.pfb_clock_sync_ccf(self._samples_per_symbol,
+                                                self._timing_alpha,
+                                                taps, nfilts, nfilts/2, self._timing_max_dev)
+        self.time_recov.set_beta(self._timing_beta)
+            
+        # Do differential decoding based on phase change of symbols
+        self.diffdec = gr.diff_phasor_cc()
+
+        # find closest constellation point
+        rot = 1
+        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
+        self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
+
+        if self._gray_code:
+            self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
+        else:
+            self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
+        
+        # unpack the k bit vector into a stream of bits
+        self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
+
+        if verbose:
+            self._print_verbage()
+
+        if log:
+            self._setup_logging()
+
+        # Connect
+        self.connect(self, self.agc,
+                     self.clock_recov,
+                     self.time_recov,
+                     self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
+
+    def samples_per_symbol(self):
+        return self._samples_per_symbol
+
+    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
+        return 1
+    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
+
+    def _print_verbage(self):
+        print "\nDemodulator:"
+        print "bits per symbol:     %d"   % self.bits_per_symbol()
+        print "Gray code:           %s"   % self._gray_code
+        print "RRC roll-off factor: %.2f" % self._excess_bw
+        print "Costas Loop alpha:   %.2f" % self._costas_alpha
+        print "Costas Loop beta:    %.2f" % self._costas_beta
+        print "Timing alpha gain:   %.2f" % self._timing_alpha
+        print "Timing beta gain:    %.2f" % self._timing_beta
+        print "Timing max dev:      %.2f" % self._timing_max_dev
+
+    def _setup_logging(self):
+        print "Modulation logging turned on."
+        self.connect(self.pre_scaler,
+                         gr.file_sink(gr.sizeof_gr_complex, "rx_prescaler.dat"))
+        self.connect(self.agc,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_agc.dat"))
+        self.connect(self.rrc_filter,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_rrc_filter.dat"))
+        self.connect(self.clock_recov,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_clock_recov.dat"))
+        self.connect(self.time_recov,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_time_recov.dat"))
+        self.connect(self.diffdec,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_diffdec.dat"))        
+        self.connect(self.slicer,
+                    gr.file_sink(gr.sizeof_char, "rx_slicer.dat"))
+        self.connect(self.symbol_mapper,
+                     gr.file_sink(gr.sizeof_char, "rx_symbol_mapper.dat"))
+        self.connect(self.unpack,
+                     gr.file_sink(gr.sizeof_char, "rx_unpack.dat"))
+        
+    def add_options(parser):
+        """
+        Adds DBPSK demodulation-specific options to the standard parser
+        """
+        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
+                          help="set RRC excess bandwith factor [default=%default] (PSK)")
+        parser.add_option("", "--no-gray-code", dest="gray_code",
+                          action="store_false", default=_def_gray_code,
+                          help="disable gray coding on modulated bits (PSK)")
+        parser.add_option("", "--costas-alpha", type="float", default=None,
+                          help="set Costas loop alpha value [default=%default] (PSK)")
+        parser.add_option("", "--gain-alpha", type="float", default=_def_timing_alpha,
+                          help="set timing symbol sync loop gain alpha value [default=%default] (GMSK/PSK)")
+        parser.add_option("", "--gain-beta", type="float", default=_def_timing_beta,
+                          help="set timing symbol sync loop gain beta value [default=%default] (GMSK/PSK)")
+        parser.add_option("", "--timing-max-dev", type="float", default=_def_timing_max_dev,
+                          help="set timing symbol sync loop maximum deviation [default=%default] (GMSK/PSK)")
+    add_options=staticmethod(add_options)
+    
+    def extract_kwargs_from_options(options):
+        """
+        Given command line options, create dictionary suitable for passing to __init__
+        """
+        return modulation_utils.extract_kwargs_from_options(
+                 dbpsk2_demod.__init__, ('self',), options)
+    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
+#
+# Add these to the mod/demod registry
+#
+modulation_utils.add_type_1_mod('dbpsk2', dbpsk2_mod)
+modulation_utils.add_type_1_demod('dbpsk2', dbpsk2_demod)
index 8c15d2173427750bcee5062cf6d985ef4dc10c3e..42d534168579d2d308b8d0876d93f16c4e4c9081 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2005,2006,2007 Free Software Foundation, Inc.
+# Copyright 2005,2006,2007,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -255,8 +255,8 @@ class dqpsk_demod(gr.hier_block2):
         self._mm_omega = self._samples_per_symbol
         self._mm_gain_omega = .25 * self._mm_gain_mu * self._mm_gain_mu
         self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
-        fmin = -0.025
-        fmax = 0.025
+        fmin = -0.25
+        fmax = 0.25
         
         self.receiver=gr.mpsk_receiver_cc(arity, pi/4.0,
                                           self._costas_alpha, self._costas_beta,
@@ -264,7 +264,7 @@ class dqpsk_demod(gr.hier_block2):
                                           self._mm_mu, self._mm_gain_mu,
                                           self._mm_omega, self._mm_gain_omega,
                                           self._mm_omega_relative_limit)
-
+        
         # Perform Differential decoding on the constellation
         self.diffdec = gr.diff_phasor_cc()
         
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py b/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py
new file mode 100644 (file)
index 0000000..9704ac9
--- /dev/null
@@ -0,0 +1,353 @@
+#
+# Copyright 2005,2006,2007,2009 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 3, 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., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+# See gnuradio-examples/python/digital for examples
+
+"""
+differential QPSK modulation and demodulation.
+"""
+
+from gnuradio import gr, gru, modulation_utils
+from math import pi, sqrt
+import psk
+import cmath
+from pprint import pprint
+
+# default values (used in __init__ and add_options)
+_def_samples_per_symbol = 2
+_def_excess_bw = 0.35
+_def_gray_code = True
+_def_verbose = False
+_def_log = False
+
+_def_costas_alpha = 0.01
+_def_timing_alpha = 0.100
+_def_timing_beta = 0.010
+_def_timing_max_dev = 1.5
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#                           DQPSK modulator
+# /////////////////////////////////////////////////////////////////////////////
+
+class dqpsk2_mod(gr.hier_block2):
+
+    def __init__(self,
+                 samples_per_symbol=_def_samples_per_symbol,
+                 excess_bw=_def_excess_bw,
+                 gray_code=_def_gray_code,
+                 verbose=_def_verbose,
+                 log=_def_log):
+        """
+       Hierarchical block for RRC-filtered QPSK modulation.
+
+       The input is a byte stream (unsigned char) and the
+       output is the complex modulated signal at baseband.
+
+       @param samples_per_symbol: samples per symbol >= 2
+       @type samples_per_symbol: integer
+       @param excess_bw: Root-raised cosine filter excess bandwidth
+       @type excess_bw: float
+        @param gray_code: Tell modulator to Gray code the bits
+        @type gray_code: bool
+        @param verbose: Print information about modulator?
+        @type verbose: bool
+        @param debug: Print modualtion data to files?
+        @type debug: bool
+       """
+
+       gr.hier_block2.__init__(self, "dqpsk2_mod",
+                               gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+                               gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+
+        self._samples_per_symbol = samples_per_symbol
+        self._excess_bw = excess_bw
+        self._gray_code = gray_code
+
+        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
+            raise TypeError, ("sbp must be an integer >= 2, is %d" % samples_per_symbol)
+
+       ntaps = 11 * samples_per_symbol
+        arity = pow(2,self.bits_per_symbol())
+
+        # turn bytes into k-bit vectors
+        self.bytes2chunks = \
+          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
+
+        if self._gray_code:
+            self.symbol_mapper = gr.map_bb(psk.binary_to_gray[arity])
+        else:
+            self.symbol_mapper = gr.map_bb(psk.binary_to_ungray[arity])
+            
+        self.diffenc = gr.diff_encoder_bb(arity)
+
+        rot = .707 + .707j
+        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
+        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
+
+        # pulse shaping filter
+       self.rrc_taps = gr.firdes.root_raised_cosine(
+           self._samples_per_symbol, # gain  (sps since we're interpolating by sps)
+            self._samples_per_symbol, # sampling rate
+            1.0,                     # symbol rate
+            self._excess_bw,          # excess bandwidth (roll-off factor)
+            ntaps)
+
+       self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)
+
+        if verbose:
+            self._print_verbage()
+        
+        if log:
+            self._setup_logging()
+            
+       # Connect & Initialize base class
+        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
+                     self.chunks2symbols, self.rrc_filter, self)
+
+    def samples_per_symbol(self):
+        return self._samples_per_symbol
+
+    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
+        return 2
+    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
+
+    def _print_verbage(self):
+        print "\nModulator:"
+        print "bits per symbol:     %d" % self.bits_per_symbol()
+        print "Gray code:           %s" % self._gray_code
+        print "RRS roll-off factor: %f" % self._excess_bw
+
+    def _setup_logging(self):
+        print "Modulation logging turned on."
+        self.connect(self.bytes2chunks,
+                     gr.file_sink(gr.sizeof_char, "tx_bytes2chunks.dat"))
+        self.connect(self.symbol_mapper,
+                     gr.file_sink(gr.sizeof_char, "tx_graycoder.dat"))
+        self.connect(self.diffenc,
+                     gr.file_sink(gr.sizeof_char, "tx_diffenc.dat"))        
+        self.connect(self.chunks2symbols,
+                     gr.file_sink(gr.sizeof_gr_complex, "tx_chunks2symbols.dat"))
+        self.connect(self.rrc_filter,
+                     gr.file_sink(gr.sizeof_gr_complex, "tx_rrc_filter.dat"))
+
+    def add_options(parser):
+        """
+        Adds QPSK modulation-specific options to the standard parser
+        """
+        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
+                          help="set RRC excess bandwith factor [default=%default] (PSK)")
+        parser.add_option("", "--no-gray-code", dest="gray_code",
+                          action="store_false", default=_def_gray_code,
+                          help="disable gray coding on modulated bits (PSK)")
+    add_options=staticmethod(add_options)
+
+
+    def extract_kwargs_from_options(options):
+        """
+        Given command line options, create dictionary suitable for passing to __init__
+        """
+        return modulation_utils.extract_kwargs_from_options(dqpsk2_mod.__init__,
+                                                            ('self',), options)
+    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#                           DQPSK demodulator
+#
+# Differentially coherent detection of differentially encoded qpsk
+# /////////////////////////////////////////////////////////////////////////////
+
+class dqpsk2_demod(gr.hier_block2):
+
+    def __init__(self, 
+                 samples_per_symbol=_def_samples_per_symbol,
+                 excess_bw=_def_excess_bw,
+                 costas_alpha=_def_costas_alpha,
+                 timing_alpha=_def_timing_alpha,
+                 timing_max_dev=_def_timing_max_dev,
+                 gray_code=_def_gray_code,
+                 verbose=_def_verbose,
+                 log=_def_log):
+        """
+       Hierarchical block for RRC-filtered DQPSK demodulation
+
+       The input is the complex modulated signal at baseband.
+       The output is a stream of bits packed 1 bit per byte (LSB)
+
+       @param samples_per_symbol: samples per symbol >= 2
+       @type samples_per_symbol: float
+       @param excess_bw: Root-raised cosine filter excess bandwidth
+       @type excess_bw: float
+        @param costas_alpha: loop filter gain
+        @type costas_alphas: float
+        @param timing_alpha: timing loop alpha gain
+        @type timing_alpha: float
+        @param timing_max: timing loop maximum rate deviations
+        @type timing_max: float
+        @param gray_code: Tell modulator to Gray code the bits
+        @type gray_code: bool
+        @param verbose: Print information about modulator?
+        @type verbose: bool
+        @param debug: Print modualtion data to files?
+        @type debug: bool
+       """
+
+       gr.hier_block2.__init__(self, "dqpsk2_demod",
+                               gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
+                               gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
+
+        self._samples_per_symbol = samples_per_symbol
+        self._excess_bw = excess_bw
+        self._costas_alpha = costas_alpha
+        self._timing_alpha = timing_alpha
+        self._timing_beta = _def_timing_beta
+        self._timing_max_dev=timing_max_dev
+        self._gray_code = gray_code
+
+        if samples_per_symbol < 2:
+            raise TypeError, "sbp must be >= 2, is %d" % samples_per_symbol
+
+        arity = pow(2,self.bits_per_symbol())
+        # Automatic gain control
+        self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100)
+        #self.agc = gr.feedforward_agc_cc(16, 2.0)
+
+        self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
+        # Allow a frequency swing of +/- half of the sample rate
+        fmin = -0.5
+        fmax = 0.5
+
+        self.clock_recov = gr.costas_loop_cc(self._costas_alpha,
+                                             self._costas_beta,
+                                             fmax, fmin, arity)
+
+        # symbol timing recovery with RRC data filter
+        nfilts = 32
+        ntaps = 11 * samples_per_symbol*nfilts
+        taps = gr.firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(self._samples_per_symbol), self._excess_bw, ntaps)
+        self.time_recov = gr.pfb_clock_sync_ccf(self._samples_per_symbol,
+                                                self._timing_alpha,
+                                                taps, nfilts, nfilts/2, self._timing_max_dev)
+        self.time_recov.set_beta(self._timing_beta)
+        
+        # Perform Differential decoding on the constellation
+        self.diffdec = gr.diff_phasor_cc()
+        
+        # find closest constellation point
+        rot = 1
+        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
+        self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
+
+        if self._gray_code:
+            self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
+        else:
+            self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
+        
+        # unpack the k bit vector into a stream of bits
+        self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
+
+        if verbose:
+            self._print_verbage()
+        
+        if log:
+            self._setup_logging()
+        # Connect
+        self.connect(self, self.agc, 
+                     self.clock_recov,
+                     self.time_recov,
+                     self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
+
+    def samples_per_symbol(self):
+        return self._samples_per_symbol
+
+    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
+        return 2
+    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
+
+    def _print_verbage(self):
+        print "\nDemodulator:"
+        print "bits per symbol:     %d"   % self.bits_per_symbol()
+        print "Gray code:           %s"   % self._gray_code
+        print "RRC roll-off factor: %.2f" % self._excess_bw
+        print "Costas Loop alpha:   %.2e" % self._costas_alpha
+        print "Costas Loop beta:    %.2e" % self._costas_beta
+        print "Timing alpha gain:   %.2f" % self._timing_alpha
+        print "Timing beta gain:    %.2f" % self._timing_beta
+        print "Timing max dev:      %.2f" % self._timing_max_dev
+
+    def _setup_logging(self):
+        print "Modulation logging turned on."
+        self.connect(self.pre_scaler,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_prescaler.dat"))
+        self.connect(self.agc,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_agc.dat"))
+        self.connect(self.rrc_filter,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_rrc_filter.dat"))
+        self.connect(self.clock_recov,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_clock_recov.dat"))
+        self.connect(self.time_recov,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_time_recov.dat"))
+        self.connect(self.diffdec,
+                     gr.file_sink(gr.sizeof_gr_complex, "rx_diffdec.dat"))        
+        self.connect(self.slicer,
+                     gr.file_sink(gr.sizeof_char, "rx_slicer.dat"))
+        self.connect(self.symbol_mapper,
+                     gr.file_sink(gr.sizeof_char, "rx_gray_decoder.dat"))
+        self.connect(self.unpack,
+                     gr.file_sink(gr.sizeof_char, "rx_unpack.dat"))
+
+    def add_options(parser):
+        """
+        Adds modulation-specific options to the standard parser
+        """
+        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
+                          help="set RRC excess bandwith factor [default=%default] (PSK)")
+        parser.add_option("", "--no-gray-code", dest="gray_code",
+                          action="store_false", default=_def_gray_code,
+                          help="disable gray coding on modulated bits (PSK)")
+        parser.add_option("", "--costas-alpha", type="float", default=_def_costas_alpha,
+                          help="set Costas loop alpha value [default=%default] (PSK)")
+        parser.add_option("", "--gain-alpha", type="float", default=_def_timing_alpha,
+                          help="set timing symbol sync loop gain alpha value [default=%default] (GMSK/PSK)")
+        parser.add_option("", "--gain-beta", type="float", default=_def_timing_beta,
+                          help="set timing symbol sync loop gain beta value [default=%default] (GMSK/PSK)")
+        parser.add_option("", "--timing-max-dev", type="float", default=_def_timing_max_dev,
+                          help="set timing symbol sync loop maximum deviation [default=%default] (GMSK/PSK)")
+    add_options=staticmethod(add_options)
+
+    def extract_kwargs_from_options(options):
+        """
+        Given command line options, create dictionary suitable for passing to __init__
+        """
+        return modulation_utils.extract_kwargs_from_options(
+            dqpsk2_demod.__init__, ('self',), options)
+    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
+
+
+#
+# Add these to the mod/demod registry
+#
+modulation_utils.add_type_1_mod('dqpsk2', dqpsk2_mod)
+modulation_utils.add_type_1_demod('dqpsk2', dqpsk2_demod)
index 360ae8b41f080fb057a74bce4ad2cbfa84097552..9ea890c120261389eb6a40d6d798324ff1efdec2 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2007 Free Software Foundation, Inc.
+# Copyright 2004,2007,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -23,5 +23,5 @@ include $(top_srcdir)/Makefile.common
 
 SUBDIRS = c++
 if PYTHON
-SUBDIRS += python
+SUBDIRS += python grc
 endif
diff --git a/gnuradio-examples/grc/.gitignore b/gnuradio-examples/grc/.gitignore
new file mode 100644 (file)
index 0000000..b336cc7
--- /dev/null
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gnuradio-examples/grc/Makefile.am b/gnuradio-examples/grc/Makefile.am
new file mode 100644 (file)
index 0000000..97417c5
--- /dev/null
@@ -0,0 +1,61 @@
+#
+# Copyright 2009 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 3, 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., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+include $(top_srcdir)/Makefile.common
+
+grc_examples_prefix = $(exampledir)/grc
+
+audiodatadir = $(grc_examples_prefix)/audio
+dist_audiodata_DATA = \
+       audio/dial_tone.grc \
+       audio/cvsd_sweep.grc
+
+demoddatadir = $(grc_examples_prefix)/demod
+dist_demoddata_DATA = \
+       demod/mpsk_demod.grc \
+       demod/pam_timing.grc
+
+simpledatadir = $(grc_examples_prefix)/simple
+dist_simpledata_DATA = \
+       simple/ber_simulation.grc \
+       simple/dpsk_loopback.grc \
+       simple/variable_config.grc \
+       simple/var_sink_taps.grc
+
+trellisdatadir = $(grc_examples_prefix)/trellis
+dist_trellisdata_DATA = \
+       trellis/readme.txt \
+       trellis/interference_cancellation.grc
+
+usrpdatadir = $(grc_examples_prefix)/usrp
+dist_usrpdata_DATA = \
+       usrp/usrp2_const_wave.grc \
+       usrp/usrp2_dpsk_mod.grc \
+       usrp/usrp2_fft.grc \
+       usrp/usrp_two_tone_loopback.grc \
+       usrp/usrp_wbfm_receive.grc
+
+xmlrpcdatadir = $(grc_examples_prefix)/xmlrpc
+dist_xmlrpcdata_DATA = \
+       xmlrpc/readme.txt \
+       xmlrpc/xmlrpc_client.grc \
+       xmlrpc/xmlrpc_client_script.py\
+       xmlrpc/xmlrpc_server.grc
diff --git a/gnuradio-examples/grc/audio/cvsd_sweep.grc b/gnuradio-examples/grc/audio/cvsd_sweep.grc
new file mode 100644 (file)
index 0000000..8d0b385
--- /dev/null
@@ -0,0 +1,918 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Sat Sep 19 20:30:08 2009</timestamp>
+  <block>
+    <key>import</key>
+    <param>
+      <key>id</key>
+      <value>import_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>import</key>
+      <value>import math</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(157, 11)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_cvsd_decode</key>
+    <param>
+      <key>id</key>
+      <value>blks2_cvsd_decode_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>resample</key>
+      <value>resample</value>
+    </param>
+    <param>
+      <key>bw</key>
+      <value>bw</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(887, 340)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>tri_source</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_TRI_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>0.05</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(44, 316)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>throttle</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(238, 348)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_vco_f</key>
+    <param>
+      <key>id</key>
+      <value>vco</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>sensitivity</key>
+      <value>audio_rate*2*math.pi</value>
+    </param>
+    <param>
+      <key>amplitude</key>
+      <value>0.9</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(427, 332)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_cvsd_encode</key>
+    <param>
+      <key>id</key>
+      <value>enc</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>resample</key>
+      <value>resample</value>
+    </param>
+    <param>
+      <key>bw</key>
+      <value>bw</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(655, 340)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_packed_to_unpacked_xx</key>
+    <param>
+      <key>id</key>
+      <value>p2u</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>bits_per_chunk</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>endianness</key>
+      <value>gr.GR_MSB_FIRST</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(648, 415)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_char_to_float</key>
+    <param>
+      <key>id</key>
+      <value>c2f</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(676, 483)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>audio_sink</key>
+    <param>
+      <key>id</key>
+      <value>audio_sink</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>device_name</key>
+      <value>plughw:0,0</value>
+    </param>
+    <param>
+      <key>ok_to_block</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1127, 340)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>8000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(251, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>resample</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>8</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(344, 11)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>bw</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(431, 11)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>notebook</key>
+    <param>
+      <key>id</key>
+      <value>displays</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.NB_TOP</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>['Original','Encoded','Decoded']</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(12, 106)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>orig_fft</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Original Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(415, 97)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>orig_scope</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Original Waveform</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(414, 425)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>enc_fft</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Encoded Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate*resample</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>8</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(610, 551)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>enc_scope</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Encoded Waveform</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate*resample</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>20.0/(audio_rate*resample)</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(858, 591)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>dec_fft</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Decoded Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>5</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>0.1</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(891, 98)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>dec_scope</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Decoded Waveform</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>audio_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(889, 422)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>cvsd_sweep</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>CVSD Vocoder Test</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>vco</source_block_id>
+    <sink_block_id>orig_fft</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>tri_source</source_block_id>
+    <sink_block_id>throttle</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>throttle</source_block_id>
+    <sink_block_id>vco</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>vco</source_block_id>
+    <sink_block_id>enc</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>enc</source_block_id>
+    <sink_block_id>blks2_cvsd_decode_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>vco</source_block_id>
+    <sink_block_id>orig_scope</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_cvsd_decode_0</source_block_id>
+    <sink_block_id>dec_fft</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_cvsd_decode_0</source_block_id>
+    <sink_block_id>dec_scope</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_cvsd_decode_0</source_block_id>
+    <sink_block_id>audio_sink</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>enc</source_block_id>
+    <sink_block_id>p2u</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>p2u</source_block_id>
+    <sink_block_id>c2f</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>c2f</source_block_id>
+    <sink_block_id>enc_fft</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>c2f</source_block_id>
+    <sink_block_id>enc_scope</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/audio/dial_tone.grc b/gnuradio-examples/grc/audio/dial_tone.grc
new file mode 100644 (file)
index 0000000..ac8cbef
--- /dev/null
@@ -0,0 +1,375 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Thu Jul 24 14:27:48 2008</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>dial_tone</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Dial Tone</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>example flow graph</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_xx</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(513, 277)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>audio_sink</key>
+    <param>
+      <key>id</key>
+      <value>audio_sink</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>device_name</key>
+      <value/>
+    </param>
+    <param>
+      <key>ok_to_block</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(699, 112)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_noise_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_noise_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>noise_type</key>
+      <value>gr.GR_GAUSSIAN</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>noise</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(238, 380)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>440</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(240, 208)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>350</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(240, 38)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Volume</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>.4</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>.5</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(634, 413)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>noise</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Noise</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>.005</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>.2</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(443, 412)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(11, 171)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>gr_sig_source_x0</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sig_source_x</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_noise_source_x</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>2</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx</source_block_id>
+    <sink_block_id>audio_sink</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/demod/mpsk_demod.grc b/gnuradio-examples/grc/demod/mpsk_demod.grc
new file mode 100644 (file)
index 0000000..08108dc
--- /dev/null
@@ -0,0 +1,586 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Mon Oct  5 18:34:52 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>mpsk_demod</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>MPSK Demod Demo</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 170)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2**8</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>10000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(155, 160)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_dxpsk_mod</key>
+    <param>
+      <key>id</key>
+      <value>blks2_dxpsk_mod_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>dqpsk</value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>samps_per_sym</value>
+    </param>
+    <param>
+      <key>excess_bw</key>
+      <value>0.35</value>
+    </param>
+    <param>
+      <key>gray_code</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>verbose</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>log</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(391, 54)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(654, 142)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samps_per_sym</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(7, 89)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_channel_model</key>
+    <param>
+      <key>id</key>
+      <value>gr_channel_model_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>noise_voltage</key>
+      <value>noise</value>
+    </param>
+    <param>
+      <key>freq_offset</key>
+      <value>freq_off</value>
+    </param>
+    <param>
+      <key>epsilon</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(487, 282)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>noise</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Noise</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>.1</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(259, 353)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>freq_off</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Freq Offset</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-.5</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>.5</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(126, 345)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>notebook</key>
+    <param>
+      <key>id</key>
+      <value>notebook</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.NB_TOP</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>['Constellation', 'Spectrum']</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(520, 407)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_constellationsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_constellationsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Constellation Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>frame_rate</key>
+      <value>5</value>
+    </param>
+    <param>
+      <key>const_size</key>
+      <value>2048</value>
+    </param>
+    <param>
+      <key>M</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>theta</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alpha</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>fmax</key>
+      <value>0.06</value>
+    </param>
+    <param>
+      <key>mu</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>gain_mu</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>symbol_rate</key>
+      <value>samp_rate/4.</value>
+    </param>
+    <param>
+      <key>omega_limit</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>notebook, 0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(824, 212)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>50</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>notebook, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(847, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>blks2_dxpsk_mod_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>wxgui_constellationsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_dxpsk_mod_0</source_block_id>
+    <sink_block_id>gr_channel_model_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_channel_model_0</source_block_id>
+    <sink_block_id>gr_throttle_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/demod/pam_timing.grc b/gnuradio-examples/grc/demod/pam_timing.grc
new file mode 100644 (file)
index 0000000..4e2a2f8
--- /dev/null
@@ -0,0 +1,1424 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Mon Oct 12 17:54:59 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>top_block</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value></value>
+    </param>
+    <param>
+      <key>author</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_uchar_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_uchar_to_float_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(217, 108)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_uchar_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_uchar_to_float_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(216, 273)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(128, 9)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>freq_offset</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency Offset</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-0.5</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(293, 684)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>rrctaps</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>firdes.root_raised_cosine(nfilts,1.0,1.0/(spb*nfilts), .35, int(11*spb*nfilts))</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(513, 679)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>pam_amp</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>10000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(13, 80)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>pam_amp</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>10000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(15, 245)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>const_source_x</key>
+    <param>
+      <key>id</key>
+      <value>const_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>-0.5*(pam_amp-1)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(213, 197)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>const_source_x</key>
+    <param>
+      <key>id</key>
+      <value>const_source_x_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>-0.5*(pam_amp-1)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(200, 360)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0_0_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>1.25</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>notebook_0,2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1111, 767)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>9</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>notebook_0,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1112, 881)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_channel_model</key>
+    <param>
+      <key>id</key>
+      <value>gr_channel_model_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>noise_voltage</key>
+      <value>noise_amp</value>
+    </param>
+    <param>
+      <key>freq_offset</key>
+      <value>freq_offset</value>
+    </param>
+    <param>
+      <key>epsilon</key>
+      <value>interpratio</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(59, 543)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(290, 575)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>notebook</key>
+    <param>
+      <key>id</key>
+      <value>notebook_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.NB_TOP</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>['error', 'phase', 'freq', 'Resampled Signal']</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(729, 769)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0_0_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Error</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>.5</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>notebook_0,3</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1115, 358)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(440, 167)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_xx_0_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(430, 330)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_float_to_complex</key>
+    <param>
+      <key>id</key>
+      <value>gr_float_to_complex_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(590, 184)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1116, 500)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>nfilts</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(435, 686)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_pfb_clock_sync_ccf</key>
+    <param>
+      <key>id</key>
+      <value>gr_pfb_clock_sync_ccf_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sps</key>
+      <value>spb</value>
+    </param>
+    <param>
+      <key>alpha</key>
+      <value>alpha</value>
+    </param>
+    <param>
+      <key>beta</key>
+      <value>beta</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>rrctaps</value>
+    </param>
+    <param>
+      <key>filter_size</key>
+      <value>nfilts</value>
+    </param>
+    <param>
+      <key>init_phase</key>
+      <value>16</value>
+    </param>
+    <param>
+      <key>max_dev</key>
+      <value>1.5</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(512, 527)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>noise_amp</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Channel Noise</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(168, 684)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>interpratio</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Timing Offset</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1.00</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0.99</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1.01</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(40, 684)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>spb_gen</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(119, 841)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>beta</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Timing Beta</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>0.1</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(668, 5)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>alpha</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Timing Alpha</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(552, 4)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Error</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>notebook_0,0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1110, 651)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>root_raised_cosine_filter</key>
+    <param>
+      <key>id</key>
+      <value>root_raised_cosine_filter_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>interp_fir_filter_ccf</value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>spb_gen</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>2*spb_gen</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>sym_rate</key>
+      <value>1./spb_gen</value>
+    </param>
+    <param>
+      <key>alpha</key>
+      <value>0.35</value>
+    </param>
+    <param>
+      <key>ntaps</key>
+      <value>11*spb_gen</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(834, 157)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_pfb_arb_resampler_ccf</key>
+    <param>
+      <key>id</key>
+      <value>blks2_pfb_arb_resampler_ccf_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>rate</key>
+      <value>float(spb)/float(spb_gen)</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>firdes.low_pass(128, 128, 0.45, 0.1)</value>
+    </param>
+    <param>
+      <key>size</key>
+      <value>128</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(617, 374)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>sig_amp</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1096, 197)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>pam_amp</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(223, 9)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>spb</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>4.1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(32, 842)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>sig_amp</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(315, 9)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>gr_pfb_clock_sync_ccf_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0_0</sink_block_id>
+    <source_key>1</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_pfb_clock_sync_ccf_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0_0_0</sink_block_id>
+    <source_key>3</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_pfb_clock_sync_ccf_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0_0_0_0</sink_block_id>
+    <source_key>2</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>gr_uchar_to_float_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_uchar_to_float_0</source_block_id>
+    <sink_block_id>gr_add_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>const_source_x_0</source_block_id>
+    <sink_block_id>gr_add_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_uchar_to_float_0_0</source_block_id>
+    <sink_block_id>gr_add_xx_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>const_source_x_0_0</source_block_id>
+    <sink_block_id>gr_add_xx_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0_0</source_block_id>
+    <sink_block_id>gr_uchar_to_float_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_pfb_arb_resampler_ccf_0</source_block_id>
+    <sink_block_id>gr_channel_model_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_pfb_arb_resampler_ccf_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0_0_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_channel_model_0</source_block_id>
+    <sink_block_id>gr_throttle_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>gr_pfb_clock_sync_ccf_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_pfb_clock_sync_ccf_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_0</source_block_id>
+    <sink_block_id>gr_float_to_complex_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_0_1</source_block_id>
+    <sink_block_id>gr_float_to_complex_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_float_to_complex_0</source_block_id>
+    <sink_block_id>root_raised_cosine_filter_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>root_raised_cosine_filter_0</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_0</source_block_id>
+    <sink_block_id>blks2_pfb_arb_resampler_ccf_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/simple/ber_simulation.grc b/gnuradio-examples/grc/simple/ber_simulation.grc
new file mode 100644 (file)
index 0000000..618add2
--- /dev/null
@@ -0,0 +1,564 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Thu Mar 19 11:08:59 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>ber_sim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER Simulation</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>Adjust the noise and constellation... see what happens!</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_noise_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_noise_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>noise_type</key>
+      <value>gr.GR_GAUSSIAN</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>noise</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(235, 379)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>const</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(360, 237)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>%</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1062, 11)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(397, 27)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_error_rate</key>
+    <param>
+      <key>id</key>
+      <value>blks2_error_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>'BER'</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value>1000000</value>
+    </param>
+    <param>
+      <key>bits_per_symbol</key>
+      <value>int(math.log(len(const))/math.log(2))</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(670, 41)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_constellation_decoder_cb</key>
+    <param>
+      <key>id</key>
+      <value>gr_constellation_decoder_cb</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>sym_position</key>
+      <value>const</value>
+    </param>
+    <param>
+      <key>sym_value_out</key>
+      <value>range(len(const))</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(708, 224)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>len(const)</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>1000000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(15, 244)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>noise</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>.25</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(18, 386)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>const</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1+1j, 1-1j, -1-1j, -1+1j</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 461)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>50e3</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(20, 168)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>import</key>
+    <param>
+      <key>id</key>
+      <value>import</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>import</key>
+      <value>import math</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(138, 168)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_xx</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(652, 395)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>"Constellation: "+str(const)</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>2, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(828, 368)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>blks2_error_rate</source_block_id>
+    <sink_block_id>wxgui_numbersink2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle</source_block_id>
+    <sink_block_id>blks2_error_rate</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_constellation_decoder_cb</source_block_id>
+    <sink_block_id>blks2_error_rate</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx</source_block_id>
+    <sink_block_id>gr_constellation_decoder_cb</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_noise_source_x</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x</source_block_id>
+    <sink_block_id>gr_throttle</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/simple/dpsk_loopback.grc b/gnuradio-examples/grc/simple/dpsk_loopback.grc
new file mode 100644 (file)
index 0000000..6a507c9
--- /dev/null
@@ -0,0 +1,450 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Tue Mar 17 12:53:37 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>dpsk_loopback</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>DPSK Loopback</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>gnuradio flow graph</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_dxpsk_mod</key>
+    <param>
+      <key>id</key>
+      <value>blks2_dxpsk_mod_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>dbpsk</value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>excess_bw</key>
+      <value>0.35</value>
+    </param>
+    <param>
+      <key>gray_code</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(426, 295)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 170)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>500</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>samp_rate/2</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_length</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(12, 257)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_packet_encoder</key>
+    <param>
+      <key>id</key>
+      <value>blks2_packet_encoder_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>bits_per_symbol</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>access_code</key>
+      <value></value>
+    </param>
+    <param>
+      <key>pad_for_usrp</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>payload_length</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(216, 260)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(225, 174)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(203, 8)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_packet_decoder</key>
+    <param>
+      <key>id</key>
+      <value>blks2_packet_decoder_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>access_code</key>
+      <value></value>
+    </param>
+    <param>
+      <key>threshold</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(551, 65)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>frame_decim</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>1./freq</value>
+    </param>
+    <param>
+      <key>marker</key>
+      <value>set_format_line</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(769, 12)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_dxpsk_demod</key>
+    <param>
+      <key>id</key>
+      <value>blks2_dxpsk_demod_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>dbpsk</value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>excess_bw</key>
+      <value>0.35</value>
+    </param>
+    <param>
+      <key>costas_alpha</key>
+      <value>0.175</value>
+    </param>
+    <param>
+      <key>gain_mu</key>
+      <value>0.175</value>
+    </param>
+    <param>
+      <key>mu</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>omega_relative_limit</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>gray_code</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(691, 219)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>blks2_dxpsk_mod_0</source_block_id>
+    <sink_block_id>blks2_dxpsk_demod_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_dxpsk_demod_0</source_block_id>
+    <sink_block_id>blks2_packet_decoder_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_packet_encoder_0</source_block_id>
+    <sink_block_id>blks2_dxpsk_mod_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sig_source_x_0</source_block_id>
+    <sink_block_id>gr_throttle_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0_0</source_block_id>
+    <sink_block_id>blks2_packet_encoder_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_packet_decoder_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/simple/var_sink_taps.grc b/gnuradio-examples/grc/simple/var_sink_taps.grc
new file mode 100644 (file)
index 0000000..0720785
--- /dev/null
@@ -0,0 +1,488 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Tue May 19 16:45:51 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>var_sink_taps</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Variable Sink + Taps</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>gnuradio flow graph</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_noise_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_noise_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>noise_type</key>
+      <value>gr.GR_GAUSSIAN</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(619, 36)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_fir_filter_xxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_fir_filter_xxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ccc</value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>taps</key>
+      <value>dest_taps</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(831, 47)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(999, 198)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>270</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>50</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(629, 184)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <block>
+    <key>import</key>
+    <param>
+      <key>id</key>
+      <value>import_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>import</key>
+      <value>from gnuradio.gr import firdes</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(330, 120)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>dest_taps</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>[0]</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(836, 223)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(831, 130)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>source_taps</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>firdes.low_pass(1, samp_rate, 4000, 2000)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(397, 191)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>taps_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(268, 189)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_vector_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_vector_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>vector</key>
+      <value>source_taps</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>len(source_taps)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(205, 33)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>note</key>
+    <param>
+      <key>id</key>
+      <value>note_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>note</key>
+      <value>Pass the FIR taps via a variable sink.</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(14, 141)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>taps_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>len(source_taps)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(440, 41)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_variable_sink_x</key>
+    <param>
+      <key>id</key>
+      <value>blks2_variable_sink_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>variable</key>
+      <value>dest_taps</value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>len(source_taps)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(305, 283)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>gr_noise_source_x_0</source_block_id>
+    <sink_block_id>gr_fir_filter_xxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_fir_filter_xxx_0</source_block_id>
+    <sink_block_id>gr_throttle_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_vector_source_x_0</source_block_id>
+    <sink_block_id>gr_throttle</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle</source_block_id>
+    <sink_block_id>blks2_variable_sink_x_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/simple/variable_config.grc b/gnuradio-examples/grc/simple/variable_config.grc
new file mode 100644 (file)
index 0000000..95c287c
--- /dev/null
@@ -0,0 +1,329 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Thu Jun 25 10:56:04 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>variable_config_demo</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Variable Config Block Demonstration</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>Save/Load freq from a config file.</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>autostart</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 170)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_config</key>
+    <param>
+      <key>id</key>
+      <value>freq_init</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config.conf</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>main</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(255, 17)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>freq_init</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-samp_rate/2</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>samp_rate/2</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(429, 24)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(392, 233)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(148, 233)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>50</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(671, 233)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>gr_sig_source_x_0</source_block_id>
+    <sink_block_id>gr_throttle_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/trellis/interference_cancellation.grc b/gnuradio-examples/grc/trellis/interference_cancellation.grc
new file mode 100644 (file)
index 0000000..e93babd
--- /dev/null
@@ -0,0 +1,2072 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Thu Mar 19 11:22:40 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>int_cancellation</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Superposition Coding</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>AA</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>gnuradio flow graph</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>2048, 2048</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>alpha</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>P1/P</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.6</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_length</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(243, 11)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>snr_db</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>P/sigma^2 (dB)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>16</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>20</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_length</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(447, 14)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>noisevar</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10**(-snr_db/10)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(637, 13)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(21, 170)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(665, 187)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>alpha**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(988, 196)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(25, 291)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(660, 311)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>(1-alpha)**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(994, 319)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1224, 244)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_noise_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_noise_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>noise_type</key>
+      <value>gr.GR_GAUSSIAN</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>noisevar</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1146, 369)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(536, 529)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(771, 525)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(994, 545)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_3</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(535, 792)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(785, 779)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1005, 798)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(405, 998)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>alpha**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(710, 1008)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(944, 978)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(540, 1141)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(796, 1136)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1009, 1156)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_chunks_to_symbols_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_chunks_to_symbols_xx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>in_type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>symbol_table</key>
+      <value>1,1j,-1j,-1</value>
+    </param>
+    <param>
+      <key>dimension</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(420, 1368)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>(1-alpha)**0.5</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(733, 1374)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(975, 1342)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sub_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_sub_xx_1_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(559, 1536)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_xx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>short</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(771, 1530)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_short_to_float</key>
+    <param>
+      <key>id</key>
+      <value>gr_short_to_float_1_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1010, 1551)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 2 (raw)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0,1,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1260, 659)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_3</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 2 (after cancelling user 1)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1,1,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1262, 1020)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_3_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 1 (after cancelling user 2)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1,0,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1269, 1417)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>10e3</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(748, 12)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(334, 190)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(336, 311)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(79, 501)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(82, 766)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(89, 998)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(83, 1111)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_encoder_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_encoder_xx_2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>ss</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(105, 1367)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>trellis_viterbi_combined_xx</key>
+    <param>
+      <key>id</key>
+      <value>trellis_viterbi_combined_xx_0_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>c</value>
+    </param>
+    <param>
+      <key>out_type</key>
+      <value>s</value>
+    </param>
+    <param>
+      <key>fsm_args</key>
+      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+    </param>
+    <param>
+      <key>block_size</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>init_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>final_state</key>
+      <value>-1</value>
+    </param>
+    <param>
+      <key>dim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>table</key>
+      <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value>
+    </param>
+    <param>
+      <key>metric_type</key>
+      <value>trellis.TRELLIS_EUCLIDEAN</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(75, 1495)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>prefix</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>"../../../"</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(871, 14)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_xx_1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1400, 262)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_numbersink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_numbersink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>BER 1 (raw)</value>
+    </param>
+    <param>
+      <key>units</key>
+      <value>BER</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>base_value</key>
+      <value>0.0</value>
+    </param>
+    <param>
+      <key>min_value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max_value</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>factor</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>decimal_places</key>
+      <value>6</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>number_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0.001</value>
+    </param>
+    <param>
+      <key>show_gauge</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0,0,1,1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1267, 410)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>R</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1533, 149)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>random_source_x_1</source_block_id>
+    <sink_block_id>trellis_encoder_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_0</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_1</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_0</source_block_id>
+    <sink_block_id>gr_add_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_0</source_block_id>
+    <sink_block_id>gr_add_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_noise_source_x_0</source_block_id>
+    <sink_block_id>gr_add_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_1</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_1</source_block_id>
+    <sink_block_id>gr_add_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_0</source_block_id>
+    <sink_block_id>gr_multiply_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_0</source_block_id>
+    <sink_block_id>gr_multiply_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_xx_0</source_block_id>
+    <sink_block_id>gr_short_to_float_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_0</source_block_id>
+    <sink_block_id>wxgui_numbersink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_xx_2</source_block_id>
+    <sink_block_id>gr_short_to_float_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>trellis_encoder_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_1</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>gr_sub_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_1</source_block_id>
+    <sink_block_id>gr_sub_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_0</source_block_id>
+    <sink_block_id>gr_sub_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_1</source_block_id>
+    <sink_block_id>gr_sub_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1</source_block_id>
+    <sink_block_id>gr_multiply_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1</source_block_id>
+    <sink_block_id>gr_multiply_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_2</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_1</source_block_id>
+    <sink_block_id>gr_sub_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_2</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_2</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_2</source_block_id>
+    <sink_block_id>gr_sub_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_1</source_block_id>
+    <sink_block_id>trellis_encoder_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_xx_1</source_block_id>
+    <sink_block_id>gr_short_to_float_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_2</source_block_id>
+    <sink_block_id>wxgui_numbersink2_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_2</source_block_id>
+    <sink_block_id>gr_sub_xx_3</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_3</source_block_id>
+    <sink_block_id>gr_multiply_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_3</source_block_id>
+    <sink_block_id>gr_multiply_xx_1</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_1</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_1</source_block_id>
+    <sink_block_id>gr_sub_xx_3</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_1</source_block_id>
+    <sink_block_id>wxgui_numbersink2_3</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_encoder_xx_2_0</source_block_id>
+    <sink_block_id>gr_chunks_to_symbols_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_chunks_to_symbols_xx_2_0</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_2</source_block_id>
+    <sink_block_id>trellis_encoder_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_xx_2_0</source_block_id>
+    <sink_block_id>gr_short_to_float_1_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>trellis_viterbi_combined_xx_0_0</source_block_id>
+    <sink_block_id>gr_sub_xx_1_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1_0</source_block_id>
+    <sink_block_id>gr_multiply_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_1_0</source_block_id>
+    <sink_block_id>gr_multiply_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sub_xx_2_0</source_block_id>
+    <sink_block_id>trellis_viterbi_combined_xx_0_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_short_to_float_1_0</source_block_id>
+    <sink_block_id>wxgui_numbersink2_3_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_1</source_block_id>
+    <sink_block_id>gr_sub_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>gr_sub_xx_1_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_2_0</source_block_id>
+    <sink_block_id>gr_sub_xx_2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx_1</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/trellis/readme.txt b/gnuradio-examples/grc/trellis/readme.txt
new file mode 100644 (file)
index 0000000..d620fd6
--- /dev/null
@@ -0,0 +1,16 @@
+This is an example of using gr-trellis in grc.
+
+Two users are transmitting simultaneously using convolutionally encoded QPSK, each with power P1=alpha*P and P2=(1-alpha)*P.
+The combined signal is observed in noise and four different receivers are considered:
+1) A viterbi decoder decoding user 1 assuming user 2 is noise
+2) A viterbi decoder decoding user 2 assuming user 1 is noise
+3) A viterbi decoder decoding user 1 first 
+   and then reencoding this signal, subtracting it from the observation 
+   and then running a Viterbi decoder decoding user 2
+4) A viterbi decoder decoding user 2 first 
+   and then reencoding this signal, subtracting it from the observation 
+   and then running a Viterbi decoder decoding user 1
+
+You can change the signal to noise ratio P/sigma^2 and the allocation of power to the two users, alpha.
+
+Enjoy.
diff --git a/gnuradio-examples/grc/usrp/usrp2_const_wave.grc b/gnuradio-examples/grc/usrp/usrp2_const_wave.grc
new file mode 100644 (file)
index 0000000..fdbd7c1
--- /dev/null
@@ -0,0 +1,252 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Wed Apr 15 11:22:56 2009</timestamp>
+  <block>
+    <key>const_source_x</key>
+    <param>
+      <key>id</key>
+      <value>const_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(284, 154)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp2_sink_xxxx</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_sink_xxxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>interface</key>
+      <value></value>
+    </param>
+    <param>
+      <key>mac_addr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>interpolation</key>
+      <value>interp</value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(493, 106)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>interp</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>16</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(16, 255)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>USRP2 Freq (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>2.45e9</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>2.4e9</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2.5e9</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_length</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(30, 376)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Amplitude</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>.1</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_length</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(204, 376)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_const_wave</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP2 Constant Wave</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>Tune USRP2</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>const_source_x_0</source_block_id>
+    <sink_block_id>usrp2_sink_xxxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/usrp/usrp2_dpsk_mod.grc b/gnuradio-examples/grc/usrp/usrp2_dpsk_mod.grc
new file mode 100644 (file)
index 0000000..e9f9b41
--- /dev/null
@@ -0,0 +1,693 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Wed Apr 15 17:31:00 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_dpsk_mod</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP2 DPSK Modulation</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>Generate a DPSK signal</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>100e6/interp</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(52, 166)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp2_sink_xxxx</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_sink_xxxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>interface</key>
+      <value></value>
+    </param>
+    <param>
+      <key>mac_addr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>interpolation</key>
+      <value>interp</value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1059, 56)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(679, 58)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_dxpsk_mod</key>
+    <param>
+      <key>id</key>
+      <value>blks2_dxpsk_mod_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>dqpsk</value>
+    </param>
+    <param>
+      <key>samples_per_symbol</key>
+      <value>samps_per_sym</value>
+    </param>
+    <param>
+      <key>excess_bw</key>
+      <value>0.35</value>
+    </param>
+    <param>
+      <key>gray_code</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(468, 55)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>interp</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(31, 256)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samps_per_sym</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>8</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(126, 250)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>random_source_x</key>
+    <param>
+      <key>id</key>
+      <value>random_source_x_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>byte</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>256</value>
+    </param>
+    <param>
+      <key>num_samps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(255, 39)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Amplitude</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>.1</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(246, 372)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>rx_freq_off</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>RX Freq Offset (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>-20e3</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-50e3</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>+50e3</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(247, 508)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>USRP2 Freq (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>2.45e9</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>2.4e9</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2.5e9</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(49, 341)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_constellationsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_constellationsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Constellation Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>frame_rate</key>
+      <value>5</value>
+    </param>
+    <param>
+      <key>const_size</key>
+      <value>2048</value>
+    </param>
+    <param>
+      <key>M</key>
+      <value>4</value>
+    </param>
+    <param>
+      <key>theta</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>alpha</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>fmax</key>
+      <value>0.06</value>
+    </param>
+    <param>
+      <key>mu</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>gain_mu</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>symbol_rate</key>
+      <value>samp_rate/samps_per_sym</value>
+    </param>
+    <param>
+      <key>omega_limit</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(920, 202)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(691, 155)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>1e-6</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(515, 272)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp2_source_xxxx</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_source_xxxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>interface</key>
+      <value>eth1</value>
+    </param>
+    <param>
+      <key>mac_addr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decimation</key>
+      <value>interp</value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>tun_freq + rx_freq_off</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(270, 200)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>random_source_x_0</source_block_id>
+    <sink_block_id>blks2_dxpsk_mod_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_dxpsk_mod_0</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx_0</source_block_id>
+    <sink_block_id>usrp2_sink_xxxx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>usrp2_source_xxxx_0</source_block_id>
+    <sink_block_id>wxgui_constellationsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>usrp2_source_xxxx_0</source_block_id>
+    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>usrp2_source_xxxx_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/usrp/usrp2_fft.grc b/gnuradio-examples/grc/usrp/usrp2_fft.grc
new file mode 100644 (file)
index 0000000..134bd46
--- /dev/null
@@ -0,0 +1,264 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Wed Apr 15 17:30:20 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_fft</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP2 FFT Plotter</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>FFT waveform plot</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>100e6/decim</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 170)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>16</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(24, 267)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>USRP2 Freq (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>2.45e9</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>2.4e9</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2.5e9</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(32, 365)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(466, 100)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp2_source_xxxx</key>
+    <param>
+      <key>id</key>
+      <value>usrp2_source_xxxx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>interface</key>
+      <value></value>
+    </param>
+    <param>
+      <key>mac_addr</key>
+      <value></value>
+    </param>
+    <param>
+      <key>decimation</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(211, 200)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>usrp2_source_xxxx_0</source_block_id>
+    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/usrp/usrp_two_tone_loopback.grc b/gnuradio-examples/grc/usrp/usrp_two_tone_loopback.grc
new file mode 100644 (file)
index 0000000..3df9770
--- /dev/null
@@ -0,0 +1,749 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Fri Apr 17 18:23:35 2009</timestamp>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>64e6/200</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(9, 166)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>int(100e6)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(116, 166)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>tone1</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>tone_ampl</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(258, 20)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>tone2</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>tone_ampl</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(255, 179)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_add_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_add_xx</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>3</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(528, 78)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>parameter</key>
+    <param>
+      <key>id</key>
+      <value>tx_side</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>A</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>string</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(688, 384)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp_simple_sink_x</key>
+    <param>
+      <key>id</key>
+      <value>usrp_simple_sink_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>format</key>
+      <value></value>
+    </param>
+    <param>
+      <key>which</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>interpolation</key>
+      <value>400</value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>side</key>
+      <value>tx_side</value>
+    </param>
+    <param>
+      <key>transmit</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(835, 5)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp_simple_source_x</key>
+    <param>
+      <key>id</key>
+      <value>usrp_simple_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>format</key>
+      <value></value>
+    </param>
+    <param>
+      <key>which</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>decimation</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>tun_freq</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>20</value>
+    </param>
+    <param>
+      <key>side</key>
+      <value>rx_side</value>
+    </param>
+    <param>
+      <key>rx_ant</key>
+      <value>rx_ant</value>
+    </param>
+    <param>
+      <key>hb_filters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(479, 224)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>parameter</key>
+    <param>
+      <key>id</key>
+      <value>rx_ant</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>RXA</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>string</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(802, 384)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>512*2</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 2, 2, 4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(746, 133)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>parameter</key>
+    <param>
+      <key>id</key>
+      <value>rx_side</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value></value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>A</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>string</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(568, 382)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_noise_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_noise_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>noise_type</key>
+      <value>gr.GR_GAUSSIAN</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>noise_ampl</value>
+    </param>
+    <param>
+      <key>seed</key>
+      <value>42</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(276, 312)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>noise_ampl</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Noise Ampl</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>2000</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>5000</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_VERTICAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 1, 2, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(20, 243)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>tone_ampl</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Tone Ampl</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>5000</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>10e3</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_VERTICAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 2, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(28, 437)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>tone1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Tone 1</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>50e3</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-samp_rate/2</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>samp_rate/2</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(190, 436)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>tone2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Tone 2</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>75e3</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-samp_rate/2</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>samp_rate/2</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 4, 1, 4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(367, 439)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>usrp_two_tone_loopback</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP Loopback - 2 Tone</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>Loopback test with basic rx and basic tx</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>gr_sig_source_x</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_sig_source_x0</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>1</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_noise_source_x</source_block_id>
+    <sink_block_id>gr_add_xx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>2</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>usrp_simple_source_x</source_block_id>
+    <sink_block_id>wxgui_fftsink2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_add_xx</source_block_id>
+    <sink_block_id>usrp_simple_sink_x</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/usrp/usrp_wbfm_receive.grc b/gnuradio-examples/grc/usrp/usrp_wbfm_receive.grc
new file mode 100644 (file)
index 0000000..8f53475
--- /dev/null
@@ -0,0 +1,466 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Fri Apr 17 19:06:07 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>usrp_wbfm_receive</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP WBFM Receive</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>WBFM Receive with Basic RX or TV RX</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>200</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(14, 173)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Volume</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(991, 40)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>usrp_simple_source_x</key>
+    <param>
+      <key>id</key>
+      <value>usrp_simple_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>format</key>
+      <value></value>
+    </param>
+    <param>
+      <key>which</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>decimation</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>frequency</key>
+      <value>(freq+fine)*1e6</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>20</value>
+    </param>
+    <param>
+      <key>side</key>
+      <value>A</value>
+    </param>
+    <param>
+      <key>rx_ant</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>hb_filters</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(277, 29)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>64e6/decim</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>(freq+fine)*1e6</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>50</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>512</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>2, 0, 2, 4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(512, 191)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency (MHz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>87.5</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>108.0</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(104, 243)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>fine</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Fine Freq (MHz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>-.1</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>.1</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 2, 1, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(275, 246)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>blks2_wfm_rcv</key>
+    <param>
+      <key>id</key>
+      <value>blks2_wfm_rcv</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>quad_rate</key>
+      <value>64e6/decim</value>
+    </param>
+    <param>
+      <key>audio_decimation</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(510, 37)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_multiply_const_vxx</key>
+    <param>
+      <key>id</key>
+      <value>gr_multiply_const_vxx</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>const</key>
+      <value>volume</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(764, 55)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>audio_sink</key>
+    <param>
+      <key>id</key>
+      <value>audio_sink</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>device_name</key>
+      <value></value>
+    </param>
+    <param>
+      <key>ok_to_block</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(703, 241)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>180</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>usrp_simple_source_x</source_block_id>
+    <sink_block_id>blks2_wfm_rcv</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>usrp_simple_source_x</source_block_id>
+    <sink_block_id>wxgui_fftsink2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>blks2_wfm_rcv</source_block_id>
+    <sink_block_id>gr_multiply_const_vxx</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_multiply_const_vxx</source_block_id>
+    <sink_block_id>audio_sink</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gnuradio-examples/grc/xmlrpc/readme.txt b/gnuradio-examples/grc/xmlrpc/readme.txt
new file mode 100644 (file)
index 0000000..c1f87c1
--- /dev/null
@@ -0,0 +1,18 @@
+##################################################
+# XMLRPC example
+##################################################
+
+XMLRPC allows software to make remote function calls over http. 
+In the case of GRC, one can use XMLRPC to modify variables in a running flow graph.
+See http://www.xmlrpc.com/
+
+--- Server Example ---
+Place an "XMLRPC Server" block inside of any flow graph. 
+The server will provide set functions for every variable in the flow graph.
+If a variable is called "freq", the server will provide a function set_freq(new_freq).
+Run the server example and experiment with the example client script.
+
+-- Client Example --
+The "XMLRPC Client" block will give a variable control over one remove function.
+In the example client, there is one client block and gui control per variable.
+This technique can be used to remotely control a flow graph, perhaps running on a non-gui machine.
diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc b/gnuradio-examples/grc/xmlrpc/xmlrpc_client.grc
new file mode 100644 (file)
index 0000000..3bb4e7e
--- /dev/null
@@ -0,0 +1,312 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Thu Jul 24 14:27:44 2008</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>client_block</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>XMLRPC Client</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>example flow graph</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>xmlrpc_client</key>
+    <param>
+      <key>id</key>
+      <value>xmlrpc_client0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>addr</key>
+      <value>localhost</value>
+    </param>
+    <param>
+      <key>port</key>
+      <value>1234</value>
+    </param>
+    <param>
+      <key>callback</key>
+      <value>set_ampl</value>
+    </param>
+    <param>
+      <key>variable</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(409, 35)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>xmlrpc_client</key>
+    <param>
+      <key>id</key>
+      <value>xmlrpc_client</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>addr</key>
+      <value>localhost</value>
+    </param>
+    <param>
+      <key>port</key>
+      <value>1234</value>
+    </param>
+    <param>
+      <key>callback</key>
+      <value>set_freq</value>
+    </param>
+    <param>
+      <key>variable</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(222, 34)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Frequency (Hz)</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>5000</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(207, 162)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Amplitude</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>slider_type</key>
+      <value>horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(397, 167)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_chooser</key>
+    <param>
+      <key>id</key>
+      <value>offset</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Offset</value>
+    </param>
+    <param>
+      <key>value_index</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>choices</key>
+      <value>[-1, 0, 1]</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>["neg", "zero", "pos"]</value>
+    </param>
+    <param>
+      <key>chooser_type</key>
+      <value>radio_buttons_horizontal</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>2, 0, 1, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(596, 177)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>xmlrpc_client</key>
+    <param>
+      <key>id</key>
+      <value>xmlrpc_client1</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>addr</key>
+      <value>localhost</value>
+    </param>
+    <param>
+      <key>port</key>
+      <value>1234</value>
+    </param>
+    <param>
+      <key>callback</key>
+      <value>set_offset</value>
+    </param>
+    <param>
+      <key>variable</key>
+      <value>offset*ampl</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(608, 39)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(13, 172)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+</flow_graph>
\ No newline at end of file
diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py b/gnuradio-examples/grc/xmlrpc/xmlrpc_client_script.py
new file mode 100644 (file)
index 0000000..956fa07
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+import time
+import random
+import xmlrpclib
+
+#create server object
+s = xmlrpclib.Server("http://localhost:1234")
+
+#randomly change parameters of the sinusoid
+for i in range(10):
+       #generate random values
+       new_freq = random.uniform(0, 5000)
+       new_ampl = random.uniform(0, 2)
+       new_offset = random.uniform(-1, 1)
+       #set new values 
+       time.sleep(1)
+       s.set_freq(new_freq)
+       time.sleep(1)
+       s.set_ampl(new_ampl)
+       time.sleep(1)
+       s.set_offset(new_offset)
+
diff --git a/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc b/gnuradio-examples/grc/xmlrpc/xmlrpc_server.grc
new file mode 100644 (file)
index 0000000..dc539ef
--- /dev/null
@@ -0,0 +1,384 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Thu Jul 24 14:27:42 2008</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>server_block</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>XMLRPC Server</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value>Example</value>
+    </param>
+    <param>
+      <key>description</key>
+      <value>example flow graph</value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>1280, 1024</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_sig_source_x</key>
+    <param>
+      <key>id</key>
+      <value>gr_sig_source_x</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>waveform</key>
+      <value>gr.GR_COS_WAVE</value>
+    </param>
+    <param>
+      <key>freq</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>amp</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>offset</key>
+      <value>offset</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(162, 200)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>offset</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(12, 390)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>xmlrpc_server</key>
+    <param>
+      <key>id</key>
+      <value>xmlrpc_server</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>addr</key>
+      <value>localhost</value>
+    </param>
+    <param>
+      <key>port</key>
+      <value>1234</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(395, 240)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(386, 93)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_scopesink2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Scope Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>frame_decim</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>.001</value>
+    </param>
+    <param>
+      <key>marker</key>
+      <value>set_format_line</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 2, 4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(623, 28)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>wxgui_fftsink2</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>float</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>FFT Plot</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>8</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>50</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>512</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>2, 0, 2, 4</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(630, 233)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>samp_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>32000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(11, 160)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1000</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(11, 237)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>ampl</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(13, 315)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>gr_sig_source_x</source_block_id>
+    <sink_block_id>gr_throttle</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle</source_block_id>
+    <sink_block_id>wxgui_scopesink2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle</source_block_id>
+    <sink_block_id>wxgui_fftsink2</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
\ No newline at end of file
index e43bffa2638561eb429fc6ed658463a1aaaaf552..35cc2e376d16bda6e51bedd57e9df484e9fae3ff 100755 (executable)
@@ -52,7 +52,7 @@ class dialog_box(QtGui.QMainWindow):
         self.set_frequency(self.fg.frequency_offset())
         self.set_time_offset(self.fg.timing_offset())
 
-        self.set_gain_mu(self.fg.rx_gain_mu())
+        self.set_gain_mu(self.fg.rx_timing_gain_alpha())
         self.set_alpha(self.fg.rx_alpha())
 
         # Add the qtsnk widgets to the hlayout box
@@ -158,7 +158,7 @@ class dialog_box(QtGui.QMainWindow):
     def gainMuEditText(self):
         try:
             gain = self.gui.gainMuEdit.text().toDouble()[0]
-            self.fg.set_rx_gain_mu(gain)
+            self.fg.set_rx_timing_gain_alpha(gain)
         except RuntimeError:
             pass
 
@@ -202,7 +202,7 @@ class my_top_block(gr.top_block):
         self.rxpath = receive_path(demod_class, rx_callback, options)
 
         # FIXME: do better exposure to lower issues for control
-        self._gain_mu = self.rxpath.packet_receiver._demodulator._mm_gain_mu
+        self._timing_gain_alpha = self.rxpath.packet_receiver._demodulator._timing_alpha
         self._alpha = self.rxpath.packet_receiver._demodulator._costas_alpha
 
         if channelon:
@@ -240,16 +240,21 @@ class my_top_block(gr.top_block):
             
                 # Connect to the QT sinks
                 # FIXME: make better exposure to receiver from rxpath
-                self.receiver = self.rxpath.packet_receiver._demodulator.receiver
+                self.freq_recov = self.rxpath.packet_receiver._demodulator.clock_recov
+                self.time_recov = self.rxpath.packet_receiver._demodulator.time_recov
+                self.freq_recov.set_alpha(0)
+                self.freq_recov.set_beta(0)
+                self.time_recov.set_alpha(2)
+                self.time_recov.set_beta(0.02)
                 self.connect(self.channel, self.snk_tx)
-                self.connect(self.receiver, self.snk_rx)
+                self.connect(self.time_recov, self.snk_rx)
 
                 pyTxQt  = self.snk_tx.pyqwidget()
                 pyTx = sip.wrapinstance(pyTxQt, QtGui.QWidget)
-                
+                 
                 pyRxQt  = self.snk_rx.pyqwidget()
                 pyRx = sip.wrapinstance(pyRxQt, QtGui.QWidget)
-                
+
                 self.main_box = dialog_box(pyTx, pyRx, self)
                 self.main_box.show()
                 
@@ -299,17 +304,15 @@ class my_top_block(gr.top_block):
 
 
     # Receiver Parameters
-    def rx_gain_mu(self):
-        return self._gain_mu
+    def rx_timing_gain_alpha(self):
+        return self._timing_gain_alpha
 
-    def rx_gain_omega(self):
-        return self.gain_omega
+    def rx_timing_gain_beta(self):
+        return self._timing_gain_beta
     
-    def set_rx_gain_mu(self, gain):
-        self._gain_mu = gain
-        self.gain_omega = .25 * self._gain_mu * self._gain_mu
-        self.receiver.set_gain_mu(self._gain_mu)
-        self.receiver.set_gain_omega(self.gain_omega)
+    def set_rx_timing_gain_alpha(self, gain):
+        self._timing_gain_alpha = gain
+        self.time_recov.set_gain(self._timing_gain_alpha)
 
     def rx_alpha(self):
         return self._alpha
@@ -320,8 +323,8 @@ class my_top_block(gr.top_block):
     def set_rx_alpha(self, alpha):
         self._alpha = alpha
         self.beta = .25 * self._alpha * self._alpha
-        self.receiver.set_alpha(self._alpha)
-        self.receiver.set_beta(self.beta)
+        #self.freq_recov.set_alpha(self._alpha)
+        #self.freq_recov.set_beta(self.beta)
 
 
 
diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py
new file mode 100755 (executable)
index 0000000..101dd68
--- /dev/null
@@ -0,0 +1,488 @@
+#!/usr/bin/env python
+
+from gnuradio import gr, gru, modulation_utils
+from gnuradio import eng_notation
+from gnuradio.eng_option import eng_option
+from optparse import OptionParser
+import random, time, struct, sys, os, math
+
+from threading import Thread
+
+# from current dir
+from transmit_path import transmit_path
+from receive_path import receive_path
+
+try:
+    from gnuradio.qtgui import qtgui
+    from PyQt4 import QtGui, QtCore
+    import sip
+except ImportError:
+    print "Please install gr-qtgui."
+    sys.exit(1)
+    
+try:
+    from qt_digital_window2 import Ui_DigitalWindow
+except ImportError:
+    print "Error: could not find qt_digital_window2.py:"
+    print "\t\"pyuic4 qt_digital_window2.ui -o qt_digital_window2.py\""
+    sys.exit(1)
+
+
+#print os.getpid()
+#raw_input()
+
+
+# ////////////////////////////////////////////////////////////////////
+#        Define the QT Interface and Control Dialog
+# ////////////////////////////////////////////////////////////////////
+
+
+class dialog_box(QtGui.QMainWindow):
+    def __init__(self, snkTx, snkRx, fg, parent=None):
+
+        QtGui.QWidget.__init__(self, parent)
+        self.gui = Ui_DigitalWindow()
+        self.gui.setupUi(self)
+
+        self.fg = fg
+
+        self.set_sample_rate(self.fg.sample_rate())
+
+        self.set_snr(self.fg.snr())
+        self.set_frequency(self.fg.frequency_offset())
+        self.set_time_offset(self.fg.timing_offset())
+
+        self.set_alpha_time(self.fg.rx_timing_gain_alpha())
+        self.set_beta_time(self.fg.rx_timing_gain_beta())
+        self.set_alpha_freq(self.fg.rx_freq_gain_alpha())
+
+        # Add the qtsnk widgets to the hlayout box
+        self.gui.sinkLayout.addWidget(snkTx)
+        self.gui.sinkLayout.addWidget(snkRx)
+
+
+        # Connect up some signals
+        self.connect(self.gui.pauseButton, QtCore.SIGNAL("clicked()"),
+                     self.pauseFg)
+
+        self.connect(self.gui.sampleRateEdit, QtCore.SIGNAL("editingFinished()"),
+                     self.sampleRateEditText)
+
+        self.connect(self.gui.snrEdit, QtCore.SIGNAL("editingFinished()"),
+                     self.snrEditText)
+        self.connect(self.gui.freqEdit, QtCore.SIGNAL("editingFinished()"),
+                     self.freqEditText)
+        self.connect(self.gui.timeEdit, QtCore.SIGNAL("editingFinished()"),
+                     self.timeEditText)
+
+        self.connect(self.gui.alphaTimeEdit, QtCore.SIGNAL("editingFinished()"),
+                     self.alphaTimeEditText)
+        self.connect(self.gui.betaTimeEdit, QtCore.SIGNAL("editingFinished()"),
+                     self.betaTimeEditText)
+        self.connect(self.gui.alphaFreqEdit, QtCore.SIGNAL("editingFinished()"),
+                     self.alphaFreqEditText)
+
+        # Build a timer to update the packet number and PER fields
+        self.update_delay = 250  # time between updating packet rate fields
+        self.pkt_timer = QtCore.QTimer(self)
+        self.connect(self.pkt_timer, QtCore.SIGNAL("timeout()"),
+                     self.updatePacketInfo)
+        self.pkt_timer.start(self.update_delay)
+
+    def pauseFg(self):
+        if(self.gui.pauseButton.text() == "Pause"):
+            self.fg.stop()
+            self.fg.wait()
+            self.gui.pauseButton.setText("Unpause")
+        else:
+            self.fg.start()
+            self.gui.pauseButton.setText("Pause")
+
+    # Accessor functions for Gui to manipulate system parameters
+    def set_sample_rate(self, sr):
+        ssr = eng_notation.num_to_str(sr)
+        self.gui.sampleRateEdit.setText(QtCore.QString("%1").arg(ssr))
+
+    def sampleRateEditText(self):
+        try:
+            rate = self.gui.sampleRateEdit.text().toAscii()
+            srate = eng_notation.str_to_num(rate)
+            #self.fg.set_sample_rate(srate)
+        except RuntimeError:
+            pass
+
+
+    # Accessor functions for Gui to manipulate channel model
+    def set_snr(self, snr):
+        self.gui.snrEdit.setText(QtCore.QString("%1").arg(snr))
+
+    def set_frequency(self, fo):
+        self.gui.freqEdit.setText(QtCore.QString("%1").arg(fo))
+
+    def set_time_offset(self, to):
+        self.gui.timeEdit.setText(QtCore.QString("%1").arg(to))
+
+    def snrEditText(self):
+        try:
+            snr = self.gui.snrEdit.text().toDouble()[0]
+            self.fg.set_snr(snr)
+        except RuntimeError:
+            pass
+
+    def freqEditText(self):
+        try:
+            freq = self.gui.freqEdit.text().toDouble()[0]
+            self.fg.set_frequency_offset(freq)
+        except RuntimeError:
+            pass
+
+    def timeEditText(self):
+        try:
+            to = self.gui.timeEdit.text().toDouble()[0]
+            self.fg.set_timing_offset(to)
+        except RuntimeError:
+            pass
+
+
+    # Accessor functions for Gui to manipulate receiver parameters
+    def set_alpha_time(self, alpha):
+        self.gui.alphaTimeEdit.setText(QtCore.QString("%1").arg(alpha))
+
+    def set_beta_time(self, beta):
+        self.gui.betaTimeEdit.setText(QtCore.QString("%1").arg(beta))
+
+    def set_alpha_freq(self, alpha):
+        self.gui.alphaFreqEdit.setText(QtCore.QString("%1").arg(alpha))
+
+    def alphaFreqEditText(self):
+        try:
+            alpha = self.gui.alphaFreqEdit.text().toDouble()[0]
+            self.fg.set_rx_freq_gain_alpha(alpha)
+        except RuntimeError:
+            pass
+
+    def alphaTimeEditText(self):
+        try:
+            alpha = self.gui.alphaTimeEdit.text().toDouble()[0]
+            self.fg.set_rx_timing_gain_alpha(alpha)
+        except RuntimeError:
+            pass
+
+    def betaTimeEditText(self):
+        try:
+            beta = self.gui.betaTimeEdit.text().toDouble()[0]
+            self.fg.set_rx_timing_gain_beta(beta)
+        except RuntimeError:
+            pass
+
+    # Accessor functions for packet error reporting
+    def updatePacketInfo(self):
+        # Pull these globals in from the main thread
+        global n_rcvd, n_right, pktno
+
+        if(pktno > 0):
+            per = float(n_rcvd - n_right)/float(pktno)
+        else:
+            per = 0
+        self.gui.pktsRcvdEdit.setText(QtCore.QString("%1").arg(n_rcvd))
+        self.gui.pktsCorrectEdit.setText(QtCore.QString("%1").arg(n_right))
+        self.gui.perEdit.setText(QtCore.QString("%1").arg(per))
+
+
+
+# ////////////////////////////////////////////////////////////////////
+#        Define the GNU Radio Top Block
+# ////////////////////////////////////////////////////////////////////
+
+
+
+class my_top_block(gr.top_block):
+    def __init__(self, mod_class, demod_class, rx_callback, options):
+        gr.top_block.__init__(self)
+
+        self._sample_rate = options.sample_rate
+
+        channelon = True;
+
+        self.gui_on = options.gui
+
+        self._frequency_offset = options.frequency_offset
+        self._timing_offset = options.timing_offset
+        self._tx_amplitude = options.tx_amplitude
+        self._snr_dB = options.snr
+
+        self._noise_voltage = self.get_noise_voltage(self._snr_dB)
+
+        self.txpath = transmit_path(mod_class, options)
+        self.throttle = gr.throttle(gr.sizeof_gr_complex, self.sample_rate())
+        self.rxpath = receive_path(demod_class, rx_callback, options)
+
+        # FIXME: do better exposure to lower issues for control
+        self._timing_gain_alpha = self.rxpath.packet_receiver._demodulator._timing_alpha
+        self._timing_gain_beta = self.rxpath.packet_receiver._demodulator._timing_beta
+        self._freq_gain_alpha = self.rxpath.packet_receiver._demodulator._costas_alpha
+
+        if channelon:
+            self.channel = gr.channel_model(self._noise_voltage,
+                                            self.frequency_offset(),
+                                            self.timing_offset())
+            
+            if options.discontinuous:
+                z = 20000*[0,]
+                self.zeros = gr.vector_source_c(z, True)
+                packet_size = 5*((4+8+4+1500+4) * 8)
+                self.mux = gr.stream_mux(gr.sizeof_gr_complex, [packet_size-0, int(9e5)])
+
+                # Connect components
+                self.connect(self.txpath, self.throttle, (self.mux,0))
+                self.connect(self.zeros, (self.mux,1))
+                self.connect(self.mux, self.channel, self.rxpath)
+
+            else:
+                self.connect(self.txpath, self.throttle, self.channel, self.rxpath)
+
+            if self.gui_on:
+                self.qapp = QtGui.QApplication(sys.argv)
+                fftsize = 2048
+
+                self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
+                                           0, 1,
+                                           "Tx", True, True, False, True, True)
+                self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
+                                           0, 1,
+                                           "Rx", True, True, False, True, True)
+
+                self.snk_tx.set_frequency_axis(-80, 0)
+                self.snk_rx.set_frequency_axis(-60, 20)
+            
+                # Connect to the QT sinks
+                # FIXME: make better exposure to receiver from rxpath
+                self.freq_recov = self.rxpath.packet_receiver._demodulator.clock_recov
+                self.time_recov = self.rxpath.packet_receiver._demodulator.time_recov
+                self.freq_recov.set_alpha(self._freq_gain_alpha)
+                self.freq_recov.set_beta(0.25*self._freq_gain_alpha*self._freq_gain_alpha)
+                self.time_recov.set_alpha(self._timing_gain_alpha)
+                self.time_recov.set_beta(self._timing_gain_beta)
+                self.connect(self.channel, self.snk_tx)
+                self.connect(self.time_recov, self.snk_rx)
+
+                pyTxQt  = self.snk_tx.pyqwidget()
+                pyTx = sip.wrapinstance(pyTxQt, QtGui.QWidget)
+                 
+                pyRxQt  = self.snk_rx.pyqwidget()
+                pyRx = sip.wrapinstance(pyRxQt, QtGui.QWidget)
+
+                self.main_box = dialog_box(pyTx, pyRx, self)
+                self.main_box.show()
+                
+        else:
+            # Connect components
+            self.connect(self.txpath, self.throttle, self.rxpath)
+
+
+
+    # System Parameters
+    def sample_rate(self):
+        return self._sample_rate
+    
+    def set_sample_rate(self, sr):
+        self._sample_rate = sr
+        #self.throttle.set_samples_per_second(self._sample_rate)
+
+    # Channel Model Parameters
+    def snr(self):
+        return self._snr_dB
+    
+    def set_snr(self, snr):
+        self._snr_dB = snr
+        self._noise_voltage = self.get_noise_voltage(self._snr_dB)
+        self.channel.set_noise_voltage(self._noise_voltage)
+
+    def get_noise_voltage(self, SNR):
+        snr = 10.0**(SNR/10.0)        
+        power_in_signal = abs(self._tx_amplitude)**2
+        noise_power = power_in_signal/snr
+        noise_voltage = math.sqrt(noise_power)
+        return noise_voltage
+
+    def frequency_offset(self):
+        return self._frequency_offset * self.sample_rate()
+
+    def set_frequency_offset(self, fo):
+        self._frequency_offset = fo / self.sample_rate()
+        self.channel.set_frequency_offset(self._frequency_offset)
+
+    def timing_offset(self):
+        return self._timing_offset
+    
+    def set_timing_offset(self, to):
+        self._timing_offset = to
+        self.channel.set_timing_offset(self._timing_offset)
+
+
+    # Receiver Parameters
+    def rx_timing_gain_alpha(self):
+        return self._timing_gain_alpha
+
+    def rx_timing_gain_beta(self):
+        return self._timing_gain_beta
+    
+    def set_rx_timing_gain_alpha(self, gain):
+        self._timing_gain_alpha = gain
+        self.time_recov.set_alpha(self._timing_gain_alpha)
+
+    def set_rx_timing_gain_beta(self, gain):
+        self._timing_gain_beta = gain
+        self.time_recov.set_beta(self._timing_gain_beta)
+
+    def rx_freq_gain_alpha(self):
+        return self._freq_gain_alpha
+
+    def rx_freq_gain_beta(self):
+        return self._freq_gain_beta
+    
+    def set_rx_freq_gain_alpha(self, alpha):
+        self._freq_gain_alpha = alpha
+        self._freq_gain_beta = .25 * self._freq_gain_alpha * self._freq_gain_alpha
+        self.freq_recov.set_alpha(self._freq_gain_alpha)
+        self.freq_recov.set_beta(self._freq_gain_beta)
+
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#       Thread to handle the packet sending procedure
+#          Operates in parallel with qApp.exec_()       
+# /////////////////////////////////////////////////////////////////////////////
+
+
+
+class th_send(Thread):
+    def __init__(self, send_fnc, megs, sz):
+        Thread.__init__(self)
+        self.send = send_fnc
+        self.nbytes = int(1e6 * megs)
+        self.pkt_size = int(sz)
+
+    def run(self):
+        # generate and send packets
+        n = 0
+        pktno = 0
+        
+        while n < self.nbytes:
+            self.send(struct.pack('!H', pktno & 0xffff) +
+                      (self.pkt_size - 2) * chr(pktno & 0xff))
+            n += self.pkt_size
+            pktno += 1
+            
+        self.send(eof=True)
+
+    def stop(self):
+        self.nbytes = 0
+
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#                                   main
+# /////////////////////////////////////////////////////////////////////////////
+
+
+
+def main():
+
+    global n_rcvd, n_right, pktno
+
+    n_rcvd = 0
+    n_right = 0
+    pktno = 0
+    
+    def rx_callback(ok, payload):
+        global n_rcvd, n_right, pktno
+        (pktno,) = struct.unpack('!H', payload[0:2])
+        n_rcvd += 1
+        if ok:
+            n_right += 1
+
+        if not options.gui:
+            print "ok = %5s  pktno = %4d  n_rcvd = %4d  n_right = %4d" % (
+                ok, pktno, n_rcvd, n_right)
+        
+
+    def send_pkt(payload='', eof=False):
+        return tb.txpath.send_pkt(payload, eof)
+
+    mods = modulation_utils.type_1_mods()
+    demods = modulation_utils.type_1_demods()
+
+    parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
+    expert_grp = parser.add_option_group("Expert")
+    channel_grp = parser.add_option_group("Channel")
+
+    parser.add_option("-m", "--modulation", type="choice", choices=mods.keys(),
+                      default='dbpsk',
+                      help="Select modulation from: %s [default=%%default]"
+                            % (', '.join(mods.keys()),))
+
+    parser.add_option("-s", "--size", type="eng_float", default=1500,
+                      help="set packet size [default=%default]")
+    parser.add_option("-M", "--megabytes", type="eng_float", default=1.0,
+                      help="set megabytes to transmit [default=%default]")
+    parser.add_option("","--discontinuous", action="store_true", default=False,
+                      help="enable discontinous transmission (bursts of 5 packets)")
+    parser.add_option("-G", "--gui", action="store_true", default=False,
+                      help="Turn on the GUI [default=%default]")
+
+    channel_grp.add_option("", "--sample-rate", type="eng_float", default=1e5,
+                           help="set speed of channel/simulation rate to RATE [default=%default]") 
+    channel_grp.add_option("", "--snr", type="eng_float", default=30,
+                           help="set the SNR of the channel in dB [default=%default]")
+    channel_grp.add_option("", "--frequency-offset", type="eng_float", default=0,
+                           help="set frequency offset introduced by channel [default=%default]")
+    channel_grp.add_option("", "--timing-offset", type="eng_float", default=1.0,
+                           help="set timing offset introduced by channel [default=%default]")
+    channel_grp.add_option("", "--seed", action="store_true", default=False,
+                           help="use a random seed for AWGN noise [default=%default]")
+
+    transmit_path.add_options(parser, expert_grp)
+    receive_path.add_options(parser, expert_grp)
+
+    for mod in mods.values():
+        mod.add_options(expert_grp)
+    for demod in demods.values():
+        demod.add_options(expert_grp)
+
+    (options, args) = parser.parse_args ()
+
+    if len(args) != 0:
+        parser.print_help()
+        sys.exit(1)
+        
+    r = gr.enable_realtime_scheduling()
+    if r != gr.RT_OK:
+        print "Warning: failed to enable realtime scheduling"
+        
+    # Create an instance of a hierarchical block
+    tb = my_top_block(mods[options.modulation],
+                      demods[options.modulation],
+                      rx_callback, options)
+    tb.start()
+
+    packet_sender = th_send(send_pkt, options.megabytes, options.size)
+    packet_sender.start()
+
+    if(options.gui):
+        tb.qapp.exec_()
+        packet_sender.stop()
+    else:
+        # Process until done; hack in to the join to stop on an interrupt
+        while(packet_sender.isAlive()):
+            try:
+                packet_sender.join(1)
+            except KeyboardInterrupt:
+                packet_sender.stop()
+        
+    
+if __name__ == '__main__':
+    try:
+        main()
+    except KeyboardInterrupt:
+        pass
index e3feb57c932e26834c849f0c0b8d2dc8bb5f0d49..6e0f25212ea3c35f68f3bf75524694af6db75a14 100644 (file)
@@ -2,8 +2,8 @@
 
 # Form implementation generated from reading ui file 'qt_digital_window.ui'
 #
-# Created: Fri Jul  3 10:03:54 2009
-#      by: PyQt4 UI code generator 4.4.3
+# Created: Tue Oct  6 11:27:37 2009
+#      by: PyQt4 UI code generator 4.4.4
 #
 # WARNING! All changes made in this file will be lost!
 
@@ -12,53 +12,63 @@ from PyQt4 import QtCore, QtGui
 class Ui_DigitalWindow(object):
     def setupUi(self, DigitalWindow):
         DigitalWindow.setObjectName("DigitalWindow")
-        DigitalWindow.resize(1050, 752)
+        DigitalWindow.resize(1019, 754)
         self.centralwidget = QtGui.QWidget(DigitalWindow)
         self.centralwidget.setObjectName("centralwidget")
         self.gridLayout = QtGui.QGridLayout(self.centralwidget)
         self.gridLayout.setObjectName("gridLayout")
-        self.verticalLayout_2 = QtGui.QVBoxLayout()
-        self.verticalLayout_2.setObjectName("verticalLayout_2")
-        self.sysBox = QtGui.QGroupBox(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
-        self.sysBox.setSizePolicy(sizePolicy)
-        self.sysBox.setMinimumSize(QtCore.QSize(240, 60))
-        self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215))
-        self.sysBox.setObjectName("sysBox")
-        self.formLayoutWidget = QtGui.QWidget(self.sysBox)
-        self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 221, 31))
-        self.formLayoutWidget.setObjectName("formLayoutWidget")
-        self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
-        self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
-        self.formLayout.setVerticalSpacing(20)
-        self.formLayout.setObjectName("formLayout")
-        self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
-        sizePolicy.setHorizontalStretch(0)
-        sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth())
-        self.sampleRateEdit.setSizePolicy(sizePolicy)
-        self.sampleRateEdit.setMinimumSize(QtCore.QSize(100, 26))
-        self.sampleRateEdit.setMaximumSize(QtCore.QSize(100, 26))
-        self.sampleRateEdit.setObjectName("sampleRateEdit")
-        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
-        self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget)
+        self.verticalLayout_3 = QtGui.QVBoxLayout()
+        self.verticalLayout_3.setObjectName("verticalLayout_3")
+        self.rxBox = QtGui.QGroupBox(self.centralwidget)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth())
-        self.sampleRateLabel.setSizePolicy(sizePolicy)
-        self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20))
-        self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20))
-        self.sampleRateLabel.setObjectName("sampleRateLabel")
-        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
-        self.verticalLayout_2.addWidget(self.sysBox)
-        spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
-        self.verticalLayout_2.addItem(spacerItem)
-        self.gridLayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1)
+        sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
+        self.rxBox.setSizePolicy(sizePolicy)
+        self.rxBox.setMinimumSize(QtCore.QSize(180, 90))
+        self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215))
+        self.rxBox.setObjectName("rxBox")
+        self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox)
+        self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 20, 141, 61))
+        self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
+        self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3)
+        self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+        self.formLayout_3.setObjectName("formLayout_3")
+        self.gainMuLabel = QtGui.QLabel(self.formLayoutWidget_3)
+        self.gainMuLabel.setObjectName("gainMuLabel")
+        self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainMuLabel)
+        self.alphaLabel = QtGui.QLabel(self.formLayoutWidget_3)
+        self.alphaLabel.setObjectName("alphaLabel")
+        self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.alphaLabel)
+        self.gainMuEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+        self.gainMuEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.gainMuEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.gainMuEdit.setObjectName("gainMuEdit")
+        self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainMuEdit)
+        self.alphaEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+        self.alphaEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.alphaEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.alphaEdit.setObjectName("alphaEdit")
+        self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.alphaEdit)
+        self.verticalLayout_3.addWidget(self.rxBox)
+        spacerItem = QtGui.QSpacerItem(20, 30, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+        self.verticalLayout_3.addItem(spacerItem)
+        self.gridLayout.addLayout(self.verticalLayout_3, 2, 2, 1, 1)
+        self.verticalLayout = QtGui.QVBoxLayout()
+        self.verticalLayout.setObjectName("verticalLayout")
+        self.pauseButton = QtGui.QPushButton(self.centralwidget)
+        self.pauseButton.setMinimumSize(QtCore.QSize(80, 0))
+        self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.pauseButton.setObjectName("pauseButton")
+        self.verticalLayout.addWidget(self.pauseButton)
+        spacerItem1 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+        self.verticalLayout.addItem(spacerItem1)
+        self.closeButton = QtGui.QPushButton(self.centralwidget)
+        self.closeButton.setMinimumSize(QtCore.QSize(80, 0))
+        self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.closeButton.setObjectName("closeButton")
+        self.verticalLayout.addWidget(self.closeButton)
+        self.gridLayout.addLayout(self.verticalLayout, 2, 5, 1, 1)
         self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
@@ -69,7 +79,7 @@ class Ui_DigitalWindow(object):
         self.channelModeBox.setMaximumSize(QtCore.QSize(245, 16777215))
         self.channelModeBox.setObjectName("channelModeBox")
         self.formLayoutWidget_2 = QtGui.QWidget(self.channelModeBox)
-        self.formLayoutWidget_2.setGeometry(QtCore.QRect(10, 20, 231, 98))
+        self.formLayoutWidget_2.setGeometry(QtCore.QRect(10, 20, 221, 98))
         self.formLayoutWidget_2.setObjectName("formLayoutWidget_2")
         self.formLayout_2 = QtGui.QFormLayout(self.formLayoutWidget_2)
         self.formLayout_2.setSizeConstraint(QtGui.QLayout.SetFixedSize)
@@ -79,83 +89,69 @@ class Ui_DigitalWindow(object):
         self.snrLabel.setObjectName("snrLabel")
         self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.snrLabel)
         self.snrEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
-        self.snrEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.snrEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.snrEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.snrEdit.setMaximumSize(QtCore.QSize(80, 16777215))
         self.snrEdit.setObjectName("snrEdit")
         self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.snrEdit)
         self.freqLabel = QtGui.QLabel(self.formLayoutWidget_2)
         self.freqLabel.setObjectName("freqLabel")
         self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.freqLabel)
         self.freqEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
-        self.freqEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.freqEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.freqEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.freqEdit.setMaximumSize(QtCore.QSize(80, 16777215))
         self.freqEdit.setObjectName("freqEdit")
         self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.freqEdit)
         self.timeLabel = QtGui.QLabel(self.formLayoutWidget_2)
         self.timeLabel.setObjectName("timeLabel")
         self.formLayout_2.setWidget(2, QtGui.QFormLayout.LabelRole, self.timeLabel)
         self.timeEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
-        self.timeEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.timeEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.timeEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.timeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
         self.timeEdit.setObjectName("timeEdit")
         self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.timeEdit)
         self.gridLayout.addWidget(self.channelModeBox, 2, 1, 1, 1)
-        self.verticalLayout_5 = QtGui.QVBoxLayout()
-        self.verticalLayout_5.setObjectName("verticalLayout_5")
-        self.sinkFrame = QtGui.QFrame(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+        self.verticalLayout_2 = QtGui.QVBoxLayout()
+        self.verticalLayout_2.setObjectName("verticalLayout_2")
+        self.sysBox = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
-        self.sinkFrame.setSizePolicy(sizePolicy)
-        self.sinkFrame.setMinimumSize(QtCore.QSize(1000, 550))
-        self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
-        self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
-        self.sinkFrame.setObjectName("sinkFrame")
-        self.gridLayout_2 = QtGui.QGridLayout(self.sinkFrame)
-        self.gridLayout_2.setObjectName("gridLayout_2")
-        self.sinkLayout = QtGui.QHBoxLayout()
-        self.sinkLayout.setObjectName("sinkLayout")
-        self.gridLayout_2.addLayout(self.sinkLayout, 1, 0, 1, 1)
-        self.verticalLayout_5.addWidget(self.sinkFrame)
-        self.gridLayout.addLayout(self.verticalLayout_5, 0, 0, 1, 6)
-        self.verticalLayout_3 = QtGui.QVBoxLayout()
-        self.verticalLayout_3.setObjectName("verticalLayout_3")
-        self.rxBox = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
+        self.sysBox.setSizePolicy(sizePolicy)
+        self.sysBox.setMinimumSize(QtCore.QSize(240, 60))
+        self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215))
+        self.sysBox.setObjectName("sysBox")
+        self.formLayoutWidget = QtGui.QWidget(self.sysBox)
+        self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31))
+        self.formLayoutWidget.setObjectName("formLayoutWidget")
+        self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
+        self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+        self.formLayout.setVerticalSpacing(20)
+        self.formLayout.setObjectName("formLayout")
+        self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
-        sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
-        self.rxBox.setSizePolicy(sizePolicy)
-        self.rxBox.setMinimumSize(QtCore.QSize(180, 90))
-        self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215))
-        self.rxBox.setObjectName("rxBox")
-        self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox)
-        self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 20, 161, 61))
-        self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
-        self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3)
-        self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
-        self.formLayout_3.setObjectName("formLayout_3")
-        self.gainMuLabel = QtGui.QLabel(self.formLayoutWidget_3)
-        self.gainMuLabel.setObjectName("gainMuLabel")
-        self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainMuLabel)
-        self.alphaLabel = QtGui.QLabel(self.formLayoutWidget_3)
-        self.alphaLabel.setObjectName("alphaLabel")
-        self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.alphaLabel)
-        self.gainMuEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
-        self.gainMuEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.gainMuEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.gainMuEdit.setObjectName("gainMuEdit")
-        self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainMuEdit)
-        self.alphaEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
-        self.alphaEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.alphaEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.alphaEdit.setObjectName("alphaEdit")
-        self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.alphaEdit)
-        self.verticalLayout_3.addWidget(self.rxBox)
-        spacerItem1 = QtGui.QSpacerItem(20, 30, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
-        self.verticalLayout_3.addItem(spacerItem1)
-        self.gridLayout.addLayout(self.verticalLayout_3, 2, 2, 1, 1)
+        sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth())
+        self.sampleRateEdit.setSizePolicy(sizePolicy)
+        self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26))
+        self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26))
+        self.sampleRateEdit.setObjectName("sampleRateEdit")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
+        self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth())
+        self.sampleRateLabel.setSizePolicy(sizePolicy)
+        self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20))
+        self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20))
+        self.sampleRateLabel.setObjectName("sampleRateLabel")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
+        self.verticalLayout_2.addWidget(self.sysBox)
+        spacerItem2 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+        self.verticalLayout_2.addItem(spacerItem2)
+        self.gridLayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1)
         self.rxBox_2 = QtGui.QGroupBox(self.centralwidget)
         sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
@@ -166,7 +162,7 @@ class Ui_DigitalWindow(object):
         self.rxBox_2.setMaximumSize(QtCore.QSize(265, 125))
         self.rxBox_2.setObjectName("rxBox_2")
         self.formLayoutWidget_4 = QtGui.QWidget(self.rxBox_2)
-        self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 201, 92))
+        self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 181, 92))
         self.formLayoutWidget_4.setObjectName("formLayoutWidget_4")
         self.formLayout_4 = QtGui.QFormLayout(self.formLayoutWidget_4)
         self.formLayout_4.setSizeConstraint(QtGui.QLayout.SetFixedSize)
@@ -181,41 +177,45 @@ class Ui_DigitalWindow(object):
         self.perLabel.setObjectName("perLabel")
         self.formLayout_4.setWidget(2, QtGui.QFormLayout.LabelRole, self.perLabel)
         self.pktsRcvdEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
-        self.pktsRcvdEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.pktsRcvdEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.pktsRcvdEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.pktsRcvdEdit.setMaximumSize(QtCore.QSize(80, 16777215))
         self.pktsRcvdEdit.setObjectName("pktsRcvdEdit")
         self.formLayout_4.setWidget(0, QtGui.QFormLayout.FieldRole, self.pktsRcvdEdit)
         self.pktsCorrectEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
-        self.pktsCorrectEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.pktsCorrectEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.pktsCorrectEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.pktsCorrectEdit.setMaximumSize(QtCore.QSize(80, 16777215))
         self.pktsCorrectEdit.setObjectName("pktsCorrectEdit")
         self.formLayout_4.setWidget(1, QtGui.QFormLayout.FieldRole, self.pktsCorrectEdit)
         self.perEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
-        self.perEdit.setMinimumSize(QtCore.QSize(100, 0))
-        self.perEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.perEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.perEdit.setMaximumSize(QtCore.QSize(80, 16777215))
         self.perEdit.setObjectName("perEdit")
         self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.perEdit)
         self.gridLayout.addWidget(self.rxBox_2, 2, 3, 1, 1)
-        spacerItem2 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
-        self.gridLayout.addItem(spacerItem2, 2, 4, 1, 1)
-        self.verticalLayout = QtGui.QVBoxLayout()
-        self.verticalLayout.setObjectName("verticalLayout")
-        self.pauseButton = QtGui.QPushButton(self.centralwidget)
-        self.pauseButton.setMinimumSize(QtCore.QSize(80, 0))
-        self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
-        self.pauseButton.setObjectName("pauseButton")
-        self.verticalLayout.addWidget(self.pauseButton)
-        spacerItem3 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
-        self.verticalLayout.addItem(spacerItem3)
-        self.closeButton = QtGui.QPushButton(self.centralwidget)
-        self.closeButton.setMinimumSize(QtCore.QSize(80, 0))
-        self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
-        self.closeButton.setObjectName("closeButton")
-        self.verticalLayout.addWidget(self.closeButton)
-        self.gridLayout.addLayout(self.verticalLayout, 2, 5, 1, 1)
+        spacerItem3 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        self.gridLayout.addItem(spacerItem3, 2, 4, 1, 1)
+        self.verticalLayout_5 = QtGui.QVBoxLayout()
+        self.verticalLayout_5.setObjectName("verticalLayout_5")
+        self.sinkFrame = QtGui.QFrame(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
+        self.sinkFrame.setSizePolicy(sizePolicy)
+        self.sinkFrame.setMinimumSize(QtCore.QSize(500, 550))
+        self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
+        self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
+        self.sinkFrame.setObjectName("sinkFrame")
+        self.gridLayout_2 = QtGui.QGridLayout(self.sinkFrame)
+        self.gridLayout_2.setObjectName("gridLayout_2")
+        self.sinkLayout = QtGui.QHBoxLayout()
+        self.sinkLayout.setObjectName("sinkLayout")
+        self.gridLayout_2.addLayout(self.sinkLayout, 1, 0, 1, 1)
+        self.verticalLayout_5.addWidget(self.sinkFrame)
+        self.gridLayout.addLayout(self.verticalLayout_5, 0, 0, 1, 6)
         DigitalWindow.setCentralWidget(self.centralwidget)
         self.menubar = QtGui.QMenuBar(DigitalWindow)
-        self.menubar.setGeometry(QtCore.QRect(0, 0, 1050, 24))
+        self.menubar.setGeometry(QtCore.QRect(0, 0, 1019, 25))
         self.menubar.setObjectName("menubar")
         self.menuFile = QtGui.QMenu(self.menubar)
         self.menuFile.setObjectName("menuFile")
@@ -237,21 +237,21 @@ class Ui_DigitalWindow(object):
 
     def retranslateUi(self, DigitalWindow):
         DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
-        self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
-        self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
+        self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
+        self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
+        self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
+        self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
+        self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
         self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8))
         self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8))
         self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8))
         self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8))
-        self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
-        self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
-        self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
+        self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
+        self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
         self.rxBox_2.setTitle(QtGui.QApplication.translate("DigitalWindow", "Received Packet Info", None, QtGui.QApplication.UnicodeUTF8))
         self.pktsRcvdLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Rcvd.", None, QtGui.QApplication.UnicodeUTF8))
         self.pktsCorrectLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Correct", None, QtGui.QApplication.UnicodeUTF8))
         self.perLabel.setText(QtGui.QApplication.translate("DigitalWindow", "PER", None, QtGui.QApplication.UnicodeUTF8))
-        self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
-        self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
         self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
         self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
 
index 413801ec7108324b4ab8c19454b45322305dcbee..a0af196edc04e8a9e9b17f521fbc4fc72015b889 100644 (file)
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>DigitalWindow</class>
- <widget class="QMainWindow" name="DigitalWindow" >
-  <property name="geometry" >
+ <widget class="QMainWindow" name="DigitalWindow">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1050</width>
-    <height>752</height>
+    <width>1019</width>
+    <height>754</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>MainWindow</string>
   </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" name="gridLayout" >
-    <item row="2" column="0" >
-     <layout class="QVBoxLayout" name="verticalLayout_2" >
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="2" column="2">
+     <layout class="QVBoxLayout" name="verticalLayout_3">
       <item>
-       <widget class="QGroupBox" name="sysBox" >
-        <property name="sizePolicy" >
-         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <widget class="QGroupBox" name="rxBox">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="minimumSize" >
+        <property name="minimumSize">
          <size>
-          <width>240</width>
-          <height>60</height>
+          <width>180</width>
+          <height>90</height>
          </size>
         </property>
-        <property name="maximumSize" >
+        <property name="maximumSize">
          <size>
-          <width>240</width>
+          <width>180</width>
           <height>16777215</height>
          </size>
         </property>
-        <property name="title" >
-         <string>System Parameters</string>
+        <property name="title">
+         <string>Receiver Parameters</string>
         </property>
-        <widget class="QWidget" name="formLayoutWidget>
-         <property name="geometry" >
+        <widget class="QWidget" name="formLayoutWidget_3">
+         <property name="geometry">
           <rect>
            <x>10</x>
            <y>20</y>
-           <width>221</width>
-           <height>31</height>
+           <width>141</width>
+           <height>61</height>
           </rect>
          </property>
-         <layout class="QFormLayout" name="formLayout>
-          <property name="sizeConstraint" >
+         <layout class="QFormLayout" name="formLayout_3">
+          <property name="sizeConstraint">
            <enum>QLayout::SetFixedSize</enum>
           </property>
-          <property name="verticalSpacing" >
-           <number>20</number>
-          </property>
-          <item row="0" column="1" >
-           <widget class="QLineEdit" name="sampleRateEdit" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
+          <item row="0" column="0">
+           <widget class="QLabel" name="gainMuLabel">
+            <property name="text">
+             <string>Gain mu</string>
             </property>
-            <property name="minimumSize" >
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QLabel" name="alphaLabel">
+            <property name="text">
+             <string>Alpha</string>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="1">
+           <widget class="QLineEdit" name="gainMuEdit">
+            <property name="minimumSize">
              <size>
-              <width>100</width>
-              <height>26</height>
+              <width>60</width>
+              <height>0</height>
              </size>
             </property>
-            <property name="maximumSize" >
+            <property name="maximumSize">
              <size>
-              <width>100</width>
-              <height>26</height>
+              <width>80</width>
+              <height>16777215</height>
              </size>
             </property>
            </widget>
           </item>
-          <item row="0" column="0" >
-           <widget class="QLabel" name="sampleRateLabel" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="minimumSize" >
+          <item row="1" column="1">
+           <widget class="QLineEdit" name="alphaEdit">
+            <property name="minimumSize">
              <size>
-              <width>0</width>
-              <height>20</height>
+              <width>60</width>
+              <height>0</height>
              </size>
             </property>
-            <property name="maximumSize" >
+            <property name="maximumSize">
              <size>
-              <width>16777215</width>
-              <height>20</height>
+              <width>80</width>
+              <height>16777215</height>
              </size>
             </property>
-            <property name="text" >
-             <string>Sample Rate (sps)</string>
-            </property>
            </widget>
           </item>
          </layout>
        </widget>
       </item>
       <item>
-       <spacer name="verticalSpacer_2" >
-        <property name="orientation" >
+       <spacer name="verticalSpacer_4">
+        <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
-        <property name="sizeType" >
+        <property name="sizeType">
          <enum>QSizePolicy::Fixed</enum>
         </property>
-        <property name="sizeHint" stdset="0" >
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>20</width>
+          <height>30</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </item>
+    <item row="2" column="5">
+     <layout class="QVBoxLayout" name="verticalLayout">
+      <item>
+       <widget class="QPushButton" name="pauseButton">
+        <property name="minimumSize">
+         <size>
+          <width>80</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>80</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="text">
+         <string>Pause</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="verticalSpacer">
+        <property name="orientation">
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeType">
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
           <height>60</height>
         </property>
        </spacer>
       </item>
+      <item>
+       <widget class="QPushButton" name="closeButton">
+        <property name="minimumSize">
+         <size>
+          <width>80</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>80</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="text">
+         <string>Close</string>
+        </property>
+       </widget>
+      </item>
      </layout>
     </item>
-    <item row="2" column="1" >
-     <widget class="QGroupBox" name="channelModeBox" >
-      <property name="sizePolicy" >
-       <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+    <item row="2" column="1">
+     <widget class="QGroupBox" name="channelModeBox">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
-      <property name="minimumSize" >
+      <property name="minimumSize">
        <size>
         <width>245</width>
         <height>130</height>
        </size>
       </property>
-      <property name="maximumSize" >
+      <property name="maximumSize">
        <size>
         <width>245</width>
         <height>16777215</height>
        </size>
       </property>
-      <property name="title" >
+      <property name="title">
        <string>Channel Model Parameters</string>
       </property>
-      <widget class="QWidget" name="formLayoutWidget_2" >
-       <property name="geometry" >
+      <widget class="QWidget" name="formLayoutWidget_2">
+       <property name="geometry">
         <rect>
          <x>10</x>
          <y>20</y>
-         <width>231</width>
+         <width>221</width>
          <height>98</height>
         </rect>
        </property>
-       <layout class="QFormLayout" name="formLayout_2" >
-        <property name="sizeConstraint" >
+       <layout class="QFormLayout" name="formLayout_2">
+        <property name="sizeConstraint">
          <enum>QLayout::SetFixedSize</enum>
         </property>
-        <property name="fieldGrowthPolicy" >
+        <property name="fieldGrowthPolicy">
          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
         </property>
-        <item row="0" column="0" >
-         <widget class="QLabel" name="snrLabel" >
-          <property name="text" >
+        <item row="0" column="0">
+         <widget class="QLabel" name="snrLabel">
+          <property name="text">
            <string>SNR (dB)</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="1" >
-         <widget class="QLineEdit" name="snrEdit" >
-          <property name="minimumSize" >
+        <item row="0" column="1">
+         <widget class="QLineEdit" name="snrEdit">
+          <property name="minimumSize">
            <size>
-            <width>100</width>
+            <width>60</width>
             <height>0</height>
            </size>
           </property>
-          <property name="maximumSize" >
+          <property name="maximumSize">
            <size>
-            <width>100</width>
+            <width>80</width>
             <height>16777215</height>
            </size>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" >
-         <widget class="QLabel" name="freqLabel" >
-          <property name="text" >
+        <item row="1" column="0">
+         <widget class="QLabel" name="freqLabel">
+          <property name="text">
            <string>Frequency Offset (Hz)</string>
           </property>
          </widget>
         </item>
-        <item row="1" column="1" >
-         <widget class="QLineEdit" name="freqEdit" >
-          <property name="minimumSize" >
+        <item row="1" column="1">
+         <widget class="QLineEdit" name="freqEdit">
+          <property name="minimumSize">
            <size>
-            <width>100</width>
+            <width>60</width>
             <height>0</height>
            </size>
           </property>
-          <property name="maximumSize" >
+          <property name="maximumSize">
            <size>
-            <width>100</width>
+            <width>80</width>
             <height>16777215</height>
            </size>
           </property>
          </widget>
         </item>
-        <item row="2" column="0" >
-         <widget class="QLabel" name="timeLabel" >
-          <property name="text" >
+        <item row="2" column="0">
+         <widget class="QLabel" name="timeLabel">
+          <property name="text">
            <string>Timing Offset</string>
           </property>
          </widget>
         </item>
-        <item row="2" column="1" >
-         <widget class="QLineEdit" name="timeEdit" >
-          <property name="minimumSize" >
+        <item row="2" column="1">
+         <widget class="QLineEdit" name="timeEdit">
+          <property name="minimumSize">
            <size>
-            <width>100</width>
+            <width>60</width>
             <height>0</height>
            </size>
           </property>
-          <property name="maximumSize" >
+          <property name="maximumSize">
            <size>
-            <width>100</width>
+            <width>80</width>
             <height>16777215</height>
            </size>
           </property>
       </widget>
      </widget>
     </item>
-    <item row="0" column="0" colspan="6" >
-     <layout class="QVBoxLayout" name="verticalLayout_5" >
-      <item>
-       <widget class="QFrame" name="sinkFrame" >
-        <property name="sizePolicy" >
-         <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="minimumSize" >
-         <size>
-          <width>1000</width>
-          <height>550</height>
-         </size>
-        </property>
-        <property name="frameShape" >
-         <enum>QFrame::StyledPanel</enum>
-        </property>
-        <property name="frameShadow" >
-         <enum>QFrame::Raised</enum>
-        </property>
-        <layout class="QGridLayout" name="gridLayout_2" >
-         <item row="1" column="0" >
-          <layout class="QHBoxLayout" name="sinkLayout" />
-         </item>
-        </layout>
-        <zorder>verticalLayoutWidget</zorder>
-        <zorder>verticalLayoutWidget</zorder>
-       </widget>
-      </item>
-     </layout>
-    </item>
-    <item row="2" column="2" >
-     <layout class="QVBoxLayout" name="verticalLayout_3" >
+    <item row="2" column="0">
+     <layout class="QVBoxLayout" name="verticalLayout_2">
       <item>
-       <widget class="QGroupBox" name="rxBox" >
-        <property name="sizePolicy" >
-         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <widget class="QGroupBox" name="sysBox">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
-        <property name="minimumSize" >
+        <property name="minimumSize">
          <size>
-          <width>180</width>
-          <height>90</height>
+          <width>240</width>
+          <height>60</height>
          </size>
         </property>
-        <property name="maximumSize" >
+        <property name="maximumSize">
          <size>
-          <width>180</width>
+          <width>240</width>
           <height>16777215</height>
          </size>
         </property>
-        <property name="title" >
-         <string>Receiver Parameters</string>
+        <property name="title">
+         <string>System Parameters</string>
         </property>
-        <widget class="QWidget" name="formLayoutWidget_3" >
-         <property name="geometry" >
+        <widget class="QWidget" name="formLayoutWidget">
+         <property name="geometry">
           <rect>
            <x>10</x>
            <y>20</y>
-           <width>161</width>
-           <height>61</height>
+           <width>211</width>
+           <height>31</height>
           </rect>
          </property>
-         <layout class="QFormLayout" name="formLayout_3" >
-          <property name="sizeConstraint" >
+         <layout class="QFormLayout" name="formLayout">
+          <property name="sizeConstraint">
            <enum>QLayout::SetFixedSize</enum>
           </property>
-          <item row="0" column="0" >
-           <widget class="QLabel" name="gainMuLabel" >
-            <property name="text" >
-             <string>Gain mu</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0" >
-           <widget class="QLabel" name="alphaLabel" >
-            <property name="text" >
-             <string>Alpha</string>
+          <property name="verticalSpacing">
+           <number>20</number>
+          </property>
+          <item row="0" column="1">
+           <widget class="QLineEdit" name="sampleRateEdit">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
             </property>
-           </widget>
-          </item>
-          <item row="0" column="1" >
-           <widget class="QLineEdit" name="gainMuEdit" >
-            <property name="minimumSize" >
+            <property name="minimumSize">
              <size>
-              <width>100</width>
-              <height>0</height>
+              <width>60</width>
+              <height>26</height>
              </size>
             </property>
-            <property name="maximumSize" >
+            <property name="maximumSize">
              <size>
-              <width>100</width>
-              <height>16777215</height>
+              <width>80</width>
+              <height>26</height>
              </size>
             </property>
            </widget>
           </item>
-          <item row="1" column="1" >
-           <widget class="QLineEdit" name="alphaEdit" >
-            <property name="minimumSize" >
+          <item row="0" column="0">
+           <widget class="QLabel" name="sampleRateLabel">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
              <size>
-              <width>100</width>
-              <height>0</height>
+              <width>0</width>
+              <height>20</height>
              </size>
             </property>
-            <property name="maximumSize" >
+            <property name="maximumSize">
              <size>
-              <width>100</width>
-              <height>16777215</height>
+              <width>16777215</width>
+              <height>20</height>
              </size>
             </property>
+            <property name="text">
+             <string>Sample Rate (sps)</string>
+            </property>
            </widget>
           </item>
          </layout>
        </widget>
       </item>
       <item>
-       <spacer name="verticalSpacer_4" >
-        <property name="orientation" >
+       <spacer name="verticalSpacer_2">
+        <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
-        <property name="sizeType" >
+        <property name="sizeType">
          <enum>QSizePolicy::Fixed</enum>
         </property>
-        <property name="sizeHint" stdset="0" >
+        <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
-          <height>30</height>
+          <height>60</height>
          </size>
         </property>
        </spacer>
       </item>
      </layout>
     </item>
-    <item row="2" column="3" >
-     <widget class="QGroupBox" name="rxBox_2" >
-      <property name="sizePolicy" >
-       <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+    <item row="2" column="3">
+     <widget class="QGroupBox" name="rxBox_2">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
-      <property name="minimumSize" >
+      <property name="minimumSize">
        <size>
         <width>220</width>
         <height>125</height>
        </size>
       </property>
-      <property name="maximumSize" >
+      <property name="maximumSize">
        <size>
         <width>265</width>
         <height>125</height>
        </size>
       </property>
-      <property name="title" >
+      <property name="title">
        <string>Received Packet Info</string>
       </property>
-      <widget class="QWidget" name="formLayoutWidget_4" >
-       <property name="geometry" >
+      <widget class="QWidget" name="formLayoutWidget_4">
+       <property name="geometry">
         <rect>
          <x>10</x>
          <y>20</y>
-         <width>201</width>
+         <width>181</width>
          <height>92</height>
         </rect>
        </property>
-       <layout class="QFormLayout" name="formLayout_4" >
-        <property name="sizeConstraint" >
+       <layout class="QFormLayout" name="formLayout_4">
+        <property name="sizeConstraint">
          <enum>QLayout::SetFixedSize</enum>
         </property>
-        <item row="0" column="0" >
-         <widget class="QLabel" name="pktsRcvdLabel" >
-          <property name="text" >
+        <item row="0" column="0">
+         <widget class="QLabel" name="pktsRcvdLabel">
+          <property name="text">
            <string>Packets Rcvd.</string>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" >
-         <widget class="QLabel" name="pktsCorrectLabel" >
-          <property name="text" >
+        <item row="1" column="0">
+         <widget class="QLabel" name="pktsCorrectLabel">
+          <property name="text">
            <string>Packets Correct</string>
           </property>
          </widget>
         </item>
-        <item row="2" column="0" >
-         <widget class="QLabel" name="perLabel" >
-          <property name="text" >
+        <item row="2" column="0">
+         <widget class="QLabel" name="perLabel">
+          <property name="text">
            <string>PER</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="1" >
-         <widget class="QLineEdit" name="pktsRcvdEdit" >
-          <property name="minimumSize" >
+        <item row="0" column="1">
+         <widget class="QLineEdit" name="pktsRcvdEdit">
+          <property name="minimumSize">
            <size>
-            <width>100</width>
+            <width>60</width>
             <height>0</height>
            </size>
           </property>
-          <property name="maximumSize" >
+          <property name="maximumSize">
            <size>
-            <width>100</width>
+            <width>80</width>
             <height>16777215</height>
            </size>
           </property>
          </widget>
         </item>
-        <item row="1" column="1" >
-         <widget class="QLineEdit" name="pktsCorrectEdit" >
-          <property name="minimumSize" >
+        <item row="1" column="1">
+         <widget class="QLineEdit" name="pktsCorrectEdit">
+          <property name="minimumSize">
            <size>
-            <width>100</width>
+            <width>60</width>
             <height>0</height>
            </size>
           </property>
-          <property name="maximumSize" >
+          <property name="maximumSize">
            <size>
-            <width>100</width>
+            <width>80</width>
             <height>16777215</height>
            </size>
           </property>
          </widget>
         </item>
-        <item row="2" column="1" >
-         <widget class="QLineEdit" name="perEdit" >
-          <property name="minimumSize" >
+        <item row="2" column="1">
+         <widget class="QLineEdit" name="perEdit">
+          <property name="minimumSize">
            <size>
-            <width>100</width>
+            <width>60</width>
             <height>0</height>
            </size>
           </property>
-          <property name="maximumSize" >
+          <property name="maximumSize">
            <size>
-            <width>100</width>
+            <width>80</width>
             <height>16777215</height>
            </size>
           </property>
       </widget>
      </widget>
     </item>
-    <item row="2" column="4" >
-     <spacer name="horizontalSpacer" >
-      <property name="orientation" >
+    <item row="2" column="4">
+     <spacer name="horizontalSpacer">
+      <property name="orientation">
        <enum>Qt::Horizontal</enum>
       </property>
-      <property name="sizeHint" stdset="0" >
+      <property name="sizeHint" stdset="0">
        <size>
         <width>20</width>
         <height>20</height>
       </property>
      </spacer>
     </item>
-    <item row="2" column="5" >
-     <layout class="QVBoxLayout" name="verticalLayout>
+    <item row="0" column="0" colspan="6">
+     <layout class="QVBoxLayout" name="verticalLayout_5">
       <item>
-       <widget class="QPushButton" name="pauseButton" >
-        <property name="minimumSize" >
-         <size>
-          <width>80</width>
-          <height>0</height>
-         </size>
-        </property>
-        <property name="maximumSize" >
-         <size>
-          <width>80</width>
-          <height>16777215</height>
-         </size>
-        </property>
-        <property name="text" >
-         <string>Pause</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer name="verticalSpacer" >
-        <property name="orientation" >
-         <enum>Qt::Vertical</enum>
-        </property>
-        <property name="sizeType" >
-         <enum>QSizePolicy::Fixed</enum>
-        </property>
-        <property name="sizeHint" stdset="0" >
-         <size>
-          <width>20</width>
-          <height>60</height>
-         </size>
+       <widget class="QFrame" name="sinkFrame">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
         </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QPushButton" name="closeButton" >
-        <property name="minimumSize" >
+        <property name="minimumSize">
          <size>
-          <width>80</width>
-          <height>0</height>
+          <width>500</width>
+          <height>550</height>
          </size>
         </property>
-        <property name="maximumSize" >
-         <size>
-          <width>80</width>
-          <height>16777215</height>
-         </size>
+        <property name="frameShape">
+         <enum>QFrame::StyledPanel</enum>
         </property>
-        <property name="text" >
-         <string>Close</string>
+        <property name="frameShadow">
+         <enum>QFrame::Raised</enum>
         </property>
+        <layout class="QGridLayout" name="gridLayout_2">
+         <item row="1" column="0">
+          <layout class="QHBoxLayout" name="sinkLayout"/>
+         </item>
+        </layout>
        </widget>
       </item>
      </layout>
     </item>
    </layout>
-   <zorder>sinkFrame</zorder>
    <zorder>channelModeBox</zorder>
-   <zorder>verticalLayoutWidget</zorder>
-   <zorder>verticalLayoutWidget</zorder>
-   <zorder>rxBox</zorder>
    <zorder></zorder>
    <zorder>rxBox_2</zorder>
    <zorder>horizontalSpacer</zorder>
    <zorder></zorder>
   </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
-     <width>1050</width>
-     <height>24</height>
+     <width>1019</width>
+     <height>25</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menuFile" >
-    <property name="title" >
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
      <string>&amp;File</string>
     </property>
-    <addaction name="actionExit" />
+    <addaction name="actionExit"/>
    </widget>
-   <addaction name="menuFile" />
+   <addaction name="menuFile"/>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <action name="actionExit" >
-   <property name="text" >
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="actionExit">
+   <property name="text">
     <string>E&amp;xit</string>
    </property>
   </action>
    <receiver>DigitalWindow</receiver>
    <slot>close()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>322</x>
      <y>623</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>66</x>
      <y>561</y>
     </hint>
    <receiver>DigitalWindow</receiver>
    <slot>close()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>-1</x>
      <y>-1</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>617</x>
      <y>327</y>
     </hint>
diff --git a/gnuradio-examples/python/digital/qt_digital_window2.py b/gnuradio-examples/python/digital/qt_digital_window2.py
new file mode 100644 (file)
index 0000000..f111e37
--- /dev/null
@@ -0,0 +1,261 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'qt_digital_window.ui'
+#
+# Created: Mon Oct 12 12:10:54 2009
+#      by: PyQt4 UI code generator 4.4.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_DigitalWindow(object):
+    def setupUi(self, DigitalWindow):
+        DigitalWindow.setObjectName("DigitalWindow")
+        DigitalWindow.resize(1019, 754)
+        self.centralwidget = QtGui.QWidget(DigitalWindow)
+        self.centralwidget.setObjectName("centralwidget")
+        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
+        self.gridLayout.setObjectName("gridLayout")
+        self.verticalLayout_2 = QtGui.QVBoxLayout()
+        self.verticalLayout_2.setObjectName("verticalLayout_2")
+        self.sysBox = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
+        self.sysBox.setSizePolicy(sizePolicy)
+        self.sysBox.setMinimumSize(QtCore.QSize(240, 60))
+        self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215))
+        self.sysBox.setObjectName("sysBox")
+        self.formLayoutWidget = QtGui.QWidget(self.sysBox)
+        self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31))
+        self.formLayoutWidget.setObjectName("formLayoutWidget")
+        self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
+        self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+        self.formLayout.setVerticalSpacing(20)
+        self.formLayout.setObjectName("formLayout")
+        self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth())
+        self.sampleRateEdit.setSizePolicy(sizePolicy)
+        self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26))
+        self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26))
+        self.sampleRateEdit.setObjectName("sampleRateEdit")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
+        self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth())
+        self.sampleRateLabel.setSizePolicy(sizePolicy)
+        self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20))
+        self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20))
+        self.sampleRateLabel.setObjectName("sampleRateLabel")
+        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
+        self.verticalLayout_2.addWidget(self.sysBox)
+        spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+        self.verticalLayout_2.addItem(spacerItem)
+        self.gridLayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1)
+        self.verticalLayout_5 = QtGui.QVBoxLayout()
+        self.verticalLayout_5.setObjectName("verticalLayout_5")
+        self.sinkFrame = QtGui.QFrame(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
+        self.sinkFrame.setSizePolicy(sizePolicy)
+        self.sinkFrame.setMinimumSize(QtCore.QSize(500, 550))
+        self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
+        self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
+        self.sinkFrame.setObjectName("sinkFrame")
+        self.gridLayout_2 = QtGui.QGridLayout(self.sinkFrame)
+        self.gridLayout_2.setObjectName("gridLayout_2")
+        self.sinkLayout = QtGui.QHBoxLayout()
+        self.sinkLayout.setObjectName("sinkLayout")
+        self.gridLayout_2.addLayout(self.sinkLayout, 1, 0, 1, 1)
+        self.verticalLayout_5.addWidget(self.sinkFrame)
+        self.gridLayout.addLayout(self.verticalLayout_5, 0, 0, 1, 6)
+        self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.channelModeBox.sizePolicy().hasHeightForWidth())
+        self.channelModeBox.setSizePolicy(sizePolicy)
+        self.channelModeBox.setMinimumSize(QtCore.QSize(245, 130))
+        self.channelModeBox.setMaximumSize(QtCore.QSize(245, 16777215))
+        self.channelModeBox.setObjectName("channelModeBox")
+        self.formLayoutWidget_2 = QtGui.QWidget(self.channelModeBox)
+        self.formLayoutWidget_2.setGeometry(QtCore.QRect(10, 20, 221, 98))
+        self.formLayoutWidget_2.setObjectName("formLayoutWidget_2")
+        self.formLayout_2 = QtGui.QFormLayout(self.formLayoutWidget_2)
+        self.formLayout_2.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+        self.formLayout_2.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
+        self.formLayout_2.setObjectName("formLayout_2")
+        self.snrLabel = QtGui.QLabel(self.formLayoutWidget_2)
+        self.snrLabel.setObjectName("snrLabel")
+        self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.snrLabel)
+        self.snrEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
+        self.snrEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.snrEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.snrEdit.setObjectName("snrEdit")
+        self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.snrEdit)
+        self.freqLabel = QtGui.QLabel(self.formLayoutWidget_2)
+        self.freqLabel.setObjectName("freqLabel")
+        self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.freqLabel)
+        self.freqEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
+        self.freqEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.freqEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.freqEdit.setObjectName("freqEdit")
+        self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.freqEdit)
+        self.timeLabel = QtGui.QLabel(self.formLayoutWidget_2)
+        self.timeLabel.setObjectName("timeLabel")
+        self.formLayout_2.setWidget(2, QtGui.QFormLayout.LabelRole, self.timeLabel)
+        self.timeEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
+        self.timeEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.timeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.timeEdit.setObjectName("timeEdit")
+        self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.timeEdit)
+        self.gridLayout.addWidget(self.channelModeBox, 2, 1, 1, 1)
+        self.rxBox_2 = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.rxBox_2.sizePolicy().hasHeightForWidth())
+        self.rxBox_2.setSizePolicy(sizePolicy)
+        self.rxBox_2.setMinimumSize(QtCore.QSize(220, 125))
+        self.rxBox_2.setMaximumSize(QtCore.QSize(265, 125))
+        self.rxBox_2.setObjectName("rxBox_2")
+        self.formLayoutWidget_4 = QtGui.QWidget(self.rxBox_2)
+        self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 248, 188))
+        self.formLayoutWidget_4.setObjectName("formLayoutWidget_4")
+        self.formLayout_4 = QtGui.QFormLayout(self.formLayoutWidget_4)
+        self.formLayout_4.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+        self.formLayout_4.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
+        self.formLayout_4.setObjectName("formLayout_4")
+        self.pktsRcvdLabel = QtGui.QLabel(self.formLayoutWidget_4)
+        self.pktsRcvdLabel.setObjectName("pktsRcvdLabel")
+        self.formLayout_4.setWidget(0, QtGui.QFormLayout.LabelRole, self.pktsRcvdLabel)
+        self.pktsRcvdEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
+        self.pktsRcvdEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.pktsRcvdEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.pktsRcvdEdit.setObjectName("pktsRcvdEdit")
+        self.formLayout_4.setWidget(0, QtGui.QFormLayout.FieldRole, self.pktsRcvdEdit)
+        self.pktsCorrectLabel = QtGui.QLabel(self.formLayoutWidget_4)
+        self.pktsCorrectLabel.setObjectName("pktsCorrectLabel")
+        self.formLayout_4.setWidget(1, QtGui.QFormLayout.LabelRole, self.pktsCorrectLabel)
+        self.pktsCorrectEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
+        self.pktsCorrectEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.pktsCorrectEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.pktsCorrectEdit.setObjectName("pktsCorrectEdit")
+        self.formLayout_4.setWidget(1, QtGui.QFormLayout.FieldRole, self.pktsCorrectEdit)
+        self.perLabel = QtGui.QLabel(self.formLayoutWidget_4)
+        self.perLabel.setObjectName("perLabel")
+        self.formLayout_4.setWidget(2, QtGui.QFormLayout.LabelRole, self.perLabel)
+        self.perEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
+        self.perEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.perEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.perEdit.setObjectName("perEdit")
+        self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.perEdit)
+        self.gridLayout.addWidget(self.rxBox_2, 2, 3, 1, 1)
+        spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        self.gridLayout.addItem(spacerItem1, 2, 4, 1, 1)
+        self.verticalLayout = QtGui.QVBoxLayout()
+        self.verticalLayout.setObjectName("verticalLayout")
+        self.pauseButton = QtGui.QPushButton(self.centralwidget)
+        self.pauseButton.setMinimumSize(QtCore.QSize(80, 0))
+        self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.pauseButton.setObjectName("pauseButton")
+        self.verticalLayout.addWidget(self.pauseButton)
+        spacerItem2 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+        self.verticalLayout.addItem(spacerItem2)
+        self.closeButton = QtGui.QPushButton(self.centralwidget)
+        self.closeButton.setMinimumSize(QtCore.QSize(80, 0))
+        self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.closeButton.setObjectName("closeButton")
+        self.verticalLayout.addWidget(self.closeButton)
+        self.gridLayout.addLayout(self.verticalLayout, 2, 5, 1, 1)
+        self.rxBox = QtGui.QGroupBox(self.centralwidget)
+        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        sizePolicy.setHorizontalStretch(0)
+        sizePolicy.setVerticalStretch(0)
+        sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
+        self.rxBox.setSizePolicy(sizePolicy)
+        self.rxBox.setMinimumSize(QtCore.QSize(180, 120))
+        self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215))
+        self.rxBox.setObjectName("rxBox")
+        self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox)
+        self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 10, 161, 101))
+        self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
+        self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3)
+        self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+        self.formLayout_3.setObjectName("formLayout_3")
+        self.alphaTimeLabel = QtGui.QLabel(self.formLayoutWidget_3)
+        self.alphaTimeLabel.setObjectName("alphaTimeLabel")
+        self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.alphaTimeLabel)
+        self.alphaFreqLabel = QtGui.QLabel(self.formLayoutWidget_3)
+        self.alphaFreqLabel.setObjectName("alphaFreqLabel")
+        self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.alphaFreqLabel)
+        self.alphaTimeEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+        self.alphaTimeEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.alphaTimeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.alphaTimeEdit.setObjectName("alphaTimeEdit")
+        self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.alphaTimeEdit)
+        self.alphaFreqEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+        self.alphaFreqEdit.setMinimumSize(QtCore.QSize(60, 0))
+        self.alphaFreqEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.alphaFreqEdit.setObjectName("alphaFreqEdit")
+        self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.alphaFreqEdit)
+        self.betaTimeEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+        self.betaTimeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.betaTimeEdit.setObjectName("betaTimeEdit")
+        self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.betaTimeEdit)
+        self.betaTimeLabel = QtGui.QLabel(self.formLayoutWidget_3)
+        self.betaTimeLabel.setObjectName("betaTimeLabel")
+        self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.betaTimeLabel)
+        self.gridLayout.addWidget(self.rxBox, 2, 2, 1, 1)
+        DigitalWindow.setCentralWidget(self.centralwidget)
+        self.menubar = QtGui.QMenuBar(DigitalWindow)
+        self.menubar.setGeometry(QtCore.QRect(0, 0, 1019, 24))
+        self.menubar.setObjectName("menubar")
+        self.menuFile = QtGui.QMenu(self.menubar)
+        self.menuFile.setObjectName("menuFile")
+        DigitalWindow.setMenuBar(self.menubar)
+        self.statusbar = QtGui.QStatusBar(DigitalWindow)
+        self.statusbar.setObjectName("statusbar")
+        DigitalWindow.setStatusBar(self.statusbar)
+        self.actionExit = QtGui.QAction(DigitalWindow)
+        self.actionExit.setObjectName("actionExit")
+        self.menuFile.addAction(self.actionExit)
+        self.menubar.addAction(self.menuFile.menuAction())
+
+        self.retranslateUi(DigitalWindow)
+        QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), DigitalWindow.close)
+        QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), DigitalWindow.close)
+        QtCore.QMetaObject.connectSlotsByName(DigitalWindow)
+        DigitalWindow.setTabOrder(self.snrEdit, self.freqEdit)
+        DigitalWindow.setTabOrder(self.freqEdit, self.timeEdit)
+
+    def retranslateUi(self, DigitalWindow):
+        DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
+        self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
+        self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
+        self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8))
+        self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8))
+        self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8))
+        self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8))
+        self.rxBox_2.setTitle(QtGui.QApplication.translate("DigitalWindow", "Received Packet Info", None, QtGui.QApplication.UnicodeUTF8))
+        self.pktsRcvdLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Rcvd.", None, QtGui.QApplication.UnicodeUTF8))
+        self.pktsCorrectLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Correct", None, QtGui.QApplication.UnicodeUTF8))
+        self.perLabel.setText(QtGui.QApplication.translate("DigitalWindow", "PER", None, QtGui.QApplication.UnicodeUTF8))
+        self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
+        self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
+        self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
+        self.alphaTimeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha: time", None, QtGui.QApplication.UnicodeUTF8))
+        self.alphaFreqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha: freq", None, QtGui.QApplication.UnicodeUTF8))
+        self.betaTimeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Beta: time", None, QtGui.QApplication.UnicodeUTF8))
+        self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
+        self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
+
diff --git a/gnuradio-examples/python/digital/qt_digital_window2.ui b/gnuradio-examples/python/digital/qt_digital_window2.ui
new file mode 100644 (file)
index 0000000..dc20ed7
--- /dev/null
@@ -0,0 +1,637 @@
+<ui version="4.0" >
+ <class>DigitalWindow</class>
+ <widget class="QMainWindow" name="DigitalWindow" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1019</width>
+    <height>754</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget" >
+   <layout class="QGridLayout" name="gridLayout" >
+    <item row="2" column="0" >
+     <layout class="QVBoxLayout" name="verticalLayout_2" >
+      <item>
+       <widget class="QGroupBox" name="sysBox" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize" >
+         <size>
+          <width>240</width>
+          <height>60</height>
+         </size>
+        </property>
+        <property name="maximumSize" >
+         <size>
+          <width>240</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="title" >
+         <string>System Parameters</string>
+        </property>
+        <widget class="QWidget" name="formLayoutWidget" >
+         <property name="geometry" >
+          <rect>
+           <x>10</x>
+           <y>20</y>
+           <width>211</width>
+           <height>31</height>
+          </rect>
+         </property>
+         <layout class="QFormLayout" name="formLayout" >
+          <property name="sizeConstraint" >
+           <enum>QLayout::SetFixedSize</enum>
+          </property>
+          <property name="verticalSpacing" >
+           <number>20</number>
+          </property>
+          <item row="0" column="1" >
+           <widget class="QLineEdit" name="sampleRateEdit" >
+            <property name="sizePolicy" >
+             <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize" >
+             <size>
+              <width>60</width>
+              <height>26</height>
+             </size>
+            </property>
+            <property name="maximumSize" >
+             <size>
+              <width>80</width>
+              <height>26</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+          <item row="0" column="0" >
+           <widget class="QLabel" name="sampleRateLabel" >
+            <property name="sizePolicy" >
+             <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize" >
+             <size>
+              <width>0</width>
+              <height>20</height>
+             </size>
+            </property>
+            <property name="maximumSize" >
+             <size>
+              <width>16777215</width>
+              <height>20</height>
+             </size>
+            </property>
+            <property name="text" >
+             <string>Sample Rate (sps)</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </widget>
+      </item>
+      <item>
+       <spacer name="verticalSpacer_2" >
+        <property name="orientation" >
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeType" >
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>20</width>
+          <height>60</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+     </layout>
+    </item>
+    <item row="0" column="0" colspan="6" >
+     <layout class="QVBoxLayout" name="verticalLayout_5" >
+      <item>
+       <widget class="QFrame" name="sinkFrame" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize" >
+         <size>
+          <width>500</width>
+          <height>550</height>
+         </size>
+        </property>
+        <property name="frameShape" >
+         <enum>QFrame::StyledPanel</enum>
+        </property>
+        <property name="frameShadow" >
+         <enum>QFrame::Raised</enum>
+        </property>
+        <layout class="QGridLayout" name="gridLayout_2" >
+         <item row="1" column="0" >
+          <layout class="QHBoxLayout" name="sinkLayout" />
+         </item>
+        </layout>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item row="2" column="1" >
+     <widget class="QGroupBox" name="channelModeBox" >
+      <property name="sizePolicy" >
+       <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>245</width>
+        <height>130</height>
+       </size>
+      </property>
+      <property name="maximumSize" >
+       <size>
+        <width>245</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="title" >
+       <string>Channel Model Parameters</string>
+      </property>
+      <widget class="QWidget" name="formLayoutWidget_2" >
+       <property name="geometry" >
+        <rect>
+         <x>10</x>
+         <y>20</y>
+         <width>221</width>
+         <height>98</height>
+        </rect>
+       </property>
+       <layout class="QFormLayout" name="formLayout_2" >
+        <property name="sizeConstraint" >
+         <enum>QLayout::SetFixedSize</enum>
+        </property>
+        <property name="fieldGrowthPolicy" >
+         <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+        </property>
+        <item row="0" column="0" >
+         <widget class="QLabel" name="snrLabel" >
+          <property name="text" >
+           <string>SNR (dB)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QLineEdit" name="snrEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="freqLabel" >
+          <property name="text" >
+           <string>Frequency Offset (Hz)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLineEdit" name="freqEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="timeLabel" >
+          <property name="text" >
+           <string>Timing Offset</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QLineEdit" name="timeEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+      <zorder>formLayoutWidget_2</zorder>
+      <zorder>rxBox</zorder>
+     </widget>
+    </item>
+    <item row="2" column="3" >
+     <widget class="QGroupBox" name="rxBox_2" >
+      <property name="sizePolicy" >
+       <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>220</width>
+        <height>125</height>
+       </size>
+      </property>
+      <property name="maximumSize" >
+       <size>
+        <width>265</width>
+        <height>125</height>
+       </size>
+      </property>
+      <property name="title" >
+       <string>Received Packet Info</string>
+      </property>
+      <widget class="QWidget" name="formLayoutWidget_4" >
+       <property name="geometry" >
+        <rect>
+         <x>10</x>
+         <y>20</y>
+         <width>248</width>
+         <height>188</height>
+        </rect>
+       </property>
+       <layout class="QFormLayout" name="formLayout_4" >
+        <property name="sizeConstraint" >
+         <enum>QLayout::SetFixedSize</enum>
+        </property>
+        <property name="fieldGrowthPolicy" >
+         <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+        </property>
+        <item row="0" column="0" >
+         <widget class="QLabel" name="pktsRcvdLabel" >
+          <property name="text" >
+           <string>Packets Rcvd.</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QLineEdit" name="pktsRcvdEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="pktsCorrectLabel" >
+          <property name="text" >
+           <string>Packets Correct</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLineEdit" name="pktsCorrectEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="perLabel" >
+          <property name="text" >
+           <string>PER</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QLineEdit" name="perEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+       </layout>
+       <zorder>pktsRcvdLabel</zorder>
+       <zorder>pktsCorrectLabel</zorder>
+       <zorder>perLabel</zorder>
+       <zorder>pktsRcvdEdit</zorder>
+       <zorder>pktsCorrectEdit</zorder>
+       <zorder>perEdit</zorder>
+       <zorder>rxBox</zorder>
+      </widget>
+     </widget>
+    </item>
+    <item row="2" column="4" >
+     <spacer name="horizontalSpacer" >
+      <property name="orientation" >
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="sizeHint" stdset="0" >
+       <size>
+        <width>20</width>
+        <height>20</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item row="2" column="5" >
+     <layout class="QVBoxLayout" name="verticalLayout" >
+      <item>
+       <widget class="QPushButton" name="pauseButton" >
+        <property name="minimumSize" >
+         <size>
+          <width>80</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="maximumSize" >
+         <size>
+          <width>80</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="text" >
+         <string>Pause</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="verticalSpacer" >
+        <property name="orientation" >
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeType" >
+         <enum>QSizePolicy::Fixed</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>20</width>
+          <height>60</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QPushButton" name="closeButton" >
+        <property name="minimumSize" >
+         <size>
+          <width>80</width>
+          <height>0</height>
+         </size>
+        </property>
+        <property name="maximumSize" >
+         <size>
+          <width>80</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="text" >
+         <string>Close</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+    <item row="2" column="2" >
+     <widget class="QGroupBox" name="rxBox" >
+      <property name="sizePolicy" >
+       <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>180</width>
+        <height>120</height>
+       </size>
+      </property>
+      <property name="maximumSize" >
+       <size>
+        <width>180</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="title" >
+       <string>Receiver Parameters</string>
+      </property>
+      <widget class="QWidget" name="formLayoutWidget_3" >
+       <property name="geometry" >
+        <rect>
+         <x>10</x>
+         <y>10</y>
+         <width>161</width>
+         <height>101</height>
+        </rect>
+       </property>
+       <layout class="QFormLayout" name="formLayout_3" >
+        <property name="sizeConstraint" >
+         <enum>QLayout::SetFixedSize</enum>
+        </property>
+        <item row="0" column="0" >
+         <widget class="QLabel" name="alphaTimeLabel" >
+          <property name="text" >
+           <string>Alpha: time</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="alphaFreqLabel" >
+          <property name="text" >
+           <string>Alpha: freq</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QLineEdit" name="alphaTimeEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QLineEdit" name="alphaFreqEdit" >
+          <property name="minimumSize" >
+           <size>
+            <width>60</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLineEdit" name="betaTimeEdit" >
+          <property name="maximumSize" >
+           <size>
+            <width>80</width>
+            <height>16777215</height>
+           </size>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="betaTimeLabel" >
+          <property name="text" >
+           <string>Beta: time</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+   <zorder>channelModeBox</zorder>
+   <zorder></zorder>
+   <zorder>rxBox_2</zorder>
+   <zorder>horizontalSpacer</zorder>
+   <zorder></zorder>
+   <zorder>rxBox</zorder>
+  </widget>
+  <widget class="QMenuBar" name="menubar" >
+   <property name="geometry" >
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1019</width>
+     <height>24</height>
+    </rect>
+   </property>
+   <widget class="QMenu" name="menuFile" >
+    <property name="title" >
+     <string>&amp;File</string>
+    </property>
+    <addaction name="actionExit" />
+   </widget>
+   <addaction name="menuFile" />
+  </widget>
+  <widget class="QStatusBar" name="statusbar" />
+  <action name="actionExit" >
+   <property name="text" >
+    <string>E&amp;xit</string>
+   </property>
+  </action>
+ </widget>
+ <tabstops>
+  <tabstop>snrEdit</tabstop>
+  <tabstop>freqEdit</tabstop>
+  <tabstop>timeEdit</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>closeButton</sender>
+   <signal>clicked()</signal>
+   <receiver>DigitalWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>322</x>
+     <y>623</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>66</x>
+     <y>561</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionExit</sender>
+   <signal>triggered()</signal>
+   <receiver>DigitalWindow</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>617</x>
+     <y>327</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index b435461254fedf1639898fba2749105c906604e1..8aeb80c0a5be7f4b19ee9dbb5bf4a8a22155eae0 100644 (file)
@@ -92,6 +92,9 @@ BUILT_SOURCES =                               \
 libgnuradio_atsc_la_LIBADD =                   \
        $(GNURADIO_CORE_LA)
 
+libgnuradio_atsc_la_LDFLAGS = \
+       $(NO_UNDEFINED)
+
 noinst_LTLIBRARIES = libgnuradio-atsc-qa.la
 
 libgnuradio_atsc_qa_la_SOURCES =               \
@@ -113,6 +116,9 @@ libgnuradio_atsc_qa_la_SOURCES =            \
 libgnuradio_atsc_qa_la_LIBADD =                        \
        $(GNURADIO_CORE_LA)
 
+libgnuradio_atsc_qa_la_LDFLAGS = \
+       $(NO_UNDEFINED)
+
 
 # These headers get installed in ${prefix}/include/gnuradio
 grinclude_HEADERS =                            \
index c92fbcb0d9cf641e11582634680a8791171894f6..79e79e36cb0edeed5f7d43183cf76a520b32db53 100644 (file)
 #ifndef INCLUDED_AUDIO_OSX_H
 #define INCLUDED_AUDIO_OSX_H
 
-#define CheckErrorAndThrow(err,what,throw_str) \
-if (err) { \
-  OSStatus error = static_cast<OSStatus>(err); \
-  fprintf (stderr, "%s\n  Error# %ld ('%4s')\n  %s:%d\n", \
-          what, error, (char*)(&err), __FILE__, __LINE__); \
-  fflush (stdout); \
-  throw std::runtime_error (throw_str); \
-}
+#include <iostream>
+#include <string.h>
 
-#define CheckError(err,what) \
-if (err) { \
-  OSStatus error = static_cast<OSStatus>(err); \
-  fprintf (stderr, "%s\n  Error# %ld ('%4s')\n  %s:%d\n", \
-          what, error, (char*)(&err), __FILE__, __LINE__); \
-  fflush (stdout); \
-}
+#define CheckErrorAndThrow(err,what,throw_str)                         \
+  if (err) {                                                           \
+    OSStatus error = static_cast<OSStatus>(err);                       \
+    char err_str[4];                                                   \
+    strncpy (err_str, (char*)(&err), 4);                               \
+    std::cerr << what << std::endl;                                    \
+    std::cerr << "  Error# " << error << " ('" << err_str              \
+             << "')" << std::endl;                                     \
+    std::cerr << "  " << __FILE__ << ":" << __LINE__ << std::endl;     \
+    fflush (stderr);                                                   \
+    throw std::runtime_error (throw_str);                              \
+  }
+
+#define CheckError(err,what)                                           \
+  if (err) {                                                           \
+    OSStatus error = static_cast<OSStatus>(err);                       \
+    char err_str[4];                                                   \
+    strncpy (err_str, (char*)(&err), 4);                               \
+    std::cerr << what << std::endl;                                    \
+    std::cerr << "  Error# " << error << " ('" << err_str              \
+             << "')" << std::endl;                                     \
+    std::cerr << "  " << __FILE__ << ":" << __LINE__ << std::endl;     \
+    fflush (stderr);                                                   \
+  }
 
 #ifdef WORDS_BIGENDIAN
 #define GR_PCM_ENDIANNESS kLinearPCMFormatFlagIsBigEndian
@@ -46,4 +57,15 @@ if (err) { \
 #define GR_PCM_ENDIANNESS 0
 #endif
 
+// Check the version of MacOSX being used
+#ifdef __APPLE_CC__
+#include <AvailabilityMacros.h>
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
+#define GR_USE_OLD_AUDIO_UNIT
+#endif
+#endif
+
 #endif /* INCLUDED_AUDIO_OSX_H */
index fef21babd939be34b6196c58ede4716ad5f40866..e91716c0acacc44dfb32a39614d61d5735afed65 100644 (file)
@@ -47,19 +47,19 @@ audio_osx_sink::audio_osx_sink (int sample_rate,
     d_OutputAU (0)
 {
   if (sample_rate <= 0) {
-    fprintf (stderr, "Invalid Sample Rate: %d\n", sample_rate);
+    std::cerr << "Invalid Sample Rate: " << sample_rate << std::endl;
     throw std::invalid_argument ("audio_osx_sink::audio_osx_sink");
   } else
     d_sample_rate = (Float64) sample_rate;
 
   if (channel_config <= 0 & channel_config != -1) {
-    fprintf (stderr, "Invalid Channel Config: %d\n", channel_config);
+    std::cerr << "Invalid Channel Config: " << channel_config << std::endl;
     throw std::invalid_argument ("audio_osx_sink::audio_osx_sink");
   } else if (channel_config == -1) {
 // no user input; try "device name" instead
     int l_n_channels = (int) strtol (device_name.data(), (char **)NULL, 10);
     if (l_n_channels == 0 & errno) {
-      fprintf (stderr, "Error Converting Device Name: %d\n", errno);
+      std::cerr << "Error Converting Device Name: " << errno << std::endl;
       throw std::invalid_argument ("audio_osx_sink::audio_osx_sink");
     }
     if (l_n_channels <= 0)
@@ -79,7 +79,7 @@ audio_osx_sink::audio_osx_sink (int sample_rate,
   if (max_sample_count == -1)
     max_sample_count = sample_rate;
   else if (max_sample_count <= 0) {
-    fprintf (stderr, "Invalid Max Sample Count: %d\n", max_sample_count);
+    std::cerr << "Invalid Max Sample Count: " << max_sample_count << std::endl;
     throw std::invalid_argument ("audio_osx_sink::audio_osx_sink");
   }
 
@@ -98,21 +98,39 @@ audio_osx_sink::audio_osx_sink (int sample_rate,
   OSStatus err = noErr;
 
 // Open the default output unit
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  AudioComponentDescription desc;
+#else
   ComponentDescription desc;
+#endif
+
   desc.componentType = kAudioUnitType_Output;
   desc.componentSubType = kAudioUnitSubType_DefaultOutput;
   desc.componentManufacturer = kAudioUnitManufacturer_Apple;
   desc.componentFlags = 0;
   desc.componentFlagsMask = 0;
 
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  AudioComponent comp = AudioComponentFindNext(NULL, &desc);
+  if (comp == NULL) {
+    std::cerr << "AudioComponentFindNext Error" << std::endl;
+    throw std::runtime_error ("audio_osx_sink::audio_osx_sink");
+  }
+#else
   Component comp = FindNextComponent (NULL, &desc);
   if (comp == NULL) {
-    fprintf (stderr, "FindNextComponent Error\n");
+    std::cerr << "FindNextComponent Error" << std::endl;
     throw std::runtime_error ("audio_osx_sink::audio_osx_sink");
   }
+#endif
 
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  err = AudioComponentInstanceNew (comp, &d_OutputAU);
+  CheckErrorAndThrow (err, "AudioComponentInstanceNew", "audio_osx_sink::audio_osx_sink");
+#else
   err = OpenAComponent (comp, &d_OutputAU);
   CheckErrorAndThrow (err, "OpenAComponent", "audio_osx_sink::audio_osx_sink");
+#endif
 
 // Set up a callback function to generate output to the output unit
 
@@ -167,11 +185,10 @@ audio_osx_sink::audio_osx_sink (int sample_rate,
                      "audio_osx_sink::audio_osx_sink");
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "audio_osx_sink Parameters:\n");
-  fprintf (stderr, "  Sample Rate is %g\n", d_sample_rate);
-  fprintf (stderr, "  Number of Channels is %ld\n", d_n_channels);
-  fprintf (stderr, "  Max # samples to store per channel is %ld",
-          d_max_sample_count);
+  std::cerr << "audio_osx_sink Parameters:" << std::endl;
+  std::cerr << "  Sample Rate is " << d_sample_rate << std::endl;
+  std::cerr << "  Number of Channels is " << d_n_channels << std::endl;
+  std::cerr << "  Max # samples to store per channel is " << d_max_sample_count << std::endl;
 #endif
 }
 
@@ -220,7 +237,11 @@ audio_osx_sink::~audio_osx_sink ()
 // stop and close the AudioUnit
   stop ();
   AudioUnitUninitialize (d_OutputAU);
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  AudioComponentInstanceDispose (d_OutputAU);
+#else
   CloseComponent (d_OutputAU);
+#endif
 
 // empty and delete the queues
   for (UInt32 n = 0; n < d_n_channels; n++) {
@@ -275,8 +296,8 @@ audio_osx_sink::work (int noutput_items,
 #endif
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "work1: qSC = %ld, lMC = %ld, dmSC = %ld, nOI = %d\n",
-          d_queueSampleCount, l_max_count, d_max_sample_count, noutput_items);
+  std::cerr << "work1: qSC = " << d_queueSampleCount << ", lMC = "<< l_max_count
+           << ", dmSC = " << d_max_sample_count << ", nOI = " << noutput_items << std::endl;
 #endif
 
   if (d_queueSampleCount > l_max_count) {
@@ -318,7 +339,7 @@ audio_osx_sink::work (int noutput_items,
   if (res == -1) {
 // data coming in too fast
 // drop oldest buffer
-    fputs ("oX", stderr);
+    fputs ("aO", stderr);
     fflush (stderr);
 // set the local number of samples available to the max
     d_queueSampleCount = d_buffers[0]->buffer_length_items ();
@@ -328,8 +349,8 @@ audio_osx_sink::work (int noutput_items,
   }
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "work2: #OI = %4d, #Cnt = %4ld, mSC = %ld\n",
-          noutput_items, d_queueSampleCount, d_max_sample_count);
+  std::cerr << "work2: #OI = " << noutput_items << ", #Cnt = "
+           << d_queueSampleCount << ", mSC = " << d_max_sample_count << std::endl;
 #endif
 
 // release control to allow for other processing parts to run
@@ -352,8 +373,8 @@ OSStatus audio_osx_sink::AUOutputCallback
   This->d_internal->lock ();
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cb_in: SC = %4ld, in#F = %4ld\n",
-          This->d_queueSampleCount, inNumberFrames);
+  std::cerr << "cb_in: SC = " << This->d_queueSampleCount
+           << ", in#F = " << inNumberFrames << std::endl;
 #endif
 
   if (This->d_queueSampleCount < inNumberFrames) {
@@ -364,7 +385,7 @@ OSStatus audio_osx_sink::AUOutputCallback
     int l_counter = This->d_n_channels;
 
     while (--l_counter >= 0) {
-      UInt32 t_n_output_items = inNumberFrames;
+      size_t t_n_output_items = inNumberFrames;
       float* outBuffer = (float*) ioData->mBuffers[l_counter].mData;
       This->d_buffers[l_counter]->dequeue (outBuffer, &t_n_output_items);
       if (t_n_output_items != inNumberFrames) {
@@ -378,7 +399,7 @@ OSStatus audio_osx_sink::AUOutputCallback
   }
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cb_out: SC = %4ld\n", This->d_queueSampleCount);
+  std::cerr << "cb_out: SC = " << This->d_queueSampleCount << std::endl;
 #endif
 
 // signal that data is available
index e82e8ad21515e128a8ea778ff7b0860912ca0036..61838745b53081e68d9e8d857a8fe60ee9423bdb 100644 (file)
 void PrintStreamDesc (AudioStreamBasicDescription *inDesc)
 {
   if (inDesc == NULL) {
-    fprintf (stderr, "PrintStreamDesc: Can't print a NULL desc!\n");
+    std::cerr << "PrintStreamDesc: Can't print a NULL desc!" << std::endl;
     return;
   }
 
-  fprintf (stderr, "  Sample Rate        : %g\n", inDesc->mSampleRate);
-  fprintf (stderr, "  Format ID          : %4s\n", (char*)&inDesc->mFormatID);
-  fprintf (stderr, "  Format Flags       : %lX\n", inDesc->mFormatFlags);
-  fprintf (stderr, "  Bytes per Packet   : %ld\n", inDesc->mBytesPerPacket);
-  fprintf (stderr, "  Frames per Packet  : %ld\n", inDesc->mFramesPerPacket);
-  fprintf (stderr, "  Bytes per Frame    : %ld\n", inDesc->mBytesPerFrame);
-  fprintf (stderr, "  Channels per Frame : %ld\n", inDesc->mChannelsPerFrame);
-  fprintf (stderr, "  Bits per Channel   : %ld\n", inDesc->mBitsPerChannel);
+  std::cerr << "  Sample Rate        : " << inDesc->mSampleRate << std::endl;
+  char format_id[4];
+  strncpy (format_id, (char*)(&inDesc->mFormatID), 4);
+  std::cerr << "  Format ID          : " << format_id << std::endl;
+  std::cerr << "  Format Flags       : " << inDesc->mFormatFlags << std::endl;
+  std::cerr << "  Bytes per Packet   : " << inDesc->mBytesPerPacket << std::endl;
+  std::cerr << "  Frames per Packet  : " << inDesc->mFramesPerPacket << std::endl;
+  std::cerr << "  Bytes per Frame    : " << inDesc->mBytesPerFrame << std::endl;
+  std::cerr << "  Channels per Frame : " << inDesc->mChannelsPerFrame << std::endl;
+  std::cerr << "  Bits per Channel   : " << inDesc->mBitsPerChannel << std::endl;
 }
 
 // FIXME these should query some kind of user preference
@@ -79,19 +81,19 @@ audio_osx_source::audio_osx_source (int sample_rate,
     d_AudioConverter (0)
 {
   if (sample_rate <= 0) {
-    fprintf (stderr, "Invalid Sample Rate: %d\n", sample_rate);
+    std::cerr << "Invalid Sample Rate: " << sample_rate << std::endl;
     throw std::invalid_argument ("audio_osx_source::audio_osx_source");
   } else
     d_outputSampleRate = (Float64) sample_rate;
 
   if (channel_config <= 0 & channel_config != -1) {
-    fprintf (stderr, "Invalid Channel Config: %d\n", channel_config);
+    std::cerr << "Invalid Channel Config: " << channel_config << std::endl;
     throw std::invalid_argument ("audio_osx_source::audio_osx_source");
   } else if (channel_config == -1) {
 // no user input; try "device name" instead
     int l_n_channels = (int) strtol (device_name.data(), (char **)NULL, 10);
     if (l_n_channels == 0 & errno) {
-      fprintf (stderr, "Error Converting Device Name: %d\n", errno);
+      std::cerr << "Error Converting Device Name: " << errno << std::endl;
       throw std::invalid_argument ("audio_osx_source::audio_osx_source");
     }
     if (l_n_channels <= 0)
@@ -107,14 +109,14 @@ audio_osx_source::audio_osx_source (int sample_rate,
   if (max_sample_count == -1)
     max_sample_count = sample_rate;
   else if (max_sample_count <= 0) {
-    fprintf (stderr, "Invalid Max Sample Count: %d\n", max_sample_count);
+    std::cerr << "Invalid Max Sample Count: " << max_sample_count << std::endl;
     throw std::invalid_argument ("audio_osx_source::audio_osx_source");
   }
 
   d_max_sample_count = max_sample_count;
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "source(): max # samples = %ld\n", d_max_sample_count);
+  std::cerr << "source(): max # samples = " << d_max_sample_count << std::endl;
 #endif
 
   OSStatus err = noErr;
@@ -122,7 +124,12 @@ audio_osx_source::audio_osx_source (int sample_rate,
 // create the default AudioUnit for input
 
 // Open the default input unit
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  AudioComponentDescription InputDesc;
+#else
   ComponentDescription InputDesc;
+#endif
+  
 
   InputDesc.componentType = kAudioUnitType_Output;
   InputDesc.componentSubType = kAudioUnitSubType_HALOutput;
@@ -130,15 +137,31 @@ audio_osx_source::audio_osx_source (int sample_rate,
   InputDesc.componentFlags = 0;
   InputDesc.componentFlagsMask = 0;
 
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  AudioComponent comp = AudioComponentFindNext (NULL, &InputDesc);
+#else
   Component comp = FindNextComponent (NULL, &InputDesc);
+#endif
+  
   if (comp == NULL) {
-    fprintf (stderr, "FindNextComponent Error\n");
+#ifndef GR_USE_OLD_AUDIO_UNIT
+    std::cerr << "AudioComponentFindNext Error" << std::endl;
+#else
+    std::cerr << "FindNextComponent Error" << std::endl;
+#endif
     throw std::runtime_error ("audio_osx_source::audio_osx_source");
   }
 
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  err = AudioComponentInstanceNew (comp, &d_InputAU);
+  CheckErrorAndThrow (err, "AudioComponentInstanceNew",
+                     "audio_osx_source::audio_osx_source");
+#else
   err = OpenAComponent (comp, &d_InputAU);
   CheckErrorAndThrow (err, "OpenAComponent",
                      "audio_osx_source::audio_osx_source");
+#endif
+  
 
   UInt32 enableIO;
 
@@ -208,7 +231,7 @@ audio_osx_source::audio_osx_source (int sample_rate,
   CheckErrorAndThrow (err, "AudioUnitGetProperty HasIO",
                      "audio_osx_source::audio_osx_source");
   if (hasInput == 0) {
-    fprintf (stderr, "Selected Audio Device does not support Input.\n");
+    std::cerr << "Selected Audio Device does not support Input." << std::endl;
     throw std::runtime_error ("audio_osx_source::audio_osx_source");
   }
 
@@ -248,7 +271,7 @@ audio_osx_source::audio_osx_source (int sample_rate,
                      "audio_osx_source::audio_osx_source");
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "\n---- Device Stream Format ----\n" );
+  std::cerr << std::endl << "---- Device Stream Format ----" << std::endl;
   PrintStreamDesc (&asbd_device);
 #endif
 
@@ -264,7 +287,7 @@ audio_osx_source::audio_osx_source (int sample_rate,
                      "audio_osx_source::audio_osx_source");
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "\n---- Client Stream Format ----\n");
+  std::cerr << std::endl << "---- Client Stream Format ----" << std::endl;
   PrintStreamDesc (&asbd_client);
 #endif
 
@@ -436,22 +459,17 @@ audio_osx_source::audio_osx_source (int sample_rate,
                      "audio_osx_source::audio_osx_source");
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "audio_osx_source Parameters:\n");
-  fprintf (stderr, "  Device Sample Rate is %g\n", d_deviceSampleRate);
-  fprintf (stderr, "  User Sample Rate is %g\n", d_outputSampleRate);
-  fprintf (stderr, "  Max Sample Count is %ld\n", d_max_sample_count);
-  fprintf (stderr, "  # Device Channels is %ld\n", d_n_deviceChannels);
-  fprintf (stderr, "  # Max Channels is %ld\n", d_n_max_channels);
-  fprintf (stderr, "  Device Buffer Size is Frames = %ld\n",
-          d_deviceBufferSizeFrames);
-  fprintf (stderr, "  Lead Size is Frames = %ld\n",
-          d_leadSizeFrames);
-  fprintf (stderr, "  Trail Size is Frames = %ld\n",
-          d_trailSizeFrames);
-  fprintf (stderr, "  Input Buffer Size is Frames = %ld\n",
-          d_inputBufferSizeFrames);
-  fprintf (stderr, "  Output Buffer Size is Frames = %ld\n",
-          d_outputBufferSizeFrames);
+  std::cerr << "audio_osx_source Parameters:" << std::endl;
+  std::cerr << "  Device Sample Rate is " << d_deviceSampleRate << std::endl;
+  std::cerr << "  User Sample Rate is " << d_outputSampleRate << std::endl;
+  std::cerr << "  Max Sample Count is " << d_max_sample_count << std::endl;
+  std::cerr << "  # Device Channels is " << d_n_deviceChannels << std::endl;
+  std::cerr << "  # Max Channels is " << d_n_max_channels << std::endl;
+  std::cerr << "  Device Buffer Size is Frames = " << d_deviceBufferSizeFrames << std::endl;
+  std::cerr << "  Lead Size is Frames = " << d_leadSizeFrames << std::endl;
+  std::cerr << "  Trail Size is Frames = " << d_trailSizeFrames << std::endl;
+  std::cerr << "  Input Buffer Size is Frames = " << d_inputBufferSizeFrames << std::endl;
+  std::cerr << "  Output Buffer Size is Frames = " << d_outputBufferSizeFrames << std::endl;
 #endif
 }
 
@@ -564,8 +582,13 @@ audio_osx_source::~audio_osx_source ()
   err = AudioUnitUninitialize (d_InputAU);
   CheckError (err, "~audio_osx_source: AudioUnitUninitialize");
 
+#ifndef GR_USE_OLD_AUDIO_UNIT
+  err = AudioComponentInstanceDispose (d_InputAU);
+  CheckError (err, "~audio_osx_source: AudioComponentInstanceDispose");
+#else
   err = CloseComponent (d_InputAU);
   CheckError (err, "~audio_osx_source: CloseComponent");
+#endif
 
 // empty and delete the queues
   for (UInt32 n = 0; n < d_n_max_channels; n++) {
@@ -598,18 +621,18 @@ audio_osx_source::check_topology (int ninputs, int noutputs)
 {
 // check # inputs to make sure it's valid
   if (ninputs != 0) {
-    fprintf (stderr, "audio_osx_source::check_topology(): "
-            "number of input streams provided (%d) should be 0.\n",
-            ninputs);
+    std::cerr << "audio_osx_source::check_topology(): number of input "
+             << "streams provided (" << ninputs
+             << ") should be 0." << std::endl;
     throw std::runtime_error ("audio_osx_source::check_topology()");
   }
 
 // check # outputs to make sure it's valid
   if ((noutputs < 1) | (noutputs > (int) d_n_max_channels)) {
-    fprintf (stderr, "audio_osx_source::check_topology(): "
-            "number of output streams provided (%d) should be in "
-            "[1,%ld] for the selected audio device.\n",
-            noutputs, d_n_max_channels);
+    std::cerr << "audio_osx_source::check_topology(): number of output "
+             << "streams provided (" << noutputs << ") should be in [1,"
+             << d_n_max_channels << "] for the selected audio device."
+             << std::endl;
     throw std::runtime_error ("audio_osx_source::check_topology()");
   }
 
@@ -617,8 +640,8 @@ audio_osx_source::check_topology (int ninputs, int noutputs)
   d_n_user_channels = noutputs;
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "chk_topo: Actual # user output channels = %d\n",
-          noutputs);
+  std::cerr << "chk_topo: Actual # user output channels = "
+           << noutputs << std::endl;
 #endif
 
   return (true);
@@ -634,8 +657,9 @@ audio_osx_source::work
   d_internal->lock ();
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "work1: SC = %4ld, #OI = %4d, #Chan = %ld\n",
-          d_queueSampleCount, noutput_items, output_items.size());
+  std::cerr << "work1: SC = " << d_queueSampleCount
+           << ", #OI = " << noutput_items
+           << ", #Chan = " << output_items.size() << std::endl;
 #endif
 
   // set the actual # of output items to the 'desired' amount then
@@ -675,14 +699,14 @@ audio_osx_source::work
   // verify that the number copied out is as expected.
 
   while (--l_counter >= 0) {
-    UInt32 t_n_output_items = actual_noutput_items;
+    size_t t_n_output_items = actual_noutput_items;
     d_buffers[l_counter]->dequeue ((float*) output_items[l_counter],
                                   &t_n_output_items);
     if (t_n_output_items != actual_noutput_items) {
-      fprintf (stderr, "audio_osx_source::work(): "
-              "number of available items changing "
-              "unexpectedly; expecting %ld, got %ld.\n",
-              actual_noutput_items, t_n_output_items);
+      std::cerr << "audio_osx_source::work(): ERROR: number of "
+               << "available items changing unexpectedly; expecting "
+               << actual_noutput_items << ", got "
+               << t_n_output_items << "." << std::endl;
       throw std::runtime_error ("audio_osx_source::work()");
     }
   }
@@ -693,8 +717,8 @@ audio_osx_source::work
   d_queueSampleCount -= actual_noutput_items;
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "work2: SC = %4ld, act#OI = %4ld\n",
-          d_queueSampleCount, actual_noutput_items);
+  std::cerr << "work2: SC = " << d_queueSampleCount
+           << ", act#OI = " << actual_noutput_items << std::endl;
 #endif
 
   // release control to allow for other processing parts to run
@@ -702,7 +726,7 @@ audio_osx_source::work
   d_internal->unlock ();
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "work3: Returning.\n");
+  std::cerr << "work3: Returning." << std::endl;
 #endif
 
   return (actual_noutput_items);
@@ -728,8 +752,9 @@ audio_osx_source::ConverterCallback
   This->d_n_ActualInputFrames = (*ioNumberDataPackets);
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cc1: io#DP = %ld, TIBSB = %ld, #C = %d\n",
-          *ioNumberDataPackets, totalInputBufferSizeBytes, counter);
+  std::cerr << "cc1: io#DP = " << (*ioNumberDataPackets)
+           << ", TIBSB = " << totalInputBufferSizeBytes
+           << ", #C = " << counter << std::endl;
 #endif
 
   while (--counter >= 0)  {
@@ -740,7 +765,7 @@ audio_osx_source::ConverterCallback
   }
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cc2: Returning.\n");
+  std::cerr << "cc2: Returning." << std::endl;
 #endif
 
   return (noErr);
@@ -760,8 +785,9 @@ audio_osx_source::AUInputCallback (void* inRefCon,
   This->d_internal->lock ();
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cb0: in#F = %4ld, inBN = %ld, SC = %4ld\n",
-          inNumberFrames, inBusNumber, This->d_queueSampleCount);
+  std::cerr << "cb0: in#F = " << inNumberFrames
+           << ", inBN = " << inBusNumber
+           << ", SC = " << This->d_queueSampleCount << std::endl;
 #endif
 
 // Get the new audio data from the input device
@@ -821,8 +847,8 @@ audio_osx_source::AUInputCallback (void* inRefCon,
 #endif
 
 #if _OSX_AU_DEBUG_
-    fprintf (stderr, "cb1:  avail: #IF = %ld, #OF = %ld\n",
-            AvailableInputFrames, AvailableOutputFrames);
+    std::cerr << "cb1:  avail: #IF = " << AvailableInputFrames
+             << ", #OF = " << AvailableOutputFrames << std::endl;
 #endif
     ActualOutputFrames = AvailableOutputFrames;
 
@@ -841,11 +867,11 @@ audio_osx_source::AUInputCallback (void* inRefCon,
 // on output, ActualOutputFrames is the actual number of output frames
 
 #if _OSX_AU_DEBUG_
-    fprintf (stderr, "cb2: actual: #IF = %ld, #OF = %ld\n",
-            This->d_n_ActualInputFrames, AvailableOutputFrames);
+    std::cerr << "cb2: actual: #IF = " << This->d_n_ActualInputFrames
+             << ", #OF = " << AvailableOutputFrames << std::endl;
     if (This->d_n_ActualInputFrames != AvailableInputFrames)
-      fprintf (stderr, "cb2.1: avail#IF = %ld, actual#IF = %ld\n",
-              AvailableInputFrames, This->d_n_ActualInputFrames);
+      std::cerr << "cb2.1: avail#IF = " << AvailableInputFrames
+               << ", actual#IF = " << This->d_n_ActualInputFrames << std::endl;
 #endif
   }
 
@@ -858,7 +884,7 @@ audio_osx_source::AUInputCallback (void* inRefCon,
     float* inBuffer = (float*) This->d_OutputBuffer->mBuffers[l_counter].mData;
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cb3: enqueuing audio data.\n");
+    std::cerr << "cb3: enqueuing audio data." << std::endl;
 #endif
 
     int l_res = This->d_buffers[l_counter]->enqueue (inBuffer, ActualOutputFrames);
@@ -879,23 +905,23 @@ audio_osx_source::AUInputCallback (void* inRefCon,
   }
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cb4: #OI = %4ld, #Cnt = %4ld, mSC = %ld, \n",
-          ActualOutputFrames, This->d_queueSampleCount,
-          This->d_max_sample_count);
+  std::cerr << "cb4: #OI = " << ActualOutputFrames
+           << ", #Cnt = " << This->d_queueSampleCount
+           << ", mSC = " << This->d_max_sample_count << std::endl;
 #endif
 
 // signal that data is available, if appropraite
   This->d_cond_data->signal ();
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cb5: releasing internal mutex.\n");
+  std::cerr << "cb5: releasing internal mutex." << std::endl;
 #endif
 
 // release control to allow for other processing parts to run
   This->d_internal->unlock ();
 
 #if _OSX_AU_DEBUG_
-  fprintf (stderr, "cb6: returning.\n");
+  std::cerr << "cb6: returning." << std::endl;
 #endif
 
   return (err);
@@ -930,7 +956,7 @@ audio_osx_source::HardwareListener
   OSStatus err = noErr;
   audio_osx_source* This = static_cast<audio_osx_source*>(inClientData);
 
-  fprintf (stderr, "a_o_s::HardwareListener\n");
+  std::cerr << "a_o_s::HardwareListener" << std::endl;
 
 // set the new default hardware input device for use by our AU
 
@@ -957,7 +983,7 @@ audio_osx_source::UnitListener
   audio_osx_source* This = static_cast<audio_osx_source*>(inRefCon);
   AudioStreamBasicDescription asbd;                    
 
-  fprintf (stderr, "a_o_s::UnitListener\n");
+  std::cerr << "a_o_s::UnitListener" << std::endl;
 
 // get the converter's input ASBD (for printing)
 
@@ -970,8 +996,8 @@ audio_osx_source::UnitListener
                      "CurrentInputStreamDescription",
                      "audio_osx_source::UnitListener");
 
-  fprintf (stderr, "UnitListener: Input Source changed.\n"
-          "Old Source Output Info:\n");
+  std::cerr << "UnitListener: Input Source changed." << std::endl
+           << "Old Source Output Info:" << std::endl;
   PrintStreamDesc (&asbd);
 
 // get the new input unit's output ASBD
@@ -984,7 +1010,7 @@ audio_osx_source::UnitListener
   CheckErrorAndThrow (err, "AudioUnitGetProperty StreamFormat",
                      "audio_osx_source::UnitListener");
 
-  fprintf (stderr, "New Source Output Info:\n");
+  std::cerr << "New Source Output Info:" << std::endl;
   PrintStreamDesc (&asbd);
 
 // set the converter's input ASBD to this
index fa451d607b728e2c64a92ef067720b1551351d39..6d491fb6f09499fd912a077275e5e2ee9c039f0b 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio.
  *
 #define _CIRCULAR_BUFFER_H_
 
 #include "mld_threads.h"
+#include <iostream>
 #include <stdexcept>
 
+#ifndef DO_DEBUG
 #define DO_DEBUG 0
+#endif
 
 #if DO_DEBUG
 #define DEBUG(X) do{X} while(0);
@@ -41,8 +44,8 @@ private:
   T* d_buffer;
 
 // the following are in Items (type T)
-  UInt32 d_bufLen_I, d_readNdx_I, d_writeNdx_I;
-  UInt32 d_n_avail_write_I, d_n_avail_read_I;
+  size_t d_bufLen_I, d_readNdx_I, d_writeNdx_I;
+  size_t d_n_avail_write_I, d_n_avail_read_I;
 
 // stuff to control access to class internals
   mld_mutex_ptr d_internal;
@@ -67,7 +70,7 @@ private:
   };
 
 public:
-  circular_buffer (UInt32 bufLen_I,
+  circular_buffer (size_t bufLen_I,
                   bool doWriteBlock = true, bool doFullRead = false) {
     if (bufLen_I == 0)
       throw std::runtime_error ("circular_buffer(): "
@@ -79,10 +82,10 @@ public:
     d_internal = NULL;
     d_readBlock = d_writeBlock = NULL;
     reset ();
-    DEBUG (fprintf (stderr, "c_b(): buf len (items) = %ld, "
-                   "doWriteBlock = %s, doFullRead = %s\n", d_bufLen_I,
-                   (d_doWriteBlock ? "true" : "false"),
-                   (d_doFullRead ? "true" : "false")));
+    DEBUG (std::cerr << "c_b(): buf len (items) = " << d_bufLen_
+          << ", doWriteBlock = " << (d_doWriteBlock ? "true" : "false")
+          << ", doFullRead = " << (d_doFullRead ? "true" : "false")
+          << std::endl);
   };
 
   ~circular_buffer () {
@@ -90,21 +93,21 @@ public:
     delete [] d_buffer;
   };
 
-  inline UInt32 n_avail_write_items () {
+  inline size_t n_avail_write_items () {
     d_internal->lock ();
-    UInt32 retVal = d_n_avail_write_I;
+    size_t retVal = d_n_avail_write_I;
     d_internal->unlock ();
     return (retVal);
   };
 
-  inline UInt32 n_avail_read_items () {
+  inline size_t n_avail_read_items () {
     d_internal->lock ();
-    UInt32 retVal = d_n_avail_read_I;
+    size_t retVal = d_n_avail_read_I;
     d_internal->unlock ();
     return (retVal);
   };
 
-  inline UInt32 buffer_length_items () {return (d_bufLen_I);};
+  inline size_t buffer_length_items () {return (d_bufLen_I);};
   inline bool do_write_block () {return (d_doWriteBlock);};
   inline bool do_full_read () {return (d_doFullRead);};
 
@@ -147,14 +150,15 @@ public:
  *     buffer length is larger than the instantiated buffer length
  */
 
-  int enqueue (T* buf, UInt32 bufLen_I) {
-    DEBUG (fprintf (stderr, "enqueue: buf = %X, bufLen = %ld, #av_wr = %ld, "
-                   "#av_rd = %ld.\n", (unsigned int)buf, bufLen_I,
-                   d_n_avail_write_I, d_n_avail_read_I));
+  int enqueue (T* buf, size_t bufLen_I) {
+    DEBUG (std::cerr << "enqueue: buf = " << (void*) buf
+          << ", bufLen = " << bufLen_I
+          << ", #av_wr = " << d_n_avail_write_I
+          << ", #av_rd = " << d_n_avail_read_I << std::endl);
     if (bufLen_I > d_bufLen_I) {
-      fprintf (stderr, "cannot add buffer longer (%ld"
-              ") than instantiated length (%ld"
-              ").\n", bufLen_I, d_bufLen_I);
+      std::cerr << "ERROR: cannot add buffer longer ("
+               << bufLen_I << ") than instantiated length ("
+               << d_bufLen_I << ")." << std::endl;
       throw std::runtime_error ("circular_buffer::enqueue()");
     }
 
@@ -173,25 +177,25 @@ public:
     if (bufLen_I > d_n_avail_write_I) {
       if (d_doWriteBlock) {
        while (bufLen_I > d_n_avail_write_I) {
-         DEBUG (fprintf (stderr, "enqueue: #len > #a, waiting.\n"));
+         DEBUG (std::cerr << "enqueue: #len > #a, waiting." << std::endl);
          // wait will automatically unlock() the internal mutex
          d_writeBlock->wait ();
          // and lock() it here.
          if (d_doAbort) {
            d_internal->unlock ();
-           DEBUG (fprintf (stderr, "enqueue: #len > #a, aborting.\n"));
+           DEBUG (std::cerr << "enqueue: #len > #a, aborting." << std::endl);
            return (2);
          }
-         DEBUG (fprintf (stderr, "enqueue: #len > #a, done waiting.\n"));
+         DEBUG (std::cerr << "enqueue: #len > #a, done waiting." << std::endl);
        }
       } else {
        d_n_avail_read_I = d_bufLen_I - bufLen_I;
        d_n_avail_write_I = bufLen_I;
-       DEBUG (fprintf (stderr, "circular_buffer::enqueue: overflow\n"));
+       DEBUG (std::cerr << "circular_buffer::enqueue: overflow" << std::endl);
        retval = -1;
       }
     }
-    UInt32 n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0;
+    size_t n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0;
     if (n_now_I > bufLen_I)
       n_now_I = bufLen_I;
     else if (n_now_I < bufLen_I)
@@ -230,23 +234,24 @@ public:
  *     buffer length is larger than the instantiated buffer length
  */
 
-  int dequeue (T* buf, UInt32* bufLen_I) {
-    DEBUG (fprintf (stderr, "dequeue: buf = %X, *bufLen = %ld, #av_wr = %ld, "
-                   "#av_rd = %ld.\n", (unsigned int)buf, *bufLen_I,
-                   d_n_avail_write_I, d_n_avail_read_I));
+  int dequeue (T* buf, size_t* bufLen_I) {
+    DEBUG (std::cerr << "dequeue: buf = " << ((void*) buf)
+          << ", *bufLen = " << (*bufLen_I)
+          << ", #av_wr = " <<  d_n_avail_write_I
+          << ", #av_rd = " << d_n_avail_read_I << std::endl);
     if (!bufLen_I)
       throw std::runtime_error ("circular_buffer::dequeue(): "
                                "input bufLen pointer is NULL.\n");
     if (!buf)
       throw std::runtime_error ("circular_buffer::dequeue(): "
                                "input buffer pointer is NULL.\n");
-    UInt32 l_bufLen_I = *bufLen_I;
+    size_t l_bufLen_I = *bufLen_I;
     if (l_bufLen_I == 0)
       return (0);
     if (l_bufLen_I > d_bufLen_I) {
-      fprintf (stderr, "cannot remove buffer longer (%ld"
-              ") than instantiated length (%ld"
-              ").\n", l_bufLen_I, d_bufLen_I);
+      std::cerr << "ERROR: cannot remove buffer longer ("
+               << l_bufLen_I << ") than instantiated length ("
+               << d_bufLen_I << ")." << std::endl;
       throw std::runtime_error ("circular_buffer::dequeue()");
     }
 
@@ -257,34 +262,34 @@ public:
     }
     if (d_doFullRead) {
       while (d_n_avail_read_I < l_bufLen_I) {
-       DEBUG (fprintf (stderr, "dequeue: #a < #len, waiting.\n"));
+       DEBUG (std::cerr << "dequeue: #a < #len, waiting." << std::endl);
        // wait will automatically unlock() the internal mutex
        d_readBlock->wait ();
        // and lock() it here.
        if (d_doAbort) {
          d_internal->unlock ();
-         DEBUG (fprintf (stderr, "dequeue: #a < #len, aborting.\n"));
+         DEBUG (std::cerr << "dequeue: #a < #len, aborting." << std::endl);
          return (2);
        }
-       DEBUG (fprintf (stderr, "dequeue: #a < #len, done waiting.\n"));
+       DEBUG (std::cerr << "dequeue: #a < #len, done waiting." << std::endl);
      }
     } else {
       while (d_n_avail_read_I == 0) {
-       DEBUG (fprintf (stderr, "dequeue: #a == 0, waiting.\n"));
+       DEBUG (std::cerr << "dequeue: #a == 0, waiting." << std::endl);
        // wait will automatically unlock() the internal mutex
        d_readBlock->wait ();
        // and lock() it here.
        if (d_doAbort) {
          d_internal->unlock ();
-         DEBUG (fprintf (stderr, "dequeue: #a == 0, aborting.\n"));
+         DEBUG (std::cerr << "dequeue: #a == 0, aborting." << std::endl);
          return (2);
        }
-       DEBUG (fprintf (stderr, "dequeue: #a == 0, done waiting.\n"));
+       DEBUG (std::cerr << "dequeue: #a == 0, done waiting." << std::endl);
       }
     }
     if (l_bufLen_I > d_n_avail_read_I)
       l_bufLen_I = d_n_avail_read_I;
-    UInt32 n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0;
+    size_t n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0;
     if (n_now_I > l_bufLen_I)
       n_now_I = l_bufLen_I;
     else if (n_now_I < l_bufLen_I)
index 16f83f780cb57bb7eba3e515a2ad2c9e0b5dc222..7a0bbe892e915d0ad3a9fa16efd400af9c141e14 100644 (file)
@@ -1,57 +1,6 @@
 <?xml version='1.0' encoding='ASCII'?>
 <flow_graph>
-  <timestamp>Sun Sep 27 09:51:42 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>demod_hrpt_file</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>USRP HRPT Receiver</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value></value>
-    </param>
-    <param>
-      <key>description</key>
-      <value></value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>4096,4096</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>no_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>run</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
+  <timestamp>Sun Oct  4 08:40:03 2009</timestamp>
   <block>
     <key>variable</key>
     <param>
       <value>0</value>
     </param>
   </block>
-  <block>
-    <key>import</key>
-    <param>
-      <key>id</key>
-      <value>import_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>import</key>
-      <value>import math</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(9, 92)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
   <block>
     <key>parameter</key>
     <param>
       <value>0</value>
     </param>
   </block>
+  <block>
+    <key>import</key>
+    <param>
+      <key>id</key>
+      <value>import_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>import</key>
+      <value>import math</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(11, 111)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>demod_hrpt_file</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>USRP HRPT Receiver</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>4096,4096</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>no_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>run</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
   <connection>
     <source_block_id>deframer</source_block_id>
     <sink_block_id>file_sink</sink_block_id>
index 309a7920943ea06751e9ce5f8961142ceb4149ee..d5535186839d37ddbe62ef31fb4561e1daa22a21 100755 (executable)
@@ -2,7 +2,7 @@
 ##################################################
 # Gnuradio Python Flow Graph
 # Title: USRP HRPT Receiver
-# Generated: Sun Sep 27 09:34:15 2009
+# Generated: Sun Oct  4 08:40:03 2009
 ##################################################
 
 from gnuradio import eng_notation
@@ -129,7 +129,5 @@ if __name__ == '__main__':
                help="Set sync_alpha [default=%default]")
        (options, args) = parser.parse_args()
        tb = demod_hrpt_file(filename=options.filename, output=options.output, decim=options.decim, pll_alpha=options.pll_alpha, sync_alpha=options.sync_alpha)
-       tb.start()
-       raw_input('Press Enter to quit: ')
-       tb.stop()
+       tb.run()
 
index f99947f827d82fab5b69de1d46282738f90b51d6..9c655b0d98fef5dbb8dced85c79e821b452f749c 100644 (file)
@@ -67,11 +67,16 @@ noaa_hrpt_sync_fb::general_work(int noutput_items,
 
     // Train on zero crossings in center region of symbol
     if (sign != d_last_sign) {
-      if (d_phase > 0.25 && d_phase < 0.75) {
-       float phase_err = d_phase-0.5;
-       d_phase -= phase_err*d_alpha;        // 1st order phase adjustment
-       d_freq -= phase_err*d_beta;          // 2nd order frequency adjustment
-      }
+      float phase_err = 0.0;
+      if (d_phase > 0.25 && d_phase < 0.75)
+       phase_err = d_phase-0.5;
+      else if (d_phase >= 0.75)
+       phase_err = d_phase - 1.0;
+      else
+       phase_err = d_phase;
+
+      d_phase -= phase_err*d_alpha;        // 1st order phase adjustment
+      d_freq -= phase_err*d_beta;          // 2nd order frequency adjustment
 
       d_last_sign = sign;
     }
index b6c8f3f4d0a0e611a72aefe8ea0054102282ea3a..6c90c31f0f946687b15ceb65ae79d721de794ec6 100644 (file)
@@ -26,7 +26,6 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \
 
 # Only include these files in the build if qtgui passes configure checks
 # This is mostly to help make distcheck pass
-if BUILD_QT
 QMAKE_SOURCES =                                \
        spectrumdisplayform_moc.cc              \
        FrequencyDisplayPlot_moc.cc             \
@@ -35,7 +34,6 @@ QMAKE_SOURCES =                               \
        Waterfall3DDisplayPlot_moc.cc           \
        ConstellationDisplayPlot_moc.cc         \
        spectrumdisplayform_ui.h
-endif
 
 EXTRA_DIST = spectrumdisplayform.ui
 
@@ -77,19 +75,11 @@ grinclude_HEADERS =                 \
        qtgui_sink_c.h                  \
        qtgui_sink_f.h
 
-if BUILD_QT
 %_moc.cc : %.h
        $(QT_MOC_EXEC) -DQT_SHARED -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -p $(srcdir) $< -o $@
 
 %_ui.h : %.ui
        $(QT_UIC_EXEC) $< -o $@
-else
-%_moc.cc : %.h
-       touch $@
-
-%_ui.h : %.ui
-       touch $@
-endif
 
 # magic flags
 libgnuradio_qtgui_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
index 1458488a0dcd49be1cc5a67c38496e6073b302c3..cb7b4f996771a566adf621842874559823b5b160 100644 (file)
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>SpectrumDisplayForm</class>
- <widget class="QWidget" name="SpectrumDisplayForm" >
-  <property name="geometry" >
+ <widget class="QWidget" name="SpectrumDisplayForm">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>657</width>
-    <height>536</height>
+    <height>543</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Spectrum Display</string>
   </property>
-  <layout class="QGridLayout" name="gridLayout" >
-   <item row="1" column="3" >
-    <widget class="QComboBox" name="FFTSizeComboBox" >
-     <property name="sizePolicy" >
-      <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="1" column="3">
+    <widget class="QComboBox" name="FFTSizeComboBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
-     <property name="maximumSize" >
+     <property name="maximumSize">
       <size>
        <width>120</width>
        <height>16777215</height>
       </size>
      </property>
      <item>
-      <property name="text" >
+      <property name="text">
        <string>1024</string>
       </property>
      </item>
      <item>
-      <property name="text" >
+      <property name="text">
        <string>2048</string>
       </property>
      </item>
      <item>
-      <property name="text" >
+      <property name="text">
        <string>4096</string>
       </property>
      </item>
      <item>
-      <property name="text" >
+      <property name="text">
        <string>8192</string>
       </property>
      </item>
      <item>
-      <property name="text" >
+      <property name="text">
        <string>16384</string>
       </property>
      </item>
      <item>
-      <property name="text" >
+      <property name="text">
        <string>32768</string>
       </property>
      </item>
     </widget>
    </item>
-   <item row="1" column="2" >
-    <widget class="QLabel" name="FFTSizeLabel" >
-     <property name="text" >
+   <item row="1" column="2">
+    <widget class="QLabel" name="FFTSizeLabel">
+     <property name="text">
       <string>FFT Size:</string>
      </property>
-     <property name="alignment" >
+     <property name="alignment">
       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
      </property>
-     <property name="wordWrap" >
+     <property name="wordWrap">
       <bool>false</bool>
      </property>
     </widget>
    </item>
-   <item row="1" column="0" >
-    <widget class="QCheckBox" name="UseRFFrequenciesCheckBox" >
-     <property name="text" >
+   <item row="1" column="0">
+    <widget class="QCheckBox" name="UseRFFrequenciesCheckBox">
+     <property name="text">
       <string>Display RF Frequencies</string>
      </property>
     </widget>
    </item>
-   <item row="3" column="0" >
-    <layout class="QHBoxLayout" name="horizontalLayout" >
+   <item row="3" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
-      <widget class="QLabel" name="WindowLbl" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+      <widget class="QLabel" name="WindowLbl">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
-       <property name="text" >
+       <property name="text">
         <string>Window:</string>
        </property>
-       <property name="alignment" >
+       <property name="alignment">
         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
        </property>
-       <property name="wordWrap" >
+       <property name="wordWrap">
         <bool>false</bool>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QComboBox" name="WindowComboBox" >
-       <property name="sizePolicy" >
-        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+      <widget class="QComboBox" name="WindowComboBox">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
-       <property name="minimumSize" >
+       <property name="minimumSize">
         <size>
          <width>120</width>
          <height>0</height>
         </size>
        </property>
-       <property name="maximumSize" >
+       <property name="maximumSize">
         <size>
          <width>120</width>
          <height>16777215</height>
         </size>
        </property>
-       <property name="font" >
+       <property name="font">
         <font>
          <pointsize>9</pointsize>
         </font>
        </property>
        <item>
-        <property name="text" >
+        <property name="text">
          <string>Hamming</string>
         </property>
        </item>
        <item>
-        <property name="text" >
+        <property name="text">
          <string>Hann</string>
         </property>
        </item>
        <item>
-        <property name="text" >
+        <property name="text">
          <string>Blackman</string>
         </property>
        </item>
        <item>
-        <property name="text" >
+        <property name="text">
          <string>Rectangular</string>
         </property>
        </item>
        <item>
-        <property name="text" >
+        <property name="text">
          <string>Kaiser</string>
         </property>
        </item>
        <item>
-        <property name="text" >
+        <property name="text">
          <string>Blackman-harris</string>
         </property>
        </item>
      </item>
     </layout>
    </item>
-   <item row="0" column="0" colspan="4" >
-    <widget class="QTabWidget" name="SpectrumTypeTab" >
-     <property name="currentIndex" >
+   <item row="0" column="0" colspan="4">
+    <widget class="QTabWidget" name="SpectrumTypeTab">
+     <property name="currentIndex">
       <number>0</number>
      </property>
-     <widget class="QWidget" name="FrequencyPage" >
-      <attribute name="title" >
+     <widget class="QWidget" name="FrequencyPage">
+      <attribute name="title">
        <string>Frequency Display</string>
       </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout" >
+      <layout class="QVBoxLayout" name="verticalLayout">
        <item>
-        <layout class="QVBoxLayout" name="verticalLayout_2" >
+        <layout class="QVBoxLayout" name="verticalLayout_2">
          <item>
-          <widget class="QFrame" name="FrequencyPlotDisplayFrame" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
+          <widget class="QFrame" name="FrequencyPlotDisplayFrame">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
-           <property name="minimumSize" >
+           <property name="minimumSize">
             <size>
-             <width>615</width>
+             <width>400</width>
              <height>332</height>
             </size>
            </property>
-           <property name="sizeIncrement" >
+           <property name="sizeIncrement">
             <size>
              <width>1</width>
              <height>1</height>
             </size>
            </property>
-           <property name="frameShape" >
+           <property name="frameShape">
             <enum>QFrame::NoFrame</enum>
            </property>
-           <property name="frameShadow" >
+           <property name="frameShadow">
             <enum>QFrame::Plain</enum>
            </property>
           </widget>
          </item>
          <item>
-          <layout class="QGridLayout" name="gridLayout_2" >
-           <item row="1" column="0" >
-            <widget class="QCheckBox" name="MaxHoldCheckBox" >
-             <property name="text" >
+          <layout class="QGridLayout" name="gridLayout_2">
+           <item row="1" column="0">
+            <widget class="QCheckBox" name="MaxHoldCheckBox">
+             <property name="text">
               <string>Max Hold</string>
              </property>
-             <property name="checked" >
+             <property name="checked">
               <bool>false</bool>
              </property>
             </widget>
            </item>
-           <item row="2" column="0" >
-            <widget class="QCheckBox" name="MinHoldCheckBox" >
-             <property name="text" >
+           <item row="2" column="0">
+            <widget class="QCheckBox" name="MinHoldCheckBox">
+             <property name="text">
               <string>Min Hold</string>
              </property>
-             <property name="checked" >
+             <property name="checked">
               <bool>false</bool>
              </property>
             </widget>
            </item>
-           <item row="1" column="3" >
-            <widget class="QLabel" name="PowerLabel" >
-             <property name="minimumSize" >
+           <item row="1" column="3">
+            <widget class="QLabel" name="PowerLabel">
+             <property name="minimumSize">
               <size>
                <width>50</width>
                <height>0</height>
               </size>
              </property>
-             <property name="maximumSize" >
+             <property name="maximumSize">
               <size>
                <width>50</width>
                <height>16777215</height>
               </size>
              </property>
-             <property name="text" >
+             <property name="text">
               <string>Power</string>
              </property>
-             <property name="alignment" >
+             <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
-             <property name="wordWrap" >
+             <property name="wordWrap">
               <bool>false</bool>
              </property>
             </widget>
            </item>
-           <item row="1" column="1" >
-            <widget class="QPushButton" name="MaxHoldResetBtn" >
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+           <item row="1" column="1">
+            <widget class="QPushButton" name="MaxHoldResetBtn">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="minimumSize" >
+             <property name="minimumSize">
               <size>
                <width>25</width>
                <height>0</height>
               </size>
              </property>
-             <property name="text" >
+             <property name="text">
               <string>Reset</string>
              </property>
             </widget>
            </item>
-           <item row="1" column="4" >
-            <widget class="QLabel" name="AvgLabel" >
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+           <item row="1" column="4">
+            <widget class="QLabel" name="AvgLabel">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="minimumSize" >
+             <property name="minimumSize">
               <size>
                <width>62</width>
                <height>0</height>
               </size>
              </property>
-             <property name="text" >
+             <property name="text">
               <string>Average</string>
              </property>
-             <property name="alignment" >
+             <property name="alignment">
               <set>Qt::AlignCenter</set>
              </property>
-             <property name="wordWrap" >
+             <property name="wordWrap">
               <bool>false</bool>
              </property>
             </widget>
            </item>
-           <item row="2" column="1" >
-            <widget class="QPushButton" name="MinHoldResetBtn" >
-             <property name="text" >
+           <item row="2" column="1">
+            <widget class="QPushButton" name="MinHoldResetBtn">
+             <property name="text">
               <string>Reset</string>
              </property>
             </widget>
            </item>
-           <item row="2" column="4" >
-            <widget class="QSpinBox" name="AvgLineEdit" />
+           <item row="2" column="4">
+            <widget class="QSpinBox" name="AvgLineEdit"/>
            </item>
-           <item row="2" column="3" >
-            <widget class="QLineEdit" name="PowerLineEdit" >
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+           <item row="2" column="3">
+            <widget class="QLineEdit" name="PowerLineEdit">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="minimumSize" >
+             <property name="minimumSize">
               <size>
                <width>50</width>
                <height>0</height>
               </size>
              </property>
-             <property name="maximumSize" >
+             <property name="maximumSize">
               <size>
                <width>50</width>
                <height>16777215</height>
               </size>
              </property>
-             <property name="text" >
+             <property name="text">
               <string>1</string>
              </property>
             </widget>
            </item>
-           <item row="1" column="2" >
-            <spacer name="horizontalSpacer_2" >
-             <property name="orientation" >
+           <item row="1" column="2">
+            <spacer name="horizontalSpacer_2">
+             <property name="orientation">
               <enum>Qt::Horizontal</enum>
              </property>
-             <property name="sizeHint" stdset="0" >
+             <property name="sizeHint" stdset="0">
               <size>
-               <width>325</width>
+               <width>200</width>
                <height>20</height>
               </size>
              </property>
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="WaterfallPage" >
-      <attribute name="title" >
+     <widget class="QWidget" name="WaterfallPage">
+      <attribute name="title">
        <string>Waterfall Display</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout_3" >
-       <item row="0" column="0" >
-        <widget class="QLabel" name="textLabel1" >
-         <property name="maximumSize" >
+      <layout class="QGridLayout" name="gridLayout_3">
+       <item row="0" column="0">
+        <widget class="QLabel" name="textLabel1">
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>Intensity Display:</string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item row="0" column="2" >
-        <widget class="QwtWheel" name="WaterfallMaximumIntensityWheel" >
-         <property name="minimumSize" >
+       <item row="0" column="2">
+        <widget class="QwtWheel" name="WaterfallMaximumIntensityWheel">
+         <property name="minimumSize">
           <size>
            <width>200</width>
            <height>0</height>
           </size>
          </property>
-         <property name="mouseTracking" >
+         <property name="mouseTracking">
           <bool>true</bool>
          </property>
-         <property name="focusPolicy" >
+         <property name="focusPolicy">
           <enum>Qt::WheelFocus</enum>
          </property>
-         <property name="valid" >
+         <property name="valid">
           <bool>true</bool>
          </property>
-         <property name="totalAngle" >
+         <property name="totalAngle">
           <double>200.000000000000000</double>
          </property>
-         <property name="viewAngle" >
+         <property name="viewAngle">
           <double>20.000000000000000</double>
          </property>
-         <property name="mass" >
+         <property name="mass">
           <double>0.000000000000000</double>
          </property>
         </widget>
        </item>
-       <item row="0" column="3" >
-        <widget class="QLabel" name="WaterfallMaximumIntensityLabel" >
-         <property name="maximumSize" >
+       <item row="0" column="3">
+        <widget class="QLabel" name="WaterfallMaximumIntensityLabel">
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>100 dB</string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item row="1" column="0" colspan="4" >
-        <widget class="QFrame" name="WaterfallPlotDisplayFrame" >
-         <property name="minimumSize" >
+       <item row="1" column="0" colspan="4">
+        <widget class="QFrame" name="WaterfallPlotDisplayFrame">
+         <property name="minimumSize">
           <size>
            <width>617</width>
            <height>338</height>
           </size>
          </property>
-         <property name="frameShape" >
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Plain</enum>
          </property>
         </widget>
        </item>
-       <item row="2" column="2" >
-        <widget class="QwtWheel" name="WaterfallMinimumIntensityWheel" >
-         <property name="minimumSize" >
+       <item row="2" column="2">
+        <widget class="QwtWheel" name="WaterfallMinimumIntensityWheel">
+         <property name="minimumSize">
           <size>
            <width>200</width>
            <height>0</height>
           </size>
          </property>
-         <property name="valid" >
+         <property name="valid">
           <bool>true</bool>
          </property>
-         <property name="totalAngle" >
+         <property name="totalAngle">
           <double>200.000000000000000</double>
          </property>
-         <property name="viewAngle" >
+         <property name="viewAngle">
           <double>20.000000000000000</double>
          </property>
-         <property name="mass" >
+         <property name="mass">
           <double>0.000000000000000</double>
          </property>
         </widget>
        </item>
-       <item row="2" column="3" >
-        <widget class="QLabel" name="WaterfallMinimumIntensityLabel" >
-         <property name="maximumSize" >
+       <item row="2" column="3">
+        <widget class="QLabel" name="WaterfallMinimumIntensityLabel">
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>-100 dB</string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item row="2" column="0" colspan="2" >
-        <widget class="QPushButton" name="WaterfallAutoScaleBtn" >
-         <property name="maximumSize" >
+       <item row="2" column="0" colspan="2">
+        <widget class="QPushButton" name="WaterfallAutoScaleBtn">
+         <property name="maximumSize">
           <size>
            <width>80</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="toolTip" >
+         <property name="toolTip">
           <string>Scales the Intensity to the current data extremes.</string>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>Auto Scale</string>
          </property>
         </widget>
        </item>
-       <item row="0" column="1" >
-        <widget class="QComboBox" name="WaterfallIntensityComboBox" >
-         <property name="maximumSize" >
+       <item row="0" column="1">
+        <widget class="QComboBox" name="WaterfallIntensityComboBox">
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>Color</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>White Hot</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>Black Hot</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>Incandescent</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>User Defined</string>
           </property>
          </item>
         </widget>
        </item>
       </layout>
-      <zorder>textLabel1</zorder>
-      <zorder>WaterfallMaximumIntensityWheel</zorder>
-      <zorder>WaterfallMaximumIntensityLabel</zorder>
-      <zorder>WaterfallPlotDisplayFrame</zorder>
-      <zorder>WaterfallMinimumIntensityWheel</zorder>
-      <zorder>WaterfallMinimumIntensityLabel</zorder>
-      <zorder>WaterfallAutoScaleBtn</zorder>
-      <zorder>WaterfallIntensityComboBox</zorder>
      </widget>
-     <widget class="QWidget" name="Waterfall3DPage" >
-      <attribute name="title" >
+     <widget class="QWidget" name="Waterfall3DPage">
+      <attribute name="title">
        <string>3D Waterfall Display</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout_6" >
-       <item row="0" column="0" >
-        <widget class="QLabel" name="textLabel1_2" >
-         <property name="minimumSize" >
+      <layout class="QGridLayout" name="gridLayout_6">
+       <item row="0" column="0">
+        <widget class="QLabel" name="textLabel1_2">
+         <property name="minimumSize">
           <size>
            <width>0</width>
            <height>0</height>
           </size>
          </property>
-         <property name="maximumSize" >
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>Intensity Display:</string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item row="0" column="1" >
-        <widget class="QComboBox" name="Waterfall3DIntensityComboBox" >
-         <property name="maximumSize" >
+       <item row="0" column="1">
+        <widget class="QComboBox" name="Waterfall3DIntensityComboBox">
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>Color</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>White Hot</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>Black Hot</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>Incandescent</string>
           </property>
          </item>
          <item>
-          <property name="text" >
+          <property name="text">
            <string>User Defined</string>
           </property>
          </item>
         </widget>
        </item>
-       <item row="0" column="2" >
-        <widget class="QwtWheel" name="Waterfall3DMaximumIntensityWheel" >
-         <property name="minimumSize" >
+       <item row="0" column="2">
+        <widget class="QwtWheel" name="Waterfall3DMaximumIntensityWheel">
+         <property name="minimumSize">
           <size>
            <width>200</width>
            <height>0</height>
           </size>
          </property>
-         <property name="mouseTracking" >
+         <property name="mouseTracking">
           <bool>true</bool>
          </property>
-         <property name="focusPolicy" >
+         <property name="focusPolicy">
           <enum>Qt::WheelFocus</enum>
          </property>
-         <property name="valid" >
+         <property name="valid">
           <bool>true</bool>
          </property>
-         <property name="totalAngle" >
+         <property name="totalAngle">
           <double>200.000000000000000</double>
          </property>
-         <property name="viewAngle" >
+         <property name="viewAngle">
           <double>20.000000000000000</double>
          </property>
-         <property name="mass" >
+         <property name="mass">
           <double>0.000000000000000</double>
          </property>
         </widget>
        </item>
-       <item row="0" column="3" >
-        <widget class="QLabel" name="Waterfall3DMaximumIntensityLabel" >
-         <property name="maximumSize" >
+       <item row="0" column="3">
+        <widget class="QLabel" name="Waterfall3DMaximumIntensityLabel">
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>100 dB</string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item row="1" column="0" colspan="4" >
-        <widget class="QFrame" name="Waterfall3DPlotDisplayFrame" >
-         <property name="frameShape" >
+       <item row="1" column="0" colspan="4">
+        <widget class="QFrame" name="Waterfall3DPlotDisplayFrame">
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Plain</enum>
          </property>
         </widget>
        </item>
-       <item row="2" column="0" colspan="2" >
-        <widget class="QPushButton" name="Waterfall3DAutoScaleBtn" >
-         <property name="minimumSize" >
+       <item row="2" column="0" colspan="2">
+        <widget class="QPushButton" name="Waterfall3DAutoScaleBtn">
+         <property name="minimumSize">
           <size>
            <width>0</width>
            <height>0</height>
           </size>
          </property>
-         <property name="maximumSize" >
+         <property name="maximumSize">
           <size>
            <width>80</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="sizeIncrement" >
+         <property name="sizeIncrement">
           <size>
            <width>0</width>
            <height>0</height>
           </size>
          </property>
-         <property name="toolTip" >
+         <property name="toolTip">
           <string>Scales the Intensity to the current data extremes.</string>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>Auto Scale</string>
          </property>
         </widget>
        </item>
-       <item row="2" column="2" >
-        <widget class="QwtWheel" name="Waterfall3DMinimumIntensityWheel" >
-         <property name="minimumSize" >
+       <item row="2" column="2">
+        <widget class="QwtWheel" name="Waterfall3DMinimumIntensityWheel">
+         <property name="minimumSize">
           <size>
            <width>200</width>
            <height>0</height>
           </size>
          </property>
-         <property name="valid" >
+         <property name="valid">
           <bool>true</bool>
          </property>
-         <property name="totalAngle" >
+         <property name="totalAngle">
           <double>200.000000000000000</double>
          </property>
-         <property name="viewAngle" >
+         <property name="viewAngle">
           <double>20.000000000000000</double>
          </property>
-         <property name="mass" >
+         <property name="mass">
           <double>0.000000000000000</double>
          </property>
         </widget>
        </item>
-       <item row="2" column="3" >
-        <widget class="QLabel" name="Waterfall3DMinimumIntensityLabel" >
-         <property name="maximumSize" >
+       <item row="2" column="3">
+        <widget class="QLabel" name="Waterfall3DMinimumIntensityLabel">
+         <property name="maximumSize">
           <size>
            <width>100</width>
            <height>16777215</height>
           </size>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>-100 dB</string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="TimeDomainPage" >
-      <attribute name="title" >
+     <widget class="QWidget" name="TimeDomainPage">
+      <attribute name="title">
        <string>Time Domain Display</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout_4" >
-       <item row="0" column="0" >
-        <widget class="QFrame" name="TimeDomainDisplayFrame" >
-         <property name="minimumSize" >
+      <layout class="QGridLayout" name="gridLayout_4">
+       <item row="0" column="0">
+        <widget class="QFrame" name="TimeDomainDisplayFrame">
+         <property name="minimumSize">
           <size>
            <width>617</width>
            <height>404</height>
           </size>
          </property>
-         <property name="frameShape" >
+         <property name="frameShape">
           <enum>QFrame::NoFrame</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Plain</enum>
          </property>
         </widget>
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="ConstellationPage" >
-      <attribute name="title" >
+     <widget class="QWidget" name="ConstellationPage">
+      <attribute name="title">
        <string>Constellation Display</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout_5" >
-       <item row="0" column="0" >
-        <widget class="QFrame" name="ConstellationDisplayFrame" >
-         <property name="minimumSize" >
+      <layout class="QGridLayout" name="gridLayout_5">
+       <item row="0" column="0">
+        <widget class="QFrame" name="ConstellationDisplayFrame">
+         <property name="minimumSize">
           <size>
            <width>617</width>
            <height>406</height>
           </size>
          </property>
-         <property name="frameShape" >
+         <property name="frameShape">
           <enum>QFrame::StyledPanel</enum>
          </property>
-         <property name="frameShadow" >
+         <property name="frameShadow">
           <enum>QFrame::Raised</enum>
          </property>
         </widget>
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
+ <layoutdefault spacing="6" margin="11"/>
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
  <customwidgets>
   <customwidget>
   <tabstop>WaterfallMinimumIntensityWheel</tabstop>
  </tabstops>
  <includes>
-  <include location="global" >SpectrumGUIClass.h</include>
-  <include location="global" >FrequencyDisplayPlot.h</include>
-  <include location="global" >WaterfallDisplayPlot.h</include>
-  <include location="global" >Waterfall3DDisplayPlot.h</include>
-  <include location="global" >TimeDomainDisplayPlot.h</include>
-  <include location="global" >qvalidator.h</include>
-  <include location="global" >vector</include>
-  <include location="local" >qwt_wheel.h</include>
+  <include location="global">SpectrumGUIClass.h</include>
+  <include location="global">FrequencyDisplayPlot.h</include>
+  <include location="global">WaterfallDisplayPlot.h</include>
+  <include location="global">Waterfall3DDisplayPlot.h</include>
+  <include location="global">TimeDomainDisplayPlot.h</include>
+  <include location="global">qvalidator.h</include>
+  <include location="global">vector</include>
+  <include location="local">qwt_wheel.h</include>
  </includes>
  <resources/>
  <connections>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>MaxHoldCheckBox_toggled(bool)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>22</x>
      <y>324</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>MaxHoldResetBtn_clicked()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>107</x>
      <y>324</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>MinHoldCheckBox_toggled(bool)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>22</x>
      <y>349</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>MinHoldResetBtn_clicked()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>107</x>
      <y>349</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>PowerLineEdit_textChanged(QString)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>482</x>
      <y>344</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>WindowTypeChanged(int)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>UseRFFrequenciesCB(bool)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>waterfallMaximumIntensityChangedCB(double)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>217</x>
      <y>44</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>waterfallMinimumIntensityChangedCB(double)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>217</x>
      <y>349</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>waterfall3DMaximumIntensityChangedCB(double)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>217</x>
      <y>44</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>waterfall3DMinimumIntensityChangedCB(double)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>217</x>
      <y>349</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>FFTComboBoxSelectedCB(QString)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>WaterfallAutoScaleBtnCB()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>22</x>
      <y>349</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>Waterfall3DAutoScaleBtnCB()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>22</x>
      <y>349</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>WaterfallIntensityColorTypeChanged(int)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>92</x>
      <y>44</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>Waterfall3DIntensityColorTypeChanged(int)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>92</x>
      <y>44</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>TabChanged(int)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>314</x>
      <y>189</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>316</x>
      <y>217</y>
     </hint>
    <receiver>SpectrumDisplayForm</receiver>
    <slot>AvgLineEdit_valueChanged(int)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>604</x>
      <y>421</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>328</x>
      <y>260</y>
     </hint>
index 0835e2b9bb562b6919ac792923ab6a171dcf9ee8..3d1cc17543682c5601eb92dbf0d74b6a1084d3ed 100644 (file)
@@ -37,6 +37,7 @@ AM_CPPFLAGS = \
        $(STD_DEFINES_AND_INCLUDES) \
        $(PYTHON_CPPFLAGS) \
        $(USRP_INCLUDES) \
+       $(USB_INCLUDES) \
        $(WITH_INCLUDES)
 
 lib_LTLIBRARIES = \
index 98977da975ae84e0e0ab1ce250f650b81b840f76..5650135abf4a072420c0a183f27d039da6ae580e 100644 (file)
@@ -2,8 +2,8 @@
 
 # Form implementation generated from reading ui file 'pyqt_plot.ui'
 #
-# Created: Tue Sep  1 23:02:36 2009
-#      by: PyQt4 UI code generator 4.4.3
+# Created: Tue Oct  6 10:39:58 2009
+#      by: PyQt4 UI code generator 4.4.4
 #
 # WARNING! All changes made in this file will be lost!
 
@@ -12,7 +12,7 @@ from PyQt4 import QtCore, QtGui
 class Ui_MainWindow(object):
     def setupUi(self, MainWindow):
         MainWindow.setObjectName("MainWindow")
-        MainWindow.resize(927, 718)
+        MainWindow.resize(927, 696)
         self.centralwidget = QtGui.QWidget(MainWindow)
         self.centralwidget.setObjectName("centralwidget")
         self.gridLayout = QtGui.QGridLayout(self.centralwidget)
@@ -20,123 +20,8 @@ class Ui_MainWindow(object):
         self.plotHBar = QtGui.QScrollBar(self.centralwidget)
         self.plotHBar.setOrientation(QtCore.Qt.Horizontal)
         self.plotHBar.setObjectName("plotHBar")
-        self.gridLayout.addWidget(self.plotHBar, 1, 0, 1, 3)
-        self.filePosBox = QtGui.QGroupBox(self.centralwidget)
-        self.filePosBox.setMinimumSize(QtCore.QSize(0, 120))
-        self.filePosBox.setObjectName("filePosBox")
-        self.gridLayout_4 = QtGui.QGridLayout(self.filePosBox)
-        self.gridLayout_4.setObjectName("gridLayout_4")
-        self.filePosLayout = QtGui.QFormLayout()
-        self.filePosLayout.setObjectName("filePosLayout")
-        self.filePosStartLineEdit = QtGui.QLineEdit(self.filePosBox)
-        self.filePosStartLineEdit.setMinimumSize(QtCore.QSize(50, 0))
-        self.filePosStartLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.filePosStartLineEdit.setObjectName("filePosStartLineEdit")
-        self.filePosLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.filePosStartLineEdit)
-        self.filePosStopLabel = QtGui.QLabel(self.filePosBox)
-        self.filePosStopLabel.setObjectName("filePosStopLabel")
-        self.filePosLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.filePosStopLabel)
-        self.filePosStopLineEdit = QtGui.QLineEdit(self.filePosBox)
-        self.filePosStopLineEdit.setMinimumSize(QtCore.QSize(50, 0))
-        self.filePosStopLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.filePosStopLineEdit.setObjectName("filePosStopLineEdit")
-        self.filePosLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.filePosStopLineEdit)
-        self.filePosLengthLabel = QtGui.QLabel(self.filePosBox)
-        self.filePosLengthLabel.setObjectName("filePosLengthLabel")
-        self.filePosLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.filePosLengthLabel)
-        self.filePosLengthLineEdit = QtGui.QLineEdit(self.filePosBox)
-        self.filePosLengthLineEdit.setMinimumSize(QtCore.QSize(50, 0))
-        self.filePosLengthLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.filePosLengthLineEdit.setObjectName("filePosLengthLineEdit")
-        self.filePosLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.filePosLengthLineEdit)
-        self.filePosStartLabel = QtGui.QLabel(self.filePosBox)
-        self.filePosStartLabel.setObjectName("filePosStartLabel")
-        self.filePosLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.filePosStartLabel)
-        self.gridLayout_4.addLayout(self.filePosLayout, 0, 0, 1, 1)
-        self.fileTimeLayout = QtGui.QFormLayout()
-        self.fileTimeLayout.setObjectName("fileTimeLayout")
-        self.fileTimeStartLabel = QtGui.QLabel(self.filePosBox)
-        self.fileTimeStartLabel.setObjectName("fileTimeStartLabel")
-        self.fileTimeLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.fileTimeStartLabel)
-        self.fileTimeStartLineEdit = QtGui.QLineEdit(self.filePosBox)
-        self.fileTimeStartLineEdit.setMinimumSize(QtCore.QSize(50, 0))
-        self.fileTimeStartLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.fileTimeStartLineEdit.setObjectName("fileTimeStartLineEdit")
-        self.fileTimeLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.fileTimeStartLineEdit)
-        self.fileTimeStopLabel = QtGui.QLabel(self.filePosBox)
-        self.fileTimeStopLabel.setObjectName("fileTimeStopLabel")
-        self.fileTimeLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.fileTimeStopLabel)
-        self.fileTimeStopLineEdit = QtGui.QLineEdit(self.filePosBox)
-        self.fileTimeStopLineEdit.setMinimumSize(QtCore.QSize(50, 0))
-        self.fileTimeStopLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.fileTimeStopLineEdit.setObjectName("fileTimeStopLineEdit")
-        self.fileTimeLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.fileTimeStopLineEdit)
-        self.fileTimeLengthLabel = QtGui.QLabel(self.filePosBox)
-        self.fileTimeLengthLabel.setObjectName("fileTimeLengthLabel")
-        self.fileTimeLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.fileTimeLengthLabel)
-        self.fileTimeLengthLineEdit = QtGui.QLineEdit(self.filePosBox)
-        self.fileTimeLengthLineEdit.setMinimumSize(QtCore.QSize(50, 0))
-        self.fileTimeLengthLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.fileTimeLengthLineEdit.setObjectName("fileTimeLengthLineEdit")
-        self.fileTimeLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.fileTimeLengthLineEdit)
-        self.gridLayout_4.addLayout(self.fileTimeLayout, 0, 1, 1, 1)
-        self.gridLayout.addWidget(self.filePosBox, 2, 0, 1, 1)
-        self.displayGroupBox = QtGui.QGroupBox(self.centralwidget)
-        self.displayGroupBox.setMinimumSize(QtCore.QSize(170, 0))
-        self.displayGroupBox.setObjectName("displayGroupBox")
-        self.gridLayout_2 = QtGui.QGridLayout(self.displayGroupBox)
-        self.gridLayout_2.setObjectName("gridLayout_2")
-        self.colorComboBox = QtGui.QComboBox(self.displayGroupBox)
-        self.colorComboBox.setObjectName("colorComboBox")
-        self.gridLayout_2.addWidget(self.colorComboBox, 0, 0, 1, 2)
-        self.lineWidthSpinBox = QtGui.QSpinBox(self.displayGroupBox)
-        self.lineWidthSpinBox.setMinimumSize(QtCore.QSize(100, 0))
-        self.lineWidthSpinBox.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.lineWidthSpinBox.setObjectName("lineWidthSpinBox")
-        self.gridLayout_2.addWidget(self.lineWidthSpinBox, 1, 1, 1, 1)
-        self.lineWidthLabel = QtGui.QLabel(self.displayGroupBox)
-        self.lineWidthLabel.setObjectName("lineWidthLabel")
-        self.gridLayout_2.addWidget(self.lineWidthLabel, 1, 0, 1, 1)
-        self.lineStyleLabel = QtGui.QLabel(self.displayGroupBox)
-        self.lineStyleLabel.setObjectName("lineStyleLabel")
-        self.gridLayout_2.addWidget(self.lineStyleLabel, 2, 0, 1, 1)
-        self.lineStyleComboBox = QtGui.QComboBox(self.displayGroupBox)
-        self.lineStyleComboBox.setMinimumSize(QtCore.QSize(100, 0))
-        self.lineStyleComboBox.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.lineStyleComboBox.setObjectName("lineStyleComboBox")
-        self.gridLayout_2.addWidget(self.lineStyleComboBox, 2, 1, 1, 1)
-        self.styleSizeLabel = QtGui.QLabel(self.displayGroupBox)
-        self.styleSizeLabel.setObjectName("styleSizeLabel")
-        self.gridLayout_2.addWidget(self.styleSizeLabel, 3, 0, 1, 1)
-        self.styleSizeSpinBox = QtGui.QSpinBox(self.displayGroupBox)
-        self.styleSizeSpinBox.setMinimumSize(QtCore.QSize(100, 0))
-        self.styleSizeSpinBox.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.styleSizeSpinBox.setObjectName("styleSizeSpinBox")
-        self.gridLayout_2.addWidget(self.styleSizeSpinBox, 3, 1, 1, 1)
-        self.gridLayout.addWidget(self.displayGroupBox, 2, 2, 1, 1)
-        self.sysGroupBox = QtGui.QGroupBox(self.centralwidget)
-        self.sysGroupBox.setMinimumSize(QtCore.QSize(200, 0))
-        self.sysGroupBox.setObjectName("sysGroupBox")
-        self.formLayout = QtGui.QFormLayout(self.sysGroupBox)
-        self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
-        self.formLayout.setObjectName("formLayout")
-        self.sampleRateLabel = QtGui.QLabel(self.sysGroupBox)
-        self.sampleRateLabel.setObjectName("sampleRateLabel")
-        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
-        self.sampleRateLineEdit = QtGui.QLineEdit(self.sysGroupBox)
-        self.sampleRateLineEdit.setMinimumSize(QtCore.QSize(50, 0))
-        self.sampleRateLineEdit.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.sampleRateLineEdit.setObjectName("sampleRateLineEdit")
-        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateLineEdit)
-        self.gridLayout.addWidget(self.sysGroupBox, 2, 1, 1, 1)
-        self.frame = QtGui.QFrame(self.centralwidget)
-        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
-        self.frame.setFrameShadow(QtGui.QFrame.Raised)
-        self.frame.setObjectName("frame")
-        self.gridLayout_3 = QtGui.QGridLayout(self.frame)
-        self.gridLayout_3.setObjectName("gridLayout_3")
-        self.tabGroup = QtGui.QTabWidget(self.frame)
-        self.tabGroup.setMinimumSize(QtCore.QSize(0, 0))
+        self.gridLayout.addWidget(self.plotHBar, 2, 0, 1, 2)
+        self.tabGroup = QtGui.QTabWidget(self.centralwidget)
         self.tabGroup.setObjectName("tabGroup")
         self.timeTab = QtGui.QWidget()
         self.timeTab.setObjectName("timeTab")
@@ -156,14 +41,14 @@ class Ui_MainWindow(object):
         self.formLayout_4 = QtGui.QFormLayout(self.fftPropBox)
         self.formLayout_4.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
         self.formLayout_4.setObjectName("formLayout_4")
-        self.psdFFTSizeLabel = QtGui.QLabel(self.fftPropBox)
-        self.psdFFTSizeLabel.setObjectName("psdFFTSizeLabel")
-        self.formLayout_4.setWidget(0, QtGui.QFormLayout.LabelRole, self.psdFFTSizeLabel)
         self.psdFFTComboBox = QtGui.QComboBox(self.fftPropBox)
         self.psdFFTComboBox.setMinimumSize(QtCore.QSize(96, 0))
         self.psdFFTComboBox.setMaximumSize(QtCore.QSize(96, 16777215))
         self.psdFFTComboBox.setObjectName("psdFFTComboBox")
         self.formLayout_4.setWidget(0, QtGui.QFormLayout.FieldRole, self.psdFFTComboBox)
+        self.psdFFTSizeLabel = QtGui.QLabel(self.fftPropBox)
+        self.psdFFTSizeLabel.setObjectName("psdFFTSizeLabel")
+        self.formLayout_4.setWidget(0, QtGui.QFormLayout.LabelRole, self.psdFFTSizeLabel)
         self.horizontalLayout_2.addWidget(self.fftPropBox)
         self.freqPlot = Qwt5.QwtPlot(self.freqTab)
         self.freqPlot.setObjectName("freqPlot")
@@ -190,11 +75,90 @@ class Ui_MainWindow(object):
         self.specPlot.setObjectName("specPlot")
         self.horizontalLayout_3.addWidget(self.specPlot)
         self.tabGroup.addTab(self.specTab, "")
-        self.gridLayout_3.addWidget(self.tabGroup, 0, 0, 1, 1)
-        self.gridLayout.addWidget(self.frame, 0, 0, 1, 3)
+        self.gridLayout.addWidget(self.tabGroup, 1, 0, 1, 1)
+        self.filePosBox = QtGui.QGroupBox(self.centralwidget)
+        self.filePosBox.setMinimumSize(QtCore.QSize(0, 120))
+        self.filePosBox.setObjectName("filePosBox")
+        self.formLayoutWidget_2 = QtGui.QWidget(self.filePosBox)
+        self.formLayoutWidget_2.setGeometry(QtCore.QRect(0, 20, 160, 92))
+        self.formLayoutWidget_2.setObjectName("formLayoutWidget_2")
+        self.filePosLayout = QtGui.QFormLayout(self.formLayoutWidget_2)
+        self.filePosLayout.setObjectName("filePosLayout")
+        self.filePosStartLabel = QtGui.QLabel(self.formLayoutWidget_2)
+        self.filePosStartLabel.setObjectName("filePosStartLabel")
+        self.filePosLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.filePosStartLabel)
+        self.filePosStartLineEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
+        self.filePosStartLineEdit.setObjectName("filePosStartLineEdit")
+        self.filePosLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.filePosStartLineEdit)
+        self.filePosStopLabel = QtGui.QLabel(self.formLayoutWidget_2)
+        self.filePosStopLabel.setObjectName("filePosStopLabel")
+        self.filePosLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.filePosStopLabel)
+        self.filePosStopLineEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
+        self.filePosStopLineEdit.setObjectName("filePosStopLineEdit")
+        self.filePosLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.filePosStopLineEdit)
+        self.filePosLengthLabel = QtGui.QLabel(self.formLayoutWidget_2)
+        self.filePosLengthLabel.setObjectName("filePosLengthLabel")
+        self.filePosLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.filePosLengthLabel)
+        self.filePosLengthLineEdit = QtGui.QLineEdit(self.formLayoutWidget_2)
+        self.filePosLengthLineEdit.setObjectName("filePosLengthLineEdit")
+        self.filePosLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.filePosLengthLineEdit)
+        self.formLayoutWidget_4 = QtGui.QWidget(self.filePosBox)
+        self.formLayoutWidget_4.setGeometry(QtCore.QRect(180, 20, 231, 92))
+        self.formLayoutWidget_4.setObjectName("formLayoutWidget_4")
+        self.fileTimeLayout = QtGui.QFormLayout(self.formLayoutWidget_4)
+        self.fileTimeLayout.setObjectName("fileTimeLayout")
+        self.fileTimeStartLabel = QtGui.QLabel(self.formLayoutWidget_4)
+        self.fileTimeStartLabel.setObjectName("fileTimeStartLabel")
+        self.fileTimeLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.fileTimeStartLabel)
+        self.fileTimeStartLineEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
+        self.fileTimeStartLineEdit.setObjectName("fileTimeStartLineEdit")
+        self.fileTimeLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.fileTimeStartLineEdit)
+        self.fileTimeStopLabel = QtGui.QLabel(self.formLayoutWidget_4)
+        self.fileTimeStopLabel.setObjectName("fileTimeStopLabel")
+        self.fileTimeLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.fileTimeStopLabel)
+        self.fileTimeStopLineEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
+        self.fileTimeStopLineEdit.setObjectName("fileTimeStopLineEdit")
+        self.fileTimeLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.fileTimeStopLineEdit)
+        self.fileTimeLengthLabel = QtGui.QLabel(self.formLayoutWidget_4)
+        self.fileTimeLengthLabel.setObjectName("fileTimeLengthLabel")
+        self.fileTimeLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.fileTimeLengthLabel)
+        self.fileTimeLengthLineEdit = QtGui.QLineEdit(self.formLayoutWidget_4)
+        self.fileTimeLengthLineEdit.setObjectName("fileTimeLengthLineEdit")
+        self.fileTimeLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.fileTimeLengthLineEdit)
+        self.sysGroupBox = QtGui.QGroupBox(self.filePosBox)
+        self.sysGroupBox.setGeometry(QtCore.QRect(530, 0, 200, 120))
+        self.sysGroupBox.setMinimumSize(QtCore.QSize(200, 0))
+        self.sysGroupBox.setObjectName("sysGroupBox")
+        self.formLayoutWidget_3 = QtGui.QWidget(self.sysGroupBox)
+        self.formLayoutWidget_3.setGeometry(QtCore.QRect(0, 20, 191, 91))
+        self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
+        self.formLayout_2 = QtGui.QFormLayout(self.formLayoutWidget_3)
+        self.formLayout_2.setObjectName("formLayout_2")
+        self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget_3)
+        self.sampleRateLabel.setObjectName("sampleRateLabel")
+        self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
+        self.sampleRateLineEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+        self.sampleRateLineEdit.setMinimumSize(QtCore.QSize(0, 0))
+        self.sampleRateLineEdit.setObjectName("sampleRateLineEdit")
+        self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateLineEdit)
+        self.displayGroupBox = QtGui.QGroupBox(self.filePosBox)
+        self.displayGroupBox.setGeometry(QtCore.QRect(730, 0, 170, 120))
+        self.displayGroupBox.setMinimumSize(QtCore.QSize(170, 0))
+        self.displayGroupBox.setObjectName("displayGroupBox")
+        self.verticalLayoutWidget = QtGui.QWidget(self.displayGroupBox)
+        self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 20, 160, 91))
+        self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
+        self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
+        self.verticalLayout.setObjectName("verticalLayout")
+        self.colorComboBox = QtGui.QComboBox(self.verticalLayoutWidget)
+        self.colorComboBox.setObjectName("colorComboBox")
+        self.verticalLayout.addWidget(self.colorComboBox)
+        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        self.verticalLayout.addItem(spacerItem)
+        self.gridLayout.addWidget(self.filePosBox, 3, 0, 1, 1)
         MainWindow.setCentralWidget(self.centralwidget)
         self.menubar = QtGui.QMenuBar(MainWindow)
-        self.menubar.setGeometry(QtCore.QRect(0, 0, 927, 24))
+        self.menubar.setGeometry(QtCore.QRect(0, 0, 927, 25))
         self.menubar.setObjectName("menubar")
         self.menu_File = QtGui.QMenu(self.menubar)
         self.menu_File.setObjectName("menu_File")
@@ -220,30 +184,28 @@ class Ui_MainWindow(object):
 
     def retranslateUi(self, MainWindow):
         MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
+        self.tabGroup.setTabText(self.tabGroup.indexOf(self.timeTab), QtGui.QApplication.translate("MainWindow", "Time Domain", None, QtGui.QApplication.UnicodeUTF8))
+        self.fftPropBox.setTitle(QtGui.QApplication.translate("MainWindow", "FFT Properties", None, QtGui.QApplication.UnicodeUTF8))
+        self.psdFFTSizeLabel.setText(QtGui.QApplication.translate("MainWindow", "FFT Size", None, QtGui.QApplication.UnicodeUTF8))
+        self.tabGroup.setTabText(self.tabGroup.indexOf(self.freqTab), QtGui.QApplication.translate("MainWindow", "Frequency Domain", None, QtGui.QApplication.UnicodeUTF8))
+        self.groupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Spectrogram Properties", None, QtGui.QApplication.UnicodeUTF8))
+        self.specFFTLabel.setText(QtGui.QApplication.translate("MainWindow", "FFT Size", None, QtGui.QApplication.UnicodeUTF8))
+        self.tabGroup.setTabText(self.tabGroup.indexOf(self.specTab), QtGui.QApplication.translate("MainWindow", "Spectrogram", None, QtGui.QApplication.UnicodeUTF8))
         self.filePosBox.setTitle(QtGui.QApplication.translate("MainWindow", "File Position", None, QtGui.QApplication.UnicodeUTF8))
+        self.filePosStartLabel.setText(QtGui.QApplication.translate("MainWindow", "Start", None, QtGui.QApplication.UnicodeUTF8))
         self.filePosStopLabel.setText(QtGui.QApplication.translate("MainWindow", "Stop", None, QtGui.QApplication.UnicodeUTF8))
         self.filePosLengthLabel.setText(QtGui.QApplication.translate("MainWindow", "Length", None, QtGui.QApplication.UnicodeUTF8))
-        self.filePosStartLabel.setText(QtGui.QApplication.translate("MainWindow", "Start", None, QtGui.QApplication.UnicodeUTF8))
         self.fileTimeStartLabel.setText(QtGui.QApplication.translate("MainWindow", "time start (sec)", None, QtGui.QApplication.UnicodeUTF8))
         self.fileTimeStopLabel.setText(QtGui.QApplication.translate("MainWindow", "time stop (sec)", None, QtGui.QApplication.UnicodeUTF8))
         self.fileTimeLengthLabel.setText(QtGui.QApplication.translate("MainWindow", "time length (sec)", None, QtGui.QApplication.UnicodeUTF8))
-        self.displayGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Display Properties", None, QtGui.QApplication.UnicodeUTF8))
-        self.lineWidthLabel.setText(QtGui.QApplication.translate("MainWindow", "Line Width", None, QtGui.QApplication.UnicodeUTF8))
-        self.lineStyleLabel.setText(QtGui.QApplication.translate("MainWindow", "Line Style", None, QtGui.QApplication.UnicodeUTF8))
-        self.styleSizeLabel.setText(QtGui.QApplication.translate("MainWindow", "Style Size", None, QtGui.QApplication.UnicodeUTF8))
         self.sysGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "System Properties", None, QtGui.QApplication.UnicodeUTF8))
         self.sampleRateLabel.setText(QtGui.QApplication.translate("MainWindow", "Sample Rate", None, QtGui.QApplication.UnicodeUTF8))
-        self.tabGroup.setTabText(self.tabGroup.indexOf(self.timeTab), QtGui.QApplication.translate("MainWindow", "Time Domain", None, QtGui.QApplication.UnicodeUTF8))
-        self.fftPropBox.setTitle(QtGui.QApplication.translate("MainWindow", "FFT Properties", None, QtGui.QApplication.UnicodeUTF8))
-        self.psdFFTSizeLabel.setText(QtGui.QApplication.translate("MainWindow", "FFT Size", None, QtGui.QApplication.UnicodeUTF8))
-        self.tabGroup.setTabText(self.tabGroup.indexOf(self.freqTab), QtGui.QApplication.translate("MainWindow", "Frequency Domain", None, QtGui.QApplication.UnicodeUTF8))
-        self.groupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Spectrogram Properties", None, QtGui.QApplication.UnicodeUTF8))
-        self.specFFTLabel.setText(QtGui.QApplication.translate("MainWindow", "FFT Size", None, QtGui.QApplication.UnicodeUTF8))
-        self.tabGroup.setTabText(self.tabGroup.indexOf(self.specTab), QtGui.QApplication.translate("MainWindow", "Spectrogram", None, QtGui.QApplication.UnicodeUTF8))
+        self.displayGroupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Display Properties", None, QtGui.QApplication.UnicodeUTF8))
         self.menu_File.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
         self.action_open.setText(QtGui.QApplication.translate("MainWindow", "&Open", None, QtGui.QApplication.UnicodeUTF8))
         self.action_open.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+O", None, QtGui.QApplication.UnicodeUTF8))
         self.action_exit.setText(QtGui.QApplication.translate("MainWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
         self.action_reload.setText(QtGui.QApplication.translate("MainWindow", "&Reload", None, QtGui.QApplication.UnicodeUTF8))
+        self.action_reload.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+R", None, QtGui.QApplication.UnicodeUTF8))
 
 from PyQt4 import Qwt5
index 7244d24c9d2d878191e02e0b2f599ea229fd0ca8..55c72fda26cedca495791676154fb7f9d2ac370e 100644 (file)
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
-  <property name="geometry" >
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>927</width>
-    <height>718</height>
+    <height>696</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>MainWindow</string>
   </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" name="gridLayout" >
-    <item row="1" column="0" colspan="3" >
-     <widget class="QScrollBar" name="plotHBar" >
-      <property name="orientation" >
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="2" column="0" colspan="2">
+     <widget class="QScrollBar" name="plotHBar">
+      <property name="orientation">
        <enum>Qt::Horizontal</enum>
       </property>
      </widget>
     </item>
-    <item row="2" column="0" >
-     <widget class="QGroupBox" name="filePosBox" >
-      <property name="minimumSize" >
+    <item row="1" column="0">
+     <widget class="QTabWidget" name="tabGroup">
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="timeTab">
+       <attribute name="title">
+        <string>Time Domain</string>
+       </attribute>
+       <layout class="QHBoxLayout" name="horizontalLayout">
+        <item>
+         <widget class="QwtPlot" name="timePlot"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="freqTab">
+       <attribute name="title">
+        <string>Frequency Domain</string>
+       </attribute>
+       <layout class="QHBoxLayout" name="horizontalLayout_2">
+        <item>
+         <widget class="QGroupBox" name="fftPropBox">
+          <property name="minimumSize">
+           <size>
+            <width>160</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="title">
+           <string>FFT Properties</string>
+          </property>
+          <layout class="QFormLayout" name="formLayout_4">
+           <property name="fieldGrowthPolicy">
+            <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+           </property>
+           <item row="0" column="1">
+            <widget class="QComboBox" name="psdFFTComboBox">
+             <property name="minimumSize">
+              <size>
+               <width>96</width>
+               <height>0</height>
+              </size>
+             </property>
+             <property name="maximumSize">
+              <size>
+               <width>96</width>
+               <height>16777215</height>
+              </size>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="0">
+            <widget class="QLabel" name="psdFFTSizeLabel">
+             <property name="text">
+              <string>FFT Size</string>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <widget class="QwtPlot" name="freqPlot"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="specTab">
+       <attribute name="title">
+        <string>Spectrogram</string>
+       </attribute>
+       <layout class="QHBoxLayout" name="horizontalLayout_3">
+        <item>
+         <widget class="QGroupBox" name="groupBox">
+          <property name="title">
+           <string>Spectrogram Properties</string>
+          </property>
+          <layout class="QFormLayout" name="formLayout_3">
+           <item row="1" column="0">
+            <widget class="QLabel" name="specFFTLabel">
+             <property name="text">
+              <string>FFT Size</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1">
+            <widget class="QComboBox" name="specFFTComboBox">
+             <property name="minimumSize">
+              <size>
+               <width>96</width>
+               <height>0</height>
+              </size>
+             </property>
+             <property name="maximumSize">
+              <size>
+               <width>96</width>
+               <height>16777215</height>
+              </size>
+             </property>
+            </widget>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <widget class="QwtPlot" name="specPlot"/>
+        </item>
+       </layout>
+       <zorder>specPlot</zorder>
+       <zorder>groupBox</zorder>
+      </widget>
+     </widget>
+    </item>
+    <item row="3" column="0">
+     <widget class="QGroupBox" name="filePosBox">
+      <property name="minimumSize">
        <size>
         <width>0</width>
         <height>120</height>
        </size>
       </property>
-      <property name="title" >
+      <property name="title">
        <string>File Position</string>
       </property>
-      <layout class="QGridLayout" name="gridLayout_4" >
-       <item row="0" column="0" >
-        <layout class="QFormLayout" name="filePosLayout" >
-         <item row="0" column="1" >
-          <widget class="QLineEdit" name="filePosStartLineEdit" >
-           <property name="minimumSize" >
-            <size>
-             <width>50</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="maximumSize" >
-            <size>
-             <width>100</width>
-             <height>16777215</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0" >
-          <widget class="QLabel" name="filePosStopLabel" >
-           <property name="text" >
-            <string>Stop</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1" >
-          <widget class="QLineEdit" name="filePosStopLineEdit" >
-           <property name="minimumSize" >
-            <size>
-             <width>50</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="maximumSize" >
-            <size>
-             <width>100</width>
-             <height>16777215</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="0" >
-          <widget class="QLabel" name="filePosLengthLabel" >
-           <property name="text" >
-            <string>Length</string>
+      <widget class="QWidget" name="formLayoutWidget_2">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>20</y>
+         <width>160</width>
+         <height>92</height>
+        </rect>
+       </property>
+       <layout class="QFormLayout" name="filePosLayout">
+        <item row="0" column="0">
+         <widget class="QLabel" name="filePosStartLabel">
+          <property name="text">
+           <string>Start</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="QLineEdit" name="filePosStartLineEdit"/>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="filePosStopLabel">
+          <property name="text">
+           <string>Stop</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QLineEdit" name="filePosStopLineEdit"/>
+        </item>
+        <item row="2" column="0">
+         <widget class="QLabel" name="filePosLengthLabel">
+          <property name="text">
+           <string>Length</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1">
+         <widget class="QLineEdit" name="filePosLengthLineEdit"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="formLayoutWidget_4">
+       <property name="geometry">
+        <rect>
+         <x>180</x>
+         <y>20</y>
+         <width>231</width>
+         <height>92</height>
+        </rect>
+       </property>
+       <layout class="QFormLayout" name="fileTimeLayout">
+        <item row="0" column="0">
+         <widget class="QLabel" name="fileTimeStartLabel">
+          <property name="text">
+           <string>time start (sec)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="QLineEdit" name="fileTimeStartLineEdit"/>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="fileTimeStopLabel">
+          <property name="text">
+           <string>time stop (sec)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QLineEdit" name="fileTimeStopLineEdit"/>
+        </item>
+        <item row="2" column="0">
+         <widget class="QLabel" name="fileTimeLengthLabel">
+          <property name="text">
+           <string>time length (sec)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1">
+         <widget class="QLineEdit" name="fileTimeLengthLineEdit"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QGroupBox" name="sysGroupBox">
+       <property name="geometry">
+        <rect>
+         <x>530</x>
+         <y>0</y>
+         <width>200</width>
+         <height>120</height>
+        </rect>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>200</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="title">
+        <string>System Properties</string>
+       </property>
+       <widget class="QWidget" name="formLayoutWidget_3">
+        <property name="geometry">
+         <rect>
+          <x>0</x>
+          <y>20</y>
+          <width>191</width>
+          <height>91</height>
+         </rect>
+        </property>
+        <layout class="QFormLayout" name="formLayout_2">
+         <item row="0" column="0">
+          <widget class="QLabel" name="sampleRateLabel">
+           <property name="text">
+            <string>Sample Rate</string>
            </property>
           </widget>
          </item>
-         <item row="2" column="1" >
-          <widget class="QLineEdit" name="filePosLengthLineEdit" >
-           <property name="minimumSize" >
+         <item row="0" column="1">
+          <widget class="QLineEdit" name="sampleRateLineEdit">
+           <property name="minimumSize">
             <size>
-             <width>50</width>
+             <width>0</width>
              <height>0</height>
             </size>
            </property>
-           <property name="maximumSize" >
-            <size>
-             <width>100</width>
-             <height>16777215</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="0" >
-          <widget class="QLabel" name="filePosStartLabel" >
-           <property name="text" >
-            <string>Start</string>
-           </property>
           </widget>
          </item>
         </layout>
-       </item>
-       <item row="0" column="1" >
-        <layout class="QFormLayout" name="fileTimeLayout" >
-         <item row="0" column="0" >
-          <widget class="QLabel" name="fileTimeStartLabel" >
-           <property name="text" >
-            <string>time start (sec)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1" >
-          <widget class="QLineEdit" name="fileTimeStartLineEdit" >
-           <property name="minimumSize" >
-            <size>
-             <width>50</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="maximumSize" >
-            <size>
-             <width>100</width>
-             <height>16777215</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0" >
-          <widget class="QLabel" name="fileTimeStopLabel" >
-           <property name="text" >
-            <string>time stop (sec)</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1" >
-          <widget class="QLineEdit" name="fileTimeStopLineEdit" >
-           <property name="minimumSize" >
-            <size>
-             <width>50</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="maximumSize" >
-            <size>
-             <width>100</width>
-             <height>16777215</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="0" >
-          <widget class="QLabel" name="fileTimeLengthLabel" >
-           <property name="text" >
-            <string>time length (sec)</string>
-           </property>
-          </widget>
+       </widget>
+      </widget>
+      <widget class="QGroupBox" name="displayGroupBox">
+       <property name="geometry">
+        <rect>
+         <x>730</x>
+         <y>0</y>
+         <width>170</width>
+         <height>120</height>
+        </rect>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>170</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="title">
+        <string>Display Properties</string>
+       </property>
+       <widget class="QWidget" name="verticalLayoutWidget">
+        <property name="geometry">
+         <rect>
+          <x>0</x>
+          <y>20</y>
+          <width>160</width>
+          <height>91</height>
+         </rect>
+        </property>
+        <layout class="QVBoxLayout" name="verticalLayout">
+         <item>
+          <widget class="QComboBox" name="colorComboBox"/>
          </item>
-         <item row="2" column="1" >
-          <widget class="QLineEdit" name="fileTimeLengthLineEdit" >
-           <property name="minimumSize" >
-            <size>
-             <width>50</width>
-             <height>0</height>
-            </size>
+         <item>
+          <spacer name="verticalSpacer">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
            </property>
-           <property name="maximumSize" >
+           <property name="sizeHint" stdset="0">
             <size>
-             <width>100</width>
-             <height>16777215</height>
+             <width>20</width>
+             <height>40</height>
             </size>
            </property>
-          </widget>
+          </spacer>
          </item>
         </layout>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item row="2" column="2" >
-     <widget class="QGroupBox" name="displayGroupBox" >
-      <property name="minimumSize" >
-       <size>
-        <width>170</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="title" >
-       <string>Display Properties</string>
-      </property>
-      <layout class="QGridLayout" name="gridLayout_2" >
-       <item row="0" column="0" colspan="2" >
-        <widget class="QComboBox" name="colorComboBox" />
-       </item>
-       <item row="1" column="1" >
-        <widget class="QSpinBox" name="lineWidthSpinBox" >
-         <property name="minimumSize" >
-          <size>
-           <width>100</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="maximumSize" >
-          <size>
-           <width>100</width>
-           <height>16777215</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="0" >
-        <widget class="QLabel" name="lineWidthLabel" >
-         <property name="text" >
-          <string>Line Width</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0" >
-        <widget class="QLabel" name="lineStyleLabel" >
-         <property name="text" >
-          <string>Line Style</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1" >
-        <widget class="QComboBox" name="lineStyleComboBox" >
-         <property name="minimumSize" >
-          <size>
-           <width>100</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="maximumSize" >
-          <size>
-           <width>100</width>
-           <height>16777215</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="0" >
-        <widget class="QLabel" name="styleSizeLabel" >
-         <property name="text" >
-          <string>Style Size</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1" >
-        <widget class="QSpinBox" name="styleSizeSpinBox" >
-         <property name="minimumSize" >
-          <size>
-           <width>100</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="maximumSize" >
-          <size>
-           <width>100</width>
-           <height>16777215</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item row="2" column="1" >
-     <widget class="QGroupBox" name="sysGroupBox" >
-      <property name="minimumSize" >
-       <size>
-        <width>200</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="title" >
-       <string>System Properties</string>
-      </property>
-      <layout class="QFormLayout" name="formLayout" >
-       <property name="fieldGrowthPolicy" >
-        <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
-       </property>
-       <item row="0" column="0" >
-        <widget class="QLabel" name="sampleRateLabel" >
-         <property name="text" >
-          <string>Sample Rate</string>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1" >
-        <widget class="QLineEdit" name="sampleRateLineEdit" >
-         <property name="minimumSize" >
-          <size>
-           <width>50</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="maximumSize" >
-          <size>
-           <width>100</width>
-           <height>16777215</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-    <item row="0" column="0" colspan="3" >
-     <widget class="QFrame" name="frame" >
-      <property name="frameShape" >
-       <enum>QFrame::StyledPanel</enum>
-      </property>
-      <property name="frameShadow" >
-       <enum>QFrame::Raised</enum>
-      </property>
-      <layout class="QGridLayout" name="gridLayout_3" >
-       <item row="0" column="0" >
-        <widget class="QTabWidget" name="tabGroup" >
-         <property name="minimumSize" >
-          <size>
-           <width>0</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="currentIndex" >
-          <number>0</number>
-         </property>
-         <widget class="QWidget" name="timeTab" >
-          <attribute name="title" >
-           <string>Time Domain</string>
-          </attribute>
-          <layout class="QHBoxLayout" name="horizontalLayout" >
-           <item>
-            <widget class="QwtPlot" name="timePlot" />
-           </item>
-          </layout>
-          <zorder>timePlot</zorder>
-         </widget>
-         <widget class="QWidget" name="freqTab" >
-          <attribute name="title" >
-           <string>Frequency Domain</string>
-          </attribute>
-          <layout class="QHBoxLayout" name="horizontalLayout_2" >
-           <item>
-            <widget class="QGroupBox" name="fftPropBox" >
-             <property name="minimumSize" >
-              <size>
-               <width>160</width>
-               <height>0</height>
-              </size>
-             </property>
-             <property name="title" >
-              <string>FFT Properties</string>
-             </property>
-             <layout class="QFormLayout" name="formLayout_4" >
-              <property name="fieldGrowthPolicy" >
-               <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
-              </property>
-              <item row="0" column="0" >
-               <widget class="QLabel" name="psdFFTSizeLabel" >
-                <property name="text" >
-                 <string>FFT Size</string>
-                </property>
-               </widget>
-              </item>
-              <item row="0" column="1" >
-               <widget class="QComboBox" name="psdFFTComboBox" >
-                <property name="minimumSize" >
-                 <size>
-                  <width>96</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="maximumSize" >
-                 <size>
-                  <width>96</width>
-                  <height>16777215</height>
-                 </size>
-                </property>
-               </widget>
-              </item>
-             </layout>
-             <zorder>psdFFTSizeLabel</zorder>
-             <zorder>psdFFTComboBox</zorder>
-            </widget>
-           </item>
-           <item>
-            <widget class="QwtPlot" name="freqPlot" />
-           </item>
-          </layout>
-         </widget>
-         <widget class="QWidget" name="specTab" >
-          <attribute name="title" >
-           <string>Spectrogram</string>
-          </attribute>
-          <layout class="QHBoxLayout" name="horizontalLayout_3" >
-           <item>
-            <widget class="QGroupBox" name="groupBox" >
-             <property name="title" >
-              <string>Spectrogram Properties</string>
-             </property>
-             <layout class="QFormLayout" name="formLayout_3" >
-              <item row="1" column="0" >
-               <widget class="QLabel" name="specFFTLabel" >
-                <property name="text" >
-                 <string>FFT Size</string>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="1" >
-               <widget class="QComboBox" name="specFFTComboBox" >
-                <property name="minimumSize" >
-                 <size>
-                  <width>96</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="maximumSize" >
-                 <size>
-                  <width>96</width>
-                  <height>16777215</height>
-                 </size>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </widget>
-           </item>
-           <item>
-            <widget class="QwtPlot" name="specPlot" />
-           </item>
-          </layout>
-          <zorder>specPlot</zorder>
-          <zorder>groupBox</zorder>
-         </widget>
-        </widget>
-       </item>
-      </layout>
-      <zorder>tabGroup</zorder>
+       </widget>
+      </widget>
      </widget>
     </item>
    </layout>
   </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
      <width>927</width>
-     <height>24</height>
+     <height>25</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menu_File" >
-    <property name="title" >
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
      <string>&amp;File</string>
     </property>
-    <addaction name="action_open" />
-    <addaction name="action_reload" />
-    <addaction name="action_exit" />
+    <addaction name="action_open"/>
+    <addaction name="action_reload"/>
+    <addaction name="action_exit"/>
    </widget>
-   <addaction name="menu_File" />
+   <addaction name="menu_File"/>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <action name="action_open" >
-   <property name="text" >
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="action_open">
+   <property name="text">
     <string>&amp;Open</string>
    </property>
-   <property name="shortcut" >
+   <property name="shortcut">
     <string>Ctrl+O</string>
    </property>
   </action>
-  <action name="action_exit" >
-   <property name="text" >
+  <action name="action_exit">
+   <property name="text">
     <string>E&amp;xit</string>
    </property>
   </action>
-  <action name="action_reload" >
-   <property name="text" >
+  <action name="action_reload">
+   <property name="text">
     <string>&amp;Reload</string>
    </property>
+   <property name="shortcut">
+    <string>Ctrl+R</string>
+   </property>
   </action>
  </widget>
  <customwidgets>
    <receiver>MainWindow</receiver>
    <slot>close()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>-1</x>
      <y>-1</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>399</x>
      <y>347</y>
     </hint>
index e56e3f2ad272d6ee4b452a041119aaf1ac66545c..f9375d31cb6e2f124505f3526a8f67ed2f766cfc 100644 (file)
@@ -34,7 +34,7 @@
 #include <iostream>
 #include <gruel/inet.h>
 #include <cstdio>
-
+#include <cstring>
 
 #define VERBOSE 1              // define to 0 or 1
 
index a75f6810d8ce0732a7d9984ba8076ffd5566edd9..17a7dc0de550fa8ae5fa32da1f938d3f5fd7edd8 100644 (file)
@@ -216,12 +216,13 @@ def get_min_max(samples):
        @param samples the array of real values
        @return a tuple of min, max
        """
-       scale_factor = 3
+       factor = 2.0
        mean = numpy.average(samples)
-       rms = numpy.max([scale_factor*((numpy.sum((samples-mean)**2)/len(samples))**.5), .1])
-       min_val = mean - rms
-       max_val = mean + rms
-       return min_val, max_val
+       std = numpy.std(samples)
+       fft = numpy.abs(numpy.fft.fft(samples - mean))
+       envelope = 2*numpy.max(fft)/len(samples)
+       ampl = max(std, envelope) or 0.1
+       return mean - factor*ampl, mean + factor*ampl
 
 def get_min_max_fft(fft_samps):
        """
index b128a4a989a181291226b354992da2523c63b47e..f7c7caf07691be5e80be1fa1279277b35b4a1e82 100644 (file)
@@ -64,6 +64,8 @@ class control_panel(wx.Panel):
                """
                self.parent = parent
                wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
+               parent[SHOW_CONTROL_PANEL_KEY] = True
+               parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
                control_box = forms.static_box_sizer(
                        parent=self, label='Options',
                        bold=True, orient=wx.VERTICAL,
index 8ff7fa8fee848f44870a23481375270133b179c3..825f71c3223369ac43ee263685a4bc38c84702a6 100644 (file)
@@ -69,3 +69,4 @@ MINIMUM_KEY = 'minimum'
 NUM_BINS_KEY = 'num_bins'
 FRAME_SIZE_KEY = 'frame_size'
 CHANNEL_OPTIONS_KEY = 'channel_options'
+SHOW_CONTROL_PANEL_KEY = 'show_control_panel'
index e025c28dd71872679776064878c26be1970a03e7..4ee5520f76167271af35a699266fd20521e9e6c3 100644 (file)
@@ -64,6 +64,8 @@ class control_panel(wx.Panel):
                """
                self.parent = parent
                wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
+               parent[SHOW_CONTROL_PANEL_KEY] = True
+               parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
                control_box = wx.BoxSizer(wx.VERTICAL)
                control_box.AddStretchSpacer()
                #checkboxes for average and peak hold
index 5f434d70ee79064dbe952882c0c6055d1bccdc06..a1b520f9c121acbc3d9e7498c2b4c0fbcfd7c445 100644 (file)
@@ -52,6 +52,8 @@ class control_panel(wx.Panel):
                """
                self.parent = parent
                wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
+               parent[SHOW_CONTROL_PANEL_KEY] = True
+               parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
                control_box = wx.BoxSizer(wx.VERTICAL)
                SIZE = (100, -1)
                control_box = forms.static_box_sizer(
index 8a8249764c03e94acdb573b6cbbeed42aaeff3dd..ab9d1ebc004e064f6ec66de9641b408a60244546 100644 (file)
@@ -58,6 +58,8 @@ class control_panel(wx.Panel):
                """
                self.parent = parent
                wx.Panel.__init__(self, parent)
+               parent[SHOW_CONTROL_PANEL_KEY] = True
+               parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
                control_box = wx.BoxSizer(wx.VERTICAL)
                #checkboxes for average and peak hold
                control_box.AddStretchSpacer()
index 449046402ca2a08c486e4fe3f165b91ebc0454c9..08a025e1ef3cef278a7491dfc0a281abfa738eea 100644 (file)
@@ -82,6 +82,8 @@ class control_panel(wx.Panel):
                WIDTH = 90
                self.parent = parent
                wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
+               parent[SHOW_CONTROL_PANEL_KEY] = True
+               parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
                control_box = wx.BoxSizer(wx.VERTICAL)
                ##################################################
                # Axes Options
@@ -374,6 +376,7 @@ class scope_window(wx.Panel, pubsub.pubsub):
                sample_rate_key,
                t_scale,
                v_scale,
+               v_offset,
                xy_mode,
                ac_couple_key,
                trigger_level_key,
@@ -413,8 +416,8 @@ class scope_window(wx.Panel, pubsub.pubsub):
                self[X_PER_DIV_KEY] = v_scale
                self[Y_PER_DIV_KEY] = v_scale
                self[T_OFF_KEY] = 0
-               self[X_OFF_KEY] = 0
-               self[Y_OFF_KEY] = 0
+               self[X_OFF_KEY] = v_offset
+               self[Y_OFF_KEY] = v_offset
                self[T_DIVS_KEY] = 8
                self[X_DIVS_KEY] = 8
                self[Y_DIVS_KEY] = 8
index 2882488e3dabcfa341c2eaf165b0b0d3a32bd888..358361de62d6953ee6f969ee1db7dd5e64a17a20 100644 (file)
@@ -71,6 +71,7 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb):
                size=scope_window.DEFAULT_WIN_SIZE,
                v_scale=0,
                t_scale=0,
+               v_offset=0,
                xy_mode=False,
                ac_couple=False,
                num_inputs=1,
@@ -119,6 +120,7 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb):
                        sample_rate_key=SAMPLE_RATE_KEY,
                        t_scale=t_scale,
                        v_scale=v_scale,
+                       v_offset=v_offset,
                        xy_mode=xy_mode,
                        ac_couple_key=AC_COUPLE_KEY,
                        trigger_level_key=TRIGGER_LEVEL_KEY,
index 28e67a83006aa6af3123107fe4d3f79db06062d6..b7904e4d9742412269345dd870c8bb6657c9f89f 100644 (file)
@@ -41,6 +41,7 @@ DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'waterfall_rate', 30)
 DEFAULT_WIN_SIZE = (600, 300)
 DIV_LEVELS = (1, 2, 5, 10, 20)
 MIN_DYNAMIC_RANGE, MAX_DYNAMIC_RANGE = 10, 200
+DYNAMIC_RANGE_STEP = 10.
 COLOR_MODES = (
        ('RGB1', 'rgb1'),
        ('RGB2', 'rgb2'),
@@ -63,6 +64,8 @@ class control_panel(wx.Panel):
                """
                self.parent = parent
                wx.Panel.__init__(self, parent, style=wx.SUNKEN_BORDER)
+               parent[SHOW_CONTROL_PANEL_KEY] = True
+               parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
                control_box = wx.BoxSizer(wx.VERTICAL)
                control_box.AddStretchSpacer()
                options_box = forms.static_box_sizer(
@@ -143,13 +146,13 @@ class control_panel(wx.Panel):
        def _on_clear_button(self, event):
                self.parent[NUM_LINES_KEY] = self.parent[NUM_LINES_KEY]
        def _on_incr_dynamic_range(self, event):
-               self.parent[DYNAMIC_RANGE_KEY] = min(self.parent[DYNAMIC_RANGE_KEY] + 10, MAX_DYNAMIC_RANGE)
+               self.parent[DYNAMIC_RANGE_KEY] = min(MAX_DYNAMIC_RANGE, common.get_clean_incr(self.parent[DYNAMIC_RANGE_KEY]))
        def _on_decr_dynamic_range(self, event):
-               self.parent[DYNAMIC_RANGE_KEY] = max(self.parent[DYNAMIC_RANGE_KEY] - 10, MIN_DYNAMIC_RANGE)
+               self.parent[DYNAMIC_RANGE_KEY] = max(MIN_DYNAMIC_RANGE, common.get_clean_decr(self.parent[DYNAMIC_RANGE_KEY]))
        def _on_incr_ref_level(self, event):
-               self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] + self.parent[DYNAMIC_RANGE_KEY]*.1
+               self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] + self.parent[DYNAMIC_RANGE_KEY]/DYNAMIC_RANGE_STEP
        def _on_decr_ref_level(self, event):
-               self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] - self.parent[DYNAMIC_RANGE_KEY]*.1
+               self.parent[REF_LEVEL_KEY] = self.parent[REF_LEVEL_KEY] - self.parent[DYNAMIC_RANGE_KEY]/DYNAMIC_RANGE_STEP
        def _on_incr_time_scale(self, event):
                old_rate = self.parent[FRAME_RATE_KEY]
                self.parent[FRAME_RATE_KEY] *= 0.75
@@ -239,8 +242,8 @@ class waterfall_window(wx.Panel, pubsub.pubsub):
                if not len(self.samples): return
                min_level, max_level = common.get_min_max_fft(self.samples)
                #set the range and level
-               self[REF_LEVEL_KEY] = max_level
-               self[DYNAMIC_RANGE_KEY] = max_level - min_level
+               self[DYNAMIC_RANGE_KEY] = common.get_clean_num(max_level - min_level)
+               self[REF_LEVEL_KEY] = DYNAMIC_RANGE_STEP*round(.5+max_level/DYNAMIC_RANGE_STEP)
 
        def handle_msg(self, msg):
                """
index 28408c4a830e3f9d1c6e6aae6af38b73f451741a..30b955a1efbb3a47419303d7de5d74b0b9940127 100644 (file)
@@ -25,7 +25,6 @@ if PYTHON
 SUBDIRS = \
        base \
        blocks \
-       examples \
        grc_gnuradio \
        gui \
        python \
index df3479761a32d137d7e0267b5b42bc769ad1cb1b..61c0038038e5ce8ef6dcd7d4466380d035dde556 100644 (file)
@@ -145,6 +145,7 @@ dist_ourdata_DATA = \
        gr_packed_to_unpacked_xx.xml \
        gr_peak_detector2_fb.xml \
        gr_peak_detector_xb.xml \
+       gr_pfb_clock_sync.xml \
        gr_phase_modulator_fc.xml \
        gr_pll_carriertracking_cc.xml \
        gr_pll_freqdet_cf.xml \
@@ -167,6 +168,7 @@ dist_ourdata_DATA = \
        gr_simple_squelch_cc.xml \
        gr_single_pole_iir_filter_xx.xml \
        gr_skiphead.xml \
+       gr_stream_mux.xml \
        gr_stream_to_streams.xml \
        gr_stream_to_vector.xml \
        gr_streams_to_stream.xml \
index 6fec0be675871d9cbe4cc263100b289ee5107fca..187ca196a1ea2d27507eaed2ed64eaacc85800fc 100644 (file)
 
                <block>gr_stream_to_vector</block>
                <block>gr_vector_to_stream</block>
-               
+
                <block>blks2_stream_to_vector_decimator</block>
+
+               <block>gr_stream_mux</block>
        </cat>
        <cat>
                <name>Misc Conversions</name>
        <cat>
                <name>Synchronizers</name>
                <block>gr_clock_recovery_mm_xx</block>
+               <block>gr_pfb_clock_sync_ccf</block>
 
                <block>gr_costas_loop_cc</block>
                <block>gr_dd_mpsk_sync_cc</block>
                <block>band_pass_filter</block>
                <block>band_reject_filter</block>
                <block>root_raised_cosine_filter</block>
-               <!-- Filters that take taps as aruments -->
+               <!-- Filters that take taps as arguments -->
                <block>gr_fir_filter_xxx</block>
                <block>gr_interp_fir_filter_xxx</block>
                <block>gr_fft_filter_xxx</block>
                <!-- Filter banks -->
                <block>blks2_synthesis_filterbank</block>
                <block>blks2_analysis_filterbank</block>
-               <!-- Polyphase filers -->
+               <!-- Polyphase filters -->
                <block>blks2_pfb_arb_resampler_ccf</block>
                <!-- Other filters -->
                <block>gr_single_pole_iir_filter_xx</block>
index b54e710ef96bb974bda3d18f82b3f514f6aa675b..e9da38e9a5604a5f402e7c6dc3d15a19481bdcda 100644 (file)
                <value>2</value>
                <type>int</type>
        </param>
+       <param>
+               <name>Num Ports</name>
+               <key>num_ports</key>
+               <value>1</value>
+               <type>int</type>
+       </param>
+       <check>$num_ports &gt; 0</check>
        <sink>
                <name>in</name>
                <type>$in_type</type>
+               <nports>$num_ports</nports>
        </sink>
        <source>
                <name>out</name>
                <type>$out_type</type>
+               <nports>$num_ports</nports>
        </source>
 </block>
index 757f143036f0175b0e7b51d4cbfd89768928beac..8b12eaca784e155e69bdd709e9bf4239a04dc0fa 100644 (file)
@@ -46,6 +46,14 @@ self.$(id).set_enabled($enabled)</make>
                <key>enabled</key>
                <value>True</value>
                <type>bool</type>
+               <option>
+                       <name>Enabled</name>
+                       <key>True</key>
+               </option>
+               <option>
+                       <name>Disabled</name>
+                       <key>False</key>
+               </option>
        </param>
        <param>
                <name>Vec Length</name>
index 64a774defa36612720b39a17721f684b1888953b..5cc411a7820b17811481a741f2027ebf631d2ef6 100644 (file)
                <value>0</value>
                <type>int</type>
        </param>
+       <param>
+               <name>Num Ports</name>
+               <key>num_ports</key>
+               <value>1</value>
+               <type>int</type>
+       </param>
        <param>
                <name>Vec Length</name>
                <key>vlen</key>
                <value>1</value>
                <type>int</type>
        </param>
+       <check>$num_ports &gt; 0</check>
        <check>$vlen &gt; 0</check>
        <sink>
                <name>in</name>
                <type>$type</type>
                <vlen>$vlen</vlen>
+               <nports>$num_ports</nports>
        </sink>
        <source>
                <name>out</name>
                <type>$type</type>
                <vlen>$vlen</vlen>
+               <nports>$num_ports</nports>
        </source>
 </block>
index 5fd9729a4097f8a66a87181ae6ea1ba54eb4c32a..c1477dd9ca882c879fcf0052d2ea0bc88bb808c8 100644 (file)
@@ -38,7 +38,7 @@
        <param>
                <name>Endianness</name>
                <key>endianness</key>
-               <type>enum</type>
+               <type>int</type>
                <option>
                        <name>MSB</name>
                        <key>gr.GR_MSB_FIRST</key>
                        <key>gr.GR_LSB_FIRST</key>
                </option>
        </param>
+       <param>
+               <name>Num Ports</name>
+               <key>num_ports</key>
+               <value>1</value>
+               <type>int</type>
+       </param>
+       <check>$num_ports &gt; 0</check>
        <sink>
                <name>in</name>
                <type>$type</type>
+               <nports>$num_ports</nports>
        </sink>
        <source>
                <name>out</name>
                <type>$type</type>
+               <nports>$num_ports</nports>
        </source>
 </block>
diff --git a/grc/blocks/gr_pfb_clock_sync.xml b/grc/blocks/gr_pfb_clock_sync.xml
new file mode 100644 (file)
index 0000000..9cb909a
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+## Polyphase Filter based Clock Sync
+###################################################
+ -->
+<block>
+       <name>Polyphase Clock Sync</name>
+       <key>gr_pfb_clock_sync_ccf</key>
+       <import>from gnuradio import gr</import>
+       <make>gr.pfb_clock_sync_ccf($sps, $alpha, $taps, $filter_size, $init_phase, $max_dev)
+self.$(id).set_beta($beta)</make>
+       <callback>set_taps($taps)</callback>
+       <callback>set_alpha($alpha)</callback>
+       <callback>set_beta($beta)</callback>
+
+       <param>
+               <name>Samples/Symbol</name>
+               <key>sps</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Alpha</name>
+               <key>alpha</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Beta</name>
+               <key>beta</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Taps</name>
+               <key>taps</key>
+               <type>real_vector</type>
+       </param>
+       <param>
+               <name>Filter Size</name>
+               <key>filter_size</key>
+               <type>int</type>
+       </param>
+       <param>
+               <name>Initial Phase</name>
+               <key>init_phase</key>
+               <type>real</type>
+       </param>
+       <param>
+               <name>Maximum Rate Deviation</name>
+               <key>max_dev</key>
+               <type>real</type>
+       </param>
+       <sink>
+               <name>in</name>
+               <type>complex</type>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>complex</type>
+       </source>
+       <source>
+               <name>err</name>
+               <type>float</type>
+               <optional>1</optional>
+       </source>
+       <source>
+               <name>rate</name>
+               <type>float</type>
+               <optional>1</optional>
+       </source>
+       <source>
+               <name>phase</name>
+               <type>float</type>
+               <optional>1</optional>
+       </source>
+</block>
diff --git a/grc/blocks/gr_stream_mux.xml b/grc/blocks/gr_stream_mux.xml
new file mode 100644 (file)
index 0000000..8efe7b6
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Stream Mux:
+##     all types, many inputs, only one output
+###################################################
+ -->
+<block>
+       <name>Stream Mux</name>
+       <key>gr_stream_mux</key>
+       <import>from gnuradio import gr</import>
+       <make>gr.stream_mux($type.size*$vlen, $lengths)</make>
+       <param>
+               <name>Type</name>
+               <key>type</key>
+               <type>enum</type>
+               <option>
+                       <name>Complex</name>
+                       <key>complex</key>
+                       <opt>size:gr.sizeof_gr_complex</opt>
+               </option>
+               <option>
+                       <name>Float</name>
+                       <key>float</key>
+                       <opt>size:gr.sizeof_float</opt>
+               </option>
+               <option>
+                       <name>Int</name>
+                       <key>int</key>
+                       <opt>size:gr.sizeof_int</opt>
+               </option>
+               <option>
+                       <name>Short</name>
+                       <key>short</key>
+                       <opt>size:gr.sizeof_short</opt>
+               </option>
+               <option>
+                       <name>Byte</name>
+                       <key>byte</key>
+                       <opt>size:gr.sizeof_char</opt>
+               </option>
+       </param>
+       <param>
+               <name>Lengths</name>
+               <key>lengths</key>
+               <value>1, 1</value>
+               <type>int_vector</type>
+       </param>
+       <param>
+               <name>Num Inputs</name>
+               <key>num_inputs</key>
+               <value>2</value>
+               <type>int</type>
+       </param>
+       <param>
+               <name>Vec Length</name>
+               <key>vlen</key>
+               <value>1</value>
+               <type>int</type>
+       </param>
+       <check>$num_inputs &gt; 0</check>
+       <check>$num_inputs == len($lengths)</check>
+       <check>$vlen &gt; 0</check>
+       <sink>
+               <name>in</name>
+               <type>$type</type>
+               <vlen>$vlen</vlen>
+               <nports>$num_inputs</nports>
+       </sink>
+       <source>
+               <name>out</name>
+               <type>$type</type>
+               <vlen>$vlen</vlen>
+       </source>
+</block>
index f7457eb5c1a2376b8cd6cd0e4c12a2b205df4305..427c800824ef331aaee7a78f2edf739e327c8288 100644 (file)
@@ -38,7 +38,7 @@
        <param>
                <name>Endianness</name>
                <key>endianness</key>
-               <type>enum</type>
+               <type>int</type>
                <option>
                        <name>MSB</name>
                        <key>gr.GR_MSB_FIRST</key>
                        <key>gr.GR_LSB_FIRST</key>
                </option>
        </param>
+       <param>
+               <name>Num Ports</name>
+               <key>num_ports</key>
+               <value>1</value>
+               <type>int</type>
+       </param>
+       <check>$num_ports &gt; 0</check>
        <sink>
                <name>in</name>
                <type>$type</type>
+               <nports>$num_ports</nports>
        </sink>
        <source>
                <name>out</name>
                <type>$type</type>
+               <nports>$num_ports</nports>
        </source>
 </block>
index f2ee4d151f8b9834cc60d7a1691b1458ee8cf7c8..14586cc365109c6f1910d47ab370d3c5255d7587 100644 (file)
@@ -36,11 +36,13 @@ self.$(id).set_center_freq($frequency)</callback>
                        <name>Complex</name>
                        <key>complex</key>
                        <opt>fcn:32fc</opt>
+                       <opt>vlen:1</opt>
                </option>
                <option>
                        <name>Short</name>
                        <key>short</key>
                        <opt>fcn:16sc</opt>
+                       <opt>vlen:2</opt>
                </option>
        </param>
        <param>
@@ -85,6 +87,7 @@ self.$(id).set_center_freq($frequency)</callback>
        <sink>
                <name>in</name>
                <type>$type</type>
+               <vlen>$type.vlen</vlen>
        </sink>
        <doc>
 The USRP2 sink inputs 100 Megasamples per second / interpolation.
index 02046e609a37b1f4ae2310e5362f0139e88d0db4..0f297dfd1286fbf0aea4fad8a8f69125b0d4302a 100644 (file)
@@ -36,11 +36,13 @@ self.$(id).set_center_freq($frequency)</callback>
                        <name>Complex</name>
                        <key>complex</key>
                        <opt>fcn:32fc</opt>
+                       <opt>vlen:1</opt>
                </option>
                <option>
                        <name>Short</name>
                        <key>short</key>
                        <opt>fcn:16sc</opt>
+                       <opt>vlen:2</opt>
                </option>
        </param>
        <param>
@@ -85,6 +87,7 @@ self.$(id).set_center_freq($frequency)</callback>
        <source>
                <name>out</name>
                <type>$type</type>
+               <vlen>$type.vlen</vlen>
        </source>
        <doc>
 The USRP2 source outputs 100 Megasamples per second / decimation.
index 5969d8405322138bc227aeda083bb52c964bc976..598b550642d1dbeb321be11f1e317d5c68970aea 100644 (file)
@@ -23,6 +23,9 @@ constsink_gl.const_sink_c(
        gain_mu=$gain_mu,
        symbol_rate=$symbol_rate,
        omega_limit=$omega_limit,
+#if $win_size()
+       size=$win_size,
+#end if
 )
 #if not $grid_pos()
 $(parent).Add(self.$(id).win)
@@ -102,6 +105,13 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value>0.005</value>
                <type>real</type>
        </param>
+       <param>
+               <name>Window Size</name>
+               <key>win_size</key>
+               <value></value>
+               <type>int_vector</type>
+               <hide>#if $win_size() then 'none' else 'part'#</hide>
+       </param>
        <param>
                <name>Grid Position</name>
                <key>grid_pos</key>
@@ -114,11 +124,14 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value></value>
                <type>notebook</type>
        </param>
+       <check>not $win_size or len($win_size) == 2</check>
        <sink>
                <name>in</name>
                <type>complex</type>
        </sink>
        <doc>
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 
 Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
index 6f19f1aa47d3e8c41725791a43da29db4d663006..42bca5ccf3174d82f0152e2d7ded2d802416a4db 100644 (file)
@@ -23,6 +23,9 @@ fftsink2.$(type.fcn)(
        avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
        title=$title,
        peak_hold=$peak_hold,
+#if $win_size()
+       size=$win_size,
+#end if
 )
 #if not $grid_pos()
 $(parent).Add(self.$(id).win)
@@ -158,6 +161,13 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <type>real</type>
                <hide>#if $average() == 'True' then 'none' else 'all'#</hide>
        </param>
+       <param>
+               <name>Window Size</name>
+               <key>win_size</key>
+               <value></value>
+               <type>int_vector</type>
+               <hide>#if $win_size() then 'none' else 'part'#</hide>
+       </param>
        <param>
                <name>Grid Position</name>
                <key>grid_pos</key>
@@ -170,6 +180,7 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value></value>
                <type>notebook</type>
        </param>
+       <check>not $win_size or len($win_size) == 2</check>
        <sink>
                <name>in</name>
                <type>$type</type>
@@ -177,6 +188,8 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
        <doc>
 Set Average Alpha to 0 for automatic setting.
 
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 
 Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
index 454a4932cfab4aefbd5d00e93c674ec08537a492..9edf9650d849575de9ee471cb706d5604cb856e4 100644 (file)
@@ -14,6 +14,9 @@ histosink_gl.histo_sink_f(
        title=$title,
        num_bins=$num_bins,
        frame_size=$frame_size,
+#if $win_size()
+       size=$win_size,
+#end if
 )
 #if not $grid_pos()
 $(parent).Add(self.$(id).win)
@@ -40,6 +43,13 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value>1000</value>
                <type>int</type>
        </param>
+       <param>
+               <name>Window Size</name>
+               <key>win_size</key>
+               <value></value>
+               <type>int_vector</type>
+               <hide>#if $win_size() then 'none' else 'part'#</hide>
+       </param>
        <param>
                <name>Grid Position</name>
                <key>grid_pos</key>
@@ -52,11 +62,14 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value></value>
                <type>notebook</type>
        </param>
+       <check>not $win_size or len($win_size) == 2</check>
        <sink>
                <name>in</name>
                <type>float</type>
        </sink>
        <doc>
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 
 Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
index cc66cdcb088e75d2d7fc820e2cf3dddd8f3f3b2d..5289db8af9f1351338a886e30aa077054fdde9f2 100644 (file)
@@ -24,6 +24,9 @@ numbersink2.$(type.fcn)(
        label=$title,
        peak_hold=$peak_hold,
        show_gauge=$show_gauge,
+#if $win_size()
+       size=$win_size,
+#end if
 )
 #if not $grid_pos()
 $(parent).Add(self.$(id).win)
@@ -151,6 +154,13 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                        <key>False</key>
                </option>
        </param>
+       <param>
+               <name>Window Size</name>
+               <key>win_size</key>
+               <value></value>
+               <type>int_vector</type>
+               <hide>#if $win_size() then 'none' else 'part'#</hide>
+       </param>
        <param>
                <name>Grid Position</name>
                <key>grid_pos</key>
@@ -163,6 +173,7 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value></value>
                <type>notebook</type>
        </param>
+       <check>not $win_size or len($win_size) == 2</check>
        <sink>
                <name>in</name>
                <type>$type</type>
@@ -170,6 +181,8 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
        <doc>
 Set Average Alpha to 0 for automatic setting.
 
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 
 Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
index 503d529727662578e219011abf2117c6c8e574aa..eba45f48981af825c5ec658017b3e221b2e00f43 100644 (file)
@@ -15,10 +15,14 @@ scopesink2.$(type.fcn)(
        title=$title,
        sample_rate=$samp_rate,
        v_scale=$v_scale,
+       v_offset=$v_offset,
        t_scale=$t_scale,
        ac_couple=$ac_couple,
        xy_mode=$xy_mode,
        num_inputs=$num_inputs,
+#if $win_size()
+       size=$win_size,
+#end if
 )
 #if not $grid_pos()
 $(parent).Add(self.$(id).win)
@@ -59,19 +63,28 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <key>v_scale</key>
                <value>0</value>
                <type>real</type>
+               <hide>#if $v_scale() then 'none' else 'part'#</hide>
+       </param>
+       <param>
+               <name>V Offset</name>
+               <key>v_offset</key>
+               <value>0</value>
+               <type>real</type>
+               <hide>#if $v_offset() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>T Scale</name>
                <key>t_scale</key>
                <value>0</value>
                <type>real</type>
+               <hide>#if $t_scale() then 'none' else 'part'#</hide>
        </param>
        <param>
                <name>AC Couple</name>
                <key>ac_couple</key>
                <value>False</value>
-               <type>enum</type>
-               <hide>#if $ac_couple() == 'True' then 'none' else 'part'#</hide>
+               <type>bool</type>
+               <hide>#if $ac_couple() then 'none' else 'part'#</hide>
                <option>
                        <name>Off</name>
                        <key>False</key>
@@ -102,6 +115,13 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value>1</value>
                <type>int</type>
        </param>
+       <param>
+               <name>Window Size</name>
+               <key>win_size</key>
+               <value></value>
+               <type>int_vector</type>
+               <hide>#if $win_size() then 'none' else 'part'#</hide>
+       </param>
        <param>
                <name>Grid Position</name>
                <key>grid_pos</key>
@@ -114,6 +134,7 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value></value>
                <type>notebook</type>
        </param>
+       <check>not $win_size or len($win_size) == 2</check>
        <check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check>
        <sink>
                <name>in</name>
@@ -127,6 +148,8 @@ Set the T Scale to 0 for automatic setting.
 
 XY Mode allows the scope to initialize as an XY plotter.
 
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 
 Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
index 35790f820b716b68de105d983bcf4b5521f213ba..cee598990e230da499006ff0658eadbec114f4a2 100644 (file)
@@ -21,6 +21,9 @@ waterfallsink2.$(type.fcn)(
        average=$options.average,
        avg_alpha=#if $avg_alpha() then $avg_alpha else 'None'#,
        title=$title,
+#if $win_size()
+       size=$win_size,
+#end if
 )
 #if not $grid_pos()
 $(parent).Add(self.$(id).win)
@@ -115,6 +118,13 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                        <opt>average:True</opt>
                </option>
        </param>
+       <param>
+               <name>Window Size</name>
+               <key>win_size</key>
+               <value></value>
+               <type>int_vector</type>
+               <hide>#if $win_size() then 'none' else 'part'#</hide>
+       </param>
        <param>
                <name>Grid Position</name>
                <key>grid_pos</key>
@@ -127,6 +137,7 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
                <value></value>
                <type>notebook</type>
        </param>
+       <check>not $win_size or len($win_size) == 2</check>
        <sink>
                <name>in</name>
                <type>$type</type>
@@ -134,6 +145,8 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
        <doc>
 Set Average Alpha to 0 for automatic setting.
 
+Leave the window blank for the default size, otherwise enter a tuple of (width, height) pixels.
+
 Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
 
 Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
diff --git a/grc/examples/.gitignore b/grc/examples/.gitignore
deleted file mode 100644 (file)
index b336cc7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/examples/Makefile.am b/grc/examples/Makefile.am
deleted file mode 100644 (file)
index 78321ce..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# Copyright 2009 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 3, 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., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-grc_examples_prefix = $(exampledir)/grc
-
-audiodatadir = $(grc_examples_prefix)/audio
-dist_audiodata_DATA = \
-       audio/dial_tone.grc \
-       audio/cvsd_sweep.grc
-
-simpledatadir = $(grc_examples_prefix)/simple
-dist_simpledata_DATA = \
-       simple/ber_simulation.grc \
-       simple/dpsk_loopback.grc \
-       simple/variable_config.grc \
-       simple/var_sink_taps.grc
-
-trellisdatadir = $(grc_examples_prefix)/trellis
-dist_trellisdata_DATA = \
-       trellis/readme.txt \
-       trellis/interference_cancellation.grc
-
-usrpdatadir = $(grc_examples_prefix)/usrp
-dist_usrpdata_DATA = \
-       usrp/usrp2_const_wave.grc \
-       usrp/usrp2_dpsk_mod.grc \
-       usrp/usrp2_fft.grc \
-       usrp/usrp_two_tone_loopback.grc \
-       usrp/usrp_wbfm_receive.grc
-
-xmlrpcdatadir = $(grc_examples_prefix)/xmlrpc
-dist_xmlrpcdata_DATA = \
-       xmlrpc/readme.txt \
-       xmlrpc/xmlrpc_client.grc \
-       xmlrpc/xmlrpc_client_script.py\
-       xmlrpc/xmlrpc_server.grc
diff --git a/grc/examples/audio/.gitignore b/grc/examples/audio/.gitignore
deleted file mode 100644 (file)
index b336cc7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/examples/audio/cvsd_sweep.grc b/grc/examples/audio/cvsd_sweep.grc
deleted file mode 100644 (file)
index 8d0b385..0000000
+++ /dev/null
@@ -1,918 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Sat Sep 19 20:30:08 2009</timestamp>
-  <block>
-    <key>import</key>
-    <param>
-      <key>id</key>
-      <value>import_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>import</key>
-      <value>import math</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(157, 11)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_cvsd_decode</key>
-    <param>
-      <key>id</key>
-      <value>blks2_cvsd_decode_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>resample</key>
-      <value>resample</value>
-    </param>
-    <param>
-      <key>bw</key>
-      <value>bw</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(887, 340)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>tri_source</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_TRI_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>0.05</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>0.5</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(44, 316)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
-    <param>
-      <key>id</key>
-      <value>throttle</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samples_per_second</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(238, 348)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_vco_f</key>
-    <param>
-      <key>id</key>
-      <value>vco</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>sensitivity</key>
-      <value>audio_rate*2*math.pi</value>
-    </param>
-    <param>
-      <key>amplitude</key>
-      <value>0.9</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(427, 332)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_cvsd_encode</key>
-    <param>
-      <key>id</key>
-      <value>enc</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>resample</key>
-      <value>resample</value>
-    </param>
-    <param>
-      <key>bw</key>
-      <value>bw</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(655, 340)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_packed_to_unpacked_xx</key>
-    <param>
-      <key>id</key>
-      <value>p2u</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>byte</value>
-    </param>
-    <param>
-      <key>bits_per_chunk</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>endianness</key>
-      <value>gr.GR_MSB_FIRST</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(648, 415)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_char_to_float</key>
-    <param>
-      <key>id</key>
-      <value>c2f</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(676, 483)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>audio_sink</key>
-    <param>
-      <key>id</key>
-      <value>audio_sink</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>device_name</key>
-      <value>plughw:0,0</value>
-    </param>
-    <param>
-      <key>ok_to_block</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1127, 340)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>8000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(251, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>resample</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>8</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(344, 11)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>bw</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>0.5</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(431, 11)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>notebook</key>
-    <param>
-      <key>id</key>
-      <value>displays</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.NB_TOP</value>
-    </param>
-    <param>
-      <key>labels</key>
-      <value>['Original','Encoded','Decoded']</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>notebook</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(12, 106)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>orig_fft</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Original Spectrum</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>y_divs</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>ref_scale</key>
-      <value>2.0</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>1024</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>notebook</key>
-      <value>displays, 0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(415, 97)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>orig_scope</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Original Waveform</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>ac_couple</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>xy_mode</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>notebook</key>
-      <value>displays, 0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(414, 425)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>enc_fft</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Encoded Spectrum</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate*resample</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>y_divs</key>
-      <value>8</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_scale</key>
-      <value>2.0</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>1024</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>notebook</key>
-      <value>displays, 1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(610, 551)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>enc_scope</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Encoded Waveform</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate*resample</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0.5</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>20.0/(audio_rate*resample)</value>
-    </param>
-    <param>
-      <key>ac_couple</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>xy_mode</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>notebook</key>
-      <value>displays, 1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(858, 591)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>dec_fft</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Decoded Spectrum</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>5</value>
-    </param>
-    <param>
-      <key>y_divs</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_scale</key>
-      <value>0.1</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>1024</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>notebook</key>
-      <value>displays, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(891, 98)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>dec_scope</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Decoded Waveform</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>audio_rate</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>ac_couple</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>xy_mode</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>notebook</key>
-      <value>displays, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(889, 422)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>cvsd_sweep</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>CVSD Vocoder Test</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value></value>
-    </param>
-    <param>
-      <key>description</key>
-      <value></value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>run</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>vco</source_block_id>
-    <sink_block_id>orig_fft</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>tri_source</source_block_id>
-    <sink_block_id>throttle</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>throttle</source_block_id>
-    <sink_block_id>vco</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>vco</source_block_id>
-    <sink_block_id>enc</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>enc</source_block_id>
-    <sink_block_id>blks2_cvsd_decode_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>vco</source_block_id>
-    <sink_block_id>orig_scope</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_cvsd_decode_0</source_block_id>
-    <sink_block_id>dec_fft</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_cvsd_decode_0</source_block_id>
-    <sink_block_id>dec_scope</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_cvsd_decode_0</source_block_id>
-    <sink_block_id>audio_sink</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>enc</source_block_id>
-    <sink_block_id>p2u</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>p2u</source_block_id>
-    <sink_block_id>c2f</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>c2f</source_block_id>
-    <sink_block_id>enc_fft</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>c2f</source_block_id>
-    <sink_block_id>enc_scope</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/audio/dial_tone.grc b/grc/examples/audio/dial_tone.grc
deleted file mode 100644 (file)
index ac8cbef..0000000
+++ /dev/null
@@ -1,375 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Thu Jul 24 14:27:48 2008</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>dial_tone</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Dial Tone</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>example flow graph</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_add_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_add_xx</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>3</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(513, 277)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>audio_sink</key>
-    <param>
-      <key>id</key>
-      <value>audio_sink</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>32000</value>
-    </param>
-    <param>
-      <key>device_name</key>
-      <value/>
-    </param>
-    <param>
-      <key>ok_to_block</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(699, 112)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_noise_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_noise_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>noise_type</key>
-      <value>gr.GR_GAUSSIAN</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>noise</value>
-    </param>
-    <param>
-      <key>seed</key>
-      <value>42</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(238, 380)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_sig_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>440</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(240, 208)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_sig_source_x0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>350</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(240, 38)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Volume</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>.4</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>.5</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(634, 413)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>noise</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Noise</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>.005</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>.2</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 1, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(443, 412)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>32000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(11, 171)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>gr_sig_source_x0</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sig_source_x</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_noise_source_x</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>2</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx</source_block_id>
-    <sink_block_id>audio_sink</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/simple/.gitignore b/grc/examples/simple/.gitignore
deleted file mode 100644 (file)
index b336cc7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/examples/simple/ber_simulation.grc b/grc/examples/simple/ber_simulation.grc
deleted file mode 100644 (file)
index 618add2..0000000
+++ /dev/null
@@ -1,564 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Thu Mar 19 11:08:59 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>ber_sim</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>BER Simulation</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>Adjust the noise and constellation... see what happens!</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(16, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_noise_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_noise_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>noise_type</key>
-      <value>gr.GR_GAUSSIAN</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>noise</value>
-    </param>
-    <param>
-      <key>seed</key>
-      <value>42</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(235, 379)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_chunks_to_symbols_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_chunks_to_symbols_xx</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>in_type</key>
-      <value>byte</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>symbol_table</key>
-      <value>const</value>
-    </param>
-    <param>
-      <key>dimension</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(360, 237)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_numbersink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_numbersink2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>BER</value>
-    </param>
-    <param>
-      <key>units</key>
-      <value>%</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>base_value</key>
-      <value>0.0</value>
-    </param>
-    <param>
-      <key>min_value</key>
-      <value>0.0</value>
-    </param>
-    <param>
-      <key>max_value</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>factor</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>decimal_places</key>
-      <value>4</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>number_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>show_gauge</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1062, 11)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
-    <param>
-      <key>id</key>
-      <value>gr_throttle</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>byte</value>
-    </param>
-    <param>
-      <key>samples_per_second</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(397, 27)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_error_rate</key>
-    <param>
-      <key>id</key>
-      <value>blks2_error_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>'BER'</value>
-    </param>
-    <param>
-      <key>win_size</key>
-      <value>1000000</value>
-    </param>
-    <param>
-      <key>bits_per_symbol</key>
-      <value>int(math.log(len(const))/math.log(2))</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(670, 41)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_constellation_decoder_cb</key>
-    <param>
-      <key>id</key>
-      <value>gr_constellation_decoder_cb</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>sym_position</key>
-      <value>const</value>
-    </param>
-    <param>
-      <key>sym_value_out</key>
-      <value>range(len(const))</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(708, 224)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>random_source_x</key>
-    <param>
-      <key>id</key>
-      <value>random_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>byte</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>len(const)</value>
-    </param>
-    <param>
-      <key>num_samps</key>
-      <value>1000000</value>
-    </param>
-    <param>
-      <key>repeat</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(15, 244)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>noise</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>.25</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(18, 386)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>const</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>1+1j, 1-1j, -1-1j, -1+1j</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(16, 461)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>50e3</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(20, 168)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>import</key>
-    <param>
-      <key>id</key>
-      <value>import</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>import</key>
-      <value>import math</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(138, 168)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_add_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_add_xx</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(652, 395)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_scopesink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>"Constellation: "+str(const)</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>ac_couple</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>xy_mode</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>2, 0, 1, 1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(828, 368)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>blks2_error_rate</source_block_id>
-    <sink_block_id>wxgui_numbersink2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_throttle</source_block_id>
-    <sink_block_id>blks2_error_rate</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_constellation_decoder_cb</source_block_id>
-    <sink_block_id>blks2_error_rate</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx</source_block_id>
-    <sink_block_id>gr_constellation_decoder_cb</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_chunks_to_symbols_xx</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_noise_source_x</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>random_source_x</source_block_id>
-    <sink_block_id>gr_throttle</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>random_source_x</source_block_id>
-    <sink_block_id>gr_chunks_to_symbols_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx</source_block_id>
-    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/simple/dpsk_loopback.grc b/grc/examples/simple/dpsk_loopback.grc
deleted file mode 100644 (file)
index 6a507c9..0000000
+++ /dev/null
@@ -1,450 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Tue Mar 17 12:53:37 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>dpsk_loopback</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>DPSK Loopback</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>gnuradio flow graph</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_dxpsk_mod</key>
-    <param>
-      <key>id</key>
-      <value>blks2_dxpsk_mod_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>dbpsk</value>
-    </param>
-    <param>
-      <key>samples_per_symbol</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>excess_bw</key>
-      <value>0.35</value>
-    </param>
-    <param>
-      <key>gray_code</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(426, 295)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>10000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 170)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Frequency (Hz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>500</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>samp_rate/2</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_length</key>
-      <value>200</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(12, 257)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_packet_encoder</key>
-    <param>
-      <key>id</key>
-      <value>blks2_packet_encoder_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samples_per_symbol</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>bits_per_symbol</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>access_code</key>
-      <value></value>
-    </param>
-    <param>
-      <key>pad_for_usrp</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>payload_length</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(216, 260)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
-    <param>
-      <key>id</key>
-      <value>gr_throttle_0_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samples_per_second</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(225, 174)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_sig_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(203, 8)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_packet_decoder</key>
-    <param>
-      <key>id</key>
-      <value>blks2_packet_decoder_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>access_code</key>
-      <value></value>
-    </param>
-    <param>
-      <key>threshold</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(551, 65)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_scopesink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Scope Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>frame_decim</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>1./freq</value>
-    </param>
-    <param>
-      <key>marker</key>
-      <value>set_format_line</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(769, 12)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_dxpsk_demod</key>
-    <param>
-      <key>id</key>
-      <value>blks2_dxpsk_demod_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>dbpsk</value>
-    </param>
-    <param>
-      <key>samples_per_symbol</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>excess_bw</key>
-      <value>0.35</value>
-    </param>
-    <param>
-      <key>costas_alpha</key>
-      <value>0.175</value>
-    </param>
-    <param>
-      <key>gain_mu</key>
-      <value>0.175</value>
-    </param>
-    <param>
-      <key>mu</key>
-      <value>0.5</value>
-    </param>
-    <param>
-      <key>omega_relative_limit</key>
-      <value>0.005</value>
-    </param>
-    <param>
-      <key>gray_code</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(691, 219)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>blks2_dxpsk_mod_0</source_block_id>
-    <sink_block_id>blks2_dxpsk_demod_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_dxpsk_demod_0</source_block_id>
-    <sink_block_id>blks2_packet_decoder_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_packet_encoder_0</source_block_id>
-    <sink_block_id>blks2_dxpsk_mod_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sig_source_x_0</source_block_id>
-    <sink_block_id>gr_throttle_0_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_throttle_0_0</source_block_id>
-    <sink_block_id>blks2_packet_encoder_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_packet_decoder_0</source_block_id>
-    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/simple/var_sink_taps.grc b/grc/examples/simple/var_sink_taps.grc
deleted file mode 100644 (file)
index 0720785..0000000
+++ /dev/null
@@ -1,488 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Tue May 19 16:45:51 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>var_sink_taps</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Variable Sink + Taps</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>gnuradio flow graph</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_noise_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_noise_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>noise_type</key>
-      <value>gr.GR_GAUSSIAN</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>seed</key>
-      <value>42</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(619, 36)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_fir_filter_xxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_fir_filter_xxx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>ccc</value>
-    </param>
-    <param>
-      <key>decim</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>taps</key>
-      <value>dest_taps</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(831, 47)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
-    <param>
-      <key>id</key>
-      <value>gr_throttle_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>samples_per_second</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(999, 198)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>270</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_fftsink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>y_divs</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>50</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>1024</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(629, 184)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <block>
-    <key>import</key>
-    <param>
-      <key>id</key>
-      <value>import_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>import</key>
-      <value>from gnuradio.gr import firdes</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(330, 120)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>dest_taps</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>[0]</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(836, 223)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>32000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(831, 130)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>source_taps</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>firdes.low_pass(1, samp_rate, 4000, 2000)</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(397, 191)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>taps_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(268, 189)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_vector_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_vector_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>vector</key>
-      <value>source_taps</value>
-    </param>
-    <param>
-      <key>repeat</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>len(source_taps)</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(205, 33)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>note</key>
-    <param>
-      <key>id</key>
-      <value>note_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>note</key>
-      <value>Pass the FIR taps via a variable sink.</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(14, 141)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
-    <param>
-      <key>id</key>
-      <value>gr_throttle</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>samples_per_second</key>
-      <value>taps_rate</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>len(source_taps)</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(440, 41)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_variable_sink_x</key>
-    <param>
-      <key>id</key>
-      <value>blks2_variable_sink_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>variable</key>
-      <value>dest_taps</value>
-    </param>
-    <param>
-      <key>decim</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>len(source_taps)</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(305, 283)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>gr_noise_source_x_0</source_block_id>
-    <sink_block_id>gr_fir_filter_xxx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_fir_filter_xxx_0</source_block_id>
-    <sink_block_id>gr_throttle_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_throttle_0</source_block_id>
-    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_vector_source_x_0</source_block_id>
-    <sink_block_id>gr_throttle</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_throttle</source_block_id>
-    <sink_block_id>blks2_variable_sink_x_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/simple/variable_config.grc b/grc/examples/simple/variable_config.grc
deleted file mode 100644 (file)
index 95c287c..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Thu Jun 25 10:56:04 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>variable_config_demo</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Variable Config Block Demonstration</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>Save/Load freq from a config file.</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>autostart</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>32000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 170)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_config</key>
-    <param>
-      <key>id</key>
-      <value>freq_init</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>real</value>
-    </param>
-    <param>
-      <key>config_file</key>
-      <value>config.conf</value>
-    </param>
-    <param>
-      <key>section</key>
-      <value>main</value>
-    </param>
-    <param>
-      <key>option</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>writeback</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(255, 17)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Frequency (Hz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>freq_init</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>-samp_rate/2</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>samp_rate/2</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(429, 24)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
-    <param>
-      <key>id</key>
-      <value>gr_throttle_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>samples_per_second</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(392, 233)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_sig_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(148, 233)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_fftsink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>y_divs</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>50</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>1024</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(671, 233)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>gr_sig_source_x_0</source_block_id>
-    <sink_block_id>gr_throttle_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_throttle_0</source_block_id>
-    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/trellis/.gitignore b/grc/examples/trellis/.gitignore
deleted file mode 100644 (file)
index b336cc7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/examples/trellis/interference_cancellation.grc b/grc/examples/trellis/interference_cancellation.grc
deleted file mode 100644 (file)
index e93babd..0000000
+++ /dev/null
@@ -1,2072 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Thu Mar 19 11:22:40 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>int_cancellation</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Superposition Coding</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>AA</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>gnuradio flow graph</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>2048, 2048</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>alpha</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>P1/P</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>0.6</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_length</key>
-      <value>200</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(243, 11)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>snr_db</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>P/sigma^2 (dB)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>16</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>20</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_length</key>
-      <value>200</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(447, 14)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>noisevar</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>10**(-snr_db/10)</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(637, 13)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>random_source_x</key>
-    <param>
-      <key>id</key>
-      <value>random_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>num_samps</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>repeat</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(21, 170)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_chunks_to_symbols_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_chunks_to_symbols_xx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>in_type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>symbol_table</key>
-      <value>1,1j,-1j,-1</value>
-    </param>
-    <param>
-      <key>dimension</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(665, 187)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_const_vxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_const_vxx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>alpha**0.5</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(988, 196)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>random_source_x</key>
-    <param>
-      <key>id</key>
-      <value>random_source_x_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>num_samps</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>repeat</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(25, 291)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_chunks_to_symbols_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_chunks_to_symbols_xx_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>in_type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>symbol_table</key>
-      <value>1,1j,-1j,-1</value>
-    </param>
-    <param>
-      <key>dimension</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(660, 311)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_const_vxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_const_vxx_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>(1-alpha)**0.5</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(994, 319)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_add_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_add_xx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1224, 244)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_noise_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_noise_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>noise_type</key>
-      <value>gr.GR_GAUSSIAN</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>noisevar</value>
-    </param>
-    <param>
-      <key>seed</key>
-      <value>42</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1146, 369)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sub_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_sub_xx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(536, 529)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_xx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(771, 525)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_short_to_float</key>
-    <param>
-      <key>id</key>
-      <value>gr_short_to_float_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(994, 545)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sub_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_sub_xx_3</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(535, 792)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_xx_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(785, 779)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_short_to_float</key>
-    <param>
-      <key>id</key>
-      <value>gr_short_to_float_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1005, 798)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_chunks_to_symbols_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_chunks_to_symbols_xx_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>in_type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>symbol_table</key>
-      <value>1,1j,-1j,-1</value>
-    </param>
-    <param>
-      <key>dimension</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(405, 998)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_const_vxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_const_vxx_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>alpha**0.5</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(710, 1008)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sub_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_sub_xx_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(944, 978)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sub_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_sub_xx_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(540, 1141)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_xx_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(796, 1136)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_short_to_float</key>
-    <param>
-      <key>id</key>
-      <value>gr_short_to_float_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1009, 1156)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_chunks_to_symbols_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_chunks_to_symbols_xx_2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>in_type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>symbol_table</key>
-      <value>1,1j,-1j,-1</value>
-    </param>
-    <param>
-      <key>dimension</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(420, 1368)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_const_vxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_const_vxx_2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>(1-alpha)**0.5</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(733, 1374)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sub_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_sub_xx_2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(975, 1342)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sub_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_sub_xx_1_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(559, 1536)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_xx_2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>short</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(771, 1530)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_short_to_float</key>
-    <param>
-      <key>id</key>
-      <value>gr_short_to_float_1_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1010, 1551)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_numbersink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_numbersink2_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>BER 2 (raw)</value>
-    </param>
-    <param>
-      <key>units</key>
-      <value>BER</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>R</value>
-    </param>
-    <param>
-      <key>base_value</key>
-      <value>0.0</value>
-    </param>
-    <param>
-      <key>min_value</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max_value</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>factor</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>decimal_places</key>
-      <value>6</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>number_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0.001</value>
-    </param>
-    <param>
-      <key>show_gauge</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0,1,1,1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1260, 659)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_numbersink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_numbersink2_3</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>BER 2 (after cancelling user 1)</value>
-    </param>
-    <param>
-      <key>units</key>
-      <value>BER</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>R</value>
-    </param>
-    <param>
-      <key>base_value</key>
-      <value>0.0</value>
-    </param>
-    <param>
-      <key>min_value</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max_value</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>factor</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>decimal_places</key>
-      <value>6</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>number_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0.001</value>
-    </param>
-    <param>
-      <key>show_gauge</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1,1,1,1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1262, 1020)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_numbersink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_numbersink2_3_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>BER 1 (after cancelling user 2)</value>
-    </param>
-    <param>
-      <key>units</key>
-      <value>BER</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>R</value>
-    </param>
-    <param>
-      <key>base_value</key>
-      <value>0.0</value>
-    </param>
-    <param>
-      <key>min_value</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max_value</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>factor</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>decimal_places</key>
-      <value>6</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>number_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0.001</value>
-    </param>
-    <param>
-      <key>show_gauge</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1,0,1,1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1269, 1417)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>R</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>10e3</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(748, 12)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_encoder_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_encoder_xx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>ss</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(334, 190)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_encoder_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_encoder_xx_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>ss</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(336, 311)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_viterbi_combined_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_viterbi_combined_xx_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>c</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>s</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>block_size</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>final_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>dim</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>table</key>
-      <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value>
-    </param>
-    <param>
-      <key>metric_type</key>
-      <value>trellis.TRELLIS_EUCLIDEAN</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(79, 501)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_viterbi_combined_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_viterbi_combined_xx_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>c</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>s</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>block_size</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>final_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>dim</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>table</key>
-      <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value>
-    </param>
-    <param>
-      <key>metric_type</key>
-      <value>trellis.TRELLIS_EUCLIDEAN</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(82, 766)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_encoder_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_encoder_xx_2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>ss</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(89, 998)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_viterbi_combined_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_viterbi_combined_xx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>c</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>s</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>block_size</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>final_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>dim</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>table</key>
-      <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value>
-    </param>
-    <param>
-      <key>metric_type</key>
-      <value>trellis.TRELLIS_EUCLIDEAN</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(83, 1111)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_encoder_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_encoder_xx_2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>ss</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(105, 1367)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>trellis_viterbi_combined_xx</key>
-    <param>
-      <key>id</key>
-      <value>trellis_viterbi_combined_xx_0_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>c</value>
-    </param>
-    <param>
-      <key>out_type</key>
-      <value>s</value>
-    </param>
-    <param>
-      <key>fsm_args</key>
-      <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
-    </param>
-    <param>
-      <key>block_size</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>init_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>final_state</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>dim</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>table</key>
-      <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value>
-    </param>
-    <param>
-      <key>metric_type</key>
-      <value>trellis.TRELLIS_EUCLIDEAN</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(75, 1495)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>prefix</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>"../../../"</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(871, 14)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_add_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_add_xx_1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1400, 262)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_numbersink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_numbersink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>BER 1 (raw)</value>
-    </param>
-    <param>
-      <key>units</key>
-      <value>BER</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>R</value>
-    </param>
-    <param>
-      <key>base_value</key>
-      <value>0.0</value>
-    </param>
-    <param>
-      <key>min_value</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max_value</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>factor</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>decimal_places</key>
-      <value>6</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>number_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0.001</value>
-    </param>
-    <param>
-      <key>show_gauge</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0,0,1,1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1267, 410)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_scopesink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Scope Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>R</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>ac_couple</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>xy_mode</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1533, 149)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>random_source_x_1</source_block_id>
-    <sink_block_id>trellis_encoder_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_encoder_xx_0</source_block_id>
-    <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_encoder_xx_1</source_block_id>
-    <sink_block_id>gr_chunks_to_symbols_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
-    <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_const_vxx_0</source_block_id>
-    <sink_block_id>gr_add_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx_0</source_block_id>
-    <sink_block_id>gr_add_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_noise_source_x_0</source_block_id>
-    <sink_block_id>gr_add_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_chunks_to_symbols_xx_1</source_block_id>
-    <sink_block_id>gr_multiply_const_vxx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_const_vxx_1</source_block_id>
-    <sink_block_id>gr_add_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_0</source_block_id>
-    <sink_block_id>gr_multiply_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_0</source_block_id>
-    <sink_block_id>gr_multiply_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_xx_0</source_block_id>
-    <sink_block_id>gr_short_to_float_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_short_to_float_0</source_block_id>
-    <sink_block_id>wxgui_numbersink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_xx_2</source_block_id>
-    <sink_block_id>gr_short_to_float_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>random_source_x_0</source_block_id>
-    <sink_block_id>trellis_encoder_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx_1</source_block_id>
-    <sink_block_id>trellis_viterbi_combined_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>random_source_x_0</source_block_id>
-    <sink_block_id>gr_sub_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_viterbi_combined_xx_1</source_block_id>
-    <sink_block_id>gr_sub_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_viterbi_combined_xx_0</source_block_id>
-    <sink_block_id>gr_sub_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>random_source_x_1</source_block_id>
-    <sink_block_id>gr_sub_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_1</source_block_id>
-    <sink_block_id>gr_multiply_xx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_1</source_block_id>
-    <sink_block_id>gr_multiply_xx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_2</source_block_id>
-    <sink_block_id>trellis_viterbi_combined_xx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx_1</source_block_id>
-    <sink_block_id>gr_sub_xx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_encoder_xx_2</source_block_id>
-    <sink_block_id>gr_chunks_to_symbols_xx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_chunks_to_symbols_xx_2</source_block_id>
-    <sink_block_id>gr_multiply_const_vxx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_const_vxx_2</source_block_id>
-    <sink_block_id>gr_sub_xx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_viterbi_combined_xx_1</source_block_id>
-    <sink_block_id>trellis_encoder_xx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_xx_1</source_block_id>
-    <sink_block_id>gr_short_to_float_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_short_to_float_2</source_block_id>
-    <sink_block_id>wxgui_numbersink2_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_viterbi_combined_xx_2</source_block_id>
-    <sink_block_id>gr_sub_xx_3</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_3</source_block_id>
-    <sink_block_id>gr_multiply_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_3</source_block_id>
-    <sink_block_id>gr_multiply_xx_1</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx_1</source_block_id>
-    <sink_block_id>trellis_viterbi_combined_xx_2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>random_source_x_1</source_block_id>
-    <sink_block_id>gr_sub_xx_3</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_short_to_float_1</source_block_id>
-    <sink_block_id>wxgui_numbersink2_3</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_encoder_xx_2_0</source_block_id>
-    <sink_block_id>gr_chunks_to_symbols_xx_2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_chunks_to_symbols_xx_2_0</source_block_id>
-    <sink_block_id>gr_multiply_const_vxx_2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_viterbi_combined_xx_2</source_block_id>
-    <sink_block_id>trellis_encoder_xx_2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_xx_2_0</source_block_id>
-    <sink_block_id>gr_short_to_float_1_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>trellis_viterbi_combined_xx_0_0</source_block_id>
-    <sink_block_id>gr_sub_xx_1_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_1_0</source_block_id>
-    <sink_block_id>gr_multiply_xx_2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_1_0</source_block_id>
-    <sink_block_id>gr_multiply_xx_2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sub_xx_2_0</source_block_id>
-    <sink_block_id>trellis_viterbi_combined_xx_0_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_short_to_float_1_0</source_block_id>
-    <sink_block_id>wxgui_numbersink2_3_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx_1</source_block_id>
-    <sink_block_id>gr_sub_xx_2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>random_source_x_0</source_block_id>
-    <sink_block_id>gr_sub_xx_1_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_const_vxx_2_0</source_block_id>
-    <sink_block_id>gr_sub_xx_2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx_1</source_block_id>
-    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/trellis/readme.txt b/grc/examples/trellis/readme.txt
deleted file mode 100644 (file)
index d620fd6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-This is an example of using gr-trellis in grc.
-
-Two users are transmitting simultaneously using convolutionally encoded QPSK, each with power P1=alpha*P and P2=(1-alpha)*P.
-The combined signal is observed in noise and four different receivers are considered:
-1) A viterbi decoder decoding user 1 assuming user 2 is noise
-2) A viterbi decoder decoding user 2 assuming user 1 is noise
-3) A viterbi decoder decoding user 1 first 
-   and then reencoding this signal, subtracting it from the observation 
-   and then running a Viterbi decoder decoding user 2
-4) A viterbi decoder decoding user 2 first 
-   and then reencoding this signal, subtracting it from the observation 
-   and then running a Viterbi decoder decoding user 1
-
-You can change the signal to noise ratio P/sigma^2 and the allocation of power to the two users, alpha.
-
-Enjoy.
diff --git a/grc/examples/usrp/.gitignore b/grc/examples/usrp/.gitignore
deleted file mode 100644 (file)
index b336cc7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/examples/usrp/usrp2_const_wave.grc b/grc/examples/usrp/usrp2_const_wave.grc
deleted file mode 100644 (file)
index fdbd7c1..0000000
+++ /dev/null
@@ -1,252 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Wed Apr 15 11:22:56 2009</timestamp>
-  <block>
-    <key>const_source_x</key>
-    <param>
-      <key>id</key>
-      <value>const_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(284, 154)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>usrp2_sink_xxxx</key>
-    <param>
-      <key>id</key>
-      <value>usrp2_sink_xxxx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>interface</key>
-      <value></value>
-    </param>
-    <param>
-      <key>mac_addr</key>
-      <value></value>
-    </param>
-    <param>
-      <key>interpolation</key>
-      <value>interp</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(493, 106)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>interp</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>16</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(16, 255)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>USRP2 Freq (Hz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>2.45e9</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>2.4e9</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>2.5e9</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_length</key>
-      <value>200</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(30, 376)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Amplitude</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>.1</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_length</key>
-      <value>200</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(204, 376)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>usrp2_const_wave</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>USRP2 Constant Wave</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>Tune USRP2</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>const_source_x_0</source_block_id>
-    <sink_block_id>usrp2_sink_xxxx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/usrp/usrp2_dpsk_mod.grc b/grc/examples/usrp/usrp2_dpsk_mod.grc
deleted file mode 100644 (file)
index e9f9b41..0000000
+++ /dev/null
@@ -1,693 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Wed Apr 15 17:31:00 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>usrp2_dpsk_mod</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>USRP2 DPSK Modulation</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>Generate a DPSK signal</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>100e6/interp</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(52, 166)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>usrp2_sink_xxxx</key>
-    <param>
-      <key>id</key>
-      <value>usrp2_sink_xxxx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>interface</key>
-      <value></value>
-    </param>
-    <param>
-      <key>mac_addr</key>
-      <value></value>
-    </param>
-    <param>
-      <key>interpolation</key>
-      <value>interp</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1059, 56)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_const_vxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_const_vxx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(679, 58)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_dxpsk_mod</key>
-    <param>
-      <key>id</key>
-      <value>blks2_dxpsk_mod_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>dqpsk</value>
-    </param>
-    <param>
-      <key>samples_per_symbol</key>
-      <value>samps_per_sym</value>
-    </param>
-    <param>
-      <key>excess_bw</key>
-      <value>0.35</value>
-    </param>
-    <param>
-      <key>gray_code</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(468, 55)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>interp</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(31, 256)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samps_per_sym</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>8</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(126, 250)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>random_source_x</key>
-    <param>
-      <key>id</key>
-      <value>random_source_x_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>byte</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>256</value>
-    </param>
-    <param>
-      <key>num_samps</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>repeat</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(255, 39)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Amplitude</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>.1</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(246, 372)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>rx_freq_off</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>RX Freq Offset (Hz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>-20e3</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>-50e3</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>+50e3</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(247, 508)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>USRP2 Freq (Hz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>2.45e9</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>2.4e9</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>2.5e9</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(49, 341)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_constellationsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_constellationsink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Constellation Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>frame_rate</key>
-      <value>5</value>
-    </param>
-    <param>
-      <key>const_size</key>
-      <value>2048</value>
-    </param>
-    <param>
-      <key>M</key>
-      <value>4</value>
-    </param>
-    <param>
-      <key>theta</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>alpha</key>
-      <value>0.005</value>
-    </param>
-    <param>
-      <key>fmax</key>
-      <value>0.06</value>
-    </param>
-    <param>
-      <key>mu</key>
-      <value>0.5</value>
-    </param>
-    <param>
-      <key>gain_mu</key>
-      <value>0.005</value>
-    </param>
-    <param>
-      <key>symbol_rate</key>
-      <value>samp_rate/samps_per_sym</value>
-    </param>
-    <param>
-      <key>omega_limit</key>
-      <value>0.005</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(920, 202)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_fftsink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>1024</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(691, 155)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_scopesink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Scope Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>1e-6</value>
-    </param>
-    <param>
-      <key>ac_couple</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>xy_mode</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(515, 272)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>usrp2_source_xxxx</key>
-    <param>
-      <key>id</key>
-      <value>usrp2_source_xxxx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>interface</key>
-      <value>eth1</value>
-    </param>
-    <param>
-      <key>mac_addr</key>
-      <value></value>
-    </param>
-    <param>
-      <key>decimation</key>
-      <value>interp</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>tun_freq + rx_freq_off</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(270, 200)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>random_source_x_0</source_block_id>
-    <sink_block_id>blks2_dxpsk_mod_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_dxpsk_mod_0</source_block_id>
-    <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_const_vxx_0</source_block_id>
-    <sink_block_id>usrp2_sink_xxxx_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>usrp2_source_xxxx_0</source_block_id>
-    <sink_block_id>wxgui_constellationsink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>usrp2_source_xxxx_0</source_block_id>
-    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>usrp2_source_xxxx_0</source_block_id>
-    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/usrp/usrp2_fft.grc b/grc/examples/usrp/usrp2_fft.grc
deleted file mode 100644 (file)
index 134bd46..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Wed Apr 15 17:30:20 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>usrp2_fft</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>USRP2 FFT Plotter</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>FFT waveform plot</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>100e6/decim</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 170)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>decim</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>16</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(24, 267)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>USRP2 Freq (Hz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>2.45e9</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>2.4e9</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>2.5e9</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(32, 365)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_fftsink2_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>1024</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>30</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(466, 100)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>usrp2_source_xxxx</key>
-    <param>
-      <key>id</key>
-      <value>usrp2_source_xxxx_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>interface</key>
-      <value></value>
-    </param>
-    <param>
-      <key>mac_addr</key>
-      <value></value>
-    </param>
-    <param>
-      <key>decimation</key>
-      <value>decim</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(211, 200)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>usrp2_source_xxxx_0</source_block_id>
-    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/usrp/usrp_two_tone_loopback.grc b/grc/examples/usrp/usrp_two_tone_loopback.grc
deleted file mode 100644 (file)
index 3df9770..0000000
+++ /dev/null
@@ -1,749 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Fri Apr 17 18:23:35 2009</timestamp>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>64e6/200</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(9, 166)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>int(100e6)</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(116, 166)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_sig_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>tone1</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>tone_ampl</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(258, 20)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_sig_source_x0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>tone2</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>tone_ampl</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(255, 179)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_add_xx</key>
-    <param>
-      <key>id</key>
-      <value>gr_add_xx</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>3</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(528, 78)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>parameter</key>
-    <param>
-      <key>id</key>
-      <value>tx_side</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value></value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>A</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>string</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(688, 384)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>usrp_simple_sink_x</key>
-    <param>
-      <key>id</key>
-      <value>usrp_simple_sink_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>format</key>
-      <value></value>
-    </param>
-    <param>
-      <key>which</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>interpolation</key>
-      <value>400</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>side</key>
-      <value>tx_side</value>
-    </param>
-    <param>
-      <key>transmit</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(835, 5)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>usrp_simple_source_x</key>
-    <param>
-      <key>id</key>
-      <value>usrp_simple_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>format</key>
-      <value></value>
-    </param>
-    <param>
-      <key>which</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>decimation</key>
-      <value>200</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>tun_freq</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>20</value>
-    </param>
-    <param>
-      <key>side</key>
-      <value>rx_side</value>
-    </param>
-    <param>
-      <key>rx_ant</key>
-      <value>rx_ant</value>
-    </param>
-    <param>
-      <key>hb_filters</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(479, 224)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>parameter</key>
-    <param>
-      <key>id</key>
-      <value>rx_ant</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value></value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>RXA</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>string</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(802, 384)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_fftsink2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>512*2</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 2, 2, 4</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(746, 133)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>parameter</key>
-    <param>
-      <key>id</key>
-      <value>rx_side</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value></value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>A</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>string</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(568, 382)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_noise_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_noise_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>noise_type</key>
-      <value>gr.GR_GAUSSIAN</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>noise_ampl</value>
-    </param>
-    <param>
-      <key>seed</key>
-      <value>42</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(276, 312)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>noise_ampl</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Noise Ampl</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>2000</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>5000</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_VERTICAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 1, 2, 1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(20, 243)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>tone_ampl</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Tone Ampl</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>5000</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>10e3</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_VERTICAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 2, 1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(28, 437)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>tone1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Tone 1</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>50e3</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>-samp_rate/2</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>samp_rate/2</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 4</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(190, 436)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>tone2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Tone 2</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>75e3</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>-samp_rate/2</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>samp_rate/2</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 4, 1, 4</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(367, 439)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>usrp_two_tone_loopback</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>USRP Loopback - 2 Tone</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>Loopback test with basic rx and basic tx</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>gr_sig_source_x</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_sig_source_x0</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>1</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_noise_source_x</source_block_id>
-    <sink_block_id>gr_add_xx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>2</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>usrp_simple_source_x</source_block_id>
-    <sink_block_id>wxgui_fftsink2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_add_xx</source_block_id>
-    <sink_block_id>usrp_simple_sink_x</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/usrp/usrp_wbfm_receive.grc b/grc/examples/usrp/usrp_wbfm_receive.grc
deleted file mode 100644 (file)
index 8f53475..0000000
+++ /dev/null
@@ -1,466 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Fri Apr 17 19:06:07 2009</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>usrp_wbfm_receive</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>USRP WBFM Receive</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>WBFM Receive with Basic RX or TV RX</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>realtime_scheduling</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>decim</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>200</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(14, 173)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>volume</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Volume</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 1, 4</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(991, 40)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>usrp_simple_source_x</key>
-    <param>
-      <key>id</key>
-      <value>usrp_simple_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>format</key>
-      <value></value>
-    </param>
-    <param>
-      <key>which</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>decimation</key>
-      <value>decim</value>
-    </param>
-    <param>
-      <key>frequency</key>
-      <value>(freq+fine)*1e6</value>
-    </param>
-    <param>
-      <key>gain</key>
-      <value>20</value>
-    </param>
-    <param>
-      <key>side</key>
-      <value>A</value>
-    </param>
-    <param>
-      <key>rx_ant</key>
-      <value>None</value>
-    </param>
-    <param>
-      <key>hb_filters</key>
-      <value></value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(277, 29)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_fftsink2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>64e6/decim</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>(freq+fine)*1e6</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>50</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>512</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>2, 0, 2, 4</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(512, 191)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Frequency (MHz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>87.5</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>108.0</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(104, 243)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>fine</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Fine Freq (MHz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>-.1</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>.1</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 2, 1, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(275, 246)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blks2_wfm_rcv</key>
-    <param>
-      <key>id</key>
-      <value>blks2_wfm_rcv</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>quad_rate</key>
-      <value>64e6/decim</value>
-    </param>
-    <param>
-      <key>audio_decimation</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(510, 37)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_multiply_const_vxx</key>
-    <param>
-      <key>id</key>
-      <value>gr_multiply_const_vxx</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>const</key>
-      <value>volume</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(764, 55)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>audio_sink</key>
-    <param>
-      <key>id</key>
-      <value>audio_sink</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>32000</value>
-    </param>
-    <param>
-      <key>device_name</key>
-      <value></value>
-    </param>
-    <param>
-      <key>ok_to_block</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(703, 241)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>180</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>usrp_simple_source_x</source_block_id>
-    <sink_block_id>blks2_wfm_rcv</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>usrp_simple_source_x</source_block_id>
-    <sink_block_id>wxgui_fftsink2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blks2_wfm_rcv</source_block_id>
-    <sink_block_id>gr_multiply_const_vxx</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_multiply_const_vxx</source_block_id>
-    <sink_block_id>audio_sink</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
diff --git a/grc/examples/xmlrpc/.gitignore b/grc/examples/xmlrpc/.gitignore
deleted file mode 100644 (file)
index b336cc7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/Makefile
-/Makefile.in
diff --git a/grc/examples/xmlrpc/readme.txt b/grc/examples/xmlrpc/readme.txt
deleted file mode 100644 (file)
index c1f87c1..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-##################################################
-# XMLRPC example
-##################################################
-
-XMLRPC allows software to make remote function calls over http. 
-In the case of GRC, one can use XMLRPC to modify variables in a running flow graph.
-See http://www.xmlrpc.com/
-
---- Server Example ---
-Place an "XMLRPC Server" block inside of any flow graph. 
-The server will provide set functions for every variable in the flow graph.
-If a variable is called "freq", the server will provide a function set_freq(new_freq).
-Run the server example and experiment with the example client script.
-
--- Client Example --
-The "XMLRPC Client" block will give a variable control over one remove function.
-In the example client, there is one client block and gui control per variable.
-This technique can be used to remotely control a flow graph, perhaps running on a non-gui machine.
diff --git a/grc/examples/xmlrpc/xmlrpc_client.grc b/grc/examples/xmlrpc/xmlrpc_client.grc
deleted file mode 100644 (file)
index 3bb4e7e..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Thu Jul 24 14:27:44 2008</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>client_block</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>XMLRPC Client</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>example flow graph</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>xmlrpc_client</key>
-    <param>
-      <key>id</key>
-      <value>xmlrpc_client0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>addr</key>
-      <value>localhost</value>
-    </param>
-    <param>
-      <key>port</key>
-      <value>1234</value>
-    </param>
-    <param>
-      <key>callback</key>
-      <value>set_ampl</value>
-    </param>
-    <param>
-      <key>variable</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(409, 35)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>xmlrpc_client</key>
-    <param>
-      <key>id</key>
-      <value>xmlrpc_client</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>addr</key>
-      <value>localhost</value>
-    </param>
-    <param>
-      <key>port</key>
-      <value>1234</value>
-    </param>
-    <param>
-      <key>callback</key>
-      <value>set_freq</value>
-    </param>
-    <param>
-      <key>variable</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(222, 34)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Frequency (Hz)</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>5000</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(207, 162)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_slider</key>
-    <param>
-      <key>id</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Amplitude</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>min</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max</key>
-      <value>2</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>slider_type</key>
-      <value>horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 0, 1, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(397, 167)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable_chooser</key>
-    <param>
-      <key>id</key>
-      <value>offset</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>label</key>
-      <value>Offset</value>
-    </param>
-    <param>
-      <key>value_index</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>choices</key>
-      <value>[-1, 0, 1]</value>
-    </param>
-    <param>
-      <key>labels</key>
-      <value>["neg", "zero", "pos"]</value>
-    </param>
-    <param>
-      <key>chooser_type</key>
-      <value>radio_buttons_horizontal</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>2, 0, 1, 2</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(596, 177)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>xmlrpc_client</key>
-    <param>
-      <key>id</key>
-      <value>xmlrpc_client1</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>addr</key>
-      <value>localhost</value>
-    </param>
-    <param>
-      <key>port</key>
-      <value>1234</value>
-    </param>
-    <param>
-      <key>callback</key>
-      <value>set_offset</value>
-    </param>
-    <param>
-      <key>variable</key>
-      <value>offset*ampl</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(608, 39)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>32000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(13, 172)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-</flow_graph>
\ No newline at end of file
diff --git a/grc/examples/xmlrpc/xmlrpc_client_script.py b/grc/examples/xmlrpc/xmlrpc_client_script.py
deleted file mode 100644 (file)
index 956fa07..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env python
-
-import time
-import random
-import xmlrpclib
-
-#create server object
-s = xmlrpclib.Server("http://localhost:1234")
-
-#randomly change parameters of the sinusoid
-for i in range(10):
-       #generate random values
-       new_freq = random.uniform(0, 5000)
-       new_ampl = random.uniform(0, 2)
-       new_offset = random.uniform(-1, 1)
-       #set new values 
-       time.sleep(1)
-       s.set_freq(new_freq)
-       time.sleep(1)
-       s.set_ampl(new_ampl)
-       time.sleep(1)
-       s.set_offset(new_offset)
-
diff --git a/grc/examples/xmlrpc/xmlrpc_server.grc b/grc/examples/xmlrpc/xmlrpc_server.grc
deleted file mode 100644 (file)
index dc539ef..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-<?xml version='1.0' encoding='ASCII'?>
-<flow_graph>
-  <timestamp>Thu Jul 24 14:27:42 2008</timestamp>
-  <block>
-    <key>options</key>
-    <param>
-      <key>id</key>
-      <value>server_block</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>XMLRPC Server</value>
-    </param>
-    <param>
-      <key>author</key>
-      <value>Example</value>
-    </param>
-    <param>
-      <key>description</key>
-      <value>example flow graph</value>
-    </param>
-    <param>
-      <key>window_size</key>
-      <value>1280, 1024</value>
-    </param>
-    <param>
-      <key>generate_options</key>
-      <value>wx_gui</value>
-    </param>
-    <param>
-      <key>category</key>
-      <value>Custom</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(10, 10)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_sig_source_x</key>
-    <param>
-      <key>id</key>
-      <value>gr_sig_source_x</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>waveform</key>
-      <value>gr.GR_COS_WAVE</value>
-    </param>
-    <param>
-      <key>freq</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>amp</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>offset</key>
-      <value>offset</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(162, 200)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>offset</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(12, 390)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>xmlrpc_server</key>
-    <param>
-      <key>id</key>
-      <value>xmlrpc_server</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>addr</key>
-      <value>localhost</value>
-    </param>
-    <param>
-      <key>port</key>
-      <value>1234</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(395, 240)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
-    <param>
-      <key>id</key>
-      <value>gr_throttle</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>samples_per_second</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(386, 93)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_scopesink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_scopesink2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Scope Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>frame_decim</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>.001</value>
-    </param>
-    <param>
-      <key>marker</key>
-      <value>set_format_line</value>
-    </param>
-    <param>
-      <key>num_inputs</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>0, 0, 2, 4</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(623, 28)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>wxgui_fftsink2</key>
-    <param>
-      <key>id</key>
-      <value>wxgui_fftsink2</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>float</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>FFT Plot</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>baseband_freq</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>y_per_div</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>y_divs</key>
-      <value>8</value>
-    </param>
-    <param>
-      <key>ref_level</key>
-      <value>50</value>
-    </param>
-    <param>
-      <key>fft_size</key>
-      <value>512</value>
-    </param>
-    <param>
-      <key>fft_rate</key>
-      <value>15</value>
-    </param>
-    <param>
-      <key>avg_alpha</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>average</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>peak_hold</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>2, 0, 2, 4</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(630, 233)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>32000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(11, 160)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>freq</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>1000</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(11, 237)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>variable</key>
-    <param>
-      <key>id</key>
-      <value>ampl</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(13, 315)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <connection>
-    <source_block_id>gr_sig_source_x</source_block_id>
-    <sink_block_id>gr_throttle</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_throttle</source_block_id>
-    <sink_block_id>wxgui_scopesink2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>gr_throttle</source_block_id>
-    <sink_block_id>wxgui_fftsink2</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-</flow_graph>
\ No newline at end of file
index 07b8ea7e0f63f5451d6a182f9d7ae7e7f7a11273..c12120eaff068c48be870b956376a057102bf250 100644 (file)
@@ -64,6 +64,9 @@ class BlockTreeWindow(gtk.VBox):
                renderer = gtk.CellRendererText()
                column = gtk.TreeViewColumn('Blocks', renderer, text=NAME_INDEX)
                self.treeview.append_column(column)
+               #setup the search
+               self.treeview.set_enable_search(True)
+               self.treeview.set_search_equal_func(self._handle_search)
                #try to enable the tooltips (available in pygtk 2.12 and above) 
                try: self.treeview.set_tooltip_column(DOC_INDEX)
                except: pass
@@ -145,6 +148,22 @@ class BlockTreeWindow(gtk.VBox):
        ############################################################
        ## Event Handlers
        ############################################################
+       def _handle_search(self, model, column, key, iter):
+               #determine which blocks match the search key
+               blocks = self.get_flow_graph().get_parent().get_blocks()
+               matching_blocks = filter(lambda b: key in b.get_key() or key in b.get_name().lower(), blocks)
+               #remove the old search category
+               try: self.treestore.remove(self._categories.pop((self._search_category, )))
+               except (KeyError, AttributeError): pass #nothing to remove
+               #create a search category
+               if not matching_blocks: return
+               self._search_category = 'Search: %s'%key
+               for block in matching_blocks: self.add_block(self._search_category, block)
+               #expand the search category
+               path = self.treestore.get_path(self._categories[(self._search_category, )])
+               self.treeview.collapse_all()
+               self.treeview.expand_row(path, open_all=False)
+
        def _handle_drag_get_data(self, widget, drag_context, selection_data, info, time):
                """
                Handle a drag and drop by setting the key to the selection object.
index 34d5ab116b07e629f16ecf0d70c29361a16579da..81fb6ba7acb7b48407fc2197099223a7a6780fe5 100644 (file)
@@ -251,7 +251,7 @@ class Param(_Param, _GUIParam):
                #########################
                # Numeric Types
                #########################
-               elif t in ('raw', 'complex', 'real', 'int', 'complex_vector', 'real_vector', 'int_vector', 'hex', 'bool'):
+               elif t in ('raw', 'complex', 'real', 'int', 'hex', 'bool'):
                        #raise exception if python cannot evaluate this value
                        try: e = self.get_parent().get_parent().evaluate(v)
                        except Exception, e: raise Exception, 'Value "%s" cannot be evaluated:\n%s'%(v, e)
@@ -269,10 +269,22 @@ class Param(_Param, _GUIParam):
                                try: assert isinstance(e, INT_TYPES)
                                except AssertionError: raise Exception, 'Expression "%s" is invalid for type integer.'%str(e)
                                return e
-                       #########################
-                       # Numeric Vector Types
-                       #########################
-                       elif t == 'complex_vector':
+                       elif t == 'hex': return hex(e)
+                       elif t == 'bool':
+                               try: assert isinstance(e, bool)
+                               except AssertionError: raise Exception, 'Expression "%s" is invalid for type bool.'%str(e)
+                               return e
+                       else: raise TypeError, 'Type "%s" not handled'%t
+               #########################
+               # Numeric Vector Types
+               #########################
+               elif t in ('complex_vector', 'real_vector', 'int_vector'):
+                       if not v: v = '()' #turn a blank string into an empty list, so it will eval
+                       #raise exception if python cannot evaluate this value
+                       try: e = self.get_parent().get_parent().evaluate(v)
+                       except Exception, e: raise Exception, 'Value "%s" cannot be evaluated:\n%s'%(v, e)
+                       #raise an exception if the data is invalid
+                       if t == 'complex_vector':
                                if not isinstance(e, VECTOR_TYPES):
                                        self._lisitify_flag = True
                                        e = [e]
@@ -296,12 +308,6 @@ class Param(_Param, _GUIParam):
                                        for ei in e: assert isinstance(ei, INT_TYPES)
                                except AssertionError: raise Exception, 'Expression "%s" is invalid for type integer vector.'%str(e)
                                return e
-                       elif t == 'hex': return hex(e)
-                       elif t == 'bool':
-                               try: assert isinstance(e, bool)
-                               except AssertionError: raise Exception, 'Expression "%s" is invalid for type bool.'%str(e)
-                               return e
-                       else: raise TypeError, 'Type "%s" not handled'%t
                #########################
                # String Types
                #########################
index f0c1e749cec747b150593d3ce362b63aeb88b488..f41f415b2c96af3f4ba9f4e2fc39d0da166bec42 100644 (file)
@@ -63,7 +63,7 @@ def _extract(key):
                        #extract descriptions
                        comp_name = extract_txt(xml.xpath(DOXYGEN_NAME_XPATH)[0]).strip()
                        comp_name = '   ---   ' + comp_name + '   ---   '
-                       if re.match('(gr|usrp2|trellis)_.*', key):
+                       if re.match('(gr|usrp2|trellis|noaa)_.*', key):
                                brief_desc = extract_txt(xml.xpath(DOXYGEN_BRIEFDESC_GR_XPATH)[0]).strip()
                                detailed_desc = extract_txt(xml.xpath(DOXYGEN_DETAILDESC_GR_XPATH)[0]).strip()
                        else:
index b4e3af39d671f9a98b17079a124277c21514a845..e4fd4647a7cab3077be2fc88029ce0d91f15001c 100644 (file)
@@ -35,7 +35,6 @@
   * remove blocks in block tree covered by doxygen
 * param editor, expand entry boxes in focus
 * change param dialog to panel within main window
-* search for blocks in category window
 * gui grid editor for configuring grid params/placing wxgui plots and controls
 * drag from one port to another to connect
 * per parameter docs
index 9afa0d292f2df871f46af49174f53314d9efe50b..b21f8023c72e3f6d8d9b03bb38b291bf9e6355e5 100644 (file)
@@ -58,5 +58,5 @@ libgruel_la_LIBADD =                  \
 # ----------------------------------------------------------------
 
 test_gruel_SOURCES = test_gruel.cc
-test_gruel_LDADD   = libgruel.la pmt/libpmt-qa.la
+test_gruel_LDADD   = pmt/libpmt-qa.la libgruel.la
 
index 1c01e43fad450dd21e0e7269e130ef69076573eb..6099ebb72818caca0348320299b244760456e243 100644 (file)
@@ -25,7 +25,7 @@ include $(top_srcdir)/Makefile.common
 SUBDIRS = other
 
 man3dir = $(mandir)/man3
-usrp_docdir  = $(prefix)/share/doc/usrp-@VERSION@
+usrp_docdir  = $(prefix)/share/doc/usrp-$(DOCVER)
 
 EXTRA_DIST =                   \
        Doxyfile.in             \
index b0c21d55fee6941f69f1776a23e808f511312c21..8aa361b22fcb397cbe7f173e9437f9d89bacde29 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2003,2006,2008 Free Software Foundation, Inc.
+# Copyright 2003,2006,2008,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -22,7 +22,7 @@
 include $(top_srcdir)/Makefile.common
 
 AM_CPPFLAGS = $(USRP_INCLUDES) $(BOOST_CPPFLAGS) $(CPPUNIT_INCLUDES) \
-          $(WITH_INCLUDES)
+          $(USB_INCLUDES) $(WITH_INCLUDES)
 
 bin_PROGRAMS =                         \
        usrper                          \
index 34f4c7015b1580e1a1ba5b81a29503822ba30461..7ff1e973698c5fe453d427d53a3c6b47eb28fbbf 100755 (executable)
@@ -1,24 +1,24 @@
 #!/usr/bin/env python
 #
-# Copyright 2005,2007 Free Software Foundation, Inc.
-# 
+# Copyright 2005,2007,2009 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 3, 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., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 from usrpm.usrp_prims import *
 from optparse import OptionParser
@@ -69,6 +69,7 @@ daughterboards = {
     'lftx'            : ((LF_TX, 0x0000),           None),
     'lfrx'            : (None,                      (LF_RX, 0x0000)),
     'wbx_lo'          : ((WBX_LO_TX, 0x0000),       (WBX_LO_RX, 0x0000)),
+    'wbx_ng'          : ((WBX_NG_TX, 0x0000),       (WBX_NG_RX, 0x0000)),
     'xcvr2450'        : ((XCVR2450_TX, 0x0000),       (XCVR2450_RX, 0x0000)),
     'experimental_tx' : ((EXPERIMENTAL_TX, 0x0000), None),
     'experimental_rx' : (None,                      (EXPERIMENTAL_RX, 0x0000)),
@@ -104,11 +105,11 @@ def init_eeprom(u, slot_name, force, dbid, oe):
     if not e:
         print "%s: no d'board, skipped" % (slot_name,)
         return True
-    
+
     if not force and (sum (map (ord, e)) & 0xff) == 0 and ord (e[0]) == 0xDB:
         print "%s: already initialized, skipped" % (slot_name,)
         return True
-        
+
     if not write_dboard_eeprom (u, i2c_addr, dbid, oe):
         print "%s: failed to write d'board EEPROM" % (slot_name,)
         return False
@@ -168,4 +169,4 @@ and at least one side using -A and/or -B."""
 
 if __name__ == "__main__":
     main ()
-    
+
index 769acc77406b7b1ec921bf22bcb28180ebb45a5d..cfce514438397475c08cdf79d20db5140d4a8c11 100644 (file)
@@ -1,23 +1,23 @@
 #
 # Copyright 2009 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 3, 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., 51 Franklin Street,
 # Boston, MA 02110-1301, USA.
-# 
+#
 
 include $(top_srcdir)/Makefile.common
 
@@ -32,7 +32,8 @@ usrpinclude_HEADERS = \
        db_flexrf.h \
        db_flexrf_mimo.h \
        db_tv_rx.h \
-       db_tv_rx_mimo.h \
+       db_tv_rx_mimo.h \
+       db_wbxng.h \
        db_xcvr2450.h \
        libusb_types.h \
        usrp_basic.h \
diff --git a/usrp/host/include/usrp/db_wbxng.h b/usrp/host/include/usrp/db_wbxng.h
new file mode 100644 (file)
index 0000000..8611d47
--- /dev/null
@@ -0,0 +1,115 @@
+/* -*- c++ -*- */
+//
+// Copyright 2009 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 asversion 3, 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., 51 Franklin Street,
+// Boston, MA 02110-1301, USA.
+
+#ifndef INCLUDED_DB_WBXNG_H
+#define INCLUDED_DB_WBXNG_H
+
+#include <usrp/db_base.h>
+#include <cmath>
+
+class adf4350;
+
+class wbxng_base : public db_base
+{
+public:
+  wbxng_base(usrp_basic_sptr usrp, int which, int _power_on=0);
+  ~wbxng_base();
+
+  struct freq_result_t set_freq(double freq);
+
+  bool  is_quadrature();
+  double freq_min();
+  double freq_max();
+
+protected:
+  bool _lock_detect();
+  bool _set_pga(float pga_gain);
+
+  int power_on() { return d_power_on; }
+  int power_off() { return 0; }
+
+  bool d_first;
+  int  d_spi_format;
+  int  d_spi_enable;
+  int  d_power_on;
+  int  d_PD;
+
+  adf4350 *d_common;
+};
+
+// ----------------------------------------------------------------
+
+class wbxng_base_tx : public wbxng_base
+{
+protected:
+  void shutdown();
+
+public:
+  wbxng_base_tx(usrp_basic_sptr usrp, int which, int _power_on=0);
+  ~wbxng_base_tx();
+
+  float gain_min();
+  float gain_max();
+  float gain_db_per_step();
+
+  bool set_auto_tr(bool on);
+  bool set_enable(bool on);
+  bool set_gain(float gain);
+};
+
+class wbxng_base_rx : public wbxng_base
+{
+protected:
+  void shutdown();
+  bool _set_attn(float attn);
+
+public:
+  wbxng_base_rx(usrp_basic_sptr usrp, int which, int _power_on=0);
+  ~wbxng_base_rx();
+
+  bool set_auto_tr(bool on);
+  bool select_rx_antenna(int which_antenna);
+  bool select_rx_antenna(const std::string &which_antenna);
+  bool set_gain(float gain);
+};
+
+// ----------------------------------------------------------------
+
+class db_wbxng_tx : public wbxng_base_tx
+{
+ public:
+  db_wbxng_tx(usrp_basic_sptr usrp, int which);
+  ~db_wbxng_tx();
+};
+
+class db_wbxng_rx : public wbxng_base_rx
+{
+public:
+  db_wbxng_rx(usrp_basic_sptr usrp, int which);
+  ~db_wbxng_rx();
+
+  float gain_min();
+  float gain_max();
+  float gain_db_per_step();
+  bool i_and_q_swapped();
+};
+
+#endif /* INCLUDED_DB_WBXNG_H */
index 2f8cbe6deeb8c61cab8371641267056c65ecb18b..72312ebbb37b8a8d2f8b70c558d06f4d2d17cc19 100644 (file)
@@ -1,22 +1,22 @@
 #
 #  USRP - Universal Software Radio Peripheral
-# 
+#
 #  Copyright (C) 2003,2004,2006,2007,2008,2009 Free Software Foundation, Inc.
-# 
+#
 #  This program 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 3 of the License, or
 #  (at your option) any later version.
-# 
+#
 #  This program 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 this program; if not, write to the Free Software
 #  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
-# 
+#
 
 include $(top_srcdir)/Makefile.common
 
@@ -122,6 +122,8 @@ libusrp_la_common_SOURCES =                 \
        usrp_local_sighandler.cc        \
        usrp_prims_common.cc            \
        usrp_standard.cc                \
+       db_wbxng_adf4350.cc                     \
+       db_wbxng_adf4350_regs.cc                        \
        db_boards.cc                    \
        db_base.cc                      \
        db_basic.cc                     \
@@ -130,6 +132,7 @@ libusrp_la_common_SOURCES =                 \
        db_flexrf.cc                    \
        db_flexrf_mimo.cc               \
        db_dbs_rx.cc                    \
+       db_wbxng.cc                     \
        db_xcvr2450.cc                  \
        db_dtt754.cc                    \
        db_dtt768.cc                    \
@@ -165,6 +168,8 @@ noinst_HEADERS =                    \
        db_base_impl.h                  \
        db_boards.h                     \
        db_util.h                       \
+       db_wbxng_adf4350.h              \
+       db_wbxng_adf4350_regs.h         \
        fusb.h                          \
        fusb_darwin.h                   \
        fusb_generic.h                  \
index 8898e4194830c6b4243f4b7e9880fd1f89be723a..6d491fb6f09499fd912a077275e5e2ee9c039f0b 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio.
  *
@@ -24,6 +24,7 @@
 #define _CIRCULAR_BUFFER_H_
 
 #include "mld_threads.h"
+#include <iostream>
 #include <stdexcept>
 
 #ifndef DO_DEBUG
@@ -43,8 +44,8 @@ private:
   T* d_buffer;
 
 // the following are in Items (type T)
-  UInt32 d_bufLen_I, d_readNdx_I, d_writeNdx_I;
-  UInt32 d_n_avail_write_I, d_n_avail_read_I;
+  size_t d_bufLen_I, d_readNdx_I, d_writeNdx_I;
+  size_t d_n_avail_write_I, d_n_avail_read_I;
 
 // stuff to control access to class internals
   mld_mutex_ptr d_internal;
@@ -69,7 +70,7 @@ private:
   };
 
 public:
-  circular_buffer (UInt32 bufLen_I,
+  circular_buffer (size_t bufLen_I,
                   bool doWriteBlock = true, bool doFullRead = false) {
     if (bufLen_I == 0)
       throw std::runtime_error ("circular_buffer(): "
@@ -81,10 +82,10 @@ public:
     d_internal = NULL;
     d_readBlock = d_writeBlock = NULL;
     reset ();
-    DEBUG (fprintf (stderr, "c_b(): buf len (items) = %ld, "
-                   "doWriteBlock = %s, doFullRead = %s\n", d_bufLen_I,
-                   (d_doWriteBlock ? "true" : "false"),
-                   (d_doFullRead ? "true" : "false")););
+    DEBUG (std::cerr << "c_b(): buf len (items) = " << d_bufLen_
+          << ", doWriteBlock = " << (d_doWriteBlock ? "true" : "false")
+          << ", doFullRead = " << (d_doFullRead ? "true" : "false")
+          << std::endl);
   };
 
   ~circular_buffer () {
@@ -92,21 +93,21 @@ public:
     delete [] d_buffer;
   };
 
-  inline UInt32 n_avail_write_items () {
+  inline size_t n_avail_write_items () {
     d_internal->lock ();
-    UInt32 retVal = d_n_avail_write_I;
+    size_t retVal = d_n_avail_write_I;
     d_internal->unlock ();
     return (retVal);
   };
 
-  inline UInt32 n_avail_read_items () {
+  inline size_t n_avail_read_items () {
     d_internal->lock ();
-    UInt32 retVal = d_n_avail_read_I;
+    size_t retVal = d_n_avail_read_I;
     d_internal->unlock ();
     return (retVal);
   };
 
-  inline UInt32 buffer_length_items () {return (d_bufLen_I);};
+  inline size_t buffer_length_items () {return (d_bufLen_I);};
   inline bool do_write_block () {return (d_doWriteBlock);};
   inline bool do_full_read () {return (d_doFullRead);};
 
@@ -149,14 +150,15 @@ public:
  *     buffer length is larger than the instantiated buffer length
  */
 
-  int enqueue (T* buf, UInt32 bufLen_I) {
-    DEBUG (fprintf (stderr, "enqueue: buf = %X, bufLen = %ld, #av_wr = %ld, "
-                   "#av_rd = %ld.\n", (unsigned int)buf, bufLen_I,
-                   d_n_avail_write_I, d_n_avail_read_I););
+  int enqueue (T* buf, size_t bufLen_I) {
+    DEBUG (std::cerr << "enqueue: buf = " << (void*) buf
+          << ", bufLen = " << bufLen_I
+          << ", #av_wr = " << d_n_avail_write_I
+          << ", #av_rd = " << d_n_avail_read_I << std::endl);
     if (bufLen_I > d_bufLen_I) {
-      fprintf (stderr, "cannot add buffer longer (%ld"
-              ") than instantiated length (%ld"
-              ").\n", bufLen_I, d_bufLen_I);
+      std::cerr << "ERROR: cannot add buffer longer ("
+               << bufLen_I << ") than instantiated length ("
+               << d_bufLen_I << ")." << std::endl;
       throw std::runtime_error ("circular_buffer::enqueue()");
     }
 
@@ -175,25 +177,25 @@ public:
     if (bufLen_I > d_n_avail_write_I) {
       if (d_doWriteBlock) {
        while (bufLen_I > d_n_avail_write_I) {
-         DEBUG (fprintf (stderr, "enqueue: #len > #a, waiting.\n"););
+         DEBUG (std::cerr << "enqueue: #len > #a, waiting." << std::endl);
          // wait will automatically unlock() the internal mutex
          d_writeBlock->wait ();
          // and lock() it here.
          if (d_doAbort) {
            d_internal->unlock ();
-           DEBUG (fprintf (stderr, "enqueue: #len > #a, aborting.\n"););
+           DEBUG (std::cerr << "enqueue: #len > #a, aborting." << std::endl);
            return (2);
          }
-         DEBUG (fprintf (stderr, "enqueue: #len > #a, done waiting.\n"););
+         DEBUG (std::cerr << "enqueue: #len > #a, done waiting." << std::endl);
        }
       } else {
        d_n_avail_read_I = d_bufLen_I - bufLen_I;
        d_n_avail_write_I = bufLen_I;
-       DEBUG (fprintf (stderr, "circular_buffer::enqueue: overflow\n"););
+       DEBUG (std::cerr << "circular_buffer::enqueue: overflow" << std::endl);
        retval = -1;
       }
     }
-    UInt32 n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0;
+    size_t n_now_I = d_bufLen_I - d_writeNdx_I, n_start_I = 0;
     if (n_now_I > bufLen_I)
       n_now_I = bufLen_I;
     else if (n_now_I < bufLen_I)
@@ -232,23 +234,24 @@ public:
  *     buffer length is larger than the instantiated buffer length
  */
 
-  int dequeue (T* buf, UInt32* bufLen_I) {
-    DEBUG (fprintf (stderr, "dequeue: buf = %X, *bufLen = %ld, #av_wr = %ld, "
-                   "#av_rd = %ld.\n", (unsigned int)buf, *bufLen_I,
-                   d_n_avail_write_I, d_n_avail_read_I););
+  int dequeue (T* buf, size_t* bufLen_I) {
+    DEBUG (std::cerr << "dequeue: buf = " << ((void*) buf)
+          << ", *bufLen = " << (*bufLen_I)
+          << ", #av_wr = " <<  d_n_avail_write_I
+          << ", #av_rd = " << d_n_avail_read_I << std::endl);
     if (!bufLen_I)
       throw std::runtime_error ("circular_buffer::dequeue(): "
                                "input bufLen pointer is NULL.\n");
     if (!buf)
       throw std::runtime_error ("circular_buffer::dequeue(): "
                                "input buffer pointer is NULL.\n");
-    UInt32 l_bufLen_I = *bufLen_I;
+    size_t l_bufLen_I = *bufLen_I;
     if (l_bufLen_I == 0)
       return (0);
     if (l_bufLen_I > d_bufLen_I) {
-      fprintf (stderr, "cannot remove buffer longer (%ld"
-              ") than instantiated length (%ld"
-              ").\n", l_bufLen_I, d_bufLen_I);
+      std::cerr << "ERROR: cannot remove buffer longer ("
+               << l_bufLen_I << ") than instantiated length ("
+               << d_bufLen_I << ")." << std::endl;
       throw std::runtime_error ("circular_buffer::dequeue()");
     }
 
@@ -259,34 +262,34 @@ public:
     }
     if (d_doFullRead) {
       while (d_n_avail_read_I < l_bufLen_I) {
-       DEBUG (fprintf (stderr, "dequeue: #a < #len, waiting.\n"););
+       DEBUG (std::cerr << "dequeue: #a < #len, waiting." << std::endl);
        // wait will automatically unlock() the internal mutex
        d_readBlock->wait ();
        // and lock() it here.
        if (d_doAbort) {
          d_internal->unlock ();
-         DEBUG (fprintf (stderr, "dequeue: #a < #len, aborting.\n"););
+         DEBUG (std::cerr << "dequeue: #a < #len, aborting." << std::endl);
          return (2);
        }
-       DEBUG (fprintf (stderr, "dequeue: #a < #len, done waiting.\n"););
+       DEBUG (std::cerr << "dequeue: #a < #len, done waiting." << std::endl);
      }
     } else {
       while (d_n_avail_read_I == 0) {
-       DEBUG (fprintf (stderr, "dequeue: #a == 0, waiting.\n"););
+       DEBUG (std::cerr << "dequeue: #a == 0, waiting." << std::endl);
        // wait will automatically unlock() the internal mutex
        d_readBlock->wait ();
        // and lock() it here.
        if (d_doAbort) {
          d_internal->unlock ();
-         DEBUG (fprintf (stderr, "dequeue: #a == 0, aborting.\n"););
+         DEBUG (std::cerr << "dequeue: #a == 0, aborting." << std::endl);
          return (2);
        }
-       DEBUG (fprintf (stderr, "dequeue: #a == 0, done waiting.\n"););
+       DEBUG (std::cerr << "dequeue: #a == 0, done waiting." << std::endl);
       }
     }
     if (l_bufLen_I > d_n_avail_read_I)
       l_bufLen_I = d_n_avail_read_I;
-    UInt32 n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0;
+    size_t n_now_I = d_bufLen_I - d_readNdx_I, n_start_I = 0;
     if (n_now_I > l_bufLen_I)
       n_now_I = l_bufLen_I;
     else if (n_now_I < l_bufLen_I)
index e495d609b2f6c265b19d48a4b24515cd8f036588..97fe2c1a897f1a2bf893a8771404c96766d42f5c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio.
  *
@@ -109,12 +109,12 @@ template <class T> class circular_linked_list {
 
 private:
   s_node_ptr d_current, d_iterate, d_available, d_inUse;
-  UInt32 d_n_nodes, d_n_used;
+  size_t d_n_nodes, d_n_used;
   mld_mutex_ptr d_internal;
   mld_condition_ptr d_ioBlock;
 
 public:
-  circular_linked_list (UInt32 n_nodes) {
+  circular_linked_list (size_t n_nodes) {
     if (n_nodes == 0)
       throw std::runtime_error ("circular_linked_list(): n_nodes == 0");
 
@@ -136,7 +136,7 @@ public:
       l_prev->next (l_next);
       l_prev->prev (l_next);
       if (n_nodes > 2) {
-       UInt32 n = n_nodes - 2;
+       size_t n = n_nodes - 2;
        while (n-- > 0) {
          d_current = new s_node<T> (l_prev, l_next);
          d_current->set_available ();
@@ -171,17 +171,17 @@ public:
     d_internal->lock ();
 // find an available node
     s_node_ptr l_node = d_available; 
-    DEBUG (fprintf (stderr, "w "););
+    DEBUG (std::cerr << "w ");
     while (! l_node) {
-      DEBUG (fprintf (stderr, "x\n"););
+      DEBUG (std::cerr << "x" << std::endl);
       // the ioBlock condition will automatically unlock() d_internal
       d_ioBlock->wait ();
       // and lock() is here
-      DEBUG (fprintf (stderr, "y\n"););
+      DEBUG (std::cerr << "y" << std::endl);
       l_node = d_available;
     }
-    DEBUG (fprintf (stderr, "::f_n_a_n: #u = %ld, node = %p\n",
-                   num_used(), l_node););
+    DEBUG (std::cerr << "::f_n_a_n: #u = " << num_used()
+          << ", node = " << l_node << std::endl);
 // remove this one from the current available list
     if (num_available () == 1) {
 // last one, just set available to NULL
@@ -203,8 +203,8 @@ public:
   void make_node_available (s_node_ptr l_node) {
     if (!l_node) return;
     d_internal->lock ();
-    DEBUG (fprintf (stderr, "::m_n_a: #u = %ld, node = %p\n",
-                   num_used(), l_node););
+    DEBUG (std::cerr << "::m_n_a: #u = " << num_used()
+          << ", node = " << l_node << std::endl);
 // remove this node from the inUse list
     if (num_used () == 1) {
 // last one, just set inUse to NULL
@@ -219,10 +219,10 @@ public:
       l_node->insert_before (d_available);
     d_n_used--;
 
-    DEBUG (fprintf (stderr, "s%ld ", d_n_used););
+    DEBUG (std::cerr << "s" << d_n_used);
 // signal the condition when new data arrives
     d_ioBlock->signal ();
-    DEBUG (fprintf (stderr, "t "););
+    DEBUG (std::cerr << "t ");
 
 // unlock the mutex for thread safety
     d_internal->unlock ();
@@ -251,10 +251,10 @@ public:
 
   __INLINE__ T object () { return (d_current->d_object); };
   __INLINE__ void object (T l_object) { d_current->d_object = l_object; };
-  __INLINE__ UInt32 num_nodes () { return (d_n_nodes); };
-  __INLINE__ UInt32 num_used () { return (d_n_used); };
-  __INLINE__ void num_used (UInt32 l_n_used) { d_n_used = l_n_used; };
-  __INLINE__ UInt32 num_available () { return (d_n_nodes - d_n_used); };
+  __INLINE__ size_t num_nodes () { return (d_n_nodes); };
+  __INLINE__ size_t num_used () { return (d_n_used); };
+  __INLINE__ void num_used (size_t l_n_used) { d_n_used = l_n_used; };
+  __INLINE__ size_t num_available () { return (d_n_nodes - d_n_used); };
   __INLINE__ void num_used_inc (void) {
     if (d_n_used < d_n_nodes) ++d_n_used;
   };
index 063a2e9c645e55c36fd12f67eb1e8094a75e1b45..8446f044ec633ec6233b48c993b0f1d8da235dd2 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio.
  *
 #include <IOKit/IOKitLib.h>
 
 extern "C" {
-static char *
+
+static const char* darwin_error_strings[] = {
+  "no error",
+  "device not opened for exclusive access",
+  "no connection to an IOService",
+  "no asyc port has been opened for interface",
+  "another process has device opened for exclusive access",
+  "pipe is stalled",
+  "could not establish a connection to Darin kernel",
+  "invalid argument",
+  "unknown error"
+};
+
+static const char *
 darwin_error_str (int result)
 {
   switch (result) {
   case kIOReturnSuccess:
-    return "no error";
+    return (darwin_error_strings[0]);
   case kIOReturnNotOpen:
-    return "device not opened for exclusive access";
+    return (darwin_error_strings[1]);
   case kIOReturnNoDevice:
-    return "no connection to an IOService";
+    return (darwin_error_strings[2]);
   case kIOUSBNoAsyncPortErr:
-    return "no asyc port has been opened for interface";
+    return (darwin_error_strings[3]);
   case kIOReturnExclusiveAccess:
-    return "another process has device opened for exclusive access";
+    return (darwin_error_strings[4]);
   case kIOUSBPipeStalled:
-    return "pipe is stalled";
+    return (darwin_error_strings[5]);
   case kIOReturnError:
-    return "could not establish a connection to Darin kernel";
+    return (darwin_error_strings[6]);
   case kIOReturnBadArgument:
-    return "invalid argument";
+    return (darwin_error_strings[7]);
   default:
-    return "unknown error";
+    return (darwin_error_strings[8]);
   }
 }
 
@@ -103,40 +116,49 @@ extern char usb_error_str[1024];
 extern int usb_error_errno;
 extern usb_error_type_t usb_error_type;
 
-#define USB_ERROR(r, x)                                \
-       do { \
-          usb_error_type = USB_ERROR_TYPE_ERRNO; \
-          usb_error_errno = x; \
-         return r; \
-       } while (0)
-
-#define USB_ERROR_STR(r, x, format, args...)   \
-       do { \
-         usb_error_type = USB_ERROR_TYPE_STRING; \
-         snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \
-          if (usb_debug) \
-            fprintf(stderr, "USB error: %s\n", usb_error_str); \
-         return r; \
-       } while (0)
-
-#define USB_ERROR_STR_ORIG(x, format, args...) \
-       do { \
-         usb_error_type = USB_ERROR_TYPE_STRING; \
-         snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \
-          if (usb_debug) \
-            fprintf(stderr, "USB error: %s\n", usb_error_str); \
-         return x; \
-       } while (0)
-
-#define USB_ERROR_STR_NO_RET(x, format, args...)       \
-       do { \
-         usb_error_type = USB_ERROR_TYPE_STRING; \
-         snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \
-          if (usb_debug) \
-            fprintf(stderr, "USB error: %s\n", usb_error_str); \
-       } while (0)
-
-/* simple function that figures out what pipeRef is associated with an endpoint */
+#define USB_ERROR(r, x)                                 \
+  do {                                          \
+    usb_error_type = USB_ERROR_TYPE_ERRNO;      \
+    usb_error_errno = x;                        \
+    return (r);                                         \
+  } while (0)
+
+#define USB_ERROR_STR(r, x, format, args...)                           \
+  do {                                                                 \
+    usb_error_type = USB_ERROR_TYPE_STRING;                            \
+    snprintf (usb_error_str, sizeof (usb_error_str) - 1,               \
+             format, ## args);                                         \
+    if (usb_debug) {                                                   \
+      std::cerr << "USB error: " << usb_error_str << std::cerr;                \
+    }                                                                  \
+    return (r);                                                                \
+  } while (0)
+
+#define USB_ERROR_STR_ORIG(x, format, args...)                         \
+  do {                                                                 \
+    usb_error_type = USB_ERROR_TYPE_STRING;                            \
+    snprintf (usb_error_str, sizeof (usb_error_str) - 1,               \
+             format, ## args);                                         \
+    if (usb_debug) {                                                   \
+      std::cerr << "USB error: " << usb_error_str << std::endl;                \
+    }                                                                  \
+    return (x);                                                                \
+  } while (0)
+
+#define USB_ERROR_STR_NO_RET(x, format, args...)                       \
+  do {                                                                 \
+    usb_error_type = USB_ERROR_TYPE_STRING;                            \
+    snprintf (usb_error_str, sizeof (usb_error_str) - 1,               \
+             format, ## args);                                         \
+    if (usb_debug) {                                                   \
+      std::cerr << "USB error: " << usb_error_str << std::endl;                \
+    }                                                                  \
+  } while (0)
+
+/*
+ * simple function that figures out what pipeRef
+ * is associated with an endpoint
+ */
 static int ep_to_pipeRef (darwin_dev_handle *device, int ep)
 {
   io_return_t ret;
@@ -145,45 +167,60 @@ static int ep_to_pipeRef (darwin_dev_handle *device, int ep)
   UInt16 dont_care2;
   int i;
 
-  if (usb_debug > 3)
-    fprintf(stderr, "Converting ep address to pipeRef.\n");
+  if (usb_debug > 3) {
+    std::cerr << "Converting ep address to pipeRef." << std::endl;
+  }
 
   /* retrieve the total number of endpoints on this interface */
   ret = (*(device->interface))->GetNumEndpoints(device->interface, &numep);
   if ( ret ) {
-    if ( usb_debug > 3 )
-      fprintf ( stderr, "ep_to_pipeRef: interface is %p\n", device->interface );
-    USB_ERROR_STR_ORIG ( -ret, "ep_to_pipeRef: can't get number of endpoints for interface" );
+    if ( usb_debug > 3 ) {
+      std::cerr << "ep_to_pipeRef: interface is "
+               << device->interface << std::endl;
+    }
+    USB_ERROR_STR_ORIG ( -ret, "ep_to_pipeRef: can't get number of "
+                        "endpoints for interface" );
   }
 
   /* iterate through the pipeRefs until we find the correct one */
   for (i = 1 ; i <= numep ; i++) {
-    ret = (*(device->interface))->GetPipeProperties(device->interface, i, &direction, &number,
-                                                   &dont_care1, &dont_care2, &dont_care3);
+    ret = (*(device->interface))->GetPipeProperties
+      (device->interface, i, &direction, &number,
+       &dont_care1, &dont_care2, &dont_care3);
 
     if (ret != kIOReturnSuccess) {
-      fprintf (stderr, "ep_to_pipeRef: an error occurred getting pipe information on pipe %d\n",
-              i );
-      USB_ERROR_STR_ORIG (-darwin_to_errno(ret), "ep_to_pipeRef(GetPipeProperties): %s", darwin_error_str(ret));
-    }
+      std::cerr << "ep_to_pipeRef: an error occurred getting "
+               << "pipe information on pipe " << i << std::endl;
 
-    if (usb_debug > 3)
-      fprintf (stderr, "ep_to_pipeRef: Pipe %i: DIR: %i number: %i\n", i, direction, number);
+      USB_ERROR_STR_ORIG (-darwin_to_errno(ret),
+                         "ep_to_pipeRef(GetPipeProperties): %s",
+                         darwin_error_str(ret));
+    }
 
-    /* calculate the endpoint of the pipe and check it versus the requested endpoint */
-    if ( ((direction << 7 & USB_ENDPOINT_DIR_MASK) | (number & USB_ENDPOINT_ADDRESS_MASK)) == ep ) {
-      if (usb_debug > 3)
-       fprintf(stderr, "ep_to_pipeRef: pipeRef for ep address 0x%02x found: 0x%02x\n", ep, i);
+    if (usb_debug > 3) {
+      std::cerr << "ep_to_pipeRef: Pipe " << i << ": DIR: "
+               << direction << " number: " << number << std::endl;
+    }
 
-      return i;
+    /* calculate the endpoint of the pipe and check it versus
+       the requested endpoint */
+    if ( ((direction << 7 & USB_ENDPOINT_DIR_MASK) |
+         (number & USB_ENDPOINT_ADDRESS_MASK)) == ep ) {
+      if (usb_debug > 3) {
+       std::cerr << "ep_to_pipeRef: pipeRef for ep address "
+                 << ep << " found: " << i << std::endl;
+      }
+      return (i);
     }
   }
 
-  if (usb_debug > 3)
-    fprintf(stderr, "ep_to_pipeRef: No pipeRef found with endpoint address 0x%02x.\n", ep);
-  
+  if (usb_debug > 3) {
+    std::cerr << "ep_to_pipeRef: No pipeRef found with endpoint address "
+             << ep << std::endl;
+  }
+
   /* none of the found pipes match the requested endpoint */
-  return -1;
+  return (-1);
 }
 
 }
index 8ef5bac8b248647bb8d3d234446253b9d5d39483..590d8132d152f02b368c6ee028cf6f28e539d2c8 100644 (file)
@@ -1,19 +1,19 @@
 /* -*- c++ -*- */
 //
 // Copyright 2008,2009 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 asversion 3, 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., 51 Franklin Street,
@@ -32,6 +32,7 @@
 #include <usrp/db_dbs_rx.h>
 #include <usrp/db_flexrf.h>
 #include <usrp/db_flexrf_mimo.h>
+#include <usrp/db_wbxng.h>
 #include <usrp/db_xcvr2450.h>
 #include <usrp/db_dtt754.h>
 #include <usrp/db_dtt768.h>
@@ -63,7 +64,7 @@ instantiate_dbs(int dbid, usrp_basic_sptr usrp, int which_side)
     db.push_back(db_base_sptr(new db_lf_rx(usrp, which_side, 1)));
     db.push_back(db_base_sptr(new db_lf_rx(usrp, which_side, 2)));
     break;
-    
+
   case(USRP_DBID_DBS_RX):
     db.push_back(db_base_sptr(new db_dbs_rx(usrp, which_side)));
     break;
@@ -184,7 +185,7 @@ instantiate_dbs(int dbid, usrp_basic_sptr usrp, int which_side)
   case(USRP_DBID_XCVR2450_RX):
     db.push_back(db_base_sptr(new db_xcvr2450_rx(usrp, which_side)));
     break;
-  
+
 #if 0  // FIXME wbx doesn't compile
   case(USRP_DBID_WBX_LO_TX):
     db.push_back(db_base_sptr(new db_wbx_lo_tx(usrp, which_side)));
@@ -194,6 +195,13 @@ instantiate_dbs(int dbid, usrp_basic_sptr usrp, int which_side)
     break;
 #endif
 
+  case(USRP_DBID_WBX_NG_TX):
+    db.push_back(db_base_sptr(new db_wbxng_tx(usrp, which_side)));
+    break;
+  case(USRP_DBID_WBX_NG_RX):
+    db.push_back(db_base_sptr(new db_wbxng_rx(usrp, which_side)));
+    break;
+
   case(USRP_DBID_DTT754):
     db.push_back(db_base_sptr(new db_dtt754(usrp, which_side)));
     break;
@@ -210,7 +218,7 @@ instantiate_dbs(int dbid, usrp_basic_sptr usrp, int which_side)
       db.push_back(db_base_sptr(new db_basic_rx(usrp, which_side, 1)));
     }
     break;
-  
+
   case(-2):
   default:
     if (boost::dynamic_pointer_cast<usrp_basic_tx>(usrp)){
diff --git a/usrp/host/lib/db_wbxng.cc b/usrp/host/lib/db_wbxng.cc
new file mode 100644 (file)
index 0000000..56a8486
--- /dev/null
@@ -0,0 +1,503 @@
+//
+// Copyright 2008,2009 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 asversion 3, 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., 51 Franklin Street,
+// Boston, MA 02110-1301, USA.
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrp/db_wbxng.h>
+#include "db_wbxng_adf4350.h"
+#include <db_base_impl.h>
+#include <stdio.h>
+
+// d'board i/o pin defs
+// Tx and Rx have shared defs, but different i/o regs
+#define ENABLE_5        (1 << 7)         // enables 5.0V power supply
+#define ENABLE_33       (1 << 6)         // enables 3.3V supply
+#define RX_TXN          (1 << 5)         // Tx only: T/R antenna switch for TX/RX port
+#define RX2_RX1N        (1 << 5)         // Rx only: antenna switch between RX2 and TX/RX port
+#define RXBB_EN         (1 << 4)
+#define TXMOD_EN        (1 << 4)
+#define PLL_CE          (1 << 3)
+#define PLL_PDBRF       (1 << 2)
+#define PLL_MUXOUT      (1 << 1)
+#define PLL_LOCK_DETECT (1 << 0)
+
+// RX Attenuator constants
+#define ATTN_SHIFT     8
+#define ATTN_MASK      (63 << ATTN_SHIFT)
+
+wbxng_base::wbxng_base(usrp_basic_sptr _usrp, int which, int _power_on)
+  : db_base(_usrp, which), d_power_on(_power_on)
+{
+  /*
+    @param usrp: instance of usrp.source_c
+    @param which: which side: 0 or 1 corresponding to side A or B respectively
+    @type which: int
+  */
+
+  usrp()->_write_oe(d_which, 0, 0xffff);   // turn off all outputs
+
+  d_first = true;
+  d_spi_format = SPI_FMT_MSB | SPI_FMT_HDR_0;
+
+  _enable_refclk(false);                // disable refclk
+
+  set_auto_tr(false);
+}
+
+wbxng_base::~wbxng_base()
+{
+  if (d_common)
+    delete d_common;
+}
+
+struct freq_result_t
+wbxng_base::set_freq(double freq)
+{
+  /*
+    @returns (ok, actual_baseband_freq) where:
+    ok is True or False and indicates success or failure,
+    actual_baseband_freq is the RF frequency that corresponds to DC in the IF.
+  */
+
+  freq_t int_freq = freq_t(freq);
+  bool ok = d_common->_set_freq(int_freq*2);
+  double freq_result = (double) d_common->_get_freq()/2.0;
+  struct freq_result_t args = {ok, freq_result};
+
+  /* Wait before reading Lock Detect*/
+  timespec t;
+  t.tv_sec = 0;
+  t.tv_nsec = 10000000;
+  nanosleep(&t, NULL);
+
+  fprintf(stderr,"Setting WBXNG frequency, requested %d, obtained %f, lock_detect %d\n",
+          int_freq, freq_result, d_common->_get_locked());
+
+  // FIXME
+  // Offsetting the LO helps get the Tx carrier leakage out of the way.
+  // This also ensures that on Rx, we're not getting hosed by the
+  // FPGA's DC removal loop's time constant.  We were seeing a
+  // problem when running with discontinuous transmission.
+  // Offsetting the LO made the problem go away.
+  //freq += d_lo_offset;
+
+  return args;
+}
+
+bool
+wbxng_base::_set_pga(float pga_gain)
+{
+  if(d_which == 0) {
+    usrp()->set_pga(0, pga_gain);
+    usrp()->set_pga(1, pga_gain);
+  }
+  else {
+    usrp()->set_pga(2, pga_gain);
+    usrp()->set_pga(3, pga_gain);
+  }
+  return true;
+}
+
+bool
+wbxng_base::is_quadrature()
+{
+  /*
+    Return True if this board requires both I & Q analog channels.
+
+    This bit of info is useful when setting up the USRP Rx mux register.
+  */
+  return true;
+}
+
+double
+wbxng_base::freq_min()
+{
+  return (double) d_common->_get_min_freq()/2.0;
+}
+
+double
+wbxng_base::freq_max()
+{
+  return (double) d_common->_get_max_freq()/2.0;
+}
+
+// ----------------------------------------------------------------
+
+wbxng_base_tx::wbxng_base_tx(usrp_basic_sptr _usrp, int which, int _power_on)
+  : wbxng_base(_usrp, which, _power_on)
+{
+  /*
+    @param usrp: instance of usrp.sink_c
+    @param which: 0 or 1 corresponding to side TX_A or TX_B respectively.
+  */
+
+  if(which == 0) {
+    d_spi_enable = SPI_ENABLE_TX_A;
+  }
+  else {
+    d_spi_enable = SPI_ENABLE_TX_B;
+  }
+
+  d_common = new adf4350(_usrp, d_which, d_spi_enable);
+
+  // FIXME: power up the transmit side, but don't enable the mixer
+  usrp()->_write_oe(d_which,(RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5), (RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5));
+  usrp()->write_io(d_which, (power_on()|RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5), (RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5));
+  fprintf(stderr,"Setting WBXNG TXMOD on");
+  //set_lo_offset(4e6);
+
+  set_gain((gain_min() + gain_max()) / 2.0);  // initialize gain
+}
+
+wbxng_base_tx::~wbxng_base_tx()
+{
+  shutdown();
+}
+
+
+void
+wbxng_base_tx::shutdown()
+{
+  // fprintf(stderr, "wbxng_base_tx::shutdown  d_is_shutdown = %d\n", d_is_shutdown);
+
+  if (!d_is_shutdown){
+    d_is_shutdown = true;
+    // do whatever there is to do to shutdown
+
+    // Power down and leave the T/R switch in the R position
+    usrp()->write_io(d_which, (power_off()|RX_TXN), (RX_TXN|ENABLE_33|ENABLE_5));
+
+    // Power down VCO/PLL
+    d_common->_enable(false);
+
+    /*
+    _write_control(_compute_control_reg());
+    */
+    _enable_refclk(false);                       // turn off refclk
+    set_auto_tr(false);
+  }
+}
+
+bool
+wbxng_base_tx::set_auto_tr(bool on)
+{
+  bool ok = true;
+  if(on) {
+    ok &= set_atr_mask (RX_TXN | ENABLE_33 | ENABLE_5);
+    ok &= set_atr_txval(0      | ENABLE_33 | ENABLE_5);
+    ok &= set_atr_rxval(RX_TXN | 0);
+  }
+  else {
+    ok &= set_atr_mask (0);
+    ok &= set_atr_txval(0);
+    ok &= set_atr_rxval(0);
+  }
+  return ok;
+}
+
+bool
+wbxng_base_tx::set_enable(bool on)
+{
+  /*
+    Enable transmitter if on is true
+  */
+
+  int v;
+  int mask = RX_TXN | ENABLE_5 | ENABLE_33;
+  if(on) {
+    v = ENABLE_5 | ENABLE_33;
+  }
+  else {
+    v = RX_TXN;
+  }
+  return usrp()->write_io(d_which, v, mask);
+}
+
+float
+wbxng_base_tx::gain_min()
+{
+  return usrp()->pga_max();
+}
+
+float
+wbxng_base_tx::gain_max()
+{
+  return usrp()->pga_max() + 25.0;
+}
+
+float
+wbxng_base_tx::gain_db_per_step()
+{
+  return 1;
+}
+
+bool
+wbxng_base_tx::set_gain(float gain)
+{
+  /*
+    Set the gain.
+
+    @param gain:  gain in decibels
+    @returns True/False
+  */
+
+  // clamp gain
+  gain = std::max(gain_min(), std::min(gain, gain_max()));
+
+  float pga_gain, agc_gain;
+  float V_maxgain, V_mingain, V_fullscale, dac_value;
+
+  float maxgain = gain_max() - usrp()->pga_max();
+  float mingain = gain_min();
+  if(gain > maxgain) {
+    pga_gain = gain-maxgain;
+    assert(pga_gain <= usrp()->pga_max());
+    agc_gain = maxgain;
+  }
+  else {
+    pga_gain = 0;
+    agc_gain = gain;
+  }
+
+  V_maxgain = 0.7;
+  V_mingain = 1.4;
+  V_fullscale = 3.3;
+  dac_value = (agc_gain*(V_maxgain-V_mingain)/(maxgain-mingain) + V_mingain)*4096/V_fullscale;
+
+  fprintf(stderr, "TXGAIN: %f dB, Dac Code: %d, Voltage: %f\n", gain, int(dac_value), float((dac_value/4096.0)*V_fullscale));
+  assert(dac_value>=0 && dac_value<4096);
+
+  return (usrp()->write_aux_dac(d_which, 0, int(dac_value))
+         && _set_pga(int(pga_gain)));
+}
+
+
+/**************************************************************************/
+
+
+wbxng_base_rx::wbxng_base_rx(usrp_basic_sptr _usrp, int which, int _power_on)
+  : wbxng_base(_usrp, which, _power_on)
+{
+  /*
+    @param usrp: instance of usrp.source_c
+    @param which: 0 or 1 corresponding to side RX_A or RX_B respectively.
+  */
+
+  if(which == 0) {
+    d_spi_enable = SPI_ENABLE_RX_A;
+  }
+  else {
+    d_spi_enable = SPI_ENABLE_RX_B;
+  }
+
+  d_common = new adf4350(_usrp, d_which, d_spi_enable);
+
+  usrp()->_write_oe(d_which, (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5), (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5));
+  usrp()->write_io(d_which,  (power_on()|RX2_RX1N|RXBB_EN|ENABLE_33|ENABLE_5), (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5));
+  fprintf(stderr,"Setting WBXNG RXBB on");
+
+  // set up for RX on TX/RX port
+  select_rx_antenna("TX/RX");
+
+  bypass_adc_buffers(true);
+
+  /*
+  set_lo_offset(-4e6);
+  */
+}
+
+wbxng_base_rx::~wbxng_base_rx()
+{
+  shutdown();
+}
+
+void
+wbxng_base_rx::shutdown()
+{
+  // fprintf(stderr, "wbxng_base_rx::shutdown  d_is_shutdown = %d\n", d_is_shutdown);
+
+  if (!d_is_shutdown){
+    d_is_shutdown = true;
+    // do whatever there is to do to shutdown
+
+    // Power down
+    usrp()->common_write_io(C_RX, d_which, power_off(), (ENABLE_33|ENABLE_5));
+
+    // Power down VCO/PLL
+    d_common->_enable(false);
+
+    // fprintf(stderr, "wbxng_base_rx::shutdown  before _write_control\n");
+    //_write_control(_compute_control_reg());
+
+    // fprintf(stderr, "wbxng_base_rx::shutdown  before _enable_refclk\n");
+    _enable_refclk(false);                       // turn off refclk
+
+    // fprintf(stderr, "wbxng_base_rx::shutdown  before set_auto_tr\n");
+    set_auto_tr(false);
+
+    // fprintf(stderr, "wbxng_base_rx::shutdown  after set_auto_tr\n");
+  }
+}
+
+bool
+wbxng_base_rx::set_auto_tr(bool on)
+{
+  bool ok = true;
+  if(on) {
+    ok &= set_atr_mask (ENABLE_33|ENABLE_5);
+    ok &= set_atr_txval(     0);
+    ok &= set_atr_rxval(ENABLE_33|ENABLE_5);
+  }
+  else {
+    ok &= set_atr_mask (0);
+    ok &= set_atr_txval(0);
+    ok &= set_atr_rxval(0);
+  }
+  return true;
+}
+
+bool
+wbxng_base_rx::select_rx_antenna(int which_antenna)
+{
+  /*
+    Specify which antenna port to use for reception.
+    @param which_antenna: either 'TX/RX' or 'RX2'
+  */
+
+  if(which_antenna == 0) {
+    usrp()->write_io(d_which, 0,RX2_RX1N);
+  }
+  else if(which_antenna == 1) {
+    usrp()->write_io(d_which, RX2_RX1N, RX2_RX1N);
+  }
+  else {
+    return false;
+  }
+  return true;
+}
+
+bool
+wbxng_base_rx::select_rx_antenna(const std::string &which_antenna)
+{
+  /*
+    Specify which antenna port to use for reception.
+    @param which_antenna: either 'TX/RX' or 'RX2'
+  */
+
+
+  if(which_antenna == "TX/RX") {
+    usrp()->write_io(d_which, 0, RX2_RX1N);
+  }
+  else if(which_antenna == "RX2") {
+    usrp()->write_io(d_which, RX2_RX1N, RX2_RX1N);
+  }
+  else {
+    return false;
+  }
+
+  return true;
+}
+
+bool
+wbxng_base_rx::set_gain(float gain)
+{
+  /*
+    Set the gain.
+
+    @param gain:  gain in decibels
+    @returns True/False
+  */
+
+  // clamp gain
+  gain = std::max(gain_min(), std::min(gain, gain_max()));
+
+  float pga_gain, agc_gain;
+
+  float maxgain = gain_max() - usrp()->pga_max();
+  float mingain = gain_min();
+  if(gain > maxgain) {
+    pga_gain = gain-maxgain;
+    assert(pga_gain <= usrp()->pga_max());
+    agc_gain = maxgain;
+  }
+  else {
+    pga_gain = 0;
+    agc_gain = gain;
+  }
+
+  return _set_attn(maxgain-agc_gain) && _set_pga(int(pga_gain));
+}
+
+bool
+wbxng_base_rx::_set_attn(float attn)
+{
+  int attn_code = int(floor(attn/0.5));
+  unsigned int iobits = (~attn_code) << ATTN_SHIFT;
+  fprintf(stderr, "Attenuation: %f dB, Code: %d, IO Bits %x, Mask: %x \n", attn, attn_code, iobits & ATTN_MASK, ATTN_MASK);
+  return usrp()->write_io(d_which, iobits, ATTN_MASK);
+}
+
+// ----------------------------------------------------------------
+
+db_wbxng_tx::db_wbxng_tx(usrp_basic_sptr usrp, int which)
+  : wbxng_base_tx(usrp, which)
+{
+}
+
+db_wbxng_tx::~db_wbxng_tx()
+{
+}
+
+db_wbxng_rx::db_wbxng_rx(usrp_basic_sptr usrp, int which)
+  : wbxng_base_rx(usrp, which)
+{
+  set_gain((gain_min() + gain_max()) / 2.0);  // initialize gain
+}
+
+db_wbxng_rx::~db_wbxng_rx()
+{
+}
+
+float
+db_wbxng_rx::gain_min()
+{
+  return usrp()->pga_min();
+}
+
+float
+db_wbxng_rx::gain_max()
+{
+  return usrp()->pga_max()+30.5;
+}
+
+float
+db_wbxng_rx::gain_db_per_step()
+{
+  return 0.05;
+}
+
+
+bool
+db_wbxng_rx::i_and_q_swapped()
+{
+  return false;
+}
diff --git a/usrp/host/lib/db_wbxng_adf4350.cc b/usrp/host/lib/db_wbxng_adf4350.cc
new file mode 100644 (file)
index 0000000..af4eac5
--- /dev/null
@@ -0,0 +1,199 @@
+//
+// Copyright 2009 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 asversion 3, 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., 51 Franklin Street,
+// Boston, MA 02110-1301, USA.
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "db_wbxng_adf4350.h"
+#include <db_base_impl.h>
+#include <stdio.h>
+
+#define INPUT_REF_FREQ FREQ_C(64e6)
+#define DIV_ROUND(num, denom) (((num) + ((denom)/2))/(denom))
+#define FREQ_C(freq) uint64_t(freq)
+#define INPUT_REF_FREQ_2X (2*INPUT_REF_FREQ)                            /* input ref freq with doubler turned on */
+#define MIN_INT_DIV uint16_t(23)                                        /* minimum int divider, prescaler 4/5 only */
+#define MAX_RF_DIV uint8_t(16)                                          /* max rf divider, divides rf output */
+#define MIN_VCO_FREQ FREQ_C(2.2e9)                                      /* minimum vco freq */
+#define MAX_VCO_FREQ FREQ_C(4.4e9)                                      /* minimum vco freq */
+#define MAX_FREQ MAX_VCO_FREQ                                           /* upper bound freq (rf div = 1) */
+#define MIN_FREQ DIV_ROUND(MIN_VCO_FREQ, MAX_RF_DIV)                    /* calculated lower bound freq */
+
+#define CE_PIN        (1 << 3)
+#define PDB_RF_PIN    (1 << 2)
+#define MUX_PIN       (1 << 1)
+#define LD_PIN        (1 << 0)
+
+adf4350::adf4350(usrp_basic_sptr _usrp, int _which, int _spi_enable)
+{
+    /* Initialize the pin directions. */
+
+    d_usrp = _usrp;
+    d_which = _which;
+    d_spi_enable = _spi_enable;
+    d_spi_format = SPI_FMT_MSB | SPI_FMT_HDR_0;
+
+    d_regs = new adf4350_regs(this);
+
+    /* Outputs */
+    d_usrp->_write_oe(d_which, (CE_PIN | PDB_RF_PIN), (CE_PIN | PDB_RF_PIN));
+    d_usrp->write_io(d_which, (0), (CE_PIN | PDB_RF_PIN));
+
+    /* Initialize the pin levels. */
+    _enable(true);
+    /* Initialize the registers. */
+    d_regs->_load_register(5);
+    d_regs->_load_register(4);
+    d_regs->_load_register(3);
+    d_regs->_load_register(2);
+    d_regs->_load_register(1);
+    d_regs->_load_register(0);
+}
+
+adf4350::~adf4350()
+{
+    delete d_regs;
+}
+
+freq_t
+adf4350::_get_max_freq(void)
+{
+    return MAX_FREQ;
+}
+
+freq_t
+adf4350::_get_min_freq(void)
+{
+    return MIN_FREQ;
+}
+
+bool
+adf4350::_get_locked(void)
+{
+    return d_usrp->read_io(d_which) & LD_PIN;
+}
+
+void
+adf4350::_enable(bool enable)
+{
+    if (enable){ /* chip enable */
+        d_usrp->write_io(d_which, (CE_PIN | PDB_RF_PIN), (CE_PIN | PDB_RF_PIN));
+    }else{
+        d_usrp->write_io(d_which, 0, (CE_PIN | PDB_RF_PIN));
+    }
+}
+
+void
+adf4350::_write(uint8_t addr, uint32_t data)
+{
+    data |= addr;
+
+    // create str from data here
+    char s[4];
+    s[0] = (char)((data >> 24) & 0xff);
+    s[1] = (char)((data >> 16) & 0xff);
+    s[2] = (char)((data >>  8) & 0xff);
+    s[3] = (char)(data & 0xff);
+    std::string str(s, 4);
+
+    timespec t;
+    t.tv_sec = 0;
+    t.tv_nsec = 5e6;
+
+    nanosleep(&t, NULL);
+    d_usrp->_write_spi(0, d_spi_enable, d_spi_format, str);
+    nanosleep(&t, NULL);
+
+    //fprintf(stderr, "Wrote to WBXNG SPI address %d with data %8x\n", addr, data);
+    /* pulse latch */
+    //d_usrp->write_io(d_which, 1, LE_PIN);
+    //d_usrp->write_io(d_which, 0, LE_PIN);
+}
+
+bool
+adf4350::_set_freq(freq_t freq)
+{
+    /* Set the frequency by setting int, frac, mod, r, div */
+    if (freq > MAX_FREQ || freq < MIN_FREQ) return false;
+    /* Ramp up the RF divider until the VCO is within range. */
+    d_regs->d_divider_select = 0;
+    while (freq < MIN_VCO_FREQ){
+        freq <<= 1; //double the freq
+        d_regs->d_divider_select++; //double the divider
+    }
+    /* Ramp up the R divider until the N divider is at least the minimum. */
+    //d_regs->d_10_bit_r_counter = INPUT_REF_FREQ*MIN_INT_DIV/freq;
+    d_regs->d_10_bit_r_counter = 2;
+    uint64_t n_mod;
+    do{
+        d_regs->d_10_bit_r_counter++;
+        n_mod = freq;
+        n_mod *= d_regs->d_10_bit_r_counter;
+        n_mod *= d_regs->d_mod;
+        n_mod /= INPUT_REF_FREQ;
+        /* calculate int and frac */
+        d_regs->d_int = n_mod/d_regs->d_mod;
+        d_regs->d_frac = (n_mod - (freq_t)d_regs->d_int*d_regs->d_mod) & uint16_t(0xfff);
+        /*
+        fprintf(stderr,
+            "VCO %lu KHz, Int %u, Frac %u, Mod %u, R %u, Div %u\n",
+            freq, d_regs->d_int, d_regs->d_frac,
+            d_regs->d_mod, d_regs->d_10_bit_r_counter, (1 << d_regs->d_divider_select)
+        );
+        */
+    }while(d_regs->d_int < MIN_INT_DIV);
+    /* calculate the band select so PFD is under 125 KHz */
+    d_regs->d_8_bit_band_select_clock_divider_value = \
+        INPUT_REF_FREQ/(FREQ_C(30e3)*d_regs->d_10_bit_r_counter) + 1;
+    /*
+    fprintf(stderr, "Band Selection: Div %u, Freq %lu\n",
+        d_regs->d_8_bit_band_select_clock_divider_value,
+        INPUT_REF_FREQ/(d_regs->d_8_bit_band_select_clock_divider_value * d_regs->d_10_bit_r_counter) + 1
+    );
+    */
+    d_regs->_load_register(5);
+    d_regs->_load_register(3);
+    d_regs->_load_register(1);
+    /* load involved registers */
+    d_regs->_load_register(2);
+    d_regs->_load_register(4);
+    d_regs->_load_register(0); /* register 0 must be last */
+    return true;
+}
+
+freq_t
+adf4350::_get_freq(void)
+{
+    /* Calculate the freq from int, frac, mod, ref, r, div:
+     *  freq = (int + frac/mod) * (ref/r)
+     * Keep precision by doing multiplies first:
+     *  freq = (((((((int)*mod) + frac)*ref)/mod)/r)/div)
+     */
+    uint64_t temp;
+    temp = d_regs->d_int;
+    temp *= d_regs->d_mod;
+    temp += d_regs->d_frac;
+    temp *= INPUT_REF_FREQ;
+    temp /= d_regs->d_mod;
+    temp /= d_regs->d_10_bit_r_counter;
+    temp /= (1 << d_regs->d_divider_select);
+    return temp;
+}
diff --git a/usrp/host/lib/db_wbxng_adf4350.h b/usrp/host/lib/db_wbxng_adf4350.h
new file mode 100644 (file)
index 0000000..2b0783c
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright 2009 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 asversion 3, 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., 51 Franklin Street,
+// Boston, MA 02110-1301, USA.
+
+#ifndef INCLUDED_ADF4350_H
+#define INCLUDED_ADF4350_H
+
+#include "db_wbxng_adf4350_regs.h"
+#include <usrp/db_base.h>
+#include <stdint.h>
+
+typedef uint64_t freq_t;
+class adf4350_regs;
+
+class adf4350
+{
+public:
+    adf4350(usrp_basic_sptr _usrp, int _which, int _spi_enable);
+    ~adf4350();
+    void _update();
+    bool _get_locked();
+    void _enable(bool enable);
+    void _write(uint8_t addr, uint32_t data);
+    bool _set_freq(freq_t freq);
+    freq_t _get_freq();
+    freq_t _get_max_freq();
+    freq_t _get_min_freq();
+
+protected:
+    usrp_basic_sptr d_usrp;
+    int d_which;
+    int d_spi_enable;
+    int d_spi_format;
+    adf4350_regs *d_regs;
+};
+
+#endif /* INCLUDED_ADF4350_H */
diff --git a/usrp/host/lib/db_wbxng_adf4350_regs.cc b/usrp/host/lib/db_wbxng_adf4350_regs.cc
new file mode 100644 (file)
index 0000000..11dcf88
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2009 Ettus Research LLC
+ */
+
+#include "db_wbxng_adf4350_regs.h"
+#include "db_wbxng_adf4350.h"
+
+//#include "cal_div.h"
+
+/* reg 0 */
+/* reg 1 */
+const uint8_t adf4350_regs::s_prescaler = 0;
+const uint16_t adf4350_regs::s_phase = 0;
+/* reg 2 */
+const uint8_t adf4350_regs::s_low_noise_and_low_spur_modes = 0;
+const uint8_t adf4350_regs::s_muxout = 6;
+const uint8_t adf4350_regs::s_reference_doubler = 0;
+const uint8_t adf4350_regs::s_rdiv2 = 0;
+const uint8_t adf4350_regs::s_double_buff = 0;
+const uint8_t adf4350_regs::s_charge_pump_setting = 5;
+const uint8_t adf4350_regs::s_ldf = 0;
+const uint8_t adf4350_regs::s_ldp = 0;
+const uint8_t adf4350_regs::s_pd_polarity = 1;
+const uint8_t adf4350_regs::s_power_down = 0;
+const uint8_t adf4350_regs::s_cp_three_state = 0;
+const uint8_t adf4350_regs::s_counter_reset = 0;
+/* reg 3 */
+const uint8_t adf4350_regs::s_csr = 0;
+const uint8_t adf4350_regs::s_clk_div_mode = 0;
+const uint16_t adf4350_regs::s_12_bit_clock_divider_value = 0;
+/* reg 4 */
+const uint8_t adf4350_regs::s_feedback_select = 1;
+const uint8_t adf4350_regs::s_vco_power_down = 0;
+const uint8_t adf4350_regs::s_mtld = 0;
+const uint8_t adf4350_regs::s_aux_output_select = 0;
+const uint8_t adf4350_regs::s_aux_output_enable = 1;
+const uint8_t adf4350_regs::s_aux_output_power = 3;
+const uint8_t adf4350_regs::s_rf_output_enable = 1;
+const uint8_t adf4350_regs::s_output_power = 3;
+/* reg 5 */
+const uint8_t adf4350_regs::s_ld_pin_mode = 1;
+
+adf4350_regs::adf4350_regs(adf4350* _adf4350){
+    d_adf4350 = _adf4350;
+
+    /* reg 0 */
+    d_int = uint16_t(100);
+    d_frac = 0;
+    /* reg 1 */
+    d_mod = uint16_t(0xfff);                      /* max fractional accuracy */
+    /* reg 2 */
+    d_10_bit_r_counter = uint16_t(2);
+    /* reg 3 */
+    /* reg 4 */
+    d_divider_select = 0;
+    d_8_bit_band_select_clock_divider_value = 0;
+    /* reg 5 */
+}
+
+adf4350_regs::~adf4350_regs(void){
+}
+
+uint32_t
+adf4350_regs::_reg_shift(uint32_t data, uint32_t shift){
+        return data << shift;
+    }
+
+void
+adf4350_regs::_load_register(uint8_t addr){
+       uint32_t data;
+       switch (addr){
+               case 0: data = (
+                       _reg_shift(d_int, 15)                           |
+                       _reg_shift(d_frac, 3)); break;
+               case 1: data = (
+                       _reg_shift(s_prescaler, 27)                     |
+                       _reg_shift(s_phase, 15)                         |
+                       _reg_shift(d_mod, 3)); break;
+               case 2: data = (
+                       _reg_shift(s_low_noise_and_low_spur_modes, 29)  |
+                       _reg_shift(s_muxout, 26)                        |
+                       _reg_shift(s_reference_doubler, 25)             |
+                       _reg_shift(s_rdiv2, 24)                         |
+                       _reg_shift(d_10_bit_r_counter, 14)              |
+                       _reg_shift(s_double_buff, 13)                   |
+                       _reg_shift(s_charge_pump_setting, 9)            |
+                       _reg_shift(s_ldf, 8)                            |
+                       _reg_shift(s_ldp, 7)                            |
+                       _reg_shift(s_pd_polarity, 6)                    |
+                       _reg_shift(s_power_down, 5)                     |
+                       _reg_shift(s_cp_three_state, 4)                 |
+                       _reg_shift(s_counter_reset, 3)); break;
+               case 3: data = (
+                       _reg_shift(s_csr, 18)                           |
+                       _reg_shift(s_clk_div_mode, 15)                  |
+                       _reg_shift(s_12_bit_clock_divider_value, 3)); break;
+               case 4: data = (
+                       _reg_shift(s_feedback_select, 23)               |
+                       _reg_shift(d_divider_select, 20)                |
+                       _reg_shift(d_8_bit_band_select_clock_divider_value, 12) |
+                       _reg_shift(s_vco_power_down, 11)                |
+                       _reg_shift(s_mtld, 10)                          |
+                       _reg_shift(s_aux_output_select, 9)              |
+                       _reg_shift(s_aux_output_enable, 8)              |
+                       _reg_shift(s_aux_output_power, 6)               |
+                       _reg_shift(s_rf_output_enable, 5)               |
+                       _reg_shift(s_output_power, 3)); break;
+               case 5: data = (
+                       _reg_shift(s_ld_pin_mode, 22)); break;
+               default: return;
+       }
+       /* write the data out to spi */
+       d_adf4350->_write(addr, data);
+}
diff --git a/usrp/host/lib/db_wbxng_adf4350_regs.h b/usrp/host/lib/db_wbxng_adf4350_regs.h
new file mode 100644 (file)
index 0000000..dc941ee
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2009 Ettus Research LLC
+ */
+
+#ifndef ADF4350_REGS_H
+#define ADF4350_REGS_H
+
+#include <usrp/db_base.h>
+#include <stdint.h>
+
+class adf4350;
+
+class adf4350_regs
+{
+public:
+    adf4350_regs(adf4350* _adf4350);
+    ~adf4350_regs();
+
+    adf4350* d_adf4350;
+
+    uint32_t _reg_shift(uint32_t data, uint32_t shift);
+    void _load_register(uint8_t addr);
+
+    /* reg 0 */
+    uint16_t d_int;
+    uint16_t d_frac;
+    /* reg 1 */
+    static const uint8_t s_prescaler;
+    static const uint16_t s_phase;
+    uint16_t d_mod;
+    /* reg 2 */
+    static const uint8_t s_low_noise_and_low_spur_modes;
+    static const uint8_t s_muxout;
+    static const uint8_t s_reference_doubler;
+    static const uint8_t s_rdiv2;
+    uint16_t d_10_bit_r_counter;
+    static const uint8_t s_double_buff;
+    static const uint8_t s_charge_pump_setting;
+    static const uint8_t s_ldf;
+    static const uint8_t s_ldp;
+    static const uint8_t s_pd_polarity;
+    static const uint8_t s_power_down;
+    static const uint8_t s_cp_three_state;
+    static const uint8_t s_counter_reset;
+    /* reg 3 */
+    static const uint8_t s_csr;
+    static const uint8_t s_clk_div_mode;
+    static const uint16_t s_12_bit_clock_divider_value;
+    /* reg 4 */
+    static const uint8_t s_feedback_select;
+    uint8_t d_divider_select;
+    uint8_t d_8_bit_band_select_clock_divider_value;
+    static const uint8_t s_vco_power_down;
+    static const uint8_t s_mtld;
+    static const uint8_t s_aux_output_select;
+    static const uint8_t s_aux_output_enable;
+    static const uint8_t s_aux_output_power;
+    static const uint8_t s_rf_output_enable;
+    static const uint8_t s_output_power;
+    /* reg 5 */
+    static const uint8_t s_ld_pin_mode;
+};
+
+#endif /* ADF4350_REGS_H */
index 737387b877bc9cac8798ff8a659b856bba3e6123..95c4878aa621b70ca9f1f88b76521023da63b20c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio.
  *
@@ -33,6 +33,7 @@
 #include "fusb.h"
 #include "fusb_darwin.h"
 #include "darwin_libusb.h"
+#include <iostream>
 
 static const int USB_TIMEOUT = 100;    // in milliseconds
 static const UInt8 NUM_QUEUE_ITEMS = 20;
@@ -153,9 +154,10 @@ fusb_ephandle_darwin::start ()
     USB_ERROR_STR (false, -ENOENT, "fusb_ephandle_darwin::start: "
                   "device not initialized");
 
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::start: "
-            "dev = %p, device = %p\n", dev, device);
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::start: dev = " <<
+      (void*) dev << ", device = " << (void*) device << std::endl;
+  }
 
   d_interfaceRef = device->interface;
   if (! d_interfaceRef)
@@ -165,10 +167,10 @@ fusb_ephandle_darwin::start ()
 
 // get read or write pipe info (depends on "d_input_p")
 
-  if (usb_debug > 3)
-    fprintf (stderr, "fusb_ephandle_darwin::start "
-            "d_endpoint = %d, d_input_p = %s\n",
-            d_endpoint, d_input_p ? "TRUE" : "FALSE");
+  if (usb_debug > 3) {
+    std::cerr << "fusb_ephandle_darwin::start d_endpoint = " << d_endpoint
+             << ", d_input_p = " << (d_input_p ? "TRUE" : "FALSE") << std::endl;
+  }
 
   int l_endpoint = (d_input_p ? USB_ENDPOINT_IN : USB_ENDPOINT_OUT);
   int pipeRef = ep_to_pipeRef (device, d_endpoint | l_endpoint);
@@ -184,12 +186,14 @@ fusb_ephandle_darwin::start ()
                                  &d_transferType,
                                  &maxPacketSize,
                                  &interval);
-  if (usb_debug == 3)
-    fprintf (stderr, "fusb_ephandle_darwin::start: %s: ep = 0x%02x, "
-            "pipeRef = %d, d_i = %p, d_iR = %p, if_dir = %d, if_# = %d, "
-            "if_int = %d, if_maxPS = %d\n", d_input_p ? "read" : "write",
-            d_endpoint, d_pipeRef, d_interface, d_interfaceRef, direction,
-            number, interval, maxPacketSize);
+  if (usb_debug == 3) {
+    std::cerr << "fusb_ephandle_darwin::start: " << (d_input_p ? "read" : "write")
+             << ": ep = " << d_endpoint << ", pipeRef = " << d_pipeRef << "interface = "
+             << d_interface << ", interfaceRef = " << d_interfaceRef
+             << ", if_direction = " << direction << ", if_# = " << number
+             << ", if_interval = " << interval << ", if_maxPacketSize = "
+             << maxPacketSize << std::endl;
+  }
 
   // set global start boolean
   d_started = true;
@@ -205,9 +209,10 @@ fusb_ephandle_darwin::start ()
   // going; this will unlock the mutex before waiting for a signal ()
   d_runBlock->wait ();
 
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::start: %s started.\n",
-            d_input_p ? "read" : "write");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::start: " << (d_input_p ? "read" : "write")
+             << " started." << std::endl;
+  }
 
   return (true);
 }
@@ -229,10 +234,10 @@ fusb_ephandle_darwin::run_thread (void* arg)
 
   bool l_input_p = This->d_input_p;
 
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::run_thread: "
-            "starting for %s.\n",
-            l_input_p ? "read" : "write");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::run_thread: starting for "
+             << (l_input_p ? "read" : "write") << "." << std::endl;
+  }
 
   usb_interface_t** l_interfaceRef = This->d_interfaceRef;
   usb_interface_t* l_interface = This->d_interface;
@@ -286,9 +291,10 @@ fusb_ephandle_darwin::run_thread (void* arg)
   CFRunLoopRemoveSource (CFRunLoopGetCurrent (),
                         l_cfSource, kCFRunLoopDefaultMode);
 
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::run_thread: finished for %s.\n",
-            l_input_p ? "read" : "write");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::run_thread: finished for "
+             << (l_input_p ? "read" : "write") << "." << std::endl;
+  }
 
   // release the run thread running mutex
   l_runThreadRunning->unlock ();
@@ -297,8 +303,9 @@ fusb_ephandle_darwin::run_thread (void* arg)
 void
 fusb_ephandle_darwin::read_thread (void* arg)
 {
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::read_thread: starting.\n");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::read_thread: starting." << std::endl;
+  }
 
   fusb_ephandle_darwin* This = static_cast<fusb_ephandle_darwin*>(arg);
 
@@ -331,8 +338,9 @@ fusb_ephandle_darwin::read_thread (void* arg)
     l_node = l_queue->iterate_next ();
   }
 
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::read_thread: finished.\n");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::read_thread: finished." << std::endl;
+  }
 
   // release the read running mutex, to let the parent thread knows
   // that this thread is finished
@@ -343,10 +351,11 @@ void
 fusb_ephandle_darwin::read_issue (s_both_ptr l_both)
 {
   if ((! l_both) || (! d_started)) {
-    if (usb_debug > 4)
-      fprintf (stderr, "fusb_ephandle_darwin::read_issue: Doing nothing; "
-              "l_both is %X; started is %s\n", (unsigned int) l_both,
-              d_started ? "TRUE" : "FALSE");
+    if (usb_debug > 4) {
+      std::cerr << "fusb_ephandle_darwin::read_issue: Doing nothing; "
+               << "l_both is " << (void*) l_both << "; started is "
+               << (d_started ? "TRUE" : "FALSE") << std::endl;
+    }
     return;
   }
 
@@ -356,7 +365,7 @@ fusb_ephandle_darwin::read_issue (s_both_ptr l_both)
   void* v_buffer = (void*) l_buf->buffer ();
 
 // read up to d_bufLenBytes
-  UInt32 bufLen = d_bufLenBytes;
+  size_t bufLen = d_bufLenBytes;
   l_buf->n_used (bufLen);
 
 // setup system call result
@@ -378,9 +387,10 @@ fusb_ephandle_darwin::read_issue (s_both_ptr l_both)
                          "(ReadPipeAsync%s): %s",
                          d_transferType == kUSBInterrupt ? "" : "TO",
                          darwin_error_str (result));
-  else if (usb_debug > 4)
-    fprintf (stderr, "fusb_ephandle_darwin::read_issue: "
-            "Queued %X (%ld Bytes)\n", (unsigned int) l_both, bufLen);
+  else if (usb_debug > 4) {
+    std::cerr << "fusb_ephandle_darwin::read_issue: Queued " << (void*) l_both
+             << " (" << bufLen << " Bytes)" << std::endl;
+  }
 }
 
 void
@@ -388,26 +398,27 @@ fusb_ephandle_darwin::read_completed (void* refCon,
                                      io_return_t result,
                                      void* io_size)
 {
-  UInt32 l_size = (UInt32) io_size;
+  size_t l_size = (size_t) io_size;
   s_both_ptr l_both = static_cast<s_both_ptr>(refCon);
   fusb_ephandle_darwin* This = static_cast<fusb_ephandle_darwin*>(l_both->This ());
   s_node_ptr l_node = l_both->node ();
   circular_buffer<char>* l_buffer = This->d_buffer;
   s_buffer_ptr l_buf = l_node->object ();
-  UInt32 l_i_size = l_buf->n_used ();
-
-  if (This->d_started && (l_i_size != l_size))
-    fprintf (stderr, "fusb_ephandle_darwin::read_completed: "
-            "Expected %ld bytes; read %ld.\n",
-            l_i_size, l_size);
-  else if (usb_debug > 4)
-    fprintf (stderr, "fusb_ephandle_darwin::read_completed: "
-            "Read %X (%ld bytes)\n",
-            (unsigned int) l_both, l_size);
-
-// add this read to the transfer buffer
+  size_t l_i_size = l_buf->n_used ();
+
+  if (This->d_started && (l_i_size != l_size)) {
+    std::cerr << "fusb_ephandle_darwin::read_completed: Expected " << l_i_size
+             << " bytes; read " << l_size << "." << std::endl;
+  } else if (usb_debug > 4) {
+    std::cerr << "fusb_ephandle_darwin::read_completed: Read " << (void*) l_both
+             << " (" << l_size << " bytes)" << std::endl;
+  }
+
+// add this read to the transfer buffer, and check for overflow
+// -> data is being enqueued faster than it can be dequeued
   if (l_buffer->enqueue (l_buf->buffer (), l_size) == -1) {
-    fputs ("iU", stderr);
+// print out that there's an overflow
+    fputs ("uO", stderr);
     fflush (stderr);
   }
 
@@ -421,11 +432,13 @@ fusb_ephandle_darwin::read_completed (void* refCon,
 int
 fusb_ephandle_darwin::read (void* buffer, int nbytes)
 {
-  UInt32 l_nbytes = (UInt32) nbytes;
+  size_t l_nbytes = (size_t) nbytes;
   d_buffer->dequeue ((char*) buffer, &l_nbytes);
 
-  if (usb_debug > 4)
-    fprintf (stderr, "fusb_ephandle_darwin::read: request for %d bytes, %ld bytes retrieved.\n", nbytes, l_nbytes);
+  if (usb_debug > 4) {
+    std::cerr << "fusb_ephandle_darwin::read: request for " << nbytes
+             << " bytes, " << l_nbytes << " bytes retrieved." << std::endl;
+  }
 
   return ((int) l_nbytes);
 }
@@ -433,18 +446,18 @@ fusb_ephandle_darwin::read (void* buffer, int nbytes)
 int
 fusb_ephandle_darwin::write (const void* buffer, int nbytes)
 {
-  UInt32 l_nbytes = (UInt32) nbytes;
+  size_t l_nbytes = (size_t) nbytes;
 
   if (! d_started) {
-    if (usb_debug)
-      fprintf (stderr, "fusb_ephandle_darwin::write: Not yet started.\n");
-
+    if (usb_debug) {
+      std::cerr << "fusb_ephandle_darwin::write: Not yet started." << std::endl;
+    }
     return (0);
   }
 
   while (l_nbytes != 0) {
 // find out how much data to copy; limited to "d_bufLenBytes" per node
-    UInt32 t_nbytes = (l_nbytes > d_bufLenBytes) ? d_bufLenBytes : l_nbytes;
+    size_t t_nbytes = (l_nbytes > d_bufLenBytes) ? d_bufLenBytes : l_nbytes;
 
 // get next available node to write into;
 // blocks internally if none available
@@ -476,8 +489,8 @@ fusb_ephandle_darwin::write (const void* buffer, int nbytes)
                     d_transferType == kUSBInterrupt ? "" : "TO",
                     darwin_error_str (result));
     else if (usb_debug > 4) {
-      fprintf (stderr, "fusb_ephandle_darwin::write_thread: "
-              "Queued %X (%ld Bytes)\n", (unsigned int) l_both, t_nbytes);
+      std::cerr << "fusb_ephandle_darwin::write_thread: Queued " << (void*) l_both
+               << " (" << t_nbytes << " Bytes)" << std::endl;
     }
     l_nbytes -= t_nbytes;
   }
@@ -492,19 +505,19 @@ fusb_ephandle_darwin::write_completed (void* refCon,
 {
   s_both_ptr l_both = static_cast<s_both_ptr>(refCon);
   fusb_ephandle_darwin* This = static_cast<fusb_ephandle_darwin*>(l_both->This ());
-  UInt32 l_size = (UInt32) io_size;
+  size_t l_size = (size_t) io_size;
   s_node_ptr l_node = l_both->node ();
   s_queue_ptr l_queue = This->d_queue;
   s_buffer_ptr l_buf = l_node->object ();
-  UInt32 l_i_size = l_buf->n_used ();
-
-  if (This->d_started && (l_i_size != l_size))
-    fprintf (stderr, "fusb_ephandle_darwin::write_completed: "
-            "Expected %ld bytes written; wrote %ld.\n",
-            l_i_size, l_size);
-  else if (usb_debug > 4)
-    fprintf (stderr, "fusb_ephandle_darwin::write_completed: "
-            "Wrote %X (%ld Bytes)\n", (unsigned int) l_both, l_size);
+  size_t l_i_size = l_buf->n_used ();
+
+  if (This->d_started && (l_i_size != l_size)) {
+    std::cerr << "fusb_ephandle_darwin::write_completed: Expected " << l_i_size
+             << " bytes written; wrote " << l_size << "." << std::endl;
+  } else if (usb_debug > 4) {
+    std::cerr << "fusb_ephandle_darwin::write_completed: Wrote " << (void*) l_both
+             << " (" << l_size << " Bytes)" << std::endl;
+  }
 
 // set buffer's # data to 0
   l_buf->n_used (0);
@@ -515,8 +528,9 @@ fusb_ephandle_darwin::write_completed (void* refCon,
 void
 fusb_ephandle_darwin::abort ()
 {
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::abort: starting.\n");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::abort: starting." << std::endl;
+  }
 
   io_return_t result = d_interface->AbortPipe (d_interfaceRef, d_pipeRef);
 
@@ -524,8 +538,9 @@ fusb_ephandle_darwin::abort ()
     USB_ERROR_STR_NO_RET (- darwin_to_errno (result),
                          "fusb_ephandle_darwin::abort "
                          "(AbortPipe): %s", darwin_error_str (result));
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::abort: finished.\n");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::abort: finished." << std::endl;
+  }
 }
 
 bool
@@ -534,9 +549,10 @@ fusb_ephandle_darwin::stop ()
   if (! d_started)
     return (true);
 
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::stop: stopping %s.\n",
-            d_input_p ? "read" : "write");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::stop: stopping "
+             << (d_input_p ? "read" : "write") << "." << std::endl;
+  }
 
   d_started = false;
 
@@ -556,9 +572,10 @@ fusb_ephandle_darwin::stop ()
   d_runThreadRunning->lock ();
   d_runThreadRunning->unlock ();
 
-  if (usb_debug)
-    fprintf (stderr, "fusb_ephandle_darwin::stop: %s stopped.\n",
-            d_input_p ? "read" : "write");
+  if (usb_debug) {
+    std::cerr << "fusb_ephandle_darwin::stop: " << (d_input_p ? "read" : "write")
+             << " stopped." << std::endl;
+  }
 
   return (true);
 }
index bb717b58c5e785648298bebb3de16f0dfd879ebe..735e5f16d0548540252f9c7248eea1b1ca0cc8b7 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2006 Free Software Foundation, Inc.
+ * Copyright 2006,2009 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio.
  *
@@ -75,10 +75,10 @@ class s_buffer
 {
 private:
   char* d_buffer;
-  UInt32 d_n_used, d_n_alloc;
+  size_t d_n_used, d_n_alloc;
 
 public:
-  inline s_buffer (UInt32 n_alloc = 0) {
+  inline s_buffer (size_t n_alloc = 0) {
     d_n_used = 0;
     d_n_alloc = n_alloc;
     if (n_alloc) {
@@ -92,17 +92,17 @@ public:
       delete [] d_buffer;
     }
   };
-  inline UInt32 n_used () { return (d_n_used); };
-  inline void n_used (UInt32 bufLen) {
+  inline size_t n_used () { return (d_n_used); };
+  inline void n_used (size_t bufLen) {
     d_n_used = (bufLen > d_n_alloc) ? d_n_alloc : bufLen; };
-  inline UInt32 n_alloc () { return (d_n_alloc); };
-  void buffer (char* l_buffer, UInt32 bufLen) {
+  inline size_t n_alloc () { return (d_n_alloc); };
+  void buffer (char* l_buffer, size_t bufLen) {
     if (bufLen > d_n_alloc) {
-      fprintf (stderr, "s_buffer::set: Copying only allocated bytes.\n");
+      std::cerr << "s_buffer::set: Copying only allocated bytes." << std::endl;
       bufLen = d_n_alloc;
     }
     if (!l_buffer) {
-      fprintf (stderr, "s_buffer::set: NULL buffer.\n");
+      std::cerr << "s_buffer::set: NULL buffer." << std::endl;
       return;
     }
     bcopy (l_buffer, d_buffer, bufLen);
@@ -173,7 +173,7 @@ public:
   usb_interface_t* d_interface;
   s_queue_ptr d_queue;
   circular_buffer<char>* d_buffer;
-  UInt32 d_bufLenBytes;
+  size_t d_bufLenBytes;
   mld_mutex_ptr d_readRunning;
   mld_condition_ptr d_runBlock, d_readBlock;
 
diff --git a/usrp/host/lib/usrp_basic.h.in b/usrp/host/lib/usrp_basic.h.in
deleted file mode 100644 (file)
index 3faa530..0000000
+++ /dev/null
@@ -1,960 +0,0 @@
-class  fusb_devhandle;
-class  fusb_ephandle;
-
-enum txrx_t {
-  C_RX = 0,
-  C_TX = 1
-};
-
-/*
- * ----------------------------------------------------------------------
- * Mid level interface to the Universal Software Radio Peripheral (Rev 1)
- *
- * These classes implement the basic functionality for talking to the
- * USRP.  They try to be as independent of the signal processing code
- * in FPGA as possible.  They implement access to the low level
- * peripherals on the board, provide a common way for reading and
- * writing registers in the FPGA, and provide the high speed interface
- * to streaming data across the USB.
- *
- * It is expected that subclasses will be derived that provide
- * access to the functionality to a particular FPGA configuration.
- * ----------------------------------------------------------------------
- */
-
-
-/*!
- * \brief abstract base class for usrp operations
- * \ingroup usrp
- */
-class usrp_basic : boost::noncopyable
-{
-protected:
-  void shutdown_daughterboards();
-
-protected:
-  libusb_device_handle         *d_udh;
-  struct libusb_context                *d_ctx;
-  int                           d_usb_data_rate;       // bytes/sec
-  int                           d_bytes_per_poll;      // how often to poll for overruns
-  bool                          d_verbose;
-  long                          d_fpga_master_clock_freq;
-
-  static const int              MAX_REGS = 128;
-  unsigned int                  d_fpga_shadows[MAX_REGS];
-
-  int                           d_dbid[2];             // daughterboard ID's (side A, side B)
-
-  /*!
-   * Shared pointers to subclasses of db_base.
-   *
-   * The outer vector is of length 2 (0 = side A, 1 = side B).  The
-   * inner vectors are of length 1, 2 or 3 depending on the number of
-   * subdevices implemented by the daugherboard.  At this time, only
-   * the Basic Rx and LF Rx implement more than 1 subdevice.
-   */
-  std::vector< std::vector<db_base_sptr> > d_db;
-
-  //! One time call, made only only from usrp_standard_*::make after shared_ptr is created.
-  void init_db(usrp_basic_sptr u);
-
-
-  usrp_basic (int which_board,
-             libusb_device_handle *open_interface (libusb_device *dev),
-             const std::string fpga_filename = "",
-             const std::string firmware_filename = "");
-
-  /*!
-   * \brief advise usrp_basic of usb data rate (bytes/sec)
-   *
-   * N.B., this doesn't tweak any hardware.  Derived classes
-   * should call this to inform us of the data rate whenever it's
-   * first set or if it changes.
-   *
-   * \param usb_data_rate      bytes/sec
-   */
-  void set_usb_data_rate (int usb_data_rate);
-  
-  /*!
-   * \brief Write auxiliary digital to analog converter.
-   *
-   * \param slot       Which Tx or Rx slot to write.
-   *                   N.B., SLOT_TX_A and SLOT_RX_A share the same AUX DAC's.
-   *                   SLOT_TX_B and SLOT_RX_B share the same AUX DAC's.
-   * \param which_dac  [0,3] RX slots must use only 0 and 1.  TX slots must use only 2 and 3.
-   * \param value      [0,4095]
-   * \returns true iff successful
-   */
-  bool _write_aux_dac (int slot, int which_dac, int value);
-
-  /*!
-   * \brief Read auxiliary analog to digital converter.
-   *
-   * \param slot       2-bit slot number. E.g., SLOT_TX_A
-   * \param which_adc  [0,1]
-   * \param value      return 12-bit value [0,4095]
-   * \returns true iff successful
-   */
-  bool _read_aux_adc (int slot, int which_adc, int *value);
-
-  /*!
-   * \brief Read auxiliary analog to digital converter.
-   *
-   * \param slot       2-bit slot number. E.g., SLOT_TX_A
-   * \param which_adc  [0,1]
-   * \returns value in the range [0,4095] if successful, else READ_FAILED.
-   */
-  int _read_aux_adc (int slot, int which_adc);
-
-
-public:
-  virtual ~usrp_basic ();
-
-
-  /*!
-   * Return a vector of vectors that contain shared pointers
-   * to the daughterboard instance(s) associated with the specified side.
-   *
-   * It is an error to use the returned objects after the usrp_basic
-   * object has been destroyed.
-   */
-  std::vector<std::vector<db_base_sptr> > db() const { return d_db; }
-
-  /*!
-   * Return a vector of size >= 1 that contains shared pointers
-   * to the daughterboard instance(s) associated with the specified side.
-   *
-   * \param which_side [0,1] which daughterboard
-   *
-   * It is an error to use the returned objects after the usrp_basic
-   * object has been destroyed.
-   */
-  std::vector<db_base_sptr> db(int which_side);
-  /*!
-   * \brief is the subdev_spec valid?
-   */
-  bool is_valid(const usrp_subdev_spec &ss);
-
-  /*!
-   * \brief given a subdev_spec, return the corresponding daughterboard object.
-   * \throws std::invalid_ argument if ss is invalid.
-   *
-   * \param ss specifies the side and subdevice
-   */
-  db_base_sptr selected_subdev(const usrp_subdev_spec &ss);
-
-  /*!
-   * \brief return frequency of master oscillator on USRP
-   */
-  long fpga_master_clock_freq () const { return d_fpga_master_clock_freq; }
-
-  /*!
-   * Tell API that the master oscillator on the USRP is operating at a non-standard 
-   * fixed frequency. This is only needed for custom USRP hardware modified to 
-   * operate at a different frequency from the default factory configuration. This
-   * function must be called prior to any other API function.
-   * \param master_clock USRP2 FPGA master clock frequency in Hz (10..64 MHz)
-   */
-  void set_fpga_master_clock_freq (long master_clock) { d_fpga_master_clock_freq = master_clock; }
-
-  /*!
-   * \returns usb data rate in bytes/sec
-   */
-  int usb_data_rate () const { return d_usb_data_rate; }
-
-  void set_verbose (bool on) { d_verbose = on; }
-
-  //! magic value used on alternate register read interfaces
-  static const int READ_FAILED = -99999;
-
-  /*!
-   * \brief Write EEPROM on motherboard or any daughterboard.
-   * \param i2c_addr           I2C bus address of EEPROM
-   * \param eeprom_offset      byte offset in EEPROM to begin writing
-   * \param buf                        the data to write
-   * \returns true iff sucessful
-   */
-  bool write_eeprom (int i2c_addr, int eeprom_offset, const std::string buf);
-
-  /*!
-   * \brief Read EEPROM on motherboard or any daughterboard.
-   * \param i2c_addr           I2C bus address of EEPROM
-   * \param eeprom_offset      byte offset in EEPROM to begin reading
-   * \param len                        number of bytes to read
-   * \returns the data read if successful, else a zero length string.
-   */
-  std::string read_eeprom (int i2c_addr, int eeprom_offset, int len);
-
-  /*!
-   * \brief Write to I2C peripheral
-   * \param i2c_addr           I2C bus address (7-bits)
-   * \param buf                        the data to write
-   * \returns true iff successful
-   * Writes are limited to a maximum of of 64 bytes.
-   */
-  bool write_i2c (int i2c_addr, const std::string buf);
-
-  /*!
-   * \brief Read from I2C peripheral
-   * \param i2c_addr           I2C bus address (7-bits)
-   * \param len                        number of bytes to read
-   * \returns the data read if successful, else a zero length string.
-   * Reads are limited to a maximum of 64 bytes.
-   */
-  std::string read_i2c (int i2c_addr, int len);
-
-  /*!
-   * \brief Set ADC offset correction
-   * \param which_adc  which ADC[0,3]: 0 = RX_A I, 1 = RX_A Q...
-   * \param offset     16-bit value to subtract from raw ADC input.
-   */
-  bool set_adc_offset (int which_adc, int offset);
-
-  /*!
-   * \brief Set DAC offset correction
-   * \param which_dac  which DAC[0,3]: 0 = TX_A I, 1 = TX_A Q...
-   * \param offset     10-bit offset value (ambiguous format:  See AD9862 datasheet).
-   * \param offset_pin 1-bit value.  If 0 offset applied to -ve differential pin;
-   *                                  If 1 offset applied to +ve differential pin.
-   */
-  bool set_dac_offset (int which_dac, int offset, int offset_pin);
-
-  /*!
-   * \brief Control ADC input buffer
-   * \param which_adc  which ADC[0,3]
-   * \param bypass     if non-zero, bypass input buffer and connect input
-   *                   directly to switched cap SHA input of RxPGA.
-   */
-  bool set_adc_buffer_bypass (int which_adc, bool bypass);
-
-  /*!
-   * \brief Enable/disable automatic DC offset removal control loop in FPGA
-   *
-   * \param bits  which control loops to enable
-   * \param mask  which \p bits to pay attention to
-   *
-   * If the corresponding bit is set, enable the automatic DC
-   * offset correction control loop.
-   *
-   * <pre>
-   * The 4 low bits are significant:
-   *
-   *   ADC0 = (1 << 0)
-   *   ADC1 = (1 << 1)
-   *   ADC2 = (1 << 2)
-   *   ADC3 = (1 << 3)
-   * </pre>
-   *
-   * By default the control loop is enabled on all ADC's.
-   */
-  bool set_dc_offset_cl_enable(int bits, int mask);
-
-  /*!
-   * \brief return the usrp's serial number.
-   *
-   * \returns non-zero length string iff successful.
-   */
-  std::string serial_number();
-
-  /*!
-   * \brief Return daughterboard ID for given side [0,1].
-   *
-   * \param which_side [0,1] which daughterboard
-   *
-   * \return daughterboard id >= 0 if successful
-   * \return -1 if no daugherboard
-   * \return -2 if invalid EEPROM on daughterboard
-   */
-  virtual int daughterboard_id (int which_side) const = 0;
-
-  /*!
-   * \brief Clock ticks to delay rising of T/R signal
-   * \sa write_atr_mask, write_atr_txval, write_atr_rxval
-   */
-  bool write_atr_tx_delay(int value);
-
-  /*!
-   * \brief Clock ticks to delay falling edge of T/R signal
-   * \sa write_atr_mask, write_atr_txval, write_atr_rxval
-   */
-  bool write_atr_rx_delay(int value);
-
-
-\f  // ================================================================
-  // Routines to access and control daughterboard specific i/o
-  //
-  // Those with a common_ prefix access either the Tx or Rx side depending
-  // on the txrx parameter.  Those without the common_ prefix are virtual
-  // and are overriden in usrp_basic_rx and usrp_basic_tx to access the
-  // the Rx or Tx sides automatically.  We provide the common_ versions
-  // for those daughterboards such as the WBX and XCVR2450 that share
-  // h/w resources (such as the LO) between the Tx and Rx sides.
-
-  // ----------------------------------------------------------------
-  // BEGIN common_  daughterboard control functions
-
-  /*!
-   * \brief Set Programmable Gain Amplifier(PGA)
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_amp  which amp [0,3]
-   * \param gain_in_db gain value(linear in dB)
-   *
-   * gain is rounded to closest setting supported by hardware.
-   *
-   * \returns true iff sucessful.
-   *
-   * \sa pga_min(), pga_max(), pga_db_per_step()
-   */
-  bool common_set_pga(txrx_t txrx, int which_amp, double gain_in_db);
-
-  /*!
-   * \brief Return programmable gain amplifier gain setting in dB.
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_amp  which amp [0,3]
-   */
-  double common_pga(txrx_t txrx, int which_amp) const;
-
-  /*!
-   * \brief Return minimum legal PGA gain in dB.
-   * \param txrx       Tx or Rx?
-   */
-  double common_pga_min(txrx_t txrx) const;
-
-  /*!
-   * \brief Return maximum legal PGA gain in dB.
-   * \param txrx       Tx or Rx?
-   */
-  double common_pga_max(txrx_t txrx) const;
-
-  /*!
-   * \brief Return hardware step size of PGA(linear in dB).
-   * \param txrx       Tx or Rx?
-   */
-  double common_pga_db_per_step(txrx_t txrx) const;
-
-  /*!
-   * \brief Write direction register(output enables) for pins that go to daughterboard.
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which size
-   * \param value      value to write into register
-   * \param mask       which bits of value to write into reg
-   *
-   * Each d'board has 16-bits of general purpose i/o.
-   * Setting the bit makes it an output from the FPGA to the d'board.
-   *
-   * This register is initialized based on a value stored in the
-   * d'board EEPROM.  In general, you shouldn't be using this routine
-   * without a very good reason.  Using this method incorrectly will
-   * kill your USRP motherboard and/or daughterboard.
-   */
-  bool _common_write_oe(txrx_t txrx, int which_side, int value, int mask);
-
-  /*!
-   * \brief Write daughterboard i/o pin value
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which d'board
-   * \param value      value to write into register
-   * \param mask       which bits of value to write into reg
-   */
-  bool common_write_io(txrx_t txrx, int which_side, int value, int mask);
-
-  /*!
-   * \brief Read daughterboard i/o pin value
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which d'board
-   * \param value      output
-   */
-  bool common_read_io(txrx_t txrx, int which_side, int *value);
-
-  /*!
-   * \brief Read daughterboard i/o pin value
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which d'board
-   * \returns register value if successful, else READ_FAILED
-   */
-  int common_read_io(txrx_t txrx, int which_side);
-
-  /*!
-   * \brief Write daughterboard refclk config register
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which d'board
-   * \param value      value to write into register, see below
-   *
-   * <pre>
-   * Control whether a reference clock is sent to the daughterboards,
-   * and what frequency.  The refclk is sent on d'board i/o pin 0.
-   * 
-   *     3                   2                   1                       
-   *   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-   *  +-----------------------------------------------+-+------------+
-   *  |             Reserved (Must be zero)           |E|   DIVISOR  |
-   *  +-----------------------------------------------+-+------------+
-   * 
-   *  Bit 7  -- 1 turns on refclk, 0 allows IO use
-   *  Bits 6:0 Divider value
-   * </pre>
-   */
-  bool common_write_refclk(txrx_t txrx, int which_side, int value);
-
-  /*!
-   * \brief Automatic Transmit/Receive switching
-   * <pre>
-   *
-   * If automatic transmit/receive (ATR) switching is enabled in the
-   * FR_ATR_CTL register, the presence or absence of data in the FPGA
-   * transmit fifo selects between two sets of values for each of the 4
-   * banks of daughterboard i/o pins.
-   *
-   * Each daughterboard slot has 3 16-bit registers associated with it:
-   *   FR_ATR_MASK_*, FR_ATR_TXVAL_* and FR_ATR_RXVAL_*
-   *
-   * FR_ATR_MASK_{0,1,2,3}: 
-   *
-   *   These registers determine which of the daugherboard i/o pins are
-   *   affected by ATR switching.  If a bit in the mask is set, the
-   *   corresponding i/o bit is controlled by ATR, else it's output
-   *   value comes from the normal i/o pin output register:
-   *   FR_IO_{0,1,2,3}.
-   *
-   * FR_ATR_TXVAL_{0,1,2,3}:
-   * FR_ATR_RXVAL_{0,1,2,3}:
-   *
-   *   If the Tx fifo contains data, then the bits from TXVAL that are
-   *   selected by MASK are output.  Otherwise, the bits from RXVAL that
-   *   are selected by MASK are output.
-   * </pre>
-   */
-  bool common_write_atr_mask(txrx_t txrx, int which_side, int value);
-  bool common_write_atr_txval(txrx_t txrx, int which_side, int value);
-  bool common_write_atr_rxval(txrx_t txrx, int which_side, int value);
-
-  /*!
-   * \brief Write auxiliary digital to analog converter.
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which d'board
-   *                   N.B., SLOT_TX_A and SLOT_RX_A share the same AUX DAC's.
-   *                   SLOT_TX_B and SLOT_RX_B share the same AUX DAC's.
-   * \param which_dac  [2,3] TX slots must use only 2 and 3.
-   * \param value      [0,4095]
-   * \returns true iff successful
-   */
-  bool common_write_aux_dac(txrx_t txrx, int which_side, int which_dac, int value);
-
-  /*!
-   * \brief Read auxiliary analog to digital converter.
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which d'board
-   * \param which_adc  [0,1]
-   * \param value      return 12-bit value [0,4095]
-   * \returns true iff successful
-   */
-  bool common_read_aux_adc(txrx_t txrx, int which_side, int which_adc, int *value);
-
-  /*!
-   * \brief Read auxiliary analog to digital converter.
-   *
-   * \param txrx       Tx or Rx?
-   * \param which_side [0,1] which d'board
-   * \param which_adc  [0,1]
-   * \returns value in the range [0,4095] if successful, else READ_FAILED.
-   */
-  int common_read_aux_adc(txrx_t txrx, int which_side, int which_adc);
-
-  // END common_ daughterboard control functions\f
-  // ----------------------------------------------------------------
-  // BEGIN virtual daughterboard control functions
-
-  /*!
-   * \brief Set Programmable Gain Amplifier (PGA)
-   *
-   * \param which_amp  which amp [0,3]
-   * \param gain_in_db gain value (linear in dB)
-   *
-   * gain is rounded to closest setting supported by hardware.
-   *
-   * \returns true iff sucessful.
-   *
-   * \sa pga_min(), pga_max(), pga_db_per_step()
-   */
-  virtual bool set_pga (int which_amp, double gain_in_db) = 0;
-
-  /*!
-   * \brief Return programmable gain amplifier gain setting in dB.
-   *
-   * \param which_amp  which amp [0,3]
-   */
-  virtual double pga (int which_amp) const = 0;
-
-  /*!
-   * \brief Return minimum legal PGA gain in dB.
-   */
-  virtual double pga_min () const = 0;
-
-  /*!
-   * \brief Return maximum legal PGA gain in dB.
-   */
-  virtual double pga_max () const = 0;
-
-  /*!
-   * \brief Return hardware step size of PGA (linear in dB).
-   */
-  virtual double pga_db_per_step () const = 0;
-
-  /*!
-   * \brief Write direction register (output enables) for pins that go to daughterboard.
-   *
-   * \param which_side [0,1] which size
-   * \param value      value to write into register
-   * \param mask       which bits of value to write into reg
-   *
-   * Each d'board has 16-bits of general purpose i/o.
-   * Setting the bit makes it an output from the FPGA to the d'board.
-   *
-   * This register is initialized based on a value stored in the
-   * d'board EEPROM.  In general, you shouldn't be using this routine
-   * without a very good reason.  Using this method incorrectly will
-   * kill your USRP motherboard and/or daughterboard.
-   */
-  virtual bool _write_oe (int which_side, int value, int mask) = 0;
-
-  /*!
-   * \brief Write daughterboard i/o pin value
-   *
-   * \param which_side [0,1] which d'board
-   * \param value      value to write into register
-   * \param mask       which bits of value to write into reg
-   */
-  virtual bool write_io (int which_side, int value, int mask) = 0;
-
-  /*!
-   * \brief Read daughterboard i/o pin value
-   *
-   * \param which_side [0,1] which d'board
-   * \param value      output
-   */
-  virtual bool read_io (int which_side, int *value) = 0;
-
-  /*!
-   * \brief Read daughterboard i/o pin value
-   *
-   * \param which_side [0,1] which d'board
-   * \returns register value if successful, else READ_FAILED
-   */
-  virtual int read_io (int which_side) = 0;
-
-  /*!
-   * \brief Write daughterboard refclk config register
-   *
-   * \param which_side [0,1] which d'board
-   * \param value      value to write into register, see below
-   *
-   * <pre>
-   * Control whether a reference clock is sent to the daughterboards,
-   * and what frequency.  The refclk is sent on d'board i/o pin 0.
-   * 
-   *     3                   2                   1                       
-   *   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
-   *  +-----------------------------------------------+-+------------+
-   *  |             Reserved (Must be zero)           |E|   DIVISOR  |
-   *  +-----------------------------------------------+-+------------+
-   * 
-   *  Bit 7  -- 1 turns on refclk, 0 allows IO use
-   *  Bits 6:0 Divider value
-   * </pre>
-   */
-  virtual bool write_refclk(int which_side, int value) = 0;
-
-  virtual bool write_atr_mask(int which_side, int value) = 0;
-  virtual bool write_atr_txval(int which_side, int value) = 0;
-  virtual bool write_atr_rxval(int which_side, int value) = 0;
-
-  /*!
-   * \brief Write auxiliary digital to analog converter.
-   *
-   * \param which_side [0,1] which d'board
-   *                   N.B., SLOT_TX_A and SLOT_RX_A share the same AUX DAC's.
-   *                   SLOT_TX_B and SLOT_RX_B share the same AUX DAC's.
-   * \param which_dac  [2,3] TX slots must use only 2 and 3.
-   * \param value      [0,4095]
-   * \returns true iff successful
-   */
-  virtual bool write_aux_dac (int which_side, int which_dac, int value) = 0;
-
-  /*!
-   * \brief Read auxiliary analog to digital converter.
-   *
-   * \param which_side [0,1] which d'board
-   * \param which_adc  [0,1]
-   * \param value      return 12-bit value [0,4095]
-   * \returns true iff successful
-   */
-  virtual bool read_aux_adc (int which_side, int which_adc, int *value) = 0;
-
-  /*!
-   * \brief Read auxiliary analog to digital converter.
-   *
-   * \param which_side [0,1] which d'board
-   * \param which_adc  [0,1]
-   * \returns value in the range [0,4095] if successful, else READ_FAILED.
-   */
-  virtual int read_aux_adc (int which_side, int which_adc) = 0;
-
-  /*!
-   * \brief returns current fusb block size
-   */
-  virtual int block_size() const = 0;
-
-  /*!
-   * \brief returns A/D or D/A converter rate in Hz
-   */
-  virtual long converter_rate() const = 0;
-
-  // END virtual daughterboard control functions\f
-
-  // ----------------------------------------------------------------
-  // Low level implementation routines.
-  // You probably shouldn't be using these...
-  //
-
-  bool _set_led (int which_led, bool on);
-
-  /*!
-   * \brief Write FPGA register.
-   * \param regno      7-bit register number
-   * \param value      32-bit value
-   * \returns true iff successful
-   */
-  bool _write_fpga_reg (int regno, int value); //< 7-bit regno, 32-bit value
-
-  /*!
-   * \brief Read FPGA register.
-   * \param regno      7-bit register number
-   * \param value      32-bit value
-   * \returns true iff successful
-   */
-  bool _read_fpga_reg (int regno, int *value); //< 7-bit regno, 32-bit value
-
-  /*!
-   * \brief Read FPGA register.
-   * \param regno      7-bit register number
-   * \returns register value if successful, else READ_FAILED
-   */
-  int  _read_fpga_reg (int regno);
-
-  /*!
-   * \brief Write FPGA register with mask.
-   * \param regno      7-bit register number
-   * \param value      16-bit value
-   * \param mask       16-bit value
-   * \returns true if successful
-   * Only use this for registers who actually implement a mask in the verilog firmware, like FR_RX_MASTER_SLAVE
-   */
-  bool _write_fpga_reg_masked (int regno, int value, int mask);
-
-  /*!
-   * \brief Write AD9862 register.
-   * \param which_codec 0 or 1
-   * \param regno      6-bit register number
-   * \param value      8-bit value
-   * \returns true iff successful
-   */
-  bool _write_9862 (int which_codec, int regno, unsigned char value);
-
-  /*!
-   * \brief Read AD9862 register.
-   * \param which_codec 0 or 1
-   * \param regno      6-bit register number
-   * \param value      8-bit value
-   * \returns true iff successful
-   */
-  bool _read_9862 (int which_codec, int regno, unsigned char *value) const;
-
-  /*!
-   * \brief Read AD9862 register.
-   * \param which_codec 0 or 1
-   * \param regno      6-bit register number
-   * \returns register value if successful, else READ_FAILED
-   */
-  int  _read_9862 (int which_codec, int regno) const;
-
-  /*!
-   * \brief Write data to SPI bus peripheral.
-   *
-   * \param optional_header    0,1 or 2 bytes to write before buf.
-   * \param enables            bitmask of peripherals to write. See usrp_spi_defs.h
-   * \param format             transaction format.  See usrp_spi_defs.h SPI_FMT_*
-   * \param buf                        the data to write
-   * \returns true iff successful
-   * Writes are limited to a maximum of 64 bytes.
-   *
-   * If \p format specifies that optional_header bytes are present, they are
-   * written to the peripheral immediately prior to writing \p buf.
-   */
-  bool _write_spi (int optional_header, int enables, int format, std::string buf);
-
-  /*
-   * \brief Read data from SPI bus peripheral.
-   *
-   * \param optional_header    0,1 or 2 bytes to write before buf.
-   * \param enables            bitmask of peripheral to read. See usrp_spi_defs.h
-   * \param format             transaction format.  See usrp_spi_defs.h SPI_FMT_*
-   * \param len                        number of bytes to read.  Must be in [0,64].
-   * \returns the data read if sucessful, else a zero length string.
-   *
-   * Reads are limited to a maximum of 64 bytes.
-   *
-   * If \p format specifies that optional_header bytes are present, they
-   * are written to the peripheral first.  Then \p len bytes are read from
-   * the peripheral and returned.
-   */
-  std::string _read_spi (int optional_header, int enables, int format, int len);
-
-  /*!
-   * \brief Start data transfers.
-   * Called in base class to derived class order.
-   */
-  bool start ();
-
-  /*!
-   * \brief Stop data transfers.
-   * Called in base class to derived class order.
-   */
-  bool stop ();
-};
-
-\f/*!
- * \brief class for accessing the receive side of the USRP
- * \ingroup usrp
- */
-class usrp_basic_rx : public usrp_basic 
-{
-private:
-  fusb_devhandle       *d_devhandle;
-  fusb_ephandle                *d_ephandle;
-  int                   d_bytes_seen;          // how many bytes we've seen
-  bool                  d_first_read;
-  bool                  d_rx_enable;
-
-protected:
-  /*!
-   * \param which_board             Which USRP board on usb (not particularly useful; use 0)
-   * \param fusb_block_size  fast usb xfer block size.  Must be a multiple of 512. 
-   *                         Use zero for a reasonable default.
-   * \param fusb_nblocks     number of fast usb URBs to allocate.  Use zero for a reasonable default. 
-   * \param fpga_filename    name of the rbf file to load
-   * \param firmware_filename name of ihx file to load
-   */
-  usrp_basic_rx (int which_board,
-                int fusb_block_size=0,
-                int fusb_nblocks=0,
-                const std::string fpga_filename = "",
-                const std::string firmware_filename = ""
-                );  // throws if trouble
-
-  bool set_rx_enable (bool on);
-  bool rx_enable () const { return d_rx_enable; }
-
-  bool disable_rx ();          // conditional disable, return prev state
-  void restore_rx (bool on);   // conditional set
-
-  void probe_rx_slots (bool verbose);
-
-public:
-  ~usrp_basic_rx ();
-
-  /*!
-   * \brief invokes constructor, returns instance or 0 if trouble
-   *
-   * \param which_board             Which USRP board on usb (not particularly useful; use 0)
-   * \param fusb_block_size  fast usb xfer block size.  Must be a multiple of 512. 
-   *                         Use zero for a reasonable default.
-   * \param fusb_nblocks     number of fast usb URBs to allocate.  Use zero for a reasonable default. 
-   * \param fpga_filename    name of file that contains image to load into FPGA
-   * \param firmware_filename  name of file that contains image to load into FX2
-   */
-  static usrp_basic_rx *make (int which_board,
-                             int fusb_block_size=0,
-                             int fusb_nblocks=0,
-                             const std::string fpga_filename = "",
-                             const std::string firmware_filename = ""
-                             );
-
-  /*!
-   * \brief tell the fpga the rate rx samples are coming from the A/D's
-   *
-   * div = fpga_master_clock_freq () / sample_rate
-   *
-   * sample_rate is determined by a myriad of registers
-   * in the 9862.  That's why you have to tell us, so
-   * we can tell the fpga.
-   */
-  bool set_fpga_rx_sample_rate_divisor (unsigned int div);
-
-  /*!
-   * \brief read data from the D/A's via the FPGA.
-   * \p len must be a multiple of 512 bytes.
-   *
-   * \returns the number of bytes read, or -1 on error.
-   *
-   * If overrun is non-NULL it will be set true iff an RX overrun is detected.
-   */
-  int read (void *buf, int len, bool *overrun);
-
-
-  //! sampling rate of A/D converter
-  virtual long converter_rate() const { return fpga_master_clock_freq(); } // 64M
-  long adc_rate() const { return converter_rate(); }
-  int daughterboard_id (int which_side) const { return d_dbid[which_side & 0x1]; }
-
-  bool set_pga (int which_amp, double gain_in_db);
-  double pga (int which_amp) const;
-  double pga_min () const;
-  double pga_max () const;
-  double pga_db_per_step () const;
-
-  bool _write_oe (int which_side, int value, int mask);
-  bool write_io (int which_side, int value, int mask);
-  bool read_io (int which_side, int *value);
-  int read_io (int which_side);
-  bool write_refclk(int which_side, int value);
-  bool write_atr_mask(int which_side, int value);
-  bool write_atr_txval(int which_side, int value);
-  bool write_atr_rxval(int which_side, int value);
-
-  bool write_aux_dac (int which_side, int which_dac, int value);
-  bool read_aux_adc (int which_side, int which_adc, int *value);
-  int  read_aux_adc (int which_side, int which_adc);
-
-  int block_size() const;
-
-  // called in base class to derived class order
-  bool start ();
-  bool stop ();
-};
-
-\f/*!
- * \brief class for accessing the transmit side of the USRP
- * \ingroup usrp
- */
-class usrp_basic_tx : public usrp_basic 
-{
-private:
-  fusb_devhandle       *d_devhandle;
-  fusb_ephandle                *d_ephandle;
-  int                   d_bytes_seen;          // how many bytes we've seen
-  bool                  d_first_write;
-  bool                  d_tx_enable;
-
- protected:
-  /*!
-   * \param which_board             Which USRP board on usb (not particularly useful; use 0)
-   * \param fusb_block_size  fast usb xfer block size.  Must be a multiple of 512.
-   *                         Use zero for a reasonable default.
-   * \param fusb_nblocks     number of fast usb URBs to allocate.  Use zero for a reasonable default.
-   * \param fpga_filename    name of file that contains image to load into FPGA
-   * \param firmware_filename  name of file that contains image to load into FX2
-   */
-  usrp_basic_tx (int which_board,
-                int fusb_block_size=0,
-                int fusb_nblocks=0,
-                const std::string fpga_filename = "",
-                const std::string firmware_filename = ""
-                );             // throws if trouble
-
-  bool set_tx_enable (bool on);
-  bool tx_enable () const { return d_tx_enable; }
-
-  bool disable_tx ();          // conditional disable, return prev state
-  void restore_tx (bool on);   // conditional set
-
-  void probe_tx_slots (bool verbose);
-
-public:
-
-  ~usrp_basic_tx ();
-
-  /*!
-   * \brief invokes constructor, returns instance or 0 if trouble
-   *
-   * \param which_board             Which USRP board on usb (not particularly useful; use 0)
-   * \param fusb_block_size  fast usb xfer block size.  Must be a multiple of 512. 
-   *                         Use zero for a reasonable default.
-   * \param fusb_nblocks     number of fast usb URBs to allocate.  Use zero for a reasonable default. 
-   * \param fpga_filename    name of file that contains image to load into FPGA
-   * \param firmware_filename  name of file that contains image to load into FX2
-   */
-  static usrp_basic_tx *make (int which_board, int fusb_block_size=0, int fusb_nblocks=0,
-                             const std::string fpga_filename = "",
-                             const std::string firmware_filename = ""
-                             );
-
-  /*!
-   * \brief tell the fpga the rate tx samples are going to the D/A's
-   *
-   * div = fpga_master_clock_freq () * 2
-   *
-   * sample_rate is determined by a myriad of registers
-   * in the 9862.  That's why you have to tell us, so
-   * we can tell the fpga.
-   */
-  bool set_fpga_tx_sample_rate_divisor (unsigned int div);
-
-  /*!
-   * \brief Write data to the A/D's via the FPGA.
-   *
-   * \p len must be a multiple of 512 bytes.
-   * \returns number of bytes written or -1 on error.
-   *
-   * if \p underrun is non-NULL, it will be set to true iff
-   * a transmit underrun condition is detected.
-   */
-  int write (const void *buf, int len, bool *underrun);
-
-  /*
-   * Block until all outstanding writes have completed.
-   * This is typically used to assist with benchmarking
-   */
-  void wait_for_completion ();
-
-  //! sampling rate of D/A converter
-  virtual long converter_rate() const { return fpga_master_clock_freq () * 2; } // 128M
-  long dac_rate() const { return converter_rate(); }
-  int daughterboard_id (int which_side) const { return d_dbid[which_side & 0x1]; }
-
-  bool set_pga (int which_amp, double gain_in_db);
-  double pga (int which_amp) const;
-  double pga_min () const;
-  double pga_max () const;
-  double pga_db_per_step () const;
-
-  bool _write_oe (int which_side, int value, int mask);
-  bool write_io (int which_side, int value, int mask);
-  bool read_io (int which_side, int *value);
-  int read_io (int which_side);
-  bool write_refclk(int which_side, int value);
-  bool write_atr_mask(int which_side, int value);
-  bool write_atr_txval(int which_side, int value);
-  bool write_atr_rxval(int which_side, int value);
-
-  bool write_aux_dac (int which_side, int which_dac, int value);
-  bool read_aux_adc (int which_side, int which_adc, int *value);
-  int read_aux_adc (int which_side, int which_adc);
-
-  int block_size() const;
-
-  // called in base class to derived class order
-  bool start ();
-  bool stop ();
-};
-
-#endif
index 6bad9a2987d7a619dfa9a83d115d9c3b00a1a3df..7d1e1871402043e8f446cbe5adf1f8b542f3f669 100644 (file)
@@ -1,18 +1,18 @@
 #
 # Copyright 2005,2009 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 3, 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 this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -78,6 +78,9 @@
 "WBX LO TX"            0x0050
 "WBX LO RX"            0x0051
 
+"WBX NG TX"            0x0052
+"WBX NG RX"            0x0053
+
 "XCVR2450 Tx"          0x0060
 "XCVR2450 Rx"          0x0061
 
index 70e90d7fed44cb93e97c47a83beb5f0a3219de1d..20a55653cf4f882af237633e1b31a0984dcb36f7 100644 (file)
@@ -215,7 +215,7 @@ write_internal_ram (libusb_device_handle *udh, unsigned char *buf,
                        (unsigned char*)(buf + (addr - start_addr)), n, 1000);
 
     if (a < 0){
-      fprintf(stderr,"write_internal_ram failed: %i\n", a);
+      fprintf(stderr,"write_internal_ram failed\n");
       return false;
     }
   }
@@ -297,7 +297,7 @@ _usrp_load_firmware (libusb_device_handle *udh, const char *filename,
       break;
     }
     else if (type == 0x02){
-      fprintf(stderr, "Extended address: whatever I do with it?\n");
+      fprintf (stderr, "Extended address: whatever I do with it?\n");
       fprintf (stderr, "%s: invalid line: \"%s\"\n", filename, s);
       goto fail;
     }
@@ -419,6 +419,10 @@ usrp_set_hash (libusb_device_handle *udh, int which,
   // we use the Cypress firmware down load command to jam it in.
   int r = _usb_control_transfer (udh, 0x40, 0xa0, hash_slot_addr[which], 0,
                                 (unsigned char *) hash, USRP_HASH_SIZE, 1000);
+
+  if (r < 0)
+     fprintf (stderr, "usrp: failed to set hash\n");
+
   return r == USRP_HASH_SIZE;
 }
 
@@ -431,6 +435,10 @@ usrp_get_hash (libusb_device_handle *udh, int which,
   // we use the Cypress firmware upload command to fetch it.
   int r = _usb_control_transfer (udh, 0xc0, 0xa0, hash_slot_addr[which], 0,
                                 (unsigned char *) hash, USRP_HASH_SIZE, 1000);
+
+  if (r < 0)
+     fprintf (stderr, "usrp: failed to get hash\n");
+
   return r == USRP_HASH_SIZE;
 }
 
@@ -684,11 +692,13 @@ usrp_load_firmware_nth (int nth, const char *filename, bool force, libusb_contex
 
     // FIXME.  Turn this into a loop that rescans until we refind ourselves
 
-    struct timespec     t;      // delay for 1 second
+    struct timespec     t;      // delay for 2 second
     t.tv_sec = 2;
     t.tv_nsec = 0;
     our_nanosleep (&t);
 
+    usrp_rescan ();
+
     return ULS_OK;
 
   default:
index 7a82eabfaf634180397215cee664d7d07509bfb1..7053786d807926a02dd2df84a54b6d96cbf11a49 100644 (file)
@@ -57,11 +57,20 @@ _get_usb_device_descriptor (struct usb_device *q)
 {
   return q->descriptor;
 }
+
 int
 _get_usb_string_descriptor (struct usb_dev_handle *udh, int index,
                            unsigned char* data, int length)
 {
-  return usb_get_string_simple (udh, index, (char*) data, length);
+  int ret;
+  ret =  usb_get_string_simple (udh, index, (char*) data, length);
+
+  if (ret < 0) {
+    fprintf (stderr, "usrp: usb_get_string_descriptor failed: %s\n",
+             usb_strerror());
+  }
+
+  return ret;
 }
 
 int
@@ -69,8 +78,14 @@ _usb_control_transfer (struct usb_dev_handle *udh, int request_type,
                       int request, int value, int index,
                       unsigned char *data, int length, unsigned int timeout)
 {
-  return usb_control_msg (udh, request_type,request, value, index,
-                          (char*) data, length, (int) timeout);
+  int ret;
+
+  ret = usb_control_msg (udh, request_type,request, value, index,
+                         (char*) data, length, (int) timeout);
+  if (ret < 0) 
+    fprintf (stderr, "usrp: usb_claim_interface failed: %s\n", usb_strerror());
+
+  return ret;
 }
 
 
@@ -198,8 +213,10 @@ write_cmd (struct usb_dev_handle *udh,
                           (char *) bytes, len, 1000);
   if (r < 0){
     // we get EPIPE if the firmware stalls the endpoint.
-    if (errno != EPIPE)
+    if (errno != EPIPE) {
       fprintf (stderr, "usb_control_msg failed: %s\n", usb_strerror ());
+      fprintf (stderr, "write_cmd failed\n");
+    }
   }
 
   return r;
index cf1f8fe0771bf8ed7ca3137c8f4038df52cbced4..fdd497abc6405703c70f2e034e3d35e93b08ad8f 100644 (file)
@@ -42,10 +42,49 @@ extern "C" {
 
 using namespace ad9862;
 
+static const int LIBUSB1_DEBUG = 0;
+
 /*
  * libusb 0.12 / 1.0 compatibility
  */
 
+static const char *
+_get_usb_error_str (int usb_err)
+{
+  switch (usb_err) {
+  case LIBUSB_SUCCESS:
+    return "Success (no error)";
+  case LIBUSB_ERROR_IO:
+    return "Input/output error";
+  case LIBUSB_ERROR_INVALID_PARAM:
+    return "Invalid parameter";
+  case LIBUSB_ERROR_ACCESS:
+    return "Access denied (insufficient permissions)";
+  case LIBUSB_ERROR_NO_DEVICE:
+    return "No such device (it may have been disconnected)";
+  case LIBUSB_ERROR_NOT_FOUND:
+    return "Entity not found";
+  case LIBUSB_ERROR_BUSY:
+    return "Resource busy";
+  case LIBUSB_ERROR_TIMEOUT:
+    return "Operation timed out";
+  case LIBUSB_ERROR_OVERFLOW:
+    return "Overflow";
+  case LIBUSB_ERROR_PIPE:
+    return "Pipe error";
+   case LIBUSB_ERROR_INTERRUPTED:
+    return "System call interrupted (perhaps due to signal)";
+  case LIBUSB_ERROR_NO_MEM:
+    return "Insufficient memory";
+  case LIBUSB_ERROR_NOT_SUPPORTED:
+    return "Operation not supported or unimplemented on this platform";
+  case LIBUSB_ERROR_OTHER:
+    return "Unknown error";
+  }
+
+  return "Unknown error";
+}
+
 struct libusb_device *
 _get_usb_device (struct libusb_device_handle *udh)
 {
@@ -58,17 +97,27 @@ _get_usb_device_descriptor(struct libusb_device *q)
   int ret;
   struct libusb_device_descriptor desc;
 
-  if ((ret = libusb_get_device_descriptor(q, &desc)) < 0)
-    fprintf (stderr, "usrp: libusb_get_device_descriptor failed %d\n", ret);
+  ret = libusb_get_device_descriptor(q, &desc);
 
+  if (ret < 0) {
+    fprintf (stderr, "usrp: libusb_get_device_descriptor failed: %s\n",
+             _get_usb_error_str(ret));
+  }
   return desc;
 }
 
 int
 _get_usb_string_descriptor (struct libusb_device_handle *udh, int index,
-                           unsigned char* data, int length)
+                            unsigned char* data, int length)
 {
-  return libusb_get_string_descriptor_ascii (udh, (uint8_t) index, data, length);
+  int ret;
+  ret = libusb_get_string_descriptor_ascii (udh, (uint8_t) index, data, length);
+
+  if (ret < 0) {
+    fprintf (stderr, "usrp: libusb_get_string_descriptor_ascii failed: %s\n",
+             _get_usb_error_str(ret));
+  }
+  return ret;
 }
 
 int
@@ -76,11 +125,16 @@ _usb_control_transfer (struct libusb_device_handle *udh, int request_type,
                        int request, int value, int index,
                        unsigned char *data, int length, unsigned int timeout)
 {
-  return libusb_control_transfer (udh, request_type, request, value, index,
-                                  data, length, timeout);
+  int ret;
+  ret = libusb_control_transfer (udh, request_type, request, value, index,
+                                 data, length, timeout);
+  if (ret < 0) {
+    fprintf (stderr, "usrp: libusb_control_transfer failed: %s\n",
+             _get_usb_error_str(ret));
+  }
+  return ret;
 }
 
-
 // ----------------------------------------------------------------
 
 
@@ -90,7 +144,14 @@ usrp_one_time_init (libusb_context **ctx)
   int ret;
 
   if ((ret = libusb_init (ctx)) < 0)
-    fprintf (stderr, "usrp: libusb_init failed %i\n", ret);
+    fprintf (stderr, "usrp: libusb_init failed: %s\n", _get_usb_error_str(ret));
+
+  // Enable debug verbosity if requested. This will only work if the debug
+  // option is compiled into libusb and may produce a generous amount of output
+  // on stdout. If debug output is not compiled into libusb, this call does
+  // nothing. 
+  if (LIBUSB1_DEBUG)
+    libusb_set_debug(*ctx, 3);
 }
 
 void
@@ -117,7 +178,8 @@ usrp_find_device (int nth, bool fx2_ok_p, libusb_context *ctx)
   size_t i = 0;
 
   if (cnt < 0)
-    fprintf(stderr, "usrp: libusb_get_device_list failed %d\n", cnt);
+    fprintf(stderr, "usrp: libusb_get_device_list failed: %s\n",
+            _get_usb_error_str(cnt));
 
   for (i = 0; i < cnt; i++) {
     q = list[i];
@@ -149,16 +211,17 @@ usrp_open_interface (libusb_device *dev, int interface, int altinterface)
   }
 
   if ((ret = libusb_claim_interface (udh, interface)) < 0) {
-    fprintf (stderr, "%s:usb_claim_interface: failed interface %d\n", __FUNCTION__,interface);
-    fprintf (stderr, "%d\n", ret);
+    fprintf (stderr, "%s:usb_claim_interface: failed interface %d\n",
+             __FUNCTION__, interface);
+    fprintf (stderr, "%s\n", _get_usb_error_str(ret));
     libusb_close (udh);
     return 0;
   }
 
   if ((ret = libusb_set_interface_alt_setting (udh, interface,
-                                                   altinterface)) < 0) {
+                                               altinterface)) < 0) {
     fprintf (stderr, "%s:usb_set_alt_interface: failed\n", __FUNCTION__);
-    fprintf (stderr, "%d\n", ret);
+    fprintf (stderr, "%s\n", _get_usb_error_str(ret));
     libusb_release_interface (udh, interface);
     libusb_close (udh);
     return 0;
@@ -185,18 +248,20 @@ write_cmd (struct libusb_device_handle *udh,
            int request, int value, int index,
            unsigned char *bytes, int len)
 {
-  int   requesttype = (request & 0x80) ? VRT_VENDOR_IN : VRT_VENDOR_OUT;
+  int requesttype = (request & 0x80) ? VRT_VENDOR_IN : VRT_VENDOR_OUT;
 
-  int r = libusb_control_transfer(udh, requesttype, request, value, index,
-                                  (unsigned char *) bytes, len, 1000);
+  int ret = libusb_control_transfer(udh, requesttype, request, value, index,
+                                    bytes, len, 1000);
 
-  if (r < 0){
+  if (ret < 0) {
     // we get EPIPE if the firmware stalls the endpoint.
-    if (r != LIBUSB_ERROR_PIPE) {
-      fprintf (stderr, "libusb_control_transfer failed: %i\n", r);
+    if (ret != LIBUSB_ERROR_PIPE) {
+      fprintf (stderr, "usrp: libusb_control_transfer failed: %s\n",
+               _get_usb_error_str(ret));
+      fprintf (stderr, "usrp: write_cmd failed\n");
     }
   }
 
-  return r;
+  return ret;
 }
 
diff --git a/usrp2/fpga/top/u2_fpga/.gitignore b/usrp2/fpga/top/u2_fpga/.gitignore
deleted file mode 100644 (file)
index de5b502..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/templates
-/netgen
-/_ngo
-/_xmsgs
-/_pace.ucf
-/*.cmd
-/*.ibs
-/*.lfp
-/*.mfp
-/*.bit
-/*.bin
-/*.stx
-/*.par
-/*.unroutes
-/*.ntrc_log
-/*.ngr
-/*.mrp
-/*.html
-/*.lso
-/*.twr
-/*.bld
-/*.ncd
-/*.txt
-/*.cmd_log
-/*.drc
-/*.map
-/*.twr
-/*.xml
-/*.syr
-/*.ngm
-/*.xst
-/*.csv
-/*.html
-/*.lock
-/*.ncd
-/*.twx
-/*.ise_ISE_Backup
-/*.xml
-/*.ut
-/*.xpi
-/*.ngd
-/*.ncd
-/*.pad
-/*.bgn
-/*.ngc
-/*.pcf
-/*.ngd
-/xst
-/*.log
-/*.rpt
-/*.cel
-/*.restore
diff --git a/usrp2/fpga/top/u2_fpga/Makefile b/usrp2/fpga/top/u2_fpga/Makefile
deleted file mode 100644 (file)
index b3245d8..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-FILENAME=u2_fpga_top
-PARTNUM=xc3s1500-5fg456
-
-all: project command xst ngd ncd ncd2 bit 
-
-xst: 
-       xst -ifn ${FILENAME}.cmd -ofn xst.log
-
-ngd: 
-       ngdbuild -nt timestamp -p ${PARTNUM} ${FILENAME}
-
-ncd: 
-       rm -rf ${FILENAME}.ncd
-       map -detail -cm speed -k 8 -retiming on -equivalent_register_removal on -timing -ol high -pr b -p ${PARTNUM} ${FILENAME}.ngd -o ${FILENAME}.ncd ${FILENAME}.pcf
-
-# Place and route ncd file into new ncd file
-ncd2:  
-       par -ol high -xe n -w ${FILENAME}.ncd ${FILENAME} ${FILENAME}.pcf
-
-bit:   
-       bitgen -w ${FILENAME}.ncd -b ${FILENAME}.bit
-
-clean:
-       @rm -rf ${FILENAME}.ngc *.lst *.bit *.lso *.xst *.stx *.syr \
-       *.ngr *.cmd_log _ngc _xmsgs xst *.html *.srp \
-       *.blc *.bld *.ise_ISE_Backup *~ \
-       *.pad *.ngm *.ngd *.par *.pcf *.unroutes     \
-       *.xpi *.bgn *.drc *.bin *.mrp *.csv *.txt    \
-       *.rbt *.ncd ${FILENAME} *_cg templates/ tmp/ \
-        output.dat coregen.log *.ngo *.log ${FILENAME}.map \
-       ${FILENAME}_summary.xml ${FILENAME}_usage.xml ${FILENAME}.twr
-
-command:
-       rm -rf ${FILENAME}.cmd
-       @echo "identification"       >> ${FILENAME}.cmd
-       @echo "status"               >> ${FILENAME}.cmd
-       @echo "time short"           >> ${FILENAME}.cmd
-       @echo "memory on"            >> ${FILENAME}.cmd
-       @echo "run "                 >> ${FILENAME}.cmd
-       @echo "-top ${FILENAME}"     >> ${FILENAME}.cmd
-       @echo "-ifn ${FILENAME}.prj" >> ${FILENAME}.cmd
-       @echo "-ifmt Verilog "       >> ${FILENAME}.cmd
-       @echo "-ofn ${FILENAME} "    >> ${FILENAME}.cmd
-       @echo "-p ${PARTNUM}"        >> ${FILENAME}.cmd
-       @echo "-bufg 6"              >> ${FILENAME}.cmd
-       @echo "-vlgincdir { ../../opencores/i2c/rtl/verilog ../../eth/rtl/verilog/ ../../opencores/spi/rtl/verilog}"  >> ${FILENAME}.cmd
-
-project:
-       rm -f ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/TECH/duram.v" '                          >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/sign_extend.v" '                                 >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/cordic_stage.v" '                                >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/cic_int_shifter.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/cic_dec_shifter.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../../opencores/i2c/rtl/verilog/i2c_master_bit_ctrl.v" '       >> ${FILENAME}.prj
-       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_regfile.v" '             >> ${FILENAME}.prj
-       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_fetch.v" '               >> ${FILENAME}.prj
-       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_decode.v" '              >> ${FILENAME}.prj
-       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_control.v" '             >> ${FILENAME}.prj
-       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_aslu.v" '                >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/miim/eth_shiftreg.v" '                   >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/miim/eth_outputcontrol.v" '              >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/miim/eth_clockgen.v" '                   >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/TECH/eth_clk_switch.v" '                 >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/TECH/eth_clk_div2.v" '                   >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/Reg_int.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/RMON/RMON_dpram.v" '                     >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/RMON/RMON_ctrl.v" '                      >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/RMON/RMON_addr_gen.v" '                  >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_tx/flow_ctrl.v" '                    >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_tx/Ramdon_gen.v" '                   >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v" '                  >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_tx/MAC_tx_addr_add.v" '              >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_tx/MAC_tx_FF.v" '                    >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_tx/CRC_gen.v" '                      >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_rx/MAC_rx_ctrl.v" '                  >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_rx/MAC_rx_add_chk.v" '               >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_rx/MAC_rx_FF.v" '                    >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_rx/CRC_chk.v" '                      >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_rx/Broadcast_filter.v" '             >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/ram_2port.v" '                               >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/cordic.v" '                                      >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/cic_interp.v" '                                  >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/cic_decim.v" '                                   >> ${FILENAME}.prj
-       @echo '`include "../../opencores/spi/rtl/verilog/spi_shift.v" '                 >> ${FILENAME}.prj
-       @echo '`include "../../opencores/spi/rtl/verilog/spi_clgen.v" '                 >> ${FILENAME}.prj
-       @echo '`include "../../opencores/i2c/rtl/verilog/i2c_master_byte_ctrl.v" '      >> ${FILENAME}.prj
-       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_core.v" '                >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/eth_miim.v" '                            >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/RMON.v" '                                >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/Phy_int.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_tx.v" '                              >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_rx.v" '                              >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/Clk_ctrl.v" '                            >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/strobe_gen.v" '                              >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/ss_rcvr.v" '                                 >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/shortfifo.v" '                               >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/setting_reg.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/mux8.v" '                                    >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/mux4.v" '                                    >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/longfifo.v" '                                >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/decoder_3_8.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/buffer_int.v" '                              >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/CRC16_D16.v" '                               >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/tx_control.v" '                                  >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/rx_control.v" '                                  >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/dsp_core_tx.v" '                                 >> ${FILENAME}.prj
-       @echo '`include "../../sdr_lib/dsp_core_rx.v" '                                 >> ${FILENAME}.prj
-       @echo '`include "../../opencores/spi/rtl/verilog/spi_top.v" '                   >> ${FILENAME}.prj
-       @echo '`include "../../opencores/simple_pic/rtl/simple_pic.v" '                 >> ${FILENAME}.prj
-       @echo '`include "../../opencores/i2c/rtl/verilog/i2c_master_top.v" '            >> ${FILENAME}.prj
-       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_core_BE.v" '             >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/MAC_top.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../../eth/mac_txfifo_int.v" '                                  >> ${FILENAME}.prj
-       @echo '`include "../../eth/mac_rxfifo_int.v" '                                  >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/wb_readback_mux.v" '                         >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/wb_1master.v" '                              >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/timer.v" '                                   >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/system_control.v" '                          >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/settings_bus.v" '                            >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/serdes_tx.v" '                               >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/serdes_rx.v" '                               >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/ram_wb_harvard.v" '                          >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/ram_loader.v" '                              >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/nsgpio.v" '                                  >> ${FILENAME}.prj
-       @echo '`include "../../control_lib/buffer_pool.v" '                             >> ${FILENAME}.prj
-       @echo '`include "../u2_basic/u2_basic.v" '                                      >> ${FILENAME}.prj
-       @echo '`include "u2_fpga_top.v" '                                               >> ${FILENAME}.prj
-       @echo '`include "../../eth/rtl/verilog/elastic_buffer.v" '                      >> ${FILENAME}.prj
diff --git a/usrp2/fpga/top/u2_fpga/u2_fpga.ise b/usrp2/fpga/top/u2_fpga/u2_fpga.ise
deleted file mode 100644 (file)
index f90caf0..0000000
Binary files a/usrp2/fpga/top/u2_fpga/u2_fpga.ise and /dev/null differ
diff --git a/usrp2/fpga/top/u2_fpga/u2_fpga.ucf b/usrp2/fpga/top/u2_fpga/u2_fpga.ucf
deleted file mode 100755 (executable)
index 5d21248..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-NET "adc_a[0]"  LOC = "A14"  ;
-NET "adc_a[10]"  LOC = "D20"  ;
-NET "adc_a[11]"  LOC = "D19"  ;
-NET "adc_a[12]"  LOC = "D21"  ;
-NET "adc_a[13]"  LOC = "E18"  ;
-NET "adc_a[1]"  LOC = "B14"  ;
-NET "adc_a[2]"  LOC = "C13"  ;
-NET "adc_a[3]"  LOC = "D13"  ;
-NET "adc_a[4]"  LOC = "A13"  ;
-NET "adc_a[5]"  LOC = "B13"  ;
-NET "adc_a[6]"  LOC = "E12"  ;
-NET "adc_a[7]"  LOC = "C22"  ;
-NET "adc_a[8]"  LOC = "C20"  ;
-NET "adc_a[9]"  LOC = "C21"  ;
-NET "adc_b[0]"  LOC = "A12"  ;
-NET "adc_b[10]"  LOC = "D18"  ;
-NET "adc_b[11]"  LOC = "B18"  ;
-NET "adc_b[12]"  LOC = "D17"  ;
-NET "adc_b[13]"  LOC = "E17"  ;
-NET "adc_b[1]"  LOC = "E16"  ;
-NET "adc_b[2]"  LOC = "F12"  ;
-NET "adc_b[3]"  LOC = "F13"  ;
-NET "adc_b[4]"  LOC = "F16"  ;
-NET "adc_b[5]"  LOC = "F17"  ;
-NET "adc_b[6]"  LOC = "C19"  ;
-NET "adc_b[7]"  LOC = "B20"  ;
-NET "adc_b[8]"  LOC = "B19"  ;
-NET "adc_b[9]"  LOC = "C18"  ;
-NET "clk_en[0]"  LOC = "C4"  ;
-NET "clk_en[1]"  LOC = "D1"  ;
-NET "clk_sel[0]"  LOC = "C3"  ;
-NET "clk_sel[1]"  LOC = "C2"  ;
-NET "dac_a[0]"  LOC = "A5"  ;
-NET "dac_a[10]"  LOC = "L2"  ;
-NET "dac_a[11]"  LOC = "L4"  ;
-NET "dac_a[12]"  LOC = "L3"  ;
-NET "dac_a[13]"  LOC = "L6"  ;
-NET "dac_a[14]"  LOC = "L5"  ;
-NET "dac_a[15]"  LOC = "K2"  ;
-NET "dac_a[1]"  LOC = "B5"  ;
-NET "dac_a[2]"  LOC = "C5"  ;
-NET "dac_a[3]"  LOC = "D5"  ;
-NET "dac_a[4]"  LOC = "A4"  ;
-NET "dac_a[5]"  LOC = "B4"  ;
-NET "dac_a[6]"  LOC = "F6"  ;
-NET "dac_a[7]"  LOC = "D10"  ;
-NET "dac_a[8]"  LOC = "D9"  ;
-NET "dac_a[9]"  LOC = "A10"  ;
-NET "dac_b[0]"  LOC = "D11"  ;
-NET "dac_b[10]"  LOC = "F9"  ;
-NET "dac_b[11]"  LOC = "A8"  ;
-NET "dac_b[12]"  LOC = "B8"  ;
-NET "dac_b[13]"  LOC = "D7"  ;
-NET "dac_b[14]"  LOC = "E7"  ;
-NET "dac_b[15]"  LOC = "B6"  ;
-NET "dac_b[1]"  LOC = "E11"  ;
-NET "dac_b[2]"  LOC = "F11"  ;
-NET "dac_b[3]"  LOC = "B10"  ;
-NET "dac_b[4]"  LOC = "C10"  ;
-NET "dac_b[5]"  LOC = "E10"  ;
-NET "dac_b[6]"  LOC = "F10"  ;
-NET "dac_b[7]"  LOC = "A9"  ;
-NET "dac_b[8]"  LOC = "B9"  ;
-NET "dac_b[9]"  LOC = "E9"  ;
-NET "debug[0]"  LOC = "N5"  ;
-NET "debug[10]"  LOC = "R4"  ;
-NET "debug[11]"  LOC = "T3"  ;
-NET "debug[12]"  LOC = "U3"  ;
-NET "debug[13]"  LOC = "M2"  ;
-NET "debug[14]"  LOC = "M3"  ;
-NET "debug[15]"  LOC = "M4"  ;
-NET "debug[16]"  LOC = "M5"  ;
-NET "debug[17]"  LOC = "M6"  ;
-NET "debug[18]"  LOC = "N1"  ;
-NET "debug[19]"  LOC = "N2"  ;
-NET "debug[1]"  LOC = "N6"  ;
-NET "debug[20]"  LOC = "N3"  ;
-NET "debug[21]"  LOC = "T1"  ;
-NET "debug[22]"  LOC = "T2"  ;
-NET "debug[23]"  LOC = "U2"  ;
-NET "debug[24]"  LOC = "T4"  ;
-NET "debug[25]"  LOC = "U4"  ;
-NET "debug[26]"  LOC = "T5"  ;
-NET "debug[27]"  LOC = "T6"  ;
-NET "debug[28]"  LOC = "U5"  ;
-NET "debug[29]"  LOC = "V5"  ;
-NET "debug[2]"  LOC = "P1"  ;
-NET "debug[30]"  LOC = "W2"  ;
-NET "debug[31]"  LOC = "W3"  ;
-NET "debug[3]"  LOC = "P2"  ;
-NET "debug[4]"  LOC = "P4"  ;
-NET "debug[5]"  LOC = "P5"  ;
-NET "debug[6]"  LOC = "R1"  ;
-NET "debug[7]"  LOC = "R2"  ;
-NET "debug[8]"  LOC = "P6"  ;
-NET "debug[9]"  LOC = "R5"  ;
-NET "debug_clk[0]"  LOC = "N4"  ;
-NET "debug_clk[1]"  LOC = "M1"  ;
-NET "GMII_RXD[0]"  LOC = "AA15"  ;
-NET "GMII_RXD[1]"  LOC = "AB15"  ;
-NET "GMII_RXD[2]"  LOC = "U14"  ;
-NET "GMII_RXD[3]"  LOC = "V14"  ;
-NET "GMII_RXD[4]"  LOC = "U13"  ;
-NET "GMII_RXD[5]"  LOC = "V13"  ;
-NET "GMII_RXD[6]"  LOC = "Y13"  ;
-NET "GMII_RXD[7]"  LOC = "AA13"  ;
-NET "GMII_TXD[0]"  LOC = "W14"  ;
-NET "GMII_TXD[1]"  LOC = "AA20"  ;
-NET "GMII_TXD[2]"  LOC = "AB20"  ;
-NET "GMII_TXD[3]"  LOC = "Y18"  ;
-NET "GMII_TXD[4]"  LOC = "AA18"  ;
-NET "GMII_TXD[5]"  LOC = "AB18"  ;
-NET "GMII_TXD[6]"  LOC = "V17"  ;
-NET "GMII_TXD[7]"  LOC = "W17"  ;
-NET "io_rx[0]"  LOC = "L21"  ;
-NET "io_rx[10]"  LOC = "F21"  ;
-NET "io_rx[11]"  LOC = "F20"  ;
-NET "io_rx[12]"  LOC = "G19"  ;
-NET "io_rx[13]"  LOC = "G18"  ;
-NET "io_rx[14]"  LOC = "G17"  ;
-NET "io_rx[15]"  LOC = "E22"  ;
-NET "io_rx[1]"  LOC = "L20"  ;
-NET "io_rx[2]"  LOC = "L19"  ;
-NET "io_rx[3]"  LOC = "L18"  ;
-NET "io_rx[4]"  LOC = "L17"  ;
-NET "io_rx[5]"  LOC = "K22"  ;
-NET "io_rx[6]"  LOC = "K21"  ;
-NET "io_rx[7]"  LOC = "K20"  ;
-NET "io_rx[8]"  LOC = "G22"  ;
-NET "io_rx[9]"  LOC = "G21"  ;
-NET "io_tx[0]"  LOC = "K4"  ;
-NET "io_tx[10]"  LOC = "E1"  ;
-NET "io_tx[11]"  LOC = "E3"  ;
-NET "io_tx[12]"  LOC = "F4"  ;
-NET "io_tx[13]"  LOC = "D2"  ;
-NET "io_tx[14]"  LOC = "D4"  ;
-NET "io_tx[15]"  LOC = "E4"  ;
-NET "io_tx[1]"  LOC = "K3"  ;
-NET "io_tx[2]"  LOC = "G1"  ;
-NET "io_tx[3]"  LOC = "G5"  ;
-NET "io_tx[4]"  LOC = "H5"  ;
-NET "io_tx[5]"  LOC = "F3"  ;
-NET "io_tx[6]"  LOC = "F2"  ;
-NET "io_tx[7]"  LOC = "F5"  ;
-NET "io_tx[8]"  LOC = "G6"  ;
-NET "io_tx[9]"  LOC = "E2"  ;
-NET "RAM_A[0]"  LOC = "N22"  ;
-NET "RAM_A[10]"  LOC = "P18"  ;
-NET "RAM_A[11]"  LOC = "R19"  ;
-NET "RAM_A[12]"  LOC = "P19"  ;
-NET "RAM_A[13]"  LOC = "R21"  ;
-NET "RAM_A[14]"  LOC = "R22"  ;
-NET "RAM_A[15]"  LOC = "T19"  ;
-NET "RAM_A[16]"  LOC = "T20"  ;
-NET "RAM_A[17]"  LOC = "U20"  ;
-NET "RAM_A[18]"  LOC = "W19"  ;
-NET "RAM_A[1]"  LOC = "N20"  ;
-NET "RAM_A[2]"  LOC = "T21"  ;
-NET "RAM_A[3]"  LOC = "M22"  ;
-NET "RAM_A[4]"  LOC = "N19"  ;
-NET "RAM_A[5]"  LOC = "N17"  ;
-NET "RAM_A[6]"  LOC = "N18"  ;
-NET "RAM_A[7]"  LOC = "P21"  ;
-NET "RAM_A[8]"  LOC = "P22"  ;
-NET "RAM_A[9]"  LOC = "P17"  ;
-NET "RAM_D[0]"  LOC = "Y21"  ;
-NET "RAM_D[10]"  LOC = "V22"  ;
-NET "RAM_D[11]"  LOC = "V21"  ;
-NET "RAM_D[12]"  LOC = "T17"  ;
-NET "RAM_D[13]"  LOC = "U18"  ;
-NET "RAM_D[14]"  LOC = "U21"  ;
-NET "RAM_D[15]"  LOC = "R18"  ;
-NET "RAM_D[16]"  LOC = "T18"  ;
-NET "RAM_D[17]"  LOC = "T22"  ;
-NET "RAM_D[1]"  LOC = "Y20"  ;
-NET "RAM_D[2]"  LOC = "Y19"  ;
-NET "RAM_D[3]"  LOC = "W22"  ;
-NET "RAM_D[4]"  LOC = "Y22"  ;
-NET "RAM_D[5]"  LOC = "V19"  ;
-NET "RAM_D[6]"  LOC = "W21"  ;
-NET "RAM_D[7]"  LOC = "W20"  ;
-NET "RAM_D[8]"  LOC = "U19"  ;
-NET "RAM_D[9]"  LOC = "V20"  ;
-NET "ser_r[0]"  LOC = "AB10"  ;
-NET "ser_r[10]"  LOC = "W10"  ;
-NET "ser_r[11]"  LOC = "Y1"  ;
-NET "ser_r[12]"  LOC = "Y3"  ;
-NET "ser_r[13]"  LOC = "Y2"  ;
-NET "ser_r[14]"  LOC = "W4"  ;
-NET "ser_r[15]"  LOC = "W1"  ;
-NET "ser_r[1]"  LOC = "AA10"  ;
-NET "ser_r[2]"  LOC = "U9"  ;
-NET "ser_r[3]"  LOC = "U6"  ;
-NET "ser_r[4]"  LOC = "AB11"  ;
-NET "ser_r[5]"  LOC = "Y7"  ;
-NET "ser_r[6]"  LOC = "W7"  ;
-NET "ser_r[7]"  LOC = "AB7"  ;
-NET "ser_r[8]"  LOC = "AA7"  ;
-NET "ser_r[9]"  LOC = "W9"  ;
-NET "ser_t[0]"  LOC = "V7"  ;
-NET "ser_t[10]"  LOC = "AA6"  ;
-NET "ser_t[11]"  LOC = "Y6"  ;
-NET "ser_t[12]"  LOC = "W8"  ;
-NET "ser_t[13]"  LOC = "V8"  ;
-NET "ser_t[14]"  LOC = "AB8"  ;
-NET "ser_t[15]"  LOC = "AA8"  ;
-NET "ser_t[1]"  LOC = "V10"  ;
-NET "ser_t[2]"  LOC = "AB4"  ;
-NET "ser_t[3]"  LOC = "AA4"  ;
-NET "ser_t[4]"  LOC = "Y5"  ;
-NET "ser_t[5]"  LOC = "W5"  ;
-NET "ser_t[6]"  LOC = "AB5"  ;
-NET "ser_t[7]"  LOC = "AA5"  ;
-NET "ser_t[8]"  LOC = "W6"  ;
-NET "ser_t[9]"  LOC = "V6"  ;
-NET "clk_muxed" TNM_NET = "clk_muxed";
-TIMESPEC "TS_clk_muxed" = PERIOD "clk_muxed" 10 ns HIGH 50 %;
-NET "clk_to_mac" TNM_NET = "clk_to_mac";
-TIMESPEC "TS_clk_to_mac" = PERIOD "clk_to_mac" 8 ns HIGH 50 %;
-NET "cpld_clk" TNM_NET = "cpld_clk";
-TIMESPEC "TS_cpld_clk" = PERIOD "cpld_clk" 40 ns HIGH 50 %;
-NET "GMII_RX_CLK" TNM_NET = "GMII_RX_CLK";
-TIMESPEC "TS_GMII_RX_CLK" = PERIOD "GMII_RX_CLK" 8 ns HIGH 50 %;
-NET "ser_rx_clk" TNM_NET = "ser_rx_clk";
-TIMESPEC "TS_ser_rx_clk" = PERIOD "ser_rx_clk" 10 ns HIGH 50 %;
-#PACE: Start of Constraints generated by PACE
-
-#PACE: Start of PACE I/O Pin Assignments
-NET "adc_oen_a"  LOC = "E19"  ; 
-NET "adc_oen_b"  LOC = "C17"  ; 
-NET "adc_ovf_a"  LOC = "F18"  ; 
-NET "adc_ovf_b"  LOC = "B17"  ; 
-NET "adc_pdn_a"  LOC = "E20"  ; 
-NET "adc_pdn_b"  LOC = "D15"  ; 
-NET "clk_fpga_n"  LOC = "B11"  ; 
-NET "clk_fpga_p"  LOC = "A11"  ; 
-NET "clk_func"  LOC = "C12"  ; 
-NET "clk_status"  LOC = "B12"  ; 
-NET "clk_to_mac"  LOC = "AB12"  ; 
-NET "cpld_clk"  LOC = "AB14"  ; 
-NET "cpld_din"  LOC = "AA14"  ; 
-NET "cpld_done"  LOC = "V12"  ; 
-NET "cpld_mode"  LOC = "U12"  ; 
-NET "cpld_start"  LOC = "AA9"  ; 
-NET "exp_pps_in_n"  LOC = "V4"  ; 
-NET "exp_pps_in_p"  LOC = "V3"  ; 
-NET "exp_pps_out_n"  LOC = "V2"  ; 
-NET "exp_pps_out_p"  LOC = "V1"  ; 
-NET "GMII_COL"  LOC = "U16"  ; 
-NET "GMII_CRS"  LOC = "U17"  ; 
-NET "GMII_GTX_CLK"  LOC = "AA17" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
-NET "GMII_RX_CLK"  LOC = "W16"  ; 
-NET "GMII_RX_DV"  LOC = "AB16"  ; 
-NET "GMII_RX_ER"  LOC = "AA16"  ; 
-NET "GMII_TX_CLK"  LOC = "W13"  ; 
-NET "GMII_TX_EN"  LOC = "Y17" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
-NET "GMII_TX_ER"  LOC = "V16" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
-NET "GMII_TXD<0>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "GMII_TXD<1>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "GMII_TXD<2>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "GMII_TXD<3>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "GMII_TXD<4>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "GMII_TXD<5>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "GMII_TXD<6>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "GMII_TXD<7>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "led1"  LOC = "V11"  ; 
-NET "led2"  LOC = "Y12"  ; 
-NET "MDC"  LOC = "V18"  ; 
-NET "MDIO"  LOC = "Y16" | PULLUP ; 
-NET "PHY_CLK"  LOC = "V15"  ; 
-NET "PHY_INTn"  LOC = "AB13"  ; 
-NET "PHY_RESETn"  LOC = "AA19"  ; 
-NET "pps_in"  LOC = "Y11"  ; 
-NET "RAM_CE1n"  LOC = "N21"  ; 
-NET "RAM_CENn"  LOC = "M18"  ; 
-NET "RAM_CLK"  LOC = "M17"  ; 
-NET "RAM_LDn"  LOC = "M21"  ; 
-NET "RAM_OEn"  LOC = "M19"  ; 
-NET "RAM_WEn"  LOC = "M20"  ; 
-NET "SCL"  LOC = "A7"  ; 
-NET "SCL_force"  LOC = "E8"  ; 
-NET "sclk"  LOC = "K5"  ; 
-NET "sclk_rx_adc"  LOC = "J17"  ; 
-NET "sclk_rx_dac"  LOC = "J19"  ; 
-NET "sclk_rx_db"  LOC = "F19"  ; 
-NET "sclk_tx_adc"  LOC = "H1"  ; 
-NET "sclk_tx_dac"  LOC = "J5"  ; 
-NET "sclk_tx_db"  LOC = "D3"  ; 
-NET "SDA"  LOC = "D8"  ; 
-NET "SDA_force"  LOC = "C11"  ; 
-NET "sdi"  LOC = "J1"  ; 
-NET "sdi_rx_adc"  LOC = "H22"  ; 
-NET "sdi_rx_dac"  LOC = "J21"  ; 
-NET "sdi_rx_db"  LOC = "H19"  ; 
-NET "sdi_tx_adc"  LOC = "J4"  ; 
-NET "sdi_tx_dac"  LOC = "J6"  ; 
-NET "sdi_tx_db"  LOC = "G4"  ; 
-NET "sdo"  LOC = "J2"  ; 
-NET "sdo_rx_adc"  LOC = "H21"  ; 
-NET "sdo_rx_db"  LOC = "G20"  ; 
-NET "sdo_tx_adc"  LOC = "H2"  ; 
-NET "sdo_tx_db"  LOC = "G3"  ; 
-NET "sen_clk"  LOC = "K6"  ; 
-NET "sen_dac"  LOC = "L1"  ; 
-NET "sen_rx_adc"  LOC = "H18"  ; 
-NET "sen_rx_dac"  LOC = "J18"  ; 
-NET "sen_rx_db"  LOC = "D22"  ; 
-NET "sen_tx_adc"  LOC = "G2"  ; 
-NET "sen_tx_dac"  LOC = "H4"  ; 
-NET "sen_tx_db"  LOC = "C1"  ; 
-NET "ser_enable"  LOC = "W11"  ; 
-NET "ser_loopen"  LOC = "Y4"  ; 
-NET "ser_prbsen"  LOC = "AA3"  ; 
-NET "ser_rklsb"  LOC = "V9"  ; 
-NET "ser_rkmsb"  LOC = "Y10"  ; 
-NET "ser_rx_clk"  LOC = "AA11"  ; 
-NET "ser_rx_en"  LOC = "AB9"  ; 
-NET "ser_tklsb"  LOC = "U10" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
-NET "ser_tkmsb"  LOC = "U11" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
-NET "ser_tx_clk"  LOC = "U7" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
-NET "ser_t<0>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<1>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<2>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<3>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<4>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<5>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<6>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<7>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<8>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<9>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<10>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<11>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<12>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<13>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<14>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-NET "ser_t<15>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
-#PACE: Start of PACE Area Constraints
-
-#PACE: Start of PACE Prohibit Constraints
-
-#PACE: End of Constraints generated by PACE
diff --git a/usrp2/fpga/top/u2_fpga/u2_fpga_top.prj b/usrp2/fpga/top/u2_fpga/u2_fpga_top.prj
deleted file mode 100644 (file)
index 544415f..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-verilog work "../../opencores/uart16550/rtl/verilog/raminfr.v"
-verilog work "../../control_lib/ram_2port.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_tfifo.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_rfifo.v"
-verilog work "../../coregen/fifo_generator_v4_1.v"
-verilog work "../../control_lib/shortfifo.v"
-verilog work "../../control_lib/longfifo.v"
-verilog work "../../sdr_lib/sign_extend.v"
-verilog work "../../sdr_lib/cordic_stage.v"
-verilog work "../../sdr_lib/cic_int_shifter.v"
-verilog work "../../sdr_lib/cic_dec_shifter.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_transmitter.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_sync_flops.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_receiver.v"
-verilog work "../../opencores/i2c/rtl/verilog/i2c_master_bit_ctrl.v"
-verilog work "../../opencores/aemb/rtl/verilog/aeMB_xecu.v"
-verilog work "../../opencores/aemb/rtl/verilog/aeMB_regf.v"
-verilog work "../../opencores/aemb/rtl/verilog/aeMB_ibuf.v"
-verilog work "../../opencores/aemb/rtl/verilog/aeMB_ctrl.v"
-verilog work "../../opencores/aemb/rtl/verilog/aeMB_bpcu.v"
-verilog work "../../opencores/8b10b/encode_8b10b.v"
-verilog work "../../opencores/8b10b/decode_8b10b.v"
-verilog work "../../eth/rtl/verilog/miim/eth_shiftreg.v"
-verilog work "../../eth/rtl/verilog/miim/eth_outputcontrol.v"
-verilog work "../../eth/rtl/verilog/miim/eth_clockgen.v"
-verilog work "../../eth/rtl/verilog/Reg_int.v"
-verilog work "../../eth/rtl/verilog/RMON/RMON_ctrl.v"
-verilog work "../../eth/rtl/verilog/RMON/RMON_addr_gen.v"
-verilog work "../../eth/rtl/verilog/MAC_tx/Random_gen.v"
-verilog work "../../eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v"
-verilog work "../../eth/rtl/verilog/MAC_tx/MAC_tx_addr_add.v"
-verilog work "../../eth/rtl/verilog/MAC_tx/MAC_tx_FF.v"
-verilog work "../../eth/rtl/verilog/MAC_tx/CRC_gen.v"
-verilog work "../../eth/rtl/verilog/MAC_rx/MAC_rx_ctrl.v"
-verilog work "../../eth/rtl/verilog/MAC_rx/MAC_rx_add_chk.v"
-verilog work "../../eth/rtl/verilog/MAC_rx/MAC_rx_FF.v"
-verilog work "../../eth/rtl/verilog/MAC_rx/CRC_chk.v"
-verilog work "../../eth/rtl/verilog/MAC_rx/Broadcast_filter.v"
-verilog work "../../control_lib/ss_rcvr.v"
-verilog work "../../control_lib/cascadefifo2.v"
-verilog work "../../control_lib/CRC16_D16.v"
-verilog work "../../timing/time_sender.v"
-verilog work "../../timing/time_receiver.v"
-verilog work "../../serdes/serdes_tx.v"
-verilog work "../../serdes/serdes_rx.v"
-verilog work "../../serdes/serdes_fc_tx.v"
-verilog work "../../serdes/serdes_fc_rx.v"
-verilog work "../../sdr_lib/round.v"
-verilog work "../../sdr_lib/cordic.v"
-verilog work "../../sdr_lib/cic_interp.v"
-verilog work "../../sdr_lib/cic_decim.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_wb.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_regs.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_debug_if.v"
-verilog work "../../opencores/spi/rtl/verilog/spi_shift.v"
-verilog work "../../opencores/spi/rtl/verilog/spi_clgen.v"
-verilog work "../../opencores/i2c/rtl/verilog/i2c_master_byte_ctrl.v"
-verilog work "../../opencores/aemb/rtl/verilog/aeMB_edk32.v"
-verilog work "../../eth/rtl/verilog/flow_ctrl_tx.v"
-verilog work "../../eth/rtl/verilog/flow_ctrl_rx.v"
-verilog work "../../eth/rtl/verilog/eth_miim.v"
-verilog work "../../eth/rtl/verilog/RMON.v"
-verilog work "../../eth/rtl/verilog/Phy_int.v"
-verilog work "../../eth/rtl/verilog/MAC_tx.v"
-verilog work "../../eth/rtl/verilog/MAC_rx.v"
-verilog work "../../eth/rtl/verilog/Clk_ctrl.v"
-verilog work "../../control_lib/strobe_gen.v"
-verilog work "../../control_lib/setting_reg.v"
-verilog work "../../control_lib/mux8.v"
-verilog work "../../control_lib/mux4.v"
-verilog work "../../control_lib/icache.v"
-verilog work "../../control_lib/dpram32.v"
-verilog work "../../control_lib/decoder_3_8.v"
-verilog work "../../control_lib/dcache.v"
-verilog work "../../control_lib/buffer_int.v"
-verilog work "../../timing/timer.v"
-verilog work "../../timing/time_sync.v"
-verilog work "../../serdes/serdes.v"
-verilog work "../../sdr_lib/tx_control.v"
-verilog work "../../sdr_lib/rx_control.v"
-verilog work "../../sdr_lib/dsp_core_tx.v"
-verilog work "../../sdr_lib/dsp_core_rx.v"
-verilog work "../../opencores/uart16550/rtl/verilog/uart_top.v"
-verilog work "../../opencores/spi/rtl/verilog/spi_top.v"
-verilog work "../../opencores/simple_pic/rtl/simple_pic.v"
-verilog work "../../opencores/i2c/rtl/verilog/i2c_master_top.v"
-verilog work "../../opencores/aemb/rtl/verilog/aeMB_core_BE.v"
-verilog work "../../eth/rtl/verilog/MAC_top.v"
-verilog work "../../eth/mac_txfifo_int.v"
-verilog work "../../eth/mac_rxfifo_int.v"
-verilog work "../../control_lib/wb_readback_mux.v"
-verilog work "../../control_lib/wb_1master.v"
-verilog work "../../control_lib/system_control.v"
-verilog work "../../control_lib/settings_bus.v"
-verilog work "../../control_lib/ram_loader.v"
-verilog work "../../control_lib/ram_harv_cache.v"
-verilog work "../../control_lib/nsgpio.v"
-verilog work "../../control_lib/extram_interface.v"
-verilog work "../../control_lib/buffer_pool.v"
-verilog work "../../control_lib/atr_controller.v"
-verilog work "../u2_basic/u2_basic.v"
-verilog work "u2_fpga_top.v"
diff --git a/usrp2/fpga/top/u2_fpga/u2_fpga_top.v b/usrp2/fpga/top/u2_fpga/u2_fpga_top.v
deleted file mode 100644 (file)
index 63798a0..0000000
+++ /dev/null
@@ -1,393 +0,0 @@
-`timescale 1ns / 1ps
-//////////////////////////////////////////////////////////////////////////////////
-
-module u2_fpga_top
-  (
-   // Misc, debug
-   output led1,
-   output led2,
-   output [31:0] debug,
-   output [1:0] debug_clk,
-
-   // Expansion
-   input exp_pps_in_p, // Diff
-   input exp_pps_in_n, // Diff
-   output exp_pps_out_p, // Diff 
-   output exp_pps_out_n, // Diff 
-   
-   // GMII
-   //   GMII-CTRL
-   input GMII_COL,
-   input GMII_CRS,
-
-   //   GMII-TX
-   output reg [7:0] GMII_TXD,
-   output reg GMII_TX_EN,
-   output reg GMII_TX_ER,
-   output GMII_GTX_CLK,
-   input GMII_TX_CLK,  // 100mbps clk
-
-   //   GMII-RX
-   input [7:0] GMII_RXD,
-   input GMII_RX_CLK,
-   input GMII_RX_DV,
-   input GMII_RX_ER,
-
-   //   GMII-Management
-   inout MDIO,
-   output MDC,
-   input PHY_INTn,   // open drain
-   output PHY_RESETn,
-   input PHY_CLK,   // possibly use on-board osc
-
-   // RAM
-   inout [17:0] RAM_D,
-   output [18:0] RAM_A,
-   output RAM_CE1n,
-   output RAM_CENn,
-   output RAM_CLK,
-   output RAM_WEn,
-   output RAM_OEn,
-   output RAM_LDn,
-   
-   // SERDES
-   output ser_enable,
-   output ser_prbsen,
-   output ser_loopen,
-   output ser_rx_en,
-   
-   output ser_tx_clk,
-   output reg [15:0] ser_t,
-   output reg ser_tklsb,
-   output reg ser_tkmsb,
-
-   input ser_rx_clk,
-   input [15:0] ser_r,
-   input ser_rklsb,
-   input ser_rkmsb,
-   
-   // CPLD interface
-   output cpld_start,  // AA9
-   output cpld_mode,   // U12
-   output cpld_done,   // V12
-   input cpld_din,     // AA14 Now shared with CFG_Din
-   input cpld_clk,     // AB14 serial clock
-
-   // ADC
-   input [13:0] adc_a,
-   input adc_ovf_a,
-   output adc_oen_a,
-   output adc_pdn_a,
-   
-   input [13:0] adc_b,
-   input adc_ovf_b,
-   output adc_oen_b,
-   output adc_pdn_b,
-   
-   // DAC
-   output [15:0] dac_a,
-   output [15:0] dac_b,
-
-   // I2C
-   inout SCL,
-   inout SDA,
-   input SCL_force,
-   input SDA_force,
-
-   // Clock Gen Control
-   output [1:0] clk_en,
-   output [1:0] clk_sel,
-   input clk_func,        // FIXME is an input to control the 9510
-   input clk_status,
-
-   // Clocks
-   input clk_fpga_p,  // Diff
-   input clk_fpga_n,  // Diff
-   input clk_to_mac,
-   input pps_in,
-   
-   // Generic SPI
-   output sclk,
-   output sen_clk,
-   output sen_dac,
-   output sdi,
-   input sdo,
-   
-   // TX DBoard
-   output sen_tx_db,
-   output sclk_tx_db,
-   input sdo_tx_db,
-   output sdi_tx_db,
-
-   output sen_tx_adc,
-   output sclk_tx_adc,
-   input sdo_tx_adc,
-   output sdi_tx_adc,
-
-   output sen_tx_dac,
-   output sclk_tx_dac,
-   output sdi_tx_dac,
-
-   inout [15:0] io_tx,
-
-   // RX DBoard
-   output sen_rx_db,
-   output sclk_rx_db,
-   input sdo_rx_db,
-   output sdi_rx_db,
-
-   output sen_rx_adc,
-   output sclk_rx_adc,
-   input sdo_rx_adc,
-   output sdi_rx_adc,
-
-   output sen_rx_dac,
-   output sclk_rx_dac,
-   output sdi_rx_dac,
-   
-   inout [15:0] io_rx
-   );
-
-   // FPGA-specific pins connections
-   wire        aux_clk = PHY_CLK;
-   //wire      cpld_detached = RAM_A[14]; // FIXME  Hacked on with Blue Wire
-   wire        cpld_detached = SDA_force; // FIXME  Hacked on with Blue Wire
-
-   wire        clk_fpga, dsp_clk, clk_div, dcm_out, wb_clk, clock_ready;
-
-   IBUFGDS clk_fpga_pin (.O(clk_fpga),.I(clk_fpga_p),.IB(clk_fpga_n));
-   defparam    clk_fpga_pin.IOSTANDARD = "LVPECL_25";
-   
-   wire        exp_pps_in;
-   IBUFDS exp_pps_in_pin (.O(exp_pps_in),.I(exp_pps_in_p),.IB(exp_pps_in_n));
-   defparam    exp_pps_in_pin.IOSTANDARD = "LVDS_25";
-   
-   wire        exp_pps_out;
-   OBUFDS exp_pps_out_pin (.O(exp_pps_out_p),.OB(exp_pps_out_n),.I(exp_pps_out));
-   defparam    exp_pps_out_pin.IOSTANDARD = "LVDS_25";
-
-   reg [5:0]   clock_ready_d;
-   always @(posedge aux_clk)
-     clock_ready_d[5:0] <= {clock_ready_d[4:0],clock_ready};
-
-   wire        dcm_rst = ~&clock_ready_d & |clock_ready_d;
-   wire        clk_muxed = clock_ready ? clk_fpga : aux_clk;
-
-   wire        adc_on_a, adc_on_b, adc_oe_a, adc_oe_b;
-   assign      adc_oen_a = ~adc_oe_a;
-   assign      adc_oen_b = ~adc_oe_b;
-   assign      adc_pdn_a = ~adc_on_a;  
-   assign      adc_pdn_b = ~adc_on_b;  
-
-   // Handle Clocks
-   DCM DCM_INST (.CLKFB(dsp_clk), 
-                 .CLKIN(clk_muxed), 
-                 .DSSEN(0), 
-                 .PSCLK(0), 
-                 .PSEN(0), 
-                 .PSINCDEC(0), 
-                 .RST(dcm_rst), 
-                 .CLKDV(clk_div), 
-                 .CLKFX(), 
-                 .CLKFX180(), 
-                 .CLK0(dcm_out), 
-                 .CLK2X(), 
-                 .CLK2X180(), 
-                 .CLK90(), 
-                 .CLK180(), 
-                 .CLK270(), 
-                 .LOCKED(LOCKED_OUT), 
-                 .PSDONE(), 
-                 .STATUS());
-   defparam DCM_INST.CLK_FEEDBACK = "1X";
-   defparam DCM_INST.CLKDV_DIVIDE = 2.0;
-   defparam DCM_INST.CLKFX_DIVIDE = 1;
-   defparam DCM_INST.CLKFX_MULTIPLY = 4;
-   defparam DCM_INST.CLKIN_DIVIDE_BY_2 = "FALSE";
-   defparam DCM_INST.CLKIN_PERIOD = 10.000;
-   defparam DCM_INST.CLKOUT_PHASE_SHIFT = "NONE";
-   defparam DCM_INST.DESKEW_ADJUST = "SYSTEM_SYNCHRONOUS";
-   defparam DCM_INST.DFS_FREQUENCY_MODE = "LOW";
-   defparam DCM_INST.DLL_FREQUENCY_MODE = "LOW";
-   defparam DCM_INST.DUTY_CYCLE_CORRECTION = "TRUE";
-   defparam DCM_INST.FACTORY_JF = 16'h8080;
-   defparam DCM_INST.PHASE_SHIFT = 0;
-   defparam DCM_INST.STARTUP_WAIT = "FALSE";
-
-   BUFG dspclk_BUFG (.I(dcm_out), .O(dsp_clk));
-   BUFG wbclk_BUFG (.I(clk_div), .O(wb_clk));
-
-   // I2C -- Don't use external transistors for open drain, the FPGA implements this
-   IOBUF scl_pin(.O(scl_pad_i), .IO(SCL), .I(scl_pad_o), .T(scl_pad_oen_o));
-   IOBUF sda_pin(.O(sda_pad_i), .IO(SDA), .I(sda_pad_o), .T(sda_pad_oen_o));
-
-   // LEDs are active low outputs
-   wire        led1_int, led2_int;
-   assign      led1 = ~led1_int;
-   assign      led2 = ~led2_int;
-
-   // SPI
-   wire        miso, mosi, sclk_int;
-   assign      {sclk,sdi} = (~sen_clk | ~sen_dac) ? {sclk_int,mosi} : 2'b0;
-   assign      {sclk_tx_db,sdi_tx_db} = ~sen_tx_db ? {sclk_int,mosi} : 2'b0;
-   assign      {sclk_tx_dac,sdi_tx_dac} = ~sen_tx_dac ? {sclk_int,mosi} : 2'b0;
-   assign      {sclk_tx_adc,sdi_tx_adc} = ~sen_tx_adc ? {sclk_int,mosi} : 2'b0;
-   assign      {sclk_rx_db,sdi_rx_db} = ~sen_rx_db ? {sclk_int,mosi} : 2'b0;
-   assign      {sclk_rx_dac,sdi_rx_dac} = ~sen_rx_dac ? {sclk_int,mosi} : 2'b0;
-   assign      {sclk_rx_adc,sdi_rx_adc} = ~sen_rx_adc ? {sclk_int,mosi} : 2'b0;
-   
-   assign      miso = (~sen_clk & sdo) | (~sen_dac & sdo) | 
-               (~sen_tx_db & sdo_tx_db) | (~sen_tx_adc & sdo_tx_adc) |
-               (~sen_rx_db & sdo_rx_db) | (~sen_rx_adc & sdo_rx_adc);
-
-   wire        GMII_TX_EN_unreg, GMII_TX_ER_unreg;
-   wire [7:0]  GMII_TXD_unreg;
-   wire        GMII_GTX_CLK_int;
-   
-   always @(posedge GMII_GTX_CLK_int)
-     begin
-       GMII_TX_EN <= GMII_TX_EN_unreg;
-       GMII_TX_ER <= GMII_TX_ER_unreg;
-       GMII_TXD <= GMII_TXD_unreg;
-     end
-
-   OFDDRRSE OFDDRRSE_gmii_inst 
-     (.Q(GMII_GTX_CLK),      // Data output (connect directly to top-level port)
-      .C0(GMII_GTX_CLK_int),    // 0 degree clock input
-      .C1(~GMII_GTX_CLK_int),    // 180 degree clock input
-      .CE(1),    // Clock enable input
-      .D0(0),    // Posedge data input
-      .D1(1),    // Negedge data input
-      .R(0),      // Synchronous reset input
-      .S(0)       // Synchronous preset input
-      );
-   
-   wire ser_tklsb_unreg, ser_tkmsb_unreg;
-   wire [15:0] ser_t_unreg;
-   wire        ser_tx_clk_int;
-   
-   always @(posedge ser_tx_clk_int)
-     begin
-       ser_tklsb <= ser_tklsb_unreg;
-       ser_tkmsb <= ser_tkmsb_unreg;
-       ser_t <= ser_t_unreg;
-     end
-
-   assign ser_tx_clk = clk_fpga;
-
-   reg [15:0] ser_r_int;
-   reg               ser_rklsb_int, ser_rkmsb_int;
-
-   always @(posedge ser_rx_clk)
-     begin
-       ser_r_int <= ser_r;
-       ser_rklsb_int <= ser_rklsb;
-       ser_rkmsb_int <= ser_rkmsb;
-     end
-   
-   /*
-   OFDDRRSE OFDDRRSE_serdes_inst 
-     (.Q(ser_tx_clk),      // Data output (connect directly to top-level port)
-      .C0(ser_tx_clk_int),    // 0 degree clock input
-      .C1(~ser_tx_clk_int),    // 180 degree clock input
-      .CE(1),    // Clock enable input
-      .D0(0),    // Posedge data input
-      .D1(1),    // Negedge data input
-      .R(0),      // Synchronous reset input
-      .S(0)       // Synchronous preset input
-      );
-   */
-   u2_basic u2_basic(.dsp_clk           (dsp_clk),
-                    .wb_clk            (wb_clk),
-                    .clock_ready       (clock_ready),
-                    .clk_to_mac        (clk_to_mac),
-                    .pps_in            (pps_in),
-                    .led1              (led1_int),
-                    .led2              (led2_int),
-                    .debug             (debug[31:0]),
-                    .debug_clk         (debug_clk[1:0]),
-                    .exp_pps_in        (exp_pps_in),
-                    .exp_pps_out       (exp_pps_out),
-                    .GMII_COL          (GMII_COL),
-                    .GMII_CRS          (GMII_CRS),
-                    .GMII_TXD          (GMII_TXD_unreg[7:0]),
-                    .GMII_TX_EN        (GMII_TX_EN_unreg),
-                    .GMII_TX_ER        (GMII_TX_ER_unreg),
-                    .GMII_GTX_CLK      (GMII_GTX_CLK_int),
-                    .GMII_TX_CLK       (GMII_TX_CLK),
-                    .GMII_RXD          (GMII_RXD[7:0]),
-                    .GMII_RX_CLK       (GMII_RX_CLK),
-                    .GMII_RX_DV        (GMII_RX_DV),
-                    .GMII_RX_ER        (GMII_RX_ER),
-                    .MDIO              (MDIO),
-                    .MDC               (MDC),
-                    .PHY_INTn          (PHY_INTn),
-                    .PHY_RESETn        (PHY_RESETn),
-                    .PHY_CLK           (PHY_CLK),
-                    .ser_enable        (ser_enable),
-                    .ser_prbsen        (ser_prbsen),
-                    .ser_loopen        (ser_loopen),
-                    .ser_rx_en         (ser_rx_en),
-                    .ser_tx_clk        (ser_tx_clk_int),
-                    .ser_t             (ser_t_unreg[15:0]),
-                    .ser_tklsb         (ser_tklsb_unreg),
-                    .ser_tkmsb         (ser_tkmsb_unreg),
-                    .ser_rx_clk        (ser_rx_clk),
-                    .ser_r             (ser_r_int[15:0]),
-                    .ser_rklsb         (ser_rklsb_int),
-                    .ser_rkmsb         (ser_rkmsb_int),
-                    .cpld_start        (cpld_start),
-                    .cpld_mode         (cpld_mode),
-                    .cpld_done         (cpld_done),
-                    .cpld_din          (cpld_din),
-                    .cpld_clk          (cpld_clk),
-                    .cpld_detached     (cpld_detached),
-                    .adc_a             (adc_a[13:0]),
-                    .adc_ovf_a         (adc_ovf_a),
-                    .adc_on_a          (adc_on_a),
-                    .adc_oe_a          (adc_oe_a),
-                    .adc_b             (adc_b[13:0]),
-                    .adc_ovf_b         (adc_ovf_b),
-                    .adc_on_b          (adc_on_b),
-                    .adc_oe_b          (adc_oe_b),
-                    .dac_a             (dac_a[15:0]),
-                    .dac_b             (dac_b[15:0]),
-                    .scl_pad_i         (scl_pad_i),
-                    .scl_pad_o         (scl_pad_o),
-                    .scl_pad_oen_o     (scl_pad_oen_o),
-                    .sda_pad_i         (sda_pad_i),
-                    .sda_pad_o         (sda_pad_o),
-                    .sda_pad_oen_o     (sda_pad_oen_o),
-                    .clk_en            (clk_en[1:0]),
-                    .clk_sel           (clk_sel[1:0]),
-                    .clk_func          (clk_func),
-                    .clk_status        (clk_status),
-                    .sclk              (sclk_int),
-                    .mosi              (mosi),
-                    .miso              (miso),
-                    .sen_clk           (sen_clk),
-                    .sen_dac           (sen_dac),
-                    .sen_tx_db         (sen_tx_db),
-                    .sen_tx_adc        (sen_tx_adc),
-                    .sen_tx_dac        (sen_tx_dac),
-                    .sen_rx_db         (sen_rx_db),
-                    .sen_rx_adc        (sen_rx_adc),
-                    .sen_rx_dac        (sen_rx_dac),
-                    .io_tx             (io_tx[15:0]),
-                    .io_rx             (io_rx[15:0]),
-                    .RAM_D             (RAM_D),
-                    .RAM_A             (RAM_A),
-                    .RAM_CE1n          (RAM_CE1n),
-                    .RAM_CENn          (RAM_CENn),
-                    .RAM_CLK           (RAM_CLK),
-                    .RAM_WEn           (RAM_WEn),
-                    .RAM_OEn           (RAM_OEn),
-                    .RAM_LDn           (RAM_LDn), 
-                    .uart_tx_o         (),
-                    .uart_rx_i         (),
-                    .uart_baud_o       (),
-                    .sim_mode          (1'b0),
-                    .clock_divider     (2)
-                    );
-   
-endmodule // u2_fpga_top
diff --git a/usrp2/fpga/top/u2_rev1/.gitignore b/usrp2/fpga/top/u2_rev1/.gitignore
new file mode 100644 (file)
index 0000000..de5b502
--- /dev/null
@@ -0,0 +1,52 @@
+/templates
+/netgen
+/_ngo
+/_xmsgs
+/_pace.ucf
+/*.cmd
+/*.ibs
+/*.lfp
+/*.mfp
+/*.bit
+/*.bin
+/*.stx
+/*.par
+/*.unroutes
+/*.ntrc_log
+/*.ngr
+/*.mrp
+/*.html
+/*.lso
+/*.twr
+/*.bld
+/*.ncd
+/*.txt
+/*.cmd_log
+/*.drc
+/*.map
+/*.twr
+/*.xml
+/*.syr
+/*.ngm
+/*.xst
+/*.csv
+/*.html
+/*.lock
+/*.ncd
+/*.twx
+/*.ise_ISE_Backup
+/*.xml
+/*.ut
+/*.xpi
+/*.ngd
+/*.ncd
+/*.pad
+/*.bgn
+/*.ngc
+/*.pcf
+/*.ngd
+/xst
+/*.log
+/*.rpt
+/*.cel
+/*.restore
diff --git a/usrp2/fpga/top/u2_rev1/Makefile b/usrp2/fpga/top/u2_rev1/Makefile
new file mode 100644 (file)
index 0000000..b3245d8
--- /dev/null
@@ -0,0 +1,129 @@
+FILENAME=u2_fpga_top
+PARTNUM=xc3s1500-5fg456
+
+all: project command xst ngd ncd ncd2 bit 
+
+xst: 
+       xst -ifn ${FILENAME}.cmd -ofn xst.log
+
+ngd: 
+       ngdbuild -nt timestamp -p ${PARTNUM} ${FILENAME}
+
+ncd: 
+       rm -rf ${FILENAME}.ncd
+       map -detail -cm speed -k 8 -retiming on -equivalent_register_removal on -timing -ol high -pr b -p ${PARTNUM} ${FILENAME}.ngd -o ${FILENAME}.ncd ${FILENAME}.pcf
+
+# Place and route ncd file into new ncd file
+ncd2:  
+       par -ol high -xe n -w ${FILENAME}.ncd ${FILENAME} ${FILENAME}.pcf
+
+bit:   
+       bitgen -w ${FILENAME}.ncd -b ${FILENAME}.bit
+
+clean:
+       @rm -rf ${FILENAME}.ngc *.lst *.bit *.lso *.xst *.stx *.syr \
+       *.ngr *.cmd_log _ngc _xmsgs xst *.html *.srp \
+       *.blc *.bld *.ise_ISE_Backup *~ \
+       *.pad *.ngm *.ngd *.par *.pcf *.unroutes     \
+       *.xpi *.bgn *.drc *.bin *.mrp *.csv *.txt    \
+       *.rbt *.ncd ${FILENAME} *_cg templates/ tmp/ \
+        output.dat coregen.log *.ngo *.log ${FILENAME}.map \
+       ${FILENAME}_summary.xml ${FILENAME}_usage.xml ${FILENAME}.twr
+
+command:
+       rm -rf ${FILENAME}.cmd
+       @echo "identification"       >> ${FILENAME}.cmd
+       @echo "status"               >> ${FILENAME}.cmd
+       @echo "time short"           >> ${FILENAME}.cmd
+       @echo "memory on"            >> ${FILENAME}.cmd
+       @echo "run "                 >> ${FILENAME}.cmd
+       @echo "-top ${FILENAME}"     >> ${FILENAME}.cmd
+       @echo "-ifn ${FILENAME}.prj" >> ${FILENAME}.cmd
+       @echo "-ifmt Verilog "       >> ${FILENAME}.cmd
+       @echo "-ofn ${FILENAME} "    >> ${FILENAME}.cmd
+       @echo "-p ${PARTNUM}"        >> ${FILENAME}.cmd
+       @echo "-bufg 6"              >> ${FILENAME}.cmd
+       @echo "-vlgincdir { ../../opencores/i2c/rtl/verilog ../../eth/rtl/verilog/ ../../opencores/spi/rtl/verilog}"  >> ${FILENAME}.cmd
+
+project:
+       rm -f ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/TECH/duram.v" '                          >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/sign_extend.v" '                                 >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/cordic_stage.v" '                                >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/cic_int_shifter.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/cic_dec_shifter.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../../opencores/i2c/rtl/verilog/i2c_master_bit_ctrl.v" '       >> ${FILENAME}.prj
+       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_regfile.v" '             >> ${FILENAME}.prj
+       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_fetch.v" '               >> ${FILENAME}.prj
+       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_decode.v" '              >> ${FILENAME}.prj
+       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_control.v" '             >> ${FILENAME}.prj
+       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_aslu.v" '                >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/miim/eth_shiftreg.v" '                   >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/miim/eth_outputcontrol.v" '              >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/miim/eth_clockgen.v" '                   >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/TECH/eth_clk_switch.v" '                 >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/TECH/eth_clk_div2.v" '                   >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/Reg_int.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/RMON/RMON_dpram.v" '                     >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/RMON/RMON_ctrl.v" '                      >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/RMON/RMON_addr_gen.v" '                  >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_tx/flow_ctrl.v" '                    >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_tx/Ramdon_gen.v" '                   >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v" '                  >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_tx/MAC_tx_addr_add.v" '              >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_tx/MAC_tx_FF.v" '                    >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_tx/CRC_gen.v" '                      >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_rx/MAC_rx_ctrl.v" '                  >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_rx/MAC_rx_add_chk.v" '               >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_rx/MAC_rx_FF.v" '                    >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_rx/CRC_chk.v" '                      >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_rx/Broadcast_filter.v" '             >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/ram_2port.v" '                               >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/cordic.v" '                                      >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/cic_interp.v" '                                  >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/cic_decim.v" '                                   >> ${FILENAME}.prj
+       @echo '`include "../../opencores/spi/rtl/verilog/spi_shift.v" '                 >> ${FILENAME}.prj
+       @echo '`include "../../opencores/spi/rtl/verilog/spi_clgen.v" '                 >> ${FILENAME}.prj
+       @echo '`include "../../opencores/i2c/rtl/verilog/i2c_master_byte_ctrl.v" '      >> ${FILENAME}.prj
+       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_core.v" '                >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/eth_miim.v" '                            >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/RMON.v" '                                >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/Phy_int.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_tx.v" '                              >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_rx.v" '                              >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/Clk_ctrl.v" '                            >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/strobe_gen.v" '                              >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/ss_rcvr.v" '                                 >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/shortfifo.v" '                               >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/setting_reg.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/mux8.v" '                                    >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/mux4.v" '                                    >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/longfifo.v" '                                >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/decoder_3_8.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/buffer_int.v" '                              >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/CRC16_D16.v" '                               >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/tx_control.v" '                                  >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/rx_control.v" '                                  >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/dsp_core_tx.v" '                                 >> ${FILENAME}.prj
+       @echo '`include "../../sdr_lib/dsp_core_rx.v" '                                 >> ${FILENAME}.prj
+       @echo '`include "../../opencores/spi/rtl/verilog/spi_top.v" '                   >> ${FILENAME}.prj
+       @echo '`include "../../opencores/simple_pic/rtl/simple_pic.v" '                 >> ${FILENAME}.prj
+       @echo '`include "../../opencores/i2c/rtl/verilog/i2c_master_top.v" '            >> ${FILENAME}.prj
+       @echo '`include "../../opencores/aemb/rtl/verilog/aeMB_core_BE.v" '             >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/MAC_top.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../../eth/mac_txfifo_int.v" '                                  >> ${FILENAME}.prj
+       @echo '`include "../../eth/mac_rxfifo_int.v" '                                  >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/wb_readback_mux.v" '                         >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/wb_1master.v" '                              >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/timer.v" '                                   >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/system_control.v" '                          >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/settings_bus.v" '                            >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/serdes_tx.v" '                               >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/serdes_rx.v" '                               >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/ram_wb_harvard.v" '                          >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/ram_loader.v" '                              >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/nsgpio.v" '                                  >> ${FILENAME}.prj
+       @echo '`include "../../control_lib/buffer_pool.v" '                             >> ${FILENAME}.prj
+       @echo '`include "../u2_basic/u2_basic.v" '                                      >> ${FILENAME}.prj
+       @echo '`include "u2_fpga_top.v" '                                               >> ${FILENAME}.prj
+       @echo '`include "../../eth/rtl/verilog/elastic_buffer.v" '                      >> ${FILENAME}.prj
diff --git a/usrp2/fpga/top/u2_rev1/u2_fpga.ise b/usrp2/fpga/top/u2_rev1/u2_fpga.ise
new file mode 100644 (file)
index 0000000..f90caf0
Binary files /dev/null and b/usrp2/fpga/top/u2_rev1/u2_fpga.ise differ
diff --git a/usrp2/fpga/top/u2_rev1/u2_fpga.ucf b/usrp2/fpga/top/u2_rev1/u2_fpga.ucf
new file mode 100755 (executable)
index 0000000..5d21248
--- /dev/null
@@ -0,0 +1,341 @@
+NET "adc_a[0]"  LOC = "A14"  ;
+NET "adc_a[10]"  LOC = "D20"  ;
+NET "adc_a[11]"  LOC = "D19"  ;
+NET "adc_a[12]"  LOC = "D21"  ;
+NET "adc_a[13]"  LOC = "E18"  ;
+NET "adc_a[1]"  LOC = "B14"  ;
+NET "adc_a[2]"  LOC = "C13"  ;
+NET "adc_a[3]"  LOC = "D13"  ;
+NET "adc_a[4]"  LOC = "A13"  ;
+NET "adc_a[5]"  LOC = "B13"  ;
+NET "adc_a[6]"  LOC = "E12"  ;
+NET "adc_a[7]"  LOC = "C22"  ;
+NET "adc_a[8]"  LOC = "C20"  ;
+NET "adc_a[9]"  LOC = "C21"  ;
+NET "adc_b[0]"  LOC = "A12"  ;
+NET "adc_b[10]"  LOC = "D18"  ;
+NET "adc_b[11]"  LOC = "B18"  ;
+NET "adc_b[12]"  LOC = "D17"  ;
+NET "adc_b[13]"  LOC = "E17"  ;
+NET "adc_b[1]"  LOC = "E16"  ;
+NET "adc_b[2]"  LOC = "F12"  ;
+NET "adc_b[3]"  LOC = "F13"  ;
+NET "adc_b[4]"  LOC = "F16"  ;
+NET "adc_b[5]"  LOC = "F17"  ;
+NET "adc_b[6]"  LOC = "C19"  ;
+NET "adc_b[7]"  LOC = "B20"  ;
+NET "adc_b[8]"  LOC = "B19"  ;
+NET "adc_b[9]"  LOC = "C18"  ;
+NET "clk_en[0]"  LOC = "C4"  ;
+NET "clk_en[1]"  LOC = "D1"  ;
+NET "clk_sel[0]"  LOC = "C3"  ;
+NET "clk_sel[1]"  LOC = "C2"  ;
+NET "dac_a[0]"  LOC = "A5"  ;
+NET "dac_a[10]"  LOC = "L2"  ;
+NET "dac_a[11]"  LOC = "L4"  ;
+NET "dac_a[12]"  LOC = "L3"  ;
+NET "dac_a[13]"  LOC = "L6"  ;
+NET "dac_a[14]"  LOC = "L5"  ;
+NET "dac_a[15]"  LOC = "K2"  ;
+NET "dac_a[1]"  LOC = "B5"  ;
+NET "dac_a[2]"  LOC = "C5"  ;
+NET "dac_a[3]"  LOC = "D5"  ;
+NET "dac_a[4]"  LOC = "A4"  ;
+NET "dac_a[5]"  LOC = "B4"  ;
+NET "dac_a[6]"  LOC = "F6"  ;
+NET "dac_a[7]"  LOC = "D10"  ;
+NET "dac_a[8]"  LOC = "D9"  ;
+NET "dac_a[9]"  LOC = "A10"  ;
+NET "dac_b[0]"  LOC = "D11"  ;
+NET "dac_b[10]"  LOC = "F9"  ;
+NET "dac_b[11]"  LOC = "A8"  ;
+NET "dac_b[12]"  LOC = "B8"  ;
+NET "dac_b[13]"  LOC = "D7"  ;
+NET "dac_b[14]"  LOC = "E7"  ;
+NET "dac_b[15]"  LOC = "B6"  ;
+NET "dac_b[1]"  LOC = "E11"  ;
+NET "dac_b[2]"  LOC = "F11"  ;
+NET "dac_b[3]"  LOC = "B10"  ;
+NET "dac_b[4]"  LOC = "C10"  ;
+NET "dac_b[5]"  LOC = "E10"  ;
+NET "dac_b[6]"  LOC = "F10"  ;
+NET "dac_b[7]"  LOC = "A9"  ;
+NET "dac_b[8]"  LOC = "B9"  ;
+NET "dac_b[9]"  LOC = "E9"  ;
+NET "debug[0]"  LOC = "N5"  ;
+NET "debug[10]"  LOC = "R4"  ;
+NET "debug[11]"  LOC = "T3"  ;
+NET "debug[12]"  LOC = "U3"  ;
+NET "debug[13]"  LOC = "M2"  ;
+NET "debug[14]"  LOC = "M3"  ;
+NET "debug[15]"  LOC = "M4"  ;
+NET "debug[16]"  LOC = "M5"  ;
+NET "debug[17]"  LOC = "M6"  ;
+NET "debug[18]"  LOC = "N1"  ;
+NET "debug[19]"  LOC = "N2"  ;
+NET "debug[1]"  LOC = "N6"  ;
+NET "debug[20]"  LOC = "N3"  ;
+NET "debug[21]"  LOC = "T1"  ;
+NET "debug[22]"  LOC = "T2"  ;
+NET "debug[23]"  LOC = "U2"  ;
+NET "debug[24]"  LOC = "T4"  ;
+NET "debug[25]"  LOC = "U4"  ;
+NET "debug[26]"  LOC = "T5"  ;
+NET "debug[27]"  LOC = "T6"  ;
+NET "debug[28]"  LOC = "U5"  ;
+NET "debug[29]"  LOC = "V5"  ;
+NET "debug[2]"  LOC = "P1"  ;
+NET "debug[30]"  LOC = "W2"  ;
+NET "debug[31]"  LOC = "W3"  ;
+NET "debug[3]"  LOC = "P2"  ;
+NET "debug[4]"  LOC = "P4"  ;
+NET "debug[5]"  LOC = "P5"  ;
+NET "debug[6]"  LOC = "R1"  ;
+NET "debug[7]"  LOC = "R2"  ;
+NET "debug[8]"  LOC = "P6"  ;
+NET "debug[9]"  LOC = "R5"  ;
+NET "debug_clk[0]"  LOC = "N4"  ;
+NET "debug_clk[1]"  LOC = "M1"  ;
+NET "GMII_RXD[0]"  LOC = "AA15"  ;
+NET "GMII_RXD[1]"  LOC = "AB15"  ;
+NET "GMII_RXD[2]"  LOC = "U14"  ;
+NET "GMII_RXD[3]"  LOC = "V14"  ;
+NET "GMII_RXD[4]"  LOC = "U13"  ;
+NET "GMII_RXD[5]"  LOC = "V13"  ;
+NET "GMII_RXD[6]"  LOC = "Y13"  ;
+NET "GMII_RXD[7]"  LOC = "AA13"  ;
+NET "GMII_TXD[0]"  LOC = "W14"  ;
+NET "GMII_TXD[1]"  LOC = "AA20"  ;
+NET "GMII_TXD[2]"  LOC = "AB20"  ;
+NET "GMII_TXD[3]"  LOC = "Y18"  ;
+NET "GMII_TXD[4]"  LOC = "AA18"  ;
+NET "GMII_TXD[5]"  LOC = "AB18"  ;
+NET "GMII_TXD[6]"  LOC = "V17"  ;
+NET "GMII_TXD[7]"  LOC = "W17"  ;
+NET "io_rx[0]"  LOC = "L21"  ;
+NET "io_rx[10]"  LOC = "F21"  ;
+NET "io_rx[11]"  LOC = "F20"  ;
+NET "io_rx[12]"  LOC = "G19"  ;
+NET "io_rx[13]"  LOC = "G18"  ;
+NET "io_rx[14]"  LOC = "G17"  ;
+NET "io_rx[15]"  LOC = "E22"  ;
+NET "io_rx[1]"  LOC = "L20"  ;
+NET "io_rx[2]"  LOC = "L19"  ;
+NET "io_rx[3]"  LOC = "L18"  ;
+NET "io_rx[4]"  LOC = "L17"  ;
+NET "io_rx[5]"  LOC = "K22"  ;
+NET "io_rx[6]"  LOC = "K21"  ;
+NET "io_rx[7]"  LOC = "K20"  ;
+NET "io_rx[8]"  LOC = "G22"  ;
+NET "io_rx[9]"  LOC = "G21"  ;
+NET "io_tx[0]"  LOC = "K4"  ;
+NET "io_tx[10]"  LOC = "E1"  ;
+NET "io_tx[11]"  LOC = "E3"  ;
+NET "io_tx[12]"  LOC = "F4"  ;
+NET "io_tx[13]"  LOC = "D2"  ;
+NET "io_tx[14]"  LOC = "D4"  ;
+NET "io_tx[15]"  LOC = "E4"  ;
+NET "io_tx[1]"  LOC = "K3"  ;
+NET "io_tx[2]"  LOC = "G1"  ;
+NET "io_tx[3]"  LOC = "G5"  ;
+NET "io_tx[4]"  LOC = "H5"  ;
+NET "io_tx[5]"  LOC = "F3"  ;
+NET "io_tx[6]"  LOC = "F2"  ;
+NET "io_tx[7]"  LOC = "F5"  ;
+NET "io_tx[8]"  LOC = "G6"  ;
+NET "io_tx[9]"  LOC = "E2"  ;
+NET "RAM_A[0]"  LOC = "N22"  ;
+NET "RAM_A[10]"  LOC = "P18"  ;
+NET "RAM_A[11]"  LOC = "R19"  ;
+NET "RAM_A[12]"  LOC = "P19"  ;
+NET "RAM_A[13]"  LOC = "R21"  ;
+NET "RAM_A[14]"  LOC = "R22"  ;
+NET "RAM_A[15]"  LOC = "T19"  ;
+NET "RAM_A[16]"  LOC = "T20"  ;
+NET "RAM_A[17]"  LOC = "U20"  ;
+NET "RAM_A[18]"  LOC = "W19"  ;
+NET "RAM_A[1]"  LOC = "N20"  ;
+NET "RAM_A[2]"  LOC = "T21"  ;
+NET "RAM_A[3]"  LOC = "M22"  ;
+NET "RAM_A[4]"  LOC = "N19"  ;
+NET "RAM_A[5]"  LOC = "N17"  ;
+NET "RAM_A[6]"  LOC = "N18"  ;
+NET "RAM_A[7]"  LOC = "P21"  ;
+NET "RAM_A[8]"  LOC = "P22"  ;
+NET "RAM_A[9]"  LOC = "P17"  ;
+NET "RAM_D[0]"  LOC = "Y21"  ;
+NET "RAM_D[10]"  LOC = "V22"  ;
+NET "RAM_D[11]"  LOC = "V21"  ;
+NET "RAM_D[12]"  LOC = "T17"  ;
+NET "RAM_D[13]"  LOC = "U18"  ;
+NET "RAM_D[14]"  LOC = "U21"  ;
+NET "RAM_D[15]"  LOC = "R18"  ;
+NET "RAM_D[16]"  LOC = "T18"  ;
+NET "RAM_D[17]"  LOC = "T22"  ;
+NET "RAM_D[1]"  LOC = "Y20"  ;
+NET "RAM_D[2]"  LOC = "Y19"  ;
+NET "RAM_D[3]"  LOC = "W22"  ;
+NET "RAM_D[4]"  LOC = "Y22"  ;
+NET "RAM_D[5]"  LOC = "V19"  ;
+NET "RAM_D[6]"  LOC = "W21"  ;
+NET "RAM_D[7]"  LOC = "W20"  ;
+NET "RAM_D[8]"  LOC = "U19"  ;
+NET "RAM_D[9]"  LOC = "V20"  ;
+NET "ser_r[0]"  LOC = "AB10"  ;
+NET "ser_r[10]"  LOC = "W10"  ;
+NET "ser_r[11]"  LOC = "Y1"  ;
+NET "ser_r[12]"  LOC = "Y3"  ;
+NET "ser_r[13]"  LOC = "Y2"  ;
+NET "ser_r[14]"  LOC = "W4"  ;
+NET "ser_r[15]"  LOC = "W1"  ;
+NET "ser_r[1]"  LOC = "AA10"  ;
+NET "ser_r[2]"  LOC = "U9"  ;
+NET "ser_r[3]"  LOC = "U6"  ;
+NET "ser_r[4]"  LOC = "AB11"  ;
+NET "ser_r[5]"  LOC = "Y7"  ;
+NET "ser_r[6]"  LOC = "W7"  ;
+NET "ser_r[7]"  LOC = "AB7"  ;
+NET "ser_r[8]"  LOC = "AA7"  ;
+NET "ser_r[9]"  LOC = "W9"  ;
+NET "ser_t[0]"  LOC = "V7"  ;
+NET "ser_t[10]"  LOC = "AA6"  ;
+NET "ser_t[11]"  LOC = "Y6"  ;
+NET "ser_t[12]"  LOC = "W8"  ;
+NET "ser_t[13]"  LOC = "V8"  ;
+NET "ser_t[14]"  LOC = "AB8"  ;
+NET "ser_t[15]"  LOC = "AA8"  ;
+NET "ser_t[1]"  LOC = "V10"  ;
+NET "ser_t[2]"  LOC = "AB4"  ;
+NET "ser_t[3]"  LOC = "AA4"  ;
+NET "ser_t[4]"  LOC = "Y5"  ;
+NET "ser_t[5]"  LOC = "W5"  ;
+NET "ser_t[6]"  LOC = "AB5"  ;
+NET "ser_t[7]"  LOC = "AA5"  ;
+NET "ser_t[8]"  LOC = "W6"  ;
+NET "ser_t[9]"  LOC = "V6"  ;
+NET "clk_muxed" TNM_NET = "clk_muxed";
+TIMESPEC "TS_clk_muxed" = PERIOD "clk_muxed" 10 ns HIGH 50 %;
+NET "clk_to_mac" TNM_NET = "clk_to_mac";
+TIMESPEC "TS_clk_to_mac" = PERIOD "clk_to_mac" 8 ns HIGH 50 %;
+NET "cpld_clk" TNM_NET = "cpld_clk";
+TIMESPEC "TS_cpld_clk" = PERIOD "cpld_clk" 40 ns HIGH 50 %;
+NET "GMII_RX_CLK" TNM_NET = "GMII_RX_CLK";
+TIMESPEC "TS_GMII_RX_CLK" = PERIOD "GMII_RX_CLK" 8 ns HIGH 50 %;
+NET "ser_rx_clk" TNM_NET = "ser_rx_clk";
+TIMESPEC "TS_ser_rx_clk" = PERIOD "ser_rx_clk" 10 ns HIGH 50 %;
+#PACE: Start of Constraints generated by PACE
+
+#PACE: Start of PACE I/O Pin Assignments
+NET "adc_oen_a"  LOC = "E19"  ; 
+NET "adc_oen_b"  LOC = "C17"  ; 
+NET "adc_ovf_a"  LOC = "F18"  ; 
+NET "adc_ovf_b"  LOC = "B17"  ; 
+NET "adc_pdn_a"  LOC = "E20"  ; 
+NET "adc_pdn_b"  LOC = "D15"  ; 
+NET "clk_fpga_n"  LOC = "B11"  ; 
+NET "clk_fpga_p"  LOC = "A11"  ; 
+NET "clk_func"  LOC = "C12"  ; 
+NET "clk_status"  LOC = "B12"  ; 
+NET "clk_to_mac"  LOC = "AB12"  ; 
+NET "cpld_clk"  LOC = "AB14"  ; 
+NET "cpld_din"  LOC = "AA14"  ; 
+NET "cpld_done"  LOC = "V12"  ; 
+NET "cpld_mode"  LOC = "U12"  ; 
+NET "cpld_start"  LOC = "AA9"  ; 
+NET "exp_pps_in_n"  LOC = "V4"  ; 
+NET "exp_pps_in_p"  LOC = "V3"  ; 
+NET "exp_pps_out_n"  LOC = "V2"  ; 
+NET "exp_pps_out_p"  LOC = "V1"  ; 
+NET "GMII_COL"  LOC = "U16"  ; 
+NET "GMII_CRS"  LOC = "U17"  ; 
+NET "GMII_GTX_CLK"  LOC = "AA17" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
+NET "GMII_RX_CLK"  LOC = "W16"  ; 
+NET "GMII_RX_DV"  LOC = "AB16"  ; 
+NET "GMII_RX_ER"  LOC = "AA16"  ; 
+NET "GMII_TX_CLK"  LOC = "W13"  ; 
+NET "GMII_TX_EN"  LOC = "Y17" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
+NET "GMII_TX_ER"  LOC = "V16" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
+NET "GMII_TXD<0>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "GMII_TXD<1>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "GMII_TXD<2>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "GMII_TXD<3>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "GMII_TXD<4>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "GMII_TXD<5>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "GMII_TXD<6>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "GMII_TXD<7>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "led1"  LOC = "V11"  ; 
+NET "led2"  LOC = "Y12"  ; 
+NET "MDC"  LOC = "V18"  ; 
+NET "MDIO"  LOC = "Y16" | PULLUP ; 
+NET "PHY_CLK"  LOC = "V15"  ; 
+NET "PHY_INTn"  LOC = "AB13"  ; 
+NET "PHY_RESETn"  LOC = "AA19"  ; 
+NET "pps_in"  LOC = "Y11"  ; 
+NET "RAM_CE1n"  LOC = "N21"  ; 
+NET "RAM_CENn"  LOC = "M18"  ; 
+NET "RAM_CLK"  LOC = "M17"  ; 
+NET "RAM_LDn"  LOC = "M21"  ; 
+NET "RAM_OEn"  LOC = "M19"  ; 
+NET "RAM_WEn"  LOC = "M20"  ; 
+NET "SCL"  LOC = "A7"  ; 
+NET "SCL_force"  LOC = "E8"  ; 
+NET "sclk"  LOC = "K5"  ; 
+NET "sclk_rx_adc"  LOC = "J17"  ; 
+NET "sclk_rx_dac"  LOC = "J19"  ; 
+NET "sclk_rx_db"  LOC = "F19"  ; 
+NET "sclk_tx_adc"  LOC = "H1"  ; 
+NET "sclk_tx_dac"  LOC = "J5"  ; 
+NET "sclk_tx_db"  LOC = "D3"  ; 
+NET "SDA"  LOC = "D8"  ; 
+NET "SDA_force"  LOC = "C11"  ; 
+NET "sdi"  LOC = "J1"  ; 
+NET "sdi_rx_adc"  LOC = "H22"  ; 
+NET "sdi_rx_dac"  LOC = "J21"  ; 
+NET "sdi_rx_db"  LOC = "H19"  ; 
+NET "sdi_tx_adc"  LOC = "J4"  ; 
+NET "sdi_tx_dac"  LOC = "J6"  ; 
+NET "sdi_tx_db"  LOC = "G4"  ; 
+NET "sdo"  LOC = "J2"  ; 
+NET "sdo_rx_adc"  LOC = "H21"  ; 
+NET "sdo_rx_db"  LOC = "G20"  ; 
+NET "sdo_tx_adc"  LOC = "H2"  ; 
+NET "sdo_tx_db"  LOC = "G3"  ; 
+NET "sen_clk"  LOC = "K6"  ; 
+NET "sen_dac"  LOC = "L1"  ; 
+NET "sen_rx_adc"  LOC = "H18"  ; 
+NET "sen_rx_dac"  LOC = "J18"  ; 
+NET "sen_rx_db"  LOC = "D22"  ; 
+NET "sen_tx_adc"  LOC = "G2"  ; 
+NET "sen_tx_dac"  LOC = "H4"  ; 
+NET "sen_tx_db"  LOC = "C1"  ; 
+NET "ser_enable"  LOC = "W11"  ; 
+NET "ser_loopen"  LOC = "Y4"  ; 
+NET "ser_prbsen"  LOC = "AA3"  ; 
+NET "ser_rklsb"  LOC = "V9"  ; 
+NET "ser_rkmsb"  LOC = "Y10"  ; 
+NET "ser_rx_clk"  LOC = "AA11"  ; 
+NET "ser_rx_en"  LOC = "AB9"  ; 
+NET "ser_tklsb"  LOC = "U10" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
+NET "ser_tkmsb"  LOC = "U11" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
+NET "ser_tx_clk"  LOC = "U7" | IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ; 
+NET "ser_t<0>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<1>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<2>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<3>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<4>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<5>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<6>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<7>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<8>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<9>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<10>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<11>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<12>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<13>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<14>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+NET "ser_t<15>" IOSTANDARD = LVCMOS25  | DRIVE = 12  | SLEW = FAST ;
+#PACE: Start of PACE Area Constraints
+
+#PACE: Start of PACE Prohibit Constraints
+
+#PACE: End of Constraints generated by PACE
diff --git a/usrp2/fpga/top/u2_rev1/u2_fpga_top.prj b/usrp2/fpga/top/u2_rev1/u2_fpga_top.prj
new file mode 100644 (file)
index 0000000..544415f
--- /dev/null
@@ -0,0 +1,102 @@
+verilog work "../../opencores/uart16550/rtl/verilog/raminfr.v"
+verilog work "../../control_lib/ram_2port.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_tfifo.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_rfifo.v"
+verilog work "../../coregen/fifo_generator_v4_1.v"
+verilog work "../../control_lib/shortfifo.v"
+verilog work "../../control_lib/longfifo.v"
+verilog work "../../sdr_lib/sign_extend.v"
+verilog work "../../sdr_lib/cordic_stage.v"
+verilog work "../../sdr_lib/cic_int_shifter.v"
+verilog work "../../sdr_lib/cic_dec_shifter.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_transmitter.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_sync_flops.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_receiver.v"
+verilog work "../../opencores/i2c/rtl/verilog/i2c_master_bit_ctrl.v"
+verilog work "../../opencores/aemb/rtl/verilog/aeMB_xecu.v"
+verilog work "../../opencores/aemb/rtl/verilog/aeMB_regf.v"
+verilog work "../../opencores/aemb/rtl/verilog/aeMB_ibuf.v"
+verilog work "../../opencores/aemb/rtl/verilog/aeMB_ctrl.v"
+verilog work "../../opencores/aemb/rtl/verilog/aeMB_bpcu.v"
+verilog work "../../opencores/8b10b/encode_8b10b.v"
+verilog work "../../opencores/8b10b/decode_8b10b.v"
+verilog work "../../eth/rtl/verilog/miim/eth_shiftreg.v"
+verilog work "../../eth/rtl/verilog/miim/eth_outputcontrol.v"
+verilog work "../../eth/rtl/verilog/miim/eth_clockgen.v"
+verilog work "../../eth/rtl/verilog/Reg_int.v"
+verilog work "../../eth/rtl/verilog/RMON/RMON_ctrl.v"
+verilog work "../../eth/rtl/verilog/RMON/RMON_addr_gen.v"
+verilog work "../../eth/rtl/verilog/MAC_tx/Random_gen.v"
+verilog work "../../eth/rtl/verilog/MAC_tx/MAC_tx_ctrl.v"
+verilog work "../../eth/rtl/verilog/MAC_tx/MAC_tx_addr_add.v"
+verilog work "../../eth/rtl/verilog/MAC_tx/MAC_tx_FF.v"
+verilog work "../../eth/rtl/verilog/MAC_tx/CRC_gen.v"
+verilog work "../../eth/rtl/verilog/MAC_rx/MAC_rx_ctrl.v"
+verilog work "../../eth/rtl/verilog/MAC_rx/MAC_rx_add_chk.v"
+verilog work "../../eth/rtl/verilog/MAC_rx/MAC_rx_FF.v"
+verilog work "../../eth/rtl/verilog/MAC_rx/CRC_chk.v"
+verilog work "../../eth/rtl/verilog/MAC_rx/Broadcast_filter.v"
+verilog work "../../control_lib/ss_rcvr.v"
+verilog work "../../control_lib/cascadefifo2.v"
+verilog work "../../control_lib/CRC16_D16.v"
+verilog work "../../timing/time_sender.v"
+verilog work "../../timing/time_receiver.v"
+verilog work "../../serdes/serdes_tx.v"
+verilog work "../../serdes/serdes_rx.v"
+verilog work "../../serdes/serdes_fc_tx.v"
+verilog work "../../serdes/serdes_fc_rx.v"
+verilog work "../../sdr_lib/round.v"
+verilog work "../../sdr_lib/cordic.v"
+verilog work "../../sdr_lib/cic_interp.v"
+verilog work "../../sdr_lib/cic_decim.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_wb.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_regs.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_debug_if.v"
+verilog work "../../opencores/spi/rtl/verilog/spi_shift.v"
+verilog work "../../opencores/spi/rtl/verilog/spi_clgen.v"
+verilog work "../../opencores/i2c/rtl/verilog/i2c_master_byte_ctrl.v"
+verilog work "../../opencores/aemb/rtl/verilog/aeMB_edk32.v"
+verilog work "../../eth/rtl/verilog/flow_ctrl_tx.v"
+verilog work "../../eth/rtl/verilog/flow_ctrl_rx.v"
+verilog work "../../eth/rtl/verilog/eth_miim.v"
+verilog work "../../eth/rtl/verilog/RMON.v"
+verilog work "../../eth/rtl/verilog/Phy_int.v"
+verilog work "../../eth/rtl/verilog/MAC_tx.v"
+verilog work "../../eth/rtl/verilog/MAC_rx.v"
+verilog work "../../eth/rtl/verilog/Clk_ctrl.v"
+verilog work "../../control_lib/strobe_gen.v"
+verilog work "../../control_lib/setting_reg.v"
+verilog work "../../control_lib/mux8.v"
+verilog work "../../control_lib/mux4.v"
+verilog work "../../control_lib/icache.v"
+verilog work "../../control_lib/dpram32.v"
+verilog work "../../control_lib/decoder_3_8.v"
+verilog work "../../control_lib/dcache.v"
+verilog work "../../control_lib/buffer_int.v"
+verilog work "../../timing/timer.v"
+verilog work "../../timing/time_sync.v"
+verilog work "../../serdes/serdes.v"
+verilog work "../../sdr_lib/tx_control.v"
+verilog work "../../sdr_lib/rx_control.v"
+verilog work "../../sdr_lib/dsp_core_tx.v"
+verilog work "../../sdr_lib/dsp_core_rx.v"
+verilog work "../../opencores/uart16550/rtl/verilog/uart_top.v"
+verilog work "../../opencores/spi/rtl/verilog/spi_top.v"
+verilog work "../../opencores/simple_pic/rtl/simple_pic.v"
+verilog work "../../opencores/i2c/rtl/verilog/i2c_master_top.v"
+verilog work "../../opencores/aemb/rtl/verilog/aeMB_core_BE.v"
+verilog work "../../eth/rtl/verilog/MAC_top.v"
+verilog work "../../eth/mac_txfifo_int.v"
+verilog work "../../eth/mac_rxfifo_int.v"
+verilog work "../../control_lib/wb_readback_mux.v"
+verilog work "../../control_lib/wb_1master.v"
+verilog work "../../control_lib/system_control.v"
+verilog work "../../control_lib/settings_bus.v"
+verilog work "../../control_lib/ram_loader.v"
+verilog work "../../control_lib/ram_harv_cache.v"
+verilog work "../../control_lib/nsgpio.v"
+verilog work "../../control_lib/extram_interface.v"
+verilog work "../../control_lib/buffer_pool.v"
+verilog work "../../control_lib/atr_controller.v"
+verilog work "../u2_basic/u2_basic.v"
+verilog work "u2_fpga_top.v"
diff --git a/usrp2/fpga/top/u2_rev1/u2_fpga_top.v b/usrp2/fpga/top/u2_rev1/u2_fpga_top.v
new file mode 100644 (file)
index 0000000..63798a0
--- /dev/null
@@ -0,0 +1,393 @@
+`timescale 1ns / 1ps
+//////////////////////////////////////////////////////////////////////////////////
+
+module u2_fpga_top
+  (
+   // Misc, debug
+   output led1,
+   output led2,
+   output [31:0] debug,
+   output [1:0] debug_clk,
+
+   // Expansion
+   input exp_pps_in_p, // Diff
+   input exp_pps_in_n, // Diff
+   output exp_pps_out_p, // Diff 
+   output exp_pps_out_n, // Diff 
+   
+   // GMII
+   //   GMII-CTRL
+   input GMII_COL,
+   input GMII_CRS,
+
+   //   GMII-TX
+   output reg [7:0] GMII_TXD,
+   output reg GMII_TX_EN,
+   output reg GMII_TX_ER,
+   output GMII_GTX_CLK,
+   input GMII_TX_CLK,  // 100mbps clk
+
+   //   GMII-RX
+   input [7:0] GMII_RXD,
+   input GMII_RX_CLK,
+   input GMII_RX_DV,
+   input GMII_RX_ER,
+
+   //   GMII-Management
+   inout MDIO,
+   output MDC,
+   input PHY_INTn,   // open drain
+   output PHY_RESETn,
+   input PHY_CLK,   // possibly use on-board osc
+
+   // RAM
+   inout [17:0] RAM_D,
+   output [18:0] RAM_A,
+   output RAM_CE1n,
+   output RAM_CENn,
+   output RAM_CLK,
+   output RAM_WEn,
+   output RAM_OEn,
+   output RAM_LDn,
+   
+   // SERDES
+   output ser_enable,
+   output ser_prbsen,
+   output ser_loopen,
+   output ser_rx_en,
+   
+   output ser_tx_clk,
+   output reg [15:0] ser_t,
+   output reg ser_tklsb,
+   output reg ser_tkmsb,
+
+   input ser_rx_clk,
+   input [15:0] ser_r,
+   input ser_rklsb,
+   input ser_rkmsb,
+   
+   // CPLD interface
+   output cpld_start,  // AA9
+   output cpld_mode,   // U12
+   output cpld_done,   // V12
+   input cpld_din,     // AA14 Now shared with CFG_Din
+   input cpld_clk,     // AB14 serial clock
+
+   // ADC
+   input [13:0] adc_a,
+   input adc_ovf_a,
+   output adc_oen_a,
+   output adc_pdn_a,
+   
+   input [13:0] adc_b,
+   input adc_ovf_b,
+   output adc_oen_b,
+   output adc_pdn_b,
+   
+   // DAC
+   output [15:0] dac_a,
+   output [15:0] dac_b,
+
+   // I2C
+   inout SCL,
+   inout SDA,
+   input SCL_force,
+   input SDA_force,
+
+   // Clock Gen Control
+   output [1:0] clk_en,
+   output [1:0] clk_sel,
+   input clk_func,        // FIXME is an input to control the 9510
+   input clk_status,
+
+   // Clocks
+   input clk_fpga_p,  // Diff
+   input clk_fpga_n,  // Diff
+   input clk_to_mac,
+   input pps_in,
+   
+   // Generic SPI
+   output sclk,
+   output sen_clk,
+   output sen_dac,
+   output sdi,
+   input sdo,
+   
+   // TX DBoard
+   output sen_tx_db,
+   output sclk_tx_db,
+   input sdo_tx_db,
+   output sdi_tx_db,
+
+   output sen_tx_adc,
+   output sclk_tx_adc,
+   input sdo_tx_adc,
+   output sdi_tx_adc,
+
+   output sen_tx_dac,
+   output sclk_tx_dac,
+   output sdi_tx_dac,
+
+   inout [15:0] io_tx,
+
+   // RX DBoard
+   output sen_rx_db,
+   output sclk_rx_db,
+   input sdo_rx_db,
+   output sdi_rx_db,
+
+   output sen_rx_adc,
+   output sclk_rx_adc,
+   input sdo_rx_adc,
+   output sdi_rx_adc,
+
+   output sen_rx_dac,
+   output sclk_rx_dac,
+   output sdi_rx_dac,
+   
+   inout [15:0] io_rx
+   );
+
+   // FPGA-specific pins connections
+   wire        aux_clk = PHY_CLK;
+   //wire      cpld_detached = RAM_A[14]; // FIXME  Hacked on with Blue Wire
+   wire        cpld_detached = SDA_force; // FIXME  Hacked on with Blue Wire
+
+   wire        clk_fpga, dsp_clk, clk_div, dcm_out, wb_clk, clock_ready;
+
+   IBUFGDS clk_fpga_pin (.O(clk_fpga),.I(clk_fpga_p),.IB(clk_fpga_n));
+   defparam    clk_fpga_pin.IOSTANDARD = "LVPECL_25";
+   
+   wire        exp_pps_in;
+   IBUFDS exp_pps_in_pin (.O(exp_pps_in),.I(exp_pps_in_p),.IB(exp_pps_in_n));
+   defparam    exp_pps_in_pin.IOSTANDARD = "LVDS_25";
+   
+   wire        exp_pps_out;
+   OBUFDS exp_pps_out_pin (.O(exp_pps_out_p),.OB(exp_pps_out_n),.I(exp_pps_out));
+   defparam    exp_pps_out_pin.IOSTANDARD = "LVDS_25";
+
+   reg [5:0]   clock_ready_d;
+   always @(posedge aux_clk)
+     clock_ready_d[5:0] <= {clock_ready_d[4:0],clock_ready};
+
+   wire        dcm_rst = ~&clock_ready_d & |clock_ready_d;
+   wire        clk_muxed = clock_ready ? clk_fpga : aux_clk;
+
+   wire        adc_on_a, adc_on_b, adc_oe_a, adc_oe_b;
+   assign      adc_oen_a = ~adc_oe_a;
+   assign      adc_oen_b = ~adc_oe_b;
+   assign      adc_pdn_a = ~adc_on_a;  
+   assign      adc_pdn_b = ~adc_on_b;  
+
+   // Handle Clocks
+   DCM DCM_INST (.CLKFB(dsp_clk), 
+                 .CLKIN(clk_muxed), 
+                 .DSSEN(0), 
+                 .PSCLK(0), 
+                 .PSEN(0), 
+                 .PSINCDEC(0), 
+                 .RST(dcm_rst), 
+                 .CLKDV(clk_div), 
+                 .CLKFX(), 
+                 .CLKFX180(), 
+                 .CLK0(dcm_out), 
+                 .CLK2X(), 
+                 .CLK2X180(), 
+                 .CLK90(), 
+                 .CLK180(), 
+                 .CLK270(), 
+                 .LOCKED(LOCKED_OUT), 
+                 .PSDONE(), 
+                 .STATUS());
+   defparam DCM_INST.CLK_FEEDBACK = "1X";
+   defparam DCM_INST.CLKDV_DIVIDE = 2.0;
+   defparam DCM_INST.CLKFX_DIVIDE = 1;
+   defparam DCM_INST.CLKFX_MULTIPLY = 4;
+   defparam DCM_INST.CLKIN_DIVIDE_BY_2 = "FALSE";
+   defparam DCM_INST.CLKIN_PERIOD = 10.000;
+   defparam DCM_INST.CLKOUT_PHASE_SHIFT = "NONE";
+   defparam DCM_INST.DESKEW_ADJUST = "SYSTEM_SYNCHRONOUS";
+   defparam DCM_INST.DFS_FREQUENCY_MODE = "LOW";
+   defparam DCM_INST.DLL_FREQUENCY_MODE = "LOW";
+   defparam DCM_INST.DUTY_CYCLE_CORRECTION = "TRUE";
+   defparam DCM_INST.FACTORY_JF = 16'h8080;
+   defparam DCM_INST.PHASE_SHIFT = 0;
+   defparam DCM_INST.STARTUP_WAIT = "FALSE";
+
+   BUFG dspclk_BUFG (.I(dcm_out), .O(dsp_clk));
+   BUFG wbclk_BUFG (.I(clk_div), .O(wb_clk));
+
+   // I2C -- Don't use external transistors for open drain, the FPGA implements this
+   IOBUF scl_pin(.O(scl_pad_i), .IO(SCL), .I(scl_pad_o), .T(scl_pad_oen_o));
+   IOBUF sda_pin(.O(sda_pad_i), .IO(SDA), .I(sda_pad_o), .T(sda_pad_oen_o));
+
+   // LEDs are active low outputs
+   wire        led1_int, led2_int;
+   assign      led1 = ~led1_int;
+   assign      led2 = ~led2_int;
+
+   // SPI
+   wire        miso, mosi, sclk_int;
+   assign      {sclk,sdi} = (~sen_clk | ~sen_dac) ? {sclk_int,mosi} : 2'b0;
+   assign      {sclk_tx_db,sdi_tx_db} = ~sen_tx_db ? {sclk_int,mosi} : 2'b0;
+   assign      {sclk_tx_dac,sdi_tx_dac} = ~sen_tx_dac ? {sclk_int,mosi} : 2'b0;
+   assign      {sclk_tx_adc,sdi_tx_adc} = ~sen_tx_adc ? {sclk_int,mosi} : 2'b0;
+   assign      {sclk_rx_db,sdi_rx_db} = ~sen_rx_db ? {sclk_int,mosi} : 2'b0;
+   assign      {sclk_rx_dac,sdi_rx_dac} = ~sen_rx_dac ? {sclk_int,mosi} : 2'b0;
+   assign      {sclk_rx_adc,sdi_rx_adc} = ~sen_rx_adc ? {sclk_int,mosi} : 2'b0;
+   
+   assign      miso = (~sen_clk & sdo) | (~sen_dac & sdo) | 
+               (~sen_tx_db & sdo_tx_db) | (~sen_tx_adc & sdo_tx_adc) |
+               (~sen_rx_db & sdo_rx_db) | (~sen_rx_adc & sdo_rx_adc);
+
+   wire        GMII_TX_EN_unreg, GMII_TX_ER_unreg;
+   wire [7:0]  GMII_TXD_unreg;
+   wire        GMII_GTX_CLK_int;
+   
+   always @(posedge GMII_GTX_CLK_int)
+     begin
+       GMII_TX_EN <= GMII_TX_EN_unreg;
+       GMII_TX_ER <= GMII_TX_ER_unreg;
+       GMII_TXD <= GMII_TXD_unreg;
+     end
+
+   OFDDRRSE OFDDRRSE_gmii_inst 
+     (.Q(GMII_GTX_CLK),      // Data output (connect directly to top-level port)
+      .C0(GMII_GTX_CLK_int),    // 0 degree clock input
+      .C1(~GMII_GTX_CLK_int),    // 180 degree clock input
+      .CE(1),    // Clock enable input
+      .D0(0),    // Posedge data input
+      .D1(1),    // Negedge data input
+      .R(0),      // Synchronous reset input
+      .S(0)       // Synchronous preset input
+      );
+   
+   wire ser_tklsb_unreg, ser_tkmsb_unreg;
+   wire [15:0] ser_t_unreg;
+   wire        ser_tx_clk_int;
+   
+   always @(posedge ser_tx_clk_int)
+     begin
+       ser_tklsb <= ser_tklsb_unreg;
+       ser_tkmsb <= ser_tkmsb_unreg;
+       ser_t <= ser_t_unreg;
+     end
+
+   assign ser_tx_clk = clk_fpga;
+
+   reg [15:0] ser_r_int;
+   reg               ser_rklsb_int, ser_rkmsb_int;
+
+   always @(posedge ser_rx_clk)
+     begin
+       ser_r_int <= ser_r;
+       ser_rklsb_int <= ser_rklsb;
+       ser_rkmsb_int <= ser_rkmsb;
+     end
+   
+   /*
+   OFDDRRSE OFDDRRSE_serdes_inst 
+     (.Q(ser_tx_clk),      // Data output (connect directly to top-level port)
+      .C0(ser_tx_clk_int),    // 0 degree clock input
+      .C1(~ser_tx_clk_int),    // 180 degree clock input
+      .CE(1),    // Clock enable input
+      .D0(0),    // Posedge data input
+      .D1(1),    // Negedge data input
+      .R(0),      // Synchronous reset input
+      .S(0)       // Synchronous preset input
+      );
+   */
+   u2_basic u2_basic(.dsp_clk           (dsp_clk),
+                    .wb_clk            (wb_clk),
+                    .clock_ready       (clock_ready),
+                    .clk_to_mac        (clk_to_mac),
+                    .pps_in            (pps_in),
+                    .led1              (led1_int),
+                    .led2              (led2_int),
+                    .debug             (debug[31:0]),
+                    .debug_clk         (debug_clk[1:0]),
+                    .exp_pps_in        (exp_pps_in),
+                    .exp_pps_out       (exp_pps_out),
+                    .GMII_COL          (GMII_COL),
+                    .GMII_CRS          (GMII_CRS),
+                    .GMII_TXD          (GMII_TXD_unreg[7:0]),
+                    .GMII_TX_EN        (GMII_TX_EN_unreg),
+                    .GMII_TX_ER        (GMII_TX_ER_unreg),
+                    .GMII_GTX_CLK      (GMII_GTX_CLK_int),
+                    .GMII_TX_CLK       (GMII_TX_CLK),
+                    .GMII_RXD          (GMII_RXD[7:0]),
+                    .GMII_RX_CLK       (GMII_RX_CLK),
+                    .GMII_RX_DV        (GMII_RX_DV),
+                    .GMII_RX_ER        (GMII_RX_ER),
+                    .MDIO              (MDIO),
+                    .MDC               (MDC),
+                    .PHY_INTn          (PHY_INTn),
+                    .PHY_RESETn        (PHY_RESETn),
+                    .PHY_CLK           (PHY_CLK),
+                    .ser_enable        (ser_enable),
+                    .ser_prbsen        (ser_prbsen),
+                    .ser_loopen        (ser_loopen),
+                    .ser_rx_en         (ser_rx_en),
+                    .ser_tx_clk        (ser_tx_clk_int),
+                    .ser_t             (ser_t_unreg[15:0]),
+                    .ser_tklsb         (ser_tklsb_unreg),
+                    .ser_tkmsb         (ser_tkmsb_unreg),
+                    .ser_rx_clk        (ser_rx_clk),
+                    .ser_r             (ser_r_int[15:0]),
+                    .ser_rklsb         (ser_rklsb_int),
+                    .ser_rkmsb         (ser_rkmsb_int),
+                    .cpld_start        (cpld_start),
+                    .cpld_mode         (cpld_mode),
+                    .cpld_done         (cpld_done),
+                    .cpld_din          (cpld_din),
+                    .cpld_clk          (cpld_clk),
+                    .cpld_detached     (cpld_detached),
+                    .adc_a             (adc_a[13:0]),
+                    .adc_ovf_a         (adc_ovf_a),
+                    .adc_on_a          (adc_on_a),
+                    .adc_oe_a          (adc_oe_a),
+                    .adc_b             (adc_b[13:0]),
+                    .adc_ovf_b         (adc_ovf_b),
+                    .adc_on_b          (adc_on_b),
+                    .adc_oe_b          (adc_oe_b),
+                    .dac_a             (dac_a[15:0]),
+                    .dac_b             (dac_b[15:0]),
+                    .scl_pad_i         (scl_pad_i),
+                    .scl_pad_o         (scl_pad_o),
+                    .scl_pad_oen_o     (scl_pad_oen_o),
+                    .sda_pad_i         (sda_pad_i),
+                    .sda_pad_o         (sda_pad_o),
+                    .sda_pad_oen_o     (sda_pad_oen_o),
+                    .clk_en            (clk_en[1:0]),
+                    .clk_sel           (clk_sel[1:0]),
+                    .clk_func          (clk_func),
+                    .clk_status        (clk_status),
+                    .sclk              (sclk_int),
+                    .mosi              (mosi),
+                    .miso              (miso),
+                    .sen_clk           (sen_clk),
+                    .sen_dac           (sen_dac),
+                    .sen_tx_db         (sen_tx_db),
+                    .sen_tx_adc        (sen_tx_adc),
+                    .sen_tx_dac        (sen_tx_dac),
+                    .sen_rx_db         (sen_rx_db),
+                    .sen_rx_adc        (sen_rx_adc),
+                    .sen_rx_dac        (sen_rx_dac),
+                    .io_tx             (io_tx[15:0]),
+                    .io_rx             (io_rx[15:0]),
+                    .RAM_D             (RAM_D),
+                    .RAM_A             (RAM_A),
+                    .RAM_CE1n          (RAM_CE1n),
+                    .RAM_CENn          (RAM_CENn),
+                    .RAM_CLK           (RAM_CLK),
+                    .RAM_WEn           (RAM_WEn),
+                    .RAM_OEn           (RAM_OEn),
+                    .RAM_LDn           (RAM_LDn), 
+                    .uart_tx_o         (),
+                    .uart_rx_i         (),
+                    .uart_baud_o       (),
+                    .sim_mode          (1'b0),
+                    .clock_divider     (2)
+                    );
+   
+endmodule // u2_fpga_top
index 9832c0cd54375fcda991279a6b0d0a7e5ca915cd..d41343a5d8800de6141383835ec7ca7d541b7ad8 100644 (file)
@@ -20,7 +20,8 @@ include $(top_srcdir)/Makefile.common
 AM_CPPFLAGS = \
     $(VRT_INCLUDES) \
     $(BOOST_CPPFLAGS) \
-    $(CPPUNIT_INCLUDES)
+    $(CPPUNIT_INCLUDES) \
+    $(GRUEL_INCLUDES)
 
 bin_PROGRAMS =