Previous - Up - Next

4.4   Discarding Instructions

When speculation is used, the CPU model may cause wrong path or otherwise incorrect execution and the effects of these instructions must be discarded. This is done in Simics by calling SIM_instruction_squash on an instruction. This function will remove the instruction and all its descendants from the instruction tree and deallocate the data structures. There is no need to call SIM_instruction_end.

Memory operations that are associated with squashed instructions that have been issued from the consistency controller to the rest of the memory hierarchy will continue as normal, though no values will be written. Memory instruction that have not issued from the consistency controller will simply be removed. Thus from the perspective of the memory hierarchy, memory transactions are either executed completely or not at all.

Previous - Up - Next