Changeset 844 for branches/reconfiguration/platforms/tsar_generic_iob
- Timestamp:
- Oct 16, 2014, 10:57:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py
r841 r844 10 10 11 11 # get command-line arguments 12 parser = argparse.ArgumentParser(description ='Run simulation')12 parser = argparse.ArgumentParser(description='Run simulation') 13 13 14 14 parser.add_argument( 15 type = str, dest ='path',16 help ='relative or absolute path to the platform')15 type=str, dest='path', 16 help='relative or absolute path to the platform') 17 17 18 18 parser.add_argument( 19 '--output', '-o', type = str, dest = 'outpath', default ='./output',20 help ='relative or absolute path to the output directory')19 '--output', '-o', type=str, dest='outpath', default='./output', 20 help='relative or absolute path to the output directory') 21 21 22 22 parser.add_argument( 23 '--xsize', '-x', type = int, dest = 'x', default =2,24 help ='# of clusters in a row')23 '--xsize', '-x', type=int, dest='x', default=2, 24 help='# of clusters in a row') 25 25 26 26 parser.add_argument( 27 '--ysize', '-y', type = int, dest = 'y', default =2,28 help ='# of clusters in a column')27 '--ysize', '-y', type=int, dest='y', default=2, 28 help='# of clusters in a column') 29 29 30 30 parser.add_argument( 31 '--nprocs', '-n', type = int, dest = 'nprocs', default =4,32 help ='# of processors per cluster')31 '--nprocs', '-n', type=int, dest='nprocs', default=4, 32 help='# of processors per cluster') 33 33 34 34 parser.add_argument( 35 '--quiet', '-q', type = bool, dest = 'quiet', default = False, 36 help = 'be quiet!!!' ) 35 '--compile-only', '-c', dest='compileonly', action='store_true', 36 help='generate config files and compile the platform. Do not simulate') 37 38 parser.add_argument( 39 '--quiet', '-q', dest='quiet', action='store_true', 40 help='be quiet!!!') 37 41 38 42 args = parser.parse_args() 39 43 40 44 # faulty processor list 41 faultylist = [(0, 0,1), (0,0,2), (0,1,2)]45 faultylist = [(0, 0, 1), (0, 0, 2), (0, 1, 2)] 42 46 43 47 # translate the relative path (if needed) into an absolute path … … 65 69 # 3. compile simulator executable 66 70 dst = os.path.join(basedir, "hard_config.h") 67 if os.path.lexists(dst): os.unlink(dst) 71 if os.path.lexists(dst): 72 os.unlink(dst) 73 68 74 os.symlink(hardpath, dst) 69 75 … … 76 82 # 4. compile distributed boot executable 77 83 dst = os.path.join(outdir, "config/boot_config.h") 78 if os.path.lexists(dst): os.unlink(dst) 84 if os.path.lexists(dst): 85 os.unlink(dst) 86 79 87 os.symlink(os.path.join(basedir, "soft/config/boot_config.h"), dst) 88 89 # stop after compiling the platform when the compile-only option is activated 90 if args.compileonly == True: 91 exit(0) 80 92 81 93 print "[ run.py ] compiling distributed boot procedure" … … 88 100 # 5. execute simulator 89 101 os.environ["DISTRIBUTED_BOOT"] = "1" 90 os.environ["SOCLIB_FB"] = "HEADLESS" 91 if args.quiet: os.environ["SOCLIB_TTY"] = "FILES" 102 if args.quiet: 103 os.environ["SOCLIB_FB"] = "HEADLESS" 104 os.environ["SOCLIB_TTY"] = "FILES" 92 105 93 106 if (args.x * args.y) <= 4:
Note: See TracChangeset
for help on using the changeset viewer.