Пример #1
0
        private static void CompileOneModel(string vlfName, Transistors tr)
        {
            ConstructorLayout layout = new ConstructorLayout(tr.GetPlacedTransN(), tr.GetPlacedTransP(), tr.GetNodeList());
            DateTime          start2 = System.DateTime.Now;

            layout.AddContactsFromPRN(vlfName);

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"route.txt"))
            {
                Params.SetAllLayersRange();
                layout.InitAllDistances(file);

                bool isEnd = false;
                int  loop  = 0;

                while ((!isEnd) && loop < 200)    //200
                {
                    Console.WriteLine("step " + loop.ToString());
                    isEnd = layout.RouteLines(file);


                    Console.WriteLine("not routed: " + layout.UntracedCount(file));
                    if (loop < 7)
                    {
                        loop++;
                    }
                    else
                    {
                        loop++;
                    }
                }

                for (int i = 0; i < 1; i++)
                {
                    layout.CorrectTrace(file);
                }


                layout.CreateTopFile(file);
                layout.CreateFile(vlfName + ".cpp", vlfName);
            }

            DateTime end2   = System.DateTime.Now;
            TimeSpan sp2    = end2 - start2;
            double   delta2 = ((double)((int)sp2.TotalMilliseconds)) / 1000.0;


            Console.WriteLine("routing = " + delta2 + " seconds");
        }
Пример #2
0
        /// <summary>
        /// Compile N and P lines of transistors
        /// </summary>
        /// <param name="name of vlf file"></param>
        /// <param name="transistors tr"></param>
        static void CompileTransLines(string vlfName, Transistors tr)
        {
            ConstructorLayout layout = new ConstructorLayout(tr.GetPlacedTransN(), tr.GetPlacedTransP(), tr.GetNodeList());
            DateTime          start2 = System.DateTime.Now;


            using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"route.txt"))
            {
                Params.SetAllLayersRange();
                layout.InitAllDistances(file);


                layout.CreateTopFile(file);
                layout.CreateFileWithNames(vlfName + "_SMALL" + ".cpp", vlfName + "_SMALL");
            }
        }
Пример #3
0
        /// <summary>
        /// Compile N and P lines of transistors
        /// </summary>
        /// <param name="name of vlf file"></param>
        /// <param name="transistors tr"></param>
        static void CompileTransLines(string vlfName, Transistors tr)
        {
            ConstructorLayout layout = new ConstructorLayout(tr.GetPlacedTransN(), tr.GetPlacedTransP(), tr.GetNodeList());
            DateTime start2 = System.DateTime.Now;

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"route.txt"))
            {
                Params.SetAllLayersRange();
                layout.InitAllDistances(file);

                layout.CreateTopFile(file);
                layout.CreateFileWithNames(vlfName + "_SMALL" + ".cpp", vlfName + "_SMALL");
            }
        }
Пример #4
0
        private static void CompileOneModel(string vlfName, Transistors tr)
        {
            ConstructorLayout layout = new ConstructorLayout(tr.GetPlacedTransN(), tr.GetPlacedTransP(), tr.GetNodeList());
            DateTime start2 = System.DateTime.Now;

            layout.AddContactsFromPRN(vlfName);

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"route.txt"))
            {
                Params.SetAllLayersRange();
                layout.InitAllDistances(file);

                bool isEnd = false;
                int loop = 0;

                while ((!isEnd) && loop < 200)//200
                {
                    Console.WriteLine("step " + loop.ToString());
                    isEnd = layout.RouteLines(file);

                    Console.WriteLine("not routed: " + layout.UntracedCount(file));
                    if (loop < 7)
                        loop++;
                    else
                        loop++;
                }

                for (int i = 0; i < 1; i++)
                {
                    layout.CorrectTrace(file);
                }

                layout.CreateTopFile(file);
                layout.CreateFile(vlfName + ".cpp", vlfName);
            }

            DateTime end2 = System.DateTime.Now;
            TimeSpan sp2 = end2 - start2;
            double delta2 = ((double)((int)sp2.TotalMilliseconds)) / 1000.0;

            Console.WriteLine("routing = " + delta2 + " seconds");
        }