Previous - Up - Next

SIM_instruction_begin()

NAME
SIM_instruction_begin — begin an instruction

SYNOPSIS
instruction_id_t 
SIM_instruction_begin(conf_object_t *cpu);

DESCRIPTION
In the Micro Architectural Interface instructions passing through the processor pipeline are identified by an instruction id. This function creates a new id and allocates the necessary data structures to handle the instruction. All the API functions referring to the instruction will take the instruction id as a parameter.

To assign the id to a particular instruction in memory, you should speculate on the program counter input register with SIM_instruction_write_input_reg. Instructions should also be linked together to form execution paths, see SIM_instruction_instert for details.

Instructions are deallocated by SIM_instruction_end.

EXCEPTIONS
General Thrown if the pre-allocated space for the instruction queue which is set by the processor attribute reorder_buffer_size is full.
RETURN VALUE
A new instruction id.
SEE ALSO
SIM_instruction_insert, SIM_instruction_proceed, SIM_instruction_end

Previous - Up - Next