📄 info.java
字号:
} else { str += "Solid"; } if (!desc.isPatternedOnPrinter()) str += ",PrintSolid"; break; case LAYERCIF: str = "CIF Layer: " + (String)table[i].value; break; case LAYERGDS: str = "GDS-II Layer: " + (String)table[i].value; break; case LAYERSPIRES: str = "SPICE Resistance: " + ((Double)table[i].value).doubleValue(); break; case LAYERSPICAP: str = "SPICE Capacitance: " + ((Double)table[i].value).doubleValue(); break; case LAYERSPIECAP: str = "SPICE Edge Capacitance: " + ((Double)table[i].value).doubleValue(); break; case LAYER3DHEIGHT: str = "3D Height: " + ((Double)table[i].value).doubleValue(); break; case LAYER3DTHICK: str = "3D Thickness: " + ((Double)table[i].value).doubleValue(); break; case LAYERCOVERAGE: str = "Coverage percent: " + ((Double)table[i].value).doubleValue(); break; case ARCFUNCTION: str = "Function: " + ((ArcProto.Function)table[i].value).toString(); break; case ARCFIXANG: str = "Fixed-angle: " + (((Boolean)table[i].value).booleanValue() ? "Yes" : "No"); break; case ARCWIPESPINS: str = "Wipes pins: " + (((Boolean)table[i].value).booleanValue() ? "Yes" : "No"); break; case ARCNOEXTEND: str = "Extend arcs: " + (((Boolean)table[i].value).booleanValue() ? "No" : "Yes"); break; case ARCINC: str = "Angle increment: " + ((Integer)table[i].value).intValue(); break; case ARCANTENNARATIO: str = "Antenna Ratio: " + ((Double)table[i].value).doubleValue(); break; case ARCWIDTHOFFSET: str = "ELIB width offset: " + ((Double)table[i].value).doubleValue(); break; case NODEFUNCTION: str = "Function: " + ((PrimitiveNode.Function)table[i].value).toString(); break; case NODESERPENTINE: str = "Serpentine transistor: " + (((Boolean)table[i].value).booleanValue() ? "Yes" : "No"); break; case NODESQUARE: str = "Square node: " + (((Boolean)table[i].value).booleanValue() ? "Yes" : "No"); break; case NODEWIPES: str = "Invisible with 1 or 2 arcs: " + (((Boolean)table[i].value).booleanValue() ? "Yes" : "No"); break; case NODELOCKABLE: str = "Lockable: " + (((Boolean)table[i].value).booleanValue() ? "Yes" : "No"); break; case NODESPICETEMPLATE: str = "Spice template: " + (table[i].value == null ? "" : table[i].value); break; } table[i].ni.newDisplayVar(Artwork.ART_MESSAGE, str); table[i].ni.newVar(OPTION_KEY, new Integer(table[i].funct)); } } private static void foundNodeForFunction(NodeInst ni, int func, Info.SpecialTextDescr [] table) { for(int i=0; i<table.length; i++) { if (table[i].funct == func) { table[i].ni = ni; return; } } } protected static void loadTableEntry(SpecialTextDescr [] table, int func, Object value) { for(int i=0; i<table.length; i++) { if (func == table[i].funct) { table[i].value = value; return; } } } /** * Method to get the list of libraries that are used in the construction * of library "lib". Returns an array of libraries, terminated with "lib". */ static Library [] getDependentLibraries(Library lib) { // get list of dependent libraries List<Library> dependentLibs = new ArrayList<Library>(); Variable var = lib.getVar(Info.DEPENDENTLIB_KEY); if (var != null) { String [] libNames = (String [])var.getObject(); for(int i=0; i<libNames.length; i++) { String pt = libNames[i]; Library dLib = Library.findLibrary(pt); if (dLib == null) { System.out.println("Cannot find dependent technology library " + pt + ", ignoring"); continue; } if (dLib == lib) { System.out.println("Library '" + lib.getName() + "' cannot depend on itself, ignoring dependency"); continue; } dependentLibs.add(dLib); } } dependentLibs.add(lib); Library [] theLibs = new Library[dependentLibs.size()]; for(int i=0; i<dependentLibs.size(); i++) theLibs[i] = dependentLibs.get(i); return theLibs; } /** * general-purpose method to scan the libraries in "dependentlibs", * looking for cells that begin with the string "match". It then uses the * variable "seqname" on the last library to determine an ordering of the cells. * Then, it returns the cells in an array. */ static Cell [] findCellSequence(Library [] dependentlibs, String match, Variable.Key seqKey) { // look backwards through libraries for the appropriate cells List<Cell> npList = new ArrayList<Cell>(); for(int i=dependentlibs.length-1; i>=0; i--) { Library olderlib = dependentlibs[i]; for(Iterator<Cell> it = olderlib.getCells(); it.hasNext(); ) { Cell np = it.next(); if (!np.getName().startsWith(match)) continue; // see if this cell is used in a later library boolean foundInLater = false; for(int j=i+1; j<dependentlibs.length; j++) { Library laterLib = dependentlibs[j]; for(Iterator<Cell> oIt = laterLib.getCells(); oIt.hasNext(); ) { Cell lNp = oIt.next(); if (!lNp.getName().equals(np.getName())) continue; foundInLater = true; // got older and later version of same cell: check dates if (lNp.getRevisionDate().before(np.getRevisionDate())) System.out.println("Warning: " + olderlib + " has newer " + np.getName() + " than " + laterLib); break; } if (foundInLater) break; } // if no later library has this, add to total if (!foundInLater) npList.add(np); } } // if there is no sequence, simply return the list Variable var = dependentlibs[dependentlibs.length-1].getVar(seqKey);// if (var == null) return (Cell [])npList.toArray(); // build a new list with the sequence List<Cell> sequence = new ArrayList<Cell>(); String [] sequenceNames = var != null ? (String [])var.getObject() : new String[0]; for(int i=0; i<sequenceNames.length; i++) { Cell foundCell = null; for(int l = 0; l < npList.size(); l++) { Cell np = npList.get(l); if (np.getName().substring(match.length()).equals(sequenceNames[i])) { foundCell = np; break; } } if (foundCell != null) { sequence.add(foundCell); npList.remove(foundCell); } } for(Cell c: npList) sequence.add(c); Cell [] theCells = new Cell[sequence.size()]; for(int i=0; i<sequence.size(); i++) theCells[i] = sequence.get(i); return theCells; } /** * Method to return the name of the technology-edit port on node "ni". Typically, * this is stored on the PORTNAME_KEY variable, but it may also be the node's name. */ static String getPortName(NodeInst ni) { Variable var = ni.getVar(PORTNAME_KEY); if (var != null) return (String)var.getObject(); var = ni.getVar(NodeInst.NODE_NAME); if (var != null) return (String)var.getObject(); return null; } static String getValueOnNode(NodeInst ni) { String initial = ni.getVarValue(Artwork.ART_MESSAGE, String.class, ""); int colonPos = initial.indexOf(':'); if (colonPos > 0) initial = initial.substring(colonPos+2); return initial; } static String getSampleName(NodeProto layerCell) { if (layerCell == Generic.tech().portNode) return "PORT"; if (layerCell == Generic.tech().cellCenterNode) return "GRAB"; if (layerCell == null) return "HIGHLIGHT"; return layerCell.getName().substring(6); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -