Changeset 558 for soft/giet_vm/giet_libs
- Timestamp:
- Apr 13, 2015, 5:30:16 PM (10 years ago)
- Location:
- soft/giet_vm/giet_libs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/stdio.c
r550 r558 80 80 /////////////////////////////////////////////////// 81 81 void giet_coproc_alloc( unsigned int coproc_type, 82 unsigned int* coproc_info, 83 unsigned int* cluster_xy ) 82 unsigned int* coproc_info ) 84 83 { 85 84 if ( sys_call( SYSCALL_COPROC_ALLOC, 86 85 coproc_type, 87 86 (unsigned int)coproc_info, 88 (unsigned int)cluster_xy, 89 0 ) ) 87 0, 0 ) ) 90 88 giet_exit("error in giet_coproc_alloc()"); 91 89 } 92 90 93 /////////////////////////////////////////////////// 94 void giet_coproc_release( unsigned int c luster_xy)91 ///////////////////////////////////////////////////////// 92 void giet_coproc_release( unsigned int coproc_reg_index ) 95 93 { 96 94 if ( sys_call( SYSCALL_COPROC_RELEASE, 97 c luster_xy,95 coproc_reg_index, 98 96 0, 0, 0 ) ) 99 97 giet_exit("error in giet_coproc_release()"); … … 101 99 102 100 ////////////////////////////////////////////////////////////////// 103 void giet_coproc_channel_init( unsigned int cluster_xy, 104 unsigned int channel, 101 void giet_coproc_channel_init( unsigned int channel, 105 102 giet_coproc_channel_t* desc ) 106 103 { 107 104 if ( sys_call( SYSCALL_COPROC_CHANNEL_INIT, 108 cluster_xy,109 105 channel, 110 106 (unsigned int)desc, 111 0 ) )112 giet_exit("error in giet_coproc_channel_init");113 }114 115 ////////////////////////////////////////////////////////////116 void giet_coproc_channel_start( unsigned int cluster_xy,117 unsigned int channel )118 {119 if ( sys_call( SYSCALL_COPROC_CHANNEL_START,120 cluster_xy,121 channel,122 107 0, 0 ) ) 123 giet_exit("error in giet_coproc_channel_start"); 124 } 125 126 /////////////////////////////////////////////////////////// 127 void giet_coproc_channel_stop( unsigned int cluster_xy, 128 unsigned int channel ) 129 { 130 if ( sys_call( SYSCALL_COPROC_CHANNEL_STOP, 131 cluster_xy, 132 channel, 133 0, 0 ) ) 134 giet_exit("error in giet_coproc_channel_stop"); 135 } 136 137 ///////////////////////////////////////////////////////// 138 void giet_coproc_completed( unsigned int cluster_xy ) 108 giet_exit("error in giet_coproc_channel_init()"); 109 } 110 111 ///////////////////////////////////////////////////// 112 void giet_coproc_run( unsigned int coproc_reg_index ) 113 { 114 if ( sys_call( SYSCALL_COPROC_RUN, 115 coproc_reg_index, 116 0, 0, 0 ) ) 117 giet_exit("error in giet_coproc_run()"); 118 } 119 120 //////////////////////////// 121 void giet_coproc_completed() 139 122 { 140 123 if ( sys_call( SYSCALL_COPROC_COMPLETED, 141 cluster_xy, 142 0, 0, 0 ) ) 124 0, 0, 0, 0 ) ) 143 125 giet_exit("error in giet_coproc_completed"); 144 }145 146 ///////////////////////////////////////////////////////////147 void giet_coproc_register_set( unsigned int cluster_xy,148 unsigned int index,149 unsigned int value )150 {151 if ( sys_call( SYSCALL_COPROC_REGISTER_SET,152 cluster_xy,153 index,154 value,155 0 ) )156 giet_exit("error in giet_coproc_register_set");157 }158 159 ///////////////////////////////////////////////////////////160 void giet_coproc_register_get( unsigned int cluster_xy,161 unsigned int index,162 unsigned int* value )163 {164 if ( sys_call( SYSCALL_COPROC_REGISTER_SET,165 cluster_xy,166 index,167 (unsigned int)value,168 0 ) )169 giet_exit("error in giet_coproc_register_get");170 126 } 171 127 -
soft/giet_vm/giet_libs/stdio.h
r550 r558 75 75 // 0x36 76 76 // 0x37 77 #define SYSCALL_COPROC_REGISTER_GET0x3878 #define SYSCALL_COPROC_REGISTER_SET0x3979 #define SYSCALL_COPROC_RELEASE0x3A77 // 0x38 78 // 0x39 79 // 0x3A 80 80 #define SYSCALL_COPROC_COMPLETED 0x3B 81 81 #define SYSCALL_COPROC_ALLOC 0x3C 82 82 #define SYSCALL_COPROC_CHANNEL_INIT 0x3D 83 #define SYSCALL_COPROC_ CHANNEL_START0x3E84 #define SYSCALL_COPROC_ CHANNEL_STOP0x3F83 #define SYSCALL_COPROC_RUN 0x3E 84 #define SYSCALL_COPROC_RELEASE 0x3F 85 85 86 86 //////////////////////////////////////////////////////////////////////////// … … 175 175 176 176 extern void giet_coproc_alloc( unsigned int coproc_type, 177 unsigned int* coproc_info, 178 unsigned int* cluster_xy ); 179 180 extern void giet_coproc_release( unsigned int cluster_xy ); 181 182 extern void giet_coproc_channel_init( unsigned int cluster_xy, 183 unsigned int channel, 177 unsigned int* coproc_info ); 178 179 extern void giet_coproc_release( unsigned int coproc_reg_index ); 180 181 extern void giet_coproc_channel_init( unsigned int channel, 184 182 giet_coproc_channel_t* desc ); 185 183 186 extern void giet_coproc_channel_start( unsigned int cluster_xy, 187 unsigned int channel ); 188 189 extern void giet_coproc_channel_stop ( unsigned int cluster_xy, 190 unsigned int channel ); 191 192 extern void giet_coproc_completed( unsigned int cluster_xy ); 193 194 extern void giet_coproc_register_set( unsigned int cluster_xy, 195 unsigned int reg_index, 196 unsigned int value ); 197 198 extern void giet_coproc_register_get( unsigned int cluster_xy, 199 unsigned int reg_index, 200 unsigned int* buffer ); 184 extern void giet_coproc_run( unsigned int coproc_reg_index ); 185 186 extern void giet_coproc_completed(); 201 187 202 188 //////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.