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

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

?? gds.java

?? The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: GDS.java * Input/output tool: GDS output * Original C Code written by Sid Penstone, Queens University * Translated to Java by Steven M. Rubin, Sun Microsystems. * * Copyright (c) 2003 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.Poly;import com.sun.electric.database.geometry.PolyBase;import com.sun.electric.database.hierarchy.Cell;import com.sun.electric.database.hierarchy.Export;import com.sun.electric.database.hierarchy.Nodable;import com.sun.electric.database.hierarchy.View;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.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.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 com.sun.electric.tool.io.GDSLayers;import com.sun.electric.tool.io.IOTool;import com.sun.electric.tool.ncc.basic.NccCellAnnotations;import java.awt.geom.AffineTransform;import java.awt.geom.Point2D;import java.awt.geom.Rectangle2D;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.math.BigDecimal;import java.util.Calendar;import java.util.Collection;import java.util.Comparator;import java.util.Date;import java.util.HashMap;import java.util.Iterator;import java.util.List;import java.util.Map;import java.util.Set;import java.util.TreeSet;/** * This class writes files in GDS format. */public class GDS extends Geometry{	private static final int GDSVERSION        =      3;	private static final int BYTEMASK          =   0xFF;	private static final int DSIZE             =    512;		/* data block */	private static final int MAXPOINTS         =    510;		/* maximum points in a polygon */	private static final int EXPORTPRESENTATION=      0;		/* centered (was 8 for bottomleft) */	// GDSII bit assignments in STRANS record	private static final int STRANS_REFLX      = 0x8000;//	private static final int STRANS_ABSA       =    0x2;	// data type codes	private static final int DTYP_NONE         =      0;	// header codes	private static final short HDR_HEADER      = 0x0002;	private static final short HDR_BGNLIB      = 0x0102;	private static final short HDR_LIBNAME     = 0x0206;	private static final short HDR_UNITS       = 0x0305;	private static final short HDR_ENDLIB      = 0x0400;	private static final short HDR_BGNSTR      = 0x0502;	private static final short HDR_STRNAME     = 0x0606;	private static final short HDR_ENDSTR      = 0x0700;	private static final short HDR_BOUNDARY    = 0x0800;	private static final short HDR_PATH        = 0x0900;	private static final short HDR_SREF        = 0x0A00;//	private static final short HDR_AREF        = 0x0B00;	private static final short HDR_TEXT        = 0x0C00;	private static final short HDR_LAYER       = 0x0D02;	private static final short HDR_DATATYPE    = 0x0E02;	private static final short HDR_XY          = 0x1003;	private static final short HDR_ENDEL       = 0x1100;	private static final short HDR_SNAME       = 0x1206;	private static final short HDR_TEXTTYPE    = 0x1602;	private static final short HDR_PRESENTATION= 0x1701;	private static final short HDR_STRING	   = 0x1906;	private static final short HDR_STRANS      = 0x1A01;	private static final short HDR_MAG         = 0x1B05;	private static final short HDR_ANGLE       = 0x1C05;//    private static final short HDR_PROPATTR    = 0x2B02;//    private static final short HDR_PROPVALUE   = 0x2C06;	// Header byte counts	private static final short HDR_N_BGNLIB    =     28;	private static final short HDR_N_UNITS     =     20;	private static final short HDR_N_ANGLE     =     12;	private static final short HDR_N_MAG       =     12;	// Maximum string sizes	private static final int HDR_M_SNAME       =     32;	//private static final int HDR_M_STRNAME     =     32; // replace by preference IOTool.getGDSCellNameMaxLen	private static final int HDR_M_ASCII       =    256;	// contour gathering thresholds for polygon accumulation//	private static final double BESTTHRESH     =   0.001;		/* 1/1000 of a millimeter *///	private static final double WORSTTHRESH    =   0.1;			/* 1/10 of a millimeter */	/** for buffering output data */			private static byte [] dataBufferGDS = new byte[DSIZE];	/** for buffering output data */			private static byte [] emptyBuffer = new byte[DSIZE];	/** Current layer for gds output */			private static GDSLayers currentLayerNumbers;	/** Position of next byte in the buffer */	private static int bufferPosition;						/** Number data buffers output so far */	private static int blockCount;					/** constant for GDS units */				private static double scaleFactor;					/** cell naming map */						private Map<Cell,String> cellNames;	/** layer number map */						private Map<Layer,GDSLayers> layerNumbers;    /** separator string for lib + cell concatanated cell names */  public static final String concatStr = ".";    /** Name remapping if NCC annotation */     private Map<String,Set<String>> nameRemapping;    /** write pins at Export locations ? */     private final boolean writeExportPins;    /** converts bracket to underscores in export names.*/ private final boolean convertBracketsInExports;    	/**	 * Main entry point for GDS output.     * @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 GDS writeGDSFile(Cell cell, VarContext context, String filePath)	{        return writeGDSFile(cell, context, filePath, IOTool.isGDSOutWritesExportPins(), IOTool.getGDSOutputConvertsBracketsInExports());	}	/**	 * Main entry point for GDS output.     * @param cell the top-level cell to write.     * @param context the hierarchical context to the cell.	 * @param filePath the disk file to create.     * @param writeExportPins write pins at Export locations.     * @param convertBracketsInExports converts bracket to underscores in export names.	 */	public static GDS writeGDSFile(Cell cell, VarContext context, String filePath,            boolean writeExportPins, boolean convertBracketsInExports)	{		if (cell.getView() != View.LAYOUT)		{			System.out.println("Can only write GDS for layout cells");			return null;		}		GDS out = new GDS(writeExportPins, convertBracketsInExports);		if (out.openBinaryOutputStream(filePath)) return null;		BloatVisitor visitor = out.makeBloatVisitor(getMaxHierDepth(cell));		if (out.writeCell(cell, context, visitor)) return null;		if (out.closeBinaryOutputStream()) return null;		System.out.println(filePath + " written");		// warn if library name was changed		String topCellName = cell.getName();		String mangledTopCellName = makeGDSName(topCellName, HDR_M_ASCII);		if (!topCellName.equals(mangledTopCellName))			System.out.println("Warning: library name in this file is " + mangledTopCellName +				" (special characters were changed)");        return out;	}    private GDS(boolean writeExportPins, boolean convertBracketsInExports) {        this.writeExportPins = writeExportPins;        this.convertBracketsInExports = convertBracketsInExports;    }	protected void start()	{		initOutput();		outputBeginLibrary(topCell);	}	protected void done()	{		outputHeader(HDR_ENDLIB, 0);		doneWritingOutput();	}	/** Method to write cellGeom */	protected void writeCellGeom(CellGeom cellGeom)	{		// write this cell		Cell cell = cellGeom.cell;		outputBeginStruct(cell);        boolean renamePins = (cell == topCell && IOTool.getGDSConvertNCCExportsConnectedByParentPins());        boolean colapseGndVddNames = (cell == topCell && IOTool.isGDSColapseVddGndPinNames());        if (renamePins) {            // rename pins to allow external LVS programs to virtually connect nets as specified            // by the NCC annotation exportsConnectedByParent            NccCellAnnotations annotations = NccCellAnnotations.getAnnotations(cell);            if (annotations == null)                renamePins = false;            else                nameRemapping = createExportNameMap(annotations, cell);        }		// write all polys by Layer		Set<Layer> layers = cellGeom.polyMap.keySet();		for (Layer layer : layers)		{            // No technology associated, case when art elements are added in layout            // r.getTechnology() == Generic.tech for layer Glyph            if (layer == null || layer.getTechnology() == null || layer.getTechnology() == Generic.tech()) continue;			if (!selectLayer(layer))            {                System.out.println("Skipping " + layer + " in GDS:writeCellGeom");                continue;            }			List<Object> polyList = cellGeom.polyMap.get(layer);			for (Object obj : polyList)			{				PolyBase poly = (PolyBase)obj;				Integer firstLayer = currentLayerNumbers.getFirstLayer();				int layerNum = firstLayer.intValue() & 0xFFFF;				int layerType = (firstLayer.intValue() >> 16) & 0xFFFF;				writePoly(poly, layerNum, layerType);			}		}		// write all instances		for (Nodable no : cellGeom.nodables)		{			writeNodable(no);		}		// now write exports		if (IOTool.getGDSOutDefaultTextLayer() >= 0)		{			for(Iterator<PortProto> it = cell.getPorts(); it.hasNext(); )			{				Export pp = (Export)it.next();				// find the node at the bottom of this export				PortOriginal fp = new PortOriginal(pp.getOriginalPort());				PortInst bottomPort = fp.getBottomPort();				NodeInst bottomNi = bottomPort.getNodeInst();				// find the layer associated with this node				PrimitiveNode pNp = (PrimitiveNode)bottomNi.getProto();				Technology.NodeLayer [] nLay = pNp.getLayers();				Layer layer = nLay[0].getLayer().getNonPseudoLayer();				selectLayer(layer);//				int textLayer = IOTool.getGDSOutDefaultTextLayer(), textType = 0;//				if (currentLayerNumbers.getTextLayer() != -1)//				{//					textLayer = currentLayerNumbers.getTextLayer() & 0xFFFF;//					textType = (currentLayerNumbers.getTextLayer() >> 16) & 0xFFFF;//				}				int pinLayer = IOTool.getGDSOutDefaultTextLayer(), pinType = 0;				if (currentLayerNumbers.getPinLayer() != -1)				{					pinLayer = currentLayerNumbers.getPinLayer() & 0xFFFF;					pinType = (currentLayerNumbers.getPinLayer() >> 16) & 0xFFFF;				}				// put out a pin if requested				if (writeExportPins)                {					writeExportOnLayer(pp, pinLayer, pinType, renamePins, colapseGndVddNames);                    // write the text                    //writeExportOnLayer(pp, textLayer, textType);                }			}		}		outputHeader(HDR_ENDSTR, 0);	}    private Map<String,Set<String>> createExportNameMap(NccCellAnnotations ann, Cell cell) {        Map<String,Set<String>> nameMap = new HashMap<String,Set<String>>();        for (Iterator<List<NccCellAnnotations.NamePattern>> it2 = ann.getExportsConnected(); it2.hasNext(); )		{            List<NccCellAnnotations.NamePattern> list = it2.next();            // list of all patterns that should be connected            Set<String> connectedExports = new TreeSet<String>(new StringComparator());            for (NccCellAnnotations.NamePattern pat : list)			{                for (Iterator<PortProto> it = cell.getPorts(); it.hasNext(); )				{                    Export e = (Export)it.next();                    String name = e.getName();                    if (pat.matches(name))					{                        connectedExports.add(name);                        nameMap.put(name, connectedExports);                    }                }            }        }        return nameMap;    }    private static class StringComparator implements Comparator<String>    {		/**		 * Method to sort Objects by their string name.		 */        public int compare(String s1, String s2)		{            return s1.compareTo(s2);        }        public boolean equals(Object obj)		{            return (this == obj);        }    }    private void writeExportOnLayer(Export pp, int layer, int type, boolean remapNames, boolean colapseGndVddNames)	{		outputHeader(HDR_TEXT, 0);		outputHeader(HDR_LAYER, layer);		outputHeader(HDR_TEXTTYPE, type);		outputHeader(HDR_PRESENTATION, EXPORTPRESENTATION);		// now the orientation		NodeInst ni = pp.getOriginalPort().getNodeInst();		int transValue = 0;		int angle = ni.getAngle();		if (ni.isXMirrored() != ni.isYMirrored()) transValue |= STRANS_REFLX;		if (ni.isYMirrored()) angle = (3600 - angle)%3600;		if (ni.isXMirrored()) angle = (1800 - angle)%3600;		outputHeader(HDR_STRANS, transValue);		// reduce the size of export text by a factor of 2		outputMag(0.5);		outputAngle(angle);		outputShort((short)12);		outputShort(HDR_XY);		Poly portPoly = pp.getOriginalPort().getPoly();		outputInt(scaleDBUnit(portPoly.getCenterX()));		outputInt(scaleDBUnit(portPoly.getCenterY()));		// now the string		String str = pp.getName();        if (remapNames) {            Set<String> nameSet = nameRemapping.get(str);            if (nameSet != null) {                str = nameSet.iterator().next();                str = str + ":" + str;                //System.out.println("Remapping export "+pp.getName()+" to "+str);            }        }        if (convertBracketsInExports) {            // convert brackets to underscores            str = str.replaceAll("[\\[\\]]", "_");        }        if (colapseGndVddNames)        {            String tmp = str.toLowerCase();            // Detecting string in lower case and later search for "_"            if (tmp.startsWith("vdd_") || tmp.startsWith("gnd_"))

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久成人免费日本黄色| 欧美丰满少妇xxxxx高潮对白 | 国产日韩影视精品| 亚洲乱码中文字幕综合| 国产一区二区三区免费看| 欧美在线一二三| 国产日韩欧美激情| 久久国产剧场电影| 欧美最猛黑人xxxxx猛交| 国产日韩v精品一区二区| 奇米色777欧美一区二区| 欧美综合欧美视频| 中文字幕一区二区三区在线播放| 免费三级欧美电影| 欧美色国产精品| 国产精品动漫网站| 国产成人午夜精品影院观看视频| 欧美一区二区三区白人| 午夜久久久影院| 91搞黄在线观看| 亚洲欧美日韩久久| 97久久人人超碰| 国产精品视频免费看| 国产精品18久久久久久久久| 欧美成人一级视频| 日本中文在线一区| 欧美高清性hdvideosex| 亚洲成人精品一区二区| 色婷婷综合久久久中文一区二区| 国产精品久久一卡二卡| 国产精品一卡二| 久久女同性恋中文字幕| 国产一区二区三区蝌蚪| 精品国产区一区| 紧缚奴在线一区二区三区| 日韩精品一区二区在线| 精品一区二区在线视频| 久久先锋影音av鲁色资源| 韩国午夜理伦三级不卡影院| 精品国产一二三| 国产成人精品一区二| 国产精品日韩成人| 99精品欧美一区二区三区综合在线| 国产精品国产三级国产aⅴ入口| 成熟亚洲日本毛茸茸凸凹| 国产精品女主播av| 色呦呦一区二区三区| 一区二区三区中文字幕| 欧美日韩一级片在线观看| 亚洲国产视频在线| 欧美变态凌虐bdsm| 国产福利精品一区| 亚洲欧美日韩久久精品| 欧美精品日日鲁夜夜添| 卡一卡二国产精品| 国产三级一区二区| 91亚洲精品久久久蜜桃| 午夜视频一区在线观看| 日韩免费成人网| 成人性生交大片免费看在线播放| 亚洲欧美在线aaa| 欧美精品777| 成人黄色免费短视频| 亚洲国产精品一区二区久久恐怖片 | 精品久久一区二区| 国产成a人亚洲| 亚洲影院免费观看| 久久综合色综合88| 色综合久久久久网| 免费日本视频一区| 国产精品国产自产拍在线| 欧美性猛交xxxx乱大交退制版| 免费观看一级特黄欧美大片| 中文字幕在线不卡国产视频| 欧美伊人精品成人久久综合97| 激情综合一区二区三区| 亚洲人成在线播放网站岛国| 欧美不卡一区二区| 91久久奴性调教| 国产精品18久久久久久久久久久久| 一区二区免费在线| 国产欧美一区二区精品性| 欧美美女网站色| av电影一区二区| 久久99久久99| 性久久久久久久久久久久| 欧美国产日韩a欧美在线观看 | 日韩有码一区二区三区| ●精品国产综合乱码久久久久| 日韩欧美国产一二三区| 一本到不卡免费一区二区| 国产毛片一区二区| 免费观看日韩电影| 亚洲一区二区精品3399| 中文字幕亚洲一区二区av在线| 在线不卡a资源高清| 色婷婷国产精品久久包臀 | 韩国中文字幕2020精品| 天堂资源在线中文精品| 亚洲人成在线观看一区二区| 中文字幕免费不卡在线| 久久色中文字幕| 日韩精品一区二区三区四区视频 | 成人网在线播放| 国产一区不卡视频| 另类中文字幕网| 日韩国产精品久久| 日韩av不卡一区二区| 亚洲成人动漫在线免费观看| 亚洲欧美韩国综合色| 成人免费小视频| 亚洲人成电影网站色mp4| 国产精品日产欧美久久久久| 欧美mv和日韩mv国产网站| 欧美一区二区三区男人的天堂| 欧美日韩国产综合视频在线观看| 色久优优欧美色久优优| 91美女蜜桃在线| 一本高清dvd不卡在线观看| 国产在线播精品第三| 欧美高清视频一二三区| 91在线观看美女| 亚洲欧美另类综合偷拍| ㊣最新国产の精品bt伙计久久| 国产精品视频免费| 国产精品久久久99| 一区二区三区色| 性做久久久久久免费观看欧美| 亚洲一卡二卡三卡四卡五卡| 亚洲成人av免费| 全国精品久久少妇| 色就色 综合激情| 欧美性色欧美a在线播放| 欧美亚男人的天堂| 日韩久久免费av| 国产亚洲综合性久久久影院| 亚洲国产精华液网站w| 亚洲欧美日韩一区二区| 亚洲va欧美va国产va天堂影院| 亚洲电影一区二区| 久久精品二区亚洲w码| 国产一区三区三区| 92国产精品观看| 欧美一三区三区四区免费在线看| 欧美精品一区二区在线播放| 国产欧美一区二区精品性| 依依成人综合视频| 老司机精品视频一区二区三区| 国产成人av一区| 91福利国产成人精品照片| 91精品欧美久久久久久动漫| 久久久不卡影院| 亚洲一区二区美女| 狠狠狠色丁香婷婷综合激情| 91年精品国产| 欧美电影免费观看完整版| 国产精品久久夜| 免费成人av资源网| 94色蜜桃网一区二区三区| 欧美成人精品福利| 亚洲一区二区三区中文字幕在线| 国产乱码精品1区2区3区| 欧美三级在线播放| 国产精品国产三级国产| 奇米一区二区三区av| 成人av资源网站| 精品国产伦一区二区三区观看方式| 亚洲男人的天堂av| 国产呦萝稀缺另类资源| 欧美日本精品一区二区三区| 中文一区二区在线观看| 久久99精品久久久久久| 欧美日韩一区精品| 亚洲欧美日韩国产成人精品影院| 精品一区二区三区免费视频| 欧美三区在线观看| 自拍偷拍亚洲综合| 国产精品99久| 日韩一级片在线播放| 天天免费综合色| 91理论电影在线观看| 中文字幕成人av| 国产一区二区三区久久久| 欧美一区二区三区成人| 亚洲成人免费影院| 欧美性受极品xxxx喷水| 国产精品免费av| 国产白丝精品91爽爽久久| 精品久久国产老人久久综合| 午夜一区二区三区在线观看| 99精品国产视频| 中文在线资源观看网站视频免费不卡| 免费观看成人av| 91精品啪在线观看国产60岁| 亚洲高清久久久| 欧美日韩在线三区| 天天做天天摸天天爽国产一区| 精品1区2区3区| 亚洲小说欧美激情另类| 91黄色免费网站|