Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* -*- tab-width: 4 -*-
*
* Electric(tm) VLSI Design System
*
* File: VerticalRoute.java
*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
*
* 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.routing;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.sun.electric.database.EditingPreferences;
import com.sun.electric.database.ImmutableArcInst;
import com.sun.electric.database.geometry.PolyMerge;
import com.sun.electric.database.hierarchy.Cell;
import com.sun.electric.database.prototype.PortProto;
import com.sun.electric.technology.ArcProto;
import com.sun.electric.technology.PrimitiveNode;
import com.sun.electric.technology.PrimitivePort;
import com.sun.electric.technology.Technology;
import com.sun.electric.technology.technologies.Generic;
import com.sun.electric.tool.user.User;
import com.sun.electric.util.math.EDimension;
/**
* Class to route vertically (in Z direction) between two RouteElements.
* The class is used as following:
*
After creating the object, call specifyRoute() to find a way to connect
* between startRE and endRE RouteElement objects. At this point you may wish to
* use the information about the specified route before actually building the route.
* Right now the only useful information that is exported is the start and end ArcProtos
* used, if not already specified.
*
Once satisfied with the specification, call buildRoute() to create all
* the RouteElements that determine exactly what the route will look like. Note
* that this does not actually create any objects, it just creates a Route, which
* can then be used to create Electric database objects.
*
There are two forms of build route, the first tries to figure out everything
* for you (contact sizes, arc angles), and connects to startRE and endRE if given.
* The second just creates RouteElements from the specification, and you need to give
* it the contact size and arc angle, and it does not connect to startRE or endRE.
*/
public class VerticalRoute {
/** start of the vertical route */ private PortProto startPort;
/** end of the vertical route */ private PortProto endPort;
/** list of arcs and nodes to make route */ private SpecifiedRoute specifiedRoute;
/** list of all valid specified routes */ private List allSpecifiedRoutes;
/** first arc (from startRE) */ private ArcProto startArc;
/** last arct (to endRE) */ private ArcProto endArc;
/** list of contacts to use */ private List contacts;
/** the possible start arcs */ private ArcProto [] startArcs;
/** the possible end arcs */ private ArcProto [] endArcs;
/** if route specification succeeded */ private boolean specificationSucceeded;
private int searchNumber;
private static final int SEARCHLIMIT = 3000;
private static final boolean DEBUG = false;
private static final boolean DEBUGSEARCH = false;
private static final boolean DEBUGTERSE = false;
private static class SpecifiedRoute extends ArrayList