Kludge Tracker: Gnuradio - v3.4.0-101-g7e2b45b
Parent Directory
(gnuradio/usrp2)
Kludge Summary of gnuradio/usrp2/firmware
| Total Kludges |
90 |
| Total Subdirs |
4 |
All Directories within gnuradio/usrp2/firmware
All Files within gnuradio/usrp2/firmware
Kludge Snippets in gnuradio/usrp2/firmware
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 }