Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CS 220 / ARM / ARM1176JZ-S Technical Reference Mmanual.pdf
Источник:
Скачиваний:
48
Добавлен:
16.04.2015
Размер:
4.47 Mб
Скачать

Trace Interface Port

15.1About the ETM interface

The processor trace interface port enables connection of an ETM to the processor. The ARM Embedded Trace Macrocell (ETM) provides instruction and data trace for the ARM11 family of processors. For more details on how the ETM interface connects to an ARM11 processor, see the CoreSight ETM11 Technical Reference Manual.

All inputs are registered immediately inside the ETM unless specified otherwise. All outputs are driven directly from a register unless specified otherwise. All signals are relative to CLKIN unless specified otherwise.

The ETM interface includes the following groups of signals:

an instruction interface

a Secure control bus

a data address interface

a pipeline advance interface

a data value interface

a coprocessor interface

other connections to the core.

15.1.1Instruction interface

The primary sampling point for these signals is on entry to write-back. See Typical pipeline operations on page 1-26. This ensures that instructions are traced correctly before any data transfers associated with them, as required by the ETM protocol.

Table 15-1 lists the instruction interface signals.

Table 15-1 Instruction interface signals

Signal name

Description

Qualified by

 

 

 

ETMIACTL[17:0]

Instruction interface control signals

-

 

 

 

ETMIA[31:0]

This is the address for:

IAValid

 

ARM executed instruction + 8

 

 

Thumb executed instruction + 4

 

 

Java executed instruction

 

 

 

 

ETMIARET[31:0]

Address to return to if branch is incorrectly predicted

IABpValid

 

 

 

ETMIA is used for branch target address calculation.

Other than this the ETM must know, for each cycle, the current address of the instruction in execute and the address of any branch phantom progressing through the pipeline. The processor does not maintain the address of branch phantoms, instead it maintains the address to return to if the branch proves to be incorrectly predicted.

The instruction interface can trace a branch phantom without an associated normal instruction.

In the case of a branch that is predicted taken, the return address, for when the branch is not taken, is one instruction after the branch. Therefore, the branch address is:

ETMIABP = ETMIARET - <isize>

When the instruction is predicted not taken, the return address is the target of the branch. However, because the branch was not taken, it must precede the normal instruction. Therefore, the branch address is:

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

15-2

ID012410

Non-Confidential, Unrestricted Access

 

Trace Interface Port

ETMIABP = ETMIA - <isize>

Table 15-2 lists the ETMIACTL[17:0] instruction interface control signals.

Table 15-2 ETMIACTL[17:0]

Bits

Reference name

Description

Qualified by

 

 

 

 

[17]

IASlotKill

Kill outstanding slots.

IAException

 

 

 

 

[16]

IADAbort

Data Abort.

IAException

 

 

 

 

[15]

IAExCancel

Exception canceled previous instruction.

IAException

 

 

 

 

[12:14]

IAExInt

b001 = IRQb101 = FIQb100 = Java exception b110 =

IAException

 

 

Precise Data Abortb000 = Other exception.

 

 

 

 

 

[11]

IAException

Instruction is an exception vector.

Nonea

[10]

IABounce

Kill the data slot associated with this instruction.

IADataInst

 

 

There is only ever one of these instructions. Used for

 

 

 

bouncing coprocessor instructions.

 

 

 

 

 

[9]

IADataInst

Instruction is a data instruction. This includes any

IAInstValid

 

 

load, store, or CPRT, but does not include preloads.

 

 

 

 

 

[8]

IAContextID

Instruction updates context ID.

IAInstValid

 

 

 

 

[7]

IAIndBr

Instruction is an indirect branch.

IAInstValid

 

 

 

 

[6]

IABpCCFail

Branch phantom failed its condition codes.

IABpValid

 

 

 

 

[5]

IAInstCCFail

Instruction failed its condition codes.

IAInstValid

 

 

 

 

[4]

IAJBit

Instruction executed in Jazelle state.

IAValid

 

 

 

 

[3]

IATBit

Instruction executed in Thumb state.

IAValid

 

 

 

 

[2]

IABpValid

Branch phantom executed this cycle.

IAValid

 

 

 

 

[1]

IAInstValid

(Non-phantom) instruction executed this cycle.

IAValid

 

 

 

 

[0]

IAValid

Signals on the instruction interface are valid this cycle.

None

 

 

This is kept LOW when the ETM is powered down.

 

a.The exception signals become valid when the core takes the exception and remain valid until the next instruction is seen at the exception vector.

Exception reporting

The ARM1176JZ-S Trace Interface Port is designed for ETMs that support ETMv3.2 or above. ETMv3.2 permits the determination of each type of exception without reference to the destination address in the branch packet.

The ETM protocol does not permit the indication of an exception before the first instruction is traced. If the first instruction traced, when turning on trace, is the instruction at an exception vector, then the trace does not report an exception. Normally this is not a concern, because you can expect some missing trace when the trace is turned off.

However, there are two occasions where trace is turned off automatically, so that trace might lose exceptions even when the ETM is configured to trace continuously:

the processor enters Debug state

the processor enters a region where tracing is prohibited, a prohibited region.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

15-3

ID012410

Non-Confidential, Unrestricted Access

 

Trace Interface Port

In these cases, if an exception occurs before the first instruction is traced, an additional placeholder instruction is traced. The placeholder instruction is followed immediately by a branch packet that indicates the type of exception. This exception is marked as a canceling exception, to indicate that the placeholder instruction was not executed. The instruction at the exception vector is then traced, and trace continues as normal.

This extra instruction cannot be generated on a reset exception. Therefore, if the processor exits Debug state or a prohibited region because of a reset, trace does not report a reset exception.

For more information on the ETM protocol, see the Embedded Trace Macrocell Architecture Specification.

15.1.2Secure control bus

The Secure control bus ETMIASECCTL indicates when the processor is in Secure state and when the data trace is prohibited.

Table 15-3 lists the signals in the Secure control bus ETMIASECCTL.

Table 15-3 ETMIASECCTL[1:0]

Bits

Reference

Description

Qualified by

name

 

 

 

 

 

 

 

[1]

IASProhibited

Trace prohibited for this instruction

IAValid

 

 

 

 

[0]

IASNonSecure

Instruction executed in Non-secure state

IAValid

 

 

 

 

15.1.3Data address interface

Data addresses are sampled at the ADD stage because they are guaranteed to be in order at this point. These are assigned a slot number for identification on retirement.

Table 15-4 lists the data address interface signals.

Table 15-4 Data address interface signals

Signal name

Description

Qualified by

 

 

 

ETMDACTL[17:0]

Data address interface control signals

-

 

 

 

ETMDA[31:3]

Address for data transfer

DASlot != 00 AND !DACPRT

 

 

 

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

15-4

ID012410

Non-Confidential, Unrestricted Access

 

Trace Interface Port

Table 15-5 lists the ETMDACTL[17:0] signals.

Table 15-5 ETMDACTL[17:0]

Bits

Reference

Description

Qualified by

name

 

 

 

 

 

 

 

[17]

DANSeq

The data transfer is nonsequential from the last. This signal must be

DASlot != 00

 

 

asserted on the first cycle of each instruction, in addition to the second

 

 

 

transfer of a SWP or LDM pc, because the address of these transfers is not

 

 

 

one word greater than the previous transfer, and therefore the transfer must

 

 

 

have its address re-output.

 

 

 

During an unaligned access, this signal is only valid on the first transfer of

 

 

 

the access.

 

 

 

 

 

[16]

DALast

The data transfer is the last for this data instruction. This signal is asserted

DASlot != 00

 

 

for both halves of an unaligned access.

 

 

 

A related signal, DAFirst, can be implied from this signal, because the next

 

 

 

transfer must be the first transfer of the next data instruction.

 

 

 

 

 

[15]

DACPRT

The data transfer is a CPRT.

DASlot != 00

 

 

 

 

[14]

DASwizzle

Words must be byte swizzled for ARM big-endian mode. During an

DASlot != 00

 

 

unaligned access, this signal is only valid on the first transfer of the access.

 

 

 

 

 

[13:12]

DARot

Number of bytes to rotate right each word by. During an unaligned access,

DASlot != 00

 

 

this signal is only valid on the first transfer of the access.

 

 

 

 

 

[11]

DAUnaligned

First transfer of an unaligned access.

DASlot != 00

 

 

The next transfer must be the second half, where this signal is not asserted.

 

 

 

 

 

[10:3]

DABLSel

Byte lane selects.

DASlot != 00

 

 

 

 

[2]

DAWrite

Read or write.

DASlot != 00

 

 

During an unaligned access, this signal is only valid on the first transfer of

 

 

 

the access.

 

 

 

 

 

[1:0]

DASlot

Slot occupied by data item.

None

 

 

b00 indicates that no slot is in use in this cycle.

 

 

 

b11 indicates that ETM is in use in this cycle.

 

 

 

This slot holds the value even when the ETM is powered down.

 

 

 

 

 

15.1.4Data value interface

The data values are sampled at the WBls stage. Here the load, store, MCR, and MRC data is combined. The memory view of the data is presented, and must be converted back to the register view depending on the alignment and endianness.

Data is not returned for at least two cycles after the address. However, it is not necessary to pipeline the address because the slot does not return data for a previous address during this time. Data values are defined to correspond to the most recent data addresses with the same slot number, starting from the previous cycle. In other words, data can correspond to an address from the previous cycle, but not to an address from the same cycle.

ARM DDI 0333H

Copyright © 2004-2009 ARM Limited. All rights reserved.

15-5

ID012410

Non-Confidential, Unrestricted Access

 

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