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

📄 mtdrclayouttool.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
            // now do the DRC            int logsFound = 0;            if (count == 0)            {                // just do full DRC here                checkThisCell(topCell, 0, bounds);                // sort the errors by layer                errorLogger.sortLogs();            } else            {                // check only these "count" instances (either an incremental DRC or a quiet one...from Array command)                if (validity == null)                {                    // not a quiet DRC, so it must be incremental                    logsFound = errorLogger.getNumLogs();                }                // @TODO missing counting this number of errors.                checkTheseGeometrics(topCell, count, geomsToCheck, validity);            }            if (errorLogger != null)            {                errorLogger.termLogging(true);                logsFound = errorLogger.getNumLogs() - logsFound;            }            // -2 if cells and subcells are ok            // Commentted out on May 2, 2006. Not sure why this condition is valid            // If goodDRCDate contains information of DRC clean cells, it destroys that information -> wrong//		if (totalErrors != 0 && totalErrors != -2) goodDRCDate.clear();            // some cells were sucessfully checked: save that information in the database            // some cells don't have valid DRC date anymore and therefore they should be clean            // This is only going to happen if job was not aborted.            return new MTDRCResult(errorLogger.getNumErrors(), errorLogger.getNumWarnings(),                !checkAbort(), goodSpacingDRCDate, cleanSpacingDRCDate,                goodAreaDRCDate, cleanAreaDRCDate, null);        }        /*************************** QUICK DRC CELL EXAMINATION ***************************/        /**         * Method to check the contents of cell "cell" with global network index "globalIndex".         * Returns positive if errors are found, zero if no errors are found, negative on internal error.         *         * @param cell         * @param globalIndex         * @param bounds         * @return positive number if errors are found, zero if no errors are found and check the cell, -1 if job was         *         aborted and -2 if cell is OK with DRC date stored.         */        private int checkThisCell(Cell cell, int globalIndex, Rectangle2D bounds)        {            // Job aborted or scheduled for abort            if (checkAbort()) return -1;            // Cell already checked//		if (cellsMap.get(cell) != null)            if (getCheckProto(cell).cellChecked)                return (0);            // Previous # of errors/warnings            int prevErrors = 0;            int prevWarns = 0;            if (reportInfo.errorLogger != null)            {                prevErrors = reportInfo.errorLogger.getNumErrors();                prevWarns = reportInfo.errorLogger.getNumWarnings();            }//		cellsMap.put(cell, cell);            // Check if cell doesn't have special annotation            Variable drcVar = cell.getVar(DRC.DRC_ANNOTATION_KEY);            if (drcVar != null && drcVar.getObject().toString().startsWith("black"))            {                // Skipping this one                assert(reportInfo.totalSpacingMsgFound==0);                return reportInfo.totalSpacingMsgFound;            }            // first check all subcells            boolean allSubCellsStillOK = true;            Area area = exclusionMap.get(cell);            for (Iterator<NodeInst> it = cell.getNodes(); it.hasNext();)            {                // Job aborted or scheduled for abort                if (checkAbort()) return -1;                NodeInst ni = it.next();                NodeProto np = ni.getProto();                if (!ni.isCellInstance()) continue;                // ignore documentation icons                if (ni.isIconOfParent()) continue;                                // Check DRC exclusion regions                if (area != null && area.contains(ni.getBounds()))                    continue; // excluded                // ignore if not in the area                Rectangle2D subBounds = bounds; // sept30                if (subBounds != null)                {                    if (!ni.getBounds().intersects(bounds)) continue;                    AffineTransform trans = ni.rotateIn();                    AffineTransform xTrnI = ni.translateIn();                    trans.preConcatenate(xTrnI);                    subBounds = new Rectangle2D.Double();                    subBounds.setRect(bounds);                    DBMath.transformRect(subBounds, trans);                }                CheckProto cp = getCheckProto((Cell) np);                if (cp.cellChecked && !cp.cellParameterized) continue;                // recursively check the subcell                CheckInst ci = checkInsts.get(ni);                int localIndex = globalIndex * ci.multiplier + ci.localIndex + ci.offset;                int retval = checkThisCell((Cell) np, localIndex, subBounds);                if (retval < 0)                    return retval;                // if cell is in goodDRCDate it means it changes its date for some reason.                // This happen when a subcell was reloaded and DRC again. The cell containing                // the subcell instance must be re-DRC to make sure changes in subCell don't affect                // the parent one.                if (retval > 0 || goodSpacingDRCDate.contains(np))                    allSubCellsStillOK = false;//            if (retval > 0)//                allSubCellsStillOK = false;            }            // prepare to check cell            CheckProto cp = getCheckProto(cell);            cp.cellChecked = true;            boolean skipLayer = skipLayerInvalidForMinArea(theLayer);            boolean checkArea = (cell == topCell && !skipLayer &&                !DRC.isIgnoreAreaChecking() && reportInfo.errorTypeSearch != DRC.DRCCheckMode.ERROR_CHECK_CELL);            // if the cell hasn't changed since the last good check, stop now            Date lastSpacingGoodDate = DRC.getLastDRCDateBasedOnBits(cell, true, reportInfo.activeSpacingBits, !reportInfo.inMemory);            Date lastAreaGoodDate = DRC.getLastDRCDateBasedOnBits(cell, false, -1, !reportInfo.inMemory);            if (allSubCellsStillOK && DRC.isCellDRCDateGood(cell, lastSpacingGoodDate) &&                (!checkArea || DRC.isCellDRCDateGood(cell, lastAreaGoodDate)))            {                return 0;            }            // announce progress            long startTime = System.currentTimeMillis();            if (printLog)                System.out.println("Checking " + cell + ", " + theLayer);            // now look at every node and arc here            reportInfo.totalSpacingMsgFound = 0;            // Check the area first but only when is not incremental            // Only for the most top cell            if (checkArea)            {                assert(reportInfo.totalSpacingMsgFound == 0);                int totalAreaMsgFound = MTDRCAreaTool.checkMinArea(theLayer, topCell, reportInfo, currentRules, cellLayersCon, job, null);                if (totalAreaMsgFound == 0)                    goodAreaDRCDate.add(cell);                else                    cleanAreaDRCDate.add(cell);            }            for (Iterator<NodeInst> it = cell.getNodes(); it.hasNext();)            {                // Job aborted or scheduled for abort                if (checkAbort()) return -1;                NodeInst ni = it.next();                                if (bounds != null)                {                    if (!ni.getBounds().intersects(bounds)) continue;                }                if (area != null)                {                    if (area.contains(ni.getBounds()))                    {                        continue;                    }                }                boolean ret = false;                if (thisLayerFunction == null) // checking min size only                {                    if (ni.isCellInstance()) continue;                    ret = checkNodeInst(ni, globalIndex);                } else                {                    ret = (ni.isCellInstance()) ?                        checkCellInst(ni, globalIndex) :                        checkNodeInst(ni, globalIndex);                }                if (ret)                {                    reportInfo.totalSpacingMsgFound++;                    if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) break;                }            }            if (thisLayerFunction != null) // only when it is layer related            {                Technology cellTech = cell.getTechnology();                for (Iterator<ArcInst> it = cell.getArcs(); it.hasNext();)                {                    // Job aborted or scheduled for abort                    if (checkAbort()) return -1;                    ArcInst ai = it.next();                    Technology tech = ai.getProto().getTechnology();                    if (tech != cellTech)                    {                        DRC.createDRCErrorLogger(reportInfo, DRC.DRCErrorType.TECHMIXWARN, " belongs to " + tech.getTechName(), cell, 0, 0, null, null, ai, null, null, null, null);                        continue;                    }                    if (bounds != null)                    {                        if (!ai.getBounds().intersects(bounds)) continue;                    }                    if (checkArcInst(cp, ai, globalIndex))                    {                        reportInfo.totalSpacingMsgFound++;                        if (reportInfo.errorTypeSearch == DRC.DRCCheckMode.ERROR_CHECK_CELL) break;                    }                }            }            // If message founds, then remove any possible good date            // !allSubCellsStillOK disconnected on April 18, 2006. totalMsgFound should            // dictate if this cell is re-marked.            if (reportInfo.totalSpacingMsgFound > 0) //  || !allSubCellsStillOK)            {                cleanSpacingDRCDate.add(cell);            } else            {                // Only mark the cell when it passes with a new version of DRC or didn't have                // the DRC bit on                // If lastGoodDate == null, wrong bits stored or no date available.                if (lastSpacingGoodDate == null)                    goodSpacingDRCDate.add(cell);            }            // if there were no errors, remember that            if (reportInfo.errorLogger != null && printLog)            {                int localErrors = reportInfo.errorLogger.getNumErrors() - prevErrors;                int localWarnings = reportInfo.errorLogger.getNumWarnings() - prevWarns;                long endTime = System.currentTimeMillis();                if (localErrors == 0 && localWarnings == 0)                {                    System.out.println("\tNo errors/warnings found");                } else                {                    if (localErrors > 0)                        System.out.println("\tFOUND " + localErrors + " ERRORS");                    if (localWarnings > 0)                        System.out.println("\tFOUND " + localWarnings + " WARNINGS");                }                if (Job.getDebug())                    System.out.println("\t(took " + TextUtils.getElapsedTime(endTime - startTime) + ")");            }            return reportInfo.totalSpacingMsgFound;        }        /**         * Check Poly for CIF Resolution Errors         *         * @param poly         * @param cell         * @param geom

⌨️ 快捷键说明

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