- Timestamp:
- Aug 29, 2014, 12:05:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/platforms/tsar_generic_iob/scripts/parse.py
r782 r784 19 19 ffst_end = open(outpath, "w") 20 20 ffst_end.write("# ffst end (cycles)\n") 21 ffst_end.write("{0}\n".format(len(faultconfigs))) 22 for config in faultconfigs: 23 ffst_end.write("{0}\n".format(config)) 21 24 22 25 # repeat while configurations is not empty 23 26 quit = 0 24 27 for x,y in configs: 25 ffst_end.write("\n") 26 ffst_end.write(str(x*y)) 27 for f in xrange(faultconfigs): 28 ffst_end.write("\n{0:<6}".format(str(x*y))) 29 for f in xrange(len(faultconfigs)): 28 30 temp = "config_{0}c{1}f/".format(x*y, f) 29 31 confdir = os.path.join(confpath, temp) … … 44 46 found = True 45 47 value = int(partitions[2]) 46 ffst_end.write(" {0}".format(value))48 ffst_end.write(" {0:<8}".format(value)) 47 49 break 48 50 49 if not found: ffst_end.write(" -1")51 if not found: ffst_end.write(" {0:<8}".format(-1)) 50 52 # end for faultconfig 51 53 … … 59 61 configs = [] 60 62 configs.append([2 , 2 ]) 63 configs.append([4 , 2 ]) 61 64 configs.append([4 , 4 ]) 65 configs.append([8 , 4 ]) 62 66 configs.append([8 , 8 ]) 67 configs.append([16, 8 ]) 63 68 configs.append([16, 16]) 64 69 65 assert len(sys.argv) > 3,\ 66 "Introduce number of faulty configs, config path and output path" 70 faultconfigs = [] 71 faultconfigs.append('0 faulty core') 72 faultconfigs.append('1 faulty core') 73 faultconfigs.append('2 faulty cores') 74 faultconfigs.append('1 faulty cluster (3 cores)') 75 faultconfigs.append('2 faulty clusters (6 cores)') 67 76 68 parse_ffstend(configs, int(sys.argv[1]), sys.argv[2], sys.argv[3]) 77 assert len(sys.argv) > 2, "Introduce config path and output path" 78 79 parse_ffstend(configs, faultconfigs, sys.argv[1], sys.argv[2]) 69 80 70 81 # vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab
Note: See TracChangeset
for help on using the changeset viewer.