Bar
SpaceWire UK
Specialist providers of VHDL Intellectual Property & Design Services
BarBarBarBar
Raptor-16 Instruction Density
The Raptor-16 Microprocessor executes very dense instruction code that is packed mainly into single words. The listings below show not only the instruction word counts but also give a full list of all the possible Addressing Mode combinations for the entire Instruction Set.



Single Word Instructions
The following Instructions plus their Addressing Modes, Registers and Data Values are all encoded in one single 16-bit word:-

InstQ #n,Dn InstQ #n,An InstQ #n,(An) InstQ #n,-(An)
InstQ #n,(An)+ InstQ #n,Pn InstQ #n,CR

Inst Dn,Dn Inst Dn,An Inst Dn,(An) Inst Dn,-(An)
Inst Dn,(An)+ Inst Dn,Pn Inst Dn,CR

Inst An,Dn Inst An,An Inst An,(An) Inst An,-(An)
Inst An,(An)+ Inst An,Pn Inst An,CR

Inst (An),Dn Inst (An),An Inst (An),(An) Inst (An),-(An)
Inst (An),(An)+ Inst (An),Pn Inst (An),CR

Inst -(An),Dn Inst -(An),An Inst -(An),(An) Inst -(An),-(An)
Inst -(An),(An)+ Inst -(An),Pn Inst -(An),CR

Inst (An)+,Dn Inst (An)+,An Inst (An)+,(An) Inst (An)+,-(An)
Inst (An)+,(An)+ Inst (An)+,Pn Inst (An)+,CR

Inst Pn,Dn Inst Pn,An Inst Pn,(An) Inst Pn,-(An)
Inst Pn,(An)+ Inst Pn,Pn Inst Pn,CR

Inst CR,Dn Inst CR,An Inst CR,(An) Inst CR,-(An)
Inst CR,(An)+ Inst CR,Pn Inst CR,CR

LoadQ #n,Dn LoadQ #n,An

PushL RegList PushU RegList PopL RegList PopU RegList

BInstQ Cond,#n BInstQ Cond,Label BInst Cond,Dn BInst Cond,An
BInst Cond,(An) BInst Cond,-(An) BInst Cond,(An)+ BInst Cond,Pn

Rts Cond Rti Nop

Notes :-
  • #n is any number in the range -8..7 when InstQ is Move, And, Or, Xor or Cmp.
  • #n is any number in the range 0..15 when InstQ is Shl, Shr, Add or Sub.
  • #n is any number in the range -128..127 for LoadQ instructions.
  • #n is any number in the range 0..7 for BInstQ instructions.
  • Dn is any Data Register in the range D0..D7.
  • An is any Address Register in the range A0..A5, SP or PC.
  • Pn is any Port Register in the range P0..P4.
  • RegList is any or all from D0..D3 and A0-A3 for PushL and PopL instructions.
  • RegList is any or all from D4..D7, A4-A5, SP and PC for PushU and PopU instructions.
  • Cond is either alw, nev, zrs, zrc, ngs, ngc, uos, uoc, sos, soc, equ, neq, ugt, uge, ult, ule, sgt, sge, slt or sle.
  • Label is any relative location in the range -64..127.
  • Inst is either Move, And, Or, Xor, Cmp, Shl, Shr, Add or Sub.
  • InstQ is either MoveQ, AndQ, OrQ, XorQ, CmpQ, ShlQ, ShrQ, AddQ or SubQ.
  • BInst is either Bra or Bsr.
  • BInstQ is either BraQ or BsrQ.



Double Word Instructions
The following Instructions plus their Addressing Modes, Registers and Data Values are all encoded in two 16-bit words:-

Inst #n,Dn Inst #n,An Inst #n,(An) Inst #n,-(An)
Inst #n,(An)+ Inst #n,Pn Inst #n,CR

Inst Addr,Dn Inst Addr,An Inst Addr,(An) Inst Addr,-(An)
Inst Addr,(An)+ Inst Addr,Pn Inst Addr,CR

Inst Dn,Addr Inst An,Addr Inst (An),Addr Inst -(An),Addr
Inst (An)+,Addr Inst Pn,Addr Inst CR,Addr

BInst Cond,#n BInst Cond,Label

Notes :-
  • #n is any number in the range -32768..65535 for Inst instructions.
  • #n is any number in the range 0..65535 for BInst instructions.
  • Dn is any Data Register in the range D0..D7.
  • An is any Address Register in the range A0..A5, SP or PC.
  • Pn is any Port Register in the range P0..P4.
  • Addr is any number in the range 0..65535.
  • Cond is either alw, nev, zrs, zrc, ngs, ngc, uos, uoc, sos, soc, equ, neq, ugt, uge, ult, ule, sgt, sge, slt or sle.
  • Label is any relative location in the range -32768..32767.
  • Inst is either Move, And, Or, Xor, Cmp, Shl, Shr, Add or Sub.
  • BInst is either Bra or Bsr.



Triple Word Instructions
The following Instructions plus their Addressing Modes, Registers and Data Values are all encoded in three 16-bit words:-

Inst #n,Addr Inst Addr,Addr

Notes :-
  • #n is any number in the range -32768..65535.
  • Addr is any number in the range 0..65535.
  • Inst is either Move, And, Or, Xor, Cmp, Shl, Shr, Add or Sub.