示例#1
0
 public void AddNamedPins(List <ContactNamed> inCts)
 {
     foreach (ContactNamed cnt in inCts)
     {
         Node fndNode = nodeList.Find(nd => nd.name == cnt.namePoint);
         if (diffusionException.FindIndex(name => name == cnt.namePoint) < 0 && fndNode != null)
         {
             ContactSimple smpl = new ContactSimple(cnt);
             smpl.SetInOut();
             fndNode.arcCollection.Add(smpl);
         }
     }
 }
示例#2
0
        private void InitGndVccConts()
        {
            int lay = Layers.metal1Trace;

            if (Params.IsModelBusM2InMiddle())
            {
                lay = Layers.metal2Trace;
            }

            ContactSimple busStart = new ContactSimple(Params.leftEdge, Params.VccPosition, lay);
            ContactSimple busEnd   = new ContactSimple(wide - 1, Params.VccPosition, lay);

            if (processNode.name == Params.GndName)
            {
                busStart.y = Params.GndPosition;
                busEnd.y   = Params.GndPosition;
            }
            busEnd.SetInOut();
            busStart.SetInOut();
            processNode.arcCollection.Insert(0, busEnd);
            processNode.arcCollection.Insert(0, busStart);

            int idxLast = processNode.arcCollection.Count;
            NodeDistanceBase dictUnit = new NodeDistanceBase(idxLast, processNode.name);

            for (int i = 0; i < idxLast; i++)
            {
                for (int j = i + 1; j < idxLast; j++)
                {
                    bool connected       = true;
                    bool fixedConnection = false;
                    if (i == 0 && j == 1)
                    {
                        fixedConnection = true;
                    }

                    if (i != j)
                    {
                        dictUnit.AddDistance(i, j, LineStruct.Distance(processNode.arcCollection[i],
                                                                       processNode.arcCollection[j]), connected, fixedConnection);
                    }
                }
            }

            if (idxLast > 1)
            {
                nodeDistanceDict.Add(processNode.name, dictUnit);
            }
        }