// ***************** mcom02.h ****************************************/ // This file contains mcom02 register map // // (c) OJSC ELVEES, multicore.ru // // *******************************************************************/ #ifndef __MCOM02_H__ #define __MCOM02_H__ #ifdef __cplusplus extern "C" { #endif // CMCTR Registers #define XTI_FREQ 24000000 #define DIV_MPU_CTR *((volatile int *)0x38094004) #define DIV_ATB_CTR *((volatile int *)0x38094008) #define DIV_APB_CTR *((volatile int *)0x3809400C) #define GATE_MPU_CTR *((volatile int *)0x38094014) #define DIV_GPU_CTR *((volatile int *)0x3809402C) #define DIV_DDR0_CTR *((volatile int *)0x38094030) #define DIV_DDR1_CTR *((volatile int *)0x38094034) #define DIV_NFC_CTR *((volatile int *)0x38094038) #define DIV_NOR_CTR *((volatile int *)0x3809403C) #define DIV_SYS0_CTR *((volatile int *)0x38094040) #define DIV_SYS1_CTR *((volatile int *)0x38094044) #define GATE_CORE_CTR *((volatile int *)0x38094048) #define GATE_SYS_CTR *((volatile int *)0x3809404C) #define GATE_DSP_CTR *((volatile int *)0x38094068) #define DIV_CLKOUT *((volatile int *)0x38094084) #define GATE_CLKOUT *((volatile int *)0x38094088) #define LS_ENABLE *((volatile int *)0x38094090) #define SET_APLL *((volatile int *)0x38094100) #define SET_CPLL *((volatile int *)0x38094104) #define SET_DPLL *((volatile int *)0x38094108) #define SET_SPLL *((volatile int *)0x3809410C) #define SET_VPLL *((volatile int *)0x38094110) #define SET_UPLL *((volatile int *)0x38094114) // ICC #define ICC_BASE (0x39000100) #define ICCICR_REG *((volatile int *)(ICC_BASE)) #define ICCPMR_REG *((volatile int *)(ICC_BASE + 0x04)) #define ICCBPR_REG *((volatile int *)(ICC_BASE + 0x08)) #define ICCIAR_REG *((volatile int *)(ICC_BASE + 0x0C)) #define ICCEOIR_REG *((volatile int *)(ICC_BASE + 0x10)) #define ICCRPR_REG *((volatile int *)(ICC_BASE + 0x14)) #define ICCHPIR_REG *((volatile int *)(ICC_BASE + 0x18)) #define ICCABPR_REG *((volatile int *)(ICC_BASE + 0x1C)) #define ICCIIDR_REG *((volatile int *)(ICC_BASE + 0xFC)) // GIC #define GIC_BASE (0x39001000) #define ICDDCR_REG *((volatile int *)(GIC_BASE)) #define ICDICTR_REG *((volatile int *)(GIC_BASE + 0x0004)) #define ICDIIDR_REG *((volatile int *)(GIC_BASE + 0x0008)) #define ICDISR_REG(i) *((volatile int *)(GIC_BASE + 0x0080 + i * 4)) // 0-7 #define ICDISER_REG(i) *((volatile int *)(GIC_BASE + 0x0100 + i * 4)) // 0-7 #define ICDICER_REG(i) *((volatile int *)(GIC_BASE + 0x0180 + i * 4)) // 0-7 #define ICDISPR_REG(i) *((volatile int *)(GIC_BASE + 0x0200 + i * 4)) // 0-7 #define ICDICPR_REG(i) *((volatile int *)(GIC_BASE + 0x0280 + i * 4)) // 0-7 #define ICDABR_REG(i) *((volatile int *)(GIC_BASE + 0x0300 + i * 4)) // 0-7 #define ICDIPR_REG(i) *((volatile int *)(GIC_BASE + 0x0400 + i * 4)) // 0-63 #define ICDIPTR_REG(i) *((volatile int *)(GIC_BASE + 0x0800 + i * 4)) // 0-63 #define ICDICFR_REG(i) *((volatile int *)(GIC_BASE + 0x0C00 + i * 4)) // 0-15 #define ICPPISR_REG *((volatile int *)(GIC_BASE + 0x0D00)) #define ICSPISR_REG(i) *((volatile int *)(GIC_BASE + 0x0D00 + i * 4)) // 1-7 #define ICDSGIR_REG *((volatile int *)(GIC_BASE + 0x0F00)) // MFBSP0 Registers #define TX_MFBSP0 *((volatile int *)0x38086000) #define RX_MFBSP0 *((volatile int *)0x38086000) #define CSR_MFBSP0 *((volatile int *)0x38086004) #define DIR_MFBSP0 *((volatile int *)0x38086008) #define GPIO_DR0 *((volatile int *)0x3808600C) #define TCTR0 *((volatile int *)0x38086010) #define RCTR0 *((volatile int *)0x38086014) #define TSR0 *((volatile int *)0x38086018) #define RSR0 *((volatile int *)0x3808601C) #define TCTR_RATE0 *((volatile int *)0x38086020) #define RCTR_RATE0 *((volatile int *)0x38086024) // MFBSP1 Registers #define TX_MFBSP1 *((volatile int *)0x38088000) #define RX_MFBSP1 *((volatile int *)0x38088000) #define CSR_MFBSP1 *((volatile int *)0x38088004) #define DIR_MFBSP1 *((volatile int *)0x38088008) #define GPIO_DR1 *((volatile int *)0x3808800C) #define TCTR1 *((volatile int *)0x38088010) #define RCTR1 *((volatile int *)0x38088014) #define TSR1 *((volatile int *)0x38088018) #define RSR1 *((volatile int *)0x3808801C) #define TCTR_RATE1 *((volatile int *)0x38088020) // DSP Registers #define MASKR_DSP *((volatile int *)0x37001000) #define QSTR_DSP *((volatile int *)0x37001004) #define CSR_DSP *((volatile int *)0x37001008) #define BASE(i) (0x37000000 + (i)*0x10000) #define DCSR(i) *((volatile int *)(BASE(i) + 0x0100)) #define SR(i) *((volatile int *)(BASE(i) + 0x0104)) #define IDR(i) *((volatile int *)(BASE(i) + 0x0108)) #define EFR(i) *((volatile int *)(BASE(i) + 0x010C)) #define DSTART(i) *((volatile int *)(BASE(i) + 0x010C)) #define IRQR(i) *((volatile int *)(BASE(i) + 0x0110)) #define IMASKR(i) *((volatile int *)(BASE(i) + 0x0114)) #define TMR(i) *((volatile int *)(BASE(i) + 0x0118)) #define PC(i) *((volatile int *)(BASE(i) + 0x0120)) #define SS(i) *((volatile int *)(BASE(i) + 0x0124)) #define LA(i) *((volatile int *)(BASE(i) + 0x0128)) #define LC(i) *((volatile int *)(BASE(i) + 0x0130)) #define CSH(i) *((volatile int *)(BASE(i) + 0x0134)) #define SP(i) *((volatile int *)(BASE(i) + 0x0138)) #define CNTR(i) *((volatile int *)(BASE(i) + 0x0140)) #define SAR1(i) *((volatile int *)(BASE(i) + 0x0144)) #define SAR2(i) *((volatile int *)(BASE(i) + 0x0148)) #define SAR3(i) *((volatile int *)(BASE(i) + 0x014C)) #define SAR4(i) *((volatile int *)(BASE(i) + 0x0150)) #define SAR5(i) *((volatile int *)(BASE(i) + 0x0154)) #define SAR6(i) *((volatile int *)(BASE(i) + 0x0158)) #define SAR7(i) *((volatile int *)(BASE(i) + 0x015C)) #define CCR(i) *((volatile int *)(BASE(i) + 0x0160)) #define PDNR(i) *((volatile int *)(BASE(i) + 0x0164)) #define SFR(i) *((volatile int *)(BASE(i) + 0x0168)) #define A0(i) *((volatile int *)(BASE(i) + 0x0080)) #define A1(i) *((volatile int *)(BASE(i) + 0x0084)) #define A2(i) *((volatile int *)(BASE(i) + 0x0088)) #define A3(i) *((volatile int *)(BASE(i) + 0x008C)) #define A4(i) *((volatile int *)(BASE(i) + 0x0090)) #define A5(i) *((volatile int *)(BASE(i) + 0x0094)) #define A6(i) *((volatile int *)(BASE(i) + 0x0098)) #define A7(i) *((volatile int *)(BASE(i) + 0x009C)) #define I0(i) *((volatile int *)(BASE(i) + 0x00A0)) #define I1(i) *((volatile int *)(BASE(i) + 0x00A4)) #define I2(i) *((volatile int *)(BASE(i) + 0x00A8)) #define I3(i) *((volatile int *)(BASE(i) + 0x00AC)) #define I4(i) *((volatile int *)(BASE(i) + 0x00B0)) #define I5(i) *((volatile int *)(BASE(i) + 0x00B4)) #define I6(i) *((volatile int *)(BASE(i) + 0x00B8)) #define I7(i) *((volatile int *)(BASE(i) + 0x00BC)) #define M0(i) *((volatile int *)(BASE(i) + 0x00C0)) #define M1(i) *((volatile int *)(BASE(i) + 0x00C4)) #define M2(i) *((volatile int *)(BASE(i) + 0x00C8)) #define M3(i) *((volatile int *)(BASE(i) + 0x00CC)) #define M4(i) *((volatile int *)(BASE(i) + 0x00D0)) #define M5(i) *((volatile int *)(BASE(i) + 0x00D4)) #define M6(i) *((volatile int *)(BASE(i) + 0x00D8)) #define M7(i) *((volatile int *)(BASE(i) + 0x00DC)) #define AT(i) *((volatile int *)(BASE(i) + 0x00E0)) #define IT(i) *((volatile int *)(BASE(i) + 0x00E4)) #define MT(i) *((volatile int *)(BASE(i) + 0x00E8)) #define DT(i) *((volatile int *)(BASE(i) + 0x00EC)) #define IVAR(i) *((volatile int *)(BASE(i) + 0x00FC)) #define R0_L(i) *((volatile int *)(BASE(i) + 0x0000)) #define R2_L(i) *((volatile int *)(BASE(i) + 0x0004)) #define R4_L(i) *((volatile int *)(BASE(i) + 0x0008)) #define R6_L(i) *((volatile int *)(BASE(i) + 0x000C)) #define R8_L(i) *((volatile int *)(BASE(i) + 0x0010)) #define R10_L(i) *((volatile int *)(BASE(i) + 0x0014)) #define R12_L(i) *((volatile int *)(BASE(i) + 0x0018)) #define R14_L(i) *((volatile int *)(BASE(i) + 0x001C)) #define R16_L(i) *((volatile int *)(BASE(i) + 0x0020)) #define R18_L(i) *((volatile int *)(BASE(i) + 0x0024)) #define R20_L(i) *((volatile int *)(BASE(i) + 0x0028)) #define R22_L(i) *((volatile int *)(BASE(i) + 0x002C)) #define R24_L(i) *((volatile int *)(BASE(i) + 0x0030)) #define R26_L(i) *((volatile int *)(BASE(i) + 0x0034)) #define R28_L(i) *((volatile int *)(BASE(i) + 0x0038)) #define R30_L(i) *((volatile int *)(BASE(i) + 0x003C)) #define R1_L(i) *((volatile int *)(BASE(i) + 0x0040)) #define R3_L(i) *((volatile int *)(BASE(i) + 0x0044)) #define R5_L(i) *((volatile int *)(BASE(i) + 0x0048)) #define R7_L(i) *((volatile int *)(BASE(i) + 0x004C)) #define R9_L(i) *((volatile int *)(BASE(i) + 0x0050)) #define R11_L(i) *((volatile int *)(BASE(i) + 0x0054)) #define R13_L(i) *((volatile int *)(BASE(i) + 0x0058)) #define R15_L(i) *((volatile int *)(BASE(i) + 0x005C)) #define R17_L(i) *((volatile int *)(BASE(i) + 0x0060)) #define R19_L(i) *((volatile int *)(BASE(i) + 0x0064)) #define R21_L(i) *((volatile int *)(BASE(i) + 0x0068)) #define R23_L(i) *((volatile int *)(BASE(i) + 0x006C)) #define R25_L(i) *((volatile int *)(BASE(i) + 0x0070)) #define R27_L(i) *((volatile int *)(BASE(i) + 0x0074)) #define R29_L(i) *((volatile int *)(BASE(i) + 0x0078)) #define R31_L(i) *((volatile int *)(BASE(i) + 0x007C)) #define R1D_L(i) *((volatile int *)(BASE(i) + 0x0180)) #define R1D_H(i) *((volatile int *)(BASE(i) + 0x0184)) #define R3D_L(i) *((volatile int *)(BASE(i) + 0x0188)) #define R3D_H(i) *((volatile int *)(BASE(i) + 0x018C)) #define R5D_L(i) *((volatile int *)(BASE(i) + 0x0190)) #define R5D_H(i) *((volatile int *)(BASE(i) + 0x0194)) #define R7D_L(i) *((volatile int *)(BASE(i) + 0x0198)) #define R7D_H(i) *((volatile int *)(BASE(i) + 0x019C)) #define R9D_L(i) *((volatile int *)(BASE(i) + 0x01A0)) #define R9D_H(i) *((volatile int *)(BASE(i) + 0x01A4)) #define R11D_L(i) *((volatile int *)(BASE(i) + 0x01A8)) #define R11D_H(i) *((volatile int *)(BASE(i) + 0x01AC)) #define R13D_L(i) *((volatile int *)(BASE(i) + 0x01B0)) #define R13D_H(i) *((volatile int *)(BASE(i) + 0x01B4)) #define R15D_L(i) *((volatile int *)(BASE(i) + 0x01B8)) #define R15D_H(i) *((volatile int *)(BASE(i) + 0x01BC)) #define R17D_L(i) *((volatile int *)(BASE(i) + 0x01C0)) #define R17D_H(i) *((volatile int *)(BASE(i) + 0x01C4)) #define R19D_L(i) *((volatile int *)(BASE(i) + 0x01C8)) #define R19D_H(i) *((volatile int *)(BASE(i) + 0x01CC)) #define R21D_L(i) *((volatile int *)(BASE(i) + 0x01D0)) #define R21D_H(i) *((volatile int *)(BASE(i) + 0x01D4)) #define R23D_L(i) *((volatile int *)(BASE(i) + 0x01D8)) #define R23D_H(i) *((volatile int *)(BASE(i) + 0x01DC)) #define R25D_L(i) *((volatile int *)(BASE(i) + 0x01E0)) #define R25D_H(i) *((volatile int *)(BASE(i) + 0x01E4)) #define R27D_L(i) *((volatile int *)(BASE(i) + 0x01E8)) #define R27D_H(i) *((volatile int *)(BASE(i) + 0x01EC)) #define R29D_L(i) *((volatile int *)(BASE(i) + 0x01F0)) #define R29D_H(i) *((volatile int *)(BASE(i) + 0x01F4)) #define R31D_L(i) *((volatile int *)(BASE(i) + 0x01F8)) #define R31D_H(i) *((volatile int *)(BASE(i) + 0x01FC)) #define AC0(i) *((volatile int *)(BASE(i) + 0x0200)) #define AC1(i) *((volatile int *)(BASE(i) + 0x0204)) #define AC2(i) *((volatile int *)(BASE(i) + 0x0208)) #define AC3(i) *((volatile int *)(BASE(i) + 0x020C)) #define AC4(i) *((volatile int *)(BASE(i) + 0x0210)) #define AC5(i) *((volatile int *)(BASE(i) + 0x0214)) #define AC6(i) *((volatile int *)(BASE(i) + 0x0218)) #define AC7(i) *((volatile int *)(BASE(i) + 0x021C)) #define AC8(i) *((volatile int *)(BASE(i) + 0x0220)) #define AC9(i) *((volatile int *)(BASE(i) + 0x0224)) #define AC10(i) *((volatile int *)(BASE(i) + 0x0228)) #define AC11(i) *((volatile int *)(BASE(i) + 0x022C)) #define AC12(i) *((volatile int *)(BASE(i) + 0x0230)) #define AC13(i) *((volatile int *)(BASE(i) + 0x0234)) #define AC14(i) *((volatile int *)(BASE(i) + 0x0238)) #define AC15(i) *((volatile int *)(BASE(i) + 0x023C)) #define dbDCSR(i) *((volatile int *)(BASE(i) + 0x0500)) #define Cnt_RUN(i) *((volatile int *)(BASE(i) + 0x0518)) #define dbPCa(i) *((volatile int *)(BASE(i) + 0x0524)) #define dbPCf(i) *((volatile int *)(BASE(i) + 0x0528)) #define dbPCe(i) *((volatile int *)(BASE(i) + 0x0520)) #define dbPCe1(i) *((volatile int *)(BASE(i) + 0x0530)) #define dbPCe2(i) *((volatile int *)(BASE(i) + 0x0534)) #define dbPCe3(i) *((volatile int *)(BASE(i) + 0x0538)) #define dbCNTR(i) *((volatile int *)(BASE(i) + 0x0540)) #define dbSAR1(i) *((volatile int *)(BASE(i) + 0x0544)) #define dbSAR2(i) *((volatile int *)(BASE(i) + 0x0548)) #define dbSAR3(i) *((volatile int *)(BASE(i) + 0x054C)) #define dbSAR4(i) *((volatile int *)(BASE(i) + 0x0550)) #define dbSAR5(i) *((volatile int *)(BASE(i) + 0x0554)) #define dbSAR6(i) *((volatile int *)(BASE(i) + 0x0558)) // DSP XBuffer (exchange) registers #define X0_L *((volatile int *)0x37001100) #define X0_H *((volatile int *)0x37001104) #define X1_L *((volatile int *)0x37001108) #define X1_H *((volatile int *)0x3700110C) #define X2_L *((volatile int *)0x37001110) #define X2_H *((volatile int *)0x37001114) #define X3_L *((volatile int *)0x37001118) #define X3_H *((volatile int *)0x3700111C) #define X4_L *((volatile int *)0x37001120) #define X4_H *((volatile int *)0x37001124) #define X5_L *((volatile int *)0x37001128) #define X5_H *((volatile int *)0x3700112C) #define X6_L *((volatile int *)0x37001130) #define X6_H *((volatile int *)0x37001134) #define X7_L *((volatile int *)0x37001138) #define X7_H *((volatile int *)0x3700113C) #define X8_L *((volatile int *)0x37001140) #define X8_H *((volatile int *)0x37001144) #define X9_L *((volatile int *)0x37001148) #define X9_H *((volatile int *)0x3700114C) #define X10_L *((volatile int *)0x37001150) #define X10_H *((volatile int *)0x37001154) #define X11_L *((volatile int *)0x37001158) #define X11_H *((volatile int *)0x3700115C) #define X12_L *((volatile int *)0x37001160) #define X12_H *((volatile int *)0x37001164) #define X13_L *((volatile int *)0x37001168) #define X13_H *((volatile int *)0x3700116C) #define X14_L *((volatile int *)0x37001170) #define X14_H *((volatile int *)0x37001174) #define X15_L *((volatile int *)0x37001178) #define X15_H *((volatile int *)0x3700117C) #define X16_L *((volatile int *)0x37001180) #define X16_H *((volatile int *)0x37001184) #define X17_L *((volatile int *)0x37001188) #define X17_H *((volatile int *)0x3700118C) #define X18_L *((volatile int *)0x37001190) #define X18_H *((volatile int *)0x37001194) #define X19_L *((volatile int *)0x37001198) #define X19_H *((volatile int *)0x3700119C) #define X20_L *((volatile int *)0x370011A0) #define X20_H *((volatile int *)0x370011A4) #define X21_L *((volatile int *)0x370011A8) #define X21_H *((volatile int *)0x370011AC) #define X22_L *((volatile int *)0x370011B0) #define X22_H *((volatile int *)0x370011B4) #define X23_L *((volatile int *)0x370011B8) #define X23_H *((volatile int *)0x370011BC) #define X24_L *((volatile int *)0x370011C0) #define X24_H *((volatile int *)0x370011C4) #define X25_L *((volatile int *)0x370011C8) #define X25_H *((volatile int *)0x370011CC) #define X26_L *((volatile int *)0x370011D0) #define X26_H *((volatile int *)0x370011D4) #define X27_L *((volatile int *)0x370011D8) #define X27_H *((volatile int *)0x370011DC) #define X28_L *((volatile int *)0x370011E0) #define X28_H *((volatile int *)0x370011E4) #define X29_L *((volatile int *)0x370011E8) #define X29_H *((volatile int *)0x370011EC) #define X30_L *((volatile int *)0x370011F0) #define X30_H *((volatile int *)0x370011F4) #define X31_L *((volatile int *)0x370011F8) #define X31_H *((volatile int *)0x370011FC) #ifdef __cplusplus } #endif #endif // __MCOM02_H__