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

report_design_area: allow redirection to file #6046

Conversation

oharboe
Copy link
Collaborator

@oharboe oharboe commented Oct 29, 2024

same as all other commands, don't know why this one slipped between the cracks

same as all other commands, don't know why this one slipped
between the cracks

Signed-off-by: Øyvind Harboe <[email protected]>
Copy link
Contributor

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

@@ -637,7 +637,7 @@ proc repair_timing { args } {

sta::define_cmd_args "report_design_area" {}

proc report_design_area { args } {
Copy link
Collaborator

Choose a reason for hiding this comment

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

you need to update the define_cmd_args to reflect this change.
See:

sta::define_cmd_args "report_floating_nets" {[-verbose] [> filename] [>> filename]} ;# checker off

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Getting some errors.

Running tapcell.tcl, stage 2_4_floorplan_tapcell
Error: TCL init script: invalid command name "wrong # args: should be "sta::proc_redirect proc_name body"
    while executing
"sta::proc_redirect report_design_area { args } {

Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like the proc_redirect indirectly defined args:

sta::proc_redirect report_floating_nets {

I think you just need to change it to sta::proc_redirect report_design_area {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

After a bit more hacking and

find tools/OpenROAD/ -regex .*tclInitVar.*.cc -exec rm {} \;
./build_openroad.sh --local --no_init

It compiles.

However "make do-2_1_floorplan" does not redirect yet...

$ make open_floorplan
ODB_FILE=./results/nangate45/gcd/base/2_floorplan.odb /home/oyvind/OpenROAD-flow-scripts/tools/install/OpenROAD/bin/openroad -no_init -threads 48  /home/oyvind/OpenROAD-flow-scripts/flow/scripts/open.tcl
OpenROAD v2.0-16809-g23f5678bc 
Features included (+) or not (-): +Charts +GPU +GUI +Python : Debug
This program is licensed under the BSD-3 license. See the LICENSE file for details.
Components of this program may be licensed under more restrictive licenses which must be honored.
[INFO ORD-0030] Using 48 thread(s).
GUI_TIMING=1 reading timing, takes a little while for large designs...
Populating timing paths...
openroad> report_design_area >ll.txt
Design area 663 u^2 58% utilization.
openroad> report_design_area >>ll.txt
Design area 663 u^2 58% utilization.
openroad> 

$ cat ll.txt 

Copy link
Collaborator

Choose a reason for hiding this comment

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

The issue seems to be that using utl::report bypasses the file redirect.
The same issue appears in the report_floating_nets it's possible that the redirect doesn't work correctly with the logger.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm sitting tight for advice here, I have no idea what the intention is or what would be consistent in this code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the fix needs to be in a different PR (you might want to open an issue for tracking).
While this code doesn't work as intended until the underlying issue is resolved I don't think there is any harm in merging this in (just means to be able to use it it might take some time)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One concern at the time, yes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@maliberty Can you check if it is a quick fix to address what @gadfort found or articulate a github issue? I'm a little bit vague on exactly what the problem is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

it's somewhat involved...
The underlying issue is here:

void dbStaReport::printLine(const char* line, size_t length)

Because the tcl code and STA directs all it's prints to this function we correctly redirect the code, in openroad, we use the logger directly and thus this is broken.

Copy link
Contributor

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

Copy link
Contributor

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

@oharboe
Copy link
Collaborator Author

oharboe commented Oct 31, 2024

@maliberty Let me know if you want to move forward with this

@oharboe oharboe closed this Oct 31, 2024
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