Example #1
0
void Epu::portId(PortId const& pId) {
  Port* p = 0;

  if (pId != InvalidPortId)  // New EPU getting added
  {
    p = portMgr()->port(pId);
    assert(p);

    portId_ = pId;

    p->addEpu(this);
  } else  // Existing EPU getting removed
  {
    p = portMgr()->port(portId_);
    assert(p);

    portId_ = 0;

    p->removeEpu(this);
  }
}