also make 'stat' save counts to scratchpad
authorN. Engelhardt <nak@yosyshq.com>
Wed, 1 Jun 2022 14:01:07 +0000 (16:01 +0200)
committerN. Engelhardt <nak@yosyshq.com>
Wed, 1 Jun 2022 14:01:07 +0000 (16:01 +0200)
passes/cmds/stat.cc

index fffdda48e71b01b9f55ed78be22d64fad9b4ad5e..c858c863182c7bba2cee8dc56600faf4ce69ed98 100644 (file)
@@ -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");