processor_cli processor_gui
API Reference Manual  /  5 Model-to-Simulator Interfaces  / 

processor_endian

Description
This interface is used for retrieving endianness and amends to the processor_info_v2 interface.

Many modern processors support mixed endian as well as separate data and instruction endianness. This interface reports endianness separately for data and instructions dynamically, not just the default as for the processor_info_v2. Previously endianness has been static, with only one endianness. With newer ARM processors this may cause issues for some Big Endian use cases since Little Endian is assumed throughout. Primarily due to the fact that they can have separate data and instruction endianness. Modifying the existing processor_info_v2 easily gets complicated due to dependencies, so a new interface processor_endian was created.

The processor_endian_interface_t interface can be implemented by processors models and returns the current endianness of the system.

The function get_instruction_endian returns the active instruction endianness of the processor.

The function get_data_endian returns endianness of data.

SIM_INTERFACE(processor_endian) {
        cpu_endian_t (*get_instruction_endian)(conf_object_t *obj);
        cpu_endian_t (*get_data_endian)(conf_object_t *obj);
};

#define PROCESSOR_ENDIAN_INTERFACE "processor_endian"

Execution Context
get_instruction_endianCell Context
get_data_endianCell Context

processor_cli processor_gui