diff --git a/src/db/db/dbHierProcessor.cc b/src/db/db/dbHierProcessor.cc index e69057b84..e65f14a3a 100644 --- a/src/db/db/dbHierProcessor.cc +++ b/src/db/db/dbHierProcessor.cc @@ -64,6 +64,11 @@ cronology::events::event_collection +static void dump_cell_contexts (local_processor_contexts &contexts, const db::Layout *subject_layout, const db::Layout *intruder_layout) +{ + for (auto cc = contexts.begin (); cc != contexts.end (); ++cc) { + tl::info << "Cell " << subject_layout->cell_name (cc->first->cell_index ()) << ":"; + int i = 0; + for (auto c = cc->second.begin (); c != cc->second.end (); ++c) { + tl::info << " Context #" << ++i; + tl::info << " Instances:"; + for (auto i = c->first.first.begin (); i != c->first.first.end (); ++i) { + const db::CellInstArray &ci = *i; + tl::info << " " << intruder_layout->cell_name (ci.object ().cell_index ()) << " @ " << ci.complex_trans (*ci.begin ()).to_string () << " (" << ci.size () << ")"; + } + tl::info << " Shapes:"; + for (auto i = c->first.second.begin (); i != c->first.second.end (); ++i) { + for (auto s = i->second.begin (); s != i->second.end (); ++s) { + tl::info << " " << intruder_layout->get_properties (i->first).to_string () << ": " << s->to_string (); + } + } + } + } +} + // --------------------------------------------------------------------------------------------- // LocalProcessorCellContext implementation @@ -1282,9 +1313,11 @@ private: db::ICplxTrans tni2 = tn21.inverted () * tni1; db::Box tbox2 = safe_box_enlarged (tni2 * cbox, -1, -1); - if (! intruder_cell.shapes (m_intruder_layer).begin_touching (tbox2, ShapeIterator::All).at_end ()) { + // do not recurse further if we're overlapping with shapes from the intruder + // or the intruder cell is not much bigger than the region of interest (cbox) + if (intruder_cell.bbox (m_intruder_layer).area () < area_ratio_for_recursion * cbox.area () + || ! intruder_cell.shapes (m_intruder_layer).begin_touching (tbox2, ShapeIterator::All).at_end ()) { - // we're overlapping with shapes from the intruder - do not recursive further interactions.push_back (std::make_pair (intruder_cell.cell_index (), tn21)); return; @@ -1782,6 +1815,11 @@ template void local_processor::compute_results (local_processor_contexts &contexts, const local_operation *op, const std::vector &output_layers) const { +#if 0 + // debugging + dump_cell_contexts (contexts, mp_subject_layout, mp_intruder_layout ? mp_intruder_layout : mp_subject_layout); +#endif + tl::SelfTimer timer (tl::verbosity () > m_base_verbosity + 10, tl::to_string (tr ("Computing results for ")) + description (op)); // avoids updates while we work on the layout