예제 #1
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);
        }
예제 #2
0
 public ConflictParametr(ConflictParametr inParams)
 {
     conflicts  = new List <string>(inParams.conflicts);
     numbers    = new List <int>(inParams.numbers);
     countConfl = inParams.countConfl;
 }
예제 #3
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);
        }
예제 #4
0
 public ConflictParametr(ConflictParametr inParams)
 {
     conflicts = new List<string>(inParams.conflicts);
     numbers = new List<int>(inParams.numbers);
     countConfl = inParams.countConfl;
 }
예제 #5
0
        private ConflictParametr FindIntersectsComplex(ContactSimple cnt1, ContactSimple cnt2, string inName)
        {
            ConflictParametr names1 = new ConflictParametr();
            ConflictParametr names2 = new ConflictParametr();

            bool name1Fixed = false;
            bool name2Fixed = false;

            /*foreach (PairInt curCnt in GetXConnect(cnt1, cnt2))
            {
                string curName = GetPoint(curCnt, cnt1.layer).name;

                if ((curName != Material.blankName) && (curName != Material.diffusionName) &&
                    (curName != inName))// && (names1.FindIndex(el => el == curName) < 0))
                    names1.AddName(curName, GetPoint(curCnt, cnt1.layer).number);

                if (GetPoint(curCnt, cnt1.layer).isFixed)
                    name1Fixed = true;
            }
            names1.SetCountConfl(names1.GetNameCount());

            if (names1.GetNameCount() < 1)*/
            {
                foreach (PairInt curCnt in GetXConnect(cnt1, cnt2))
                {
                    foreach (PairInt near in curCnt.GetArroundPoints(wide))
                    {
                        string curName = GetPoint(near, cnt1.layer).name;

                        if ((curName != Material.blankName) && (curName != Material.diffusionName) &&
                            (curName != inName))// && (names1.FindIndex(el => el == curName) < 0))
                            names1.AddName(curName, GetPoint(near, cnt1.layer).number);

                        if (GetPoint(near, cnt1.layer).isFixed)
                            name1Fixed = true;
                    }
                }
                names1.SetCountConfl(names1.GetNameCount());
            }

            /*foreach (PairInt curCnt in GetYConnect(cnt1, cnt2))
            {
                string curName = GetPoint(curCnt, cnt1.layer).name;
                int curNumber = GetPoint(curCnt, cnt1.layer).number;

                if ((curName != Material.blankName) && (curName != Material.diffusionName) &&
                    (curName != inName))// && (names1.FindIndex(el => el == curName) < 0))
                    names2.AddName(curName, curNumber);

                if (GetPoint(curCnt, cnt1.layer).isFixed)
                    name2Fixed = true;
            }
            names2.SetCountConfl(names2.GetNameCount());

            if (names2.GetNameCount() < 1)*/
            {
                foreach (PairInt curCnt in GetYConnect(cnt1, cnt2))
                {
                    foreach (PairInt near in curCnt.GetArroundPoints(wide))
                    {
                        string curName = GetPoint(near, cnt1.layer).name;
                        int curNumber = GetPoint(near, cnt1.layer).number;

                        if ((curName != Material.blankName) && (curName != Material.diffusionName) &&
                            (curName != inName))// && (names1.FindIndex(el => el == curName) < 0))
                            names2.AddName(curName, curNumber);

                        if (GetPoint(near, cnt1.layer).isFixed)
                            name2Fixed = true;
                    }
                }
                names2.SetCountConfl(names2.GetNameCount());
            }

            if (((names2.GetCountConfl() < names1.GetCountConfl()) && (!name2Fixed)) || (name1Fixed && !name2Fixed))
                return names2;
            if (!name1Fixed)
                return names1;
            names1.SetCountConfl(-1);
            return names1;
        }
예제 #6
0
 private ConflictParametr OptimizeIntersects(ConflictParametr inConfl)
 {
     ConflictParametr retConfl = new ConflictParametr(inConfl);
     foreach (string oneName in inConfl.GetNames())
     {
         if (!nodeDistanceDict[oneName].IsTraced())
             retConfl.DeleteName(oneName);
     }
     return retConfl;
 }