Skip to content

Expose LevelizeObserver / StaLevelizeObserver + add Sta::setLevelizeObserver#433

Open
dsengupta0628 wants to merge 1 commit into
parallaxsw:masterfrom
dsengupta0628:move_setobservers
Open

Expose LevelizeObserver / StaLevelizeObserver + add Sta::setLevelizeObserver#433
dsengupta0628 wants to merge 1 commit into
parallaxsw:masterfrom
dsengupta0628:move_setobservers

Conversation

@dsengupta0628
Copy link
Copy Markdown
Contributor

Three small additions to let downstream consumers (OpenROAD's dbSta) attach
their own LevelizeObserver without:

  • replicating StaLevelizeObserver's Search + GraphDelayCalc forwarding
    (silent drift risk if this class gains new responsibilities upstream),
  • reaching into the protected levelize_ member,
  • including the private search/Levelize.hh header.

Changes

  1. New public header include/sta/LevelizeObserver.hh — holds
    LevelizeObserver (abstract) and StaLevelizeObserver (default impl that
    forwards level-change events to Search and GraphDelayCalc). Both classes
    moved from their previous private locations.
  2. search/Levelize.hh — drop the inline LevelizeObserver definition;
    include the new public header instead.
  3. search/Sta.cc — drop the file-local StaLevelizeObserver class body;
    keep its method definitions (now defining the public class).
  4. include/sta/Sta.hh — add public
    void Sta::setLevelizeObserver(LevelizeObserver *).
  5. search/Sta.cc — implement Sta::setLevelizeObserver as a one-line
    forward to levelize_->setObserver(observer).

No behavior change. Sta::makeObservers still installs StaLevelizeObserver
exactly as before.

Why

OpenROAD dbSta needs to:

  • subclass a LevelizeObserver to invalidate its driver-vertex cache when
    levels change, and
  • preserve the existing Search/GraphDelayCalc forwarding that StaLevelizeObserver
    provides.

Today the only way is to:

  • add ${OPENSTA_HOME} to its private include path (since search/Levelize.hh
    isn't public),
  • reach into Sta::levelize_ directly,
  • copy the body of StaLevelizeObserver into a dbSta-local subclass (drift
    risk if upstream ever changes StaLevelizeObserver).

Signed-off-by: dsengupta0628 <dsengupta@precisioninno.com>
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.

1 participant