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

rsz: Rebuffering wire delay model can be better #5440

Open
povik opened this issue Jul 24, 2024 · 2 comments · May be fixed by #6637
Open

rsz: Rebuffering wire delay model can be better #5440

povik opened this issue Jul 24, 2024 · 2 comments · May be fixed by #6637
Assignees
Labels
rsz Resizer

Comments

@povik
Copy link
Contributor

povik commented Jul 24, 2024

Describe the bug

Take a look at Rebuffer.cc at rebufferBottomUp:

   double layer_res, layer_cap;
    bnet_wire->wireRC(corner, resizer_, layer_res, layer_cap);
    double wire_res = wire_length * layer_res;
    double wire_cap = wire_length * layer_cap;
    double wire_delay = wire_res * wire_cap;
    BufferedNetPtr z = make_shared<BufferedNet>(
        BufferedNetType::wire, wire_end, wire_layer, p, corner, resizer_);
    // account for wire load
    z->setCapacitance(p->cap() + wire_cap);
    z->setRequiredPath(req_path);
    // account for wire delay
    z->setRequiredDelay(p->requiredDelay() + wire_delay);

the wire delay is taken to be R*C where R and C refer to the wire itself, there's no taking account of the capacitance downstream of the wire segment. This has an effect when different buffering options are evaluated later on within the same file.

Expected Behavior

The delay is modeled with R*C/2 + R*C_downstream or similar

Environment

N/A

To Reproduce

N/A

Relevant log output

No response

Screenshots

No response

Additional Context

No response

@precisionmoon
Copy link
Contributor

I think you mean function RepairSetup::addWireAndBuffer(). Yes, if we had a distributed RC or a pie RC, we can compute Elmore delay using downstream cap. The code seems to be focusing on a pre-route case without extracted RC. If we have the full distributed RC available, we can cut the RC network at the desired buffer location to do more accurate estimation and para update. This will require significant code change though.

@povik
Copy link
Contributor Author

povik commented Aug 7, 2024

I think you mean function RepairSetup::addWireAndBuffer().

Yes, that's what I meant, thanks.

Yes, if we had a distributed RC or a pie RC, we can compute Elmore delay using downstream cap. The code seems to be focusing on a pre-route case without extracted RC.

At that place within the rebuffering code, we can use the same RC estimates which estimate_parasitics -placement is using. E.g. to implement the R*C/2 + R*C_downstream model:

diff --git a/src/rsz/src/Rebuffer.cc b/src/rsz/src/Rebuffer.cc
index a7ed71319..dd8310f0f 100644
--- a/src/rsz/src/Rebuffer.cc
+++ b/src/rsz/src/Rebuffer.cc
@@ -330,7 +330,7 @@ BufferedNetSeq RepairSetup::addWireAndBuffer(const BufferedNetSeq& Z,
     bnet_wire->wireRC(corner, resizer_, layer_res, layer_cap);
     double wire_res = wire_length * layer_res;
     double wire_cap = wire_length * layer_cap;
-    double wire_delay = wire_res * wire_cap;
+    double wire_delay = wire_res * (wire_cap / 2 + p->cap());
     BufferedNetPtr z = make_shared<BufferedNet>(
         BufferedNetType::wire, wire_end, wire_layer, p, corner, resizer_);
     // account for wire load

@openroad-ci openroad-ci linked a pull request Feb 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rsz Resizer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants