arm_avic arm_cpu_group_event
API Reference Manual  /  4 Model-to-Model Interfaces  / 

arm_coprocessor

Description
A coprocessor for the ARM has to provide the arm_coprocessor_interface. This interface defines the functions that will be called when the coprocessor instructions (cdp, ldc, mcr, mrc, mrrc, mcrr, stc) are executed.

The read_register_64_bit and write_register_64_bit are used for mrrc and mccr instructions which read and write 64 bit values in to two registers.

The interface also defines a flag, finished, which indicates whether a memory transfer operation is finished or not.

The function reset is called when the cpu is reset, and allows the coprocessor to also do a reset, the argument hard_reset indicates whether the reset was soft (0) or hard (1).

SIM_INTERFACE(arm_coprocessor) {
        void (*process_data)(conf_object_t *NOTNULL obj,
                             uint32 CRd,
                             uint32 opcode_1,
                             uint32 CRn,
                             uint32 CRm,
                             uint32 opcode_2,
                             int type);
        void (*load_coprocessor)(conf_object_t *NOTNULL obj,
                                 uint32 CRd,
                                 uint32 N,
                                 uint32 Options,
                                 uint32 value,
                                 int type);

        uint32 (*read_register)(conf_object_t *NOTNULL obj,
                                uint32 opcode_1,
                                uint32 CRn,
                                uint32 CRm,
                                uint32 opcode_2,
                                int type);
        void (*write_register)(conf_object_t *NOTNULL obj,
                               uint32 value,
                               uint32 opcode_1,
                               uint32 CRn,
                               uint32 CRm,
                               uint32 opcode_2,
                               int type);
        uint64 (*read_register_64_bit)(conf_object_t *NOTNULL obj,
                                       uint32 opcode_1,
                                       uint32 CRm,
                                       int type);
        void (*write_register_64_bit)(conf_object_t *NOTNULL obj,
                                      uint64 value,
                                      uint32 opcode_1,
                                      uint32 CRm,
                                      int type);
        uint32 (*store_coprocessor)(conf_object_t *NOTNULL obj,
                               uint32 CRd,
                               uint32 N,
                               uint32 Options,
                               int type);
        void (*reset)(conf_object_t *NOTNULL obj, int hard_reset);
};

#define ARM_COPROCESSOR_INTERFACE "arm_coprocessor"

Execution Context
Cell Context for all methods.

arm_avic arm_cpu_group_event