Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b
Parent Directory
(gnuradio)
Kludge Summary of gnuradio/usrp
| Total Kludges |
57 |
| Total Subdirs |
15 |
All Directories within gnuradio/usrp
All Files within gnuradio/usrp
Kludge Snippets in gnuradio/usrp
gnuradio/usrp/doc/Doxyfile.in
| Category |
TODO |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
325
326 SORT_BY_SCOPE_NAME = NO
327
328 # The GENERATE_TODOLIST tag can be used to enable (YES) or
329 # disable (NO) the todo list. This list is created by putting \todo
330 # commands in the documentation.
331
332 GENERATE_TODOLIST = YES
333
gnuradio/usrp/firmware/include/fpga_regs_standard.h — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
181 // Possible future values of WIDTH = {4, 2, 1}
182 // 12 takes a bit more work, since we need to know packet alignment.
183
184 // ------------------------------------------------------------------------
185 // FIXME register numbers 50 to 63 are available
186
187 // ------------------------------------------------------------------------
188 // Registers 64 to 95 are reserved for user custom FPGA builds.
189 // The standard USRP software will not touch these.
gnuradio/usrp/firmware/include/fpga_regs_standard.h — 2
| Category |
TODO |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
265 // still has the refclk function if you use the master/slave setup (it is not touched by the master/slave settings).
266 // The master/slave circuitry will only use io pin 15 and does not touch any of the other io pins.
267 #define bitnoFR_RX_SYNC_INPUT_IOPIN 15
268 #define bmFR_RX_SYNC_INPUT_IOPIN (1<<bitnoFR_RX_SYNC_INPUT_IOPIN)
269 //TODO the output pin is still hardcoded in the verilog code, make it listen to the following define
270 #define bitnoFR_RX_SYNC_OUTPUT_IOPIN 15
271 #define bmFR_RX_SYNC_OUTPUT_IOPIN (1<<bitnoFR_RX_SYNC_OUTPUT_IOPIN)
272 // =======================================================================
273 // READBACK Registers
gnuradio/usrp/firmware/include/fpga_regs_standard.v — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
153 // Possible future values of WIDTH = {4, 2, 1}
154 // 12 takes a bit more work, since we need to know packet alignment.
155
156 // ------------------------------------------------------------------------
157 // FIXME register numbers 50 to 63 are available
158
159 // ------------------------------------------------------------------------
160 // Registers 64 to 95 are reserved for user custom FPGA builds.
161 // The standard USRP software will not touch these.
gnuradio/usrp/firmware/include/fpga_regs_standard.v — 2
| Category |
TODO |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
228 // still has the refclk function if you use the master/slave setup (it is not touched by the master/slave settings).
229 // The master/slave circuitry will only use io pin 15 and does not touch any of the other io pins.
230 `define bitnoFR_RX_SYNC_INPUT_IOPIN 15
231 `define bmFR_RX_SYNC_INPUT_IOPIN (1<<bitnoFR_RX_SYNC_INPUT_IOPIN)
232 //TODO the output pin is still hardcoded in the verilog code, make it listen to the following define
233 `define bitnoFR_RX_SYNC_OUTPUT_IOPIN 15
234 `define bmFR_RX_SYNC_OUTPUT_IOPIN (1<<bitnoFR_RX_SYNC_OUTPUT_IOPIN)
235 // =======================================================================
236 // READBACK Registers
gnuradio/usrp/firmware/include/syncdelay.h — 1
| Category |
Magic |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
22 #ifndef _SYNCDELAY_H_
23 #define _SYNCDELAY_H_
24
25 /*
26 * Magic delay required between access to certain xdata registers (TRM page 15-106).
27 * For our configuration, 48 MHz FX2 / 48 MHz IFCLK, we need three cycles. Each
28 * NOP is a single cycle....
29 *
30 * From TRM page 15-105:
gnuradio/usrp/firmware/include/syncdelay.h — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
55 * GPIFTCB1 GPIFTCB0
56 */
57
58 /*
59 * FIXME ensure that the peep hole optimizer isn't screwing us
60 */
61 #define SYNCDELAY _asm nop; nop; nop; _endasm
62 #define NOP _asm nop; _endasm
63
gnuradio/usrp/firmware/lib/fx2utils.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
41 fx2_renumerate (void)
42 {
43 USBCS |= bmDISCON | bmRENUM;
44
45 // mdelay (1500); // FIXME why 1.5 seconds?
46 mdelay (250); // FIXME why 1.5 seconds?
47
48 USBIRQ = 0xff; // clear any pending USB irqs...
49 EPIRQ = 0xff; // they're from before the renumeration
gnuradio/usrp/firmware/lib/fx2utils.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
42 {
43 USBCS |= bmDISCON | bmRENUM;
44
45 // mdelay (1500); // FIXME why 1.5 seconds?
46 mdelay (250); // FIXME why 1.5 seconds?
47
48 USBIRQ = 0xff; // clear any pending USB irqs...
49 EPIRQ = 0xff; // they're from before the renumeration
50
gnuradio/usrp/firmware/lib/usb_common.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
50
51 volatile bit _usb_got_SUDAV;
52
53 unsigned char _usb_config = 0;
54 unsigned char _usb_alt_setting = 0; // FIXME really 1/interface
55
56 xdata unsigned char *current_device_descr;
57 xdata unsigned char *current_devqual_descr;
58 xdata unsigned char *current_config_descr;
gnuradio/usrp/firmware/lib/usb_common.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
183
184 switch (bRequest){
185
186 case RQ_GET_CONFIG:
187 EP0BUF[0] = _usb_config; // FIXME app should handle
188 EP0BCH = 0;
189 EP0BCL = 1;
190 break;
191
gnuradio/usrp/firmware/lib/usb_common.c — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
191
192 // --------------------------------
193
194 case RQ_GET_INTERFACE:
195 EP0BUF[0] = _usb_alt_setting; // FIXME app should handle
196 EP0BCH = 0;
197 EP0BCL = 1;
198 break;
199
gnuradio/usrp/firmware/lib/usb_common.c — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
212 SUDPTRL = LSB (current_devqual_descr);
213 break;
214
215 case DT_CONFIG:
216 if (0 && wValueL != 1) // FIXME only a single configuration
217 fx2_stall_ep0 ();
218 else {
219 SUDPTRH = MSB (current_config_descr);
220 SUDPTRL = LSB (current_config_descr);
gnuradio/usrp/firmware/lib/usb_common.c — 5
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
221 }
222 break;
223
224 case DT_OTHER_SPEED:
225 if (0 && wValueL != 1) // FIXME only a single configuration
226 fx2_stall_ep0 ();
227 else {
228 SUDPTRH = MSB (other_config_descr);
229 SUDPTRL = LSB (other_config_descr);
gnuradio/usrp/firmware/lib/usb_common.c — 6
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
250
251 case RQ_GET_STATUS:
252 switch (bRequestType & bmRT_RECIP_MASK){
253 case bmRT_RECIP_DEVICE:
254 EP0BUF[0] = bmGSDA_SELF_POWERED; // FIXME app should handle
255 EP0BUF[1] = 0;
256 EP0BCH = 0;
257 EP0BCL = 2;
258 break;
gnuradio/usrp/firmware/lib/usb_common.c — 7
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
298
299 switch (bRequest){
300
301 case RQ_SET_CONFIG:
302 _usb_config = wValueL; // FIXME app should handle
303 break;
304
305 case RQ_SET_INTERFACE:
306 _usb_alt_setting = wValueL; // FIXME app should handle
gnuradio/usrp/firmware/lib/usb_common.c — 8
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
302 _usb_config = wValueL; // FIXME app should handle
303 break;
304
305 case RQ_SET_INTERFACE:
306 _usb_alt_setting = wValueL; // FIXME app should handle
307 break;
308
309 // --------------------------------
310
gnuradio/usrp/firmware/src/common/fpga_load.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
40 udelay (40); // wait 40 us
41 USRP_ALTERA_CONFIG |= bmALTERA_NCONFIG; // set NCONFIG high
42
43 if (UC_BOARD_HAS_FPGA){
44 // FIXME should really cap this loop with a counter so we
45 // don't hang forever on a hardware failure.
46 while ((USRP_ALTERA_CONFIG & bmALTERA_NSTATUS) == 0) // wait for NSTATUS to go high
47 ;
48 }
gnuradio/usrp/firmware/src/common/usrp_common.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
98 EP2GPIFFLGSEL = 0x01; SYNCDELAY; // For EP2OUT, GPIF uses EF flag
99 EP6GPIFFLGSEL = 0x02; SYNCDELAY; // For EP6IN, GPIF uses FF flag
100
101 // set autoin length for EP6
102 // FIXME should be f(enumeration)
103
104 EP6AUTOINLENH = (512) >> 8; SYNCDELAY; // this is the length for high speed
105 EP6AUTOINLENL = (512) & 0xff; SYNCDELAY;
106
gnuradio/usrp/firmware/src/usrp2/usrp_main.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
329
330 eeprom_read(I2C_ADDR_BOOT, HW_REV_OFFSET, &hw_rev, 1); // LSB of device id
331 usb_desc_hw_rev_binary_patch_location_0[0] = hw_rev;
332 usb_desc_hw_rev_binary_patch_location_1[0] = hw_rev;
333 usb_desc_hw_rev_ascii_patch_location_0[0] = hw_rev + '0'; // FIXME if we get > 9
334
335 eeprom_read(I2C_ADDR_BOOT, SERIAL_NO_OFFSET, serial_no, SERIAL_NO_LEN);
336
337 for (i = 0; i < SERIAL_NO_LEN; i++){
gnuradio/usrp/firmware/src/usrp2/usrp_main.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
345 void
346 main (void)
347 {
348 #if 0
349 g_rx_enable = 0; // FIXME (work around initialization bug)
350 g_tx_enable = 0;
351 g_rx_overrun = 0;
352 g_tx_underrun = 0;
353 #endif
gnuradio/usrp/firmware/src/usrp2/usrp_main.c — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
5d69a524f81f234b3fbc41d49ba18d6f6886baba |
370 setup_autovectors ();
371 usb_install_handlers ();
372 hook_timer_tick ((unsigned short) isr_tick);
373
374 EIEX4 = 1; // disable INT4 FIXME
375 EA = 1; // global interrupt enable
376
377 fx2_renumerate (); // simulates disconnect / reconnect
378
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