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

📄 sunroutertab.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: SunRouterTab.java * * Copyright (c) 2006 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.user.dialogs.options;import com.sun.electric.database.text.TextUtils;import com.sun.electric.tool.routing.Routing;import java.awt.Frame;import javax.swing.JPanel;/** * Class to handle the "SunRouter" tab of the Preferences dialog. */public class SunRouterTab extends PreferencePanel{	/** Creates new form SunRouterTab */	public SunRouterTab(Frame parent, boolean modal)	{		super(parent, modal);		initComponents();	}	/** return the panel to use for this preferences tab. */	public JPanel getPanel() { return sunRouter; }	/** return the name of this preferences tab. */	public String getName() { return "Sun Router"; }	/**	 * Method called at the start of the dialog.	 * Caches current values and displays them in the Skill tab.	 */	public void init()	{		if (!Routing.hasSunRouter())		{			// global routing			horizTileSize.setEnabled(false);			vertTileSize.setEnabled(false);			horizBitSize.setEnabled(false);			vertBitSize.setEnabled(false);			cutLineDeviation.setEnabled(false);			verbosityCombo.setEnabled(false);			// capacity			pinFactor.setEnabled(false);			oneTileFactor.setEnabled(false);			windowSize.setEnabled(false);			// ripup			delta.setEnabled(false);			overloadLimit.setEnabled(false);			costLimit.setEnabled(false);			// layer assignment			tilesPerLongNet.setEnabled(false);			tilesPerMedNet.setEnabled(false);			layerAssignCapF.setEnabled(false);			longNetLength.setEnabled(false);			medNetLength.setEnabled(false);			unassignedPinDensityF.setEnabled(false);			// detail routing			wireOffset.setEnabled(false);			wireModulo.setEnabled(false);			wireBlockageFactor.setEnabled(false);			ripupMaximum.setEnabled(false);			ripupPenalty.setEnabled(false);			ripupExpansion.setEnabled(false);			zRipupExpansion.setEnabled(false);			ripupSearches.setEnabled(false);			globalPathExpansion.setEnabled(false);			sourceAccessExpansion.setEnabled(false);			sinkAccessExpansion.setEnabled(false);			denseViaAreaSize.setEnabled(false);			retryExpandRouting.setEnabled(false);			retryDenseViaAreaSize.setEnabled(false);			pathSearchControl.setEnabled(false);			sparseViaModulo.setEnabled(false);			lowPathSearchCost.setEnabled(false);			mediumPathSearchCost.setEnabled(false);			highPathSearchCost.setEnabled(false);			takenPathSearchCost.setEnabled(false);		} else		{			// global routing			horizTileSize.setText("" + Routing.getSunRouterXTileSize());			vertTileSize.setText("" + Routing.getSunRouterYTileSize());			horizBitSize.setText("" + Routing.getSunRouterXBitSize());			vertBitSize.setText("" + Routing.getSunRouterYBitSize());			cutLineDeviation.setText("" + Routing.getSunRouterCutlineDeviation());			verbosityCombo.setSelectedIndex(Routing.getSunRouterVerboseLevel());			// capacity			pinFactor.setText("" + Routing.getSunRouterPinFactor());			oneTileFactor.setText("" + Routing.getSunRouterOneTileFactor());			windowSize.setText("" + Routing.getSunRouterWindow());			// ripup			delta.setText("" + Routing.getSunRouterDelta());			overloadLimit.setText("" + Routing.getSunRouterOverloadLimit());			costLimit.setText("" + Routing.getSunRouterCostLimit());			// layer assignment			tilesPerLongNet.setText("" + Routing.getSunRouterTilesPerPinLongNet());			tilesPerMedNet.setText("" + Routing.getSunRouterTilesPerPinMedNet());			layerAssignCapF.setText("" + Routing.getSunRouterLayerAssgnCapF());			longNetLength.setText("" + Routing.getSunRouterLengthLongNet());			medNetLength.setText("" + Routing.getSunRouterLengthMedNet());			unassignedPinDensityF.setText("" + Routing.getSunRouterUPinDensityF());			// detail routing			wireOffset.setText("" + Routing.getSunRouterWireOffset());			wireModulo.setText("" + Routing.getSunRouterWireModulo());			wireBlockageFactor.setText("" + Routing.getSunRouterWireBlockageFactor());			ripupMaximum.setText("" + Routing.getSunRouterRipUpMaximum());			ripupPenalty.setText("" + Routing.getSunRouterRipUpPenalty());			ripupExpansion.setText("" + Routing.getSunRouterRipUpExpansion());			zRipupExpansion.setText("" + Routing.getSunRouterZRipUpExpansion());			ripupSearches.setText("" + Routing.getSunRouterRipUpSearches());			globalPathExpansion.setText("" + Routing.getSunRouterGlobalPathExpansion());			sourceAccessExpansion.setText("" + Routing.getSunRouterSourceAccessExpansion());			sinkAccessExpansion.setText("" + Routing.getSunRouterSinkAccessExpansion());			denseViaAreaSize.setText("" + Routing.getSunRouterDenseViaAreaSize());			retryExpandRouting.setText("" + Routing.getSunRouterRetryExpandRouting());			retryDenseViaAreaSize.setText("" + Routing.getSunRouterRetryDenseViaAreaSize());			pathSearchControl.setText("" + Routing.getSunRouterPathSearchControl());			sparseViaModulo.setText("" + Routing.getSunRouterSparseViaModulo());			lowPathSearchCost.setText("" + Routing.getSunRouterLowPathSearchCost());			mediumPathSearchCost.setText("" + Routing.getSunRouterMediumPathSearchCost());			highPathSearchCost.setText("" + Routing.getSunRouterHighPathSearchCost());			takenPathSearchCost.setText("" + Routing.getSunRouterTakenPathSearchCost());		}	}	/**	 * Method called when the "OK" panel is hit.	 * Updates any changed fields in the Skill tab.	 */	public void term()	{		double newDValue;		int newIValue;		// global routing		newIValue = TextUtils.atoi(horizTileSize.getText());		if (newIValue != Routing.getSunRouterXTileSize()) Routing.setSunRouterXTileSize(newIValue);		newIValue = TextUtils.atoi(vertTileSize.getText());		if (newIValue != Routing.getSunRouterYTileSize()) Routing.setSunRouterYTileSize(newIValue);		newIValue = TextUtils.atoi(horizBitSize.getText());		if (newIValue != Routing.getSunRouterXBitSize()) Routing.setSunRouterXBitSize(newIValue);		newIValue = TextUtils.atoi(vertBitSize.getText());		if (newIValue != Routing.getSunRouterYBitSize()) Routing.setSunRouterYBitSize(newIValue);		newDValue = TextUtils.atof(cutLineDeviation.getText());		if (newDValue != Routing.getSunRouterCutlineDeviation()) Routing.setSunRouterCutlineDeviation(newDValue);		newIValue = verbosityCombo.getSelectedIndex();		if (newIValue != Routing.getSunRouterVerboseLevel()) Routing.setSunRouterVerboseLevel(newIValue);				// capacity		newIValue = TextUtils.atoi(pinFactor.getText());		if (newIValue != Routing.getSunRouterPinFactor()) Routing.setSunRouterPinFactor(newIValue);		newDValue = TextUtils.atof(oneTileFactor.getText());		if (newDValue != Routing.getSunRouterOneTileFactor()) Routing.setSunRouterOneTileFactor(newDValue);		newIValue = TextUtils.atoi(windowSize.getText());		if (newIValue != Routing.getSunRouterWindow()) Routing.setSunRouterWindow(newIValue);		// ripup		newDValue = TextUtils.atof(delta.getText());		if (newDValue != Routing.getSunRouterDelta()) Routing.setSunRouterDelta(newDValue);		newIValue = TextUtils.atoi(overloadLimit.getText());		if (newIValue != Routing.getSunRouterOneTileFactor()) Routing.setSunRouterOverloadLimit(newIValue);		newDValue = TextUtils.atof(costLimit.getText());		if (newDValue != Routing.getSunRouterCostLimit()) Routing.setSunRouterCostLimit(newDValue);		// layer assignment		newDValue = TextUtils.atof(tilesPerLongNet.getText());		if (newDValue != Routing.getSunRouterTilesPerPinLongNet()) Routing.setSunRouterTilesPerPinLongNet(newDValue);		newDValue = TextUtils.atof(tilesPerMedNet.getText());		if (newDValue != Routing.getSunRouterTilesPerPinMedNet()) Routing.setSunRouterTilesPerPinMedNet(newDValue);		newDValue = TextUtils.atof(layerAssignCapF.getText());		if (newDValue != Routing.getSunRouterLayerAssgnCapF()) Routing.setSunRouterLayerAssgnCapF(newDValue);		newDValue = TextUtils.atof(longNetLength.getText());		if (newDValue != Routing.getSunRouterLengthLongNet()) Routing.setSunRouterLengthLongNet(newDValue);		newDValue = TextUtils.atof(medNetLength.getText());		if (newDValue != Routing.getSunRouterLengthMedNet()) Routing.setSunRouterLengthMedNet(newDValue);		newIValue = TextUtils.atoi(overloadLimit.getText());		if (newIValue != Routing.getSunRouterOverloadLimit()) Routing.setSunRouterOverloadLimit(newIValue);		newDValue = TextUtils.atof(unassignedPinDensityF.getText());		if (newDValue != Routing.getSunRouterUPinDensityF()) Routing.setSunRouterUPinDensityF(newDValue);		// detail routing		newIValue = TextUtils.atoi(wireOffset.getText());		if (newIValue != Routing.getSunRouterWireOffset()) Routing.setSunRouterWireOffset(newIValue);		newIValue = TextUtils.atoi(wireModulo.getText());		if (newIValue != Routing.getSunRouterWireModulo()) Routing.setSunRouterWireModulo(newIValue);		newDValue = TextUtils.atof(wireBlockageFactor.getText());		if (newDValue != Routing.getSunRouterWireBlockageFactor()) Routing.setSunRouterWireBlockageFactor(newDValue);		newIValue = TextUtils.atoi(ripupMaximum.getText());		if (newIValue != Routing.getSunRouterRipUpMaximum()) Routing.setSunRouterRipUpMaximum(newIValue);		newIValue = TextUtils.atoi(ripupPenalty.getText());		if (newIValue != Routing.getSunRouterRipUpPenalty()) Routing.setSunRouterRipUpPenalty(newIValue);		newIValue = TextUtils.atoi(ripupExpansion.getText());		if (newIValue != Routing.getSunRouterRipUpExpansion()) Routing.setSunRouterRipUpExpansion(newIValue);		newIValue = TextUtils.atoi(zRipupExpansion.getText());		if (newIValue != Routing.getSunRouterZRipUpExpansion()) Routing.setSunRouterZRipUpExpansion(newIValue);		newIValue = TextUtils.atoi(ripupSearches.getText());		if (newIValue != Routing.getSunRouterRipUpSearches()) Routing.setSunRouterRipUpSearches(newIValue);		newIValue = TextUtils.atoi(globalPathExpansion.getText());		if (newIValue != Routing.getSunRouterGlobalPathExpansion()) Routing.setSunRouterGlobalPathExpansion(newIValue);		newIValue = TextUtils.atoi(sourceAccessExpansion.getText());		if (newIValue != Routing.getSunRouterSourceAccessExpansion()) Routing.setSunRouterSourceAccessExpansion(newIValue);		newIValue = TextUtils.atoi(sinkAccessExpansion.getText());		if (newIValue != Routing.getSunRouterSinkAccessExpansion()) Routing.setSunRouterSinkAccessExpansion(newIValue);		newIValue = TextUtils.atoi(denseViaAreaSize.getText());		if (newIValue != Routing.getSunRouterDenseViaAreaSize()) Routing.setSunRouterDenseViaAreaSize(newIValue);		newIValue = TextUtils.atoi(retryExpandRouting.getText());		if (newIValue != Routing.getSunRouterRetryExpandRouting()) Routing.setSunRouterRetryExpandRouting(newIValue);		newIValue = TextUtils.atoi(retryDenseViaAreaSize.getText());		if (newIValue != Routing.getSunRouterRetryDenseViaAreaSize()) Routing.setSunRouterRetryDenseViaAreaSize(newIValue);		newIValue = TextUtils.atoi(pathSearchControl.getText());		if (newIValue != Routing.getSunRouterPathSearchControl()) Routing.setSunRouterPathSearchControl(newIValue);		newIValue = TextUtils.atoi(sparseViaModulo.getText());		if (newIValue != Routing.getSunRouterSparseViaModulo()) Routing.setSunRouterSparseViaModulo(newIValue);		newIValue = TextUtils.atoi(lowPathSearchCost.getText());		if (newIValue != Routing.getSunRouterLowPathSearchCost()) Routing.setSunRouterLowPathSearchCost(newIValue);		newIValue = TextUtils.atoi(mediumPathSearchCost.getText());		if (newIValue != Routing.getSunRouterMediumPathSearchCost()) Routing.setSunRouterMediumPathSearchCost(newIValue);		newIValue = TextUtils.atoi(highPathSearchCost.getText());		if (newIValue != Routing.getSunRouterHighPathSearchCost()) Routing.setSunRouterHighPathSearchCost(newIValue);		newIValue = TextUtils.atoi(takenPathSearchCost.getText());		if (newIValue != Routing.getSunRouterTakenPathSearchCost()) Routing.setSunRouterTakenPathSearchCost(newIValue);	}	/**	 * Method called when the factory reset is requested.	 */	public void reset()	{		// global routing		if (Routing.getFactorySunRouterXTileSize() != Routing.getSunRouterXTileSize())			Routing.setSunRouterXTileSize(Routing.getFactorySunRouterXTileSize());		if (Routing.getFactorySunRouterYTileSize() != Routing.getSunRouterYTileSize())			Routing.setSunRouterYTileSize(Routing.getFactorySunRouterYTileSize());		if (Routing.getFactorySunRouterXBitSize() != Routing.getSunRouterXBitSize())			Routing.setSunRouterXBitSize(Routing.getFactorySunRouterXBitSize());		if (Routing.getFactorySunRouterYBitSize() != Routing.getSunRouterYBitSize())			Routing.setSunRouterYBitSize(Routing.getFactorySunRouterYBitSize());		if (Routing.getFactorySunRouterCutlineDeviation() != Routing.getSunRouterCutlineDeviation())			Routing.setSunRouterCutlineDeviation(Routing.getFactorySunRouterCutlineDeviation());		if (Routing.getFactorySunRouterVerboseLevel() != Routing.getSunRouterVerboseLevel())			Routing.setSunRouterVerboseLevel(Routing.getFactorySunRouterVerboseLevel());		// capacity		if (Routing.getFactorySunRouterPinFactor() != Routing.getSunRouterPinFactor())			Routing.setSunRouterPinFactor(Routing.getFactorySunRouterPinFactor());		if (Routing.getFactorySunRouterOneTileFactor() != Routing.getSunRouterOneTileFactor())			Routing.setSunRouterOneTileFactor(Routing.getFactorySunRouterOneTileFactor());		if (Routing.getFactorySunRouterWindow() != Routing.getSunRouterWindow())			Routing.setSunRouterWindow(Routing.getFactorySunRouterWindow());		// ripup		if (Routing.getFactorySunRouterDelta() != Routing.getSunRouterDelta())			Routing.setSunRouterDelta(Routing.getFactorySunRouterDelta());		if (Routing.getFactorySunRouterOverloadLimit() != Routing.getSunRouterOverloadLimit())			Routing.setSunRouterOverloadLimit(Routing.getFactorySunRouterOverloadLimit());		if (Routing.getFactorySunRouterCostLimit() != Routing.getSunRouterCostLimit())			Routing.setSunRouterCostLimit(Routing.getFactorySunRouterCostLimit());		// layer assignment		if (Routing.getFactorySunRouterTilesPerPinLongNet() != Routing.getSunRouterTilesPerPinLongNet())

⌨️ 快捷键说明

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