Go to the first, previous, next, last section, table of contents.

Debugging Support

The debugging support of the LANai 3.0 processor enables debugging of programs that run in the user context. As discussed in the LANai 3.0 specification, the isr register includes the dbg_bit, which is always set to 1. As long as the corresponding bit in the imr register is set to 1, the interrupt request for the LANai 3.0 processor will be asserted.

The following technique can be used for debugging code in the user context on a timestep-by-timestep basis:

  1. The debugger, running in the non-interruptable, system context, sets the dbg_bit of imr to 1.
  2. The debugger executes punt instruction, switching to user context.
  3. The user executes for exactly one time-step (regardless of how many clock cycles it may take).
  4. Because the user context is interruptable, the execution switches back to the system context.

Go to the first, previous, next, last section, table of contents.