tribuf: set scratchpad boolean 'tribuf.added_something'
authorEddie Hung <eddie@fpgeh.com>
Thu, 12 Dec 2019 22:32:29 +0000 (14:32 -0800)
committerEddie Hung <eddie@fpgeh.com>
Thu, 12 Dec 2019 22:32:29 +0000 (14:32 -0800)
passes/techmap/tribuf.cc

index 41fdc8f3d6bf37283b57b8c1546317d7241e3bc4..decf9a20242024ce5cc26374a8d7aa31047e6eb2 100644 (file)
@@ -86,6 +86,7 @@ struct TribufWorker {
                                        cell->unsetPort(ID(S));
                                        cell->type = tri_type;
                                        tribuf_cells[sigmap(cell->getPort(ID::Y))].push_back(cell);
+                                       module->design->scratchpad_set_bool("tribuf.added_something", true);
                                        continue;
                                }
 
@@ -95,6 +96,7 @@ struct TribufWorker {
                                        cell->unsetPort(ID(S));
                                        cell->type = tri_type;
                                        tribuf_cells[sigmap(cell->getPort(ID::Y))].push_back(cell);
+                                       module->design->scratchpad_set_bool("tribuf.added_something", true);
                                        continue;
                                }
                        }
@@ -130,8 +132,10 @@ struct TribufWorker {
 
                                if (no_tribuf)
                                        module->connect(it.first, muxout);
-                               else
+                               else {
                                        module->addTribuf(NEW_ID, muxout, module->ReduceOr(NEW_ID, pmux_s), it.first);
+                                       module->design->scratchpad_set_bool("tribuf.added_something", true);
+                               }
                        }
                }
        }