Changeset 1030 for trunk/platforms


Ignore:
Timestamp:
Jan 16, 2016, 7:44:23 PM (8 years ago)
Author:
alain
Message:

Fix a bug in debug_procid_id definition.
-This line, and those below, will be ignored--

M tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h
M tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp
M tsar_generic_iob/top.cpp

Location:
trunk/platforms/tsar_generic_iob
Files:
3 edited

Legend:

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

    r1025 r1030  
    338338   ssize_t  threads          = 1;                       // simulator's threads number
    339339   bool     debug_ok         = false;                   // trace activated
    340    size_t   debug_memc_id    = 0xFFFFFFFF;              // index of traced memc
    341    size_t   debug_proc_id    = 0xFFFFFFFF;              // index of traced proc
    342    size_t   debug_xram_id    = 0xFFFFFFFF;              // index of traced xram
     340   uint32_t debug_memc_id    = 0xFFFFFFFF;              // index of traced memc
     341   uint32_t debug_proc_id    = 0xFFFFFFFF;              // index of traced proc
    343342   bool     debug_iob        = false;                   // trace iob0 & iob1 when true
    344343   uint32_t debug_from       = 0;                       // trace start cycle
     
    391390                std::cout << " - XMAX   = " << std::hex << XMAX          << std::endl;
    392391                std::cout << " - YMAX   = " << std::hex << YMAX          << std::endl;
    393                 exit(0);
    394             }
    395          }
    396          else if ((strcmp(argv[n],"-XRAMID") == 0) && (n+1<argc) )
    397          {
    398             debug_xram_id = atoi(argv[n+1]);
    399             size_t x = debug_xram_id >> 4;
    400             size_t y = debug_xram_id & 0xF;
    401             if( (x>=XMAX) || (y>=YMAX) )
    402             {
    403                 std::cout << "XRAMID parameter does'nt fit XMAX/YMAX" << std::endl;
    404392                exit(0);
    405393            }
     
    441429            std::cout << "     - DEBUG debug_start_cycle" << std::endl;
    442430            std::cout << "     - THREADS simulator's threads number" << std::endl;
    443             std::cout << "     - FROZEN max_number_of_lines" << std::endl;
     431            std::cout << "     - FROZEN max_number_of_cycles" << std::endl;
    444432            std::cout << "     - MEMCID index_memc_to_be_traced" << std::endl;
    445433            std::cout << "     - PROCID index_proc_to_be_traced" << std::endl;
     
    506494             << " - OPENMP THREADS  = " << threads << std::endl
    507495             << " - DEBUG_PROCID    = " << debug_proc_id << std::endl
    508              << " - DEBUG_MEMCID    = " << debug_memc_id << std::endl
    509              << " - DEBUG_XRAMID    = " << debug_xram_id << std::endl
    510              << " - DEBUG_XRAMID    = " << debug_xram_id << std::endl;
     496             << " - DEBUG_MEMCID    = " << debug_memc_id << std::endl;
    511497
    512498   std::cout << std::endl;
     
    12281214
    12291215                frozen_cycles,
     1216                debug_ok,
    12301217                debug_from,
    1231                 debug_ok and (cluster(x,y) == debug_memc_id),
    1232                 debug_ok and (cluster(x,y) == debug_proc_id),
    1233                 debug_ok and debug_iob
     1218                debug_proc_id,
     1219                debug_memc_id,
     1220                debug_iob
    12341221            );
    12351222
     
    17651752                sxram_tgt << "[SIG]XRAM_TGT_" << x << "_" << y;
    17661753                clusters[x][y]->signal_ram_vci_tgt_xram.print_trace(sxram_tgt.str());
    1767             }
    1768 
    1769 
    1770             // trace XRAM and XRAM network routers in cluster[debug_xram_id]
    1771             if ( debug_xram_id != 0xFFFFFFFF )
    1772             {
    1773                 size_t x = debug_xram_id >> 4;
    1774                 size_t y = debug_xram_id & 0xF;
    1775 
    1776                 clusters[x][y]->xram->print_trace();
    1777                 std::ostringstream sxram_tgt;
    1778                 sxram_tgt << "[SIG]XRAM_TGT_" << x << "_" << y;
    1779                 clusters[x][y]->signal_ram_vci_tgt_xram.print_trace(sxram_tgt.str());
    1780 
    1781                 clusters[x][y]->ram_router_cmd->print_trace();
    1782                 clusters[x][y]->ram_router_rsp->print_trace();
     1754
     1755//              clusters[x][y]->ram_router_cmd->print_trace();
     1756//              clusters[x][y]->ram_router_rsp->print_trace();
    17831757            }
    17841758
  • trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/include/tsar_iob_cluster.h

    r1002 r1030  
    261261
    262262                    uint32_t                           frozen_cycles,
    263                     uint32_t                           start_debug_cycle,
    264                     bool                               memc_debug_ok,
    265                     bool                               proc_debug_ok,
    266                     bool                               iob0_debug_ok );
     263                    bool                               debug_ok,
     264                    uint32_t                           debug_start_cycle,
     265                    uint32_t                           debug_proc_id,
     266                    uint32_t                           debug_memc_id,
     267                    bool                               debug_iob );
    267268
    268269  protected:
  • trunk/platforms/tsar_generic_iob/tsar_iob_cluster/caba/source/src/tsar_iob_cluster.cpp

    r1002 r1030  
    8383
    8484                    uint32_t                           frozen_cycles,
     85                    bool                               debug_ok,
    8586                    uint32_t                           debug_start_cycle,
    86                     bool                               memc_debug_ok,
    87                     bool                               proc_debug_ok,
    88                     bool                               iob_debug_ok )
     87                    uint32_t                           debug_proc_id,
     88                    uint32_t                           debug_memc_id,
     89                    bool                               debug_iob )
    8990    : soclib::caba::BaseModule(insname),
    9091      p_clk("clk"),
     
    129130    //////////////////////////////////////////////////////////////////////////////////
    130131
     132    size_t x_debug;
     133    size_t y_debug;
     134    size_t p_debug;
     135
    131136    ////////////  PROCS  /////////////////////////////////////////////////////////////
    132137    for (size_t p = 0; p < nb_procs; p++)
    133138    {
    134139        std::ostringstream s_proc;
     140        x_debug = (debug_proc_id >> (y_width + p_width)) & ((1<<x_width)-1);
     141        y_debug = (debug_proc_id >> p_width            ) & ((1<<y_width)-1);
     142        p_debug = (debug_proc_id                       ) & ((1<<p_width)-1);
     143       
     144       
    135145        s_proc << "proc_" << x_id << "_" << y_id << "_" << p;
    136146        proc[p] = new VciCcVCacheWrapper<vci_param_int,
     
    155165                      frozen_cycles,                  // max frozen cycles
    156166                      debug_start_cycle,
    157                       proc_debug_ok);
     167                      debug_ok and (x_id == x_debug) and (y_id == y_debug) and (p_debug == p) );
    158168    }
    159169
     
    161171    std::ostringstream s_memc;
    162172    s_memc << "memc_" << x_id << "_" << y_id;
     173    x_debug = (debug_memc_id >> y_width) & ((1<<x_width)-1);
     174    y_debug = (debug_memc_id           ) & ((1<<y_width)-1);
    163175    memc = new VciMemCache<vci_param_int,
    164176                           vci_param_ext,
     
    179191                     8,                                   // INVALIDATE TABLE DEPTH
    180192                     debug_start_cycle,
    181                      memc_debug_ok );
     193                     debug_ok and (x_id == x_debug) and (y_id = y_debug) );
    182194
    183195    std::ostringstream s_wi_memc;
     
    437449                     8,                                     // IOTLB sets
    438450                     debug_start_cycle,
    439                      iob_debug_ok );
     451                     debug_iob );
    440452
    441453        std::ostringstream s_iob_ram_wi;
Note: See TracChangeset for help on using the changeset viewer.