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

📄 generic.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
		cellCenterNode = PrimitiveNode.newInstance("Facet-Center", this, 0.0, 0.0, null,			new Technology.NodeLayer []			{				new Technology.NodeLayer(glyphLay, 0, Poly.Type.CLOSED, Technology.NodeLayer.BOX, Technology.TechPoint.makeFullBox()),				new Technology.NodeLayer(glyphLay, 0, Poly.Type.BIGCROSS, Technology.NodeLayer.POINTS, Technology.TechPoint.makeCenterBox())			});		cellCenterNode.addPrimitivePorts(new PrimitivePort []			{				PrimitivePort.newInstance(this, cellCenterNode, new ArcProto[] {invisible_arc,universal_arc}, "center", 0,180, 0, PortCharacteristic.UNKNOWN,					EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge(), EdgeH.makeRightEdge(), EdgeV.makeTopEdge())			});		cellCenterNode.setFunction(PrimitiveNode.Function.ART);		cellCenterNode.setCanBeZeroSize();		/** Port */		portNode = PrimitiveNode.newInstance("Port", this, 6.0, 6.0, new SizeOffset(2, 2, 2, 2),			new Technology.NodeLayer []			{				new Technology.NodeLayer(glyphLay, 0, Poly.Type.CLOSED, Technology.NodeLayer.BOX, Technology.TechPoint.makeIndented(2))			});		portNode.addPrimitivePorts(new PrimitivePort []			{				PrimitivePort.newInstance(this, portNode, new ArcProto[] {invisible_arc,universal_arc}, "center", 0,180, 0, PortCharacteristic.UNKNOWN,					EdgeH.makeCenter(), EdgeV.makeCenter(), EdgeH.makeCenter(), EdgeV.makeCenter())			});		portNode.setFunction(PrimitiveNode.Function.ART);		portNode.setCanBeZeroSize();//		/** DRC Node *///		drcNode = PrimitiveNode.newInstance("DRC-Node", this, 2.0, 2.0, null,//			new Technology.NodeLayer []//			{//				new Technology.NodeLayer(drcLay, 0, Poly.Type.FILLED, Technology.NodeLayer.BOX, Technology.TechPoint.makeFullBox())//			});//		drcNode.addPrimitivePorts(new PrimitivePort []//			{//				PrimitivePort.newInstance(this, drcNode, new ArcProto[] {invisible_arc,universal_arc}, "center", 0,180, 0, PortCharacteristic.UNKNOWN,//					EdgeH.makeCenter(), EdgeV.makeCenter(), EdgeH.makeCenter(), EdgeV.makeCenter())//			});//		drcNode.setFunction(PrimitiveNode.Function.NODE);//		drcNode.setHoldsOutline();//        drcNode.setSpecialType(PrimitiveNode.POLYGONAL);//        //        /** AFG Node *///		afgNode = PrimitiveNode.newInstance("AFG-Node", this, 2.0, 2.0, null,//			new Technology.NodeLayer []//			{//				new Technology.NodeLayer(afgLay, 0, Poly.Type.FILLED, Technology.NodeLayer.BOX, Technology.TechPoint.makeFullBox())//			});//		afgNode.addPrimitivePorts(new PrimitivePort []//			{//				PrimitivePort.newInstance(this, afgNode, new ArcProto[] {invisible_arc,universal_arc}, "center", 0,180, 0, PortCharacteristic.UNKNOWN,//					EdgeH.makeCenter(), EdgeV.makeCenter(), EdgeH.makeCenter(), EdgeV.makeCenter())//			});//		afgNode.setFunction(PrimitiveNode.Function.NODE);//		afgNode.setHoldsOutline();//        afgNode.setSpecialType(PrimitiveNode.POLYGONAL);//		/** Essential Bounds Node */		essentialBoundsNode = PrimitiveNode.newInstance("Essential-Bounds", this, 0.0, 0.0, null,			new Technology.NodeLayer []			{				new Technology.NodeLayer(glyphLay, 0, Poly.Type.OPENED, Technology.NodeLayer.POINTS, new Technology.TechPoint [] {					new Technology.TechPoint(EdgeH.fromCenter(-1), EdgeV.makeCenter()),					new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.makeCenter()),					new Technology.TechPoint(EdgeH.makeCenter(), EdgeV.fromCenter(-1))})			});		essentialBoundsNode.addPrimitivePorts(new PrimitivePort []			{				PrimitivePort.newInstance(this, essentialBoundsNode, new ArcProto[] {invisible_arc,universal_arc}, "center", 0,180, 0, PortCharacteristic.UNKNOWN,					EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge(), EdgeH.makeRightEdge(), EdgeV.makeTopEdge())			});		essentialBoundsNode.setFunction(PrimitiveNode.Function.ART);		essentialBoundsNode.setCanBeZeroSize();		/** Simulation Probe Node */		simProbeNode = PrimitiveNode.newInstance("Simulation-Probe", this, 10.0, 10.0, null,			new Technology.NodeLayer []			{				new Technology.NodeLayer(simprobe_lay, 0, Poly.Type.FILLED, Technology.NodeLayer.BOX, Technology.TechPoint.makeFullBox())			});		simProbePort = PrimitivePort.newInstance(this, simProbeNode, new ArcProto[] {invisible_arc,universal_arc}, "center", 0,180, 0, PortCharacteristic.UNKNOWN,				EdgeH.makeLeftEdge(), EdgeV.makeBottomEdge(), EdgeH.makeRightEdge(), EdgeV.makeTopEdge());		simProbeNode.addPrimitivePorts(new PrimitivePort [] {simProbePort});		simProbeNode.setFunction(PrimitiveNode.Function.ART);		simProbeNode.setCanBeZeroSize();		// The pure layer nodes        drcNode = drcLay.makePureLayerNode("DRC-Node", 2.0, Poly.Type.FILLED, "center", invisible_arc, universal_arc);        afgNode = afgLay.makePureLayerNode("AFG-Node", 2.0, Poly.Type.FILLED, "center", invisible_arc, universal_arc);//		drcLay.setPureLayerNode(drcNode);//        afgLay.setPureLayerNode(afgNode);        //Foundry        newFoundry(Foundry.Type.NONE, null);        		oldNodeNames.put("Cell-Center", cellCenterNode);	}    public void setBackgroudColor(Color c)    {		tech().universalLay.getGraphics().setColor(c);		tech().glyphLay.getGraphics().setColor(c);    }	private static Technology.NodeLayer[] NULLNODELAYER = new Technology.NodeLayer [] {};	/**	 * Method to return a list of Polys that describe a given NodeInst.	 * This method overrides the general one in the Technology object	 * because of the unusual primitives in the Schematics Technology.	 * @param ni the NodeInst to describe.	 * @param electrical true to get the "electrical" layers.	 * This makes no sense for Schematics primitives.	 * @param reasonable true to get only a minimal set of contact cuts in large contacts.	 * This makes no sense for Schematics primitives.	 * @param primLayers an array of NodeLayer objects to convert to Poly objects.	 * @param layerOverride the layer to use for all generated polygons (if not null).	 * @return an array of Poly objects.	 */    @Override	protected Poly [] getShapeOfNode(NodeInst ni, boolean electrical, boolean reasonable, Technology.NodeLayer [] primLayers, Layer layerOverride)	{		NodeProto prototype = ni.getProto();		PrimitiveNode np = (PrimitiveNode)prototype;		if (np == invisiblePinNode)		{			if (ni.isInvisiblePinWithText())				primLayers = NULLNODELAYER;		}		return super.getShapeOfNode(ni, electrical, reasonable, primLayers, layerOverride);	}	//	/**//	 * Method to update the connecitivity list for universal and invisible pins so that//	 * they can connect to ALL arcs.  This is called at initialization and again//	 * whenever the number of technologies changes.//	 *///	public void makeUnivList()//	{//		// count the number of arcs in all technologies//		int tot = 0;//		for(Iterator<Technology> it = Technology.getTechnologies(); it.hasNext(); )//		{//			Technology tech = it.next();//			tot += tech.getNumArcs();//		}////		// make an array for each arc//		ArcProto [] upconn = new ArcProto[tot];////		// fill the array//		tot = 0;//		for(Iterator<Technology> it = Technology.getTechnologies(); it.hasNext(); )//		{//			Technology tech = it.next();//			for(Iterator<ArcProto> ait = tech.getArcs(); ait.hasNext(); )//			{//				ArcProto ap = ait.next();//				upconn[tot++] = ap;//			}//		}////		// store the array in this technology//		univPinPort.setConnections(upconn);//		invisPinPort.setConnections(upconn);//		simProbePort.setConnections(upconn);//	}        /**     * Tells if all ArcProtos can connect to the PrimitivePort     * @param pp PrimitivePort to test     * @return true if all ArcProtos can connect to the PrimitivePort     */    @Override    public boolean isUniversalConnectivityPort(PrimitivePort pp) {        return pp == univPinPort || pp == invisPinPort || pp == simProbePort;    }//	/**//	 * Method to convert old primitive names to their proper NodeProtos.//	 * @param name the name of the old primitive.//	 * @return the proper PrimitiveNode to use (or null if none can be determined).//	 *///	public PrimitiveNode convertOldNodeName(String name)//	{//		if (name.equals("Cell-Center")) return(cellCenterNode);//		return null;//	}    /**	 * Method to detect if this Generic proto is not relevant for some tool calculation and therefore	 * could be skip. E.g. cellCenter, drcNodes, essential bounds.	 * Similar for layer generation and automatic fill.	 * @param ni the NodeInst in question.	 * @return true if it is a special node (cell center, etc.)	 */	public static boolean isSpecialGenericNode(NodeInst ni)	{        if (ni.isCellInstance()) return false;		PrimitiveNode np = (PrimitiveNode)ni.getProto();        if (!(np.getTechnology() instanceof Generic)) return false;        Generic tech = (Generic)np.getTechnology();		return (np == tech.cellCenterNode || np == tech.drcNode ||		        np == tech.essentialBoundsNode || np == tech.afgNode);	}}

⌨️ 快捷键说明

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