SpaceWire UK
Specialist providers of VHDL Intellectual Property & Design Services
Raptor-16 Control Register
The Raptor-16 Microprocessor Control Register is used to hold the following information:-
  • 7-bit Interrupt Mask
  • 3-bit Execution Level
  • 4-bit Condition Codes
The layout for this register is shown below:-

Unused Execution Level Condition Codes Unused Interrupt Mask
- 0 to 7 So Uo Ng Zr - $00 to $EF
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Execution Level - This field holds the priority level that the current code is being executed at. User code is executed at level 0 and interrupt code is executed at levels 1 through 7.

Condition Codes - This field holds the four condition codes; Unsigned Overflow, Signed Overflow, Negative and Zero.

Interrupt Mask - This field holds the enable bit for each interrupt level and when set will enable the selected interrupts.

Unused - This field is unused and should be left unset.

Although all fields can be changed in both user and interrupt code the only useful field to change is the interrupt mask. When modifying the Control Register in interrupt code please remember that upon exiting the interrupt code the old Control Register will be restored. If an indefinite change to the Control Register is required from within interrupt code then the Control Register held on the stack must be changed, but remember not to destroy the Execution Level or Condition Codes when doing so!!