Previous - Up - Next

SIM_instruction_speculative()

NAME
SIM_instruction_speculative — check if speculative instruction

SYNOPSIS
int
SIM_instruction_speculative(instruction_id_t ii);

DESCRIPTION
Note: this function was previously called SIM_instruction_wrong_path.

This function check whether an instruction will execute or has executed using speculative input, i.e. the instruction may give incorrect result if committed. Speculative input can be used to model branch and value prediction, see SIM_instruction_write_input_reg and SIM_instruction_write_output_reg for a description on how to write speculative data.

ii is the id of the instruction to check,

EXCEPTIONS
Index Thrown if ii is illegal.
RETURN VALUE
Returns 1 for executing with speculative input, otherwise 0.

Previous - Up - Next