Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
257f72f
est: key layer RC table by tech layer instead of layer number
eder-matheus Jul 16, 2026
8ca1f22
est: add -tech, -chip and -redistribution_layer to set_wire_rc with p…
eder-matheus Jul 16, 2026
19c8158
est: test set_wire_rc chip and tech selectors
eder-matheus Jul 16, 2026
272d6c2
est: document set_wire_rc chip and tech selectors
eder-matheus Jul 16, 2026
1eae795
est: address review comments on RC lookups and callback construction
eder-matheus Jul 17, 2026
efe9f69
est: fall back to default wire RC per category instead of per chip
eder-matheus Jul 17, 2026
140a59d
est: fix layer selection for chips with different technologies
eder-matheus Jul 17, 2026
911afac
est: add chip selectors to set_wire_rc synopsis in README
eder-matheus Jul 17, 2026
8334911
est: split set_wire_rc chip selector tests into self-contained cases
eder-matheus Jul 17, 2026
28d6b90
est: rename wireRCVector to resolveWireRC
eder-matheus Jul 17, 2026
9bb6cc3
est: move resolveWireRC definition out of the header
eder-matheus Jul 17, 2026
87e16b3
est: consolidate helper procs into one namespace eval block
eder-matheus Jul 17, 2026
a64f576
est: clarify the parse_wire_rc_chips comment
eder-matheus Jul 17, 2026
2140f52
est: name wire RC getter locals after their category
eder-matheus Jul 17, 2026
bb93e33
est: key wire RC by technology instead of by chip
eder-matheus Jul 17, 2026
e0b9e7f
est: retarget wire RC selector tests to technologies
eder-matheus Jul 17, 2026
b268a3e
Merge branch 'master' of https://github.com/The-OpenROAD-Project/Open…
eder-matheus Jul 21, 2026
93c25f7
est: format set_wire_rc_tech_errors catch block per tclfmt
eder-matheus Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/est/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ The `set_wire_rc` command sets the resistance and capacitance used to estimate
delay of routing wires. Separate values can be specified for clock and data
nets with the `-signal` and `-clock` flags. Without either `-signal` or
`-clock` the resistance and capacitance for clocks and data nets are set.
In 3D designs the values can be targeted at a technology with the `-tech` and
`-redistribution_layer` selectors; without a selector the values are the
defaults used by chips whose technology has no specific values.

```
# Either run
Expand All @@ -31,13 +34,17 @@ set_wire_rc
[-data]
[-corner corner]
[-layers layers_list]
[-tech tech]
[-redistribution_layer]

or
set_wire_rc
[-h_resistance res]
[-h_capacitance cap]
[-v_resistance res]
[-v_capacitance cap]
[-tech tech]
[-redistribution_layer]

or
set_wire_rc
Expand All @@ -46,10 +53,14 @@ set_wire_rc
[-data]
[-corner corner]
[-layer layer_name]
[-tech tech]
[-redistribution_layer]
or
set_wire_rc
[-resistance res]
[-capacitance cap]
[-tech tech]
[-redistribution_layer]
```

#### Options
Expand All @@ -66,6 +77,13 @@ set_wire_rc
| `-h_capacitance` | Capacitance per unit length for horizontal wires, units are from the first Liberty file read. |
| `-v_resistance` | Resistance per unit length for vertical wires, units are from the first Liberty file read. |
| `-v_capacitance` | Capacitance per unit length for vertical wires, units are from the first Liberty file read. |
| `-tech` | Apply the values to the named technology (3D designs). Layers given with `-layer`/`-layers` are looked up in this technology. |
| `-redistribution_layer` | Apply the values to the technology of every RDL chip in the design. Warns and does nothing when the design has none, so shared scripts work across designs. `-layer`/`-layers` require the RDL chips to share one technology; with mixed RDL technologies set each one separately with `-tech`. |

Without `-tech` or `-redistribution_layer` the values are the defaults used by
every chip whose technology has no specific values. Signal values, clock values
and routing layers fall back to the defaults independently, so a technology with
only specific signal values still uses the default clock values.

### Set Layer RC

Expand Down
55 changes: 38 additions & 17 deletions src/est/include/est/EstimateParasitics.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <ostream>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

Expand Down Expand Up @@ -99,25 +100,31 @@ class EstimateParasitics : public sta::dbStaState, public ParasiticsService
// Return values.
double& res,
double& cap) const;
void addClkLayer(odb::dbTechLayer* layer);
void addSignalLayer(odb::dbTechLayer* layer);
// A null tech in the setters below writes the default values used by
// chips whose technology has no specific values.
void addClkLayer(odb::dbTech* tech, odb::dbTechLayer* layer);
void addSignalLayer(odb::dbTech* tech, odb::dbTechLayer* layer);
void sortClkAndSignalLayers();
// Set the resistance and capacitance used for horizontal parasitics on signal
// nets.
void setHWireSignalRC(const sta::Scene* scene,
void setHWireSignalRC(odb::dbTech* tech,
const sta::Scene* scene,
double res, // ohms/meter
double cap); // farads/meter
// Set the resistance and capacitance used for vertical wires parasitics on
// signal nets.
void setVWireSignalRC(const sta::Scene* scene,
void setVWireSignalRC(odb::dbTech* tech,
const sta::Scene* scene,
double res, // ohms/meter
double cap); // farads/meter
// Set the resistance and capacitance used for parasitics on clock nets.
void setHWireClkRC(const sta::Scene* scene,
void setHWireClkRC(odb::dbTech* tech,
const sta::Scene* scene,
double res,
double cap); // farads/meter
// Set the resistance and capacitance used for parasitics on clock nets.
void setVWireClkRC(const sta::Scene* scene,
void setVWireClkRC(odb::dbTech* tech,
const sta::Scene* scene,
double res,
double cap); // farads/meter
// ohms/meter, farads/meter
Expand Down Expand Up @@ -210,6 +217,23 @@ class EstimateParasitics : public sta::dbStaState, public ParasiticsService
utl::Logger* getLogger() { return logger_; }

private:
// Wire RC values and layers of one technology, indexed by corner->index()
struct WireRC
{
std::vector<odb::dbTechLayer*> signal_layers;
std::vector<odb::dbTechLayer*> clk_layers;
std::vector<ParasiticsResistance> signal_res; // ohms/meter
std::vector<ParasiticsCapacitance> signal_cap; // Farads/meter
std::vector<ParasiticsResistance> clk_res; // ohms/meter
std::vector<ParasiticsCapacitance> clk_cap; // Farads/meter
};

odb::dbTech* currentTech() const;
WireRC& wireRC(odb::dbTech* tech) { return wire_rc_[tech]; }
// Resolve one WireRC category for the current technology; a category left
// unset for a tech falls back to the defaults (nullptr entry) independently.
template <typename T>
const std::vector<T>& resolveWireRC(std::vector<T> WireRC::*category) const;
void ensureParasitics();
bool isIdealClockPin(const sta::Pin* pin) const;
bool isIdealClockNet(const sta::Net* net) const;
Expand Down Expand Up @@ -258,17 +282,14 @@ class EstimateParasitics : public sta::dbStaState, public ParasiticsService
odb::dbBlock* block_ = nullptr;
std::unique_ptr<OdbCallBack> db_cbk_;

std::vector<odb::dbTechLayer*> signal_layers_;
std::vector<odb::dbTechLayer*> clk_layers_;
// Layer RC per wire length indexed by layer->getNumber(), corner->index
std::vector<std::vector<double>> layer_res_; // ohms/meter
std::vector<std::vector<double>> layer_cap_; // Farads/meter
// Signal wire RC indexed by corner->index
std::vector<ParasiticsResistance> wire_signal_res_; // ohms/metre
std::vector<ParasiticsCapacitance> wire_signal_cap_; // Farads/meter
// Clock wire RC.
std::vector<ParasiticsResistance> wire_clk_res_; // ohms/metre
std::vector<ParasiticsCapacitance> wire_clk_cap_; // Farads/meter
// Layer RC per wire length keyed by layer, indexed by corner->index()
std::unordered_map<odb::dbTechLayer*, std::vector<double>>
layer_res_; // ohms/meter
std::unordered_map<odb::dbTechLayer*, std::vector<double>>
layer_cap_; // Farads/meter
// Wire RC per technology; the nullptr entry holds the defaults used by
// chips whose technology has no specific values
std::unordered_map<odb::dbTech*, WireRC> wire_rc_;

ParasiticsSrc parasitics_src_ = ParasiticsSrc::kNone;

Expand Down
Loading
Loading