Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
34
Добавлен:
27.04.2015
Размер:
1.98 Mб
Скачать

Breakpoint 2 Architecture

The following instructions are considered to be change of flow:

BRA

JMP

Bcc (with condition true)

Jcc (with condition true)

BRSET

BRCLR

RTS

RTI

JSR

 

NOTE:

Addresses of JSR instructions at interrupt vector locations are not stored in the change-of-flow FIFO.

When one of the listed instructions is executed, its opcode address is immediately placed in the top location of the change-of-flow FIFO (as well as being placed in OPABER). Previous addresses placed in the OPFIFO are shifted down one location, and the oldest address is overwritten. The OPABDR holds the PC value. If the core has been halted, the next opcode to be executed resides at the memory location pointed to by OPABDR.

Reads of the OPFIFO register return the oldest value in the OPFIFO first. The next read returns the next oldest. The nth read in an n-deep OPFIFO returns the latest change-of-flow address. It is recommended that all OPFIFO locations are read (that is, n reads for an n-deep OPFIFO) so that the oldest-to-newest ordering is maintained when address capture resumes.

The change-of-flow aspect of the FIFO begins after the OPABER and not the fetch, decode, or execute registers (OPABFR, OPABDR, or OPABER). Thus, changes of flow affect only the contents of the OPFIFO.

When the OPFIFO is halted in response to setting the FH bit, PAB capture halts immediately. Transfers in progress can be interrupted, meaning that while determinate values are in the registers, these values may not provide entirely coherent information regarding the recent history of program flow.

In addition, the state of the OPFIFO can be different when it is halted due to an event occurring when EM = 01 than when it is halted with the core due to an event occurring when EM = 00.

12.7 Breakpoint 2 Architecture

All DSP56800 chips contain a breakpoint 1 unit. The DSP56824 provides a breakpoint 2 unit that allows greater flexibility in setting breakpoints. Adding a second breakpoint greatly increases the debug capability of the device. It allows the following additional breakpoints for the detection of more complex events:

On either of two program memory breakpoints (that is, on either of two instructions)

On a data value at a particular address in data memory

On a bit or field of bits in a data value at a particular address in data memory

On a program memory or data memory location (on XAB1)

On a sequence of two breakpoints

 

OnCE™ Module

12-29

OnCE™ Module

Upon detecting a valid event, the OnCE module then performs one of the following four actions:

Halt the DSP core and enter the debug processing state

Interrupt the DSP core

Halt the OnCE FIFO but let the DSP core continue operation

Rearm the trigger mechanism (and toggle the DE pin)

The breakpoint 1 unit is used in conjunction with the breakpoint 2 unit for the detection of more complex trigger conditions. The breakpoint 1 unit is the same as found on other DSP56800 chips. The breakpoint 2 unit allows specifying more complex breakpoint conditions when used in conjunction with the first breakpoint. In addition, it is possible to set up breakpoint 2 for interrupts while leaving breakpoint 1 available to the JTAG/OnCE port. Note that when a breakpoint is set up on the CGDB with the breakpoint 2 unit, the breakpoint condition should be qualified by an X memory access with the breakpoint 1 unit.

Figure 12-11 shows how the two breakpoint units are combined in the breakpoint and trace counter unit to specify more complex triggers and to perform one of several actions upon detection of a breakpoint. In addition to simply detecting the breakpoint conditions, this unit allows the first of the two breakpoints to be qualified by the BS and BE bits found in the OCR. This allows a breakpoint to be qualified by a read, write, or access condition. The second breakpoint is unaffected by these bits and merely detects the value on the appropriate bus. A counter is also available for detecting a specified occurrence of a breakpoint condition or for tracing a specified number of instructions.

Breakpoint 1

JTAG

DEBUG_REQ

 

Breakpoint 2

EM[1:0]

 

End of

 

 

 

 

Instruction

 

 

Enter DEBUG

 

 

Final

Final

 

BS[1:0]

 

Trigger

FIFO Halt

 

Logic

 

 

 

 

Breakpoint and

 

FH

 

BE[1:0]

 

DEBUG

 

 

Trace Control

 

 

BK[4:0]

 

Instruction

 

Interrupt

 

 

 

 

 

 

Breakpoint 2 Interrupt

 

Event

Count

 

 

 

Detected

is Zero

 

 

 

 

Event

Read/Write

 

 

 

via OnCE

 

 

 

Counter

 

 

 

 

 

 

OCNTR

JTAG

DE Pin Logic

 

DE Control

DEBUG_REQ

AA1392

Figure 12-11. Breakpoint and Trace Counter Unit

12-30

DSP56824 User’s Manual

 

Соседние файлы в папке DSP568xx