commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9218 - gnuradio/branches/developers/trondeau/dbs/gr-u


From: trondeau
Subject: [Commit-gnuradio] r9218 - gnuradio/branches/developers/trondeau/dbs/gr-usrp/src
Date: Sun, 10 Aug 2008 13:34:27 -0600 (MDT)

Author: trondeau
Date: 2008-08-10 13:34:25 -0600 (Sun, 10 Aug 2008)
New Revision: 9218

Modified:
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/Makefile.am
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1.i
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.cc
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.i
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_c.cc
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.cc
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.h
   gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_c.cc
Log:
wip: moving db code from here to usrp and making wrapper class db1_base for 
integration into GNU Radio.

Modified: gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/Makefile.am   
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/Makefile.am   
2008-08-10 19:34:25 UTC (rev 9218)
@@ -40,10 +40,9 @@
        usrp1.i         \
        usrp1_source.i  \
        usrp1_sink.i    \
-       db_base.i       \
-       db_basic.i      \
-       db_tv_rx.i
+       db1_base.i
 
+
 NON_LOCAL_IFILES = $(GNURADIO_I)
 
 ALL_IFILES =                           \
@@ -75,10 +74,7 @@
        usrp1_sink_c.h                  \
        usrp1_source_base.h             \
        usrp1_source_c.h                \
-       db_base.h                       \
-       db_basic.h                      \
-       db_tv_rx.h                      \
-       db_boards.h
+       db1_base.h
 
 swiginclude_HEADERS =                  \
        $(LOCAL_IFILES)
@@ -94,11 +90,9 @@
        usrp1_sink_c.cc                 \
        usrp1_source_base.cc            \
        usrp1_source_c.cc               \
-       db_base.cc                      \
-       db_basic.cc                     \
-       db_tv_rx.cc                     \
-       db_boards.cc
+       db1_base.cc
 
+
 _usrp_la_LIBADD =                      \
        $(PYTHON_LDFLAGS)               \
        $(GNURADIO_CORE_LA)             \

Modified: gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1.i
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1.i       
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1.i       
2008-08-10 19:34:25 UTC (rev 9218)
@@ -41,9 +41,7 @@
 %include <usrp1_base.i>
 %include <usrp1_source.i>
 %include <usrp1_sink.i>
-%include <db_base.i>
-%include <db_basic.i>
-%include <db_tv_rx.i>
+%include <db1_base.i>
 
 %constant int FPGA_MODE_NORMAL   = usrp_standard_rx::FPGA_MODE_NORMAL;
 %constant int FPGA_MODE_LOOPBACK = usrp_standard_rx::FPGA_MODE_LOOPBACK;

Modified: gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.cc
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.cc 
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.cc 
2008-08-10 19:34:25 UTC (rev 9218)
@@ -26,7 +26,6 @@
 
 #include <usrp_standard.h>
 #include <usrp1_base.h>
-#include <db_base.h>
 #include <assert.h>
 
 
@@ -145,7 +144,7 @@
     //raise ValueError, "Invalid subdev_spec: %r:" % (subdev_spec,)
   }
 
-  db_base *db = d_db[side];    // This is a tuple of length 1 or 2 containing 
the subdevice
+  db1_base *db = d_db[side];    // This is a tuple of length 1 or 2 containing 
the subdevice
                                   //   classes for the selected side.
   
   unsigned int subdev0_uses, subdev1_uses, uses;
@@ -229,7 +228,7 @@
     //raise ValueError, "Invalid subdev_spec: %r:" % (subdev_spec,)
   }
 
-  db_base *db = d_db[side];
+  db1_base *db = d_db[side];
   
   if(db[0].i_and_q_swapped()) {
     unsigned int mask[2] = {0x0089, 0x8900};
@@ -242,7 +241,7 @@
 
 }
  
-db_base *
+db1_base *
 usrp1_base::selected_subdev(const std::vector<int> &subdev_spec)
 {
   /*

Modified: gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h  
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.h  
2008-08-10 19:34:25 UTC (rev 9218)
@@ -33,11 +33,11 @@
 #include <fpga_regs_standard.h>
 #include <fpga_regs_common.h>
 #include <iostream>
-#include <db_base.h>
+#include <db1_base.h>
 
-#define FPGA_MODE_NORMAL   usrp_standard_rx::FPGA_MODE_NORMAL
-#define FPGA_MODE_LOOPBACK usrp_standard_rx::FPGA_MODE_LOOPBACK
-#define FPGA_MODE_COUNTING usrp_standard_rx::FPGA_MODE_COUNTING
+//#define FPGA_MODE_NORMAL   usrp_standard_rx::FPGA_MODE_NORMAL
+//#define FPGA_MODE_LOOPBACK usrp_standard_rx::FPGA_MODE_LOOPBACK
+//#define FPGA_MODE_COUNTING usrp_standard_rx::FPGA_MODE_COUNTING
 
 
 class truth_table_element_t 
@@ -56,6 +56,7 @@
   unsigned int d_mux_val;
 };
 
+
 /*!
  * \brief abstract interface to Universal Software Radio Peripheral (Rev 1)
  */
@@ -67,7 +68,7 @@
  protected:
   usrp_standard_common *d_usrp;
   int d_fpga_caps;
-  db_base *d_db[2];
+  db1_base *d_db[2];
 
   usrp1_base (const std::string &name, gr_io_signature_sptr insig, 
gr_io_signature_sptr outsig);
 
@@ -77,11 +78,11 @@
 
   virtual ~usrp1_base ();
 
-  db_base * db(int side) { return d_db[side]; }
+  db1_base * db(int side) { return d_db[side]; }
 
   int determine_tx_mux_value(const std::vector<int> &subdev_spec);
   int determine_rx_mux_value(const std::vector<int> &subdev_spec);
-  db_base * selected_subdev(const std::vector<int> &subdev_spec);
+  db1_base * selected_subdev(const std::vector<int> &subdev_spec);
   
   virtual bool start() {return false;}
   virtual bool stop() {return false;}

Modified: gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.i
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.i  
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_base.i  
2008-08-10 19:34:25 UTC (rev 9218)
@@ -34,10 +34,10 @@
  private:
   usrp_standard_common *d_usrp;
   int d_fpga_caps;
-  db_base *d_db;
+  db1_base *d_db;
   
  protected:
-\  usrp1_base () {}
+  usrp1_base () {}
 
  public:
   //! magic value used on alternate register read interfaces
@@ -45,12 +45,12 @@
 
   virtual ~usrp1_base ();
 
-  db_base * db(int side);
+  db1_base * db(int side);
 
 
   int determine_tx_mux_value(const std::vector<int> &subdev_spec);
   int determine_rx_mux_value(const std::vector<int> &subdev_spec);
-  db_base * selected_subdev(const std::vector<int> &subdev_spec);
+  db1_base * selected_subdev(const std::vector<int> &subdev_spec);
 
   virtual bool start() {return false;}
   virtual bool stop() {return false;}

Modified: 
gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h     
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_base.h     
2008-08-10 19:34:25 UTC (rev 9218)
@@ -34,10 +34,6 @@
  */
 class usrp1_sink_base : public usrp1_base
 {
- private:
-  usrp_standard_tx     *d_usrp;
-  int                   d_nunderruns;
-  
  protected:
   usrp1_sink_base (const std::string &name,
                   gr_io_signature_sptr input_signature,
@@ -51,6 +47,9 @@
                   const std::string firmware_filename
                   ) throw (std::runtime_error);
 
+  usrp_standard_tx     *d_usrp;
+  int                   d_nunderruns;
+
   /*!
    * \brief convert between input item format and usrp native format
    *

Modified: gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_c.cc
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_c.cc       
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_sink_c.cc       
2008-08-10 19:34:25 UTC (rev 9218)
@@ -72,9 +72,8 @@
   
   int dbid = daughterboard_id(which_board);
 
-  //instantiate_dbs(dbid, d_db[which_board], this, which_board);
-  d_db[0] = instantiate_dbs(dbid, this, which_board);
-  d_db[1] = instantiate_dbs(dbid, this, which_board);
+  d_db[0] = (db1_base*)instantiate_dbs(dbid, this->d_usrp, which_board);
+  d_db[1] = (db1_base*)instantiate_dbs(dbid, this->d_usrp, which_board);
 }
 
 usrp1_sink_c::~usrp1_sink_c ()

Modified: 
gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.cc
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.cc  
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.cc  
2008-08-10 19:34:25 UTC (rev 9218)
@@ -52,6 +52,7 @@
                                   fusb_nblocks,
                                   fpga_filename,
                                   firmware_filename);
+
   if (d_usrp == 0)
     throw std::runtime_error ("can't open usrp1");
 

Modified: 
gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.h
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.h   
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_base.h   
2008-08-10 19:34:25 UTC (rev 9218)
@@ -33,10 +33,6 @@
  */
 class usrp1_source_base : public usrp1_base
 {
- private:
-  usrp_standard_rx     *d_usrp;
-  int                   d_noverruns;
-  
  protected:
   usrp1_source_base (const std::string &name,
                     gr_io_signature_sptr output_signature,
@@ -51,6 +47,10 @@
                     const std::string firmware_filename
                     ) throw (std::runtime_error);
 
+
+  usrp_standard_rx     *d_usrp;
+  int                   d_noverruns;
+
   /*!
    * \brief return number of usrp input bytes required to produce noutput 
items.
    */

Modified: 
gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_c.cc
===================================================================
--- gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_c.cc     
2008-08-10 18:40:06 UTC (rev 9217)
+++ gnuradio/branches/developers/trondeau/dbs/gr-usrp/src/usrp1_source_c.cc     
2008-08-10 19:34:25 UTC (rev 9218)
@@ -76,8 +76,8 @@
   
   int dbid = daughterboard_id(which_board);
 
-  d_db[0] = instantiate_dbs(dbid, this, which_board);
-  d_db[1] = instantiate_dbs(dbid, this, which_board);
+  d_db[0] = (db1_base*)instantiate_dbs(dbid, this->d_usrp, which_board);
+  d_db[1] = (db1_base*)instantiate_dbs(dbid, this->d_usrp, which_board);
 }
 
 usrp1_source_c::~usrp1_source_c ()





reply via email to

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