Changeset 175 for soft/giet_vm/libs
- Timestamp:
- Jul 21, 2012, 10:20:47 AM (12 years ago)
- Location:
- soft/giet_vm/libs
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/libs/common.c
r160 r175 1 2 //////////////////////////////////////////////////////////////////////////////////////// 3 // mempcy() 4 // GCC requires this function. Taken from MutekH. 5 //////////////////////////////////////////////////////////////////////////////////////// 1 ///////////////////////////////////////////////////////////// 6 2 void *memcpy(void *_dst, const void *_src, unsigned int size) 7 3 { … … 23 19 } 24 20 25 //////////////////////////////////////////////////////////////////////////////////////// 26 // mempcy() 27 // GCC requires this function. Taken from MutekH. 28 //////////////////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////// 29 22 inline void * memset(void *dst, int s, unsigned int count) 30 23 { -
soft/giet_vm/libs/libsrl/srl_hw_helpers.h
r160 r175 63 63 */ 64 64 65 65 //static: to avoid multiple definition error 66 66 static inline unsigned int srl_cycle_count() 67 67 { 68 return proctime();68 return giet_proctime(); 69 69 } 70 70 … … 79 79 } 80 80 81 /** 82 * 83 */ 84 static inline void srl_exit() 85 { 86 giet_exit(); 87 } 88 81 89 #endif -
soft/giet_vm/libs/libsrl/srl_log.h
r160 r175 48 48 #define srl_log( l, c ) do { \ 49 49 if (GET_VERB(l) <= GET_VERB(CONFIG_SRL_VERBOSITY)) { \ 50 tty_printf(c); \50 giet_tty_printf(c); \ 51 51 } \ 52 52 } while (0) … … 60 60 #define srl_log_printf( l, ... ) do { \ 61 61 if (GET_VERB(l) <= GET_VERB(CONFIG_SRL_VERBOSITY)) { \ 62 tty_printf(__VA_ARGS__); \62 giet_tty_printf(__VA_ARGS__); \ 63 63 } \ 64 64 } while (0) -
soft/giet_vm/libs/libsrl/srl_mwmr.h
r160 r175 2 2 #define SRL_MWMR_H_ 3 3 4 #include "mwmr .h"4 #include "mwmr_channel.h" 5 5 6 #define srl_mwmr_t mwmr_channel_t* 6 typedef mwmr_channel_t* srl_mwmr_t; 7 7 8 8 #define srl_mwmr_write mwmr_write -
soft/giet_vm/libs/mwmr_channel.c
r165 r175 33 33 #include <mwmr_channel.h> 34 34 #include <stdio.h> 35 #include <common.h> 35 36 36 37 ////////////////////////////////////////////////////////////////////////////// … … 85 86 unsigned int ptw; // channel ptw 86 87 88 if(nitems == 0) 89 return; 90 91 assert(buffer && "mwmr write: Empty buffer"); 92 87 93 while(1) 88 94 { … … 118 124 else // write as many items as possible, release lock and retry after delay 119 125 { 120 nwords = (spaces/width) * width; // integer n mber of items126 nwords = (spaces/width) * width; // integer number of items 121 127 for ( x = 0 ; x < nwords ; x++ ) 122 128 { … … 157 163 unsigned int ptr; // channel ptw 158 164 165 if(nitems == 0) 166 return; 167 168 assert(buffer && "mwmr read: Empty buffer"); 169 159 170 while(1) 160 171 { -
soft/giet_vm/libs/srl.h
r160 r175 22 22 //#include "libsrl/srl_mwmr_sys.h" 23 23 24 /* port, APP_NAME, TASK */ 25 # define GET_MWMR(port) \ 24 #define GET_MWMR(port) GET_ARG(port, VOBJ_TYPE_MWMR) 25 /* port, APP_NAME, TASK, #task_name, alias */ 26 # define SRL_GET_ARG(task_name, port, type) \ 26 27 ({ \ 27 srl_mwmr_t 28 if( vobj_get_vbase( APP_NAME , #port, MWMR, (unsigned int*)&_mwmr ) ) \28 srl_mwmr_t _mwmr; \ 29 if( giet_vobj_get_vbase( APP_NAME , alias_##task_name.port, type, (unsigned int*)&_mwmr ) ) \ 29 30 { \ 30 srl_log_printf( NONE, "\n[ERROR] in " TASK" task :\n"); \31 srl_log_printf( NONE, " undefined <"#port"> channel: %d\n",_mwmr); \31 srl_log_printf( NONE, "\n[ERROR] in "#task_name" task :\n"); \ 32 srl_log_printf( NONE, " undefined port <"#port"> for channel(%s): %d\n", alias_##task_name.port,_mwmr); \ 32 33 srl_log_printf( TRACE, "*** &"#port" = %x\n\n", (unsigned int)_mwmr ); \ 33 exit();/*srl?*/\34 srl_exit(); \ 34 35 }else \ 35 srl_log_printf( TRACE, "%s:%d: arg of %s for %s,from %s; &"#port" = %x\n\n", __FILE__, __LINE__, APP_NAME, TASK,#port, (unsigned int)_mwmr ); \36 srl_log_printf( TRACE, "%s:%d: arg of %s for %s,from %s; &"#port" = %x\n\n", __FILE__, __LINE__, APP_NAME, #task_name,#port, (unsigned int)_mwmr ); \ 36 37 _mwmr;\ 37 38 }) 38 39 40 41 42 39 43 #endif 40 44
Note: See TracChangeset
for help on using the changeset viewer.