Ejemplo n.º 1
0
        private void ClearTracedPath(System.IO.StreamWriter file)
        {
            List<NodeDistanceBase> lst = nodeDistanceDict.Values.ToList();
            lst.Sort(NodeDistanceBase.CompareBaseByDist);

            foreach (NodeDistanceBase disBase in lst)
            {
                if (disBase.IsTraced())
                {
                    //bool b;
                    //if (disBase.name  == "INC")
                    //	b = true;
                    /*if (AddingSpace(disBase.name) == "61113")
                    {
                        b = false;
                        PrintMap(Layers.metal1Trace, file);
                        PrintMap(Layers.siliconTrace, file);
                        PrintMap(Layers.metal2Trace, file);
                    }*/
                    CheckOnePoint();

                    Node curNode = nodeList.Find(el => el.name == disBase.name);
                    List<ContactSimple> startPoint = FindStartPoint(curNode.arcCollection[0], disBase.name);
                    //GetPoint(startPoint).number = 0;
                    SetContactNumber(startPoint, 0);
                    NodePointProcess proc = new NodePointProcess(GetPoint(startPoint[0]), false);
                    CompleteSpreadWaveProcess(startPoint, proc);

                    CheckOnePoint();
                    SpreadUsed(curNode);

                    /*if (disBase.name  == "N6861401")//"N6859613")//"N6861401")
                    {
                        file.WriteLine("!!!-----------check numb N6861401-------------------");
                        PrintMap(Layers.metal1Trace, file);
                        PrintMap(Layers.siliconTrace, file);
                        PrintNumb(-2, file);
                        PrintUsed(-2, file);
                        file.WriteLine("!!!-----------end check numb N6861401-------------------");
                    }
                    //
                    if (disBase.name  == "INY")
                    {
                        file.WriteLine("!!!-----------check used INY-------------------");
                        PrintMap(Layers.metal1Trace, file);
                        PrintMap(Layers.siliconTrace, file);
                        PrintUsed(-2, file);
                        file.WriteLine("!!!-----------end used INY-------------------");
                    }*/
                    CheckOnePoint();

                    ReplaceUnused procRemove = new ReplaceUnused(GetPoint(startPoint[0]), false);
                    CompleteSpreadWaveProcessRem(startPoint, procRemove);

                    CheckOnePoint();
                }
            }

            //inFile.WriteLine("");
        }
Ejemplo n.º 2
0
        //private void
        /*private void FillUnused()
        {
            for (int x = 0; x < wide; x++)
            {
                for (int y = 0; y < Params.topEdge; y++)
                {
                    if ( !layoutMap[x][y][Layers.metal1Trace].isUsed )
                    {
                        SetContact(new ContactSimple(x,y,Layers.metal1Trace), Material.blankName, 0, 0, -1);
                        layoutMap[x][y][Layers.metal1Trace].isReplace = true;
                    }
                    if ( !layoutMap[x][y][Layers.siliconTrace].isUsed &&
                        (layoutMap[x][y][Layers.siliconTrace].name != Material.diffusionName) )
                    {
                        SetContact(new ContactSimple(x,y,Layers.siliconTrace), Material.blankName, 0, 0, -1);
                        layoutMap[x][y][Layers.metal1Trace].isReplace = true;
                    }
                }
            }
        }*/
        /*public void ClearForAlign_old()
        {
            foreach (Node nd in nodeList)
                SpreadUsed(nd);
            SetUsedForUntraced();

            foreach (Node nd in nodeList)
            {
                List<int> currentConnection = new List<int>();
                for (int i = 0; i < nd.arcCollection.Count; i++)
                {
                    if (currentConnection.FindIndex(el => el == i) < 0)
                    {
                        List<int> curList = nodeDistanceDict[nd.name].GetConnectedPoints(i);
                        //ContactSimple startPoint = new ContactSimple(nd.arcCollection[i]);
                        List<ContactSimple> startPoints = FindStartPoint(nd.arcCollection[i], nd.name);

                        SetContactNumber(startPoints, 0);
                        ReplaceUnused procRemove = new ReplaceUnused(GetPoint(startPoints[0]), false);
                        int count = SpreadWaveProcess(startPoints, procRemove);
                        nodeDistanceDict[nd.name].SetCountForNumber(i, count);

                        currentConnection.AddRange(curList);
                    }
                }
            }
            SetAllUnused();
        }*/
        public void ClearForAlign(System.IO.StreamWriter inFile)
        {
            foreach (Node nd in nodeList)
            {
                if (nodeDistanceDict[nd.name].IsTraced())
                {
                    List<int> currentConnection = new List<int>();
                    for (int i = 0; i < nd.arcCollection.Count; i++)
                    {
                        if (currentConnection.FindIndex(el => el == i) < 0)
                        {
                            List<int> curList = nodeDistanceDict[nd.name].GetConnectedPoints(i);
                            List<ContactSimple> startPoints = FindStartPoint(nd.arcCollection[i], nd.name);
                            SetContactNumber(startPoints, 0);
                            //ReplaceUnused procRemove = new ReplaceUnused(0, GetPoint(startPoint).priority, false);
                            NodePointProcess proc = new NodePointProcess(GetPoint(startPoints[0]), false);
                            int count = CompleteSpreadWaveProcess(startPoints, proc);
                            nodeDistanceDict[nd.name].SetCountForNumber(i, count);

                            currentConnection.AddRange(curList);
                        }
                    }
                }
            }

            CheckOnePoint();
            foreach (Node nd in nodeList)
            {
                if (nodeDistanceDict[nd.name].IsTraced())
                    SpreadUsed(nd);
            }
            CheckOnePoint();
            //SetUsedForUntraced();

            CheckOnePoint();

            foreach (Node nd in nodeList)
            {
                if (nodeDistanceDict[nd.name].IsTraced())
                {
                    List<int> currentConnection = new List<int>();
                    for (int i = 0; i < nd.arcCollection.Count; i++)
                    {
                        if (currentConnection.FindIndex(el => el == i) < 0)
                        {
                            List<int> curList = nodeDistanceDict[nd.name].GetConnectedPoints(i);
                            //ContactSimple startPoint = new ContactSimple(nd.arcCollection[i]);
                            List<ContactSimple> startPoints = FindStartPoint(nd.arcCollection[i], nd.name);

                            SetContactNumber(startPoints, 0);
                            ReplaceUnused procRemove = new ReplaceUnused(GetPoint(startPoints[0]), false);
                            int count = CompleteSpreadWaveProcessRem(startPoints, procRemove);
                            //if (CheckOnePoint())
                            //	CompleteSpreadWaveProcessRem(startPoints, procRemove);

                            nodeDistanceDict[nd.name].SetCountForNumber(i, count);

                            currentConnection.AddRange(curList);

                        }
                    }
                }
            }
            CheckOnePoint();
            SetAllUnused();
        }