Ignore:
Timestamp:
May 28, 2015, 3:34:23 PM (9 years ago)
Author:
laurent
Message:

Try

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/user_barrier.c

    r541 r580  
    214214    // compute SQT levels
    215215    unsigned int levels;
    216     unsigned int side;
    217216    unsigned int z = (x_size > y_size) ? x_size : y_size;
    218217    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;
    219221    side   = (z < 2) ? 1 : (z < 3) ? 2 : (z < 5) ? 4 : (z < 9) ? 8 : 16;
    220 
    221 #if GIET_DEBUG_USER_BARRIER
    222222giet_shr_printf("\n[DEBUG USER BARRIER] sqt_nodes allocation\n"
    223223                " x_size = %d / y_size = %d / levels = %d / side = %d\n",
     
    286286giet_proc_xyp( &px, &py, &pl );
    287287giet_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",
    289289                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 );
    291291#endif
    292292
    293293    // compute expected sense value
    294294    unsigned int expected;
     295   
    295296    if ( node->sense == 0) expected = 1;
    296297    else                   expected = 0;
     
    312313                  : "r" (pcount)
    313314                  : "$2", "$8", "$9", "memory" );
    314 
     315   
    315316    if ( count == 1 )    // last task 
    316317    {
    317318        // decrement the parent node if the current node is not the root
    318         if ( node->parent != NULL )     
     319        if ( node->parent != NULL )      {
    319320            sqt_barrier_decrement( node->parent );
     321        }
    320322
    321323        // reset the current node
     
    355357    unsigned int    lpid;
    356358    giet_proc_xyp( &x, &y, &lpid );
     359#if GIET_DEBUG_USER_BARRIER
     360giet_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
    357363
    358364    // recursively decrement count from bottom to root
Note: See TracChangeset for help on using the changeset viewer.