Changeset 571 for trunk


Ignore:
Timestamp:
Oct 31, 2013, 5:47:51 PM (11 years ago)
Author:
meunier
Message:

Correction of the "double barrier" problem from the user point of view for the generated llsc tests (use of 2 distinct barriers)

Location:
trunk/softs/test_llsc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/test_llsc/scripts/LLSCTestGenerator/Program.hpp

    r546 r571  
    8989      res << "   tab = (int *) SRL_MEMSPACE_ADDR(memspace);" << endl;
    9090      res << "   srl_barrier_t barrier = SRL_GET_BARRIER(barrier);" << endl;
     91      res << "   srl_barrier_t barrier2 = SRL_GET_BARRIER(barrier2);" << endl;
    9192      res << endl;
    9293      res << "   // Initialisation du tableau" << endl;
     
    99100      res << "   run0();" << endl;
    100101      res << endl;
    101       res << "   barrier_wait(barrier);" << endl;
     102      res << "   barrier_wait(barrier2);" << endl;
    102103      res << endl;
    103104      res << "   for (i = 0; i < " << tab_size << "; i++) {" << endl;
     
    158159      res << "   tab = (int *) SRL_MEMSPACE_ADDR(memspace);" << endl;
    159160      res << "   srl_barrier_t barrier = SRL_GET_BARRIER(barrier);" << endl;
     161      res << "   srl_barrier_t barrier2 = SRL_GET_BARRIER(barrier2);" << endl;
    160162      res << "   int thread_id = SRL_GET_CONST(id);" << endl;
    161163      res << endl;
     
    174176      res << "   }" << endl;
    175177      res << endl;
    176       res << "   barrier_wait(barrier);" << endl;
     178      res << "   barrier_wait(barrier2);" << endl;
    177179      res << endl;
    178180      res << "   srl_exit();" << endl;
  • trunk/softs/test_llsc/scripts/functions.c

    r536 r571  
    77      "move $16, %0                   \n"
    88      "giet_lock_try :                \n"
     9      "lw   $2,    0($16)             \n"
    910      "ll   $2,    0($16)             \n"
    1011      "bnez $2,    giet_lock_try      \n"
  • trunk/softs/test_llsc/scripts/run_simus.py

    r536 r571  
    2323nb_locks = 20
    2424nb_max_incr = 2000
    25 nb_procs = 4
     25nb_procs = 64
    2626
    2727
     
    105105   # Quit if results obtained by simulation are incorrect
    106106   print "diff", term_filename, os.path.join(data_dir, res_natif)
    107    output = subprocess.Popen([ 'diff', term_filename, os.path.join(data_dir, res_natif) ]).communicate()[0]
    108    if output != None:
     107   output = subprocess.Popen([ 'diff', term_filename, os.path.join(data_dir, res_natif) ], stdout = subprocess.PIPE).communicate()[0]
     108   if output != "":
    109109      break;
    110110
  • trunk/softs/test_llsc/scripts/test_llsc.py

    r546 r571  
    1515cluster_x = int(sys.argv[1])
    1616cluster_y = int(sys.argv[2])
    17 memspace_size = int(sys.argv[3])
     17memspace_size = int(sys.argv[3]) * 4
    1818
    1919nb_procs = 4
     
    2727            'table':   MemspacePort(),
    2828            'barrier': BarrierPort(),
     29            'barrier2': BarrierPort(),
    2930        },
    3031        impls = [
     
    4445            'table':   MemspacePort(),
    4546            'barrier': BarrierPort(),
     47            'barrier2': BarrierPort(),
    4648            'id' : ConstPort(),
    4749        },
     
    5759
    5860barrier = Barrier('barrier')
     61barrier2 = Barrier('barrier2')
    5962memspace = Memspace('memspace', memspace_size)
    6063
     
    6669               'table'   : memspace,
    6770               'barrier' : barrier,
     71               'barrier2' : barrier2,
    6872            },
    6973            defines = {} ),
     
    7579               'table'   : memspace,
    7680               'barrier' : barrier,
     81               'barrier2' : barrier2,
    7782               'id' : i,
    7883            },
    7984            defines = {} ),
    8085
    81 
    82 
    83 
    8486tcg = dsx.Tcg('test_llsc', *tasks)
    8587
    86 mpr = Mapper(hd ,tcg)
     88mpr = Mapper(hd, tcg)
    8789
    8890mpr.map('task_llsc_main', cluster = 0, proc = 0, stack = "PSEG_RAM_0")
     
    9597   mpr.map(const, pseg = 'PSEG_RAM_0')
    9698
     99
    97100mpr.map('memspace', pseg = "PSEG_RAM_0")
    98101mpr.map('barrier', pseg = "PSEG_RAM_0")
     102mpr.map('barrier2', pseg = "PSEG_RAM_0")
    99103
    100104mpr.map(tcg, code = 'PSEG_RAM_0', data = 'PSEG_RAM_0', ptab = "PSEG_RAM_0")
    101105mpr.map('system', boot = 'PSEG_RAM_0', kernel = 'PSEG_RAM_0', scheduler = True)
    102106
    103 mpr.generate(dsx.Giet(outdir = '.', vaddr_replicated_peri_inc = 0x2000, debug = True))
     107mpr.generate(dsx.Giet(outdir = '.', vaddr_replicated_peri_inc = 0x2000, debug = False))
    104108
  • trunk/softs/test_llsc/top.cpp

    r546 r571  
    231231//////////////////////i/////////////////////////////////////
    232232
    233 #define MAX_FROZEN_CYCLES     1000000
     233#define MAX_FROZEN_CYCLES     100000000
    234234
    235235/////////////////////////////////////////////////////////
     
    725725                loader,
    726726                frozen_cycles,
    727                 debug_from   ,
     727                debug_from,
    728728                debug_ok and (cluster(x,y) == debug_memc_id),
    729729                debug_ok and (cluster(x,y) == debug_proc_id)
     
    921921        p_rsp_signame << "[SIG]PROC_" << x << "_" << y << "_" << l << " RSP" ;
    922922
    923         clusters[x][y]->proc[l]->print_trace();
    924         clusters[x][y]->wi_proc[l]->print_trace();
    925         clusters[x][y]->signal_vci_ini_proc[l].print_trace(proc_signame.str());
    926         clusters[x][y]->signal_dspin_p2m_proc[l].print_trace(p2m_signame.str());
    927         clusters[x][y]->signal_dspin_m2p_proc[l].print_trace(m2p_signame.str());
    928         clusters[x][y]->signal_dspin_cmd_proc_i[l].print_trace(p_cmd_signame.str());
    929         clusters[x][y]->signal_dspin_rsp_proc_i[l].print_trace(p_rsp_signame.str());
    930 
    931         clusters[x][y]->xbar_rsp_d->print_trace();
    932         clusters[x][y]->xbar_cmd_d->print_trace();
    933         clusters[x][y]->signal_dspin_cmd_l2g_d.print_trace("[SIG]L2G CMD");
    934         clusters[x][y]->signal_dspin_cmd_g2l_d.print_trace("[SIG]G2L CMD");
    935         clusters[x][y]->signal_dspin_rsp_l2g_d.print_trace("[SIG]L2G RSP");
    936         clusters[x][y]->signal_dspin_rsp_g2l_d.print_trace("[SIG]G2L RSP");
     923        for (int _x = 0, _y = 0; _x != XMAX; (_y == YMAX - 1 ? _x++, _y = 0 : _y++)) {
     924           for (int _l = 0; _l < NB_PROCS_MAX; _l++) {
     925              clusters[_x][_y]->proc[_l]->print_trace();
     926           }
     927        }
     928        //clusters[x][y]->wi_proc[l]->print_trace();
     929        //clusters[x][y]->signal_vci_ini_proc[l].print_trace(proc_signame.str());
     930        //clusters[x][y]->signal_dspin_p2m_proc[l].print_trace(p2m_signame.str());
     931        //clusters[x][y]->signal_dspin_m2p_proc[l].print_trace(m2p_signame.str());
     932        //clusters[x][y]->signal_dspin_cmd_proc_i[l].print_trace(p_cmd_signame.str());
     933        //clusters[x][y]->signal_dspin_rsp_proc_i[l].print_trace(p_rsp_signame.str());
     934
     935        //clusters[x][y]->xbar_rsp_d->print_trace();
     936        //clusters[x][y]->xbar_cmd_d->print_trace();
     937        //clusters[x][y]->signal_dspin_cmd_l2g_d.print_trace("[SIG]L2G CMD");
     938        //clusters[x][y]->signal_dspin_cmd_g2l_d.print_trace("[SIG]G2L CMD");
     939        //clusters[x][y]->signal_dspin_rsp_l2g_d.print_trace("[SIG]L2G RSP");
     940        //clusters[x][y]->signal_dspin_rsp_g2l_d.print_trace("[SIG]G2L RSP");
    937941
    938942        // trace memc[debug_memc_id]
     
    954958
    955959        clusters[x][y]->memc->print_trace();
    956         clusters[x][y]->wt_memc->print_trace();
    957         clusters[x][y]->signal_vci_tgt_memc.print_trace(smemc.str());
    958         clusters[x][y]->signal_vci_xram.print_trace(sxram.str());
    959         clusters[x][y]->signal_dspin_p2m_memc.print_trace(sp2m.str());
    960         clusters[x][y]->signal_dspin_m2p_memc.print_trace(sm2p.str());
    961         clusters[x][y]->signal_dspin_cmd_memc_t.print_trace(m_cmd_signame.str());
    962         clusters[x][y]->signal_dspin_rsp_memc_t.print_trace(m_rsp_signame.str());
     960        //clusters[x][y]->wt_memc->print_trace();
     961        //clusters[x][y]->signal_vci_tgt_memc.print_trace(smemc.str());
     962        //clusters[x][y]->signal_vci_xram.print_trace(sxram.str());
     963        //clusters[x][y]->signal_dspin_p2m_memc.print_trace(sp2m.str());
     964        //clusters[x][y]->signal_dspin_m2p_memc.print_trace(sm2p.str());
     965        //clusters[x][y]->signal_dspin_cmd_memc_t.print_trace(m_cmd_signame.str());
     966        //clusters[x][y]->signal_dspin_rsp_memc_t.print_trace(m_rsp_signame.str());
    963967       
    964968        // trace replicated peripherals
    965 //        clusters[1][1]->mdma->print_trace();
    966 //        clusters[1][1]->signal_vci_tgt_mdma.print_trace("[SIG]MDMA_TGT_1_1");
    967 //        clusters[1][1]->signal_vci_ini_mdma.print_trace("[SIG]MDMA_INI_1_1");
     969        //clusters[1][1]->mdma->print_trace();
     970        //clusters[1][1]->signal_vci_tgt_mdma.print_trace("[SIG]MDMA_TGT_1_1");
     971        //clusters[1][1]->signal_vci_ini_mdma.print_trace("[SIG]MDMA_INI_1_1");
    968972       
    969973
    970974        // trace external peripherals
    971         size_t io_x   = cluster_io_id / YMAX;
    972         size_t io_y   = cluster_io_id % YMAX;
     975        //size_t io_x   = cluster_io_id / YMAX;
     976        //size_t io_y   = cluster_io_id % YMAX;
    973977       
    974         clusters[io_x][io_y]->brom->print_trace();
    975         clusters[io_x][io_y]->wt_brom->print_trace();
    976         clusters[io_x][io_y]->signal_vci_tgt_brom.print_trace("[SIG]BROM");
    977         clusters[io_x][io_y]->signal_dspin_cmd_brom_t.print_trace("[SIG]BROM CMD");
    978         clusters[io_x][io_y]->signal_dspin_rsp_brom_t.print_trace("[SIG]BROM RSP");
    979 
    980 //        clusters[io_x][io_y]->bdev->print_trace();
    981 //        clusters[io_x][io_y]->signal_vci_tgt_bdev.print_trace("[SIG]BDEV_TGT");
    982 //        clusters[io_x][io_y]->signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI");
     978        //clusters[io_x][io_y]->brom->print_trace();
     979        //clusters[io_x][io_y]->wt_brom->print_trace();
     980        //clusters[io_x][io_y]->signal_vci_tgt_brom.print_trace("[SIG]BROM");
     981        //clusters[io_x][io_y]->signal_dspin_cmd_brom_t.print_trace("[SIG]BROM CMD");
     982        //clusters[io_x][io_y]->signal_dspin_rsp_brom_t.print_trace("[SIG]BROM RSP");
     983
     984        //clusters[io_x][io_y]->bdev->print_trace();
     985        //clusters[io_x][io_y]->signal_vci_tgt_bdev.print_trace("[SIG]BDEV_TGT");
     986        //clusters[io_x][io_y]->signal_vci_ini_bdev.print_trace("[SIG]BDEV_INI");
    983987      }
    984988
Note: See TracChangeset for help on using the changeset viewer.