4 extern void icache_test(long count, long step);
5 extern void icache_test2(long count);
9 printf("[bytes]\t[us]\n");
11 struct timeval now, tm;
16 for (i=0 ; step<=2048 ; i++, step+=32)
19 gettimeofday(&now, 0);
20 icache_test(0x800000L, step);
22 t = (tm.tv_sec*1000000LL+tm.tv_usec) - (now.tv_sec*1000000LL+now.tv_usec);
23 printf("%6ld\t%lld\n", step*32, t);
26 gettimeofday(&now, 0);
27 icache_test2(0x800000L / 2048);
29 t = (tm.tv_sec*1000000LL+tm.tv_usec) - (now.tv_sec*1000000LL+now.tv_usec);
30 MBs = (8388608LL*32*1000000) / (t * (1024*1024));
31 printf("\n%6lld us\t%ld MB/s\n", t, MBs);