comparison packages/hal/common/current/tests/cache.c @ 50:a0774359f013 ecos-sw-1999-11-02

Merge from eCos master repository on 1999-11-02-17:02:15-GMT
author jlarmour
date Tue, 02 Nov 1999 20:57:07 +0000
parents 5f5102441818
children c38311975d4f
comparison
equal deleted inserted replaced
49:698ff3191b93 50:a0774359f013
41 41
42 #include <cyg/hal/hal_cache.h> 42 #include <cyg/hal/hal_cache.h>
43 #include <cyg/hal/hal_intr.h> 43 #include <cyg/hal/hal_intr.h>
44 #include <cyg/infra/diag.h> 44 #include <cyg/infra/diag.h>
45 45
46 #if (HAL_DCACHE_SIZE > 0)
47
46 // ------------------------------------------------------------------------- 48 // -------------------------------------------------------------------------
47 // If the HAL does not supply this, we supply our own version 49 // If the HAL does not supply this, we supply our own version
48 50
49 #ifdef HAL_DCACHE_SYNC 51 #ifdef HAL_DCACHE_SYNC
50 52
67 69
68 #endif 70 #endif
69 71
70 // ------------------------------------------------------------------------- 72 // -------------------------------------------------------------------------
71 73
72 #define MAXSIZE 1<<18
73
74 volatile char m[MAXSIZE];
75
76 #ifndef MAX_STRIDE 74 #ifndef MAX_STRIDE
77 #define MAX_STRIDE 64 75 #define MAX_STRIDE 64
78 #endif 76 #endif
77
78 volatile char m[(HAL_DCACHE_SIZE/HAL_DCACHE_LINE_SIZE)*MAX_STRIDE];
79 79
80 // ------------------------------------------------------------------------- 80 // -------------------------------------------------------------------------
81 81
82 static void time0(register cyg_uint32 stride) 82 static void time0(register cyg_uint32 stride)
83 { 83 {
207 cyg_start( void ) 207 cyg_start( void )
208 { 208 {
209 cache_main(); 209 cache_main();
210 } 210 }
211 211
212 #else // (HAL_DCACHE_SIZE > 0)
213 #define N_A_MSG "No cache"
214 #endif // (HAL_DCACHE_SIZE > 0)
215
216 #ifdef N_A_MSG
217 externC void
218 cyg_start( void )
219 {
220 CYG_TEST_INIT();
221 CYG_TEST_NA( N_A_MSG );
222 }
223 #endif // N_A_MSG
224
212 // ------------------------------------------------------------------------- 225 // -------------------------------------------------------------------------
213 /* EOF cache.c */ 226 /* EOF cache.c */