Skip to content
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

dbSta: fix modinst lookup #6624

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

gadfort
Copy link
Collaborator

@gadfort gadfort commented Jan 31, 2025

@maliberty this seems to be enough to resolve the issue I was having.
The issue was the list -> string conversion with escape characters.

Signed-off-by: Peter Gadfort <[email protected]>
@gadfort gadfort requested a review from maliberty January 31, 2025 15:16
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@@ -93,7 +93,7 @@ proc report_cell_usage { args } {

set module [[ord::get_db_block] getTopModule]
if { $args != "" } {
set modinst [[ord::get_db_block] findModInst $args]
set modinst [[ord::get_db_block] findModInst [lindex $args 0]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command doesn't take a list. It might be surprising to someone who tries that to get only the first element. Is an error better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or at least a check that it is of length 1

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already check for this: check_argc_eq0or1 "report_cell_usage" $args above (args must be length 0 or 1)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really:

>>> report_cell_usage [list 1 2 3]
[ERROR STA-1002] Unable to find {1 2 3}
[ERROR GUI-0070] STA-1002
>>> report_cell_usage  1 2 3
[ERROR STA-0566] report_cell_usage requires zero or one positional arguments.
[ERROR GUI-0070] STA-0566

Copy link
Collaborator Author

@gadfort gadfort Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the first case, you are passing in an list, which gets converted to "{1 2 3}", not sure what we would check then, this is true for everything, if you pass in a list when a list is not expected it's wrong.
In the first case, args = [list [list 1 2 3]]

@maliberty maliberty merged commit 73e3d92 into The-OpenROAD-Project:master Feb 2, 2025
11 checks passed
@gadfort gadfort deleted the fix-modinst-lookup branch February 2, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants