oalefdefbase.inl

来自「openaccess读def,lef文件所用的源代码」· INL 代码 · 共 104 行

INL
104
字号
// *****************************************************************************// *****************************************************************************// oaLefDefBase.inl//// This file contains the implementation for inline and template member// functions of classes defined in oaLefDefBase.h file.//// *****************************************************************************// Except as specified in the OpenAccess terms of use of Cadence or Silicon// Integration Initiative, this material may not be copied, modified,// re-published, uploaded, executed, or distributed in any way, in any medium,// in whole or in part, without prior written permission from Cadence.////                Copyright 2002-2005 Cadence Design Systems, Inc.//                           All Rights Reserved.////  $Author: sailajad $//  $Revision: 1.1 $//  $Date: 2005/08/05 01:41:34 $//  $State: Exp $// *****************************************************************************// *****************************************************************************#if !defined(oaLefDefBase_I)#define oaLefDefBase_IBEGIN_LEFDEF_NAMESPACE// *****************************************************************************// LefDefBase::getDirection()//// This function returns an integer representing the direction of the segment// formed by the given points.// *****************************************************************************inline oaUInt4LefDefBase::getDirection(const oaPoint	&start,			 const oaPoint	&end){    if (start.x() == end.x()) {	if (start.y() > end.y()) {	    return 4;	}	return 0;    }    if (start.x() > end.x()) {	if (start.y() == end.y()) {	    return 2;	}	if (start.y() > end.y()) {	    return 3;	}	return 1;    }    if (start.y() == end.y()) {	return 6;    }    if (start.y() > end.y()) {	return 5;    }    return 7;}// *****************************************************************************// LefDefBase::orthoToDiagDBU()// LefDefBase::diagToOrthoDBU()//// These functions convert between orthogonal and diagonal OA DB units.// The last function converts a real diagonal distance to OA diagonal DB units.// *****************************************************************************inline oaInt4LefDefBase::orthoToDiagDBU(double   x){    oaUInt4 manufGrid = tech()->getDefaultManufacturingGrid();    return 2 * manufGrid * (oaInt4) ceil(x / (vRoot2 * manufGrid));}inline oaInt4LefDefBase::diagToOrthoDBU(double x){    oaUInt4 manufGrid = tech()->getDefaultManufacturingGrid();    return 2 * manufGrid * (oaInt4) floor(x / (vRoot2 * manufGrid * 2));}END_LEFDEF_NAMESPACE#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?