Motorola dsp assembler Reference Manual



Yüklə 4,8 Kb.
Pdf görüntüsü
səhifə9/91
tarix08.10.2017
ölçüsü4,8 Kb.
#3546
1   ...   5   6   7   8   9   10   11   12   ...   91

Motorola DSP Assembler
Assembler Support For Digital Signal Processing
1-10
DSP ASSEMBLER REFERENCE MANUAL
MOTOROLA
runtime memory space and runtime address, respectively. If the Assembler only used
the load address to assign values to labels, then the program would not contain the cor-
rect label references when it was transferred to the runtime memory space and the run-
time address.
During the assembly process, the Assembler uses location counters to record the ad-
dresses associated with the object code. In order to facilitate the generation of object code
for overlays, the Assembler maintains two different location counters, the load location
counter, which determines the address into which the object code will be loaded and the
runtime location counter, which determines the address assigned to labels. In addition,
the Assembler keeps track of the load memory space, which is the memory space into
which the object code will be loaded, and the runtime memory space, which is the mem-
ory space to which an overlay will be transferred and the memory space attribute that will
be assigned to labels. See Chapter 4, Software Project Management, for a practical dis-
cussion of the use of memory spaces and location counters.
The Motorola digital signal processors are capable of performing operations on modulo
and reverse-carry buffers, two data structures useful in digital signal processing applica-
tions. The DSP Assembler provides directives for establishing buffer base addresses, al-
locating buffer space, and initializing buffer contents. For a buffer to be located properly
in memory the lower bits of the starting address which encompass one less than the buffer
size must be zero. For example, the lowest address greater than zero at which a buffer of
size 32 may be located is 32 (20 hexadecimal). More generally, the buffer base address
must be a multiple of 2
k
, where 2
k
 is greater than or equal to the size of the buffer. Buffers
can be allocated manually or by using the Assembler buffer directives (see Chapter 6).
The Assembler operates in either absolute or relative mode, depending on the presence
of the command line -A  option.  In relative mode the Assembler creates relocatable object
files.  These files can be combined and relocated using the Motorola DSP linker.  In ab-
solute mode the Assembler generates absolute object files.  Absolute files cannot be re-
located but can be loaded directly for execution.  By default the Assembler runs in relative
mode.
1.8
  ASSEMBLER SUPPORT FOR DIGITAL SIGNAL PROCESSING
As mentioned previously, the Assembler offers facilities commonly found in other macro
Assemblers, such as nested macro capabilities, include files, and conditional assembly.
The Assembler must also provide extensions in support of the unconventional architec-
ture of the Motorola digital signal processors, as well as aids for programming DSP-spe-
cific applications.  Some of these features are discussed briefly below; see the
appropriate chapters later in this manual for more information.
The Assembler supports the use of arbitrary algebraic expressions as arguments to vari-
ous directives and as immediate operands in certain instructions. Terms of these expres-
sions may consist of the Assembler’s own built-in functions, which perform data
conversion, comparison, and computational operations. In the digital signal processing
domain transcendental functions for computing sine, cosine, and natural logarithm are


Motorola DSP Assembler
Assembler Support For Digital Signal Processing
MOTOROLA_DSP_ASSEMBLER_REFERENCE_MANUAL_1-11'>MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
1-11
useful for initializing data values in memory, such as sine/cosine tables for FFT algo-
rithms. Also, there are functions for easily converting values expressed in decimal floating
point to their binary or fractional equivalents. This conversion is done automatically for im-
mediate instruction operands and arguments to the DC directive (see Chapter 6). See
Chapter 3 for more information on Assembler expressions, operators, and built-in func-
tions.
The register set of the Motorola digital signal processors allows for efficient use of modulo
and reverse-carry buffers for FFT applications. The Assembler supports this architecture
by providing several special-purpose directives for allocating circular buffers. The
BADDRBUFFERDSM, and DSR directives automatically advance the program counter
to the next appropriate base address given the buffer size, and perform various boundary
and magnitude checks to insure that the buffer is valid. The BSM and BSR provide for
automatic alignment and block initialization of DSP buffers. Since a buffer allocated in this
fashion can cause alignment gaps in memory, the MU option (see the OPT directive,
Chapter 6) may be used to generate a full memory utilization report. See Chapter 6 for
more information on Assembler directives and options.



MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
2-1
Chapter 2
WRITING ASSEMBLY LANGUAGE PROGRAMS
2.1
  INPUT FILE FORMAT
Programs written in assembly language consist of a sequence of source statements. Any
source statement can be extended to one or more lines by including the line continuation
character (\) as the last character on the line to be continued. A source statement (first line
and any continuation lines) can be a maximum of 512 characters long. Upper and lower
case letters are considered equivalent for Assembler mnemonics and directives, but are
considered distinct for labels, symbols, directive arguments, and literal strings.
If the source file contains horizontal tabs (ASCII $09), the Assembler will expand these to
the next fixed tab stop located at eight character intervals (column 1, 9, 17...), unless reset
using the TAB directive (see Chapter 6). This is only significant if tab characters are em-
bedded within literal strings.
For more information on source input file format, see Appendix G, Host-dependent Infor-
mation.
2.2
  SYMBOL NAMES
Symbol names can be from one to 512 characters long. The first character of a symbol
must be alphabetic (upper or lower case); any remaining characters can be either alpha-
numeric (A-Z, a-z, 0-9) or the underscore character (_). Upper and lower case letters in
symbols are considered distinct unless the IC option is in effect (see the OPT directive,
Chapter 6).
Valid:
loop_1
Invalid:
1_loop
ENTRY
loop.e
a_B_c
Certain identifiers are reserved by the Assembler and cannot be used. These identifiers
are the upper or lower case name of any Motorola DSP processor register. See Appendix
F for a list of the register names of the appropriate target processor.


Yüklə 4,8 Kb.

Dostları ilə paylaş:
1   ...   5   6   7   8   9   10   11   12   ...   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ə