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/scripts
Files:
4 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
Note: See TracChangeset for help on using the changeset viewer.