Ejemplo n.º 1
0
        /*private void SetInitPoint()
        {
            for (int i = 0; i < processNode.arcCollection.Count; i++)
            {
                trace.SetContact(Params.FromSimpleToCont(processNode.arcCollection[i].GetHigherPoint(0)), processNode.name, i, 0);
                trace.SetContact(Params.FromSimpleToCont(processNode.arcCollection[i].GetLowerPoint(0)), processNode.name, i, 0);
            }
        }*/
        private void SetStartPriority(TraceGlobe trace)
        {
            List<NodeDistanceBase> lst = nodeDistanceDict.Values.ToList();

            lst.Sort(NodeDistanceBase.CompareBaseByDist);
            int countNd = lst.Count;

            //bestHighPrior = lst.First().name;
            trace.SetHighPriority(lst.First().name);

            int curPrior = Params.maxPriority;

            foreach (NodeDistanceBase disBase in lst)//Node curNode in nodeList)
            {
                processNode = trace.GetNodeByName(disBase.name);

                if (diffusionExcep.FindIndex(el => el == processNode.name) >= 0)
                    SetStartVccGndConnections(curPrior);
                else
                {
                    //List<int> markedPin = new List<int>();
                    for (int i = 0; i < processNode.arcCollection.Count; i++)
                    {
                        int idx = nodeDistanceDict[processNode.name].GetNumber(i);
                        ContactSimple cnt = processNode.arcCollection[i];

                        //List<Contact> sours = trace.GetSourceContacts(processNode.arcCollection[i])

                        trace.SetPinSource(trace.GetSourceContacts(processNode.arcCollection[i], processNode.name));

                        bool notOpposite = true;
                        for (int j = i + 1; j < processNode.arcCollection.Count; j++)
                        {
                            if (processNode.arcCollection[i].x == processNode.arcCollection[j].x)
                            {
                                //trace.SetLine(new LineStruct(processNode.arcCollection[i].GetInDiffusionEdge(), processNode.arcCollection[j].GetInDiffusionEdge()),
                                //	          processNode.name, curPrior, idx, true);
                                trace.SetStartLine(processNode.arcCollection[i], processNode.arcCollection[j],
                                                   processNode.name, curPrior, idx);

                                trace.SetContact(processNode.arcCollection[i].GetInDiffusionEdge(), processNode.name, idx, curPrior, 0);

                                List<ContactSimple> startWave = new List<ContactSimple>();
                                startWave.Add( new ContactSimple(processNode.arcCollection[i].GetInDiffusionEdge()) );
                                NodePointProcess proc = new NodePointProcess(0, curPrior, idx, false);
                                trace.CompleteSpreadWaveProcess(startWave, proc);//SpreadWaveProcess

                                notOpposite = false;
                            }
                        }

                        if (notOpposite)//markedPin.FindIndex(el => el == i) < 0)
                        {
                            trace.SetContact(processNode.arcCollection[i].GetInDiffusionEdge(), processNode.name, idx, curPrior, 0);
                            /*trace.SetPinContact(Params.FromSimpleToCont(processNode.arcCollection[i].GetHigherPoint(0)),
                                                processNode.name, idx, curPrior);
                            trace.SetPinContact(Params.FromSimpleToCont(processNode.arcCollection[i].GetLowerPoint(0)),
                                                processNode.name, idx, curPrior);*/
                        }
                    }
                }
                curPrior--;
            }
        }
Ejemplo n.º 2
0
        private void SpreadUsed(Node nd)
        {
            NodeTraces curTrace = new NodeTraces();

            List<int> fixedConnection = new List<int>();
            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);
                    int curStart = curList.Min();
                    currentConnection.Add(curStart);

                    foreach (int curEnd in curList)
                    {
                        if (currentConnection.FindIndex(el => el == curEnd) < 0) //(curStart != curEnd)
                        {
                            int numbFixedWith = nodeDistanceDict[nd.name].GetFixedPointTo(curEnd);
                            if ((numbFixedWith >= 0))
                                fixedConnection.Add(curEnd);
                                //curTrace.AddTrace(RecoveryFixedPath(nd.arcCollection[curEnd], nd.name));

                            if (numbFixedWith != curStart)
                            {
                                NodeTraces recPath = RecoveryUnicPath(curTrace.lines, nd.arcCollection[curEnd],
                                                           nd.arcCollection[curStart], nd.name);

                                if ((numbFixedWith >= 0) && (recPath.lines.Count > 0) &&
                                    (recPath.lines.FindIndex(el => (el.type != Material.na_ && el.type != Material.pa_)) >= 0) )
                                {
                                    currentConnection.Add(numbFixedWith);
                                }
                                curTrace.AddTrace(recPath);
                            }
                            currentConnection.Add(curEnd);//!!!!!!!
                        }
                    }
                }
            }
            foreach(int curEnd in fixedConnection)
                curTrace.AddTrace(RecoveryFixedPath(nd.arcCollection[curEnd], nd.name));

            SetUsed(curTrace);
        }
Ejemplo n.º 3
0
        //List<Node> inPlaceNodes)
        public void InitAllDistances(System.IO.StreamWriter file)
        {
            foreach (Node curNode in trace.GetNodeList())
            {
                processNode = curNode;
                InitOneNodeConts();
                //SetInitPoint();
            }

            SetStartPriority(trace);
            trace.SetReplace();

            //trace.PrintNumb();

            trace.PrintMap(Layers.metal1Trace, file);
            trace.PrintMap(Layers.siliconTrace, file);
            //if (Params.IsModelBusM1InMiddle())
            {
                trace.PrintMap(Layers.metal2Trace, file);
                trace.PrintNumbM2(-1, file);
            }
            trace.PrintMap(Layers.contactTrace, file);
            trace.PrintNumb(-1, file);
        }
Ejemplo n.º 4
0
        /*
        private NodeTraces GetNodeTrace_old(Node nd, System.IO.StreamWriter file)//better
        {
            NodeTraces allNodeTrace = new NodeTraces();

            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);
                    int curStart = curList.Min();

                    if (nd.name == "VCC")
                    {
                        //PrintUsed(0, file);
                        PrintNumb(0, file);
                    }

                    foreach (int curEnd in curList)
                    {
                        if (curStart != curEnd)
                        {
                            NodeTraces curTrace = new NodeTraces();

                            int numbFixedWith = nodeDistanceDict[nd.name].GetFixedPointTo(curEnd);
                            if ((numbFixedWith >= 0) && (currentConnection.FindIndex(el => el == numbFixedWith) >= 0))
                                curTrace.AddTrace(RecoveryFixedPath(nd.arcCollection[curEnd], nd.name));
                            else
                                curTrace.AddTrace(RecoveryPath(nd.arcCollection[curEnd],
                                                           nd.arcCollection[curStart], nd.name));
                            currentConnection.Add(curEnd);

                            //SetUsed(curTrace);

                            //ReplaceUnused procRemove = new ReplaceUnused(0, GetPoint(startPoint).priority, false);
                            //SpreadWaveProcess(startPoint, procRemove);

                            allNodeTrace.AddTrace(curTrace);
                        }
                    }

                    if (nd.name == "VCC")
                    {
                        PrintUsed(0, file);
                        //PrintNumb(0, file);
                    }
                }
            }
            return allNodeTrace;
        }*/
        private NodeTraces GetNodeTrace(Node nd, System.IO.StreamWriter file)
        {
            SetAllUnused();

            NodeTraces allNodeTrace = new NodeTraces();
            //NodeTraces extraNodeTrace = new NodeTraces();

            List<ContactSimple> inters = new List<ContactSimple>();
            inters.Add(nd.arcCollection[0]);
            //List<LineStruct> lines = new List<LineStruct>();
            //if (diffusionException.FindIndex(nameUnit => nameUnit == nd.name) >= 0)
            //	allNodeTrace.lines.Add( GetFixedLine(inters, inters[0].layer, nd.name) );

            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);
                    int curStart = curList.Min();

                    foreach (int curEnd in curList)
                    {
                        if (curStart != curEnd)
                        {
                            //NodeTraces curTrace = new NodeTraces();

                            int numbFixedWith = nodeDistanceDict[nd.name].GetFixedPointTo(curEnd);
                            if ((curStart == numbFixedWith) && (diffusionException.FindIndex(nameUnit => nameUnit == nd.name) >= 0))
                                allNodeTrace.AddTrace(RecoveryFixedPath(nd.arcCollection[curEnd], nd.name));
                            else
                                allNodeTrace.AddTrace(RecoveryUnicPath(allNodeTrace.lines, nd.arcCollection[curEnd],
                                                           nd.arcCollection[curStart], nd.name));
                            currentConnection.Add(curEnd);

                            //allNodeTrace.AddTrace(curTrace);
                        }
                    }
                }
            }

            //allNodeTrace.DefineCrossContacts(this);
            //allNodeTrace.AddTrace(extraNodeTrace);

            return allNodeTrace;
        }