public static int CompareHist(Transistors.HistoryTrans x, Transistors.HistoryTrans y) { if (x.countNode > y.countNode) return -1; else if (x.countNode == y.countNode) return 0; return 1; }
public void TestMethod() { // TODO: Add your test. Transistors trs = new Transistors(); trs.setNode("nd1"); trs.addTrans("tr1", "MBREAKN_NORMAL"); Dictionary<string, TrUnit> dic1 = trs.getListN(); Assert.AreEqual(7, dic1.Count); }
public void TestMethod() { // TODO: Add your test. Transistors trs = new Transistors(); trs.setNode("nd1"); trs.addTrans("tr1", "MBREAKN_NORMAL"); Dictionary <string, TrUnit> dic1 = trs.getListN(); Assert.AreEqual(7, dic1.Count); }
void Taste() { int retCount; Expect(3); result = 1; transList = new Transistors(); if (la.kind == 1 || la.kind == 10) { EdfBody(out retCount); } Expect(4); }
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"); }
/// <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"); } }
public static void Main(string[] args) { string edfName = "d_trig"; //"adder";//"ha_2tg"; edfName = edfName.Split('.')[0]; Scanner scanner = new Scanner(edfName + ".edf"); //xor2v8_1 adder Parser parser = new Parser(scanner); parser.Parse(); Transistors tr = parser.transList; Console.WriteLine("Transistors:"); tr.PortsReport(); DateTime start1 = System.DateTime.Now; int countVars = tr.PlaceTransN(); tr.ChooseTransNSet(0); tr.PlaceTransP(); tr.PortsLinesReport(); tr.InitTransistors(); DateTime start2 = System.DateTime.Now; TimeSpan sp1 = start2 - start1; double delta1 = ((double)((int)sp1.TotalMilliseconds)) / 1000.0; Console.WriteLine("placing = " + delta1 + " seconds"); int curModel = Params.ModelBusM2InMiddle; Params.SetModel(curModel); string vlfName = edfName + "_" + Params.GetShortName(curModel); //CompileOneModel(vlfName, tr); CompileTransLines(vlfName, tr); }
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"); }