- Timestamp:
- Apr 15, 2015, 4:02:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py
r969 r974 30 30 firmdebug -- activate the DEBUG compilation mode on software 31 31 diskimage -- relative or absolute path to the disk image 32 force -- create configuration files (or overwrite them) 32 33 """ 33 34 … … 48 49 hardpath = os.path.join(outdir, "config/hard_config.h") 49 50 xmlpath = os.path.join(outdir, "config/giet.map.xml") 50 dtspath = os.path.join(outdir, "config/linux.dts") 51 arch.main(args.x, args.y, args.nprocs, hardpath, xmlpath, dtspath) 52 faultyprocs.generate(args.faultycore, faultpath) 51 if args.linux: 52 dtspath = os.path.join(outdir, "config/platform.dts") 53 else: 54 dtspath = None 55 56 exist = True 57 exist = exist and os.path.exists(faultpath) 58 exist = exist and os.path.exists(hardpath) 59 exist = exist and os.path.exists(xmlpath) 60 if args.linux: exist = exist and os.path.exists(dtspath) 61 62 if not args.force and exist: 63 print "[ run.py ] Warning: Reusing existing configuration files. " 64 print "[ run.py ] Script arguments will be ignored (no --force option)" 65 cmd = raw_input('[ run.py ] Would you like to continue (y/n): ') 66 if cmd == 'n': exit(0) 67 if cmd == 'y': pass 68 else: exit(1) 69 else: 70 arch.main(args.x, args.y, args.nprocs, hardpath, xmlpath, dtspath) 71 faultyprocs.generate(args.faultycore, faultpath) 53 72 54 73 # create a log file … … 66 85 command.extend(['make']) 67 86 command.extend(['-C', basedir]) 68 subprocess.c all(command, stdout=logfile, stderr=logfile)87 subprocess.check_call(command, stdout=logfile, stderr=logfile) 69 88 70 89 # 4. compile distributed boot executable … … 81 100 command.extend(["CONFIG=" + outdir]) 82 101 command.extend(["DEBUG=" + str(args.firmdebug)]) 83 subprocess.call(command, stdout=logfile, stderr=logfile) 102 if args.linux: 103 command.extend(["PATCHER_OS=1"]) 104 else: 105 command.extend(["PATCHER_OS=0"]) 106 107 subprocess.check_call(command, stdout=logfile, stderr=logfile) 84 108 85 109 # stop after compiling when the compile-only option is activated 86 if args.compileonly == True: 87 exit(0) 110 if args.compileonly == True: exit(0) 88 111 89 112 # 5. execute simulator … … 107 130 if args.debug != None: 108 131 command.extend(["-DEBUG", str(args.debug[0])]); 109 command.extend(["-NCYCLES", str(args.debug[1])]); 110 command.extend(["-PROCID", str(args.debug[2])]); 111 command.extend(["-MEMCID", str(args.debug[3])]); 132 command.extend(["-PROCID", str(args.debug[1])]); 133 command.extend(["-MEMCID", str(args.debug[2])]); 134 135 if args.ncycles > 0: 136 command.extend(["-NCYCLES", str(args.ncycles)]) 112 137 113 138 elif os.environ.get('SOCLIB_GDB') == None: 114 139 # the procedure grows linearly with the diameter of the mesh. 115 maxcycles = 1500000 + (args.x + args.y) * 20000 116 command.extend(["-NCYCLES", str(maxcycles)]) 140 # maxcycles = 1500000 + (args.x + args.y) * 20000 141 # command.extend(["-NCYCLES", str(maxcycles)]) 142 command.extend(["-NCYCLES", str(200000000)]) 117 143 118 144 # OpenMP number of threads definition … … 131 157 logfile.flush() 132 158 133 subprocess.c all(command, stdout=logfile, stderr=logfile)159 subprocess.check_call(command, stdout=logfile, stderr=logfile) 134 160 135 161 logfile.close() … … 198 224 help='relative or absolute path to the external firmware') 199 225 226 parser.add_argument( 227 '--force', '-f', dest='force', action='store_true', 228 help='create configuration files (or overwrite them)') 229 230 parser.add_argument( 231 '--linux', dest='linux', action='store_true', 232 help='generate linux device tree and compile bootloader ' + 233 'with linux specifics') 234 235 parser.add_argument( 236 '--ncycles', type=int, dest='ncycles', default=-1, 237 help='max simulation cycles') 238 200 239 run(parser.parse_args()) 201 240
Note: See TracChangeset
for help on using the changeset viewer.