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_Excute() { if (!Control.Show_E_bubble() && !Control.Show_E_stall()) { Excute.Updata(Decode.Show_d_state(), Decode.Show_d_icode(), Decode.Show_d_ifun(), Decode.Show_d_valC(), Decode.Show_d_valA(), Decode.Show_d_valB(), Decode.Show_d_dstE(), Decode.Show_d_dstM(), Decode.Show_d_srcA(), Decode.Show_d_srcB()); } if (Control.Show_E_bubble()) { Excute.Updata(Control.States.SAOK, Control.Codes.INOP, 0, 0, 0, 0, Control.Registers.RNONE, Control.Registers.RNONE, Control.Registers.RNONE, Control.Registers.RNONE); } }