Freescale Semiconductor SC140 specifications Example rted, Trap

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 683
Image 683

RTED

Example rted

Instruction

Comment

move.w #$2000,vba

Load the vector base address register.

trap

Issue a software interrupt and enter the exception state.

- - -

Instructions in the trap routine located at the address found

at $2000 and trap_vector offset.

 

Execute the not instruction and the inc d1 instruction in the

rted not d4,d2

delay slot. Return to the original working mode (see exam-

inc d1

ple for RTE).

Instruction Formats and Opcodes

Instruction

Words

Cycles1

Type

RTED

1

5/6

4

Opcode

15

 

 

 

 

 

 

8

7

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

0

0

1

1

1

1

1

0

1

1

1

0

0

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Note 1: The shadow SP is valid or not valid. RTED uses 5 cycles if the shadow SP is valid. RTED uses 6 cycles if the shadow SP is not valid. To get the correct cycle count for this instruction, subtract the execution time used by the execution set in the delay slot. The cycle count for this instruction cannot be less than 2 cycles.

SC140 DSP Core Reference Manual

A-369

Page 683
Image 683
Freescale Semiconductor SC140 specifications Example rted, Trap