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("?"); }
static void Updata_Write_back() { if (Control.Show_W_bubble()) { Nbub++; } Write_back.Updata(Memory.Show_m_state(), Memory.Show_m_icode(), Memory.Show_m_ifun(), Memory.Show_m_valE(), Memory.Show_m_valM(), Memory.Show_m_dstE(), Memory.Show_m_dstM()); }