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

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

?? lef.java

?? The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: LEF.java * Input/output tool: LEF (Library Exchange Format) reader * 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.input;import com.sun.electric.database.geometry.DBMath;import com.sun.electric.database.geometry.Orientation;import com.sun.electric.database.hierarchy.Cell;import com.sun.electric.database.hierarchy.Export;import com.sun.electric.database.hierarchy.Library;import com.sun.electric.database.prototype.NodeProto;import com.sun.electric.database.prototype.PortCharacteristic;import com.sun.electric.database.prototype.PortProto;import com.sun.electric.database.text.TextUtils;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.topology.RTBounds;import com.sun.electric.technology.ArcProto;import com.sun.electric.technology.Layer;import com.sun.electric.technology.PrimitiveNode;import com.sun.electric.technology.Technology;import com.sun.electric.technology.technologies.Generic;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;import java.io.IOException;import java.util.HashMap;import java.util.Iterator;import java.util.Map;/** * This class reads files in LEF files. * <BR> * Note that this reader 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 LEFDEF{	/*************** LEF PATHS ***************/	private static class LEFPath	{		private Point2D []  pt;		private NodeInst [] ni;		private double      width;		private ArcProto    arc;		private LEFPath     nextLEFPath;		private LEFPath()		{			pt = new Point2D[2];			ni = new NodeInst[2];		}	}	/**	 * Method to import a library from disk.	 * @param lib the library to fill	 * @return the created library (null on error).	 */	protected Library importALibrary(Library lib)	{		// remove any vias in the globals		firstViaDefFromLEF = null;		widthsFromLEF = new HashMap<ArcProto,Double>();		knownLayers = new HashMap<String,GetLayerInformation>();		initKeywordParsing();		try		{            if (!readFile(lib)) return null; // error during reading        } catch (IOException e)		{			System.out.println("ERROR reading LEF libraries");		}		return lib;	}	/**	 * Helper method for keyword processing which removes comments.	 * @param line a line of text just read.	 * @return the line after comments have been removed. 	 */	protected String preprocessLine(String line)	{		int sharpPos = line.indexOf('#');		if (sharpPos >= 0) return line.substring(0, sharpPos);		return line;	}	/**	 * Method to read the LEF file.	 */	private boolean readFile(Library lib)		throws IOException	{		for(;;)		{			// get the next keyword			String key = getAKeyword();			if (key == null) break;			if (key.equalsIgnoreCase("LAYER"))			{				if (readLayer(lib)) return true;			}			if (key.equalsIgnoreCase("MACRO"))			{				if (readMacro(lib)) return true;			}			if (key.equalsIgnoreCase("VIA"))			{				if (readVia(lib)) return true;			}			if (key.equalsIgnoreCase("VIARULE") || key.equalsIgnoreCase("SITE") ||				key.equalsIgnoreCase("ARRAY"))			{				String name = getAKeyword();				ignoreToEnd(name);				continue;			}			if (key.equalsIgnoreCase("SPACING"))			{				ignoreToEnd(key);				continue;			}			if (key.equalsIgnoreCase("MINFEATURE"))			{				ignoreToSemicolon(key);				continue;			}		}		return false;	}	private boolean readVia(Library lib)		throws IOException	{		// get the via name		String viaName = getAKeyword();		if (viaName == null) return true;		// create a new via definition		ViaDef vd = new ViaDef();		vd.viaName = viaName;		vd.sX = vd.sY = 0;		vd.via = null;		vd.lay1 = vd.lay2 = null;		vd.nextViaDef = firstViaDefFromLEF;		firstViaDefFromLEF = vd;		boolean ignoreDefault = true;		for(;;)		{			// get the next keyword			String key = getAKeyword();			if (key == null) return true;			if (ignoreDefault)			{				ignoreDefault = false;				if (key.equalsIgnoreCase("DEFAULT")) continue;			}			if (key.equalsIgnoreCase("END"))			{				key = getAKeyword();				break;			}			if (key.equalsIgnoreCase("RESISTANCE"))			{				if (ignoreToSemicolon(key)) return true;				continue;			}			if (key.equalsIgnoreCase("LAYER"))			{				key = getAKeyword();				if (key == null) return true;				GetLayerInformation li = getLayerInformation(key);				if (li.arc != null)				{					if (vd.lay1 == null) vd.lay1 = li.arc; else						vd.lay2 = li.arc;				}				if (ignoreToSemicolon("LAYER")) return true;				continue;			}			if (key.equalsIgnoreCase("RECT"))			{				// handle definition of a via rectangle				key = getAKeyword();				if (key == null) return true;				double lX = convertLEFString(key);				key = getAKeyword();				if (key == null) return true;				double lY = convertLEFString(key);				key = getAKeyword();				if (key == null) return true;				double hX = convertLEFString(key);				key = getAKeyword();				if (key == null) return true;				double hY = convertLEFString(key);				// accumulate largest layer size				if (hX-lX > vd.sX) vd.sX = hX - lX;				if (hY-lY > vd.sY) vd.sY = hY - lY;				if (ignoreToSemicolon("RECT")) return true;				continue;			}		}		if (vd.lay1 != null && vd.lay2 != null)		{			for(Iterator<PrimitiveNode> it = Technology.getCurrent().getNodes(); it.hasNext(); )			{				PrimitiveNode np = it.next();				if (np.getFunction() != PrimitiveNode.Function.CONTACT) continue;				PortProto pp = np.getPort(0);				if (pp.connectsTo(vd.lay1) && pp.connectsTo(vd.lay2))				{					vd.via = np;					break;				}			}		}		return false;	}	private boolean readMacro(Library lib)		throws IOException	{		String cellName = getAKeyword();		if (cellName == null)		{			System.out.println("EOF parsing MACRO header");			return true;		}		cellName = cellName + "{lay.sk}";		Cell cell = Cell.makeInstance(lib, cellName);		if (cell == null)		{			System.out.println("Cannot create cell '" + cellName + "'");			return true;		}		for(;;)		{			// get the next keyword			String key = getAKeyword();			if (key == null)			{				System.out.println("EOF parsing MACRO");				return true;			}			if (key.equalsIgnoreCase("END"))			{				key = getAKeyword();				break;			}			if (key.equalsIgnoreCase("SOURCE") || key.equalsIgnoreCase("FOREIGN") ||				key.equalsIgnoreCase("SYMMETRY") || key.equalsIgnoreCase("SITE") ||				key.equalsIgnoreCase("CLASS") || key.equalsIgnoreCase("LEQ") ||				key.equalsIgnoreCase("POWER"))			{				if (ignoreToSemicolon(key)) return true;				continue;			}			if (key.equalsIgnoreCase("ORIGIN"))			{				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading ORIGIN X");					return true;				}				double oX = convertLEFString(key);				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading ORIGIN Y");					return true;				}				double oY = convertLEFString(key);				if (ignoreToSemicolon("ORIGIN")) return true;				// create or move the cell-center node				NodeInst ccNi = null;				for(Iterator<NodeInst> it = cell.getNodes(); it.hasNext(); )				{					NodeInst ni = it.next();					if (ni.getProto() == Generic.tech().cellCenterNode) { ccNi = ni;   break; }				}				if (ccNi == null)				{					double sX = Generic.tech().cellCenterNode.getDefWidth();					double sY = Generic.tech().cellCenterNode.getDefHeight();					ccNi = NodeInst.makeInstance(Generic.tech().cellCenterNode, new Point2D.Double(oX, oY), sX, sY, cell);					if (ccNi == null)					{						System.out.println("Line " + lineReader.getLineNumber() + ": Cannot create cell center node");						return true;					}					ccNi.setHardSelect();					ccNi.setVisInside();				} else				{					double dX = oX - ccNi.getTrueCenterX();					double dY = oY - ccNi.getTrueCenterY();					ccNi.move(dX, dY);				}				continue;			}			if (key.equalsIgnoreCase("SIZE"))			{				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading SIZE X");					return true;				}				double wid = convertLEFString(key);		// get width				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading SIZE 'BY'");					return true;				}				if (!key.equalsIgnoreCase("BY"))				{					System.out.println("Line " + lineReader.getLineNumber() + ": Expected 'by' in SIZE");					return true;				}				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading SIZE Y");					return true;				}				double hei = convertLEFString(key);		// get height				cell.newVar(prXkey, new Double(wid));				cell.newVar(prYkey, new Double(hei));				if (ignoreToSemicolon("SIZE")) return true;				if (!PLACELEFGEOMETRY)				{					Point2D ctr = new Point2D.Double(wid/2, hei/2);					NodeInst.makeInstance(Generic.tech().invisiblePinNode, ctr, wid, hei, cell);				}				continue;			}			if (key.equalsIgnoreCase("PIN"))			{				if (readPin(cell)) return true;				continue;			}			if (key.equalsIgnoreCase("OBS"))			{				if (readObs(cell)) return true;				continue;			}			System.out.println("Line " + lineReader.getLineNumber() + ": Unknown MACRO keyword (" + key + ")");			return true;		}		return false;	}	private boolean readObs(Cell cell)		throws IOException	{		NodeProto np = null;		for(;;)		{			String key = getAKeyword();			if (key == null)			{				System.out.println("EOF parsing OBS");				return true;			}			if (key.equalsIgnoreCase("END")) break;			if (key.equalsIgnoreCase("LAYER"))			{				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading LAYER clause");					return true;				}				GetLayerInformation li = getLayerInformation(key);				np = li.pure;				if (li.layerFun == Layer.Function.UNKNOWN || np == null)				{					System.out.println("Line " + lineReader.getLineNumber() + ": Unknown layer name (" + key + ")");					return true;				}				if (ignoreToSemicolon("LAYER")) return true;				continue;			}			if (key.equalsIgnoreCase("RECT"))			{				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading RECT low X");					return true;				}				double lX = convertLEFString(key);				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading RECT low Y");					return true;				}				double lY = convertLEFString(key);				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading RECT high X");					return true;				}				double hX = convertLEFString(key);				key = getAKeyword();				if (key == null)				{					System.out.println("EOF reading RECT high Y");					return true;				}				double hY = convertLEFString(key);				if (ignoreToSemicolon("RECT")) return true;				// make the obstruction				if (PLACELEFGEOMETRY)				{					if (np == null)					{						System.out.println("Line " + lineReader.getLineNumber() + ": No layers for RECT");						return true;					}					Point2D ctr = new Point2D.Double((lX+hX)/2, (lY+hY)/2);					double sX = Math.abs(hX - lX);					double sY = Math.abs(hY - lY);					NodeInst ni = NodeInst.makeInstance(np, ctr, sX, sY, cell);					if (ni == null)					{						System.out.println("Line " + lineReader.getLineNumber() + ": Cannot create node for RECT");						return true;					}				}				continue;			}		}		return false;	}	private boolean readPin(Cell cell)		throws IOException	{		// get the pin name		String key = getAKeyword();		if (key == null)		{			System.out.println("EOF parsing PIN name");			return true;		}		String pinName = key.replace('<', '[').replace('>', ']');		PortCharacteristic useCharacteristics = PortCharacteristic.UNKNOWN;		PortCharacteristic portCharacteristics = PortCharacteristic.UNKNOWN;		for(;;)		{			key = getAKeyword();			if (key == null)			{				System.out.println("EOF parsing PIN");				return true;			}			if (key.equalsIgnoreCase("END"))			{				key = getAKeyword();				break;			}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线视频欧美精品| 91年精品国产| 亚洲女与黑人做爰| 精品国产一区二区三区四区四 | 成人天堂资源www在线| 亚洲国产欧美另类丝袜| 欧美经典一区二区三区| 欧美一级免费大片| 色悠悠亚洲一区二区| 26uuu久久综合| 男男视频亚洲欧美| 亚洲高清中文字幕| 国产精品第五页| 久久伊人中文字幕| 欧美精品一二三| 91在线精品秘密一区二区| 激情综合色播五月| 青青草精品视频| 亚洲福利一二三区| 亚洲一区二区成人在线观看| 国产精品妹子av| 国产日韩欧美一区二区三区综合| 制服丝袜中文字幕亚洲| 在线视频欧美精品| 色综合天天在线| 成人免费av资源| 丁香一区二区三区| 国产999精品久久| 国产精品1区二区.| 国产传媒日韩欧美成人| 国产麻豆视频一区| 国产一区二区三区蝌蚪| 久久成人免费网站| 捆绑调教美女网站视频一区| 奇米一区二区三区av| 欧美aⅴ一区二区三区视频| 日韩精品国产欧美| 久久精品国产**网站演员| 蜜桃av一区二区在线观看| 免费在线成人网| 视频在线观看91| 免费在线观看视频一区| 毛片av一区二区| 日本一区二区成人| 欧美刺激午夜性久久久久久久| 777a∨成人精品桃花网| 制服丝袜成人动漫| 日韩一级黄色大片| 久久综合九色综合欧美亚洲| 精品福利av导航| 国产视频一区在线观看 | 亚洲精品乱码久久久久久久久| 国产精品不卡在线| 亚洲综合在线观看视频| 亚洲高清三级视频| 日韩国产精品久久久| 欧美a一区二区| 国产毛片一区二区| 91网站最新地址| 欧美猛男超大videosgay| 日韩欧美一区二区三区在线| 久久综合九色综合97婷婷| 国产亚洲精品aa| 亚洲精品日日夜夜| 日本不卡视频一二三区| 国内精品久久久久影院色 | 91精品国产入口| 精品欧美久久久| 国产精品麻豆网站| 偷拍亚洲欧洲综合| 国产乱人伦精品一区二区在线观看| 成人激情午夜影院| 欧美日本一区二区在线观看| 精品国产精品网麻豆系列| 中文文精品字幕一区二区| 亚洲精选视频免费看| 日本va欧美va精品| 成人激情午夜影院| 欧美一区二区三区人| 国产精品视频麻豆| 日韩黄色片在线观看| 国产成人午夜视频| 777a∨成人精品桃花网| 国产精品免费久久久久| 亚洲r级在线视频| 国产91丝袜在线播放九色| 色屁屁一区二区| 国产视频一区在线观看| 日韩欧美精品在线| 精品第一国产综合精品aⅴ| 亚洲欧美怡红院| 热久久久久久久| 色婷婷国产精品| 国产午夜三级一区二区三| 亚洲一区视频在线观看视频| 国产精品18久久久久久久久 | 久久先锋影音av鲁色资源| 亚洲色图欧洲色图婷婷| 精品一区二区三区视频在线观看 | 99精品一区二区| 日韩精品一区二区三区视频| 一区二区三区精品视频在线| 国产在线视频不卡二| 欧美日韩精品免费| 国产精品毛片大码女人| 久久国产成人午夜av影院| 欧美日韩国产另类一区| 成人免费在线播放视频| 国产一区久久久| 欧美一区二区黄| 亚洲一区视频在线观看视频| 99视频精品免费视频| 国产亚洲一区二区在线观看| 日韩不卡一区二区| 欧美性感一区二区三区| 久久亚区不卡日本| 国产一区在线观看视频| 日韩美女一区二区三区四区| 国产一区中文字幕| 久久久国产综合精品女国产盗摄| 久久国产麻豆精品| 国产清纯白嫩初高生在线观看91| 亚洲精品成人精品456| 在线精品观看国产| 午夜国产精品影院在线观看| 91免费看视频| 美女视频黄久久| 亚洲精品综合在线| 亚洲视频香蕉人妖| 国产91精品露脸国语对白| 波波电影院一区二区三区| 日本黄色一区二区| 亚洲欧美国产77777| www.66久久| 亚洲另类色综合网站| 色综合久久久久| 亚洲欧美福利一区二区| 99久久国产综合精品色伊| 精品久久国产97色综合| 青青青爽久久午夜综合久久午夜 | 韩国v欧美v亚洲v日本v| 精品动漫一区二区三区在线观看| 老司机精品视频线观看86| 欧美不卡123| 国产乱子伦视频一区二区三区| 91精品国产色综合久久| 麻豆91在线看| 国产欧美精品一区二区色综合 | 欧美一区二区播放| 久久成人免费日本黄色| 久久久噜噜噜久久人人看 | 亚洲欧美日韩一区二区三区在线观看 | 久久综合色8888| 国产成人在线观看| 亚洲人成网站色在线观看 | 欧美韩国日本一区| 99久久国产综合精品麻豆| 最新热久久免费视频| 欧美偷拍一区二区| 蜜桃久久久久久| 国产.欧美.日韩| 美女国产一区二区三区| 成人免费看视频| 国产一区二区三区免费看| 亚洲欧美激情视频在线观看一区二区三区| 日韩欧美中文字幕制服| 欧美性视频一区二区三区| 91麻豆文化传媒在线观看| 不卡电影免费在线播放一区| 久久疯狂做爰流白浆xx| 天堂精品中文字幕在线| 午夜精品久久久久久不卡8050| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产成人av电影| 亚洲黄色小说网站| 精品免费一区二区三区| 99在线精品视频| 青青草国产成人av片免费| 欧美国产日韩精品免费观看| 欧洲精品中文字幕| 国内精品伊人久久久久av影院| 日韩伦理电影网| 精品国产免费人成在线观看| 91在线播放网址| 国内精品写真在线观看| 亚洲高清免费观看高清完整版在线观看| 精品成人佐山爱一区二区| 欧美主播一区二区三区| 国产伦理精品不卡| 亚洲成人1区2区| 国产视频亚洲色图| 91精品国产免费久久综合| 成人av电影在线| 久久精品久久99精品久久| 国产精品日产欧美久久久久| 日韩午夜精品视频| 色94色欧美sute亚洲13| 国产成人亚洲综合a∨婷婷| 日韩精品亚洲专区| 亚洲精品国产第一综合99久久|