Ignore:
Timestamp:
Jan 30, 2014, 5:42:51 PM (11 years ago)
Author:
cfuguet
Message:

Fixing way to compute indexes for debug in tsar_generic_xbar
platform.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/platforms/tsar_generic_xbar/top.cpp

    r619 r625  
    950950        // trace proc[debug_proc_id]
    951951        size_t l = debug_proc_id % NB_PROCS_MAX ;
    952         size_t y = (debug_proc_id / NB_PROCS_MAX) % YMAX ;
    953         size_t x = debug_proc_id / (YMAX * NB_PROCS_MAX) ;
     952        size_t y = (debug_proc_id /                   NB_PROCS_MAX) % YMAX ;
     953        size_t x = (debug_proc_id / ((1 << y_width) * NB_PROCS_MAX)) % XMAX ;
    954954
    955955        std::ostringstream proc_signame;
     
    10121012
    10131013        // trace external peripherals
    1014         size_t io_x   = cluster_io_id / YMAX;
    1015         size_t io_y   = cluster_io_id % YMAX;
    1016        
     1014        size_t io_x   = cluster_io_id >> y_width;
     1015        size_t io_y   = cluster_io_id  & ((1 << x_width) - 1);
     1016
    10171017        clusters[io_x][io_y]->brom->print_trace();
    10181018        clusters[io_x][io_y]->wt_brom->print_trace();
Note: See TracChangeset for help on using the changeset viewer.