Ejemplo n.º 1
0
        public void InitTransistors(List<string> inPlacedN, List<string> inPlacedP)
        {
            wide = inPlacedN.Count*2 + Params.leftBorder + Params.rightBorder;//+8
            criticAmountH = (wide*Params.topEdge*2)/3; // 33%

            layoutMap = new NodePoint[wide][][];
            for (int i = 0; i < wide; i++)
            {
                layoutMap[i] = new NodePoint[Params.topEdge][];
                for (int j = 0; j < Params.topEdge; j++)
                {
                    layoutMap[i][j] = new NodePoint[Layers.count];
                }
            }

            for (int x = 0; x < wide; x++)
            {
                for (int y = 0; y < Params.topEdge; y++)
                {
                    layoutMap[x][y][Layers.contactTrace] = new NodePoint(blank);
                }
            }

            SetBlank();
            SetBlankForContact(inPlacedN, inPlacedP);
            SetBlankForSilicon(inPlacedN, inPlacedP);
        }
Ejemplo n.º 2
0
        public void InitTransistors(List <string> inPlacedN, List <string> inPlacedP)
        {
            wide          = inPlacedN.Count * 2 + Params.leftBorder + Params.rightBorder; //+8
            criticAmountH = (wide * Params.topEdge * 2) / 3;                              // 33%

            layoutMap = new NodePoint[wide][][];
            for (int i = 0; i < wide; i++)
            {
                layoutMap[i] = new NodePoint[Params.topEdge][];
                for (int j = 0; j < Params.topEdge; j++)
                {
                    layoutMap[i][j] = new NodePoint[Layers.count];
                }
            }

            for (int x = 0; x < wide; x++)
            {
                for (int y = 0; y < Params.topEdge; y++)
                {
                    layoutMap[x][y][Layers.contactTrace] = new NodePoint(blank);
                }
            }

            SetBlank();
            SetBlankForContact(inPlacedN, inPlacedP);
            SetBlankForSilicon(inPlacedN, inPlacedP);
        }
Ejemplo n.º 3
0
 //int inNumber, int inPrior
 public NodePointProcess( NodePoint inNode, bool inUsed)
 {
     curNumber = inNode.number;
     priority = inNode.priority;
     nodeNumber = inNode.numberNode;
     isUsed = inUsed;
 }
Ejemplo n.º 4
0
 public NodePointProcess(NodePoint inNode, bool inUsed)         //int inNumber, int inPrior
 {
     curNumber  = inNode.number;
     priority   = inNode.priority;
     nodeNumber = inNode.numberNode;
     isUsed     = inUsed;
 }
Ejemplo n.º 5
0
        public void SetLine(LineStruct inLine, string inName, int priority, int ndNumber, bool makeFixed)
        {
            int       layer   = inLine.type;
            NodePoint ndPoint = new NodePoint(inName, priority, ndNumber);

            if (inLine.Height > 0)
            {
                for (int y = inLine.Bottom; y <= inLine.Top; y++)
                {
                    bool isSrs = layoutMap[inLine.X][y][layer].isSource;
                    layoutMap[inLine.X][y][layer]          = new NodePoint(ndPoint);
                    layoutMap[inLine.X][y][layer].isSource = isSrs;
                    layoutMap[inLine.X][y][layer].number   = -1;  //change!
                    layoutMap[inLine.X][y][layer].isFixed  = makeFixed;
                }
            }
            if (inLine.Width > 0)
            {
                for (int x = inLine.Left; x <= inLine.Right; x++)
                {
                    bool isSrs = layoutMap[x][inLine.Y][layer].isSource;
                    layoutMap[x][inLine.Y][layer]          = new NodePoint(ndPoint);
                    layoutMap[x][inLine.Y][layer].isSource = isSrs;
                    layoutMap[x][inLine.Y][layer].number   = -1;
                    layoutMap[x][inLine.Y][layer].isFixed  = makeFixed;
                }
            }
        }
Ejemplo n.º 6
0
 public void SetNextCont(NodePoint prevPoint)        //(string inName, int inPrior, int )
 {
     name       = prevPoint.name;
     priority   = prevPoint.priority;
     number     = prevPoint.number + 1;
     numberNode = prevPoint.numberNode;
     isReplace  = false;
 }
Ejemplo n.º 7
0
 public bool IsBestExecept(NodePoint inPnt)
 {
     if (isTraceH && (currentConflict.conflicts.GetNames().FindIndex(el => el == inPnt.name) >= 0))
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 8
0
 public NodePoint(NodePoint inPoint)
 {
     name       = inPoint.name;
     priority   = inPoint.priority;
     number     = inPoint.number;
     isReplace  = inPoint.isReplace;
     isSource   = inPoint.isSource;
     numberNode = inPoint.numberNode;
     isUsed     = false;
     isFixed    = false;
 }
Ejemplo n.º 9
0
 public override void ProcessPoint(NodePoint inPoint)
 {
     if (!inPoint.isUsed)
     {
         inPoint.isReplace  = true;
         inPoint.name       = Material.blankName;
         inPoint.number     = -1;
         inPoint.priority   = 0;
         inPoint.numberNode = 0;
     }
 }
Ejemplo n.º 10
0
 public virtual void ProcessPoint(NodePoint inPoint)
 {
     //if (isSetUnused)
     //	inPoint.isUsed = false;
     //if (isNumber)
     inPoint.number     = curNumber;
     inPoint.isUsed     = isUsed;
     inPoint.priority   = priority;
     inPoint.numberNode = nodeNumber;
     //if (isUsed)
     //    inPoint.isReplace = false;
 }
Ejemplo n.º 11
0
 public TraceGlobe()
 {
     blank = new NodePoint("blank");
     blank.isReplace = true;
     full = new NodePoint("full");
     diffusion = new NodePoint("diffusion");
     //pathSpred = new List<NodePaths>();
     //isTraceH = false;
     stepWithMax = 0;
     conflictManager = new ConflictPolitic();
     diffusionException = new List<string>();
 }
Ejemplo n.º 12
0
 //(string inName, int inPrior, int )
 public void SetNextCont(NodePoint prevPoint)
 {
     name = prevPoint.name;
     priority = prevPoint.priority;
     number = prevPoint.number + 1;
     numberNode = prevPoint.numberNode;
     isReplace = false;
 }
Ejemplo n.º 13
0
 public ReplaceUnused(NodePoint inNode, bool inUsed) : base(inNode, inUsed)
 {
 }
Ejemplo n.º 14
0
 public NodePointLayer(NodePoint inPnt, int inLayer) : base(inPnt)
 {
     layer = inLayer;
 }
Ejemplo n.º 15
0
 public NodePointLayer(NodePoint inPnt, int inLayer, string inName) : base(inPnt)
 {
     name  = inName;
     layer = inLayer;
 }
Ejemplo n.º 16
0
 public override void ProcessPoint(NodePoint inPoint)
 {
     if (!inPoint.isUsed)
     {
         inPoint.isReplace = true;
         inPoint.name = Material.blankName;
         inPoint.number = -1;
         inPoint.priority = 0;
         inPoint.numberNode = 0;
     }
 }
Ejemplo n.º 17
0
 public ReplaceUnused(NodePoint inNode, bool inUsed)
     : base(inNode, inUsed)
 {
 }
Ejemplo n.º 18
0
 public virtual void ProcessPoint(NodePoint inPoint)
 {
     //if (isSetUnused)
     //	inPoint.isUsed = false;
     //if (isNumber)
     inPoint.number = curNumber;
     inPoint.isUsed = isUsed;
     inPoint.priority = priority;
     inPoint.numberNode = nodeNumber;
     //if (isUsed)
     //    inPoint.isReplace = false;
 }
Ejemplo n.º 19
0
 public NodePointLayer(NodePoint inPnt, int inLayer, string inName)
     : base(inPnt)
 {
     name = inName;
     layer = inLayer;
 }
Ejemplo n.º 20
0
 public NodePointLayer(NodePoint inPnt, int inLayer)
     : base(inPnt)
 {
     layer = inLayer;
 }
Ejemplo n.º 21
0
 public bool IsBestExecept(NodePoint inPnt)
 {
     if (isTraceH && (currentConflict.conflicts.GetNames().FindIndex(el => el == inPnt.name) >= 0))
         return true;
     return false;
 }
Ejemplo n.º 22
0
 public void SetLine(LineStruct inLine, string inName, int priority, int ndNumber, bool makeFixed)
 {
     int layer = inLine.type;
     NodePoint ndPoint = new NodePoint(inName, priority, ndNumber);
     if (inLine.Height > 0)
     {
         for (int y = inLine.Bottom; y <= inLine.Top; y++)
         {
             bool isSrs = layoutMap[inLine.X][y][layer].isSource;
             layoutMap[inLine.X][y][layer] = new NodePoint(ndPoint);
             layoutMap[inLine.X][y][layer].isSource = isSrs;
             layoutMap[inLine.X][y][layer].number = -1;//change!
             layoutMap[inLine.X][y][layer].isFixed = makeFixed;
         }
     }
     if (inLine.Width > 0)
     {
         for (int x = inLine.Left; x <= inLine.Right; x++)
         {
             bool isSrs = layoutMap[x][inLine.Y][layer].isSource;
             layoutMap[x][inLine.Y][layer] = new NodePoint(ndPoint);
             layoutMap[x][inLine.Y][layer].isSource = isSrs;
             layoutMap[x][inLine.Y][layer].number = -1;
             layoutMap[x][inLine.Y][layer].isFixed = makeFixed;
         }
     }
 }
Ejemplo n.º 23
0
        private bool SetNextCont(PairInt inChanged, int layerChanged, NodePoint inSample)
        {
            /*bool b = false;
            if (inChanged.x == 33 && (inChanged.y == 16 || inChanged.y == 18) &&
                layerChanged == Layers.metal1Trace && inSample.name != "N6859613")
                b = false;*/

            if (inSample.name == Material.blankName)
                return true;

            string curName = inSample.name;
            List<string> deletedNames = new List<string>();

            ContactSimple curPoint = new ContactSimple(inChanged, layerChanged);
            List<ContactSimple> cntArround = curPoint.GetArroundPoints(wide);

            List<PairInt> cntArea = inChanged.GetBigArround(wide);
            cntArea.Add(inChanged);

            foreach (ContactSimple cntUnit in cntArround)
            {
                string unitName = GetPoint(cntUnit).name;
                if (unitName != curName && unitName!= Material.blankName &&
                    unitName != Material.diffusionName)
                {
                    /*if (cntUnit.x == 33 && (cntUnit.y == 16 || cntUnit.y == 18) &&
                    cntUnit.layer == Layers.metal1Trace)
                        b = false;*/
                    if (deletedNames.FindIndex(el => el == unitName) >= 0)
                    {
                        bool rem = CheckNebors(new ContactSimple(cntUnit, cntUnit.layer));
                        if (!rem)
                        {
                            layoutMap[cntUnit.x][cntUnit.y][cntUnit.layer].isReplace = rem;
                            return false;
                        }
                    }

                    deletedNames.Add(unitName);
                    SetContact(cntUnit, Material.blankName, 0, 0, -1);
                    //cntAdded.Add(cntUnit);
                    if (GetPoint(cntUnit).isSource)
                    {
                        foreach (ContactSimple smp in GetSourceContacts(cntUnit, curName))
                            if (smp != cntUnit)
                                cntArea.Add(smp);
                        //cntArea.Add(GetSourceContacts //GetNearSource(cntUnit));
                    }

                    //List<PairInt> cntForCheck = new List<PairInt>();
                    foreach (ContactSimple cnt in cntUnit.GetNeborPoints(wide))
                    {
                        /*string bn = GetPoint(cnt).name;
                        /*if (cnt.x == 38 && cnt.y == 14 && cnt.layer == 1 && bn != Material.blankName)
                            b = false;*/
                        if ((GetPoint(cnt).name != curName) && (cntArea.FindIndex(el => el == cnt) < 0))
                        {
                            cntArea.Add(cnt);
                            //cntForCheck.Add(cnt);
                        }
                    }
                }
            }

            layoutMap[inChanged.x][inChanged.y][layerChanged].isReplace = false;
            layoutMap[inChanged.x][inChanged.y][layerChanged].name = inSample.name;
            layoutMap[inChanged.x][inChanged.y][layerChanged].numberNode = inSample.numberNode;
            layoutMap[inChanged.x][inChanged.y][layerChanged].priority = inSample.priority;
            layoutMap[inChanged.x][inChanged.y][layerChanged].number = inSample.number;

            foreach (PairInt cntUnit in cntArea)
            {
                foreach (int lay in Params.LayersRange[layerChanged])
                {
                    layoutMap[cntUnit.x][cntUnit.y][lay].isReplace =
                        CheckNebors(new ContactSimple(cntUnit, lay));
                }
                /*bool b;
                if (cntUnit.x == 20 && cntUnit.y == 16)
                    b = true;
                layoutMap[cntUnit.x][cntUnit.y][Layers.metal1Trace].isReplace =
                    CheckNebors(new ContactSimple(cntUnit, Layers.metal1Trace));
                layoutMap[cntUnit.x][cntUnit.y][Layers.siliconTrace].isReplace =
                    CheckNebors(new ContactSimple(cntUnit, Layers.siliconTrace));*/
            }
            return true;
        }
Ejemplo n.º 24
0
        public void AddConnection(NodePoint pnt1, NodePoint pnt2, int inLayer,                    //int idxNumber1, int idxNumber2, int inNumber2,
                                  int inDistance, ConflictParametr param, int count1, int count2) //check repeat
        {
            ConflictNote nt = new ConflictNote();

            nt.name            = pnt1.name;
            nt.number1         = pnt1.numberNode;
            nt.number2         = pnt2.numberNode;
            nt.indexNumber1    = pnt1.number;
            nt.indexNumber2    = pnt2.number;
            nt.conflicts       = param;
            nt.distance        = inDistance;
            nt.priority        = pnt1.priority;
            nt.iterationNumber = 0;
            isBlockade         = false;
            blockadedNumber    = count2;

            if (inLayer == Layers.metal1Trace)
            {
                nt.border1Met  = 1000;
                nt.border1Sil  = 0;
                nt.border2Met  = 0;
                nt.border2Sil  = 0;
                nt.compare1Met = true;
                nt.compare2Met = true;
                nt.compare1Sil = true;
                nt.compare2Sil = true;
            }
            else
            {
                nt.border1Met  = 0;    //pnt1.number;
                nt.border1Sil  = 1000; //pnt1.number;
                nt.border2Met  = 0;    //pnt2.number;
                nt.border2Sil  = 0;    //pnt2.number;
                nt.compare1Met = true;
                nt.compare2Met = true;
                nt.compare1Sil = true;
                nt.compare2Sil = true;
            }

            if ((count1 * 2) < count2)
            {
                blockadedNumber = count1;
                if (inLayer == Layers.metal1Trace)
                {
                    nt.border1Met  = 0;
                    nt.border1Sil  = 0;
                    nt.border2Met  = 1000;
                    nt.border2Sil  = 0;
                    nt.compare1Met = true;
                    nt.compare2Met = true;
                    nt.compare1Sil = true;
                    nt.compare2Sil = true;
                }
                else
                {
                    nt.border1Met  = 0;
                    nt.border1Sil  = 0;
                    nt.border2Met  = 0;
                    nt.border2Sil  = 1000;
                    nt.compare1Met = true;
                    nt.compare2Met = true;
                    nt.compare1Sil = true;
                    nt.compare2Sil = true;
                }
                isBlockade = true;
            }

            if ((count2 * 2) < count1)
            {
                isBlockade = true;
            }

            someConflicts.Add(nt);
        }
Ejemplo n.º 25
0
        private void SetNextCont_old(PairInt inChanged, int layerChanged, NodePoint inSample)
        {
            bool b = false;
            if (inChanged.x == 33 && (inChanged.y == 16 || inChanged.y == 18) &&
                layerChanged == Layers.metal1Trace && inSample.name != "N6859613")
                b = false;

            if (inSample.name == Material.blankName)
                return;
            layoutMap[inChanged.x][inChanged.y][layerChanged].isReplace = false;
            layoutMap[inChanged.x][inChanged.y][layerChanged].name = inSample.name;
            layoutMap[inChanged.x][inChanged.y][layerChanged].numberNode = inSample.numberNode;
            layoutMap[inChanged.x][inChanged.y][layerChanged].priority = inSample.priority;
            layoutMap[inChanged.x][inChanged.y][layerChanged].number = inSample.number;

            string curName = inSample.name;

            ContactSimple curPoint = new ContactSimple(inChanged, layerChanged);
            List<ContactSimple> cntArround = curPoint.GetArroundPoints(wide);

            List<PairInt> cntArea = inChanged.GetBigArround(wide);
            cntArea.Add(inChanged);

            foreach (ContactSimple cntUnit in cntArround)
            {
                string unitName = GetPoint(cntUnit).name;
                if (unitName != curName && unitName!= Material.blankName &&
                    unitName != Material.diffusionName)
                {
                    if (cntUnit.x == 33 && (cntUnit.y == 16 || cntUnit.y == 18) &&
                    cntUnit.layer == Layers.metal1Trace)
                        b = false;
                    SetContact(cntUnit, Material.blankName, 0, 0, -1);
                    //cntAdded.Add(cntUnit);
                    if (GetPoint(cntUnit).isSource)
                    {
                        foreach (ContactSimple smp in GetSourceContacts(cntUnit, curName))
                            if (smp != cntUnit)
                                cntArea.Add(smp);
                        //cntArea.Add(GetSourceContacts //GetNearSource(cntUnit));
                    }

                    foreach (ContactSimple cnt in cntUnit.GetNeborPoints(wide))
                    {
                        string bn = GetPoint(cnt).name;
                        if (cnt.x == 38 && cnt.y == 14 && cnt.layer == 1 && bn != Material.blankName)
                            b = false;
                        if ((GetPoint(cnt).name != curName) && (cntArea.FindIndex(el => el == cnt) < 0))
                            cntArea.Add(cnt);
                    }
                }
            }

            foreach (PairInt cntUnit in cntArea)
            {
                foreach (int lay in Params.LayersRange[layerChanged])
                {
                    layoutMap[cntUnit.x][cntUnit.y][lay].isReplace =
                        CheckNebors(new ContactSimple(cntUnit, lay));
                }
            }
        }
Ejemplo n.º 26
0
 public NodePoint(NodePoint inPoint)
 {
     name = inPoint.name;
     priority = inPoint.priority;
     number = inPoint.number;
     isReplace = inPoint.isReplace;
     isSource = inPoint.isSource;
     numberNode = inPoint.numberNode;
     isUsed = false;
     isFixed = false;
 }
Ejemplo n.º 27
0
        //check repeat
        public void AddConnection(NodePoint pnt1, NodePoint pnt2, int inLayer,//int idxNumber1, int idxNumber2, int inNumber2,
            int inDistance, ConflictParametr param, int count1, int count2)
        {
            ConflictNote nt = new ConflictNote();
            nt.name = pnt1.name;
            nt.number1 = pnt1.numberNode;
            nt.number2 = pnt2.numberNode;
            nt.indexNumber1 = pnt1.number;
            nt.indexNumber2 = pnt2.number;
            nt.conflicts = param;
            nt.distance = inDistance;
            nt.priority = pnt1.priority;
            nt.iterationNumber = 0;
            isBlockade = false;
            blockadedNumber = count2;

            if (inLayer == Layers.metal1Trace)
            {
                nt.border1Met = 1000;
                nt.border1Sil = 0;
                nt.border2Met = 0;
                nt.border2Sil = 0;
                nt.compare1Met = true;
                nt.compare2Met = true;
                nt.compare1Sil = true;
                nt.compare2Sil = true;
            }
            else
            {
                nt.border1Met = 0;//pnt1.number;
                nt.border1Sil = 1000;//pnt1.number;
                nt.border2Met = 0;//pnt2.number;
                nt.border2Sil = 0;//pnt2.number;
                nt.compare1Met = true;
                nt.compare2Met = true;
                nt.compare1Sil = true;
                nt.compare2Sil = true;
            }

            if ((count1*2) < count2)
            {
                blockadedNumber = count1;
                if (inLayer == Layers.metal1Trace)
                {
                    nt.border1Met = 0;
                    nt.border1Sil = 0;
                    nt.border2Met = 1000;
                    nt.border2Sil = 0;
                    nt.compare1Met = true;
                    nt.compare2Met = true;
                    nt.compare1Sil = true;
                    nt.compare2Sil = true;
                }
                else
                {
                    nt.border1Met = 0;
                    nt.border1Sil = 0;
                    nt.border2Met = 0;
                    nt.border2Sil = 1000;
                    nt.compare1Met = true;
                    nt.compare2Met = true;
                    nt.compare1Sil = true;
                    nt.compare2Sil = true;
                }
                isBlockade = true;
            }

            if ((count2*2) < count1)
                 isBlockade = true;

            someConflicts.Add(nt);
        }