Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b

Parent Directory (gnuradio/usrp)

Kludge Summary of gnuradio/usrp/host

Total Kludges 35
Total Subdirs 7

All Directories within gnuradio/usrp/host

All Files within gnuradio/usrp/host

Kludge Snippets in gnuradio/usrp/host

gnuradio/usrp/host/apps/test_usrp_standard_tx.cc — 1

Category FIXME
Committer eb
Commit ID 1910719ec29a12be380b9fa3dcd3ab893ce87ce2
232          printf("nsamples: %g\n", nsamples);
233        
234        
235          if (realtime_p){
236            // FIXME
237          }
238        
239          usrp_standard_tx_sptr utx;
240        
				

gnuradio/usrp/host/apps/test_usrp_standard_tx.cc — 2

Category FIXME
Committer eb
Commit ID 1910719ec29a12be380b9fa3dcd3ab893ce87ce2
247        
248          if (utx == 0)
249            die ("usrp_standard_tx::make");
250        
251          // FIXME
252        
253          db_base_sptr subdev = utx->selected_subdev(spec);
254          printf("Subdevice name is %s\n", subdev->name().c_str());
255          printf("Subdevice freq range: (%g, %g)\n", 
				

gnuradio/usrp/host/apps/time_stuff.c

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
48            return 0;
49        
50          return timeval_to_secs (&ru.ru_utime) + timeval_to_secs (&ru.ru_stime);
51        #else
52          return 0;	/* FIXME */
53        #endif
54        }
55        
56        /*
				

gnuradio/usrp/host/include/usrp/usrp_basic.h

Category Magic
Committer Johnathan Corgan
Commit ID df4edacd55663aecee58a9b3f95cbc08bceaab81
197          int usb_data_rate () const { return d_usb_data_rate; }
198        
199          void set_verbose (bool on) { d_verbose = on; }
200        
201          //! magic value used on alternate register read interfaces
202          static const int READ_FAILED = -99999;
203        
204          /*!
205           * \brief Write EEPROM on motherboard or any daughterboard.
				

gnuradio/usrp/host/lib/db_boards.cc

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
186          case(USRP_DBID_XCVR2450_RX):
187            db.push_back(db_base_sptr(new db_xcvr2450_rx(usrp, which_side)));
188            break;
189        
190        #if 0	// FIXME wbx doesn't compile
191          case(USRP_DBID_WBX_LO_TX):
192            db.push_back(db_base_sptr(new db_wbx_lo_tx(usrp, which_side)));
193            break;
194          case(USRP_DBID_WBX_LO_RX):
				

gnuradio/usrp/host/lib/db_dbs_rx.cc — 1

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
100        {
101          // starting_regno is in [0,5],
102          // vals is a seq of integers to write to consecutive registers"""
103        
104          //FIXME
105          std::vector<int> args;
106          args.push_back(starting_regno);
107          args.insert(args.end(), vals.begin(), vals.end());
108          usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
				

gnuradio/usrp/host/lib/db_dbs_rx.cc — 2

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
343          d_r_int = static_cast<int>(round(log10(r)/log10(2)) - 1);
344          _send_reg(2);
345        }
346        
347        // FIXME  How do we handle ADE and ADL properly?
348        void
349        db_dbs_rx::_set_ade(int ade)
350        {
351          assert(ade == 0 || ade == 1);
				

gnuradio/usrp/host/lib/db_dtt754.cc

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
286        void
287        db_dtt754::_set_rfagc(float gain)
288        {
289          assert(gain <= 60 && gain >= 0);
290          // FIXME this has a 0.5V step between gain = 60 and gain = 59.
291          // Why are there two cases instead of a single linear case?
292          float voltage;
293          if(gain == 60) {
294            voltage = 4;
				

gnuradio/usrp/host/lib/db_dtt768.cc

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
259        void
260        db_dtt768::_set_rfagc(float gain)
261        {
262          assert(gain <= 60 && gain >= 0);
263          // FIXME this has a 0.5V step between gain = 60 and gain = 59.
264          // Why are there two cases instead of a single linear case?
265          float voltage;
266          if(gain == 60) {
267            voltage = 4;
				

gnuradio/usrp/host/lib/db_tv_rx.cc — 1

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
95          d_first_IF = first_IF;
96          d_second_IF = second_IF;
97          d_reference_divisor = 640;
98          d_fast_tuning = false;
99          d_inverted = false;                     // FIXME get rid of this
100          
101          set_gain((gain_min() + gain_max()) / 2.0);       // initialize gain
102        
103          bypass_adc_buffers(false);
				

gnuradio/usrp/host/lib/db_tv_rx.cc — 2

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
113        {
114          float voltage;
115        
116          assert(gain <= 60 && gain >= 0);
117          // FIXME this has a 0.5V step between gain = 60 and gain = 59.
118          // Why are there two cases instead of a single linear case?
119          if(gain == 60) {
120            voltage = 4;
121          }
				

gnuradio/usrp/host/lib/db_wbxng.cc

Category FIXME
Committer Johnathan Corgan
Commit ID 69caa7dce5a58b39614b1aba99c2dd71b38af322
113        
114          //fprintf(stderr,"Setting WBXNG frequency, requested %d, obtained %f, lock_detect %d\n",
115          //        int_freq, freq_result, d_common->_get_locked());
116        
117          // FIXME
118          // Offsetting the LO helps get the Tx carrier leakage out of the way.
119          // This also ensures that on Rx, we're not getting hosed by the
120          // FPGA's DC removal loop's time constant.  We were seeing a
121          // problem when running with discontinuous transmission.
				

gnuradio/usrp/host/lib/db_xcvr2450.cc

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
311             
312        void
313        xcvr2450::set_reg_cal()
314        {
315          // FIXME do calibration
316          d_reg_cal = (1<<14)|6;
317          send_reg(d_reg_cal);
318        }
319        
				

gnuradio/usrp/host/lib/fusb_darwin.h — 1

Category Magic
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
123        /*!
124         * \brief darwin implementation of fusb_devhandle
125         *
126         * This is currently identical to the generic implementation
127         * and is intended as a starting point for whatever magic is
128         * required to make usb fly.
129         */
130        class fusb_devhandle_darwin : public fusb_devhandle
131        {
				

gnuradio/usrp/host/lib/fusb_darwin.h — 2

Category Magic
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
142        /*!
143         * \brief darwin implementation of fusb_ephandle
144         *
145         * This is currently identical to the generic implementation
146         * and is intended as a starting point for whatever magic is
147         * required to make usb fly.
148         */
149        class fusb_ephandle_darwin : public fusb_ephandle
150        {
				

gnuradio/usrp/host/lib/fusb_linux.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
50        // Totally evil and fragile extraction of file descriptor from
51        // guts of libusb.  They don't install usbi.h, which is what we'd need
52        // to do this nicely.
53        //
54        // FIXME if everything breaks someday in the future, look here...
55        
56        static int
57        fd_from_usb_dev_handle (usb_dev_handle *udh)
58        {
				

gnuradio/usrp/host/lib/fusb_linux.cc — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
682         */
683        bool
684        fusb_ephandle_linux::submit_urb (usbdevfs_urb *urb)
685        {
686          if (!d_devhandle->_submit_urb (urb)){    // FIXME record the problem somewhere
687            fprintf (stderr, "_submit_urb failed\n");
688            free_list_add (urb);
689            return false;
690          }
				

gnuradio/usrp/host/lib/fusb_ra_wb.cc

Category FIXME
Committer eb
Commit ID c8ed035413582319e606104d00ab69f919ab6038
41        // Totally evil and fragile extraction of file descriptor from
42        // guts of libusb.  They don't install usbi.h, which is what we'd need
43        // to do this nicely.
44        //
45        // FIXME if everything breaks someday in the future, look here...
46        
47        static int
48        fd_from_usb_dev_handle (usb_dev_handle *udh)
49        {
				

gnuradio/usrp/host/lib/limbo/db_wbx.cc

Category FIXME
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
61        
62          d_first = true;
63          d_spi_format = SPI_FMT_MSB | SPI_FMT_HDR_0;
64        
65          // FIXME -- the write reg functions don't work with 0xffff for masks
66          _rx_write_oe(int(PLL_ENABLE|MReset|SELA0|SELA1|SELB0|SELB1|RX2_RX1N|RXENABLE), 0x7fff);
67          _rx_write_io((PLL_ENABLE|MReset|0|RXENABLE), (PLL_ENABLE|MReset|RX2_RX1N|RXENABLE));
68        
69          _tx_write_oe((TX_POWER|RX_TXN|TX_ENB_MIX|TX_ENB_VGA), 0x7fff);
				

gnuradio/usrp/host/lib/usrp_basic.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
425        bool
426        usrp_basic::_write_9862 (int which_codec, int regno, unsigned char value)
427        {
428          if (0 && d_verbose){
429            // FIXME really want to enable logging in usrp_prims:usrp_9862_write
430            fprintf(stdout, "_write_9862(codec = %d, regno = %2d, val = 0x%02x)\n", which_codec, regno, value);
431            fflush(stdout);
432          }
433        
				

gnuradio/usrp/host/lib/usrp_basic.cc — 2

Category Magic
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
661          if (! (0 <= which_side && which_side <= 1))
662            return false;
663        
664          int t;
665          int reg = which_side + 1;	// FIXME, *very* magic number (fix in serial_io.v)
666          bool ok = _read_fpga_reg(reg, &t);
667          if (!ok)
668            return false;
669        
				

gnuradio/usrp/host/lib/usrp_basic.cc — 3

Category Magic
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
667          if (!ok)
668            return false;
669        
670          if (txrx == C_TX){
671            *value = t & 0xffff;		// FIXME, more magic
672            return true;
673          }
674          else {
675            *value = (t >> 16) & 0xffff;	// FIXME, more magic
				

gnuradio/usrp/host/lib/usrp_basic.cc — 4

Category Magic
Committer jcorgan
Commit ID 72c625f7e50b65dc3b642112762e9eb1d633bd42
671            *value = t & 0xffff;		// FIXME, more magic
672            return true;
673          }
674          else {
675            *value = (t >> 16) & 0xffff;	// FIXME, more magic
676            return true;
677          }
678        }
679        
				

gnuradio/usrp/host/lib/usrp_basic.cc — 5

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
778            throw std::runtime_error ("usrp_basic_rx/init_9862");
779          }
780        
781          if (0){
782            // FIXME power down 2nd codec rx path
783            usrp_9862_write (d_udh, 1, REG_RX_PWR_DN, 0x1);	// power down everything
784          }
785        
786          // Reset the rx path and leave it disabled.
				

gnuradio/usrp/host/lib/usrp_basic.cc — 6

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
940           * In many cases, the FPGA reports an rx overrun right after we
941           * enable the Rx path.  If this is our first read, check for the
942           * overrun to clear the condition, then ignore the result.
943           */
944          if (0 && d_first_read){	// FIXME
945            d_first_read = false;
946            bool bogus_overrun;
947            usrp_check_rx_overrun (d_udh, &bogus_overrun);
948          }
				

gnuradio/usrp/host/lib/usrp_basic.cc — 7

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
1181            throw std::runtime_error ("usrp_basic_tx/init_9862");
1182          }
1183        
1184          if (0){
1185            // FIXME power down 2nd codec tx path
1186            usrp_9862_write (d_udh, 1, REG_TX_PWR_DN,
1187        		     (TX_PWR_DN_TX_DIGITAL
1188        		      | TX_PWR_DN_TX_ANALOG_BOTH));
1189          }
				

gnuradio/usrp/host/lib/usrp_prims_common.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
35        #include <unistd.h>
36        #include <stdlib.h>
37        #include <string.h>
38        #include <ctype.h>
39        #include <time.h>		// FIXME should check with autoconf (nanosleep)
40        #include <algorithm>
41        #include <ad9862.h>
42        #include <assert.h>
43        #include "std_paths.h"
				

gnuradio/usrp/host/lib/usrp_prims_common.cc — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
380          if (!ok)
381            fprintf (stderr, "usrp: failed to reset tx and/or rx path\n");
382        
383          // Manually reset all regs except master control to zero.
384          // FIXME may want to remove this when we rework FPGA reset strategy.
385          // In the mean while, this gets us reproducible behavior.
386          for (int i = 0; i < FR_USER_0; i++){
387            if (i == FR_MASTER_CTRL)
388              continue;
				

gnuradio/usrp/host/lib/usrp_prims_common.cc — 3

Category FIXME
Committer ttsou
Commit ID e67bd8ae9773731c00d2636833a9120ed3cc2ec1
628          libusb_device_handle *udh;
629        
630          udh = usrp_open_cmd_interface (udev);
631          if (udh == 0){
632            // FIXME this could be because somebody else has it open.
633            // We should delay and retry...
634            fprintf (stderr, "open_nth_cmd_interface: open_cmd_interface failed\n");
635            return 0;
636          }
				

gnuradio/usrp/host/lib/usrp_prims_common.cc — 4

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
925        bool
926        usrp_9862_write_many_all (libusb_device_handle *udh,
927        			   const unsigned char *buf, int len)
928        {
929          // FIXME handle 2/2 and 4/4 versions
930        
931          bool result;
932          result  = usrp_9862_write_many (udh, 0, buf, len);
933          result &= usrp_9862_write_many (udh, 1, buf, len);
				

gnuradio/usrp/host/lib/usrp_standard.cc — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
701        {
702          int width =  usrp_standard_rx::format_width(format);
703          int want_q = usrp_standard_rx::format_want_q(format);
704        
705          if (!(width == 8 || width == 16))	// FIXME add other widths when valid
706            return false;
707        
708          if (!want_q)		// FIXME remove check when the rest of the code can handle I only
709            return false;
				

gnuradio/usrp/host/lib/usrp_standard.cc — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
704        
705          if (!(width == 8 || width == 16))	// FIXME add other widths when valid
706            return false;
707        
708          if (!want_q)		// FIXME remove check when the rest of the code can handle I only
709            return false;
710        
711          return true;
712        }
				

gnuradio/usrp/host/misc/getopt.c

Category Magic
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
176        
177        #ifdef	__GNU_LIBRARY__
178        /* We want to avoid inclusion of string.h with non-GNU libraries
179           because there are many ways it can cause trouble.
180           On some systems, it contains special magic macros that don't work
181           in GCC.  */
182        #include <string.h>
183        #define	my_index	strchr
184        #define	my_bcopy(src, dst, n)	memcpy ((dst), (src), (n))
				

gnuradio/usrp/host/swig/util.py — 1

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
11            u = usrp_open_cmd_interface (dev)
12            if not u:
13                raise RuntimeError, "usrp_open_cmd_interface"
14        
15            # FIXME setup high speed paths, Aux ADC Clock, ...
16        
17            # usrp_9862_write (u, 0, 35, 0x1)     # aux ADC clock = CLK/4
18            # usrp_9862_write (u, 1, 35, 0x1)
19        
				

gnuradio/usrp/host/swig/util.py — 2

Category FIXME
Committer jcorgan
Commit ID 5d69a524f81f234b3fbc41d49ba18d6f6886baba
50            counter = 0
51            while True:
52                usrp_9862_write (u, which_codec, 43, counter >> 4)
53                usrp_9862_write (u, which_codec, 42, (counter & 0xf) << 4)
54                # counter += 1 FIXME
55                counter += 4
56                if counter > 0xfff:
57                    counter = 0
58