⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lab11a_c5416_ovly1.mem

📁 DSP,FIR设计
💻 MEM
字号:
/* generic TMS320C5416 with OVLY = 1.                                      
                                                                     
 Use this description if the board selection is not yet known,       
 or as a starting point for creating a custom board description      
                                                                     
 When making memory alterations:                                     
 1. Take care to declare Read/Write/eXecute/Initializable (RWXI)     
    properties correctly!  THIS IS *REAL* IMPORTANT!                 
 2. The visual linker defines "Initializable" as persistent memory   
    (i.e. FLASH, ROM).  Use "Write" only if you keep variables       
    (as opposed to code & constants) in the region at run-time.      
 3. Never give a region eXecute capabilities if it is declared       
    in a data space.  Regions that may hold code MUST be declared    
    in code space.  They may be shared with a data space             
    using the SHARED_ADDRESSES directive of the .mem file.           
 4. Currently, there is no visual interface to create a              
    SHARED_ADDRESSES directive.  This must be done by hand in the    
    .mem file using a text editor.                                   
    If you start with an existing .mem file, you probably do not     
    need to alter the SHARED_ADDRESSES directive unless you have new 
    devices that swap in and out of memory (usually at boot time).   
 5. If writing the .mem file by hand, declare the primary code space 
    1st, the primary data space 2nd and the primary IO space 3rd.    
    Others may follow in any order.                                  
 6. Its best if SPACE names contain one of the following substrings: 
    {"prog", "code", "data", "io"}. The visual linker looks for      
    these strings (case-insensitive) to help determine semantics for 
    the SPACE.                                                       
 7. An annoying warning is avoided if read-only region names contain 
    "rom" or "ROM"                                                   
 8. An annoying warning is avoided if non-readable non-writeable     
    (not allocatable) region names contain "reserved" or "RESERVED"  
    or "RSVD".                                                       */
MEMORY C5416_ovly1
   (FAMILY = c54x) {


   /* from 80h to 7FFFh is On-Chip and shared with data_memory */
   /* and also maps to the lower 16K of each external code page. */
   /* MP=0, OVLY=1 */
   SPACE program_memory PAGE 0
      (OVERLAY      = program_memory,
       SWAP_IN      = "DEBUG_Global(""old_PMST"" ) = PMST;"
                      "PMST    = (PMST & 0xFFBF) & 0x20;   /* MP=0 OVLY=1 */",
       SWAP_OUT     = "PMST    = DEBUG_Global(""old_PMST"" );",
       IS_SWAPPED_IN= "((PMST    & 0x40) == 0x00) &&       /* MP==0       */"
                      "((PMST    & 0x20) == 0x20)          /* OVLY==1     */") :


      /* unavailable for allocation */
      RESERVED    (    ): o= 0x00000 e= 0x0007F

      /* On-chip Dual Access RAM, divided into four 8K blocks: */
      /* 80-1FFF, 2000-3FFF, 4000-5FFF, 6000-7FFF */
      DARAM_0_3   (RWX ): o= 0x00080 e= 0x07FFF

      code_page_0 (RWX ): o= 0x08000 e= 0x0BFFF /* offchip RAM */
      onchip_ROM  (RXI ): o= 0x0C000 e= 0x0FEFF /* appears only when MP=0 */
      RESERVED_2  (    ): o= 0x0FF00 e= 0x0FF7F /* appears only when MP=0 */
      onchip_vectors
                  (RXI ): o= 0x0FF80 e= 0x0FFFF /* ROM interrupt vectors */

      /* On-chip Dual Access RAM, divided into four 8K blocks: */
      /* 18000-19FFF, 1A000-1BFFF, 1C000-1DFFF, 1E000-1FFFF. */
      /* appears in data_memory at 8000h when DROM=1 */
      /* and also in program_memory at 18000h when MP=0. */
      DARAM_4_7   (RWX ): o= 0x18000 e= 0x1FFFF

      /* On-chip Single Access RAM, divided into four 8K blocks: */
      /* 28000-29FFF, 2A000-2BFFF, 2C000-2DFFF, 2E000-2FFFF. */
      /* replaced by external when MP=1 */
      SARAM_0_3   (RWX ): o= 0x28000 e= 0x2FFFF

      /* On-chip Single Access RAM, divided into four 8K blocks: */
      /* 38000-39FFF, 3A000-3BFFF, 3C000-3DFFF, 3E000-3FFFF. */
      /* replaced by external when MP=1 */
      SARAM_4_7   (RWX ): o= 0x38000 e= 0x3FFFF

      code_page_4 (RWX ): o= 0x48000 e= 0x4FFFF /* external RAM */
      code_page_5 (RWX ): o= 0x58000 e= 0x5FFFF /* external RAM */

   /* from 80h to 7FFFh is On-Chip and shared with program_memory */
   /* DROM=1 */
   SPACE data_memory PAGE 1
      (OVERLAY      = data_memory,
       SWAP_IN      = "DEBUG_Global(""old_PMST""  ) = PMST;"
                      "PMST    = PMST    | 0x08;           /* DROM=1      */",
       SWAP_OUT     = "PMST    = DEBUG_Global(""old_PMST"" );",
       IS_SWAPPED_IN= "((PMST    & 0x08) == 0x08)          /* DROM==1     */") :

      regs        (RW  ): o= 0x00000 e= 0x0005F /* Memory-mapped registers */
      scratch     (RW  ): o= 0x00060 e= 0x0007F /* Scratch-pad DARAM */

   SPACE IO_memory PAGE 2 :
      peripheral_1(RW  ): o= 0x00000 e= 0x001FF /* example device */
      peripheral_2(RW  ): o= 0x00200 e= 0x003FF /* example device */

   /* MP=1, OVLY=1 */
   SPACE program_memory_when_MP1 PAGE 3
      (OVERLAY      = program_memory,
       SWAP_IN      = "DEBUG_Global(""old_PMST"")  = PMST;"
                      "PMST    = (PMST | 0x40) | 0x20;     /* MP=1 OVLY=1 */",
       SWAP_OUT     = "PMST  = DEBUG_Global(""old_PMST"");",
       IS_SWAPPED_IN= "((PMST    & 0x40) == 0x40) &&       /* MP ==1      */"
                      "((PMST    & 0x20) == 0x20)          /* OVLY==1     */") :

      code_page_0_MP1
                  (RWX ): o= 0x0C000 e= 0x0FF7F /* replaced by ROM when MP=0 */
      vectors     (RWX ): o= 0x0FF80 e= 0x0FFFF /* external interrupt vectors */
      code_page_1 (RWX ): o= 0x18000 e= 0x1FFFF /* external RAM */
      code_page_2 (RWX ): o= 0x28000 e= 0x2FFFF /* external RAM */
      code_page_3 (RWX ): o= 0x38000 e= 0x3FFFF /* external RAM */

   /* DROM=0 */
   SPACE data_memory_when_DROM0 PAGE 4
      (OVERLAY      = data_memory,
       SWAP_IN      = "DEBUG_Global(""old_PMST""  ) = PMST;"
                      "PMST    = PMST    & 0xFFF7;         /* DROM=0      */",
       SWAP_OUT     = "PMST    = DEBUG_Global(""old_PMST"" );",
       IS_SWAPPED_IN= "((PMST    & 0x08) == 0x00)          /* DROM==0     */") :

      external    (RW  ): o= 0x08000 e= 0x0FFFF /* appears when DROM=0 */
}

/* Table of address ranges vs. sets of spaces that share them. */
/* For each entry in the table,                                */
/* if a region's parent appears in the space set               */
/* and the region is fully contained in the address range,     */
/* then the region is shared with the other spaces of the set. */
SHARED_ADDRESSES C5416_ovly1 {
   o= 0x00080 e= 0x007FFF {program_memory,
                           data_memory,
                           data_memory_when_DROM0}

   { /* BEGIN sharing across set of ranges */
      o= 0x08000 e= 0x00FFFF {data_memory}
      o= 0x18000 e= 0x01FFFF {program_memory}
   } /* END sharing across set of ranges */

   o= 0x00000 e= 0x00BFFF {program_memory,
                           program_memory_when_MP1}
   o= 0x10000 e= 0x017FFF {program_memory,
                           program_memory_when_MP1}
   o= 0x20000 e= 0x027FFF {program_memory,
                           program_memory_when_MP1}
   o= 0x30000 e= 0x037FFF {program_memory,
                           program_memory_when_MP1}
   o= 0x40000 e= 0x7FFFFF {program_memory,
                           program_memory_when_MP1}
   o= 0x00000 e= 0x007FFF {data_memory,
                           data_memory_when_DROM0}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -