static public void Work() { F_stall = D_stall = E_stall = false; // F_bubble = D_bubble = E_bubble = false; W_bubble = M_bubble; M_bubble = E_bubble; E_bubble = D_bubble; D_bubble = F_bubble; F_bubble = false; bool ld = false, rt = false, wj = false; if ((Excute.Show_E_icode() == Codes.IMRMOVQ || Excute.Show_E_icode() == Codes.IPOPQ) && (Excute.Show_E_dstM() == Decode.Show_d_srcA() || Excute.Show_E_dstM() == Decode.Show_d_srcB())) { ld = true; } if ((Excute.Show_E_icode() == Codes.IRET) || (Memory.Show_M_icode() == Codes.IRET) || (Decode.Show_D_icode() == Codes.IRET)) { rt = true; } if (!Excute.Show_e_Cnd() && Excute.Show_e_icode() == Codes.IJXX) { wj = true; } if (ld && !rt) { F_stall = D_stall = E_bubble = true; //LOAD_USE } if (rt && !ld) { F_stall = D_bubble = true; //RET } if (wj) { E_bubble = D_bubble = true; //WRONG_JXX } if (ld && rt) { E_bubble = D_stall = F_stall = true; //LOAD_USE && RET } }
static void Updata_Memory() { Memory.Updata(Excute.Show_e_state(), Excute.Show_e_icode(), Excute.Show_e_ifun(), Excute.Show_e_Cnd(), Excute.Show_e_valE(), Excute.Show_e_valA(), Excute.Show_e_dstE(), Excute.Show_e_dstM()); }