From 482069812fecbefffbe070b46e397667111b49ce Mon Sep 17 00:00:00 2001 From: YuhangQ Date: Wed, 10 May 2023 10:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- atpg | Bin 83489 -> 65633 bytes src/checker.cpp | 34 ++++++--------- src/circuit.h | 16 ++----- src/gate.cpp | 4 -- src/ls.cpp | 35 +++------------- src/score.cpp | 109 +++++++++++++++++++----------------------------- 6 files changed, 66 insertions(+), 132 deletions(-) diff --git a/atpg b/atpg index 41737baaa15bea94af07430af5b358fc1e197e69..788f61c5e091e7125615cbe9139ecf633a2e59f3 100755 GIT binary patch delta 13046 zcmc(Gd0dp$_y2vK8T4ThS!M_}>R7NyKP%9jbECts<+uX~g8PE)I3A)sn znnGCtx%3HKP*c>tiA$wvW@R?|@!J=dR1%eOoA3KPi(%UL_xbNPuh;cH=iK)_=iGD8 zJ@?+{!IGsOXYBfd#r}5o;Ll#TvU@;QbH)VlC%m9EW;HK7+c)6wEQMP`P52$2#p8s& z#-i60_B@@!CR*fUJwkc05MlJ2r?f^Wjf`l$+GLIaX}S=3fL_tGV5+yYe~v-4599wF5#7JcMjwNj0> z@N!*vGN|e%jCEzq?uUlzuNmu%noJEwiQdoH71Xc&h!Vw^H=dtDq2CU*5cW&%uMhVK zKEYUe;nRUUSs(4U%qJk@@gMu%tjxU~)b*BaHn-~&#F{~TyWZ9oS`yGJ28Fbe7W%bB zA^PfF#-@rDV?DgQB)3jHdcL*r60go|G5VU0mES zn8k++Y-(-OwdSmq;ER?jqHhMRHP?zPAZrb)${uLB>u$P<%+llLac$g(jT<634TGDKU%Tn73KUQK^BeSR3mb0p?TuW85z~Y^{!16bJSW#9- z=ws59Ovub$WU1;V7`?NBi4j;g!pv)g$pIz{n9ZV;T8r__+^*Q5*;VY%tT!WBP+@&; zMuR*k41xyh)EUYr%O(bngSH;cP?sO>geiKT^Ex%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6h9pi_ktQtSv&*RajeuKB2My8?FTUL~9KvBrKXY6^7=}aazv8LOPTy zESR!z$YSt@RhHLx6!?YOP|p#vnf(3w9oENEQ_;;S)8-ZC6y{ByH7$v?#q{cRH>&sD zsD5{&`rn00NNj@|Fl$=E-E6(vvdx;-`)|V9fWzugyv0P6Mo~Uu!%>EObVl?*CZzgCiOh)q6eXrd z4WZ}~@(SloXX68&O#1Wiz8g2KfB!Gt%fCwhd`o%wq||c{bhpoY{PvVVU-MNivo$IB zpSGf8kB>ThRJF^sBkQGa#_pT-@aW+)4j-62anE~;&aRm|@864G85wY7+KXPVoUN~a zV_Ex630-eJG$Fis=8}&mKQTJv%nzrYZ2lpX2k-oRL+m?qv#Wo6{Xb*R?0n7k<|oU3 zeQ?0rJBH;4HSeEgi9Xi;rPLnr;S0WcD1J!qj$ii=c<#h^)}t#Q$=v%lzvt<* zRfZiO4BxYIjL(5l-i=rHxGEnu9osVD+rO`u{++s)uc~_1`M}fz2EYEZ20b@DKKaAO z{g!`CnZDO=-@zX(_4#uq_82I{CHAkMH+@h4??-lfxbIiyt8?CahJ9=7d-gngv-#-W zZ+=>G)3InIKXLoOHgV*)KBF&22d{Z3z0o}8;6B^L&$eILx@`ZXaj$)G;JfJAKfiY< zY17j?PT%BtE}M1elj%M`-To=|@{^1Iyw3OF!Co)>_4uf8)TrwNKG^!v-wPkf`l)Q` zo1uMwO?%um_h`GJfB9m3JE;6kKXJ9PE@M~VJ6*F!>*q%#WG#`7?J#{h zsQ0Q5uYVewRC{TRb>Az+4KMUO<+z@b-0n+Vi^c2tlOK(|9DeTFnVj@Tn*BS?_&@2Z mm(4Hp_1f}A=g(d&`)tdm>c2mH`qA~(bI;9q`G|CL=l=pm=|~#@ diff --git a/src/checker.cpp b/src/checker.cpp index 4e4fdd9..6c8db59 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -3,12 +3,10 @@ int Circuit::check_circuit() { int sum_value_unsatisfied_cost = 0; + int sum_fault_need_update_cost = 0; int sum_fault_propagated_weight = 0; - int sum_fault_propagated_unsatisfied_cost = 0; - int sum_fault_detected_weight = 0; - int sum_fault_detected_unsatisfied_cost = 0; for(Gate* g : gates) { @@ -19,39 +17,31 @@ int Circuit::check_circuit() { assert(g->value_satisfied == ( g->cal_value() == g->value )); - assert(g->fault_detected_satisfied[0] == ( g->cal_fault_detected(0) == g->fault_detected[0] )); - assert(g->fault_detected_satisfied[1] == ( g->cal_fault_detected(1) == g->fault_detected[1] )); + int changed = 0; + if(!changed && g->cal_fault_detected(0) != g->fault_detected[0]) changed = 1; + if(!changed && g->cal_fault_detected(1) != g->fault_detected[1]) changed = 1; + if(!changed && g->cal_propagate_len(0) != g->cal_propagate_len(0)) changed = 1; + if(!changed && g->cal_propagate_len(1) != g->cal_propagate_len(1)) changed = 1; - assert(g->fault_propagated_satisfied[0] == ( g->cal_propagate_len(0) == g->fault_propagated_len[0])); - - - // if(g->fault_propagated_satisfied[1] != ( g->cal_propagate_len(1) == g->fault_propagated_len[1])) { - // printf("pl: %s\n", g->name.c_str()); - // print_gates(); - // } - assert(g->fault_propagated_satisfied[1] == ( g->cal_propagate_len(1) == g->fault_propagated_len[1])); + assert(changed == g->fault_need_update); if(!g->value_satisfied) sum_value_unsatisfied_cost += g->value_unsatisfied_cost; + if(g->fault_need_update) sum_fault_need_update_cost += g->fault_need_update_cost; if(g->fault_detected[0]) sum_fault_detected_weight += g->fault_detected_weight[0]; if(g->fault_detected[1]) sum_fault_detected_weight += g->fault_detected_weight[1]; - if(!g->fault_detected_satisfied[0]) sum_fault_detected_unsatisfied_cost += g->fault_detected_unsatisfied_cost[0]; - if(!g->fault_detected_satisfied[1]) sum_fault_detected_unsatisfied_cost += g->fault_detected_unsatisfied_cost[1]; - sum_fault_propagated_weight += g->fault_propagated_len[0] * g->fault_propagated_weight[0]; sum_fault_propagated_weight += g->fault_propagated_len[1] * g->fault_propagated_weight[1]; - - if(!g->fault_propagated_satisfied[0]) sum_fault_propagated_unsatisfied_cost += g->fault_propagated_unsatisfied_cost[0]; - if(!g->fault_propagated_satisfied[1]) sum_fault_propagated_unsatisfied_cost += g->fault_propagated_unsatisfied_cost[1]; + } int circuit_score = sum_fault_propagated_weight + sum_fault_detected_weight - - sum_fault_propagated_unsatisfied_cost - sum_fault_detected_unsatisfied_cost - sum_value_unsatisfied_cost; + - sum_value_unsatisfied_cost - sum_fault_need_update_cost; printf("svuc: %d, sfpw: %d, sfpuc: %d, sfdw: %d, sfduc: %d\n", - sum_value_unsatisfied_cost, sum_fault_propagated_weight, sum_fault_propagated_unsatisfied_cost, - sum_fault_detected_weight, sum_fault_detected_unsatisfied_cost); + sum_value_unsatisfied_cost, + sum_fault_propagated_weight, sum_fault_detected_weight); return circuit_score; } \ No newline at end of file diff --git a/src/circuit.h b/src/circuit.h index 72b618c..6d69c4a 100644 --- a/src/circuit.h +++ b/src/circuit.h @@ -31,15 +31,12 @@ public: int fault_propagated_len[2]; int fault_propagated_weight[2]; - - int fault_propagated_satisfied[2]; - int fault_propagated_unsatisfied_cost[2]; int fault_detected[2]; int fault_detected_weight[2]; - int fault_detected_satisfied[2]; - int fault_detected_unsatisfied_cost[2]; + int fault_need_update; + int fault_need_update_cost; int CC; @@ -68,12 +65,9 @@ public: int score; int score_value_unsatisfied_cost; - int score_fault_propagated_weight[2]; - int score_fault_propagated_unsatisfied_cost[2]; - int score_fault_detected_weight[2]; - int score_fault_detected_unsatisfied_cost[2]; + int score_fault_update_cost; // score calculation function @@ -83,11 +77,9 @@ public: int cal_score_fault_propagated_weight(int sa); - int cal_score_fault_propagated_unsatisfied_cost(int sa); - int cal_score_fault_detected_weight(int sa); - int cal_score_fault_detected_unsatisfied_cost(int sa); + int cal_score_fault_update_cost(); }; class Fault { diff --git a/src/gate.cpp b/src/gate.cpp index b1a0326..15bc16d 100644 --- a/src/gate.cpp +++ b/src/gate.cpp @@ -12,10 +12,6 @@ void Gate::update_gate_property() { void Gate::update_gate_statistics() { value_satisfied = ( cal_value() == value ); - fault_detected_satisfied[0] = ( cal_fault_detected(0) == fault_detected[0] ); - fault_detected_satisfied[1] = ( cal_fault_detected(1) == fault_detected[1] ); - fault_propagated_satisfied[0] = ( cal_propagate_len(0) == fault_propagated_len[0] ); - fault_propagated_satisfied[1] = ( cal_propagate_len(1) == fault_propagated_len[1] ); } int Gate::cal_propagate_len(bool x) { diff --git a/src/ls.cpp b/src/ls.cpp index 76706ae..45d19fe 100644 --- a/src/ls.cpp +++ b/src/ls.cpp @@ -113,40 +113,17 @@ void Circuit::ls_flip(Gate* gate) { int cal_cnt = 0; for(Gate* g : gate->fanouts) { - // printf("cal2: %s\n", g->name.c_str()); - t.insert(g); g->score = g->cal_score(); - cal_cnt++; - for(Gate* in : g->fanins) { - t.insert(in); - in->score = in->cal_score(); - cal_cnt++; - for(Gate *out : in->fanouts) { - t.insert(out); - out->score = out->cal_score(); - cal_cnt++; - for(Gate *in : out->fanins) { - t.insert(in); - in->score = in->cal_score(); - cal_cnt++; - } - } - } + } + + for(Gate* g : gate->reigon) { + g->score = g->cal_score(); } for(Gate* g : gate->fanins) { - t.insert(g); g->score = g->cal_score(); - cal_cnt++; for(Gate* out : g->fanouts) { - t.insert(out); out->score = out->cal_score(); - cal_cnt++; - for(Gate* in : out->fanins) { - t.insert(in); - in->score = in->cal_score(); - cal_cnt++; - } } } @@ -180,11 +157,11 @@ void Circuit::ls_init_circuit(std::unordered_set &faults) { // init value, weight and cost for(Gate* g : gates) { g->value = rand() % 2; + g->fault_need_update = 0; g->value_unsatisfied_cost = 1; + g->fault_need_update_cost = 1; g->fault_propagated_weight[0] = g->fault_propagated_weight[1] = 0; - g->fault_propagated_unsatisfied_cost[0] = g->fault_propagated_unsatisfied_cost[1] = 1; g->fault_detected_weight[0] = g->fault_detected_weight[1] = 0; - g->fault_detected_unsatisfied_cost[0] = g->fault_detected_unsatisfied_cost[1] = 1; } for(Fault* f : faults) { diff --git a/src/score.cpp b/src/score.cpp index c6389f3..019b8fb 100644 --- a/src/score.cpp +++ b/src/score.cpp @@ -5,39 +5,49 @@ int Gate::cal_score(int debug) { value ^= 1; - if(debug) { - // printf("lala: %s\n", this->name.c_str()); - assert(score_value_unsatisfied_cost == cal_value_unsatisfied_cost()); - assert(score_fault_propagated_weight[0] == cal_score_fault_propagated_weight(0)); - assert(score_fault_propagated_weight[1] == cal_score_fault_propagated_weight(1)); - assert(score_fault_propagated_unsatisfied_cost[0] == cal_score_fault_propagated_unsatisfied_cost(0)); - assert(score_fault_propagated_unsatisfied_cost[1] == cal_score_fault_propagated_unsatisfied_cost(1)); - assert(score_fault_detected_weight[0] == cal_score_fault_detected_weight(0)); - assert(score_fault_detected_weight[1] == cal_score_fault_detected_weight(1)); - assert(score_fault_detected_unsatisfied_cost[0] == cal_score_fault_detected_unsatisfied_cost(0)); - assert(score_fault_detected_unsatisfied_cost[1] == cal_score_fault_detected_unsatisfied_cost(1)); - } + // if(debug) { + // // printf("lala: %s\n", this->name.c_str()); + // assert(score_value_unsatisfied_cost == cal_value_unsatisfied_cost()); + // assert(score_fault_propagated_weight[0] == cal_score_fault_propagated_weight(0)); + // assert(score_fault_propagated_weight[1] == cal_score_fault_propagated_weight(1)); + // assert(score_fault_propagated_unsatisfied_cost[0] == cal_score_fault_propagated_unsatisfied_cost(0)); + // assert(score_fault_propagated_unsatisfied_cost[1] == cal_score_fault_propagated_unsatisfied_cost(1)); + // assert(score_fault_detected_weight[0] == cal_score_fault_detected_weight(0)); + // assert(score_fault_detected_weight[1] == cal_score_fault_detected_weight(1)); + // assert(score_fault_detected_unsatisfied_cost[0] == cal_score_fault_detected_unsatisfied_cost(0)); + // assert(score_fault_detected_unsatisfied_cost[1] == cal_score_fault_detected_unsatisfied_cost(1)); + // } + + int origin_fault_detected[2]; + origin_fault_detected[0] = this->fault_detected[0]; + origin_fault_detected[1] = this->fault_detected[1]; + this->fault_detected[0] = this->cal_fault_detected(0); + this->fault_detected[1] = this->cal_fault_detected(1); + + int origin_fault_propagated_len[2]; + origin_fault_propagated_len[0] = this->fault_propagated_len[0]; + origin_fault_propagated_len[1] = this->fault_propagated_len[1]; + this->fault_propagated_len[0] = this->cal_propagate_len(0); + this->fault_propagated_len[1] = this->cal_propagate_len(1); score_value_unsatisfied_cost = cal_value_unsatisfied_cost(); score_fault_propagated_weight[0] = cal_score_fault_propagated_weight(0); score_fault_propagated_weight[1] = cal_score_fault_propagated_weight(1); - score_fault_propagated_unsatisfied_cost[0] = cal_score_fault_propagated_unsatisfied_cost(0); - score_fault_propagated_unsatisfied_cost[1] = cal_score_fault_propagated_unsatisfied_cost(1); - score_fault_detected_weight[0] = cal_score_fault_detected_weight(0); score_fault_detected_weight[1] = cal_score_fault_detected_weight(1); - score_fault_detected_unsatisfied_cost[0] = cal_score_fault_detected_unsatisfied_cost(0); - score_fault_detected_unsatisfied_cost[1] = cal_score_fault_detected_unsatisfied_cost(1); + score_fault_update_cost = cal_score_fault_update_cost(); value ^= 1; + this->fault_propagated_len[0] = origin_fault_propagated_len[0]; + this->fault_propagated_len[1] = origin_fault_propagated_len[1]; + this->fault_detected[0] = origin_fault_detected[0]; + this->fault_detected[1] = origin_fault_detected[1]; - return - score_value_unsatisfied_cost + return - score_value_unsatisfied_cost - score_fault_update_cost + score_fault_propagated_weight[0] + score_fault_propagated_weight[1] - - score_fault_propagated_unsatisfied_cost[0] - score_fault_propagated_unsatisfied_cost[1] - + score_fault_detected_weight[0] + score_fault_detected_weight[1] - - score_fault_detected_unsatisfied_cost[0] - score_fault_detected_unsatisfied_cost[1]; + + score_fault_detected_weight[0] + score_fault_detected_weight[1]; } int Gate::cal_value_unsatisfied_cost() { @@ -65,62 +75,31 @@ int Gate::cal_score_fault_propagated_weight(int sa) { return res; } -int Gate::cal_score_fault_propagated_unsatisfied_cost(int sa) { - int res = 0; - int origin_fault_propagated_len[2]; - origin_fault_propagated_len[0] = this->fault_propagated_len[0]; - origin_fault_propagated_len[1] = this->fault_propagated_len[1]; - this->fault_propagated_len[0] = this->cal_propagate_len(0); - this->fault_propagated_len[1] = this->cal_propagate_len(1); - - if(!this->fault_propagated_satisfied[sa]) { - res -= this->fault_propagated_unsatisfied_cost[sa]; - } - - for(Gate* g : this->reigon) { - if(g->fault_propagated_satisfied[sa] && g->cal_propagate_len(sa) != g->fault_propagated_len[sa]) { - res += g->fault_propagated_unsatisfied_cost[sa]; - } - if(!g->fault_propagated_satisfied[sa] && g->cal_propagate_len(sa) == g->fault_propagated_len[sa]) { - res -= g->fault_propagated_unsatisfied_cost[sa]; - } - } - - this->fault_propagated_len[0] = origin_fault_propagated_len[0]; - this->fault_propagated_len[1] = origin_fault_propagated_len[1]; - return res; -} - int Gate::cal_score_fault_detected_weight(int sa) { int res = 0; res += ( this->cal_fault_detected(sa) - this->fault_detected[sa] ) * this->fault_detected_weight[sa]; return res; } -int Gate::cal_score_fault_detected_unsatisfied_cost(int sa) { +int Gate::cal_score_fault_update_cost() { int res = 0; - int origin_fault_detected[2]; - origin_fault_detected[0] = this->fault_detected[0]; - origin_fault_detected[1] = this->fault_detected[1]; - this->fault_detected[0] = this->cal_fault_detected(0); - this->fault_detected[1] = this->cal_fault_detected(1); - - if(!fault_detected_satisfied[sa]) { - res -= this->fault_detected_unsatisfied_cost[sa]; + if(this->fault_need_update) { + res -= this->fault_need_update_cost; } - for(Gate* g : this->reigon) { - if(g->fault_detected_satisfied[sa] && g->cal_fault_detected(sa) != g->fault_detected[sa]) { - res += g->fault_detected_unsatisfied_cost[sa]; - } - if(!g->fault_detected_satisfied[sa] && g->cal_fault_detected(sa) == g->fault_detected[sa]) { - res -= g->fault_detected_unsatisfied_cost[sa]; + for(Gate* g : fanins) { + bool changed = 0; + if(!changed && g->cal_fault_detected(0) != g->fault_detected[0]) changed = 1; + if(!changed && g->cal_fault_detected(1) != g->fault_detected[1]) changed = 1; + if(!changed && g->cal_propagate_len(0) != g->cal_propagate_len(0)) changed = 1; + if(!changed && g->cal_propagate_len(1) != g->cal_propagate_len(1)) changed = 1; + + if(!g->fault_need_update && changed) { + res += g->fault_need_update_cost; } } - this->fault_detected[0] = origin_fault_detected[0]; - this->fault_detected[1] = origin_fault_detected[1]; - return res; + } \ No newline at end of file