-
Notifications
You must be signed in to change notification settings - Fork 598
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
dbSta: fix modinst lookup #6624
Conversation
Signed-off-by: Peter Gadfort <[email protected]>
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]] |
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.
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?
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.
Or at least a check that it is of length 1
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.
we already check for this: check_argc_eq0or1 "report_cell_usage" $args
above (args
must be length 0 or 1)
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.
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
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.
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 this seems to be enough to resolve the issue I was having.
The issue was the list -> string conversion with escape characters.