SADD Add Two Signed Integers With Saturation

Pipeline

 

 

 

 

 

 

Pipeline

E1

 

 

 

 

 

 

Stage

 

 

 

 

 

 

 

 

 

Read

src1, src2

 

 

 

Written

dst

 

 

 

Unit in use

.L

 

 

 

 

 

 

 

Instruction Type

Single-cycle

 

 

 

Delay Slots

0

 

 

 

See Also

ADD, SSUB

 

 

 

Example 1

SADD .L1

A1,A2,A3

 

Before instruction

 

 

1 cycle after instruction

2 cycles after instruction

A1

5A2E

51A3h

1512984995

A1

 

 

 

 

 

 

 

 

 

 

A2

012A

3FA2h

19546018

A2

 

 

 

 

 

 

 

 

A3

xxxx xxxxh

 

A3

 

 

 

 

 

 

 

 

 

 

CSR

0001

0100h

 

CSR

 

 

 

 

 

5A2E 51A3h

012A 3FA2h

5B58 9145h

0001 0100h

A1

A2

1532531013 A3 CSR

5A2E 51A3h

012A 3FA2h

5B58 9145h

0001 0100h Not saturated

Example 2

SADD .L1

A1,A2,A3

 

Before instruction

 

1 cycle after instruction

2 cycles after instruction

A1

A2

A3

CSR

4367

71F2h

1130852850

A1

 

 

 

 

 

 

 

 

5A2E

51A3h

1512984995

A2

 

 

 

 

 

 

xxxx xxxxh

 

A3

 

 

 

 

 

 

 

 

0001

0100h

 

CSR

 

 

 

 

4367

71F2h

 

A1

 

 

 

 

 

 

 

5A2E

51A3h

 

A2

 

 

 

 

 

7FFF FFFFh

2147483647

A3

 

 

 

 

 

 

 

0001

0100h

 

CSR

 

 

 

 

4367

71F2h

 

 

 

 

 

 

 

5A2E

51A3h

 

 

 

 

 

7FFF FFFFh

 

 

 

 

 

 

 

0001

0300h

Saturated

 

 

 

3-206

Instruction Set

SPRU733

Page 266
Image 266
Texas Instruments TMS320C67X/C67X+ DSP manual ADD, Ssub