In pipeline simulator exercise, it says that:
Traversing the stages in backwards order simplifies the instruction flow through the pipeline.
Also, in gpgpu-sim source code, the stages are reversed (line 2442
):
void shader_core_ctx::cycle()
{
m_stats->shader_cycles[m_sid]++;
writeback();
execute();
read_operands();
issue();
decode();
fetch();
}
Why? What problem it solves? Can anyone elaborate a bit or give a pointer to books/papers on this particular "trick"?
Many thanks!