Example #1
0
    static public void Init_All()
    {
        Intl  = true;
        Clock = Nbub = 0;
        Program.Renew(Control.States.SAOK);
        Excute.Updata_CC(true, false, false);
        Fetch.Updata(0);
        Decode.Updata(Control.States.SAOK, Control.Codes.INOP, 0, Control.Registers.RNONE, Control.Registers.RNONE, 0, 0);
        Excute.Updata(Control.States.SAOK, Control.Codes.INOP, 0, 0, 0, 0, Control.Registers.RNONE, Control.Registers.RNONE, Control.Registers.RNONE, Control.Registers.RNONE);
        Memory.Updata(Control.States.SAOK, Control.Codes.INOP, 0, false, 0, 0, Control.Registers.RNONE, Control.Registers.RNONE);
        Write_back.Updata(Control.States.SAOK, Control.Codes.INOP, 0, 0, 0, Control.Registers.RNONE, Control.Registers.RNONE);
        Program.Renew(Control.States.SAOK);

        Decode.Init_Reg();
        Memory.Init_Mem();

        Run.ck = false;
        Read_ys.Init();

        Control.Init();
        BreakControl.Init();

        Display.nlog++;
        StreamWriter sw = new StreamWriter(@"./log.out", false);

        sw.Close();
//        print("?");
    }
Example #2
0
 void OnGUI()
 {
     if (Input.anyKeyDown)
     {
         Event e = Event.current;
         if (e.isKey)
         {
             currentKey = e.keyCode;
             string s = currentKey.ToString();
             if (s == "F10")
             {
                 Next.F10();
             }
             if (s == "F11")
             {
                 Step.F11();
             }
             if (s == "F9")
             {
                 Run.F9();
             }
             if (s == "F6")
             {
                 BreakControl.F6();
             }
             if (s == "F5")
             {
                 Reset.F5();
             }
         }
     }
 }
Example #3
0
    static public void Step()
    {
//       print(Fetch.Show_F_predPC().ToString("X2"));
//        print(((int)Write_back.Show_W_state()).ToString("X2"));
        if (state == Control.States.SAOK)
        {
            Control.Work();
            Updata.Work();
            Write_back.Work();
            Memory.Work();
            Excute.Work();
            Decode.Work();
            Fetch.Work();
            Display.Shown_Log();
            BreakControl.Jmp_Break();
        }
//        print(Fetch.Show_F_predPC().ToString("X2"));
//        print(((int)Write_back.Show_W_state()).ToString("X2"));
//        print("-------------------------------------------");
    }