<< Chapter < Page Chapter >> Page >

An mmr prefix can be used for indirect memory operands to assert that the memory access is to a memory-mapped register. This prefix can be used on Xmem, Ymem, indirect Smem, indirect Lmem, and Cmem operands. Refer to 1-19 of the SPRU374 for more information if necessary.

The mmap qualifier can be used with numerous instructions to force an access to a memory-mapped register. It can be used with Smem or Lmem direct memory access to prevent the dma access from being relative to the SP or DP. Instead, it will be relative to the memory-mapped register data page start address, which is 00 0000h.

Examples:

MOV mmap(AR6), BSA67 ; sets BSA67 = value in AR6 ; mmap must be used MOV AR1, AR5 ; sets AR5 = AR1

Immediate addressing: #k3, #k5, k, #k9, #lk

Immediate addressing means that the numerical value of the data is itself provided within the assemblyinstruction. Various TMS320C55x instructions allow immediate data of 3, 4,, 5, 7, 8, 9, 12, 16, 23 bits in length, which are signifiedin the assembly language syntax descriptions with one of the above symbols. The 16-bit form is the most common and issignified by #k16 .

An immediate data operand is almost always specified in assembler syntax by prepending a pound sign ( # )to the data. Depending on the context, the assembler may assume that you meant immediate addressing anyway.

Examples:

ADD #FFFFh, *AR3 ; The content addressed by AR3 is added to a signed 16-bit ; value and the result is store back in into the location ; addressed by AR3 AMOV #7FFFFFh, XAR0 ; The 23-bit value is loaded into XAR0

Labels make this more complicated. Recall that a label in your assembly code is nothing more than shorthand for thememory address where the labeled code or data is stored. So does an instruction like

MOV #coef, AR1 ; sets AR1 = memory address of label coef

mean to store the contents of memory location coef in AR1 , or does it mean to store the memory address coef itself in AR1 ? The second interpretation is correct.

Many instructions have several versions allowing the use of different addressing modes (see mov for a good example of this). With these instructions, including thepound sign is not optional when specifying immediate addressing. The only safe rule, then, is always to prefix thelabel with a pound sign if you wish to specify the memory address of the label and not the contents of that address.

Direct addressing: smem and others

In the modes called direct addressing by TI, the memory offset is combined with values in the DPH (the high part of the extended data page register) and DP (data page register) or the SPH (high part of the extended stack pointer) and SP (data stack pointer) to obtain a complete 23-bit data-memory address. The DSP uses SPH/SP or DPH/DP depending on the value of the CPL bit in status register ST1_55.

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 55x). OpenStax CNX. Jan 18, 2010 Download for free at http://cnx.org/content/col10397/1.10
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 55x)' conversation and receive update notifications?

Ask