@@ -69,11 +69,15 @@ void Opendp::improvePlacement(const int seed,
6969 importDb ();
7070
7171 // importDb() rebuilds the network from scratch; fresh Node objects have
72- // orientation hard coded as R0. The legalizer writes row-correct orientations
73- // to dbInst in its post-flush orient loop, so use this orientation for
74- // DetailedMgr DRC checks
72+ // orientation hard coded as R0 with un-rotated master width/height. The
73+ // dbInst already carries the true orientation, so sync every placed cell's
74+ // node to it. Fixed cells (rotated macros, endcaps, tapcells) must be
75+ // included: setFixedGridCells() and the DetailedMgr DRC checks read the
76+ // node's width/height, so leaving a rotated fixed macro at R0 paints a
77+ // wrong-sized footprint and produces phantom overlaps / edge-spacing
78+ // violations against it.
7579 for (const auto & node : network_->getNodes ()) {
76- if (node->getType () == Node::CELL && !node-> isFixed () ) {
80+ if (node->getType () == Node::CELL ) {
7781 odb::dbInst* inst = node->getDbInst ();
7882 if (inst && inst->getPlacementStatus ().isPlaced ()) {
7983 node->adjustCurrOrient (inst->getOrient ());
@@ -107,6 +111,10 @@ void Opendp::improvePlacement(const int seed,
107111 // improvement. If it errors or prints a warning when
108112 // given a legal placement, that likely means there is
109113 // a bug in my code somewhere.
114+ if (debug_observer_) {
115+ logger_->report (" Pause before \" legalize\" DPO initialization." );
116+ debug_observer_->redrawAndPause ();
117+ }
110118 ShiftLegalizer lg;
111119 lg.legalize (mgr);
112120
0 commit comments