DSPRelated.com
Forums

c6201 memory map

Started by swaminathanr2000 August 6, 2004
hi everyone,
i am doing a project in mpeg2 aac decoder and i want to finally port
it to a c6201 processor.at present i am using ccs to port and
optimise.
at present i am stuck at writing the linker commmand file and am not
able to move the data into data memory.
can you please help me out by giving me the exact location of
program, data and external memory for either map 0 or map 1 type. and
if any special format of writing the linker command file?
at present i have used program memory beginning as 0x01400000 and
size 64k , data 0x80000000 size 64k and ext mem 0x00000000 size 16mb.
i hope these figures r right but i keep getting an error :accesssing
a reserved mem location.
please reply as soon as possible.

swami.




> Date: Fri, 06 Aug 2004 05:16:54 -0000
> From: "swaminathanr2000" <>
>
> hi everyone,
> i am doing a project in mpeg2 aac decoder and i want to finally port
> it to a c6201 processor.at present i am using ccs to port and
> optimise.
> at present i am stuck at writing the linker commmand file and am not
> able to move the data into data memory.

C6000 has a very simple memory architecture. The memory system is a
flat, byte addressable 4Gig (that is a 32 bit address) address range,
split into smaller pieces to connect to different types of RAMs
(SDRAM or SBSRAM), to address memory mapped registers (MMRs) and for
internal (in the case of C6201 program and data) memory. No MMU or
virtual addressing, so a 32 bit number defines a physical location.

The memory might be either big- or little-endian and addresses of
entities larger than the MAU (the minimal addressable unit or
MADU -- the minimal addressable data unit) or byte in the case
of C6000, have to be aligned on the corresponding address boundary,
halfwords (two bytes long) should have the LSB zero, words (four bytes)
should have two LSBs zeros and doublewords (eight bytes) should have
three LSBs zeros. A C64xx has a set of non-aligned load/store
instructions, but they aren't available on a C6201.

A C620x/C6701 also have two maps, which usually are preset in hardware
and by default (at least I think so!) map 1 is used. If your hardware
allows, use map 1 instead of map 0 :)

You might want to read chapters 3 (C6201/6701 internal memory) and 11
(boot modes) in the SPRU190D for complete information about memory and
memory modes, or chapter 1 in SPRU577 and SPRU642 documents.

There is also a set of MMRs that defines parameters of the external
memory, but hopefully these are preset in your hardware, so you
do not need to set them up manually, or write a gel subroutine or
use CSL.

> can you please help me out by giving me the exact location of
> program, data and external memory for either map 0 or map 1 type. and

See Boot modes (chpt 11 of SPRU190D or SPRU642).

> if any special format of writing the linker command file?

The most interesting part :) Fortunately the file is a plain ASCII
file (as opposed to ADI ldfs, which are in an xml format -- stupid!).
However, there are a few directives to describe memory ranges, memory
input/output sections and memory/sections attributes. The linker
commands are explained with examples in the SPRU186M, chapter 7.

It might also be helpful to read Introduction to COFF (chapter 2 of
SPRU186M) and SPRU186K chapter 5 Linking C/C++ code to find out
what sections are created by the compiler/assembler.

> at present i have used program memory beginning as 0x01400000 and
> size 64k , data 0x80000000 size 64k and ext mem 0x00000000 size 16mb.
> i hope these figures r right but i keep getting an error :accesssing
> a reserved mem location.

You might need to review you cmd (ldf) file and also check your program
does not perform memory access outside available memory range.

> please reply as soon as possible.
>
> swami.

HTH,

Andrew