m8pple / arch2-2019-cw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load Delay Slot Inquiry

opened this issue · comments

Is it the simulators responsibility to ensure that the requirements of the load delay slot are met, or do we need to make sure our simulator checks that the condition is met?

You need to support the delay slot in the sense that the semantics must be preserved (see #11).

If you're asking whether your Simulator needs to detect whether the Binary does something undefined
(like a branch in the delay slot), then you are free to do whatever you want, including doing the
"correct" or "natural" thing. No test-bench can say what should happen if the Binary has undefined
behaviour, so it is not actually possible to test it. This is similar to the situation with mfhi from #15.

Ah, or maybe you do mean the load-delay in MIPS-1 (so before hazard detection was added)? The
behaviour is again undefined, so the same reasoning applies.