#![allow(non_camel_case_types)]
use strum_macros::EnumIter;

/// Offsets for MSM user logic core.
#[derive(Debug, Copy, Clone, EnumIter)]
pub enum INGO_MSM_ADDR {
    // MSM_RGF_BASEADDR = 0x0,
    ADDR_HIF2CPU_C_IMAGE_ID = 0x0,
    ADDR_HIF2CPU_C_IMAGE_PARAMTERS = 0x4,
    ADDR_HIF2CPU_C_MSM_ENGINE_READY = 0x8,
    ADDR_HIF2CPU_C_MSM_TASK_LABEL = 0xc,
    ADDR_CPU2HIF_C_BASES_HBM_START_ADDRESS_LO = 0x10,
    ADDR_CPU2HIF_C_BASES_HBM_START_ADDRESS_HI = 0x14,
    ADDR_CPU2HIF_C_BASES_SOURCE = 0x18,
    ADDR_CPU2HIF_C_COEFFICIENTS_HBM_START_ADDRESS_LO = 0x1c,
    ADDR_CPU2HIF_C_COEFFICIENTS_HBM_START_ADDRESS_HI = 0x20,
    ADDR_CPU2HIF_C_COEFFICIENTS_SOURCE = 0x24,
    ADDR_CPU2HIF_C_NUMBER_OF_MSM_ELEMENTS = 0x28,
    ADDR_CPU2HIF_E_PUSH_MSM_TASK_TO_QUEUE = 0x2c,
    ADDR_HIF2CPU_C_RESULT_VALID = 0x30,
    ADDR_HIF2CPU_C_RESULT_LABEL = 0x34,
    ADDR_HIF2CPU_C_RESULT = 0x38,
    ADDR_CPU2HIF_E_POP_RESULT = 0xc8,
    ADDR_HIF2CPU_C_NOF_PENDING_TASKS_IN_QUEUE = 0xcc,
    ADDR_HIF2CPU_C_NOF_PENDING_RESULTS_IN_QUEUE = 0xd0,
    ADDR_CPU2HIF_C_OPTIMIZATIONS = 0xd4,
    ADDR_HIF2CPU_C_TASK_IN_FINAL_ACCUMULATION_PHASE = 0xd8,
    ADDR_HIF2CPU_C_NOF_ELEMENTS_LEFT_IN_CURRENT_TASK = 0xdc,
    ADDR_AXI2CPU_C_NUMBER_OF_COEFFICIENTS_IN_AXI_DMA_FIFO = 0xe0,
    ADDR_AXI2CPU_C_NUMBER_OF_BASES_IN_AXI_DMA_FIFO = 0xe4,
    ADDR_AXI2CPU_C_NUMBER_OF_COEFFICIENTS_IN_AXI_HBM_FIFO = 0xe8,
    ADDR_AXI2CPU_C_NUMBER_OF_BASES_IN_AXI_HBM_FIFO = 0xec,
    ADDR_HIF2CPU_E_BUCKET_ACCUMULATION_PHASE_COMPLETED = 0xf0,
    ADDR_HIF2CPU_E_FINAL_ACCUMULATION_PHASE_COMPLETED = 0xf4,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_TOTAL_CLOCKS_LO = 0xf8,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_TOTAL_CLOCKS_HI = 0xfc,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_BUSY_ECADDER_CLOCKS_LO = 0x100,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_BUSY_ECADDER_CLOCKS_HI = 0x104,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE2_TOTAL_CLOCKS_LO = 0x108,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE2_TOTAL_CLOCKS_HI = 0x10c,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE2_BUSY_ECADDER_CLOCKS_LO = 0x110,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE2_BUSY_ECADDER_CLOCKS_HI = 0x114,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE3_TOTAL_CLOCKS_LO = 0x118,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE3_TOTAL_CLOCKS_HI = 0x11c,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE3_BUSY_ECADDER_CLOCKS_LO = 0x120,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE3_BUSY_ECADDER_CLOCKS_HI = 0x124,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_COEFFICIENTS_FIFO_BUSY_CLOCKS_LO = 0x128,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_COEFFICIENTS_FIFO_BUSY_CLOCKS_HI = 0x12c,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_COEFFICIENTS_FIFO_NOF_EMPTY_LO = 0x130,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_COEFFICIENTS_FIFO_NOF_EMPTY_HI = 0x134,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_BASES_FIFO_BUSY_CLOCKS_LO = 0x138,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_BASES_FIFO_BUSY_CLOCKS_HI = 0x13c,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_BASES_FIFO_NOF_EMPTY_LO = 0x140,
    ADDR_HIF2CPU_C_LAST_TASK_PHASE1_BASES_FIFO_NOF_EMPTY_HI = 0x144,
}

impl From<INGO_MSM_ADDR> for u64 {
    fn from(addr: INGO_MSM_ADDR) -> Self {
        addr as u64
    }
}
