commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r4007 - in gnuradio/branches/developers/jcorgan/hier:


From: jcorgan
Subject: [Commit-gnuradio] r4007 - in gnuradio/branches/developers/jcorgan/hier: . config dtools/bin gnuradio-core/doc gnuradio-core/src/lib/general gnuradio-core/src/lib/omnithread gnuradio-core/src/python/gnuradio gnuradio-core/src/python/gnuradio/blksimpl gnuradio-core/src/python/gnuradio/gr gnuradio-examples/c++/dialtone gnuradio-examples/python/usrp gr-atsc/src/lib gr-howto-write-a-block gr-howto-write-a-block/config usrp/fpga/sdr_lib/hb usrp/fpga/toplevel/usrp_std usrp/host/lib
Date: Mon, 20 Nov 2006 10:47:29 -0700 (MST)

Author: jcorgan
Date: 2006-11-20 10:47:29 -0700 (Mon, 20 Nov 2006)
New Revision: 4007

Added:
   gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.cc
   gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.h
Removed:
   gnuradio/branches/developers/jcorgan/hier/config/gr_as.m4
   
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/config/gr_as.m4
Modified:
   gnuradio/branches/developers/jcorgan/hier/Makefile.am
   gnuradio/branches/developers/jcorgan/hier/README.hacking
   gnuradio/branches/developers/jcorgan/hier/config/Makefile.am
   gnuradio/branches/developers/jcorgan/hier/config/grc_ezdop.m4
   gnuradio/branches/developers/jcorgan/hier/configure.ac
   gnuradio/branches/developers/jcorgan/hier/dtools/bin/make-upload
   gnuradio/branches/developers/jcorgan/hier/gnuradio-core/doc/Makefile.am
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/general/Makefile.am
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/omnithread/nt.cc
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/qa_simple_flowgraph.py
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/packet_utils.py
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/c++/dialtone/Makefile.am
   
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/python/usrp/usrp_siggen.py
   gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/Makefile.am
   gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc.i
   gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/README
   
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/config/Makefile.am
   gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/configure.ac
   gnuradio/branches/developers/jcorgan/hier/usrp/fpga/sdr_lib/hb/coeff_rom.v
   
gnuradio/branches/developers/jcorgan/hier/usrp/fpga/toplevel/usrp_std/usrp_std.qsf
   gnuradio/branches/developers/jcorgan/hier/usrp/host/lib/usrp_prims.cc
Log:
Merged r3910:4006 from trunk into developer branch, minor tweaks.

Modified: gnuradio/branches/developers/jcorgan/hier/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/Makefile.am       2006-11-20 
04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/Makefile.am       2006-11-20 
17:47:29 UTC (rev 4007)
@@ -25,7 +25,8 @@
        bootstrap \
        configure \
        config.h.in \
-       run_tests.sh.in
+       run_tests.sh.in \
+       README.hacking
 
 SUBDIRS = @build_dirs@
 DIST_SUBDIRS = @build_dirs@ @skipped_dirs@

Modified: gnuradio/branches/developers/jcorgan/hier/README.hacking
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/README.hacking    2006-11-20 
04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/README.hacking    2006-11-20 
17:47:29 UTC (rev 4007)
@@ -170,6 +170,31 @@
 We use the standard unittest package for unit testing of Python code.
 
 
+* Subversion line ending styles
+
+All text files in the tree should have the subversion property 
+'svn:eol-style' set to 'native', with the following exceptions:
+
+config/*.m4
+configure.ac
+gr-howto-write-a-block/config/*.m4
+gr-howto-write-a-block/configure.ac
+
+The easiest way to ensure this is to add or edit the following lines in
+your svn client configuration file (~/.subversion/config):
+
+enable-auto-props=yes
+
+[auto-props]
+*.c = svn:eol-style=native
+*.cc = svn:eol-style=native  
+*.i = svn:eol-style=native
+*.h = svn:eol-style=native
+*.am = svn:eol-style=native
+*.py = svn:eol-style=native
+*.ac = svn:eol-style=LF
+*.m4 = svn:eol-style=LF
+
 * Misc tips
 
 ccache, a compiler cache, can really speed up your builds.

Modified: gnuradio/branches/developers/jcorgan/hier/config/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/config/Makefile.am        
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/config/Makefile.am        
2006-11-20 17:47:29 UTC (rev 4007)
@@ -29,7 +29,6 @@
        acx_pthread.m4 \
        bnv_have_qt.m4 \
        cppunit.m4 \
-       gr_as.m4 \
        gr_boost.m4 \
        grc_build.m4 \
        grc_gnuradio_core.m4 \

Deleted: gnuradio/branches/developers/jcorgan/hier/config/gr_as.m4

Modified: gnuradio/branches/developers/jcorgan/hier/config/grc_ezdop.m4
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/config/grc_ezdop.m4       
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/config/grc_ezdop.m4       
2006-11-20 17:47:29 UTC (rev 4007)
@@ -33,6 +33,9 @@
 
     passed=yes
 
+    # See ticket:96 in trac
+    AM_PROG_CC_C_O
+
     # Firmware build requires Atmel AVR microcontroller port of GCC
     AC_PATH_PROG([AVRGCC], [avr-gcc -v], [no])
     if test x$AVRGCC = xno; then

Modified: gnuradio/branches/developers/jcorgan/hier/configure.ac
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/configure.ac      2006-11-20 
04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/configure.ac      2006-11-20 
17:47:29 UTC (rev 4007)
@@ -31,7 +31,7 @@
 LF_SET_WARNINGS
 GR_SET_GPROF
 GR_SET_PROF
-GR_PROG_AS
+AM_PROG_AS
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL


Property changes on: gnuradio/branches/developers/jcorgan/hier/configure.ac
___________________________________________________________________
Name: svn:eol-style
   - native
   + LF

Modified: gnuradio/branches/developers/jcorgan/hier/dtools/bin/make-upload
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/dtools/bin/make-upload    
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/dtools/bin/make-upload    
2006-11-20 17:47:29 UTC (rev 4007)
@@ -4,9 +4,13 @@
 
 for file in "$@"
 do
-       echo "directory: gnuradio" > $file.directive
-       echo "$passphrase" | gpg --passphrase-fd 0 --clearsign $file.directive
-       rm $file.directive
-       echo "$passphrase" | gpg --passphrase-fd 0 -b $file
+  (
+    echo "version: 1.1"
+    echo "directory: gnuradio"
+    echo "filename: $file"
+  )> $file.directive
+  echo "$passphrase" | gpg --passphrase-fd 0 --clearsign $file.directive
+  rm $file.directive
+  echo "$passphrase" | gpg --passphrase-fd 0 -b $file
 done
 
passphrase="XYZabcdefhghakdsj;lasjdf;ajfdiuiwjr;lajv;laoisfuaoieurlkajdsflkajsdfoiuew"

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/doc/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/gnuradio-core/doc/Makefile.am     
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/gnuradio-core/doc/Makefile.am     
2006-11-20 17:47:29 UTC (rev 4007)
@@ -54,14 +54,14 @@
 
 install-data-local:
        $(mkinstalldirs) $(DESTDIR)$(docdir)
-       @for i in $(top_srcdir)/README $(top_srcdir)/README.hacking 
$(top_srcdir)/ChangeLog; do \
+       @for i in $(top_srcdir)/README $(top_srcdir)/README.hacking; do \
                echo "$(INSTALL_DATA) $$i $(DESTDIR)$(docdir)"; \
                $(INSTALL_DATA) $$i $(DESTDIR)$(docdir); \
        done
        cp -r html $(DESTDIR)$(docdir)
 
 uninstall-local:
-       @for i in README README.hacking ChangeLog; do \
+       @for i in README README.hacking; do \
                echo "$(RM) $(DESTDIR)$(docdir)/$$i;"; \
                $(RM) $(DESTDIR)$(docdir)/$$i; \
        done

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/general/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/general/Makefile.am
 2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/general/Makefile.am
 2006-11-20 17:47:29 UTC (rev 4007)
@@ -37,9 +37,15 @@
        gr_add_const_XX.cc.t            \
        gr_add_const_XX.h.t             \
        gr_add_const_XX.i.t             \
-        gr_chunks_to_symbols_XX.cc.t   \
-        gr_chunks_to_symbols_XX.h.t    \
-        gr_chunks_to_symbols_XX.i.t    \
+       gr_add_vXX.cc.t                 \
+       gr_add_vXX.h.t                  \
+       gr_add_vXX.i.t                  \
+       gr_add_const_vXX.cc.t           \
+       gr_add_const_vXX.h.t            \
+       gr_add_const_vXX.i.t            \
+       gr_chunks_to_symbols_XX.cc.t    \
+       gr_chunks_to_symbols_XX.h.t     \
+       gr_chunks_to_symbols_XX.i.t     \
        gr_divide_XX.cc.t               \
        gr_divide_XX.h.t                \
        gr_divide_XX.i.t                \
@@ -49,6 +55,12 @@
        gr_multiply_const_XX.cc.t       \
        gr_multiply_const_XX.h.t        \
        gr_multiply_const_XX.i.t        \
+       gr_multiply_vXX.cc.t            \
+       gr_multiply_vXX.h.t             \
+       gr_multiply_vXX.i.t             \
+       gr_multiply_const_vXX.cc.t      \
+       gr_multiply_const_vXX.h.t       \
+       gr_multiply_const_vXX.i.t       \
        gr_mute_XX.cc.t                 \
        gr_mute_XX.h.t                  \
        gr_mute_XX.i.t                  \

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/omnithread/nt.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/omnithread/nt.cc
    2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/lib/omnithread/nt.cc
    2006-11-20 17:47:29 UTC (rev 4007)
@@ -32,6 +32,7 @@
 
 #include <stdlib.h>
 #include <errno.h>
+#include <WinError.h>
 #include <omnithread.h>
 #include <process.h>
 
@@ -385,7 +386,8 @@
 void
 omni_semaphore::post(void)
 {
-    if (!ReleaseSemaphore(nt_sem, 1, NULL))
+    if (!ReleaseSemaphore(nt_sem, 1, NULL)
+       && GetLastError() != ERROR_TOO_MANY_POSTS )     // MinGW fix--see 
ticket:95 in trac
        throw omni_thread_fatal(GetLastError());
 }
 

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
       2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dbpsk.py
       2006-11-20 17:47:29 UTC (rev 4007)
@@ -39,7 +39,7 @@
 _def_verbose = False
 _def_log = False
 
-_def_costas_alpha = 0.05
+_def_costas_alpha = None
 _def_gain_mu = 0.03
 _def_mu = 0.05
 _def_omega_relative_limit = 0.005
@@ -241,10 +241,12 @@
 
         
         # Costas loop (carrier tracking)
-        # FIXME: need to decide how to handle this more generally; do we pull 
it from higher layer?
-        costas_order = 2
-        beta = .25 * self._costas_alpha * self._costas_alpha
-        self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.002, 
-0.002, costas_order)
+        # The Costas loop is not needed for BPSK, though it can help. Turn the 
Costas loop on
+        # by setting an alpha value not None.
+        if self._costas_alpha is not None:
+            costas_order = 2
+            beta = .25 * self._costas_alpha * self._costas_alpha
+            self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 
0.002, -0.002, costas_order)
 
         # RRC data filter
         ntaps = 11 * self._samples_per_symbol
@@ -289,9 +291,14 @@
             self._setup_logging()
 
         # Connect and Initialize base class
-        self._fg.connect(self.pre_scaler, self.agc, self.costas_loop,
-                         self.rrc_filter, self.clock_recovery, self.diffdec,
-                         self.slicer, self.symbol_mapper, self.unpack)
+        if self._costas_alpha is not None:   # With Costas Loop
+            self._fg.connect(self.pre_scaler, self.agc, self.costas_loop,
+                             self.rrc_filter, self.clock_recovery, 
self.diffdec,
+                             self.slicer, self.symbol_mapper, self.unpack)
+        else: # Without Costas Loop
+            self._fg.connect(self.pre_scaler, self.agc,
+                             self.rrc_filter, self.clock_recovery, 
self.diffdec,
+                             self.slicer, self.symbol_mapper, self.unpack)
 
         gr.hier_block.__init__(self, self._fg, self.pre_scaler, self.unpack)
 
@@ -306,7 +313,10 @@
         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 = %.5f"     % self._costas_alpha
+        if self._costas_alpha is not None:
+            print "Costas Loop alpha = %.5f"     % self._costas_alpha
+        else:
+            print "Costas Loop is turned off"
         print "M&M symbol sync gain = %.5f"  % self._gain_mu
         print "M&M symbol sync mu = %.5f"    % self._mu
         print "M&M omega relative limit = %.5f" % self._omega_relative_limit
@@ -317,10 +327,11 @@
                          gr.file_sink(gr.sizeof_gr_complex, "prescaler.dat"))
         self._fg.connect(self.agc,
                          gr.file_sink(gr.sizeof_gr_complex, "agc.dat"))
-        self._fg.connect(self.costas_loop,
-                         gr.file_sink(gr.sizeof_gr_complex, "costas_loop.dat"))
-        self._fg.connect((self.costas_loop,1),
-                         gr.file_sink(gr.sizeof_gr_complex, 
"costas_error.dat"))
+        if self._costas_alpha is not None:
+            self._fg.connect(self.costas_loop,
+                             gr.file_sink(gr.sizeof_gr_complex, 
"costas_loop.dat"))
+            self._fg.connect((self.costas_loop,1),
+                             gr.file_sink(gr.sizeof_gr_complex, 
"costas_error.dat"))
         self._fg.connect(self.rrc_filter,
                          gr.file_sink(gr.sizeof_gr_complex, "rrc_filter.dat"))
         self._fg.connect(self.clock_recovery,

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
       2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
       2006-11-20 17:47:29 UTC (rev 4007)
@@ -39,7 +39,7 @@
 _def_verbose = False
 _def_log = False
 
-_def_costas_alpha = 0.10
+_def_costas_alpha = None
 _def_gain_mu = 0.03
 _def_mu = 0.05
 _def_omega_relative_limit = 0.005
@@ -238,11 +238,15 @@
         self.agc = gr.feedforward_agc_cc(16, 1.0)
        
         # Costas loop (carrier tracking)
-        # FIXME: need to decide how to handle this more generally; do we pull 
it from higher layer?
-        costas_order = 4
-        beta = .25 * self._costas_alpha * self._costas_alpha
-        #self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.1, 
-0.1, costas_order)
-        self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.002, 
-0.002, costas_order)
+        if self._costas_alpha is None:   # If no alpha value was specified by 
the user
+            alpha_dir = {2:0.075, 3:0.075, 4:0.105, 5:0.105, 6:0.125, 7:0.130}
+            self._costas_alpha = alpha_dir[self._samples_per_symbol]
+        
+        costas_order = 4        
+        # The value of beta is now set to be overdamped; this value can have a 
huge impact on the
+        # performance of QPSK. Set to 0.25 for critically damped or higher for 
underdamped responses.
+        beta = .15 * self._costas_alpha * self._costas_alpha
+        self.costas_loop = gr.costas_loop_cc(self._costas_alpha, beta, 0.02, 
-0.02, costas_order)
 
         # RRC data filter
         ntaps = 11 * samples_per_symbol

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/qa_simple_flowgraph.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/qa_simple_flowgraph.py
       2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/gr/qa_simple_flowgraph.py
       2006-11-20 17:47:29 UTC (rev 4007)
@@ -111,7 +111,7 @@
        sfg.connect("nop1", 0, "dst1", 0)
        sfg.connect("nop1", 1, "dst2", 0)
        sfg.validate ()
-                                                                               
       
+    """                                                                        
               
     def test_015_validate(self):
        sfg = gr.simple_flowgraph()
        sfg.define_component("src1", gr.null_source (gr.sizeof_int))
@@ -124,7 +124,7 @@
        sfg.connect("nop1", 1, "dst2", 0)
        self.assertRaises(RuntimeError,
            lambda: sfg.validate ())
-                                                                               
       
+                                                                              
     def test_016_validate(self):
        sfg = gr.simple_flowgraph()
        sfg.define_component("src1", gr.null_source (gr.sizeof_int))
@@ -154,7 +154,7 @@
        #sfg.validate
        #self.assertRaises(RuntimeError,
        #    lambda: sfg.disconnect("src1", 0, "nop1", 1))
-                                                                               
       
+    """                                                                        
               
     
 if __name__ == "__main__":
     gr_unittest.main()

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/packet_utils.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/packet_utils.py
 2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-core/src/python/gnuradio/packet_utils.py
 2006-11-20 17:47:29 UTC (rev 4007)
@@ -72,7 +72,7 @@
 default_access_code = \
   conv_packed_binary_string_to_1_0_string('\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC')
 preamble = \
-  conv_packed_binary_string_to_1_0_string('\xAA\xAA\xAA\xAB')
+  conv_packed_binary_string_to_1_0_string('\x6C\xC6\x6C\xC6\x6C\xC6\x6C\xC6')
 
 def is_1_0_string(s):
     if not isinstance(s, str):

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/c++/dialtone/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/c++/dialtone/Makefile.am
        2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/c++/dialtone/Makefile.am
        2006-11-20 17:47:29 UTC (rev 4007)
@@ -34,10 +34,13 @@
 
 noinst_PROGRAMS = dialtone
     
+noinst_HEADERS = \
+    dialtone.h
+        
 dialtone_SOURCES = \
     dialtone.cc           \
     main.cc
-    
+
 dialtone_LDADD = \
     $(GNURADIO_CORE_LIBS) \
     $(GR_AUDIO_ALSA_LIBS)

Modified: 
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/python/usrp/usrp_siggen.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/python/usrp/usrp_siggen.py
      2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gnuradio-examples/python/usrp/usrp_siggen.py
      2006-11-20 17:47:29 UTC (rev 4007)
@@ -118,7 +118,7 @@
     parser.add_option ("-f", "--rf-freq", type="eng_float", default=None,
                        help="set RF center frequency to FREQ")
     parser.add_option ("-i", "--interp", type="int", default=64,
-                       help="set fgpa interpolation rate to INTERP")
+                       help="set fgpa interpolation rate to INTERP 
[default=%default]")
 
     parser.add_option ("--sine", dest="type", action="store_const", 
const=gr.GR_SIN_WAVE,
                        help="generate a complex sinusoid [default]", 
default=gr.GR_SIN_WAVE)
@@ -130,11 +130,11 @@
                        help="generate Uniform random output")
 
     parser.add_option ("-w", "--waveform-freq", type="eng_float", 
default=100e3,
-                       help="set waveform frequency to FREQ")
+                       help="set waveform frequency to FREQ 
[default=%default]")
     parser.add_option ("-a", "--amplitude", type="eng_float", default=16e3,
-                       help="set waveform amplitude to AMPLITUDE", 
metavar="AMPL")
+                       help="set waveform amplitude to AMPLITUDE 
[default=%default]", metavar="AMPL")
     parser.add_option ("-o", "--offset", type="eng_float", default=0,
-                       help="set waveform offset to OFFSET")
+                       help="set waveform offset to OFFSET [default=%default]")
     (options, args) = parser.parse_args ()
 
     if len(args) != 0:

Modified: gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/Makefile.am       
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/Makefile.am       
2006-11-20 17:47:29 UTC (rev 4007)
@@ -77,6 +77,7 @@
        atsc_bit_timing_loop.cc                 \
        atsc_fpll.cc                            \
        atsc_depad.cc                           \
+       atsc_pad.cc                             \
        atsci_basic_trellis_encoder.cc          \
        atsci_data_interleaver.cc               \
        atsci_equalizer.cc                      \
@@ -137,6 +138,7 @@
        atsc_bit_timing_loop.h                  \
        atsc_fpll.h                             \
        atsc_depad.h                            \
+       atsc_pad.h                              \
        atsc_types.h                            \
        atsci_basic_trellis_encoder.h           \
        atsci_data_interleaver.h                \

Modified: gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc.i
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc.i    
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc.i    
2006-11-20 17:47:29 UTC (rev 4007)
@@ -24,6 +24,7 @@
 #include <atsc_bit_timing_loop.h>
 #include <atsc_fpll.h>
 #include <atsc_depad.h>
+#include <atsc_pad.h>
 %}
 
 %include "atsc_consts.h"
@@ -267,3 +268,19 @@
 };
 
 // ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(atsc,pad);
+
+atsc_pad_sptr atsc_make_pad();
+
+class atsc_pad : public gr_sync_decimator
+{
+  atsc_pad();
+
+public:
+  void reset();
+
+};
+
+// ----------------------------------------------------------------
+

Copied: gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.cc 
(from rev 4006, gnuradio/trunk/gr-atsc/src/lib/atsc_pad.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.cc       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.cc       
2006-11-20 17:47:29 UTC (rev 4007)
@@ -0,0 +1,80 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <atsc_pad.h>
+#include <gr_io_signature.h>
+#include <atsc_types.h>
+
+static const int INTR = ATSC_MPEG_PKT_LENGTH;
+
+atsc_pad_sptr
+atsc_make_pad()
+{
+  return atsc_pad_sptr(new atsc_pad());
+}
+
+atsc_pad::atsc_pad()
+  : gr_sync_decimator("atsc_pad",
+                 gr_make_io_signature(1, 1, sizeof(unsigned char)),
+                 gr_make_io_signature(1, 1, sizeof(atsc_mpeg_packet)),
+                 INTR)
+{
+  reset();
+}
+
+void
+atsc_pad::forecast (int noutput_items, gr_vector_int &ninput_items_required)
+{
+  unsigned ninputs = ninput_items_required.size();
+  for (unsigned i = 0; i < ninputs; i++) 
+    ninput_items_required[i] = noutput_items * ATSC_MPEG_PKT_LENGTH;
+}
+
+
+int
+atsc_pad::work (int noutput_items,
+                      gr_vector_const_void_star &input_items,
+                      gr_vector_void_star &output_items)
+{
+  const unsigned char *in = (const unsigned char *) input_items[0];
+  atsc_mpeg_packet *out = (atsc_mpeg_packet *) output_items[0];
+
+  // size with padding (256)
+  unsigned int ATSC_MPEG_PKT = sizeof(atsc_mpeg_packet);
+  unsigned int i;
+
+  for (i = 0; i < noutput_items; i++){
+    for (int j = 0; j < ATSC_MPEG_PKT_LENGTH; j++)
+       out[i].data[j] = in[i * ATSC_MPEG_PKT_LENGTH + j];
+
+  }
+
+  return noutput_items;
+}
+
+
+
+

Copied: gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.h 
(from rev 4006, gnuradio/trunk/gr-atsc/src/lib/atsc_pad.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.h        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/hier/gr-atsc/src/lib/atsc_pad.h        
2006-11-20 17:47:29 UTC (rev 4007)
@@ -0,0 +1,55 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+#ifndef INCLUDED_ATSC_PAD_H
+#define INCLUDED_ATSC_PAD_H
+
+#include <gr_sync_decimator.h>
+
+class atsc_pad;
+typedef boost::shared_ptr<atsc_pad> atsc_pad_sptr;
+
+atsc_pad_sptr atsc_make_pad();
+
+/*!
+ * \brief pad mpeg ts packets from 188 byte char to 
+ * to 256 byte atsc_mpeg_packet
+ * \ingroup atsc
+ *
+ * input: unsigned char; output: atsc_mpeg_packet
+ */
+class atsc_pad : public gr_sync_decimator
+{
+  friend atsc_pad_sptr atsc_make_pad();
+
+  atsc_pad();
+
+public:
+  void forecast (int noutput_items, gr_vector_int &ninput_items_required);
+  int work (int noutput_items,
+           gr_vector_const_void_star &input_items,
+           gr_vector_void_star &output_items);
+
+  void reset() { /* nop */ }
+};
+
+
+#endif /* INCLUDED_ATSC_PAD_H */

Modified: 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/README
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/README     
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/README     
2006-11-20 17:47:29 UTC (rev 4007)
@@ -19,9 +19,12 @@
 # Boston, MA 02110-1301, USA.
 # 
 
-This tarball contains a build tree with examples, Makefiles, etc that
-demonstrate how to write signal processing blocks for the GNU Radio
-system.  
+This directory (and the resulting tarball) contains a build tree with
+examples, Makefiles, etc that demonstrate how to write signal
+processing blocks for the GNU Radio system.  This directory is
+intentionally distributed separately from the unified tarball of the
+rest of GNU Radio in order to avoid problems for people who have begun
+to write blocks with a modified copy of gr-howto-write-a-block.
 
 This package requires that gnuradio-core is already installed.  It
 also depends on some GNU Radio prerequisites, such as boost.

Modified: 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/config/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/config/Makefile.am
 2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/config/Makefile.am
 2006-11-20 17:47:29 UTC (rev 4007)
@@ -29,7 +29,6 @@
        acx_pthread.m4          \
        bnv_have_qt.m4          \
        cppunit.m4              \
-       gr_as.m4                \
        gr_boost.m4             \
        gr_check_createfilemapping.m4 \
        gr_check_usrp.m4        \

Deleted: 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/config/gr_as.m4

Modified: 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/configure.ac
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/configure.ac   
    2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/configure.ac   
    2006-11-20 17:47:29 UTC (rev 4007)
@@ -32,7 +32,7 @@
 LF_SET_WARNINGS
 GR_SET_GPROF
 GR_SET_PROF
-GR_PROG_AS
+AM_PROG_AS
 AC_PROG_LN_S
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL


Property changes on: 
gnuradio/branches/developers/jcorgan/hier/gr-howto-write-a-block/configure.ac
___________________________________________________________________
Name: svn:eol-style
   - native
   + LF

Modified: 
gnuradio/branches/developers/jcorgan/hier/usrp/fpga/sdr_lib/hb/coeff_rom.v
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/usrp/fpga/sdr_lib/hb/coeff_rom.v  
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/usrp/fpga/sdr_lib/hb/coeff_rom.v  
2006-11-20 17:47:29 UTC (rev 4007)
@@ -4,14 +4,14 @@
 
    always @(posedge clock)
      case (addr)
-       3'd0 : data <= #1 -16'd16;
-       3'd1 : data <= #1 16'd74;
-       3'd2 : data <= #1 -16'd254;
-       3'd3 : data <= #1 16'd669;
-       3'd4 : data <= #1 -16'd1468;
-       3'd5 : data <= #1 16'd2950;
-       3'd6 : data <= #1 -16'd6158;
-       3'd7 : data <= #1 16'd20585;
+       3'd0 : data <= #1 -16'd49;
+       3'd1 : data <= #1 16'd165;
+       3'd2 : data <= #1 -16'd412;
+       3'd3 : data <= #1 16'd873;
+       3'd4 : data <= #1 -16'd1681;
+       3'd5 : data <= #1 16'd3135;
+       3'd6 : data <= #1 -16'd6282;
+       3'd7 : data <= #1 16'd20628;
      endcase // case(addr)
       
 endmodule // coeff_rom

Modified: 
gnuradio/branches/developers/jcorgan/hier/usrp/fpga/toplevel/usrp_std/usrp_std.qsf
===================================================================
--- 
gnuradio/branches/developers/jcorgan/hier/usrp/fpga/toplevel/usrp_std/usrp_std.qsf
  2006-11-20 04:37:01 UTC (rev 4006)
+++ 
gnuradio/branches/developers/jcorgan/hier/usrp/fpga/toplevel/usrp_std/usrp_std.qsf
  2006-11-20 17:47:29 UTC (rev 4007)
@@ -27,7 +27,7 @@
 # ========================
 set_global_assignment -name ORIGINAL_QUARTUS_VERSION 3.0
 set_global_assignment -name PROJECT_CREATION_TIME_DATE "00:14:04  JULY 13, 
2003"
-set_global_assignment -name LAST_QUARTUS_VERSION "5.1 SP2"
+set_global_assignment -name LAST_QUARTUS_VERSION "6.0 SP1"
 
 # Pin & Location Assignments
 # ==========================

Modified: gnuradio/branches/developers/jcorgan/hier/usrp/host/lib/usrp_prims.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/hier/usrp/host/lib/usrp_prims.cc       
2006-11-20 04:37:01 UTC (rev 4006)
+++ gnuradio/branches/developers/jcorgan/hier/usrp/host/lib/usrp_prims.cc       
2006-11-20 17:47:29 UTC (rev 4007)
@@ -1344,7 +1344,7 @@
 std::string
 usrp_serial_number(struct usb_dev_handle *udh)
 {
-  u_int8_t iserial = usb_device(udh)->descriptor.iSerialNumber;
+  unsigned char iserial = usb_device(udh)->descriptor.iSerialNumber;
   if (iserial == 0)
     return "";
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]