<< Chapter < Page Chapter >> Page >

There are two types of internal memory on the TI TMS320C549 DSP: SARAM (Single Access RAM) and DARAM (Dual AccessRAM). The first 8K of internal memory is DARAM; the next 24K is SARAM. The difference between these two types of memory isthat while SARAM can only be read or written once in a cycle, DARAM can be read or written twice in a cycle. This isrelevant because the TMS320C549 DSP core can access memory up to three times in each cycle: two accesses in Data RAM to reador write operands, and one access in Program RAM to fetch the next instruction. Both DARAM and SARAM are divided into"pages"; access to memory located in different "pages" will never conflict. If, however, two operands are fetched from thesame "page" of SARAM (which is divided into 8K word pages: 2000h - 3FFFh , 4000h - 5FFFFh , and 6000h - 7FFFh ) in the same cycle, a one-cycle stall will occur while the second memory location isaccessed. Due to the pipeline, two memory accesses in the same instruction execute in different cycles. However, if twosuccessive instructions access the same area of SARAM, a stall can occur.

Part of the SARAM (from 6000h to 7FFFh ) is used for storing your program code; a small amount of SARAM below 6000h is also used for storing the DSP's stack. Part of the DARAM (from 0800h to 0FFFh ) is used for the input and output buffers and is also unavailable. Ensure thatany code you write does not use any of these reserved sections of data memory. In addition, the core file reserves sixlocations in scratch-pad RAM ( 060h to 065h ); do not use these locations in your program code.

Sections and the linker

You can use the .text directive to declare program code, and the .data directive to declare data. However, there are many more sections defined by thelinker control file. Note that the core file uses memory in some of these sections.

You can place program code in the following sections using the .sect directive:

  • .text : ( .sect ".text" ) SARAM between 6000h and 7FFFh (8192 words)
  • .etext : ( .sect ".etext" ) External RAM between 8000h and FEFFh (32,512 words) The test-vector version of the DSP core stores the test vectors in the .etext section.
You can place data in the following sections:
  • .data : ( .sect ".data" ) DARAM between 1000h and 1FFFh (4096 words)
  • .sdata : ( .sect ".sdata" ) SARAM between 2000h and 5EFFh (16,128 words)
  • .ldata : ( .sect ".ldata" ) DARAM between 0080h and 07FFh (1,920 words)
  • .scratch : ( .sect ".scratch" ) Scratchpad RAM between 0060h and 007Fh (32 words)
  • .edata : ( .sect ".edata" ) External RAM between 8000h and FFFFh (32,768 words) (Requires special initialization; if you need to use thismemory, load and run the thru6.asm application before you load your application to initialize the EVM properly.)
If you always use these sections to allocate data storage regions instead of setting pointers to arbitrary locations inmemory, you will greatly reduce the chances of overwriting your program code or important data stored at other locationsin memory. However, the linker cannot prevent your pointers from being incremented past the end of the memory areas youhave allocated.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing laboratory (ece 420). OpenStax CNX. Sep 27, 2006 Download for free at http://cnx.org/content/col10236/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing laboratory (ece 420)' conversation and receive update notifications?

Ask