A.1.4 encoding notation, A.1.3 – Freescale Semiconductor StarCore SC140 User Manual

Page 320

Advertising
background image

A-6

SC140 DSP Core Reference Manual

DSP Core Instruction Set

A.1.3 Data Representation in Memory for the Examples

For the examples in this appendix, the convention for the representation of data in memory is to show the
same order in memory as is in the source register for a write. For example, a 32-bit write from a register
containing $12345678 to address $100 will be shown as: ($100) = $12345678. The exact order of
multi-byte operands in memory depends on the endian mode, and is described in

Section 2.4.1, “SC140

Endian Support,”

on page 2-56.

A.1.4 Encoding Notation

The instruction encoding is defined for each instruction under Instruction Formats and Opcodes and
Instruction Fields. Each instruction field may not be contiguous in the opcode, but the order of the bits in
each field is consistent from the opcode to the definition of the field. For example, in the MOVE.B
instruction, the encoding for the opcode is

The order of bits for a16 (AAA---A) is the MSB in the first bit at the left-most position in word 1. The LSB
is the right-most position in word 2. If written out fully, the encoding would be:

A more complicated example is for BSR, where two fields are intermixed. The order for each field is
maintained, monotonically decreasing from left to right.

The definition for the field is

:

If the field was written out in the encoding table, it would appear as follows:

15

8

7

0

MOVE.B (a16),DR

0

0

0

1

H H H H A

A

A

0

1

1

1

0

1

0

0

A

A

A

A

A

A

A

A

A

A

A

A

A

15

8

7

0

MOVE.B (a16),DR

0

0

0

1

H

H

H

H

A15 A14 A13

0

1

1

1

0

1

0

0

A12 A11 A10 A9

A8

A7

A6

A5

A4

A3

A2

A1

A0

BSR

>label

0

0

1

0

a

0

1

1

A

A

A

1

1

a

a

a

1

0

0

A

A

A

A

A

A

A

A

A

A

A

A

a

displacement

(>label)

aaaaaAAAAAAAAAAAAAAA0

20-bit signed PC relative displacement

BSR

>label

0

0

1

0

a20

0

1

1

A15 A14 A13

1

1

a19 a18 a17

1

0

0

A12 A11 A10

A9

A8

A7

A6

A5

A4

A3

A2

A1

a16

Advertising