00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 #ifndef MEMORY_PARTITIONS
00069 #define MEMORY_PARTITIONS
00070
00071 #include "processor.h"
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 #define IPRAM_SZ (0x10000)
00102 #define IDRAM_SZ (0x10000)
00103 #if (defined(I_AM_SLAVE_DSP)&&defined(REV_E))
00104 #define SRAM_SZ_NO_CACHE (0x40000)
00105 #define SRAM_SZ_16K_CACHE (0x3c000)
00106 #define SRAM_SZ_32K_CACHE (0x38000)
00107 #define SRAM_SZ_48K_CACHE (0x34000)
00108 #define SRAM_SZ_64K_CACHE (0x30000)
00109 #endif
00110
00111 #ifdef TI_EVM
00112 #define SDRAM0_SZ (0x400000)
00113 #define SDRAM1_SZ (0x400000)
00114
00115 #else
00116 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00117 #define SDRAM0_SZ (0x800000)
00118 #define SDRAM1_SZ (0x800000)
00119 #elif (defined(I_AM_SLAVE_DSP))
00120 #if (defined(REV_B)||defined(REV_C))
00121 #define SDRAM0_SZ (0x01000000)
00122 #define SDRAM1_SZ (0x01000000)
00123 #elif defined(REV_E)
00124 #define SDRAM0_SZ (0x08000000)
00125 #define SDRAM1_SZ (0x08000000)
00126 #endif
00127 #endif
00128 #endif
00129
00130
00131
00132
00133
00134 #if ( (defined(I_AM_MASTER_DSP)) || (defined(I_AM_NT_HOST)) || (defined(I_AM_LINUX_HOST)) \
00135 || (defined(I_AM_SLAVE_DSP)&&(defined(REV_B)||defined(REV_C))) )
00136 #ifdef MAP_0
00137 #define CE0_BASE (0x00000000)
00138 #define CE1_BASE (0x01000000)
00139 #define IPRAM_BASE (0x01400000)
00140 #else
00141 #define CE0_BASE (0x00400000)
00142 #define CE1_BASE (0x01400000)
00143 #define IPRAM_BASE (0x00000000)
00144 #endif
00145
00146 #define CE2_BASE (0x02000000)
00147 #define CE3_BASE (0x03000000)
00148 #define IDRAM_BASE (0x80000000)
00149
00150 #elif (defined(I_AM_SLAVE_DSP)&&defined(REV_E))
00151 #define CE0_BASE (0x80000000)
00152 #define CE1_BASE (0x90000000)
00153 #define SRAM_BASE (0x00000000)
00154 #define IPRAM_BASE (0x00000000)
00155
00156 #define CE2_BASE (0xa0000000)
00157 #define CE3_BASE (0xb0000000)
00158 #define IDRAM_BASE (0x00010000)
00159 #endif
00160
00161
00162
00163
00164 #define SDRAM0_BASE (CE2_BASE)
00165 #ifdef TI_EVM
00166 #define SDRAM1_BASE (CE3_BASE)
00167 #else
00168 #if (defined(I_AM_MASTER_DSP)|| defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00169 #define SDRAM1_BASE (CE2_BASE) + (SDRAM0_SZ)
00170 #elif (defined(I_AM_SLAVE_DSP))
00171 #define SDRAM1_BASE (CE3_BASE)
00172 #endif
00173 #endif
00174
00175
00176 #ifndef TI_EVM
00177 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00178 #define BOOT_ROM_BASE (CE1_BASE)
00179 #define BOOT_ROM_SZ (0x80000)
00180 #elif (defined(I_AM_SLAVE_DSP))
00181 #define ROUTER_FIFO_BASE (CE1_BASE)
00182 #define ROUTER_FIFO_SZ (0x1000)
00183 #endif
00184 #endif
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221 #define IDREGS_SZ (0x0060)
00222 #define IDATA_SZ (0x0800)
00223 #define IDRAM_MEM_SZ (0x77a0)
00224 #define BURST_SZ (0x8000)
00225
00226 #define IDRAM_ALLOCATED ((IDREGS_SZ)+(IDATA_SZ)+(IDRAM_MEM_SZ)+(BURST_SZ))
00227
00228 #define IDREGS_BASE (IDRAM_BASE)
00229 #define IDATA_BASE ((IDREGS_BASE) + (IDREGS_SZ))
00230 #define IDRAM_MEM_BASE ((IDATA_BASE) + (IDATA_SZ))
00231
00232 #define BURST_BFR_BASE ((IDRAM_MEM_BASE) + (IDRAM_MEM_SZ))
00233
00234
00235
00236 #define STATUS_REG_0 (IDRAM_BASE)
00237 #define STATUS_REG_1 ((STATUS_REG_0) + sizeof(UINT32))
00238 #define STATUS_REG_2 ((STATUS_REG_1) + sizeof(UINT32))
00239 #define COMMAND_REG_0 ((STATUS_REG_2) + sizeof(UINT32))
00240
00241
00242 #define DIAGNOSTIC_REG ((COMMAND_REG_0) + sizeof(UINT32))
00243 #define TRAPSTAT_REG_0 ((DIAGNOSTIC_REG) + sizeof(UINT32))
00244 #define TRAPSTAT_REG_1 ((TRAPSTAT_REG_0) + sizeof(UINT32))
00245 #define LOOP_REG ((TRAPSTAT_REG_1) + sizeof(UINT32))
00246
00247
00248 #define HCMD_STAT_REG_0 ((LOOP_REG) + sizeof(UINT32))
00249 #define HCMD_STAT_REG_1 ((HCMD_STAT_REG_0) + sizeof(UINT32))
00250 #define HSTAT_REG_0 ((HCMD_STAT_REG_1) + sizeof(UINT32))
00251 #define HSTAT_REG_1 ((HSTAT_REG_0) + sizeof(UINT32))
00252
00253
00254 #define RESERVED_REG_0 ((HSTAT_REG_1) + sizeof(UINT32))
00255 #define RESERVED_REG_1 ((RESERVED_REG_0) + sizeof(UINT32))
00256 #define RESERVED_REG_2 ((RESERVED_REG_1) + sizeof(UINT32))
00257 #define RESERVED_REG_3 ((RESERVED_REG_2) + sizeof(UINT32))
00258
00259
00260 #define RESERVED_REG_4 ((RESERVED_REG_3) + sizeof(UINT32))
00261 #define RESERVED_REG_5 ((RESERVED_REG_4) + sizeof(UINT32))
00262 #define MEMORY_MAP_REG ((RESERVED_REG_5) + sizeof(UINT32))
00263 #define TASK_STATE_REG ((MEMORY_MAP_REG) + sizeof(UINT32))
00264
00265
00266 #define HCMD_REG ((TASK_STATE_REG) + sizeof(UINT32))
00267 #define TRAP_CMD_STAT ((HCMD_REG) + sizeof(UINT32))
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00278 #define INTR_DSP_HSHK_WR ((TRAP_CMD_STAT) + sizeof(UINT32))
00279 #define INTR_DSP_HSHK_RD ((INTR_DSP_HSHK_WR) + sizeof(UINT32))
00280 #elif defined(I_AM_SLAVE_DSP)
00281 #define INTR_DSP_HSHK_RD ((TRAP_CMD_STAT) + sizeof(UINT32))
00282 #define INTR_DSP_HSHK_WR ((INTR_DSP_HSHK_RD) + sizeof(UINT32))
00283 #endif
00284
00285
00286
00287
00288
00289
00290 #define XPROG_SZ (0x40000)
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300 #ifdef COMPACT
00301 #define TXT_BFR_SZ (0x800)
00302 #define INTR_DSP_PRM_BFR_SZ (0x800)
00303 #define INTR_DSP_REP_BFR_SZ (0x800)
00304
00305 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00306 #define MDSP_PRM_BFR_SZ (0x2000)
00307 #define MDSP_REP_BFR_SZ (0x2000)
00308 #endif
00309 #define SDSP_PRM_BFR_SZ (0x2000)
00310 #define SDSP_REP_BFR_SZ (0x2000)
00311
00312 #define ERR_BFR_BASE (BURST_BFR_BASE)
00313 #define INFO_BFR_BASE ((ERR_BFR_BASE) + (TXT_BFR_SZ))
00314 #define DIAG_BFR_BASE ((INFO_BFR_BASE) + (TXT_BFR_SZ))
00315 #define XFER_BFR_BASE ((DIAG_BFR_BASE) + (TXT_BFR_SZ))
00316
00317 #define INTR_DSP_PRM_BFR_BASE_SND ((XFER_BFR_BASE) +(TXT_BFR_SZ))
00318 #define INTR_DSP_REP_BFR_BASE_SND ((INTR_DSP_PRM_BFR_BASE_SND)+(INTR_DSP_PRM_BFR_SZ))
00319 #define INTR_DSP_PRM_BFR_BASE_PRC ((INTR_DSP_REP_BFR_BASE_SND)+(INTR_DSP_REP_BFR_SZ))
00320 #define INTR_DSP_REP_BFR_BASE_PRC ((INTR_DSP_PRM_BFR_BASE_PRC)+(INTR_DSP_PRM_BFR_SZ))
00321
00322 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00323 #define MDSP_PRM_BFR_BASE ((INTR_DSP_REP_BFR_BASE_PRC) + (INTR_DSP_PRM_BFR_SZ))
00324 #define MDSP_REP_BFR_BASE ((MDSP_PRM_BFR_BASE) + (MDSP_PRM_BFR_SZ))
00325 #endif
00326 #define SDSP_PRM_BFR_BASE ((INTR_DSP_REP_BFR_BASE_PRC) + (INTR_DSP_PRM_BFR_SZ))
00327 #define SDSP_REP_BFR_BASE ((SDSP_PRM_BFR_BASE) + (SDSP_PRM_BFR_SZ))
00328
00329 #define XBURST_BFR_BASE ((SDRAM0_BASE) + (XPROG_SZ))
00330 #define XBURST_BFR_SZ (0x38000)
00331
00332 #define BURST_BFR_RESERVED_BASE ((XBURST_BFR_BASE) +(XBURST_BFR_SZ))
00333 #define BURST_BFR_RESERVED_SZ (0x8000)
00334
00335 #define HISTOGRAM_DEFAULT_BASE ((BURST_BFR_RESERVED_BASE) +(BURST_BFR_RESERVED_SZ))
00336 #define SDRAM0_ALLOCATED ((HISTOGRAM_DEFAULT_BASE) -(SDRAM0_BASE))
00337
00338 #else
00339
00340 #define TXT_BFR_SZ (0x8000)
00341 #define INTR_DSP_PRM_BFR_SZ (0x800)
00342 #define INTR_DSP_REP_BFR_SZ (0x800)
00343
00344
00345
00346
00347
00348
00349
00350 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00351 #define MDSP_PRM_BFR_SZ (0x50000)
00352 #define MDSP_REP_BFR_SZ (0x50000)
00353 #endif
00354 #define SDSP_PRM_BFR_SZ (0x20000)
00355 #define SDSP_REP_BFR_SZ (0x20000)
00356
00357 #if ( (defined(I_AM_MASTER_DSP)) || (defined(I_AM_NT_HOST)) || (defined(I_AM_LINUX_HOST)) \
00358 || (defined(I_AM_SLAVE_DSP)&&(defined(REV_B)||defined(REV_C))) )
00359 #define ERR_BFR_BASE ((SDRAM0_BASE) + (XPROG_SZ))
00360 #define INFO_BFR_BASE ((ERR_BFR_BASE) + (TXT_BFR_SZ))
00361 #define DIAG_BFR_BASE ((INFO_BFR_BASE) + (TXT_BFR_SZ))
00362 #define XFER_BFR_BASE ((DIAG_BFR_BASE) + (TXT_BFR_SZ))
00363
00364 #elif (defined(I_AM_SLAVE_DSP)&&defined(REV_E))
00365 #define ERR_BFR_BASE1 0x20000
00366 #define INFO_BFR_BASE1 0x28000
00367
00368 #define ERR_BFR_BASE ((SDRAM0_BASE) + (XPROG_SZ))
00369 #define INFO_BFR_BASE ((ERR_BFR_BASE) + (TXT_BFR_SZ))
00370 #define DIAG_BFR_BASE ((INFO_BFR_BASE) + (TXT_BFR_SZ))
00371 #define XFER_BFR_BASE ((DIAG_BFR_BASE) + (TXT_BFR_SZ))
00372 #endif
00373
00374
00375 #define INTR_DSP_PRM_BFR_BASE_SND ((XFER_BFR_BASE) +(TXT_BFR_SZ))
00376 #define INTR_DSP_REP_BFR_BASE_SND ((INTR_DSP_PRM_BFR_BASE_SND)+(INTR_DSP_PRM_BFR_SZ))
00377 #define INTR_DSP_PRM_BFR_BASE_PRC ((INTR_DSP_REP_BFR_BASE_SND)+(INTR_DSP_REP_BFR_SZ))
00378 #define INTR_DSP_REP_BFR_BASE_PRC ((INTR_DSP_PRM_BFR_BASE_PRC)+(INTR_DSP_PRM_BFR_SZ))
00379
00380 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00381 #define MDSP_PRM_BFR_BASE ((INTR_DSP_REP_BFR_BASE_PRC) + (INTR_DSP_PRM_BFR_SZ))
00382 #define MDSP_REP_BFR_BASE ((MDSP_PRM_BFR_BASE) + (MDSP_PRM_BFR_SZ))
00383 #define CMD_BUFFER_BASE ((MDSP_REP_BFR_BASE) + (MDSP_REP_BFR_SZ))
00384 #define CMD_BUFFER_SZ 0x8000
00385 #define SDRAM0_FREE_BASE ((CMD_BUFFER_BASE) +(CMD_BUFFER_SZ))
00386
00387 #endif
00388 #define SDSP_PRM_BFR_BASE ((INTR_DSP_REP_BFR_BASE_PRC) + (INTR_DSP_PRM_BFR_SZ))
00389 #define SDSP_REP_BFR_BASE ((SDSP_PRM_BFR_BASE) + (SDSP_PRM_BFR_SZ))
00390
00391 #if (defined(I_AM_SLAVE_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00392 #define XBURST_BFR_BASE ((SDSP_REP_BFR_BASE)+(SDSP_REP_BFR_SZ))
00393 #define XBURST_BFR_SZ (0x38000)
00394
00395 #define BURST_BFR_RESERVED_BASE ((XBURST_BFR_BASE) +(XBURST_BFR_SZ))
00396 #define BURST_BFR_RESERVED_SZ (0x8000)
00397
00398 #define HISTOGRAM_DEFAULT_BASE ((BURST_BFR_RESERVED_BASE) +(BURST_BFR_RESERVED_SZ))
00399
00400 #endif
00401
00402 #if defined(I_AM_MASTER_DSP)
00403 #define SDRAM0_ALLOCATED ((SDRAM0_FREE_BASE) -(SDRAM0_BASE))
00404 #elif defined(I_AM_SLAVE_DSP)
00405 #define SDRAM0_ALLOCATED ((HISTOGRAM_DEFAULT_BASE) -(SDRAM0_BASE))
00406 #endif
00407
00408 #define MODULE_DATA_BASE 0x02400000
00409 #if defined(SCT_ROD)
00410 #define MODULE_DATA_SZ 0x00080000
00411 #elif defined(PIXEL_ROD)
00412 #define MODULE_DATA_SZ 0x00b00000
00413 #endif
00414
00415 #endif
00416
00417
00418
00419
00420
00421 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00422 #define SLV_SDRAM1_BASE (0x03000000)
00423 #define SLV_SDRAM1_SZ (0x01000000)
00424 #define EVENT_TRAP_DEFAULT_SZ (0x20000)
00425 #define EVENT_TRAP_DEFAULT_BASE ((SLV_SDRAM1_BASE) +(SLV_SDRAM1_SZ) \
00426 -(EVENT_TRAP_DEFAULT_SZ))
00427 #else
00428 #define EVENT_TRAP_DEFAULT_SZ (0x20000)
00429 #define EVENT_TRAP_DEFAULT_BASE ((SDRAM1_BASE) +(SDRAM1_SZ) \
00430 -(EVENT_TRAP_DEFAULT_SZ))
00431 #endif
00432
00433
00434
00435
00436 #if (defined(I_AM_MASTER_DSP) || defined(I_AM_NT_HOST) || defined(I_AM_LINUX_HOST))
00437
00438 #define MEMORY_LIMIT 0x03000000
00439
00440
00441
00442 #define EVM_SLV_REG_BASE(slv) (MEMORY_LIMIT - 0x18200 + 0x80*(slv))
00443 #define EVM_SLV_MEM_BASE(slv) (MEMORY_LIMIT - 0x18000 + 0x2000*(slv))
00444 #define EVM_RRIF_REG_BASE ((MEMORY_LIMIT) - 0x10000)
00445
00446 #define SDRAM1_FREE_BASE (SDRAM1_BASE)
00447 #else
00448 #define SDRAM1_FREE_BASE (SDRAM1_BASE)
00449 #endif
00450
00451 #define SDRAM1_ALLOCATED 0
00452
00453 #if defined(TI_EVM)
00454 #define HISTOGRAM_BASE1 ((SDRAM1_BASE) +(0x40000))
00455 #endif
00456
00457
00458
00459
00460 #if defined(I_AM_MASTER_DSP)
00461
00462
00463 #if (defined(TI_EVM) || defined(SIM))
00464 #define REG_BASE (EVM_RRIF_REG_BASE)
00465 #else
00466 #define REG_BASE (CE0_BASE)
00467 #endif
00468
00469
00470
00471
00472 #define FMT_BASE (0x0)
00473 #define EFB_BASE (0x800)
00474 #define RTR_BASE (0x900)
00475 #define RRIF_BASE (0x1000)
00476 #define FIFO_BASE (0x1800)
00477 #define BOC_BASE (0x2000)
00478 #define SLV_BASE (0xE0000)
00479
00480 #define LED_OFFSET 0x100
00481 #define HEARTBEAT_ADR ((UINT32 *)(((RRIF_BASE + LED_OFFSET) << 2) + REG_BASE))
00482
00483 #elif defined(I_AM_SLAVE_DSP)
00484 #define ROUTER_FIFO_ADDR (CE1_BASE)
00485
00486 #endif
00487
00488 #endif