degate  0.1.2
Functions
LogicModelHelper.cc File Reference
#include <globals.h>
#include <degate.h>
#include <LogicModelHelper.h>
#include <LogicModelObjectBase.h>
#include <TangencyCheck.h>
#include <boost/format.hpp>
#include <boost/foreach.hpp>

Go to the source code of this file.

Functions

void autoconnect_interlayer_objects_via_via (LogicModel_shptr lmodel, Layer_shptr adjacent_layer, BoundingBox const &search_bbox, Via_shptr v1, Via::DIRECTION v1_dir_criteria, Via::DIRECTION v2_dir_criteria)
void autoconnect_interlayer_objects_via_gport (LogicModel_shptr lmodel, Layer_shptr adjacent_layer, BoundingBox const &search_bbox, Via_shptr v1, Via::DIRECTION v1_dir_criteria)

Function Documentation

void autoconnect_interlayer_objects_via_gport ( LogicModel_shptr  lmodel,
Layer_shptr  adjacent_layer,
BoundingBox const &  search_bbox,
Via_shptr  v1,
Via::DIRECTION  v1_dir_criteria 
)

Definition at line 589 of file LogicModelHelper.cc.

References degate::check_object_tangency(), and degate::connect_objects().

Referenced by degate::autoconnect_interlayer_objects().

                                                                            {

  GatePort_shptr v2;

  for(Layer::qt_region_iterator siter = adjacent_layer->region_begin(search_bbox);
      siter != adjacent_layer->region_end(); ++siter) {

    if((v2 = std::dynamic_pointer_cast<GatePort>(*siter)) != NULL) {

      if((v1->get_net() == NULL || v2->get_net() == NULL ||
          v1->get_net() != v2->get_net()) &&
         v1->get_direction() == v1_dir_criteria &&
         check_object_tangency(std::dynamic_pointer_cast<Circle>(v1),
                               std::dynamic_pointer_cast<Circle>(v2)))
        connect_objects(lmodel,
                        std::dynamic_pointer_cast<ConnectedLogicModelObject>(v1),
                        std::dynamic_pointer_cast<ConnectedLogicModelObject>(v2));
    }
  }

}

Here is the call graph for this function:

Here is the caller graph for this function:

void autoconnect_interlayer_objects_via_via ( LogicModel_shptr  lmodel,
Layer_shptr  adjacent_layer,
BoundingBox const &  search_bbox,
Via_shptr  v1,
Via::DIRECTION  v1_dir_criteria,
Via::DIRECTION  v2_dir_criteria 
)

Definition at line 561 of file LogicModelHelper.cc.

References degate::check_object_tangency(), and degate::connect_objects().

Referenced by degate::autoconnect_interlayer_objects().

                                                                          {

  Via_shptr v2;

  for(Layer::qt_region_iterator siter = adjacent_layer->region_begin(search_bbox);
      siter != adjacent_layer->region_end(); ++siter) {

    if((v2 = std::dynamic_pointer_cast<Via>(*siter)) != NULL) {

      if((v1->get_net() == NULL || v2->get_net() == NULL ||
          v1->get_net() != v2->get_net()) &&
         v1->get_direction() == v1_dir_criteria &&
         v2->get_direction() == v2_dir_criteria &&
         check_object_tangency(std::dynamic_pointer_cast<Circle>(v1),
                               std::dynamic_pointer_cast<Circle>(v2)))
        connect_objects(lmodel,
                        std::dynamic_pointer_cast<ConnectedLogicModelObject>(v1),
                        std::dynamic_pointer_cast<ConnectedLogicModelObject>(v2));
    }
  }

}

Here is the call graph for this function:

Here is the caller graph for this function: