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

Parent Directory (gnuradio/usrp2/firmware)

Kludge Summary of gnuradio/usrp2/firmware/lib

Total Kludges 31
Total Subdirs 0

All Directories within gnuradio/usrp2/firmware/lib

All Files within gnuradio/usrp2/firmware/lib

Kludge Snippets in gnuradio/usrp2/firmware/lib

gnuradio/usrp2/firmware/lib/abort.c

Category FIXME
Committer eb
Commit ID 94981131edbe7bb7cc4261d73de0d476f386b6fa
26        void 
27        abort(void)
28        {
29          putstr("\n\nabort\n");
30          // FIXME loop blinking leds
31          _exit(-1);
32        }
				

gnuradio/usrp2/firmware/lib/ad9777_regs.h

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
64        #define	R9_Q_FINE_GAIN(g)    (g)		// 8-bits
65        #define	R10_Q_COARSE_GAIN(g) ((g) & 0xf)	// low 4-bits
66        
67        
68        // FIXME more registers for offset and gain control...
69        
70        
71        #endif /* INCLUDED_AD9777_REGS_H */
				

gnuradio/usrp2/firmware/lib/db_bitshark_rx.c — 1

Category Magic
Committer JohnOrlando
Commit ID 22a3ed8955a9d40796d58e83993b5f56f117a27a
230               way out...too long (say, 500 mS) and higher-level apps such as
231               usrp2_fft.py seem to choke because the init sequence is taking
232               too long.  So 5 mS was tested repeatedly without error, and deemed
233               reasonable. Not sure if this is an issue with the I2C master
234               code in the microblaze or some place else, and I hate magic
235               delays too, but this seems to be stable. */
236            mdelay(5);
237        
238            /* shift the value up so that it is represented properly in the fixed
				

gnuradio/usrp2/firmware/lib/db_bitshark_rx.c — 2

Category Magic
Committer JohnOrlando
Commit ID 22a3ed8955a9d40796d58e83993b5f56f117a27a
272               way out...too long (say, 500 mS) and higher-level apps such as
273               usrp2_fft.py seem to choke because the init sequence is taking
274               too long.  So 5 mS was tested repeatedly without error, and deemed
275               reasonable. Not sure if this is an issue with the I2C master
276               code in the microblaze or some place else, and I hate magic
277               delays too, but this seems to be stable. */
278            mdelay(5);
279        
280            return true;
				

gnuradio/usrp2/firmware/lib/db_bitshark_rx.c — 3

Category Magic
Committer JohnOrlando
Commit ID 22a3ed8955a9d40796d58e83993b5f56f117a27a
308               way out...too long (say, 500 mS) and higher-level apps such as
309               usrp2_fft.py seem to choke because the init sequence is taking
310               too long.  So 5 mS was tested repeatedly without error, and deemed
311               reasonable. Not sure if this is an issue with the I2C master
312               code in the microblaze or some place else, and I hate magic
313               delays too, but this seems to be stable. */
314            mdelay(5);
315        
316            return true;
				

gnuradio/usrp2/firmware/lib/db_bitshark_rx.c — 4

Category Magic
Committer JohnOrlando
Commit ID 22a3ed8955a9d40796d58e83993b5f56f117a27a
357               way out...too long (say, 500 mS) and higher-level apps such as
358               usrp2_fft.py seem to choke because the init sequence is taking
359               too long.  So 5 mS was tested repeatedly without error, and deemed
360               reasonable. Not sure if this is an issue with the I2C master
361               code in the microblaze or some place else, and I hate magic
362               delays too, but this seems to be stable. */
363            mdelay(5);
364        
365            return true;
				

gnuradio/usrp2/firmware/lib/db_dbsrx.c

Category FIXME
Committer matt
Commit ID 94f824d5313e2354f74deea9333063daa3998571
170          db->common.d_div2 = div2;
171          _send_reg_0(db);
172        }
173        
174        // FIXME  How do we handle ADE and ADL properly?
175        static void
176        _set_ade(struct db_dbsrx_dummy *db, int ade){
177          db->common.d_ade = ade;
178          _send_reg_4(db);
				

gnuradio/usrp2/firmware/lib/db_init.c — 1

Category FIXME
Committer eb
Commit ID a538f5aa702bb3ee2a9e6bb9ac3ef1a2988ed36b
147        {
148          struct db_base *db;
149          int dbid = read_dboard_eeprom(i2c_addr);
150        
151          // FIXME removing this printf has the system hang if there are two d'boards
152          // installed.  (I think the problem is in i2c_read/write or the way
153          // I kludge the zero-byte write to set the read address in eeprom_read.)
154          printf("%s dbid: 0x%x\n", msg, dbid);
155        
				

gnuradio/usrp2/firmware/lib/db_init.c — 2

Category Kludge
Committer eb
Commit ID a538f5aa702bb3ee2a9e6bb9ac3ef1a2988ed36b
149          int dbid = read_dboard_eeprom(i2c_addr);
150        
151          // FIXME removing this printf has the system hang if there are two d'boards
152          // installed.  (I think the problem is in i2c_read/write or the way
153          // I kludge the zero-byte write to set the read address in eeprom_read.)
154          printf("%s dbid: 0x%x\n", msg, dbid);
155        
156          if (dbid < 0){	// there was some kind of problem.  Treat as Basic Tx
157            return default_db;
				

gnuradio/usrp2/firmware/lib/db_init.c — 3

Category FIXME
Committer eb
Commit ID cf964adcd7fde2e30c01d0c09cc05656ce1a157d
244            subdev0_uses = 0x3;		// uses A/D 0 and 1
245          else
246            subdev0_uses = 0x1;		// uses A/D 0 only
247        
248          // FIXME second subdev on Basic Rx, LF RX
249          // if subdev2 exists
250          // subdev1_uses = 0x2;
251          subdev1_uses = 0;
252        
				

gnuradio/usrp2/firmware/lib/db_init_wbx.c — 1

Category FIXME
Committer Jason Abele
Commit ID ab207bece948af27e4772cb482ba9a7973b9565e
117        {
118          struct db_base *db;
119          int dbid = read_dboard_eeprom(i2c_addr);
120        
121          // FIXME removing this printf has the system hang if there are two d'boards
122          // installed.  (I think the problem is in i2c_read/write or the way
123          // I kludge the zero-byte write to set the read address in eeprom_read.)
124          printf("%s dbid: 0x%x\n", msg, dbid);
125        
				

gnuradio/usrp2/firmware/lib/db_init_wbx.c — 2

Category Kludge
Committer Jason Abele
Commit ID ab207bece948af27e4772cb482ba9a7973b9565e
119          int dbid = read_dboard_eeprom(i2c_addr);
120        
121          // FIXME removing this printf has the system hang if there are two d'boards
122          // installed.  (I think the problem is in i2c_read/write or the way
123          // I kludge the zero-byte write to set the read address in eeprom_read.)
124          printf("%s dbid: 0x%x\n", msg, dbid);
125        
126          if (dbid < 0){	// there was some kind of problem.  Treat as Basic Tx
127            return default_db;
				

gnuradio/usrp2/firmware/lib/db_init_wbx.c — 3

Category FIXME
Committer Jason Abele
Commit ID ab207bece948af27e4772cb482ba9a7973b9565e
214            subdev0_uses = 0x3;		// uses A/D 0 and 1
215          else
216            subdev0_uses = 0x1;		// uses A/D 0 only
217        
218          // FIXME second subdev on Basic Rx, LF RX
219          // if subdev2 exists
220          // subdev1_uses = 0x2;
221          subdev1_uses = 0;
222        
				

gnuradio/usrp2/firmware/lib/db_init_xcvr.c — 1

Category FIXME
Committer Josh Blum
Commit ID 803cb1d7974ed7d419550cc66480c107c2f0d454
117        {
118          struct db_base *db;
119          int dbid = read_dboard_eeprom(i2c_addr);
120        
121          // FIXME removing this printf has the system hang if there are two d'boards
122          // installed.  (I think the problem is in i2c_read/write or the way
123          // I kludge the zero-byte write to set the read address in eeprom_read.)
124          printf("%s dbid: 0x%x\n", msg, dbid);
125        
				

gnuradio/usrp2/firmware/lib/db_init_xcvr.c — 2

Category Kludge
Committer Josh Blum
Commit ID 803cb1d7974ed7d419550cc66480c107c2f0d454
119          int dbid = read_dboard_eeprom(i2c_addr);
120        
121          // FIXME removing this printf has the system hang if there are two d'boards
122          // installed.  (I think the problem is in i2c_read/write or the way
123          // I kludge the zero-byte write to set the read address in eeprom_read.)
124          printf("%s dbid: 0x%x\n", msg, dbid);
125        
126          if (dbid < 0){	// there was some kind of problem.  Treat as Basic Tx
127            return default_db;
				

gnuradio/usrp2/firmware/lib/db_init_xcvr.c — 3

Category FIXME
Committer Josh Blum
Commit ID 803cb1d7974ed7d419550cc66480c107c2f0d454
214            subdev0_uses = 0x3;		// uses A/D 0 and 1
215          else
216            subdev0_uses = 0x1;		// uses A/D 0 only
217        
218          // FIXME second subdev on Basic Rx, LF RX
219          // if subdev2 exists
220          // subdev1_uses = 0x2;
221          subdev1_uses = 0;
222        
				

gnuradio/usrp2/firmware/lib/db_rfx.c

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
613        rfx_set_tx_enable(struct db_base *dbb, bool on)
614        {
615          struct db_rfx_dummy *db = (struct db_rfx_dummy *) dbb;
616        
617          // FIXME
618        
619          return false;
620        }
621        
				

gnuradio/usrp2/firmware/lib/db_wbxng.c

Category FIXME
Committer Jason Abele
Commit ID ab207bece948af27e4772cb482ba9a7973b9565e
199        wbxng_set_tx_enable(struct db_base *dbb, bool on)
200        {
201          struct db_wbxng_dummy *db = (struct db_wbxng_dummy *) dbb;
202        
203          // FIXME
204        
205          return false;
206        }
207        
				

gnuradio/usrp2/firmware/lib/db_xcvr2450.c — 1

Category FIXME
Committer matt
Commit ID 1a550a92d5b10fcc2537aa8a80366c74494430b8
22        #include <hal_io.h>
23        #include <clocks.h>
24        #include <mdelay.h>
25        
26        void set_atr_regs(int bank, struct db_base *db); //FIXME I need to be in a header
27        
28        // RX IO Pins
29        #define LOCKDET (1 << 15)           // This is an INPUT!!!
30        #define EN      (1 << 14)
				

gnuradio/usrp2/firmware/lib/db_xcvr2450.c — 2

Category FIXME
Committer jblum
Commit ID d19334349914e06a4112e13b79ac3af0004dd9d0
243        }
244        
245        static void
246        set_reg_cal(struct db_xcvr2450_dummy *db){
247          // FIXME do calibration
248          int reg_cal = (
249            (1<<14) | 6);
250          send_reg(reg_cal);
251        }
				

gnuradio/usrp2/firmware/lib/db_xcvr2450.c — 3

Category FIXME
Committer matt
Commit ID 1a550a92d5b10fcc2537aa8a80366c74494430b8
319          int tx_antsel = (db->common->d_tx_ant)? ANTSEL_TX2_RX1:ANTSEL_TX1_RX2;
320          int rx_antsel = (db->common->d_rx_ant)? ANTSEL_TX2_RX1:ANTSEL_TX1_RX2;
321          int tx_pa_sel = (db->common->d_five_gig)? LB_PA_OFF:HB_PA_OFF;
322        
323          /* FIXME better way to set rx and tx val for RX and TX banks */
324          /* set rx bank */
325          db->base.atr_rxval = EN|rx_hp|RX_EN;
326          db->base.atr_txval = EN|rx_hp;
327          set_atr_regs(GPIO_RX_BANK, (struct db_base *)db);
				

gnuradio/usrp2/firmware/lib/hal_uart.c — 1

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
47        
48        void
49        hal_uart_putc(int ch)
50        {
51          if (ch == '\n')		// FIXME for now map \n -> \r\n
52            hal_uart_putc('\r');
53        
54          while (u->txlevel == 0)	 // wait for fifo to have space
55            ;
				

gnuradio/usrp2/firmware/lib/hal_uart.c — 2

Category FIXME
Committer matt
Commit ID 4ef65a60c4cf79a11a097cac312d86803fbbd202
59        
60        void
61        hal_uart_putc_nowait(int ch)
62        {
63          if (ch == '\n')		// FIXME for now map \n -> \r\n
64            hal_uart_putc('\r');
65        
66          if(u->txlevel)   // If fifo has space
67            u->txchar = ch;
				

gnuradio/usrp2/firmware/lib/i2c.c

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
48          i2c_regs->prescaler_hi = (prescaler_values[wb_div] >> 8) & 0xff;
49        
50          i2c_regs->ctrl = I2C_CTRL_EN;	// enable core
51        
52          // FIXME interrupt driven?
53        }
54        
55        static inline void
56        wait_for_xfer(void)
				

gnuradio/usrp2/firmware/lib/memory_map.h — 1

Category FIXME
Committer matt
Commit ID 430e7eb03892bea70bb93f8cd8b2edcef38f71c2
356          volatile uint32_t	adc_ctrl;
357          volatile uint32_t	leds;
358          volatile uint32_t	phy_ctrl;	// LSB is reset line to eth phy
359          volatile uint32_t	debug_mux_ctrl;
360          volatile uint32_t     ram_page;       // FIXME should go somewhere else...
361          volatile uint32_t     flush_icache;   // Flush the icache
362          volatile uint32_t     led_src;        // HW or SW control for LEDs
363        } output_regs_t;
364        
				

gnuradio/usrp2/firmware/lib/memory_map.h — 2

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
520         * All outgoing packets have their fifo_status field set to the number
521         * of 32-bit lines of fifo available in the ethernet Rx fifo (see
522         * usrp2_eth_packet.h).  Seqno's are set if FIXME, else 0.
523         *
524         * FIXME clean this up once we know how it's supposed to behave.
525         */
526        
527        typedef struct {
528          volatile uint32_t  flags;	     // not yet fully defined (channel?)
				

gnuradio/usrp2/firmware/lib/pic.c — 1

Category Magic
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
49          pic_regs->pending = ~0;			       // clear all pending ints
50        }
51        
52        /*
53         * This magic gets pic_interrupt_handler wired into the
54         * system interrupt handler with the appropriate prologue and
55         * epilogue.
56         */
57        void pic_interrupt_handler() __attribute__ ((interrupt_handler));
				

gnuradio/usrp2/firmware/lib/pic.c — 2

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
60        {
61          // pending and not masked interrupts
62          int live = pic_regs->pending & ~pic_regs->mask;
63        
64          // FIXME loop while there are interrupts to service.
65          //   That will reduce our overhead.
66        
67          // handle the first one set
68          int i;
				

gnuradio/usrp2/firmware/lib/pic.h

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
25        void pic_register_handler(unsigned irq, irq_handler_t handler);
26        
27        void nop_handler(unsigned irq);	// default handler does nothing
28        
29        // FIXME inline assembler
30        int  pic_disable_interrupts();
31        int  pic_enable_interrupts();
32        void pic_restore_interrupts(int prev_status);
33        
				

gnuradio/usrp2/firmware/lib/printf.c

Category FIXME
Committer jcorgan
Commit ID e0fcbaee124d3e8c4c11bdda662f88e082352058
127          *pInto++ = '\0';
128        
129          va_end(va);
130        
131          // FIXME wrong return value
132          return 0;
133        }
134        #endif
				

gnuradio/usrp2/firmware/lib/sd.c

Category FIXME
Committer matt
Commit ID ad482436a7c9e97f4bc1f7407dccd85a4cade6c5
191        
192        int
193        sd_write_block(unsigned int blockaddr, const unsigned char *buf)
194        {
195          // FIXME not implemented yet
196          return 0;
197        }