亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? lef.java

?? The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
?? JAVA
字號:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: LEF.java * Input/output tool: LEF output * Written by Steven M. Rubin, Sun Microsystems. * * Copyright (c) 2004 Sun Microsystems and Static Free Software * * Electric(tm) is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * Electric(tm) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Electric(tm); see the file COPYING.  If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, Mass 02111-1307, USA. */package com.sun.electric.tool.io.output;import com.sun.electric.database.geometry.GenMath;import com.sun.electric.database.geometry.Poly;import com.sun.electric.database.hierarchy.Cell;import com.sun.electric.database.hierarchy.Export;import com.sun.electric.database.hierarchy.HierarchyEnumerator;import com.sun.electric.database.hierarchy.Nodable;import com.sun.electric.database.network.Netlist;import com.sun.electric.database.network.Network;import com.sun.electric.database.prototype.PortCharacteristic;import com.sun.electric.database.prototype.PortOriginal;import com.sun.electric.database.prototype.PortProto;import com.sun.electric.database.text.TextUtils;import com.sun.electric.database.text.Version;import com.sun.electric.database.topology.ArcInst;import com.sun.electric.database.topology.NodeInst;import com.sun.electric.database.topology.PortInst;import com.sun.electric.database.variable.VarContext;import com.sun.electric.technology.Layer;import com.sun.electric.technology.PrimitiveNode;import com.sun.electric.technology.PrimitivePort;import com.sun.electric.technology.Technology;import com.sun.electric.tool.user.User;import java.awt.geom.AffineTransform;import java.awt.geom.Rectangle2D;import java.util.ArrayList;import java.util.Collections;import java.util.Date;import java.util.HashMap;import java.util.HashSet;import java.util.Iterator;import java.util.List;import java.util.Map;import java.util.Set;/** * This is the netlister for LEF. * * Note that this writer was built by examining LEF files and reverse-engineering them. * It does not claim to be compliant with the LEF specification, but it also does not * claim to define a new specification.  It is merely incomplete. */public class LEF extends Output{	private Layer io_lefoutcurlayer;	private Set<NodeInst> nodesSeen;	private Set<ArcInst> arcsSeen;	/**	 * The main entry point for LEF deck writing.	 * @param cell the top-level cell to write.	 * @param context the hierarchical context to the cell.	 * @param filePath the disk file to create.	 */	public static void writeLEFFile(Cell cell, VarContext context, String filePath)	{		LEF out = new LEF();		if (out.openTextOutputStream(filePath)) return;		Netlist netlist = cell.getNetlist(Netlist.ShortResistors.ALL);		out.init(netlist);		HierarchyEnumerator.enumerateCell(netlist, context, new Visitor(out));		out.term(cell);		if (out.closeTextOutputStream()) return;		System.out.println(filePath + " written");	}	/**	 * Creates a new instance of the LEF netlister.	 */	LEF() {}	private static class Visitor extends HierarchyEnumerator.Visitor	{		private LEF generator;		public Visitor(LEF generator)		{			this.generator = generator;		}		public boolean enterCell(HierarchyEnumerator.CellInfo info)		{ 			generator.writeCellContents(info);			return true;		}		public void exitCell(HierarchyEnumerator.CellInfo info) {}		public boolean visitNodeInst(Nodable no, HierarchyEnumerator.CellInfo info) { return true; }	}	private void init(Netlist netList)	{		// write header information		if (User.isIncludeDateAndVersionInOutput())		{			printWriter.println("# Electric VLSI Design System, version " + Version.getVersion());			printWriter.println("# " + TextUtils.formatDate(new Date()));		} else		{			printWriter.println("# Electric VLSI Design System");		}		emitCopyright("# ", "");		printWriter.println("");		printWriter.println("NAMESCASESENSITIVE ON ;");		printWriter.println("UNITS");		printWriter.println("  DATABASE MICRONS 1 ;");		printWriter.println("END UNITS");		printWriter.println("");		// write layer information		for(int i=0; i<8; i++)		{			printWriter.println("LAYER METAL" + (i+1));			printWriter.println("  TYPE ROUTING ;");			printWriter.println("END METAL" + (i+1));			printWriter.println("");		}		printWriter.println("LAYER CONT");		printWriter.println("  TYPE CUT ;");		printWriter.println("END CONT");		printWriter.println("");		for(int i=0; i<3; i++)		{			printWriter.println("LAYER VIA" + (i+1) + (i+2));			printWriter.println("  TYPE CUT ;");			printWriter.println("END VIA: " + (i+1) + (i+2));			printWriter.println("");		}		for(int i=0; i<3; i++)		{			printWriter.println("LAYER POLY" + (i+1));			printWriter.println("  TYPE MASTERSLICE ;");			printWriter.println("END POLY" + (i+1));			printWriter.println("");		}		printWriter.println("LAYER PDIFF");		printWriter.println("  TYPE MASTERSLICE ;");		printWriter.println("END PDIFF");		printWriter.println("");		printWriter.println("LAYER NDIFF");		printWriter.println("  TYPE MASTERSLICE ;");		printWriter.println("END NDIFF");		printWriter.println("");		// write main cell header		Cell cell = netList.getCell();		printWriter.println("MACRO " + cell.getName());		printWriter.println("  FOREIGN " + cell.getName() + " ;");		Rectangle2D bounds = cell.getBounds();		double width = TextUtils.convertDistance(bounds.getWidth(), cell.getTechnology(), TextUtils.UnitScale.MICRO);		double height = TextUtils.convertDistance(bounds.getHeight(), cell.getTechnology(), TextUtils.UnitScale.MICRO);		printWriter.println("  SIZE " + TextUtils.formatDouble(width) + " BY " + TextUtils.formatDouble(height) + " ;");		printWriter.println("  SITE " + cell.getName() + " ;");		// write all of the metal geometry and ports		nodesSeen = new HashSet<NodeInst>();		arcsSeen = new HashSet<ArcInst>();		// make a map of networks to exports on those networks		Map<Network,List<Export>> unconnectedExports = new HashMap<Network,List<Export>>();		for(Iterator<PortProto> it = cell.getPorts(); it.hasNext(); )		{			Export e = (Export)it.next();			Network net = netList.getNetwork(e, 0);			List<Export> exportsOnNet = unconnectedExports.get(net);			if (exportsOnNet == null)			{				exportsOnNet = new ArrayList<Export>();				unconnectedExports.put(net, exportsOnNet);			}			exportsOnNet.add(e);		}		List<Network> netsToWrite = new ArrayList<Network>();		for(Network net : unconnectedExports.keySet())			netsToWrite.add(net);		Collections.sort(netsToWrite, new TextUtils.NetworksByName());				// write exports organized by network connections		boolean first = true;		for(Network net : netsToWrite)		{			List<Export> exportsOnNet = unconnectedExports.get(net);			Export main = null;			for(Export e : exportsOnNet)			{				if (main == null) main = e; else				{					if (main.getName().length() > e.getName().length()) main = e;				}			}			if (first) first = false; else printWriter.println();			printWriter.println("  PIN " + main.getName());			Set<NodeInst> nodesUnderExports = new HashSet<NodeInst>();			for(Export e : exportsOnNet)				nodesUnderExports.add(e.getOriginalPort().getNodeInst());			for(Export e : exportsOnNet)			{				PortOriginal fp = new PortOriginal(e.getOriginalPort());				NodeInst rni = fp.getBottomNodeInst();				PrimitivePort rpp = fp.getBottomPortProto();				AffineTransform trans = fp.getTransformToTop();				printWriter.println("    PORT");				io_lefoutcurlayer = null;				Technology tech = rni.getProto().getTechnology();				Poly [] polys = tech.getShapeOfNode(rni, true, false, null);				if (polys.length == 0)				{					PrimitiveNode np = (PrimitiveNode)rni.getProto();					Technology.NodeLayer [] nls = np.getLayers();					if (nls.length > 0)					{						polys = new Poly[1];						polys[0] = new Poly(rni.getAnchorCenterX(), rni.getAnchorCenterY(), rni.getXSize(), rni.getYSize());						polys[0].setLayer(nls[0].getLayer().getNonPseudoLayer());						polys[0].setPort(rpp);					}				}				for(int i=0; i<polys.length; i++)				{					Poly poly = polys[i];					if (poly.getPort() != rpp) continue;					io_lefwritepoly(poly, trans, tech, true);//					// when there are multiple ports connected, can write only 1 polygon per port//					if (exportsOnNet.size() > 1) break;				}				if (e == main) io_lefoutspread(cell, net, nodesUnderExports, netList);				printWriter.println("    END");			}			if (main.getCharacteristic() == PortCharacteristic.PWR)				printWriter.println("    USE POWER ;");			if (main.getCharacteristic() == PortCharacteristic.GND)				printWriter.println("    USE GROUND ;");			printWriter.println("  END " + main.getName());		}		// write the obstructions (all of the metal)		printWriter.println("");		printWriter.println("  OBS");		io_lefoutcurlayer = null;	}	private void term(Cell cell)	{	 	printWriter.println("  END");	   	printWriter.println("");		printWriter.println("END " + cell.getName());		printWriter.println("");		printWriter.println("END LIBRARY");	}	private void writeCellContents(HierarchyEnumerator.CellInfo info)	{		Cell cell = info.getCell();		AffineTransform trans = info.getTransformToRoot();		for(Iterator<NodeInst> it = cell.getNodes(); it.hasNext(); )		{			NodeInst ni = it.next();			if (ni.isCellInstance()) continue;			if (info.isRootCell() && nodesSeen.contains(ni)) continue;			AffineTransform rot = ni.rotateOut(trans);			Technology tech = ni.getProto().getTechnology();			Poly [] polys = tech.getShapeOfNode(ni);			for(int i=0; i<polys.length; i++)			{				Poly poly = polys[i];				io_lefwritepoly(poly, rot, tech, false);			}		}		// write metal layers for all arcs		for(Iterator<ArcInst> it = cell.getArcs(); it.hasNext(); )		{			ArcInst ai = it.next();			if (info.isRootCell() && arcsSeen.contains(ai)) continue;			Technology tech = ai.getProto().getTechnology();			Poly [] polys = tech.getShapeOfArc(ai);			for(int i=0; i<polys.length; i++)			{				Poly poly = polys[i];				io_lefwritepoly(poly, trans, tech, false);			}		}	}	/**	 * Method to write all geometry in cell "cell" that is on network "net"	 * to file "out".  Does not write nodes in "nodesUnderExports".	 */	void io_lefoutspread(Cell cell, Network net, Set<NodeInst> nodesUnderExports, Netlist netList)	{		for(Iterator<NodeInst> it = cell.getNodes(); it.hasNext(); )		{			NodeInst ni = it.next();			if (ni.isCellInstance()) continue;			if (nodesUnderExports.contains(ni)) continue;			PrimitiveNode.Function fun = ni.getFunction();			if (fun != PrimitiveNode.Function.PIN &&				fun != PrimitiveNode.Function.CONTACT &&				fun != PrimitiveNode.Function.NODE &&				// added WELL so that WELL contacts which are part of either				// VDD or GND nets are not written out as obstructions				fun != PrimitiveNode.Function.WELL &&				fun != PrimitiveNode.Function.SUBSTRATE &&				fun != PrimitiveNode.Function.CONNECT) continue;			boolean found = true;			for(Iterator<PortInst> pIt = ni.getPortInsts(); pIt.hasNext(); )			{				PortInst pi = pIt.next();				Network pNet = netList.getNetwork(pi);				if (pNet != net) { found = false;   break; }			}			if (!found) continue;			// write all layers on this node			nodesSeen.add(ni);			AffineTransform trans = ni.rotateOut();			Technology tech = ni.getProto().getTechnology();			Poly [] polys = tech.getShapeOfNode(ni);			for(int i=0; i<polys.length; i++)			{				Poly poly = polys[i];				io_lefwritepoly(poly, trans, tech, true);			}		}		// write metal layers for all arcs		for(Iterator<ArcInst> it = cell.getArcs(); it.hasNext(); )		{			ArcInst ai = it.next();			Network aNet = netList.getNetwork(ai, 0);			if (aNet != net) continue;			arcsSeen.add(ai);			Technology tech = ai.getProto().getTechnology();			Poly [] polys = tech.getShapeOfArc(ai);			for(int i=0; i<polys.length; i++)			{				Poly poly = polys[i];				io_lefwritepoly(poly, GenMath.MATID, tech, true);			}		}	}	/**	 * Method to write polygon "poly" from technology "tech", transformed by "trans",	 * to "out".	 */	private void io_lefwritepoly(Poly poly, AffineTransform trans, Technology tech, boolean extraIndent)	{		Layer layer = poly.getLayer();		if (layer == null) return;		String layername = io_lefoutlayername(layer);		if (layername.length() == 0) return;		poly.transform(trans);		Rectangle2D polyBounds = poly.getBox();		if (polyBounds == null) return;		double flx = TextUtils.convertDistance(polyBounds.getMinX(), tech, TextUtils.UnitScale.MICRO);		double fly = TextUtils.convertDistance(polyBounds.getMinY(), tech, TextUtils.UnitScale.MICRO);		double fhx = TextUtils.convertDistance(polyBounds.getMaxX(), tech, TextUtils.UnitScale.MICRO);		double fhy = TextUtils.convertDistance(polyBounds.getMaxY(), tech, TextUtils.UnitScale.MICRO);		if (layer != io_lefoutcurlayer)		{			if (extraIndent) printWriter.print("  ");			printWriter.println("    LAYER " + layername + " ;");			io_lefoutcurlayer = layer;		}		if (extraIndent) printWriter.print("  ");		printWriter.println("      RECT " + TextUtils.formatDouble(flx) + " " + TextUtils.formatDouble(fly) + " " +			TextUtils.formatDouble(fhx) + " " + TextUtils.formatDouble(fhy) + " ;");	}	private String io_lefoutlayername(Layer layer)	{		layer = layer.getNonPseudoLayer();		Layer.Function fun = layer.getFunction();		if (fun.isMetal()) return "METAL" + fun.getLevel();		if (fun == Layer.Function.GATE) return "POLY1";		if (fun.isPoly()) return "POLY" + fun.getLevel();		if (fun.isContact())		{			int level = fun.getLevel();			if (level == 1) return "CONT";			if (level < 10) return "VIA" + (level-1) + level;			if (level == 10) return "VIA9";			return "VIA" + (level-1);		}		if (fun == Layer.Function.DIFFN) return "NDIFF";		if (fun == Layer.Function.DIFFP) return "PDIFF";		if (fun == Layer.Function.DIFF) return "DIFF";		return "";	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色综合播放一区二区| 天天做天天摸天天爽国产一区 | 欧美网站一区二区| 欧美一区二区三区在线观看| 欧美日韩国产系列| 狠狠色丁香婷婷综合| 亚洲女人的天堂| 欧美综合久久久| 蜜桃精品视频在线| 日韩一区二区电影| 国产成人自拍高清视频在线免费播放| 精品久久久久久亚洲综合网| 国产精品一区二区在线播放| 97久久超碰国产精品电影| 美女尤物国产一区| 色诱视频网站一区| 精品在线免费视频| 亚洲天天做日日做天天谢日日欢 | 欧美日韩午夜在线视频| 久久精品视频在线免费观看| 亚洲一级在线观看| 国产精品国产馆在线真实露脸 | 一区二区三区欧美日韩| 高清国产一区二区| 蜜桃av一区二区| 亚洲国产精品久久不卡毛片| 欧美性感一区二区三区| 久久亚洲私人国产精品va媚药| 亚洲成人激情自拍| 亚洲精品国产视频| 中文字幕一区三区| 国产精品私人影院| 国产精品国产三级国产| 成人黄色大片在线观看| 亚洲国产高清aⅴ视频| 国产成人啪免费观看软件| 欧美激情综合网| 久久嫩草精品久久久精品一| 国产毛片精品视频| 韩国欧美国产1区| 精品一区二区免费| 国产精品一区二区久激情瑜伽| 欧美经典一区二区| 亚洲男人的天堂一区二区 | 91精品黄色片免费大全| 亚洲欧美一区二区三区孕妇| av成人动漫在线观看| 亚洲精品精品亚洲| 性做久久久久久久免费看| 欧美日韩高清一区二区不卡 | 一区二区三区四区不卡在线 | 国产最新精品免费| 成人精品亚洲人成在线| 久久综合九色综合久久久精品综合| 国产美女视频91| 国产福利一区二区三区视频在线 | 国产亚洲欧美色| 亚洲午夜私人影院| 国内精品视频一区二区三区八戒| 精品国产伦一区二区三区观看方式 | 人妖欧美一区二区| 精品国产乱码久久久久久图片 | 国产午夜精品一区二区三区嫩草| 性欧美大战久久久久久久久| 在线播放日韩导航| 26uuu久久综合| 亚洲高清一区二区三区| 在线成人小视频| 国产清纯美女被跳蛋高潮一区二区久久w | 欧美日韩精品一区二区三区蜜桃 | xfplay精品久久| 亚洲欧洲日产国码二区| 欧美一卡2卡3卡4卡| 北条麻妃国产九九精品视频| 亚洲精品国产高清久久伦理二区| 欧美v日韩v国产v| 日本中文在线一区| 色哟哟一区二区在线观看 | 国产精品自拍网站| 91精品福利视频| 在线看一区二区| 亚洲伦理在线精品| 亚洲国产你懂的| 91久久免费观看| 一区二区高清免费观看影视大全| 久久久精品tv| 日韩av高清在线观看| 日韩激情视频在线观看| 天天综合色天天综合色h| 亚洲乱码日产精品bd| 亚洲男人的天堂在线aⅴ视频| 中文字幕av不卡| 国产精品自拍毛片| 国产精品视频一二三区| 国产精品不卡视频| 国产成人av一区二区三区在线观看| 丁香婷婷综合网| 精品国产一区二区在线观看| 91麻豆国产在线观看| 波多野结衣91| 国产精品美女久久久久久久| 久草热8精品视频在线观看| 免费看欧美女人艹b| 国产揄拍国内精品对白| 91美女片黄在线观看91美女| 欧美日韩国产123区| 精品国产免费久久| 一道本成人在线| 日本网站在线观看一区二区三区 | 久久婷婷久久一区二区三区| 国产欧美一区二区三区网站| 一级中文字幕一区二区| 日本最新不卡在线| 久久网站最新地址| 色综合天天综合色综合av| 国产亚洲精品免费| 欧美久久久久久蜜桃| 欧美精品乱人伦久久久久久| 久久九九久精品国产免费直播| 一区二区三区不卡在线观看| 国产美女久久久久| 麻豆精品久久精品色综合| 美女尤物国产一区| 亚洲va欧美va人人爽午夜| 欧美综合欧美视频| 波多野结衣精品在线| 国产精品乱子久久久久| 成人免费va视频| 成人国产电影网| 成人av免费在线| 色婷婷精品大视频在线蜜桃视频| 亚洲婷婷国产精品电影人久久| eeuss影院一区二区三区| 亚洲免费在线电影| 亚洲一区二区五区| 午夜精品一区在线观看| 欧美一级理论片| 日韩亚洲欧美在线| www.日韩av| 国产精品亚洲专一区二区三区 | 国产麻豆9l精品三级站| 中国av一区二区三区| 在线影院国内精品| 欧美电影免费观看高清完整版在| 精品一二线国产| 色成年激情久久综合| 九九视频精品免费| 91麻豆免费看| 精品国产a毛片| 亚洲男人天堂av网| 国内成人精品2018免费看| 亚洲免费电影在线| 久久国产乱子精品免费女| 亚洲黄网站在线观看| 久久精品人人爽人人爽| 欧美日韩亚洲综合在线| 麻豆高清免费国产一区| 免费黄网站欧美| 波多野结衣的一区二区三区| 亚洲v中文字幕| 色呦呦网站一区| 中文一区在线播放| 国产一区二区三区日韩| 视频一区视频二区中文| 亚洲男女一区二区三区| 日韩三级在线免费观看| 国产一区中文字幕| 青青青伊人色综合久久| 久久亚洲综合色一区二区三区 | 欧美日韩亚洲综合在线| 亚洲欧洲日本在线| 麻豆91在线观看| 欧美亚洲另类激情小说| 国产综合成人久久大片91| 国产精品护士白丝一区av| 91在线观看免费视频| 性做久久久久久久免费看| 久久久久久久电影| 美女一区二区视频| 精品对白一区国产伦| 欧美va亚洲va香蕉在线| 欧美一区二区精品在线| 欧美美女喷水视频| 青青草精品视频| 久久久久国产成人精品亚洲午夜| 日韩精品在线一区二区| 久久久久久久久久久久久夜| 中国色在线观看另类| 一区二区在线看| 成人福利视频在线看| 欧美久久一二区| 精品一二三四区| 国产午夜精品久久| 91色.com| 美女爽到高潮91| 最好看的中文字幕久久| 午夜日韩在线电影| 日韩亚洲欧美综合| 不卡av在线网| 老司机午夜精品99久久|