Merge pull request #3349 from nakengelhardt/select_count_scratchpad

Make 'stat' and 'select -count' save counts to scratchpad
This commit is contained in:
N. Engelhardt 2022-06-09 17:15:02 +02:00 committed by GitHub
commit b8ede6162b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -1456,7 +1456,10 @@ struct SelectPass : public Pass {
} }
} }
if (count_mode) if (count_mode)
{
design->scratchpad_set_int("select.count", total_count);
log("%d objects.\n", total_count); log("%d objects.\n", total_count);
}
if (f != nullptr) if (f != nullptr)
fclose(f); fclose(f);
#undef LOG_OBJECT #undef LOG_OBJECT

View File

@ -381,6 +381,15 @@ struct StatPass : public Pass {
log("\n"); log("\n");
data.log_data(top_mod->name, true); data.log_data(top_mod->name, true);
design->scratchpad_set_int("stat.num_wires", data.num_wires);
design->scratchpad_set_int("stat.num_wire_bits", data.num_wire_bits);
design->scratchpad_set_int("stat.num_pub_wires", data.num_pub_wires);
design->scratchpad_set_int("stat.num_pub_wire_bits", data.num_pub_wire_bits);
design->scratchpad_set_int("stat.num_memories", data.num_memories);
design->scratchpad_set_int("stat.num_memory_bits", data.num_memory_bits);
design->scratchpad_set_int("stat.num_processes", data.num_processes);
design->scratchpad_set_int("stat.num_cells", data.num_cells);
design->scratchpad_set_int("stat.area", data.area);
} }
log("\n"); log("\n");