存在一些bug的传统版本

This commit is contained in:
YuhangQ 2023-02-26 03:47:26 +00:00
parent 1c7fed5672
commit 589eeb7432
5 changed files with 16104 additions and 25193 deletions

BIN
atpg

Binary file not shown.

View File

@ -10,6 +10,7 @@ void Circuit::init_stems() {
if(gate->outputs.size() >= 2) {
gate->stem = true;
}
gate->stem = true;
if(gate->stem) {
stems.push_back(gate);
}

View File

@ -78,7 +78,7 @@ int* flip_need_update;
std::vector<Gate*> flip_update_queue;
// incremental stem struct
const int STEM_INC = 20;
const int STEM_INC = 10;
const int STEM_WEIGHT_MAX = 1e9;
ll stem_total_weight;
int stem_total_cnt;

View File

@ -38,11 +38,11 @@ int main(int args, char* argv[]) {
while(true) {
bool ls = circuit->local_search(faults);
//bool is_valid = circuit->is_valid_circuit();
bool is_valid = circuit->is_valid_circuit();
printf("checking valid circuit ...");
//printf(" result: %d.\n", is_valid);
printf(" result: %d.\n", is_valid);
if(!ls) break;
//if(!is_valid) break;
if(!is_valid) break;
if(faults.size() == 0) break;
}

41288
output.txt

File diff suppressed because it is too large Load Diff