Using IXP2400/2800 Development Tools: A Hands-on Approach to Network Processor Software Design

Appendix A: MEv2 Instruction Set Syntax

Table A.1 lists the syntax for the microengine version 2 instruction set.

Table A.1: MEv2 Instruction Set Syntax

Instruction type

Syntax Example

Description

Alu

alu[dest, a, op, b]

op: +, +16, +8, +carry, -carry, -,

B-A, B, ~B, AND, ~AND, AND~,

OR, XOR

Perform alu operation using a, b sources, result to dest.

Alu Shift

alu_shf[dest, a, op, b, bshf_op]

alu_shf[res, a, AND, b, <

bshf_op: >>n, <>indirect,

<>rotn, <

Shift b, then perform alu operation using a, b sources, result to dest.

Byte field insert

ld_field[a, 1001, b]

ld_field_w_clr[a, 1001, b]

Insert bytes into a from b.

w_clr: clear a first

Branch

br[label#], opt_tok

Go to instruction after label#:

Optional token defer[max 2]

Branch on condition

bcc[label#], opt_tok

bcc: beq, bne, bmi, bpl, bcs, bhs, bcc, blo, bvs, bvc, bge, blt, bgt, ble

If condition code true, go to instruction after label#:

Optional token defer[max 3]

Branch on bit

br_bclr[reg, bit_pos, label#]

br_bset

If bit clr or set, go to label#.

Branch on byte

br=byte[reg, byte_pos, val, label#]

br!=byte

If byte compare to value, go to label#.

Branch on state

br_inp_state[state_name, label#]

br!_!inp_state

br_signal

br_!signal

If ME or signal state true, go to label#.

immed

immed[dest, const]

immed[dest, const, shf_op]

immed_b0, immed_b1, immed_b2,

immed_b3, immed_w0, immed_w1

Load a literal value.

Jump

jump[src, label#]opt_tok

Go to label# + GPR offset.

Context Swap

ctx_arb[op], opt_tok

op: sig_list, voluntary, bpt, kill, --

Thread context voluntary swap.

Nop

nop

No operation.

I/O

unit[op, xfer, a1, a2, count], tok

unit: dram, sram,...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Label and Nameplate Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.