Knowing when instructions are Speculative
EVERY packet type (ipacket, CRSpacket, ROBpacket, epacket, rpacket) has a new flag called ‘spec_flag’.
- Is TRUE if instruction is speculative, FALSE otherwise
What is ‘speculative’?
- The spec_flag of an instruction is set to TRUE by the FETCH block if under speculative execution (firstctx /= lastctx) when the instruction is sent to the DRR. The context value of the instruction is set equal to the latest context value (lastctx)
- At ANY time, if an instruction’s context value becomes equal to firstctx, then the instruction is NON-speculative.
- A spec_flag can only change from TRUE (speculative) to FALSE (nonspeculative).