Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b
Parent Directory
(gnuradio)
Kludge Summary of gnuradio/usrp2
| Total Kludges |
118 |
| Total Subdirs |
10 |
All Directories within gnuradio/usrp2
All Files within gnuradio/usrp2
Kludge Snippets in gnuradio/usrp2
gnuradio/usrp2/firmware/apps/app_common_v2.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
133 r->len = sizeof(op_id_reply_t);
134 r->rid = p->rid;
135 r->addr = *ethernet_mac_addr();
136 r->hw_rev = (u2_hw_rev_major << 8) | u2_hw_rev_minor;
137 // r->fpga_md5sum = ; // FIXME
138 // r->sw_md5sum = ; // FIXME
139
140 return r->len;
141 }
gnuradio/usrp2/firmware/apps/app_common_v2.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
134 r->rid = p->rid;
135 r->addr = *ethernet_mac_addr();
136 r->hw_rev = (u2_hw_rev_major << 8) | u2_hw_rev_minor;
137 // r->fpga_md5sum = ; // FIXME
138 // r->sw_md5sum = ; // FIXME
139
140 return r->len;
141 }
142
gnuradio/usrp2/firmware/apps/app_common_v2.c — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
297479844e3d9a6eea54fa69147e6a20c0bfc412 |
352
353 if ((reply_payload_space < (sizeof(*r) + p->bytes)) ||
354 p->bytes > MAX_SUBPKT_LEN - sizeof(op_generic_t)) {
355 putstr("peek: insufficient reply packet space\n");
356 return 0; // FIXME do partial read?
357 }
358
359 r->opcode = OP_PEEK_REPLY;
360 r->len = sizeof(*r)+p->bytes;
gnuradio/usrp2/firmware/apps/app_passthru_v2.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
98 r->opcode = OP_ID_REPLY;
99 r->len = sizeof(op_id_reply_t);
100 r->rid = p->rid;
101 r->addr = *ethernet_mac_addr();
102 r->hw_rev = 0x0000; // FIXME
103 // r->fpga_md5sum = ; // FIXME
104 // r->sw_md5sum = ; // FIXME
105
106 // FIXME Add d'board info, including dbid, min/max gain, min/max freq
gnuradio/usrp2/firmware/apps/app_passthru_v2.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
99 r->len = sizeof(op_id_reply_t);
100 r->rid = p->rid;
101 r->addr = *ethernet_mac_addr();
102 r->hw_rev = 0x0000; // FIXME
103 // r->fpga_md5sum = ; // FIXME
104 // r->sw_md5sum = ; // FIXME
105
106 // FIXME Add d'board info, including dbid, min/max gain, min/max freq
107
gnuradio/usrp2/firmware/apps/app_passthru_v2.c — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
100 r->rid = p->rid;
101 r->addr = *ethernet_mac_addr();
102 r->hw_rev = 0x0000; // FIXME
103 // r->fpga_md5sum = ; // FIXME
104 // r->sw_md5sum = ; // FIXME
105
106 // FIXME Add d'board info, including dbid, min/max gain, min/max freq
107
108 return r->len;
gnuradio/usrp2/firmware/apps/app_passthru_v2.c — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
102 r->hw_rev = 0x0000; // FIXME
103 // r->fpga_md5sum = ; // FIXME
104 // r->sw_md5sum = ; // FIXME
105
106 // FIXME Add d'board info, including dbid, min/max gain, min/max freq
107
108 return r->len;
109 }
110
gnuradio/usrp2/firmware/apps/bitrot/tx_drop.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
158 {
159 uint32_t status = buffer_pool_status->status;
160
161 if (status & BPS_ERROR_ALL){
162 // FIXME rare path, handle error conditions
163 putstr("Errors! status = ");
164 puthex32_nl(status);
165
166 printf("total_rx_pkts = %d\n", total_rx_pkts);
gnuradio/usrp2/firmware/apps/bitrot/tx_drop2.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
188 {
189 uint32_t status = buffer_pool_status->status;
190
191 if (status & BPS_ERROR_ALL){
192 // FIXME rare path, handle error conditions
193 putstr("Errors! status = ");
194 puthex32_nl(status);
195
196 printf("total_rx_pkts = %d\n", total_rx_pkts);
gnuradio/usrp2/firmware/apps/eth_serdes.c — 1
| Category |
Kludge |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
117 * Debugging ONLY. This will be handled by the tx_protocol_engine.
118 *
119 * This is called when the DSP Rx chain has filled in a packet.
120 * We set and increment the seqno, then return false, indicating
121 * that we didn't handle the packet. A bit of a kludge
122 * but it should work.
123 */
124
125 bool
gnuradio/usrp2/firmware/apps/eth_serdes.c — 2
| Category |
Magic |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
137 #if 0
138 uint32_t *p = buffer_ram(buf_this);
139 uint32_t seqno = fw_seqno++;
140
141 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
142 uint32_t t = p[4];
143 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
144 p[4] = t;
145 #endif
gnuradio/usrp2/firmware/apps/eth_serdes.c — 3
| Category |
Kludge |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
137 #if 0
138 uint32_t *p = buffer_ram(buf_this);
139 uint32_t seqno = fw_seqno++;
140
141 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
142 uint32_t t = p[4];
143 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
144 p[4] = t;
145 #endif
gnuradio/usrp2/firmware/apps/factory_test.c — 1
| Category |
Kludge |
| Committer |
matt |
| Commit ID |
05b1edb08373dad4fe483d2b4a4c398e1f099042 |
225 * Debugging ONLY. This will be handled by the tx_protocol_engine.
226 *
227 * This is called when the DSP Rx chain has filled in a packet.
228 * We set and increment the seqno, then return false, indicating
229 * that we didn't handle the packet. A bit of a kludge
230 * but it should work.
231 */
232 bool
233 fw_sets_seqno_inspector(dbsm_t *sm, int buf_this) // returns false
gnuradio/usrp2/firmware/apps/factory_test.c — 2
| Category |
Magic |
| Committer |
matt |
| Commit ID |
05b1edb08373dad4fe483d2b4a4c398e1f099042 |
234 {
235 uint32_t *p = buffer_ram(buf_this);
236 uint32_t seqno = fw_seqno++;
237
238 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
239 uint32_t t = p[4];
240 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
241 p[4] = t;
242
gnuradio/usrp2/firmware/apps/factory_test.c — 3
| Category |
Kludge |
| Committer |
matt |
| Commit ID |
05b1edb08373dad4fe483d2b4a4c398e1f099042 |
234 {
235 uint32_t *p = buffer_ram(buf_this);
236 uint32_t seqno = fw_seqno++;
237
238 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
239 uint32_t t = p[4];
240 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
241 p[4] = t;
242
gnuradio/usrp2/firmware/apps/factory_test.c — 4
| Category |
FIXME |
| Committer |
matt |
| Commit ID |
05b1edb08373dad4fe483d2b4a4c398e1f099042 |
426 if (pending & PIC_OVERRUN_INT){
427 dbsm_handle_rx_overrun(&dsp_rx_sm);
428 pic_regs->pending = PIC_OVERRUN_INT; // clear pending interrupt
429
430 // FIXME Figure out how to handle this robustly.
431 // Any buffers that are emptying should be allowed to drain...
432
433 if (streaming_p){
434 // restart_streaming();
gnuradio/usrp2/firmware/apps/factory_test.c — 5
| Category |
FIXME |
| Committer |
matt |
| Commit ID |
05b1edb08373dad4fe483d2b4a4c398e1f099042 |
431 // Any buffers that are emptying should be allowed to drain...
432
433 if (streaming_p){
434 // restart_streaming();
435 // FIXME report error
436 }
437 else {
438 // FIXME report error
439 }
gnuradio/usrp2/firmware/apps/factory_test.c — 6
| Category |
FIXME |
| Committer |
matt |
| Commit ID |
05b1edb08373dad4fe483d2b4a4c398e1f099042 |
434 // restart_streaming();
435 // FIXME report error
436 }
437 else {
438 // FIXME report error
439 }
440 putchar('O');
441 }
442 }
gnuradio/usrp2/firmware/apps/gen_eth_packets.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
174 if (link_is_up && send_packet_now && (status & BPS_IDLE(CPU_TX_BUF))){
175 send_packet_now = false;
176
177 // kick off the next packet
178 // FIXME set packet number in packet
179
180 bp_send_from_buf(CPU_TX_BUF, PORT_ETH, 1, 0, 255); // 1KB total
181 hal_toggle_leds(0x1);
182 }
gnuradio/usrp2/firmware/apps/gen_pause_frames.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
105
106 void
107 buffer_irq_handler(unsigned irq)
108 {
109 // FIXME
110 }
111
112 static void
113 init_packet(int *buf, const u2_eth_packet_t *pkt, int bufnum)
gnuradio/usrp2/firmware/apps/gen_pause_frames.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
172
173 eth_mac->pause_frame_send_en = 1;
174 eth_mac->pause_quanta_set = 16384 / 512;
175
176 // eth_mac->speed = 4; // FIXME hardcode mac speed to 1000
177
178 while(1){
179 if (link_is_up && send_packet_now){
180 send_packet_now = false;
gnuradio/usrp2/firmware/apps/gen_pause_frames.c — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
187
188 send_pause ^= 1;
189
190 // kick off the next packet
191 // FIXME set packet number in packet
192
193 #if 0
194 bp_send_from_buf(0, PORT_ETH, 1, 0, 255); // 1KB total
195
gnuradio/usrp2/firmware/apps/mimo_app_common_v2.c — 1
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
129 r->len = sizeof(op_id_reply_t);
130 r->rid = p->rid;
131 r->addr = *ethernet_mac_addr();
132 r->hw_rev = (u2_hw_rev_major << 8) | u2_hw_rev_minor;
133 // r->fpga_md5sum = ; // FIXME
134 // r->sw_md5sum = ; // FIXME
135
136 return r->len;
137 }
gnuradio/usrp2/firmware/apps/mimo_app_common_v2.c — 2
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
130 r->rid = p->rid;
131 r->addr = *ethernet_mac_addr();
132 r->hw_rev = (u2_hw_rev_major << 8) | u2_hw_rev_minor;
133 // r->fpga_md5sum = ; // FIXME
134 // r->sw_md5sum = ; // FIXME
135
136 return r->len;
137 }
138
gnuradio/usrp2/firmware/apps/mimo_app_common_v2.c — 3
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
347
348 if ((reply_payload_space < (sizeof(*r) + p->bytes)) ||
349 p->bytes > MAX_SUBPKT_LEN - sizeof(op_generic_t)) {
350 putstr("peek: insufficient reply packet space\n");
351 return 0; // FIXME do partial read?
352 }
353
354 r->opcode = OP_PEEK_REPLY;
355 r->len = sizeof(*r)+p->bytes;
gnuradio/usrp2/firmware/apps/mimo_tx.c — 1
| Category |
Kludge |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
231 * Debugging ONLY. This will be handled by the tx_protocol_engine.
232 *
233 * This is called when the DSP Rx chain has filled in a packet.
234 * We set and increment the seqno, then return false, indicating
235 * that we didn't handle the packet. A bit of a kludge
236 * but it should work.
237 */
238 int
239 fw_sets_seqno_inspector(bsm12_t *sm, int buf_this)
gnuradio/usrp2/firmware/apps/mimo_tx.c — 2
| Category |
Magic |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
240 {
241 uint32_t *p = buffer_ram(buf_this);
242 uint32_t seqno = fw_seqno++;
243
244 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
245 uint32_t t = p[4];
246 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
247 p[4] = t;
248
gnuradio/usrp2/firmware/apps/mimo_tx.c — 3
| Category |
Kludge |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
240 {
241 uint32_t *p = buffer_ram(buf_this);
242 uint32_t seqno = fw_seqno++;
243
244 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
245 uint32_t t = p[4];
246 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
247 p[4] = t;
248
gnuradio/usrp2/firmware/apps/mimo_tx.c — 4
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
346 if (pending & PIC_OVERRUN_INT){
347 // dbsm_handle_rx_overrun(&dsp_rx_sm);
348 pic_regs->pending = PIC_OVERRUN_INT; // clear pending interrupt
349
350 // FIXME Figure out how to handle this robustly.
351 // Any buffers that are emptying should be allowed to drain...
352
353 if (streaming_p){
354 // restart_streaming();
gnuradio/usrp2/firmware/apps/mimo_tx.c — 5
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
351 // Any buffers that are emptying should be allowed to drain...
352
353 if (streaming_p){
354 // restart_streaming();
355 // FIXME report error
356 }
357 else {
358 // FIXME report error
359 }
gnuradio/usrp2/firmware/apps/mimo_tx.c — 6
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
354 // restart_streaming();
355 // FIXME report error
356 }
357 else {
358 // FIXME report error
359 }
360 putchar('O');
361 }
362 }
gnuradio/usrp2/firmware/apps/mimo_tx_slave.c — 1
| Category |
Kludge |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
230 * Debugging ONLY. This will be handled by the tx_protocol_engine.
231 *
232 * This is called when the DSP Rx chain has filled in a packet.
233 * We set and increment the seqno, then return false, indicating
234 * that we didn't handle the packet. A bit of a kludge
235 * but it should work.
236 */
237 bool
238 fw_sets_seqno_inspector(dbsm_t *sm, int buf_this) // returns false
gnuradio/usrp2/firmware/apps/mimo_tx_slave.c — 2
| Category |
Magic |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
239 {
240 uint32_t *p = buffer_ram(buf_this);
241 uint32_t seqno = fw_seqno++;
242
243 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
244 uint32_t t = p[4];
245 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
246 p[4] = t;
247
gnuradio/usrp2/firmware/apps/mimo_tx_slave.c — 3
| Category |
Kludge |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
239 {
240 uint32_t *p = buffer_ram(buf_this);
241 uint32_t seqno = fw_seqno++;
242
243 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
244 uint32_t t = p[4];
245 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
246 p[4] = t;
247
gnuradio/usrp2/firmware/apps/mimo_tx_slave.c — 4
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
363 if (pending & PIC_OVERRUN_INT){
364 dbsm_handle_rx_overrun(&dsp_rx_sm);
365 pic_regs->pending = PIC_OVERRUN_INT; // clear pending interrupt
366
367 // FIXME Figure out how to handle this robustly.
368 // Any buffers that are emptying should be allowed to drain...
369
370 if (streaming_p){
371 // restart_streaming();
gnuradio/usrp2/firmware/apps/mimo_tx_slave.c — 5
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
368 // Any buffers that are emptying should be allowed to drain...
369
370 if (streaming_p){
371 // restart_streaming();
372 // FIXME report error
373 }
374 else {
375 // FIXME report error
376 }
gnuradio/usrp2/firmware/apps/mimo_tx_slave.c — 6
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
b37c7375faf0ee227276ce9cc35344d5e00dc4c6 |
371 // restart_streaming();
372 // FIXME report error
373 }
374 else {
375 // FIXME report error
376 }
377 putchar('O');
378 }
379 }
gnuradio/usrp2/firmware/apps/rcv_eth_packets.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
108
109 void
110 buffer_irq_handler(unsigned irq)
111 {
112 // FIXME
113 }
114
115 static void
116 init_packet(int *buf, const u2_eth_packet_t *pkt, int bufnum)
gnuradio/usrp2/firmware/apps/rcv_eth_packets.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
163 init_packets();
164
165 // pic_register_handler(IRQ_BUFFER, buffer_irq_handler); // poll for now
166
167 // FIXME turn off timer since I don't think MTS and MFS instructions are implemented
168 // pic_register_handler(IRQ_TIMER, timer_irq_handler);
169 // hal_set_timeout(timer_delta);
170
171 ethernet_register_link_changed_callback(link_changed_callback);
gnuradio/usrp2/firmware/apps/rcv_eth_packets.c — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
171 ethernet_register_link_changed_callback(link_changed_callback);
172
173 ethernet_init();
174
175 //eth_mac->speed = 4; // FIXME hardcode mac speed to 1000
176
177 // kick off a receive
178 bp_receive_to_buf(2, PORT_ETH, 1, 0, 511);
179
gnuradio/usrp2/firmware/apps/serdes_txrx.c — 1
| Category |
Kludge |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
222 * Debugging ONLY. This will be handled by the tx_protocol_engine.
223 *
224 * This is called when the DSP Rx chain has filled in a packet.
225 * We set and increment the seqno, then return false, indicating
226 * that we didn't handle the packet. A bit of a kludge
227 * but it should work.
228 */
229 bool
230 fw_sets_seqno_inspector(dbsm_t *sm, int buf_this) // returns false
gnuradio/usrp2/firmware/apps/serdes_txrx.c — 2
| Category |
Magic |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
231 {
232 uint32_t *p = buffer_ram(buf_this);
233 uint32_t seqno = fw_seqno++;
234
235 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
236 uint32_t t = p[4];
237 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
238 p[4] = t;
239
gnuradio/usrp2/firmware/apps/serdes_txrx.c — 3
| Category |
Kludge |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
231 {
232 uint32_t *p = buffer_ram(buf_this);
233 uint32_t seqno = fw_seqno++;
234
235 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
236 uint32_t t = p[4];
237 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
238 p[4] = t;
239
gnuradio/usrp2/firmware/apps/serdes_txrx.c — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
355 if (pending & PIC_OVERRUN_INT){
356 dbsm_handle_rx_overrun(&dsp_rx_sm);
357 pic_regs->pending = PIC_OVERRUN_INT; // clear pending interrupt
358
359 // FIXME Figure out how to handle this robustly.
360 // Any buffers that are emptying should be allowed to drain...
361
362 if (streaming_p){
363 // restart_streaming();
gnuradio/usrp2/firmware/apps/serdes_txrx.c — 5
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
360 // Any buffers that are emptying should be allowed to drain...
361
362 if (streaming_p){
363 // restart_streaming();
364 // FIXME report error
365 }
366 else {
367 // FIXME report error
368 }
gnuradio/usrp2/firmware/apps/serdes_txrx.c — 6
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
363 // restart_streaming();
364 // FIXME report error
365 }
366 else {
367 // FIXME report error
368 }
369 putchar('O');
370 }
371 }
gnuradio/usrp2/firmware/apps/test_i2c.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
16 */
17
18 #include <stdio.h>
19 #include <stdint.h>
20 #include <u2_init.h> /* FIXME */
21 #include <i2c.h>
22 #include <usrp2_i2c_addr.h>
23 #include <string.h>
24 #include <hal_io.h>
gnuradio/usrp2/firmware/apps/test_ram.c
| Category |
FIXME |
| Committer |
matt |
| Commit ID |
430e7eb03892bea70bb93f8cd8b2edcef38f71c2 |
16 */
17
18 #include <stdio.h>
19 #include <stdint.h>
20 #include <u2_init.h> /* FIXME */
21 #include <sd.h>
22 #include <string.h>
23 #include <hal_io.h>
24 #include <nonstdio.h>
gnuradio/usrp2/firmware/apps/test_sd.c
| Category |
FIXME |
| Committer |
matt |
| Commit ID |
ad482436a7c9e97f4bc1f7407dccd85a4cade6c5 |
16 */
17
18 #include <stdio.h>
19 #include <stdint.h>
20 #include <u2_init.h> /* FIXME */
21 #include <sd.h>
22 #include <string.h>
23 #include <hal_io.h>
24 #include <nonstdio.h>
gnuradio/usrp2/firmware/apps/tx_standalone.c — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
154 bp_clear_buf(DSP_TX_BUF_0);
155 bp_clear_buf(DSP_TX_BUF_1);
156 dbsm_stop(&dsp_tx_sm);
157
158 // FIXME anything else?
159
160 putstr("\nirq: underrun\n");
161 }
162
gnuradio/usrp2/firmware/apps/tx_standalone.c — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
168 bp_clear_buf(DSP_RX_BUF_0);
169 bp_clear_buf(DSP_RX_BUF_1);
170 dbsm_stop(&dsp_rx_sm);
171
172 // FIXME anything else?
173
174 putstr("\nirq: overrun\n");
175 }
176
gnuradio/usrp2/firmware/apps/tx_standalone.c — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
231 putchar('\n');
232 }
233
234 if (status & BPS_ERROR_ALL){
235 // FIXME rare path, handle error conditions
236 }
237
238 if (status & BPS_DONE(DSP_TX_BUF_0)){
239 bp_clear_buf(DSP_TX_BUF_0);
gnuradio/usrp2/firmware/apps/txrx.c — 1
| Category |
Kludge |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
273 * Debugging ONLY. This will be handled by the tx_protocol_engine.
274 *
275 * This is called when the DSP Rx chain has filled in a packet.
276 * We set and increment the seqno, then return false, indicating
277 * that we didn't handle the packet. A bit of a kludge
278 * but it should work.
279 */
280 bool
281 fw_sets_seqno_inspector(dbsm_t *sm, int buf_this) // returns false
gnuradio/usrp2/firmware/apps/txrx.c — 2
| Category |
Magic |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
282 {
283 uint32_t *p = buffer_ram(buf_this);
284 uint32_t seqno = fw_seqno++;
285
286 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
287 uint32_t t = p[4];
288 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
289 p[4] = t;
290
gnuradio/usrp2/firmware/apps/txrx.c — 3
| Category |
Kludge |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
282 {
283 uint32_t *p = buffer_ram(buf_this);
284 uint32_t seqno = fw_seqno++;
285
286 // KLUDGE all kinds of nasty magic numbers and embedded knowledge
287 uint32_t t = p[4];
288 t = (t & 0xffff00ff) | ((seqno & 0xff) << 8);
289 p[4] = t;
290
gnuradio/usrp2/firmware/apps/txrx.c — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
384 if (pending & PIC_OVERRUN_INT){
385 dbsm_handle_rx_overrun(&dsp_rx_sm);
386 pic_regs->pending = PIC_OVERRUN_INT; // clear pending interrupt
387
388 // FIXME Figure out how to handle this robustly.
389 // Any buffers that are emptying should be allowed to drain...
390
391 if (streaming_p){
392 // restart_streaming();
gnuradio/usrp2/firmware/apps/txrx.c — 5
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
389 // Any buffers that are emptying should be allowed to drain...
390
391 if (streaming_p){
392 // restart_streaming();
393 // FIXME report error
394 }
395 else {
396 // FIXME report error
397 }
gnuradio/usrp2/firmware/apps/txrx.c — 6
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
392 // restart_streaming();
393 // FIXME report error
394 }
395 else {
396 // FIXME report error
397 }
398 putchar('O');
399 }
400 }
gnuradio/usrp2/firmware/include/usrp2_eth_packet.h
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
32 /*
33 * All these data structures are BIG-ENDIAN on the wire
34 */
35
36 // FIXME gcc specific. Really ought to come from compiler.h
37 #define _AL4 __attribute__((aligned (4)))
38
39 /*
40 * \brief The classic 14-byte ethernet header
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 }
gnuradio/usrp2/host/apps/rx_streaming_samples.cc — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
60 }
61
62 // ------------------------------------------------------------------------
63
64 // FIXME make this a template
65
66 class file_writer_16sc : public usrp2::rx_nop_handler
67 {
68 FILE *d_fp;
gnuradio/usrp2/host/apps/rx_streaming_samples.cc — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
291 std::cerr << "Failed to enable realtime scheduling" << std::endl;
292
293 usrp2::usrp2::sptr u2 = usrp2::usrp2::make(interface, mac_addr_str);
294
295 // FIXME in case it was left running...
296 if (!u2->stop_rx_streaming()){
297 fprintf(stderr, "stop_rx_streaming failed\n");
298 }
299
gnuradio/usrp2/host/apps/stdin_int32_fft.py — 1
| PyFlakes |
undefined name 'ok' |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
164 input_rate = 100e6 / self.options.decim
165 self.scope.set_sample_rate(input_rate)
166 if self.show_debug_info: # update displayed values
167 self.myform['decim'].set_value(self.u.decim_rate())
168 return ok
169
170 def _setup_events(self):
171 if not self.options.waterfall and not self.options.oscilloscope:
172 self.scope.win.Bind(wx.EVT_LEFT_DCLICK, self.evt_left_dclick)
gnuradio/usrp2/host/apps/stdin_int32_fft.py — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
108
109 def _build_subpanel(self, vbox_arg):
110 # build a secondary information panel (sometimes hidden)
111
112 # FIXME figure out how to have this be a subpanel that is always
113 # created, but has its visibility controlled by foo.Show(True/False)
114
115 def _form_set_decim(kv):
116 return self.set_decim(kv['decim'])
gnuradio/usrp2/host/apps/tx_samples.cc
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
256 if (fseek(fp, 0, SEEK_SET) == -1)
257 break;
258 }
259
260 // FIXME if r < 9, pad to 9 for minimum packet size constraint
261
262 if (!u2->tx_16sc(0, samples, r, &md)){
263 fprintf(stderr, "tx_complex_int16 failed\n");
264 break;
gnuradio/usrp2/host/include/usrp2/copiers.h
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
23 #include <stdint.h>
24
25 namespace usrp2 {
26
27 // FIXME we may want to rework this, but this will get us on the air
28
29 /*
30 * ----------------------------------------------------------------
31 * Copy and convert from USRP2 wire format to host format
gnuradio/usrp2/host/lib/copiers.cc — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
29 #include <stdexcept>
30 #include <assert.h>
31 #include <string.h>
32
33 // FIXME need gruel::not_implemented
34
35 namespace usrp2 {
36
37 /*
gnuradio/usrp2/host/lib/copiers.cc — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
35 namespace usrp2 {
36
37 /*
38 * N.B., in all of these, uint32_t *items is NOT 32-bit aligned!
39 * FIXME Needs fix for non-x86 machines.
40 */
41
42 /*
43 * ----------------------------------------------------------------
gnuradio/usrp2/host/lib/copiers.cc — 3
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
55 memcpy(host_items, items, nitems * sizeof(items[0]));
56
57 #else
58
59 // FIXME SIMD welcome here
60
61 for (size_t i = 0; i < nitems; i++){
62 uint32_t t = ntohx(items[i]);
63 //printf("%9d\n", items[i]);
gnuradio/usrp2/host/lib/copiers.cc — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
100 memcpy(items, host_items, nitems * sizeof(items[0]));
101
102 #else
103
104 // FIXME SIMD welcome here
105
106 for (size_t i = 0; i < nitems; i++){
107 items[i] = htonl((host_items[i].real() << 16) | (host_items[i].imag() & 0xffff));
108 }
gnuradio/usrp2/host/lib/eth_common.h — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
21
22 #ifndef INCLUDED_USRP2_ETH_COMMON_H
23 #define INCLUDED_USRP2_ETH_COMMON_H
24
25 #include <sys/uio.h> // FIXME autoconf this
26
27 namespace usrp2 {
28
29 enum eth_flags {
gnuradio/usrp2/host/lib/eth_common.h — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
29 enum eth_flags {
30 EF_DONTWAIT = 0x0001,
31 };
32
33 typedef struct iovec eth_iovec; // FIXME autoconf this
34
35 } // namespace usrp2
36
37
gnuradio/usrp2/host/lib/find.cc
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
33
34 #define FIND_DEBUG 0
35
36
37 // FIXME move to gruel
38
39 static struct timeval
40 time_duration_to_timeval(boost::posix_time::time_duration delta)
41 {
gnuradio/usrp2/host/lib/strtod_si.c
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
41 case 'M': r *= 1e6; break;
42 case 'G': r *= 1e9; break;
43 case 'T': r *= 1e12; break;
44 default:
45 // ignore. FIXME could be more robust
46 break;
47 }
48
49 *result = r;
gnuradio/usrp2/host/lib/usrp2_impl.cc — 1
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
102 {
103 if (payload_len_in_bytes < sizeof(u2_fixed_hdr_t)) // invalid format
104 return false;
105
106 // FIXME deal with the fact that (p % 4) == 2
107 //assert((((uintptr_t) p) % 4) == 0); // must be 4-byte aligned
108
109 u2_fixed_hdr_t *fh = static_cast<u2_fixed_hdr_t *>(p);
110
gnuradio/usrp2/host/lib/usrp2_impl.cc — 2
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
107 //assert((((uintptr_t) p) % 4) == 0); // must be 4-byte aligned
108
109 u2_fixed_hdr_t *fh = static_cast<u2_fixed_hdr_t *>(p);
110
111 // FIXME unaligned loads!
112 md->word0 = u2p_word0(fh);
113 md->timestamp = u2p_timestamp(fh);
114
115 // FIXME when we've got more info
gnuradio/usrp2/host/lib/usrp2_impl.cc — 3
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
bfe79d23738f24562dc7612049a90e8b20b53f79 |
111 // FIXME unaligned loads!
112 md->word0 = u2p_word0(fh);
113 md->timestamp = u2p_timestamp(fh);
114
115 // FIXME when we've got more info
116 // md->start_of_burst = (md->word0 & XXX) != 0;
117 // md->end_of_burst = (md->word0 & XXX) != 0;
118 // md->rx_overrun = (md->word0 & XXX) != 0;
119 md->start_of_burst = 0;
gnuradio/usrp2/host/lib/usrp2_impl.cc — 4
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
254 {
255 p->ehdr.ethertype = htons(U2_ETHERTYPE);
256 parse_mac_addr(dst, &p->ehdr.dst);
257 memcpy(&p->ehdr.src, d_eth_buf->mac(), 6);
258 p->thdr.flags = 0; // FIXME transport header values?
259 p->thdr.seqno = d_tx_seqno++;
260 p->thdr.ack = 0;
261 }
262
gnuradio/usrp2/host/lib/usrp2_impl.cc — 5
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
359 DEBUG_LOG(":");
360 // Receive available frames from ethernet buffer. Handler will
361 // process control frames, enqueue data packets in channel
362 // rings, and signal blocked API threads
363 int res = d_eth_buf->rx_frames(this, 100); // FIXME magic timeout
364 if (res == eth_buffer::EB_ERROR)
365 break;
366
367 // Wait for user API thread(s) to process all enqueued packets.
gnuradio/usrp2/host/lib/usrp2_impl.cc — 6
| Category |
Magic |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
359 DEBUG_LOG(":");
360 // Receive available frames from ethernet buffer. Handler will
361 // process control frames, enqueue data packets in channel
362 // rings, and signal blocked API threads
363 int res = d_eth_buf->rx_frames(this, 100); // FIXME magic timeout
364 if (res == eth_buffer::EB_ERROR)
365 break;
366
367 // Wait for user API thread(s) to process all enqueued packets.
gnuradio/usrp2/host/lib/usrp2_impl.cc — 7
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
383 usrp2::impl::operator()(const void *base, size_t len)
384 {
385 u2_eth_samples_t *pkt = (u2_eth_samples_t *)base;
386
387 // FIXME unaligned load!
388 int chan = u2p_chan(&pkt->hdrs.fixed);
389
390 if (chan == CONTROL_CHAN) { // control packets
391 DEBUG_LOG("c");
gnuradio/usrp2/host/lib/usrp2_impl.cc — 8
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
407 {
408 // point to beginning of payload (subpackets)
409 unsigned char *p = (unsigned char *)base + sizeof(u2_eth_packet_t);
410
411 // FIXME (p % 4) == 2. Not good. Must watch for unaligned loads.
412
413 // FIXME iterate over payload, handling more than a single subpacket.
414
415 int opcode = p[0];
gnuradio/usrp2/host/lib/usrp2_impl.cc — 9
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
409 unsigned char *p = (unsigned char *)base + sizeof(u2_eth_packet_t);
410
411 // FIXME (p % 4) == 2. Not good. Must watch for unaligned loads.
412
413 // FIXME iterate over payload, handling more than a single subpacket.
414
415 int opcode = p[0];
416 unsigned int oplen = p[1];
417 unsigned int rid = p[2];
gnuradio/usrp2/host/lib/usrp2_impl.cc — 10
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
443 u2_eth_samples_t *pkt = (u2_eth_samples_t *)base;
444 d_num_rx_frames++;
445 d_num_rx_bytes += len;
446
447 /* --- FIXME start of fake transport layer handler --- */
448
449 if (d_rx_seqno != -1) {
450 int expected_seqno = (d_rx_seqno + 1) & 0xFF;
451 int seqno = pkt->hdrs.thdr.seqno;
gnuradio/usrp2/host/lib/usrp2_impl.cc — 11
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
464 d_rx_seqno = pkt->hdrs.thdr.seqno;
465
466 /* --- end of fake transport layer handler --- */
467
468 // FIXME unaligned load!
469 unsigned int chan = u2p_chan(&pkt->hdrs.fixed);
470
471 {
472 gruel::scoped_lock l(d_channel_rings_mutex);
gnuradio/usrp2/host/lib/usrp2_impl.cc — 12
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
cfdc2e80d867777a405b3f1ba8ae6278b4f29f97 |
1145 {
1146 if (nitems == 0)
1147 return true;
1148
1149 // FIXME can't deal with nitems < U2_MIN_SAMPLES (will be fixed in VRT)
1150 // FIXME need to check the MTU instead of assuming 1500 bytes
1151
1152 // fragment as necessary then fire away
1153
gnuradio/usrp2/host/lib/usrp2_impl.cc — 13
| Category |
FIXME |
| Committer |
eb |
| Commit ID |
cfdc2e80d867777a405b3f1ba8ae6278b4f29f97 |
1146 if (nitems == 0)
1147 return true;
1148
1149 // FIXME can't deal with nitems < U2_MIN_SAMPLES (will be fixed in VRT)
1150 // FIXME need to check the MTU instead of assuming 1500 bytes
1151
1152 // fragment as necessary then fire away
1153
1154 size_t nframes = (nitems + U2_MAX_SAMPLES - 1) / U2_MAX_SAMPLES;
gnuradio/usrp2/host/lib/usrp2_socket_opener.cc
| Category |
FIXME |
| Committer |
jcorgan |
| Commit ID |
e0fcbaee124d3e8c4c11bdda662f88e082352058 |
111 int unix_domain_fd = strtol(argv[1], &endptr, 0);
112 if (*endptr != 0)
113 usage();
114
115 // FIXME get client credentials from unix_domain_fd using SCM_CREDENTIALS
116
117 // open the raw socket
118 int socket_fd = socket(PF_PACKET, SOCK_RAW, htons(0xBEEF));
119 if (socket_fd == -1){