Changeset 468 for soft/giet_vm/giet_libs
- Timestamp:
- Dec 12, 2014, 5:06:18 PM (10 years ago)
- Location:
- soft/giet_vm/giet_libs
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/barrier.c
r431 r468 12 12 13 13 /////////////////////////////////////////////////////////////////////////////////// 14 ///////////////////////////////////////////////////////////////////////////////////15 14 // Simple barrier access functions 16 ///////////////////////////////////////////////////////////////////////////////////17 15 /////////////////////////////////////////////////////////////////////////////////// 18 16 … … 32 30 { 33 31 34 #if GIET_DEBUG_ BARRIER32 #if GIET_DEBUG_USER_BARRIER 35 33 unsigned int x; 36 34 unsigned int y; … … 85 83 asm volatile ("sync" ::: "memory"); 86 84 87 #if GIET_DEBUG_ BARRIER85 #if GIET_DEBUG_USER_BARRIER 88 86 giet_shr_printf("[DEBUG BARRIER] proc[%d,%d,%d] exit barrier_wait()\n", x, y, p ); 89 87 #endif … … 176 174 barrier->ntasks = ntasks; 177 175 178 #if GIET_DEBUG_ BARRIER176 #if GIET_DEBUG_USER_BARRIER 179 177 giet_shr_printf("\n[DEBUG BARRIER] sbt_nodes allocation / ntasks = %d\n", ntasks ); 180 178 #endif … … 200 198 ( (l == 8) && ((x&0x0F) == 0) && ((y&0x0F) == 0) ) ) 201 199 { 202 barrier->node[x][y][l] = remote_malloc( SBT_NODE_SIZE, x, y );203 204 #if GIET_DEBUG_ BARRIER200 barrier->node[x][y][l] = remote_malloc( sizeof(sbt_node_t), x, y ); 201 202 #if GIET_DEBUG_USER_BARRIER 205 203 giet_shr_printf("[DEBUG SBT] node[%d][%d][%d] : vaddr = %x\n", 206 204 x, y, l, (unsigned int)barrier->node[x][y][l] ); … … 211 209 } 212 210 213 #if GIET_DEBUG_ BARRIER211 #if GIET_DEBUG_USER_BARRIER 214 212 giet_shr_printf("\n[DEBUG SBT] SBT nodes initialisation\n"); 215 213 #endif … … 261 259 node->child1 = NULL; 262 260 263 #if GIET_DEBUG_ BARRIER261 #if GIET_DEBUG_USER_BARRIER 264 262 giet_shr_printf("[DEBUG BARRIER] initialize sbt_node[%d][%d][%d] :" 265 263 " arity = %d / child0 = %x / child1 = %x\n", … … 302 300 node->child1 = barrier->node[x1][y1][level-1]; 303 301 304 #if GIET_DEBUG_ BARRIER302 #if GIET_DEBUG_USER_BARRIER 305 303 giet_shr_printf("[DEBUG BARRIER] initialize sbt_node[%d][%d][%d] :" 306 304 " arity = %d / child0 = %x / child1 = %x\n", -
soft/giet_vm/giet_libs/barrier.h
r368 r468 69 69 struct sbt_node_s* child0; // pointer on children node 70 70 struct sbt_node_s* child1; // pointer on children node 71 unsigned int padding; // for 32 bytes alignment 71 72 } sbt_node_t; 72 73 #define SBT_NODE_SIZE 3274 73 75 74 typedef struct giet_sbt_barrier_s -
soft/giet_vm/giet_libs/malloc.c
r431 r468 8 8 #include "malloc.h" 9 9 #include "stdio.h" 10 #include "giet_config.h" 10 11 11 12 // Global variables defining the heap descriptors array (one heap per cluster) … … 51 52 { 52 53 giet_shr_printf( 53 " - coordinates = [%d][%d]\n"54 54 " - heap_base = %x\n" 55 55 " - heap_size = %x\n" … … 80 80 " - free[22] = %x\n" 81 81 " - free[23] = %x\n", 82 heap[x][y].x, heap[x][y].y,83 82 heap[x][y].heap_base, heap[x][y].heap_size, 84 83 heap[x][y].alloc_base, heap[x][y].alloc_size, … … 115 114 heap_index = GET_SIZE_INDEX( heap_size ); 116 115 116 #if GIET_DEBUG_USER_MALLOC 117 giet_shr_printf("\n[DEBUG USER_MALLOC] Starting Heap[%d][%d] initialisation /" 118 " base = %x / size = %x\n", x, y, heap_base, heap_size ); 119 #endif 120 117 121 // checking heap segment constraints 118 122 if ( heap_size == 0 ) // heap segment exist … … 166 170 heap[x][y].alloc_base = alloc_base; 167 171 168 lock_ release( &heap[x][y].lock );169 170 #if GIET_DEBUG_ MALLOC171 giet_shr_printf("\n[ MALLOC DEBUG] Completing Heap[%d][%d] initialisation\n", x, y );172 lock_init( &heap[x][y].lock ); 173 174 #if GIET_DEBUG_USER_MALLOC 175 giet_shr_printf("\n[DEBUG USER_MALLOC] Completing Heap[%d][%d] initialisation\n", x, y ); 172 176 display_free_array(x,y); 173 177 #endif … … 238 242 { 239 243 240 #if GIET_DEBUG_ MALLOC241 giet_shr_printf("\n[ MALLOC DEBUG] Malloc request for Heap[%d][%d] / size = %x\n",244 #if GIET_DEBUG_USER_MALLOC 245 giet_shr_printf("\n[DEBUG USER_MALLOC] Malloc request for Heap[%d][%d] / size = %x\n", 242 246 x, y, size ); 243 247 #endif … … 260 264 if ( heap[x][y].init != HEAP_INITIALIZED ) 261 265 { 262 heap_init( x , y );266 heap_init( x , y ); 263 267 } 264 268 … … 288 292 lock_release( &heap[x][y].lock ); 289 293 290 #if GIET_DEBUG_ MALLOC291 giet_shr_printf("\n[ MALLOC DEBUG] Malloc vaddr from Heap[%d][%d] = %x\n",294 #if GIET_DEBUG_USER_MALLOC 295 giet_shr_printf("\n[DEBUG USER_MALLOC] Malloc vaddr from Heap[%d][%d] = %x\n", 292 296 x, y, base ); 293 297 display_free_array(x,y); … … 383 387 giet_get_xy( ptr, &x, &y ); 384 388 385 #if GIET_DEBUG_ MALLOC386 giet_shr_printf("\n[ MALLOC DEBUG] Free for vaddr = %x / x = %d / y = %d\n",389 #if GIET_DEBUG_USER_MALLOC 390 giet_shr_printf("\n[DEBUG USER_MALLOC] Free for vaddr = %x / x = %d / y = %d\n", 387 391 (unsigned int)ptr, x, y ); 388 392 #endif … … 418 422 lock_release( &heap[x][y].lock ); 419 423 420 #if GIET_DEBUG_ MALLOC424 #if GIET_DEBUG_USER_MALLOC 421 425 display_free_array(x,y); 422 426 #endif -
soft/giet_vm/giet_libs/mwmr_channel.c
r461 r468 18 18 { 19 19 20 #if GIET_DEBUG_ MWMR20 #if GIET_DEBUG_USER_MWMR 21 21 unsigned int x; 22 22 unsigned int y; … … 45 45 { 46 46 47 #if GIET_DEBUG_ MWMR47 #if GIET_DEBUG_USER_MWMR 48 48 unsigned int x; 49 49 unsigned int y; … … 84 84 mwmr->ptw = ptw; 85 85 86 #if GIET_DEBUG_ MWMR86 #if GIET_DEBUG_USER_MWMR 87 87 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] writes %d words in fifo %x : sts = %d\n", 88 88 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); … … 109 109 mwmr->ptw = ptw; 110 110 111 #if GIET_DEBUG_ MWMR111 #if GIET_DEBUG_USER_MWMR 112 112 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] writes %d words in fifo %x : sts = %d\n", 113 113 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); … … 127 127 { 128 128 129 #if GIET_DEBUG_ MWMR129 #if GIET_DEBUG_USER_MWMR 130 130 unsigned int x; 131 131 unsigned int y; … … 164 164 mwmr->ptr = ptr; 165 165 166 #if GIET_DEBUG_ MWMR166 #if GIET_DEBUG_USER_MWMR 167 167 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] read %d words in fifo %x : sts = %d\n", 168 168 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); … … 175 175 { 176 176 177 #if GIET_DEBUG_ MWMR177 #if GIET_DEBUG_USER_MWMR 178 178 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] read nothing in fifo %x : sts = %d\n", 179 179 x, y, lpid, (unsigned int)mwmr, mwmr->sts ); … … 195 195 mwmr->ptr = ptr; 196 196 197 #if GIET_DEBUG_ MWMR197 #if GIET_DEBUG_USER_MWMR 198 198 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] read %d words in fifo %x : sts = %d\n", 199 199 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); … … 213 213 { 214 214 215 #if GIET_DEBUG_ MWMR215 #if GIET_DEBUG_USER_MWMR 216 216 unsigned int x; 217 217 unsigned int y; … … 254 254 mwmr->sts = sts + nwords; 255 255 256 #if GIET_DEBUG_ MWMR256 #if GIET_DEBUG_USER_MWMR 257 257 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] writes %d words in fifo %x : sts = %d\n", 258 258 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); … … 280 280 items = items - (nwords/width); 281 281 282 #if GIET_DEBUG_ MWMR282 #if GIET_DEBUG_USER_MWMR 283 283 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] writes %d words in fifo %x : sts = %d\n", 284 284 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); … … 300 300 { 301 301 302 #if GIET_DEBUG_ MWMR302 #if GIET_DEBUG_USER_MWMR 303 303 unsigned int x; 304 304 unsigned int y; … … 339 339 mwmr->ptr = ptr; 340 340 341 #if GIET_DEBUG_ MWMR341 #if GIET_DEBUG_USER_MWMR 342 342 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] read %d words in fifo %x : sts = %d\n", 343 343 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); … … 365 365 items = items - (nwords/width); 366 366 367 #if GIET_DEBUG_ MWMR367 #if GIET_DEBUG_USER_MWMR 368 368 giet_shr_printf("\n[MWMR DEBUG] Proc[%d,%d,%d] read %d words in fifo %x : sts = %d\n", 369 369 x, y, lpid, nwords, (unsigned int)mwmr, mwmr->sts ); -
soft/giet_vm/giet_libs/stdio.h
r461 r468 232 232 extern void giet_nic_tx_stats(); 233 233 234 extern void giet_nic_rx_clear(); 235 236 extern void giet_nic_tx_clear(); 237 234 238 ////////////////////////////////////////////////////////////////////////// 235 239 // FAT related system calls
Note: See TracChangeset
for help on using the changeset viewer.