Скачиваний:
38
Добавлен:
27.04.2015
Размер:
3.97 Mб
Скачать

Freescale Semiconductor, Inc.

Breakpoint Configuration

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

12.8 Breakpoint Configuration

The breakpoint 1 unit is programmed in the OCR using the BS and BE bits. The breakpoint 2 unit is programmed by the OnCE breakpoint 2 control (OBCTL2) register, located within the breakpoint 2 unit. The manner in which the two breakpoints are set up for generating triggers and interrupt conditions is specified by the BK bits in the OCR. The action that is performed when a final trigger is detected is specified by the EM bits in the OCR. Figure 12-12 shows the breakpoint programming model for the dual breakpoint system.

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

OnCE™ Module 12-31

For More Information On This Product,

Go to: www.freescale.com

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

OnCE™ Module

Freescale Semiconductor, Inc.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

 

 

 

OCR— $02

15

14

13

12

11

10

9

8

7

6

5

 

4

3

 

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Control

COP

DE

BK

BK

BK

 

BK

BK

DRM

FH

 

EM1

EM0

PWD

BS1

 

BS0

BE1

BE0

 

Register

DIS

 

4

3

2

 

1

0

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Reset = $0010

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read/Write

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OCNTR— $03

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Count

 

 

8-Bit Event Counter

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Reset = $0000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read/Write

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OBAR— $04

15

14

13

12

11

10

9

8

7

6

5

 

4

3

 

2

1

0

OnCE Breakpoint

 

 

 

 

 

 

16-Bit Breakpoint Address Register

 

 

 

 

 

 

Address Register

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Program or Data Memory Breakpoints)

 

 

 

 

 

 

Reset: Not modified

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Write-Only

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OBAR2— $05

15

14

13

12

11

10

9

8

7

6

5

 

4

3

 

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Breakpoint

 

 

 

 

 

 

16-Bit Breakpoint Address Register

 

 

 

 

 

 

Address Register 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Address or Data Breakpoints)

 

 

 

 

 

 

Reset: Not modified

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read/Write

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OBMSK2— $06

15

14

13

12

11

10

9

8

7

6

5

 

4

3

 

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Breakpoint

 

 

 

 

 

 

16-Bit Breakpoint Mask Register

 

 

 

 

 

 

Mask Register 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(Address or Data Breakpoints)

 

 

 

 

 

 

Reset: Not modified

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read/Write

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OBCTL2— $07

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Breakpoint

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

EN

INV

DAT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Control Register 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Reset = $0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read/Write

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE Port Interrupt Vectors:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OnCE TRAP

 

 

 

 

 

 

 

 

P:$000C

 

 

 

 

 

 

Enabling OnCE port interrupts in the IPR:

OnCE TRAPs are level 1 interrupts and not programmable in the IPR.

AA1396

Figure 12-12. OnCE Breakpoint Programming Model

The breakpoint 1 unit’s circuitry contains the OMAL, OBAR, OMAC, and OCNTR. The OMAC, an address comparator, and the OBAR, its associated breakpoint address register, are useful in halting a program at a specific point to examine or change registers or memory. Using the OMAC to set breakpoints enables the user to set breakpoints in RAM or ROM while in any operating mode. The OBAR is dedicated to breakpoint 1 logic. Figure 12-13 illustrates a block diagram of the breakpoint 1 unit.

12-32 DSP56824 User’s Manual

For More Information On This Product,

Go to: www.freescale.com

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Freescale Semiconductor, Inc.

Breakpoint Configuration

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

XAB1 PAB

 

 

 

OMAL

 

 

OBAR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Memory Address

 

 

 

Pwd

Breakpoint

 

 

 

Write-Only

 

MUX & Latch

 

 

 

Address Register

 

 

 

via OnCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16

 

 

 

16

 

 

 

 

OMAC

Comparator

1

Breakpoint 1

AA0837

Figure 12-13. Breakpoint 1 Unit

For breakpoint 1, a valid address compare is defined as follows: the value in OBAR matches the value on PAB or XAB1 while meeting the breakpoint conditions specified by the BE/BS bit combination. A valid address compare for breakpoint 1 can then do a few things based on BK encodings and the state of OCNTR. BK could dictate that the first valid address compare enables trace to decrement OCNTR. BK could also dictate that a valid address compare directly decrements OCNTR. If OCNTR = 0 (because of previous decrements or a direct OCNTR write), one more valid address compare can be set to generate a hardware breakpoint event. In this case, HBO is set, the DE pin is asserted (if enabled), and the EM bits determine whether to halt the core or only the FIFO.

Figure 12-14 provides a block diagram of the breakpoint 2 unit. This unit also has its own address register OBAR2 (similar to breakpoint 1’s OBAR) and address comparator OMAC2 (similar to breakpoint 1’s OMAC). If BE = 00, the breakpoint 2 unit is disabled. Other BE encodings and all BS encodings refer only to breakpoint 1 functionality. The BK encoding selects which, if any, breakpoint unit or combination of units (OR/AND) decrements OCNTR. The breakpoint 2 unit operates in a similar manner. A valid breakpoint 2 address compare occurs when the value on the PAB or CGDB matches the value in the OBAR2 for the bits selected with the OnCE breakpoint mask register 2 (OBMSK2).

OnCE™ Module 12-33

For More Information On This Product,

Go to: www.freescale.com

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Freescale Semiconductor, Inc.

OnCE™ Module

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

PAB CGDB

 

 

 

 

OMAL2

 

 

 

 

 

 

OBAR2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Memory Address

 

 

PWD

 

 

 

Breakpoint 2

 

 

 

 

 

Read/write

 

 

MUX & Latch

 

 

 

 

 

Address Register

 

 

 

 

 

via OnCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16

 

 

 

 

 

 

 

16

 

 

 

 

 

 

 

 

 

OBMSK2

 

 

 

 

 

 

OMAC2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Comparator

 

 

 

 

 

 

Breakpoint 2

 

 

 

 

Read/write

 

 

 

 

 

 

 

 

 

 

 

Mask Register

 

 

 

 

via OnCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

16

 

 

16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OBCTL2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mask

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Breakpoint 2

 

 

 

Read/write

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Control

 

via OnCE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Optional Invert

1

Breakpoint 2

AA0838

Figure 12-14. Breakpoint 2 Unit

A valid breakpoint 2 address compare can do the following based on BK and the state of OCNTR:

If OCNTR > 0, the OCNTR is decremented directly.

If OCNTR = 0, one more valid address compare can generate an HBO event.

The first valid address compare can trigger breakpoint 1 valid address compares to begin decrementing the OCNTR.

A valid address compare when OCNTR = 0 can trigger a breakpoint 1 valid address compare to generate an HBO event.

A valid address compare can generate a OnCE module interrupt. This is not considered an event, since no event flag is set. It is useful for programmable ROM (PROM) code patching.

The first valid address compare can trigger trace to decrement the OCNTR.

The first valid address compare can trigger the first valid address compare on breakpoint 1 to allow trace to decrement the OCNTR.

NOTE:

When a breakpoint is set up on the CGDB bus with this unit, the breakpoint condition is qualified by an X memory access with the first breakpoint unit.

The BE/BS bits allow the user to define the conditions that determine a valid breakpoint. Using these bits, breakpoints could be restricted to occur on first data memory reads or only on fetched instructions that are executed. Again, these bits pertain only to breakpoint 1. See Section 12.4.4.8, “Breakpoint Selection (BS[1:0])—Bits 3–2,” and Section 12.4.4.9, “Breakpoint Enable (BE[1:0])—Bits 1–0,” to understand various encodings.

12-34 DSP56824 User’s Manual

For More Information On This Product,

Go to: www.freescale.com

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