Ignore:
Timestamp:
Oct 4, 2014, 4:33:31 PM (10 years ago)
Author:
alain
Message:

1) Introduce the "applications" directory.
2) Introduce the fixed format (X_WIDTH / Y_WIDTH / P_WIDTH) for processor index in all applications.

Location:
soft/giet_vm/applications
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/router/main.c

    r345 r432  
    2020    mwmr_channel_t*     mwmr;
    2121
    22     unsigned int    procid     = giet_procid();
    23     unsigned int    cluster_xy = procid/NB_PROCS_MAX;
    24     unsigned int    lpid       = procid%NB_PROCS_MAX;
    25     unsigned int    x          = cluster_xy >> Y_WIDTH;
    26     unsigned int    y          = cluster_xy & ((1<<Y_WIDTH)-1);
     22    // get processor identifiers
     23    unsigned int    x;
     24    unsigned int    y;
     25    unsigned int    lpid;
     26    giet_proc_xyp( &x, &y, &lpid );
    2727
    2828    printf( "*** Starting task producer on processor[%d,%d,%d] at cycle %d\n\n",
     
    5252    mwmr_channel_t*     mwmr;
    5353
    54     unsigned int    procid     = giet_procid();
    55     unsigned int    cluster_xy = procid/NB_PROCS_MAX;
    56     unsigned int    lpid       = procid%NB_PROCS_MAX;
    57     unsigned int    x          = cluster_xy >> Y_WIDTH;
    58     unsigned int    y          = cluster_xy & ((1<<Y_WIDTH)-1);
     54    // get processor identifiers
     55    unsigned int    x;
     56    unsigned int    y;
     57    unsigned int    lpid;
     58    giet_proc_xyp( &x, &y, &lpid );
    5959
    6060    printf( "*** Starting task consumer on processor[%d,%d,%d] at cycle %d\n\n",
     
    8585    mwmr_channel_t* mwmr_out ;
    8686
    87     unsigned int    procid     = giet_procid();
    88     unsigned int    cluster_xy = procid/NB_PROCS_MAX;
    89     unsigned int    lpid       = procid%NB_PROCS_MAX;
    90     unsigned int    x          = cluster_xy >> Y_WIDTH;
    91     unsigned int    y          = cluster_xy & ((1<<Y_WIDTH)-1);
     87    // get processor identifiers
     88    unsigned int    x;
     89    unsigned int    y;
     90    unsigned int    lpid;
     91    giet_proc_xyp( &x, &y, &lpid );
    9292
    9393    printf( "*** Starting task router on processor[%d,%d,%d] at cycle %d\n\n",
Note: See TracChangeset for help on using the changeset viewer.