
Information Manual
DSP1611/17/18/27/28/29 DIGITAL SIGNAL PROCESSOR
April 1998
Core Architecture
Lucent Technologies Inc.
DRAFT COPY
5-5
(continued)
5.1.5 Counters (continued)
The following code segment example illustrates the use of c1 as a loop counter:
c1 = 1-4
/* Initialize counter to 1-4 = -3
*/
loop:
instruction
instruction
if c1lt goto loop /* If c1 < 0, condition lt (less than 0) is met...,
*/
/* c1 increments and control goes to loop. If c1 = 0, */
/* condition not met, and control goes on to next.
*/
/* The loop is executed four times.
*/
next:
This following code example demonstrates nested loops that loop through the outer loop eight times and through
the inner loop four times for each outer loop.
c0 = 1-8
/* initialize c0 to 1-8 = -7
*/
outerloop:
instruction
/* do operations in outerloop
*/
c1 = 1-4
/* initialize c1 to 1-4 = -3
*/
innerloop:
instruction
/* do operations in innerloop
*/
if c1lt goto innerloop
/* repeat innerloop, for c1; if c1 = 0,
*/
instruction
/* go on more outerloop ops
*/
if c0lt goto outerloop
/* repeat outerloop, for c0; if c0 = 0,
*/
next:
/* go to next
*/
Another way to use the counters is with the ifc CON F2
1
special function group instruction. This instruction auto-
matically generates the following sequence:
1. Tests the condition CON
2
. Increments counter c1.
2. If true, performs operation F2 and loads c2 with the number in c1.
3. If false, goes onto next instruction.
illustrates using the counter with special function instructions. c2 is a holding register for
c1. c1 continues to increment and c2 receives the count in c1 if a true condition occurs. No instructions increment
c2 because its only use is as a holding register for c1.
1.See
for a description of the special function instruction group.
2.CON is any conditional (see
).
…
…
…
…
Summary of Contents for DSP1611
Page 18: ...Chapter 1 Introduction...
Page 27: ...Chapter 2 Hardware Architecture...
Page 52: ...Chapter 3 Software Architecture...
Page 116: ...Chapter 4 Instruction Set...
Page 154: ...Chapter 5 Core Architecture...
Page 176: ...Chapter 6 External Memory Interface...
Page 208: ...Chapter 7 Serial I O...
Page 237: ...Chapter 8 Parallel I O DSP1617 Only...
Page 261: ...Chapter 9 Parallel Host Interface PHIF DSP1611 18 27 28 29 Only...
Page 275: ...Chapter 10 Bit I O Unit...
Page 284: ...Chapter 11 JTAG Test Access Port...
Page 306: ...Chapter 12 Timer...
Page 313: ...Chapter 13 Bit Manipulation Unit...
Page 325: ...Chapter 14 Error Correction Coprocessor DSP1618 28 Only...
Page 350: ...Chapter 15 Interface Guide...
Page 367: ...Appendix A Instruction Encoding...
Page 379: ...Appendix B Instruction Set Summary...
Page 381: ...aD extractz aS IM16 B 52 aD insert aS arM B 53 aD insert aS IM16 B 54 aD aS aaT B 55...
Page 437: ...Index...