Scoreboarding - The Algorithm

The Algorithm

The detailed algorithm for the scoreboard control is described below:

function issue(op, dst, src1, src2) wait until (!Busy AND !Result); // FU can be any functional unit that can execute operation op Busy ← Yes; Op ← op; Fidst; Fjsrc1; Fksrc2; Qj ← Result; Qk ← Result; Rj ← not Qj; Rk ← not Qk; Result ← FU; function read_operands(FU) wait until (Rj AND Rk); Rj ← No; Rk ← No; function execute(FU) // Execute whatever FU must do function write_back(FU) wait until (f {(Fj≠Fi OR Rj=No) AND (Fk≠Fi OR Rk=No)}) foreach f do if Qj=FU then Rj ← Yes; if Qk=FU then Rk ← Yes; Result] ← 0; Busy ← No;

Read more about this topic:  Scoreboarding