Ignore:
Timestamp:
Oct 4, 2014, 3:19:32 PM (10 years ago)
Author:
alain
Message:

Introducing fixed format (X_WIDTH / Y_WIDTH / P_WIDTH) for processor index.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_kernel/exc_handler.c

    r294 r428  
    7272{
    7373    unsigned int gpid       = _get_procid();
    74     unsigned int cluster_xy = gpid / NB_PROCS_MAX;
    75     unsigned int lpid       = gpid % NB_PROCS_MAX;
     74    unsigned int cluster_xy = gpid >> P_WIDTH;
    7675    unsigned int x          = cluster_xy >> Y_WIDTH;
    7776    unsigned int y          = cluster_xy & ((1<<Y_WIDTH)-1);
     77    unsigned int lpid       = gpid & ((1<<P_WIDTH)-1);
     78
    7879    unsigned int task       = _get_context_slot(CTX_LTID_ID);
    7980
Note: See TracChangeset for help on using the changeset viewer.