Linear Assembly For Unrolled Fir Inner Loop With .Mptr Directive - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

6.12.5 Linear Assembly for Unrolled FIR Inner Loop With .mptr Directive

Example 6–68. Linear Assembly for Full Unrolled FIR Filter
.global _fir
_fir:
.cproc
.reg
.reg
.reg
ADD
MVK
MVK
MVK
OUTLOOP:
ADD
SUB
MVK
ZERO
ZERO
[octr]
SUB
.mptr
.mptr
.mptr
.mptr
LDH
Example 6–68 shows the unrolled FIR inner loop with the .mptr directive. The
.mptr directive allows the assembly optimizer to automatically determine if two
memory operations have a bank conflict by associating memory access infor-
mation with a specific pointer register.
If the assembly optimizer determines that two memory operations have a bank
conflict, then it will not schedule them in parallel. The .mptr directive tells the
assembly optimizer that when the specified register is used as a memory point-
er in a load or store instruction, it is initialized to point at a base location + <off-
set>, and is incremented a number of times each time through the loop.
Without the .mptr directives, the loads of x1 and h0 are scheduled in parallel,
and the loads of x2 and h1 are scheduled in parallel. This results in a 50%
chance of a memory conflict on every cycle.
x, h, y
x_1, h_1, sum0, sum1, ctr, octr
p00, p01, p02, p03, p10, p11, p12, p13
x0, x1, x2, x3, h0, h1, h2, h3, rstx, rsth
h,2,h_1
50,octr
64,rstx
64,rsth
x,2,x_1
h_1,2,h
8,ctr
sum0
sum1
octr,1,octr
x,
x+0
x_1, x+2
h,
h+0
h_1, h+2
.D2
*x++[2],x0
; set up pointer to h[1]
; outer loop ctr = 100/2
; used to rst x pointer each outer loop
; used to rst h pointer each outer loop
; set up pointer to x[j+1]
; set up pointer to h[0]
; inner loop ctr = 32/2
; sum0 = 0
; sum1 = 0
; decrement outer loop counter
; x0 = x[j]
Optimizing Assembly Code via Linear Assembly
Memory Banks
6-125

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents