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

Slight difference in results when using -corners #6175

Open
maliberty opened this issue Nov 17, 2024 Discussed in #6174 · 13 comments
Open

Slight difference in results when using -corners #6175

maliberty opened this issue Nov 17, 2024 Discussed in #6174 · 13 comments
Assignees
Labels
gpl Global Placement

Comments

@maliberty
Copy link
Member

Discussed in #6174

Originally posted by kareefardi November 17, 2024
test.tar.gz
This is a test case of two scripts running global placement. Both functionally should be identical. The difference is one uses -corner for set_wire_rc while the other doesn't.

For the case using -corner, set_layer_rc is needed. The code attempts to fetch the default values in the tlef and reuse them in set_layer_rc after doing the necessary unit conversions.

There seems to be a slight difference in the output generated from both runs (notice the reported slacks and HPWL) and I am wondering if this a round-off error, a methodology error at my end or something else related to OR itself.

@kareefardi
Copy link
Contributor

Hello. Any progress on this issue?

@gudeh
Copy link
Contributor

gudeh commented Jan 2, 2025

Hi @kareefardi, I see the difference between runs only happens after the first timing-driven iteration. I am not yet fully aware of the implications of the set_wire_rc command from rsz.

Are you sure the two runs should be equivalent?
image

@kareefardi
Copy link
Contributor

Hi @kareefardi, I see the difference between runs only happens after the first timing-driven iteration. I am not yet fully aware of the implications of the set_wire_rc command from rsz.

Are you sure the two runs should be equivalent? image

Hello @gudeh. From a usage point of view, I believe they should be equivalent.
I am trying to understand where is the difference coming from and if I am incorrectly using the APIs - or perhaps there is round off differences somewhere.

@kareefardi
Copy link
Contributor

I guess this can also be avoid by understanding this error:

[INFO GPL-0030] NumBins: 4096
[WARNING RSZ-0088] Corner: nom_tt_025C_1v80 has no wire signal resistance value.
[ERROR RSZ-0089] Could not find a resistance value for any corner. Cannot evaluate max wire length for buffer. Check over your `set_wire_rc` configuration

This happens when set_wire_rc is called with the argument -corner. It is not clear what is the impact of not using the argument when there are multiple (or single) corner defined

@maliberty
Copy link
Member Author

FYI, test.tar.gz is misnamed as it is not compressed and should be test.tar

@kareefardi
Copy link
Contributor

FYI, test.tar.gz is misnamed as it is not compressed and should be test.tar

Thanks

@arthurjolo
Copy link
Contributor

Hi @kareefardi I did some debugging and I believe there are some floating point errors here.

I changed your tcl script to show the values of RC per layer, the original value and the value after you use the command set_layer_rc.
image

On the image I printed the values for layer met2. On the top is the value read from rsz::dblayer_wire_rc, and on the bottom is the value read from rsz::layer_resistance and rsz::layer_capacitance after you called set_layer_rc (the command that is used on set_wire_rc to get the RC when the corner is specified). We can see that there is a small difference in the values.

With this difference the set_wire_rc command will see differnt RC values on the 2 runs.

@arthurjolo
Copy link
Contributor

Could not find a resistance value for any corner

I guess this can also be avoid by understanding this error:

[INFO GPL-0030] NumBins: 4096
[WARNING RSZ-0088] Corner: nom_tt_025C_1v80 has no wire signal resistance value.
[ERROR RSZ-0089] Could not find a resistance value for any corner. Cannot evaluate max wire length for buffer. Check over your `set_wire_rc` configuration

This happens when set_wire_rc is called with the argument -corner. It is not clear what is the impact of not using the argument when there are multiple (or single) corner defined

Also I was not able to reproduce this warnings.

@kareefardi
Copy link
Contributor

kareefardi commented Jan 8, 2025

Hi @kareefardi I did some debugging and I believe there are some floating point errors here.

I changed your tcl script to show the values of RC per layer, the original value and the value after you use the command set_layer_rc. image

On the image I printed the values for layer met2. On the top is the value read from rsz::dblayer_wire_rc, and on the bottom is the value read from rsz::layer_resistance and rsz::layer_capacitance after you called set_layer_rc (the command that is used on set_wire_rc to get the RC when the corner is specified). We can see that there is a small difference in the values.

With this difference the set_wire_rc command will see differnt RC values on the 2 runs.

Thanks for debugging.

Could not find a resistance value for any corner

I guess this can also be avoid by understanding this error:

[INFO GPL-0030] NumBins: 4096
[WARNING RSZ-0088] Corner: nom_tt_025C_1v80 has no wire signal resistance value.
[ERROR RSZ-0089] Could not find a resistance value for any corner. Cannot evaluate max wire length for buffer. Check over your `set_wire_rc` configuration

This happens when set_wire_rc is called with the argument -corner. It is not clear what is the impact of not using the argument when there are multiple (or single) corner defined

Also I was not able to reproduce this warnings.

Yes this isn't part of the test case. But I noticed that I didn't describe how to fully create it. If you call set_wire_rc with the argument -corner and not use set_layer_rc, you get the error above.

Here is a tcl script to use script.tar.gz

The reason why I was reading the default values and setting them again is due to this error

@arthurjolo
Copy link
Contributor

arthurjolo commented Jan 16, 2025

I see, this error happens because if you call set_wire_rc and use -corner the command will try to get the rc values for that corner, and to set the rc values for a specific corner I believe you must use set_layer_rc command. Maybe some support could be added so that when set_layer_rc was not called to use the default values, but that is the same behavior as not using -corner and then it will use the default value and set the same wire_rc for all corners. @maliberty should we add this support?

@maliberty
Copy link
Member Author

I don't understand the linkage between set_layer_rc and set_wire_rc. They seem like independent commands and information. Would you expand on the connection?

@arthurjolo
Copy link
Contributor

arthurjolo commented Jan 16, 2025

Sure, when set_wire_rc is used with -layer or -layers the command will set the wires rc to be the same as the layer or the layers that are passed. If there is also -corner it will set the wire rc for that specific corner as the rc for the passed layer or layers on that specific corner, if the layer rc for the corner hasn't been set it will set the wire rc as 0. To set the layer rc for a specific corner I think the only option is set_layer_rc.

@kareefardi
Copy link
Contributor

kareefardi commented Jan 19, 2025

Thanks @arthurjolo for looking into it. I am also interested in the current behavior of OR. Assuming the following scenarios:

Scenario A:

  • Multiple corners are defined
  • set_layer_rc is used for each corner
  • set_wire_rc is used but without passing -corner

Scenario B:

  • Multiple corners are defined
  • set_wire_rc is used but without passing -corner

I would assume that calling set_wire_rc without passing -corner enforces the configuration across all defined corners. Would that be correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gpl Global Placement
Projects
None yet
Development

No branches or pull requests

4 participants