aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorN. Engelhardt <nak@yosyshq.com>2022-06-09 17:15:02 +0200
committerGitHub <noreply@github.com>2022-06-09 17:15:02 +0200
commitb8ede6162bec601bfa7f7ed98afa9ed077d62864 (patch)
treed5133db340963318f7ffd5af62dad839b750ed84 /passes
parent871b277d35687147be7911d3277c79ae29abf2c9 (diff)
parent61b05051e10e4a203eb13e67ccfc72520e8ca111 (diff)
downloadyosys-b8ede6162bec601bfa7f7ed98afa9ed077d62864.tar.gz
yosys-b8ede6162bec601bfa7f7ed98afa9ed077d62864.tar.bz2
yosys-b8ede6162bec601bfa7f7ed98afa9ed077d62864.zip
Merge pull request #3349 from nakengelhardt/select_count_scratchpad
Make 'stat' and 'select -count' save counts to scratchpad
Diffstat (limited to 'passes')
-rw-r--r--passes/cmds/select.cc3
-rw-r--r--passes/cmds/stat.cc9
2 files changed, 12 insertions, 0 deletions
diff --git a/passes/cmds/select.cc b/passes/cmds/select.cc
index d609c8d0f..b112b145c 100644
--- a/passes/cmds/select.cc
+++ b/passes/cmds/select.cc
@@ -1456,7 +1456,10 @@ struct SelectPass : public Pass {
}
}
if (count_mode)
+ {
+ design->scratchpad_set_int("select.count", total_count);
log("%d objects.\n", total_count);
+ }
if (f != nullptr)
fclose(f);
#undef LOG_OBJECT
diff --git a/passes/cmds/stat.cc b/passes/cmds/stat.cc
index fffdda48e..c858c8631 100644
--- a/passes/cmds/stat.cc
+++ b/passes/cmds/stat.cc
@@ -381,6 +381,15 @@ struct StatPass : public Pass {
log("\n");
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");