Motorola dsp assembler Reference Manual



Yüklə 4,8 Kb.
Pdf görüntüsü
səhifə20/91
tarix08.10.2017
ölçüsü4,8 Kb.
#3546
1   ...   16   17   18   19   20   21   22   23   ...   91

Software Project Management
Address Assignment
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
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 HL, 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 HL, 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 (High, Low, and default) are symbolic only, and the Assembler
performs no checks to insure that the value assigned to the High counter is greater than
the Low.  Moreover, there is no inherent relationship among numbered counters, except
that counters 0, 1, and 2 correspond to the default, Low, and High 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 [][]:[][,[][]:[]]


Software Project Management
Address Assignment
4-8
DSP ASSEMBLER REFERENCE MANUAL
MOTOROLA
or alternatively:
        ORG [][()]:[][,[][()]:[]]

Which memory space (X, Y, L, P, or E) will be used as the runtime memory
space. If the memory space is L, any allocated datum with a value greater
than the target word size will be extended to two words; otherwise, it is trun-
cated. If the memory space is E, then depending on the memory space qual-
ifier, any generated words will be split into bytes, one byte per word, or a 16/
8-bit combination.

Which runtime counter H, L, or default (if neither H or L is specified), that is
associated with the will be used as the runtime location counter.

Indicates the runtime physical mapping to DSP memory:  I - internal, E - ex-
ternal, R - ROM, A - port A, B - port B.  If not present, no explicit mapping is
done.

Non-negative absolute integer expression representing the counter number
to be used as the runtime location counter.  Must be enclosed in parenthe-
ses.  Should not exceed the value 65535.

Initial value to assign to the runtime counter used as the .  If   is
a relative expression the Assembler uses the relative location counter.  If
  is an absolute expression the Assembler uses the absolute  loca-
tion counter.  If  is not specified, then the last value and mode that
the counter had will be used.

Which memory space (X, Y, L, P, or E) will be used as the load memory
space. If the memory space is L, any allocated datum with a value greater
than the target word size will be extended to two words; otherwise, it is trun-
cated. If the memory space is E, then depending on the memory space qual-
ifier, any generated words will be split into bytes, one byte per word, or a 16/
8-bit combination.


Software Project Management
Address Assignment
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
4-9

Which load counter, H, L, or default (if neither H or L is specified), that is as-
sociated with the will be used as the load location counter.

Indicates the load physical mapping to DSP memory:  I - internal, E - exter-
nal, R - ROM, A - port A, B - port B.  If not present, no explicit mapping is
done.

Non-negative absolute integer expression representing the counter number
to be used as the load location counter.  Must be enclosed in parentheses.
Should not exceed the value 65535.

Initial value to assign to the load counter used as the .  If   is a
relative expression the Assembler uses the relative location counter.  If
  is an absolute expression the Assembler uses the absolute  loca-
tion counter.  If  is not specified, then the last value and mode that
the counter had will be used.
The ORG directive is useful in multi-programmer projects because it provides a means for
the individual programmer to specify in which memory space and which segment of that
memory space the code being written will be located without specifying an absolute ad-
dress. Absolute address assignment can be deferred until the various components of the
program are brought together. The utility of the ORG directive is not limited to multi-pro-
grammer projects. Even in single programmer projects, the ORG directive supports ma-
nipulation of overlays and the intermixing of label definition and code generation in
multiple memory spaces without having to reinitialize a location counter every time the
load memory space is changed.
4.5.2
  Overlays
If the last half of the operand field in an ORG directive dealing with the load memory space
and counter is not specified, then the Assembler will assume that the load memory space
and load location counter are the same as the runtime memory space and runtime loca-
tion counter.  In this case, object code is being assembled to be loaded into the address
and memory space where it will be when the program is run, and is not an overlay.
If the load memory space and counter are given in the operand field, then the Assembler
always generates code for an overlay. Whether the overlay is absolute or relocatable de-
pends upon the current operating mode of the Assembler and whether the load counter
value is an absolute or relative expression. If the Assembler is running in absolute mode,
or if the load counter expression is absolute, then the overlay is absolute. If the Assembler


Yüklə 4,8 Kb.

Dostları ilə paylaş:
1   ...   16   17   18   19   20   21   22   23   ...   91




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə