diff --git a/atpg b/atpg index 0d5a10d..771043c 100755 Binary files a/atpg and b/atpg differ diff --git a/check.log b/check.log index b73880f..c2859ca 100644 --- a/check.log +++ b/check.log @@ -1,9 +1,26 @@ -[1/26] 任务 ./benchmark/c17.bench -[2/26] 任务 ./benchmark/b06.bench -[3/26] 任务 ./benchmark/b01.bench -[4/26] 任务 ./benchmark/b03.bench -[5/26] 任务 ./benchmark/b10.bench -[6/26] 任务 ./benchmark/b09.bench -[7/26] 任务 ./benchmark/b08.bench -[8/26] 任务 ./benchmark/c880.bench -[9/26] 任务 ./benchmark/c499.bench +[1/26] 任务 ./benchmark/b22.bench +[2/26] 任务 ./benchmark/b17.bench +[3/26] 任务 ./benchmark/c5315.bench +[4/26] 任务 ./benchmark/b13.bench +[5/26] 任务 ./benchmark/b03.bench +[6/26] 任务 ./benchmark/c880.bench +[7/26] 任务 ./benchmark/b10.bench +[8/26] 任务 ./benchmark/c6288.bench +[9/26] 任务 ./benchmark/c1355.bench +[10/26] 任务 ./benchmark/b20.bench +[11/26] 任务 ./benchmark/c17.bench +[12/26] 任务 ./benchmark/b07.bench +[13/26] 任务 ./benchmark/b01.bench +[14/26] 任务 ./benchmark/c432.bench +[15/26] 任务 ./benchmark/b11.bench +[16/26] 任务 ./benchmark/b08.bench +[17/26] 任务 ./benchmark/c3540.bench +[18/26] 任务 ./benchmark/c2670.bench +[19/26] 任务 ./benchmark/b09.bench +[20/26] 任务 ./benchmark/c7552.bench +[21/26] 任务 ./benchmark/b04.bench +[22/26] 任务 ./benchmark/b12.bench +[23/26] 任务 ./benchmark/b21.bench +[24/26] 任务 ./benchmark/b06.bench +[25/26] 任务 ./benchmark/c499.bench +[26/26] 任务 ./benchmark/c1908.bench diff --git a/exp_result/ATPG-LS_b10.bench.txt b/exp_result/ATPG-LS_b10.bench.txt index 5e0327e..0b54168 100644 --- a/exp_result/ATPG-LS_b10.bench.txt +++ b/exp_result/ATPG-LS_b10.bench.txt @@ -425,7 +425,7 @@ checking valid circuit ... result: 1. [SOL] flip: 0, stem: 0, fault:51. flip_cnt: 0, stem_cnt: 91, fault_cnt:108 coverage: 100.000% pattern: 33 before: 4 now: 0 checking valid circuit ... result: 1. - + real 0m36.403s user 0m36.398s sys 0m0.000s diff --git a/exp_result/ATPG-LS_b11.bench.txt b/exp_result/ATPG-LS_b11.bench.txt index 9bdd5cb..e644aaf 100644 --- a/exp_result/ATPG-LS_b11.bench.txt +++ b/exp_result/ATPG-LS_b11.bench.txt @@ -1294,4 +1294,4 @@ coverage: 95.688% pattern: 44 before: 37 now: 37 checking valid circuit ... result: 1. [SOL] flip: 0, stem: 0, fault:0. flip_cnt: 0, stem_cnt: 214, fault_cnt:162 coverage: 95.688% pattern: 44 before: 37 now: 37 -checking valid circuit ... result: 1. +checking valid circuit ... result: 1. diff --git a/ls.cpp b/ls.cpp index 0b53b26..00f5f08 100644 --- a/ls.cpp +++ b/ls.cpp @@ -109,7 +109,7 @@ bool Circuit::local_search(std::unordered_set &faults) { CC[suc->id] = 1; } - //printf("[UP] flip: %lld, stem: %lld, fault:%lld. flip_cnt: %lld, stem_cnt: %lld, fault_cnt:%lld\n", flip_total_weight, stem_total_weight, fault_total_weight, flip_total_cnt, stem_total_cnt, fault_total_cnt); + printf("[UP] flip: %lld, stem: %lld, fault:%lld. flip_cnt: %lld, stem_cnt: %lld, fault_cnt:%lld\n", flip_total_weight, stem_total_weight, fault_total_weight, flip_total_cnt, stem_total_cnt, fault_total_cnt); } } diff --git a/report/atpg-ls.txt b/report/atpg-ls.txt new file mode 100644 index 0000000..31f3b05 --- /dev/null +++ b/report/atpg-ls.txt @@ -0,0 +1,30 @@ +-------------------------------------------------------------------------------------------------------- +| data | fault coverage(ATPG-LS) | time(ATPG-LS) | cube(ATPG-LS) | pattern(ATPG-LS) | +| ----------------------- | ----------------------- | ------------- | ------------- | ---------------- | +| ./benchmark/c6288.bench | 99.653 | -*- | 27 | 27 | +| ./benchmark/c17.bench | 100.000 | -*- | 4 | 4 | +| ./benchmark/b17.bench | ERROR | -*- | ERROR | ERROR | +| ./benchmark/b22.bench | ERROR | -*- | ERROR | ERROR | +| ./benchmark/b13.bench | 95.652 | -*- | 35 | 35 | +| ./benchmark/c880.bench | 100.000 | -*- | 45 | 45 | +| ./benchmark/b07.bench | 90.453 | -*- | 26 | 26 | +| ./benchmark/c432.bench | 99.235 | -*- | 29 | 29 | +| ./benchmark/c5315.bench | ERROR | -*- | ERROR | ERROR | +| ./benchmark/b20.bench | ERROR | -*- | ERROR | ERROR | +| ./benchmark/c1355.bench | 99.744 | -*- | 103 | 103 | +| ./benchmark/b01.bench | 100.000 | -*- | 15 | 15 | +| ./benchmark/b10.bench | 100.000 | -*- | 33 | 33 | +| ./benchmark/b03.bench | 100.000 | -*- | 18 | 18 | +| ./benchmark/b11.bench | 95.688 | -*- | 44 | 44 | +| ./benchmark/b08.bench | 100.000 | -*- | 34 | 34 | +| ./benchmark/c3540.bench | 90.169 | -*- | 96 | 96 | +| ./benchmark/c2670.bench | 82.609 | -*- | 53 | 53 | +| ./benchmark/b09.bench | 100.000 | -*- | 20 | 20 | +| ./benchmark/c7552.bench | 95.133 | -*- | 103 | 103 | +| ./benchmark/b04.bench | 73.424 | -*- | 15 | 15 | +| ./benchmark/b12.bench | ERROR | -*- | ERROR | ERROR | +| ./benchmark/b21.bench | ERROR | -*- | ERROR | ERROR | +| ./benchmark/b06.bench | 100.000 | -*- | 13 | 13 | +| ./benchmark/c499.bench | 100.000 | -*- | 55 | 55 | +| ./benchmark/c1908.bench | 99.179 | -*- | 91 | 91 | +-------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/run_exp.py b/run_exp.py index 018cbad..08b62a2 100644 --- a/run_exp.py +++ b/run_exp.py @@ -60,6 +60,10 @@ class ATPGLS: print("anal:" + output_file) content = open(output_file, "r").read() p1 = re.compile(r'coverage\s*:\s*(\d+\.\d+)\s*%', re.S) + + if len(p1.findall(content)) == 0: + return("ERROR", "ERROR", "ERROR") + coverage = p1.findall(content)[-1] p2 = re.compile(r'pattern\s*:\s*(\d+)', re.S) cube = p2.findall(content)[-1] @@ -182,7 +186,9 @@ def multiprocess_run_solver(solver, input_file): (path, filename) = os.path.split(input_file) out_file = os.path.join(res_dir,"%s_%s.txt" % (solver.name, filename)) - (status, time) = solver.run(input_file, out_file, TIMEOUT) + #(status, time) = solver.run(input_file, out_file, TIMEOUT) + time = "-*-" + status = ExitStatus.normal fault = "-*-" cube = "-*-"