Changeset 228 for soft/giet_vm/libs/libsrl/srl_hw_helpers.h
- Timestamp:
- Feb 12, 2013, 6:33:31 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/libs/libsrl/srl_hw_helpers.h
r178 r228 12 12 13 13 /** 14 15 */14 Standard API call, expands to nothing for this implementation. 15 */ 16 16 #define srl_busy_cycles(n) do{}while(0) 17 17 18 18 //void useless(void *pointless,...){} 19 19 /** 20 21 */20 @this flushes the cache line containing the address. 21 */ 22 22 //TODO 23 23 #define srl_dcache_flush_addr 0 24 24 25 25 /* 26 static inline cpu_dcache_invld(void *ptr){27 asm volatile ( 28 " cache %0, %1"29 : : "i" (0x11) , "R" (*(uint8_t*)(ptr))30 : "memory"31 );32 }33 */26 static inline cpu_dcache_invld(void *ptr){ 27 asm volatile ( 28 " cache %0, %1" 29 : : "i" (0x11) , "R" (*(uint8_t*)(ptr)) 30 : "memory" 31 ); 32 } 33 */ 34 34 35 35 /** 36 37 */36 @this flushes a memory zone from cache. 37 */ 38 38 //TODO 39 39 //void dcache_flush(const void * addr, size_t size) … … 41 41 42 42 /** 43 44 43 @this waits for at least the given time (in cycles). The actual 44 time spent in this call is not predictable. 45 45 46 47 */48 void srl_sleep_cycles( unsigned int time);46 @param time Number of cycles to wait for 47 */ 48 void srl_sleep_cycles(unsigned int time); 49 49 50 50 /** 51 52 51 @this returns the absolute timestamp counter from the 52 initialization of the platform. 53 53 54 @return Cycles from the initialization of the system 55 */ 56 static inline unsigned int srl_cycle_count() 57 { 58 return giet_proctime(); 54 @return Cycles from the initialization of the system 55 */ 56 static inline unsigned int srl_cycle_count() { 57 return giet_proctime(); 59 58 } 60 59 60 61 61 /** 62 @this aborts the current execution. On most systems, @this will 63 simply hang. 64 */ 65 static inline void srl_abort() 66 { 67 asm volatile ("break 0"); 68 while(1); 62 @this aborts the current execution. On most systems, @this will 63 simply hang. 64 */ 65 static inline void srl_abort() { 66 asm volatile ("break 0"); 67 while (1); 69 68 } 69 70 70 71 71 /** 72 72 * 73 73 */ 74 static inline void srl_exit() 75 { 74 static inline void srl_exit() { 76 75 giet_exit(); 77 76 } 78 77 79 78 #endif 79 80 // Local Variables: 81 // tab-width: 4 82 // c-basic-offset: 4 83 // c-file-offsets:((innamespace . 0)(inline-open . 0)) 84 // indent-tabs-mode: nil 85 // End: 86 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 87
Note: See TracChangeset
for help on using the changeset viewer.