Author: eb
Date: 2007-11-14 17:30:53 -0700 (Wed, 14 Nov 2007)
New Revision: 6908
Modified:
gnuradio/branches/developers/matt/u2f/firmware/buf_ram_test.c
Log:
added diagnostic output to buf_ram_test
Modified: gnuradio/branches/developers/matt/u2f/firmware/buf_ram_test.c
===================================================================
--- gnuradio/branches/developers/matt/u2f/firmware/buf_ram_test.c
2007-11-15 00:06:39 UTC (rev 6907)
+++ gnuradio/branches/developers/matt/u2f/firmware/buf_ram_test.c
2007-11-15 00:30:53 UTC (rev 6908)
@@ -82,9 +82,20 @@
for (n = 0; n < NBUFFERS; n++){
volatile int *p = buffer_ram(n);
- for (i = 0; i < BUFFER_POOL_BUFFER_SIZE; i++)
- if (p[i] != counter++)
+ for (i = 0; i < BUFFER_POOL_BUFFER_SIZE; i++, counter++){
+ int rd = p[i];
+ if (rd != counter){
+ hal_putc('b');
+ hal_putc(n + '0');
+ hal_putc('[');
+ hal_puthex16(i);
+ hal_puts("] exp: ");
+ hal_puthex32(counter);
+ hal_puts(" got: ");
+ hal_puthex32_nl(rd);
nerrors++;
+ }
+ }
}
return nerrors;
}
@@ -96,9 +107,15 @@
u2_init();
output_regs->leds = 0;
- mdelay(100);
+
+ if (!hwconfig_simulation_p())
+ mdelay(100);
+
output_regs->leds = 0x3;
- mdelay(100);
+
+ if (!hwconfig_simulation_p())
+ mdelay(100);
+
output_regs->leds = 0;
write_bufs();
_______________________________________________
Commit-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnuradio