Software Project Management
Address Assignment
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
For More Information On This Product,
Go to: www.freescale.com
4-7
crement of the location counter. There are many kinds of
E
memory depending on the
characteristics of the RAM devices used. In most cases
E
memory implies splitting the
generated word into 8-bit triplets or 8 and 16-bit pairs on output, and adjusting the location
counter appropriately.
The Assembler allows for two sets of program counters per memory space, a set of load
counters and a set of runtime counters. The distinction between load and runtime
counters is maintained so that the Assembler can support
overlays
, or runtime transfers
of code/data from one memory space to another. In these cases code or data might be
loaded in one memory space at a given address, but then copied to a different memory
space and address for execution. The Assembler can produce output for either absolute
or relocatable overlays.
Motorola DSPs are capable of performing special-purpose addressing on data structures
suited to digital signal processing applications. Two such data structures are the modulo
buffer and the reverse-carry buffer, collectively referred to as
circular buffers
. Due to the
way they are accessed and manipulated, these buffers generally are constrained to a par-
ticular size or starting address. The Assembler provides directives for aligning buffer base
addresses, allocating buffer space, and initializing buffer contents.
4.5.1
The ORG Directive
The
ORG
directive specifies which memory space will be the runtime memory space and
which counter (the
H
,
L
, default, or numbered runtime counter associated with that mem-
ory space and section) will be the runtime location counter. At the same time, the
ORG
directive indicates which memory space will be the load memory space and which counter
(the
H
,
L
, default, or numbered load counter associated with that memory space and sec-
tion) will be used as the load location counter. In addition, the
ORG
directive can be used
to specify a physical mapping to DSP memory and to assign initial values to the runtime
and load location counters.
The names of the counters (
H
igh,
L
ow, and default) are symbolic only, and the Assembler
performs no checks to insure that the value assigned to the
H
igh counter is greater than
the
L
ow. Moreover, there is no inherent relationship among numbered counters, except
that counters 0, 1, and 2 correspond to the default,
L
ow, and
H
igh counters, respectively.
Counters are useful for providing mnemonic links between runtime and load memory
spaces or among individual memory blocks. Separate counters can be used to obtain
blocks within a common section which are accessed from one memory space but mapped
to separate physical memories. Also counters are necessary for handling relocatable
overlays at link time, as the DSP linker does not support the notion of separate load and
runtime counters. See the examples below for more information on location counter us-
age.
The
ORG
directive is organized as follows:
ORG
<rms>[<rlc>][<rmp>]:[<exp1>][,<lms>[<llc>][<lmp>]:[<exp2>]]
F
Freescale Semiconductor, Inc.
n
.