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

📄 ngrid.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
		{			System.out.println("No NODEINST at row 1 " + row);			return true;		}		if (pla.rowList[row][1].lastitem.nodeInst.getProto() != pla.nmosOne)			lastColPort = pla.rowList[row][1].lastitem.nodeInst.getProto().getPort(0); else				lastColPort =  pla.rowList[row][1].lastitem.nodeInst.getProto().findPortProto("GND.d.s");		if (lastColPort == null)		{			System.out.println("No NODEPROTO for GND.d.s");			return true;		}		nodeColPort = ni.getProto().findPortProto("GND.d.s");		pla.makeWire(pla.aArc, 3/*14*/, pla.rowList[row][1].lastitem.nodeInst, lastColPort, ni, nodeColPort, arrayCell);		// connect to last GATE object		if (pla.rowList[row][rowPos].lastitem.nodeInst.getProto() != pla.nmosOne)			lastColPort = pla.rowList[row][rowPos].lastitem.nodeInst.getProto().getPort(0); else				lastColPort =  pla.rowList[row][rowPos].lastitem.nodeInst.getProto().findPortProto("GATE.p.e");		nodeColPort = ni.getProto().findPortProto("GATE.p.w");		pla.makeWire(pla.pArc, 0, pla.rowList[row][rowPos].lastitem.nodeInst, lastColPort,			ni, nodeColPort, arrayCell);		// put in column list		pla.columnList[i].lastitem.bottomItem = new PLA.UCItem();		pla.columnList[i].lastitem = pla.columnList[i].lastitem.bottomItem;		pla.columnList[i].lastitem.nodeInst = ni;		// put in ground row list		pla.rowList[row][1].lastitem.rightItem = pla.columnList[i].lastitem;		pla.rowList[row][1].lastitem = pla.rowList[row][1].lastitem.rightItem;		// only keep track of the last item in this row		// the ground list above (index 1) holds the complete list		pla.rowList[row][rowPos].lastitem = pla.rowList[row][1].lastitem;		return false;	}	private boolean completeRow(int row, int x, int y, Cell arrayCell)	{		PLA.UCItem newItem = new PLA.UCItem();		newItem.nodeInst = pla.makePin(arrayCell, x, y+6, 6, pla.mpCon);		if (newItem.nodeInst == null) return true;		// connect to last GATE object		PortProto lastColPort;		if (pla.rowList[row][0].lastitem.nodeInst.getProto() != pla.nmosOne)			lastColPort = pla.rowList[row][0].lastitem.nodeInst.getProto().getPort(0); else				lastColPort =  pla.rowList[row][0].lastitem.nodeInst.getProto().findPortProto("GATE.p.e");		PortProto nodeColPort = newItem.nodeInst.getProto().getPort(0);		pla.makeWire(pla.pArc, 0, pla.rowList[row][0].lastitem.nodeInst, lastColPort, newItem.nodeInst, nodeColPort, arrayCell);		pla.rowList[row][0].lastitem = newItem;		// Now export port at beginning and end of this half of the row grouping		PortProto pp = pla.rowList[row][0].firstItem.nodeInst.getProto().getPort(0);		PortInst pi = pla.rowList[row][0].firstItem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2) + ".m-1.w");		pp = pla.rowList[row][0].lastitem.nodeInst.getProto().getPort(0);		pi = pla.rowList[row][0].lastitem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2) + ".m-1.e");		pp = pla.rowList[row][0].firstItem.nodeInst.getProto().getPort(0);		pi = pla.rowList[row][0].firstItem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2) + ".p.w");		pp = pla.rowList[row][0].lastitem.nodeInst.getProto().getPort(0);		pi = pla.rowList[row][0].lastitem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2) + ".p.e");		newItem = new PLA.UCItem();		newItem.nodeInst = pla.makePin(arrayCell, x, y-4, 6, pla.mpCon);		if (newItem.nodeInst == null) return true;		// connect to last GATE object		if (pla.rowList[row][2].lastitem.nodeInst.getProto() != pla.nmosOne)			lastColPort = pla.rowList[row][2].lastitem.nodeInst.getProto().getPort(0); else				lastColPort =  pla.rowList[row][2].lastitem.nodeInst.getProto().findPortProto("GATE.p.e");		nodeColPort = newItem.nodeInst.getProto().getPort(0);		pla.makeWire(pla.pArc, 0, pla.rowList[row][2].lastitem.nodeInst, lastColPort, newItem.nodeInst, nodeColPort, arrayCell);		pla.rowList[row][2].lastitem = newItem;		pp = pla.rowList[row][2].firstItem.nodeInst.getProto().getPort(0);		pi = pla.rowList[row][2].firstItem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2 + 1) + ".m-1.w");		pp = pla.rowList[row][2].lastitem.nodeInst.getProto().getPort(0);		pi = pla.rowList[row][2].lastitem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2 + 1) + ".m-1.e");		pp = pla.rowList[row][2].firstItem.nodeInst.getProto().getPort(0);		pi = pla.rowList[row][2].firstItem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2 + 1) + ".p.w");		pp = pla.rowList[row][2].lastitem.nodeInst.getProto().getPort(0);		pi = pla.rowList[row][2].lastitem.nodeInst.findPortInstFromProto(pp);		Export.newInstance(arrayCell, pi, "ACCESS" + (row * 2 + 1) + ".p.e");		return false;	}	private boolean nmosInitColumns(int width, int x, int y, int xOffset, Cell arrayCell)	{		int gndCnt = 0;		for (int i = 0; i < width; i++)		{			pla.columnList[i].firstItem = new PLA.UCItem();			pla.columnList[i].lastitem =  pla.columnList[i].firstItem;			// put in a Ground  pin every 5th position			String name;			if ((i % 5) == 0)			{				name = "GND" + gndCnt + ".m-1.n";				pla.columnList[i].firstItem.nodeInst = pla.makePin(arrayCell,					xOffset * i + x, y, 14, pla.mwBut);				if (pla.columnList[i].firstItem.nodeInst == null) return true;				gndCnt++;			} else			{				// must be a data pin, don't count ground pins				name = "DATA" + (i - gndCnt) + ".m-1.n";				pla.columnList[i].firstItem.nodeInst = pla.makePin(arrayCell, xOffset * i + x, y, 4, pla.m1Pin);				if (pla.columnList[i].firstItem.nodeInst == null) return true;			}			PortProto pp = pla.columnList[i].firstItem.nodeInst.getProto().getPort(0);			PortInst pi = pla.columnList[i].firstItem.nodeInst.findPortInstFromProto(pp);			Export.newInstance(arrayCell, pi, name);		}		return false;	}	private boolean nmosInitRows(int heightIn, int x, int y, int yOffset, int yMOffset, Cell arrayCell)	{		int limit = (heightIn/2) + (heightIn % 2);		for (int i = 0; i < limit; i++)		{			if (((i % 2) == 0) && (i != 0)) y -= yOffset;			PLA.UCItem newItem = new PLA.UCItem();			// put in Substrate contact first			newItem.nodeInst = pla.makePin(arrayCell, x, y-yMOffset+10, 14, pla.mwBut);			if (newItem.nodeInst == null) return true;			// wire in the first ground strap			PortProto nodeColPort = newItem.nodeInst.getProto().getPort(0);			PortProto lastColPort = pla.columnList[0].lastitem.nodeInst.getProto().getPort(0);			// connect to last column object			pla.makeWire(pla.m1Arc, 4, pla.columnList[0].lastitem.nodeInst, lastColPort, newItem.nodeInst, nodeColPort, arrayCell);			// only put this in a column list			pla.columnList[0].lastitem.bottomItem = newItem;			pla.columnList[0].lastitem = pla.columnList[0].lastitem.bottomItem;			pla.rowList[i][0].firstItem = new PLA.UCItem();			pla.rowList[i][0].lastitem =  pla.rowList[i][0].firstItem;			pla.rowList[i][1].firstItem = new PLA.UCItem();			pla.rowList[i][1].lastitem =  pla.rowList[i][1].firstItem;			pla.rowList[i][2].firstItem = new PLA.UCItem();			pla.rowList[i][2].lastitem =  pla.rowList[i][2].firstItem;			pla.rowList[i][0].firstItem.nodeInst = pla.makePin(arrayCell, x-7, y-5, 6, pla.mpCon);			if (pla.rowList[i][0].firstItem.nodeInst == null) return true;			pla.rowList[i][1].firstItem.nodeInst = pla.makePin(arrayCell, x, y-yMOffset, 14, pla.maCon);			if (pla.rowList[i][1].firstItem.nodeInst == null) return true;			pla.rowList[i][2].firstItem.nodeInst = pla.makePin(arrayCell, x-7, y-15, 6, pla.mpCon);			if (pla.rowList[i][2].firstItem.nodeInst == null) return true;			// wire in the first ground strap			nodeColPort = pla.rowList[i][1].firstItem.nodeInst.getProto().getPort(0);			lastColPort = pla.columnList[0].lastitem.nodeInst.getProto().getPort(0);			// connect to last column object			pla.makeWire(pla.m1Arc, 4, pla.columnList[0].lastitem.nodeInst, lastColPort, pla.rowList[i][1].lastitem.nodeInst, nodeColPort, arrayCell);			pla.columnList[0].lastitem.bottomItem = pla.rowList[i][1].lastitem;			pla.columnList[0].lastitem = pla.columnList[0].lastitem.bottomItem;			y -= 2*yOffset;		}		return false;	}	private boolean finishColumns(int width, int x, int y, int xOffset, Cell arrayCell)	{		int gndCnt = 0;		for (int i = 0; i < width; i++)		{			PLA.UCItem newItem = new PLA.UCItem();			// put in a Ground  pin every 5th position			String name;			PortProto lastColPort;			if ((i % 5) == 0)			{				name = "GND" + gndCnt + ".m-1.s";				newItem.nodeInst = pla.makePin(arrayCell, xOffset*i+x, y, 14, pla.mwBut);				if (newItem.nodeInst == null) return true;				lastColPort = pla.columnList[i].lastitem.nodeInst.getProto().getPort(0);				gndCnt++;			} else			{				// must be a data pin, don't count ground pins				name = "DATA" + (i - gndCnt) + ".m-1.s";				newItem.nodeInst = pla.makePin(arrayCell, xOffset * i + x, y, 4, pla.m1Pin);				if (newItem.nodeInst == null) return true;				if (pla.columnList[i].lastitem.nodeInst.getProto() != pla.nmosOne)					lastColPort = pla.columnList[i].lastitem.nodeInst.getProto().getPort(0); else						lastColPort = pla.columnList[i].lastitem.nodeInst.getProto().findPortProto("OUT.m-1.n");			}			// wire in the first ground strap			PortProto nodeColPort = newItem.nodeInst.getProto().getPort(0);			// connect to last column object			pla.makeWire(pla.m1Arc, 4, pla.columnList[i].lastitem.nodeInst, lastColPort, newItem.nodeInst, nodeColPort, arrayCell);			// only put this in a column list			pla.columnList[i].lastitem.bottomItem = newItem;			pla.columnList[i].lastitem = pla.columnList[i].lastitem.bottomItem;			PortInst pi = newItem.nodeInst.findPortInstFromProto(newItem.nodeInst.getProto().getPort(0));			Export.newInstance(arrayCell, pi, name);		}		return false;	}}

⌨️ 快捷键说明

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