Changeset 580 for soft/giet_vm/giet_libs/user_barrier.c
- Timestamp:
- May 28, 2015, 3:34:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/user_barrier.c
r541 r580 214 214 // compute SQT levels 215 215 unsigned int levels; 216 unsigned int side;217 216 unsigned int z = (x_size > y_size) ? x_size : y_size; 218 217 levels = (z < 2) ? 1 : (z < 3) ? 2 : (z < 5) ? 3 : (z < 9) ? 4 : 5; 218 219 #if GIET_DEBUG_USER_BARRIER 220 unsigned int side; 219 221 side = (z < 2) ? 1 : (z < 3) ? 2 : (z < 5) ? 4 : (z < 9) ? 8 : 16; 220 221 #if GIET_DEBUG_USER_BARRIER222 222 giet_shr_printf("\n[DEBUG USER BARRIER] sqt_nodes allocation\n" 223 223 " x_size = %d / y_size = %d / levels = %d / side = %d\n", … … 286 286 giet_proc_xyp( &px, &py, &pl ); 287 287 giet_shr_printf("\n[DEBUG USER BARRIER] P[%d,%d,%d] decrement SQT barrier node %x :\n" 288 " level = %d / arity = %d / sense = %d / count = %d\n",288 " level = %d / parent = %x / arity = %d / sense = %d / count = %d\n", 289 289 px , py , pl , (unsigned int)node , 290 node->level , node-> arity , node->sense , node->count );290 node->level , node->parent, node->arity , node->sense , node->count ); 291 291 #endif 292 292 293 293 // compute expected sense value 294 294 unsigned int expected; 295 295 296 if ( node->sense == 0) expected = 1; 296 297 else expected = 0; … … 312 313 : "r" (pcount) 313 314 : "$2", "$8", "$9", "memory" ); 314 315 315 316 if ( count == 1 ) // last task 316 317 { 317 318 // decrement the parent node if the current node is not the root 318 if ( node->parent != NULL ) 319 if ( node->parent != NULL ) { 319 320 sqt_barrier_decrement( node->parent ); 321 } 320 322 321 323 // reset the current node … … 355 357 unsigned int lpid; 356 358 giet_proc_xyp( &x, &y, &lpid ); 359 #if GIET_DEBUG_USER_BARRIER 360 giet_shr_printf("[DEBUG SQT USER BARRIER] proc[%d,%d,%d] enters sqt_barrier_wait(). vaddr=%x. node=%x\n", 361 x, y, lpid, barrier, barrier->node[x][y][0] ); 362 #endif 357 363 358 364 // recursively decrement count from bottom to root
Note: See TracChangeset
for help on using the changeset viewer.