python脚本只统计不运行

This commit is contained in:
YuhangQ 2023-03-09 05:45:39 +00:00
parent 8e923f249d
commit 061c66e888
7 changed files with 66 additions and 13 deletions

BIN
atpg

Binary file not shown.

View File

@ -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

View File

@ -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

View File

@ -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.

2
ls.cpp
View File

@ -109,7 +109,7 @@ bool Circuit::local_search(std::unordered_set<Fault*> &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);
}
}

30
report/atpg-ls.txt Normal file
View File

@ -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 |
--------------------------------------------------------------------------------------------------------

View File

@ -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 = "-*-"