⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quick.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
        if (area == null) return false;        Point2D[] pts = poly.getPoints();        for (Point2D point : pts)        {            if (!area.contains(point))            {                return false;            }        }        return true;    }    /**     * Method to check the design rules about nodeinst "ni".     * @param ni     * @param globalIndex     * @return true if an error was found.     */	private boolean checkNodeInst(NodeInst ni, int globalIndex)	{		Cell cell = ni.getParent();		Netlist netlist = getCheckProto(cell).netlist;		NodeProto np = ni.getProto();		Technology tech = np.getTechnology();		AffineTransform trans = ni.rotateOut();		boolean errorsFound = false;		// Skipping special nodes		if (NodeInst.isSpecialNode(ni)) return false; // Oct 5;        if (!np.getTechnology().isLayout())            return (false); // only layout nodes        if (np.getFunction() == PrimitiveNode.Function.PIN) return false; // Sept 30        if (coverByExclusion(ni)) return false; // no errors        // Already done		if (nodesMap.get(ni) != null)			return (false);		nodesMap.put(ni, ni);        if (DRC.checkNodeAgainstCombinationRules(ni, reportInfo))        {            if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;            errorsFound = true;        }//        if (np instanceof PrimitiveNode)//        {//            DRCTemplate forbidRule =//            DRC.isForbiddenNode(((PrimitiveNode)np).getPrimNodeIndexInTech(), -1,//                DRCTemplate.DRCRuleType.FORBIDDEN, tech);//            if (forbidRule != null)//            {//                DRC.createDRCErrorLogger(reportInfo, DRC.DRCErrorType.FORBIDDEN, " is not allowed by selected foundry", cell,//                    -1, -1, forbidRule.nodeName, null, ni, null, null, null, null);//                if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;//                errorsFound = true;//            }//        }        // get all of the polygons on this node		Poly [] nodeInstPolyList = tech.getShapeOfNode(ni, true, reportInfo.ignoreCenterCuts, null);		convertPseudoLayers(ni, nodeInstPolyList);		int tot = nodeInstPolyList.length;        boolean isTransistor =  np.getFunction().isTransistor();        Technology.MultiCutData multiCutData = tech.getMultiCutData(ni);        // examine the polygons on this node		for(int j=0; j<tot; j++)		{			Poly poly = nodeInstPolyList[j];			Layer layer = poly.getLayer();			if (layer == null) continue;            if (coverByExclusion(poly, cell))                continue;            // Checking combination            boolean ret = DRC.checkOD2Combination(tech, ni, layer, od2Layers, reportInfo);            if (ret)            {                // panic errors -> return regarless errorTypeSearch                return true;            }			poly.transform(trans);            // Checking resolution only after transformation            ret = checkResolution(poly, cell, ni);            if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}			// determine network for this polygon			int netNumber = getDRCNetNumber(netlist, poly.getPort(), ni, globalIndex);			ret = badBox(poly, layer, netNumber, tech, ni, trans, cell, globalIndex, multiCutData);			if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}			ret = checkMinWidth(ni, layer, poly, tot==1);			if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}			// Check select over transistor poly			// Assumes polys on transistors fulfill condition by construction//			ret = !isTransistor && checkSelectOverPolysilicon(ni, layer, poly, cell);            ret = !isTransistor && checkExtensionRules(ni, layer, poly, cell);            if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}//            ret = checkExtensionRule(ni, layer, poly, cell);//            if (ret)//			{//				if (errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;//				errorsFound = true;//			}            if (validLayers.isABadLayer(tech, layer.getIndex()))			{				DRC.createDRCErrorLogger(reportInfo, DRC.DRCErrorType.BADLAYERERROR, null, cell, 0, 0, null,					poly, ni, layer, null, null, null);				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}		}		// check node for minimum size        if (DRC.checkNodeSize(ni, cell, reportInfo))            errorsFound = true;		return errorsFound;	}    /**	 * Method to check the design rules about arcinst "ai".	 * Returns true if errors were found.	 */	private boolean checkArcInst(CheckProto cp, ArcInst ai, int globalIndex)	{		// ignore arcs with no topology		Network net = cp.netlist.getNetwork(ai, 0);		if (net == null) return false;		Integer [] netNumbers = networkLists.get(net);		if (nodesMap.get(ai) != null)		{			if (Job.LOCALDEBUGFLAG) System.out.println("Done already arc " + ai.getName());			return (false);		}		nodesMap.put(ai, ai);        // Check if arc is contained in exclusion region//        if (coverByExclusion(ai))//            return false; // no error		boolean errorsFound = false;        // Checking if the arc is horizontal or vertical        Point2D from = ai.getHeadLocation();        Point2D to = ai.getTailLocation();        if (!DBMath.areEquals(from.getX(), to.getX()) && !DBMath.areEquals(from.getY(), to.getY()))        {            DRC.createDRCErrorLogger(reportInfo, DRC.DRCErrorType.CROOKEDERROR, null, ai.getParent(),                -1, -1, null, null, ai, null, null, null, null);            if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;        }                // get all of the polygons on this arc		Technology tech = ai.getProto().getTechnology();		Poly [] arcInstPolyList = tech.getShapeOfArc(ai);        // Check resolution before cropping the        for(Poly poly : arcInstPolyList)		{			Layer layer = poly.getLayer();			if (layer == null) continue;			if (layer.isNonElectrical()) continue;            // Checking resolution            boolean ret = checkResolution(poly, ai.getParent(), ai);            if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}        }		DRC.cropActiveArc(ai, reportInfo.ignoreCenterCuts, arcInstPolyList);		int tot = arcInstPolyList.length;		// examine the polygons on this arc		for(int j=0; j<tot; j++)		{			Poly poly = arcInstPolyList[j];			Layer layer = poly.getLayer();			if (layer == null) continue;			if (layer.isNonElectrical()) continue;			int layerNum = layer.getIndex();			int netNumber = netNumbers[globalIndex]; // autoboxing			boolean ret = badBox(poly, layer, netNumber, tech, ai, DBMath.MATID, ai.getParent(), globalIndex, null);			if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}			ret = checkMinWidth(ai, layer, poly, tot==1);			if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}			// Check select over transistor poly//			ret = checkSelectOverPolysilicon(ai, layer, poly, ai.getParent());            ret = checkExtensionRules(ai, layer, poly, ai.getParent());            if (ret)			{				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}            if (validLayers.isABadLayer(tech, layerNum))			{				DRC.createDRCErrorLogger(reportInfo, DRC.DRCErrorType.BADLAYERERROR, null, ai.getParent(), 0, 0, null,					(tot==1)?null:poly, ai, layer, null, null, null);				if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) return true;				errorsFound = true;			}		}		return errorsFound;	}	/**	 * Method to check the design rules about cell instance "ni".  Only check other	 * instances, and only check the parts of each that are within striking range.	 * Returns true if an error was found.	 */	private boolean checkCellInst(NodeInst ni, int globalIndex)	{        Cell thisCell = (Cell)ni.getProto();        if (!thisCell.isLayout())            return false; // skips non-layout cells.        // get transformation out of the instance        AffineTransform upTrans = ni.translateOut(ni.rotateOut());		// get network numbering for the instance		CheckInst ci = checkInsts.get(ni);		int localIndex = globalIndex * ci.multiplier + ci.localIndex + ci.offset;        boolean errorFound = false;        // look for other instances surrounding this one		Rectangle2D nodeBounds = ni.getBounds();        double worstInteractionDistance = reportInfo.worstInteractionDistance;        Rectangle2D searchBounds = new Rectangle2D.Double(			nodeBounds.getMinX()-worstInteractionDistance,			nodeBounds.getMinY()-worstInteractionDistance,			nodeBounds.getWidth() + worstInteractionDistance*2,			nodeBounds.getHeight() + worstInteractionDistance*2);        instanceInteractionList.clear(); // part3		for(Iterator<RTBounds> it = ni.getParent().searchIterator(searchBounds); it.hasNext(); )		{			RTBounds geom = it.next();			if ( geom == ni ) continue; // covered by checkInteraction?			if (!(geom instanceof NodeInst)) continue;			NodeInst oNi = (NodeInst)geom;			// only check other nodes that are numerically higher (so each pair is only checked once)			if (oNi.getNodeIndex() <= ni.getNodeIndex()) continue;			if (!oNi.isCellInstance()) continue;			// see if this configuration of instances has already been done			if (checkInteraction(ni, null, oNi, null, null)) continue;			// found other instance "oNi", look for everything in "ni" that is near it			Rectangle2D nearNodeBounds = oNi.getBounds();			Rectangle2D subBounds = new Rectangle2D.Double(				nearNodeBounds.getMinX()-worstInteractionDistance,				nearNodeBounds.getMinY()-worstInteractionDistance,				nearNodeBounds.getWidth() + worstInteractionDistance*2,				nearNodeBounds.getHeight() + worstInteractionDistance*2);			// recursively search instance "ni" in the vicinity of "oNi"			boolean ret = checkCellInstContents(subBounds, ni, upTrans, localIndex, oNi, null, globalIndex, null);			if (ret) errorFound = true;		}		return errorFound;	}	/**	 * Method to recursively examine the area "bounds" in cell "cell" with global index "globalIndex".	 * The objects that are found are transformed by "uptrans" to be in the space of a top-level cell.	 * They are then compared with objects in "oNi" (which is in that top-level cell),	 * which has global index "topGlobalIndex".	 */	private boolean checkCellInstContents(Rectangle2D bounds, NodeInst thisNi, AffineTransform upTrans, int globalIndex,                                          NodeInst oNi, NodeInst oNiParent, int topGlobalIndex, NodeInst triggerNi)	{        // Job aborted or scheduled for abort		if (job != null && job.checkAbort()) return true;		Cell cell = (Cell)thisNi.getProto();		boolean logsFound = false;		Netlist netlist = getCheckProto(cell).netlist;		Technology cellTech = cell.getTechnology();		// Need to transform bounds coordinates first otherwise it won't

⌨️ 快捷键说明

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