4-4
SC140 DSP Core Reference Manual
Emulation and Debug (EOnCE)
4.3.2 EOnCE Dedicated Instructions
The instruction set of the SC140 core architecture includes three instructions which are dedicated to the
EOnCE module and available for debugging purposes:
DEBUG
— Upon decoding by the core, an indication is sent to the EOnCE module that requests the
program control unit (PCU) of the program sequencer unit (PSEQ) to enter the core into debug mode
of operation.
DEBUGEV
— This instruction indicates to the EOnCE that a debug event has occurred. The core
signals to the EOnCE module that this instruction is in the decode stage of the pipeline. EOnCE
handles the instruction according the control registers’ preprogrammed settings.
MARK
— Upon execution by the core when the TMARK bit in the TB_CTRL register is set, its
program counter (PC) value is put into the trace buffer. This enables it to mark the different parts of
application code that can be executed by different threads. See
Section 4.9.1, “Trace Buffer Control
Register (TB_CTRL),”
for further details.
4.3.3 Debug Mode
Debug mode is a special core processing state in which the pipeline is stalled, waiting for commands from
the EOnCE through the JTAG. All the execution units are ready to operate, but the PSEQ dispatcher
module does not dispatch any new execution sets to the execution units. Peripherals can include control
bits that determine whether they continue to operate in debug mode.
Two actions are possible in debug mode:
Execute a Single Step — The core leaves debug mode for one cycle. The currently fetched
execution set is executed, after which the core then returns to debug mode and the PSEQ proceeds
to the next execution set.
Insert an Instruction from the JTAG or EOnCE — A MOVE, JMP, or BRA instruction can be
inserted and executed without the core leaving debug mode.
The core can be put into debug mode by a request from the EOnCE when:
The DEBUG instruction is issued.
The EE0 signal is held at logic 1 at the exit from reset.
The EE0 signal is asserted when configured as a debug request.
The JTAG DEBUG_REQUEST instruction is issued.
The trace buffer is full and the TBFDM bit is set in the EOnCE monitor and control register (EMCR).
The event selector (ES) is programmed to enter the core into debug mode upon the detection of an
appropriate event.
When the EE0 signal causes the core to enter debug mode, the signal must be asserted until the user
receives debug acknowledgement.
If the core is in normal execution mode or in power-saving mode (stop or wait) when a debug request is
issued, the core enters debug mode. In special cases where the core is frozen (for example, during external
access) the core enters debug mode after restart of the core clock.
To exit debug mode, set the EX bit in the EOnCE command register (ECR) by the EOnCE command
shifted through the JTAG port. See
Section 4.5.1, “EOnCE Command Register (ECR),”
for more details.
Debug mode is also exited upon a reset.