示例#1
0
 public void runClockDomain() {
   for (int i = 0; i < ends.length; i++) {
     ends[i] = 0;
     tdone[i] = 0;
   }
   RUN:
   while (true) {
     switch (S590) {
       case 0:
         S590 = 0;
         break RUN;
       case 1:
         S590 = 2;
         breakme_1.setClear();
         thread780702821(tdone, ends);
         thread778394328(tdone, ends);
         int biggest778009579 = 0;
         if (ends[2] >= biggest778009579) {
           biggest778009579 = ends[2];
         }
         if (ends[3] >= biggest778009579) {
           biggest778009579 = ends[3];
         }
         if (biggest778009579 == 1) {
           active[1] = 1;
           ends[1] = 1;
           break RUN;
         }
       case 2:
         breakme_1.setClear();
         thread779163825(tdone, ends);
         thread789167297(tdone, ends);
         int biggest787243552 = 0;
         if (ends[2] >= biggest787243552) {
           biggest787243552 = ends[2];
         }
         if (ends[3] >= biggest787243552) {
           biggest787243552 = ends[3];
         }
         if (biggest787243552 == 1) {
           active[1] = 1;
           ends[1] = 1;
           break RUN;
         }
         // FINXME code
         if (biggest787243552 == 0) {
           System.err.println("Packet sent.");
           S590 = 0;
           active[1] = 0;
           ends[1] = 0;
           S590 = 0;
           break RUN;
         }
     }
   }
 }
示例#2
0
 public void run() {
   while (active[1] != 0) {
     int index = 1;
     if (paused[index] == 1 || suspended[index] == 1 || active[index] == 0) {
       for (int h = 1; h < paused.length; ++h) {
         paused[h] = 0;
       }
     }
     if (paused[1] != 0 || suspended[1] != 0 || active[1] != 1) ;
     else {
       reset1_o.update_w_r();
       data1_o.update_w_r();
       if (!df) {
         reset1_o.gethook();
         data1_o.gethook();
         df = true;
       }
       Native.count(((0x1 << 25) | 0x7));
       runClockDomain();
       Native.count(0x7);
       Native.count(((0x1 << 25) | (0x1 << 26) | 0x7));
       int eot = Native.hc(0x0);
       int fmc = Native.hc(0x1);
       int mmc = Native.hc(0x2);
       int foc = Native.hc(0x3);
       int moc = Native.hc(0x4);
       // System.err.println("VAL apsCD1,"+(++tick)+","+(eot)+","+fmc+","+mmc+","+foc+","+moc);
       Native.count((0x7 | (0x1 << 26)));
     }
     breakme_1.setpreclear();
     int dummyint = 0;
     for (int qw = 0; qw < currsigs.size(); ++qw) {
       dummyint =
           ((Signal) currsigs.elementAt(qw)).getStatus()
               ? ((Signal) currsigs.elementAt(qw)).setprepresent()
               : ((Signal) currsigs.elementAt(qw)).setpreclear();
       ((Signal) currsigs.elementAt(qw)).setpreval(((Signal) currsigs.elementAt(qw)).getValue());
     }
     currsigs.removeAllElements();
     breakme_1.setClear();
     reset1_o.sethook();
     data1_o.sethook();
     if (paused[1] != 0 || suspended[1] != 0 || active[1] != 1) ;
     else {
       reset1_o.gethook();
       data1_o.gethook();
     }
     if (active[1] == 0) {
       System.out.println("Finished CD");
     }
     if (!threaded) break;
   }
 }