oadefintrack.cpp

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

CPP
90
字号
// *****************************************************************************// *****************************************************************************// DefInTrack.cpp//// Functions to handle DEF TRACKS constructs for the 'def2oa' translator.//// *****************************************************************************// 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: mhahn $//  $Revision: 1.20 $//  $Date: 2005/01/04 03:26:13 $//  $State: Exp $// *****************************************************************************// *****************************************************************************#include "oaLefDef.h"BEGIN_LEFDEF_NAMESPACE// *****************************************************************************// DefInTrack::DefInTrack()// DefInTrack::~DefInTrack()//// This is the constructor for the DefInTrack class.// *****************************************************************************DefInTrack::DefInTrack(DefIn	    &translator):   defIn(translator){    translator.defInTrack = this;}DefInTrack::~DefInTrack(){}// *****************************************************************************// DefInTrack::parse()//// This function is called for each "TRACKS" DEF construct.// It creates one or several (when several layers) trackPattern object(s)// in the DEF design.// (Unlike G1 Def reader, we don't check whether an identical track already// exists in the design but we check 'numTracks' and 'space' arguments are// legal.)// *****************************************************************************voidDefInTrack::parse(defiTrack *data){    defTrack = data;        oaBoolean	isHorizontal = true;        if (!strcmp(defTrack->macro(), "Y")) {	isHorizontal = false;    }    // Check numTracks is legal (> 0)    oaUInt4 numTracks = oaRound(defTrack->xNum());        // Layers    if (defTrack->numLayers()) {	for (int i = 0; i < defTrack->numLayers(); i++) {	    oaTrackPattern::create(defIn.topBlock(), isHorizontal,				   defIn.scaleToDBU((defTrack->x())), numTracks,				   defIn.scaleToDBU(defTrack->xStep()),				   defIn.getLayerNum(defTrack->layer(i)));	}    } else {	oaTrackPattern::create(defIn.topBlock(), isHorizontal,			       defIn.scaleToDBU(defTrack->x()), numTracks,			       defIn.scaleToDBU(defTrack->xStep()));    }}END_LEFDEF_NAMESPACE

⌨️ 快捷键说明

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