-
Notifications
You must be signed in to change notification settings - Fork 667
Cts add user clock buffer prefix for list inferring #7231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Cts add user clock buffer prefix for list inferring #7231
Conversation
Signed-off-by: arthurjolo <[email protected]>
… the buffer list Signed-off-by: arthurjolo <[email protected]>
Signed-off-by: arthurjolo <[email protected]>
Signed-off-by: arthurjolo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -249,6 +251,7 @@ class CtsOptions : public odb::dbBlockCallBackObj | |||
std::string sinkBuffer_ = ""; | |||
std::string treeBuffer_ = ""; | |||
std::string metricFile_ = ""; | |||
std::string bufferListPrefix_ = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: redundant string initialization [readability-redundant-string-init]
std::string bufferListPrefix_ = ""; | |
std::string bufferListPrefix_; |
@@ -667,7 +667,30 @@ void TritonCTS::inferBufferList(std::vector<std::string>& buffers) | |||
} | |||
delete lib_iter; | |||
|
|||
// second, look for all buffers with name CLKBUF or clkbuf | |||
// second, look for buffers with name especified by the user | |||
if (options_->getBufferListPrefix() != "") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the 'empty' method should be used to check for emptiness instead of comparing to an empty object [readability-container-size-empty]
if (options_->getBufferListPrefix() != "") { | |
if (!options_->getBufferListPrefix().empty()) { |
Additional context
/usr/include/c++/11/bits/basic_string.h:1022: method 'basic_string'::empty() defined here
empty() const _GLIBCXX_NOEXCEPT
^
Why not use |
The main reason to add this command is that when CTS does the buffer list inference it sometimes will fail to identify the clock specific buffers. And if you use -buf_list CTS can be slowed down if the list is too big. So this command would help guide the buffer inference and it would take advantage of the buffer list trimming. But i believe this will not be added to production, we need to improve how the buffer inference works. |
Add the option for user to define the clock buffer name that CTS will look for when inferring the buffer list (e.g. "CLKBUF"). If no cells are found using the user's name it will proceed with the normal inferring procedure. This helps users which PDKs don't follow the default clock buffer name defined in CTS.