add debug information
This commit is contained in:
parent
e3925da63b
commit
080617a8c8
|
@ -239,7 +239,7 @@ int Match::getMatch(string dir)
|
||||||
match(i);
|
match(i);
|
||||||
vector<string> dirs = splits(dir, "/");
|
vector<string> dirs = splits(dir, "/");
|
||||||
string outdir = "result/" + dirs[1] + "/" + dirs[2] + ".out";
|
string outdir = "result/" + dirs[1] + "/" + dirs[2] + ".out";
|
||||||
cout << outdir << endl;
|
//cout << outdir << endl;
|
||||||
FILE *out;
|
FILE *out;
|
||||||
out = fopen(outdir.c_str(), "w");
|
out = fopen(outdir.c_str(), "w");
|
||||||
for (int i = 1; i <= n; i++)
|
for (int i = 1; i <= n; i++)
|
||||||
|
|
|
@ -52,6 +52,7 @@ void abc_map(string in_file, string write_cmd, string out_file, string lib) {
|
||||||
command += "map;"; // area-only mapping
|
command += "map;"; // area-only mapping
|
||||||
command += write_cmd + " " + out_file + ";";
|
command += write_cmd + " " + out_file + ";";
|
||||||
execute_command(command);
|
execute_command(command);
|
||||||
|
cout << "Standard cell mapping done!" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void abc_lutpack(string in_file, string write_cmd, string out_file, string lib) {
|
void abc_lutpack(string in_file, string write_cmd, string out_file, string lib) {
|
||||||
|
@ -68,4 +69,5 @@ void abc_lutpack(string in_file, string write_cmd, string out_file, string lib)
|
||||||
// }
|
// }
|
||||||
command += write_cmd + " " + out_file + ";";
|
command += write_cmd + " " + out_file + ";";
|
||||||
execute_command(command);
|
execute_command(command);
|
||||||
|
cout << "LUT packing done!" << endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ Circuit::Circuit(string benchmark_)
|
||||||
|
|
||||||
standard_cell_map("ALL.genlib");
|
standard_cell_map("ALL.genlib");
|
||||||
|
|
||||||
|
cout << "PI = " << input.size() << ", PO = " << output.size() << ", size = " << graph.size() << endl;
|
||||||
|
|
||||||
abc_res = get_abc_result();
|
abc_res = get_abc_result();
|
||||||
|
|
||||||
// for (auto p : graph) {
|
// for (auto p : graph) {
|
||||||
|
@ -209,9 +211,7 @@ pair<int, pair<int, int> > Circuit::get_abc_result() {
|
||||||
int r1 = abc_lut_area;
|
int r1 = abc_lut_area;
|
||||||
int r2 = abc_lut_area - mt->getMatch(benchmark + "_abc_lut.blif");
|
int r2 = abc_lut_area - mt->getMatch(benchmark + "_abc_lut.blif");
|
||||||
int r3 = mt->maxdep;
|
int r3 = mt->maxdep;
|
||||||
cout << "ABC Area1: " << r1 << endl;
|
cout << "ABC single_area = " << r1 << ", dual_area = " << r2 << ", depth = " << r3 << endl;
|
||||||
cout << "ABC Area2: " << r2 << endl;
|
|
||||||
cout << "ABC dep" << " " << r3 << endl;
|
|
||||||
return make_pair(r1, make_pair(r2, r3));
|
return make_pair(r1, make_pair(r2, r3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ pair<int, int> Output(Circuit &c) {
|
||||||
}
|
}
|
||||||
fprintf(out1, "%s\n", ("\noutput:\n" + now).c_str());
|
fprintf(out1, "%s\n", ("\noutput:\n" + now).c_str());
|
||||||
}
|
}
|
||||||
fprintf(stdout, "Area: %d\nDepth: %d\n", area, dep);
|
fprintf(stdout, "DOLM single_area = %d, single_depth = %d\n", area, dep);
|
||||||
c.Dep = dep;
|
c.Dep = dep;
|
||||||
return make_pair(area, dep);
|
return make_pair(area, dep);
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ pair<int, int> Output2(Circuit &c) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(stdout, "Area: %d\nDepth: %d\n", area, c.Dep);
|
fprintf(stdout, "DOLM dual_area = %d, dual_depth = %d\n", area, c.Dep);
|
||||||
return make_pair(area, c.Dep);
|
return make_pair(area, c.Dep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
clock_t finish = clock();
|
clock_t finish = clock();
|
||||||
total_time = (double) (finish - start) / CLOCKS_PER_SEC;
|
total_time = (double) (finish - start) / CLOCKS_PER_SEC;
|
||||||
cout << "Run time: " << total_time << "s" << endl;
|
cout << "Run time = " << total_time << "s" << endl;
|
||||||
}
|
}
|
||||||
fout.close();
|
fout.close();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue