ETM:embedded Trace Macrocell
PTM:Program Flow Trace Macrocell
ETM-A7 macrocell提供Cortex-A7 MPcore的instruction和data的trace。
再与Cortex-A7的连接过程中,需要连接ETM interface和PMU 接口。
ETM interface包括:instruction address,branch,exception,data address,data value等。
ETM内部实现DFT logic,提供DFTSE和DFTRSTDISABLE信号。
ETM内部的block diagram:
PTM是基于Program Flow Trace(PFT)架构的,进行real-time instruction flow tracing的模块。
PTM会copy一份正在执行的code,然后只在一些program execution point进行trace,这样的点叫做waypoint。
Trace tools利用waypoint来follow program的execution。
一般的waypoint包括:
1)indirect branches,with target address and condition code;
2)direct branches with only the condition code;
3)exceptions
4)changes in processor security state
5)changes in processor instruction set state
可以自己config的point:
1)cycle count between traced waypoint
2)global system timestamps
3)target addresses for taken direct branches
PTM集成中的架构图:
PTM模块内部的block diagram:
Processor input FIFO:buffers the output from processor trace interface until the execution of the
waypoint。
Processor与CTI和PTM的连接: