My Project
 All Classes Files Functions Variables Macros
logger.h
Go to the documentation of this file.
1 
26 #ifndef LOGGER_H
27 #define LOGGER_H
28 
29 #define T32_LOGGER_SIZE 1024
30 
31 /* program cycle types */
32 #define T32_FETCH 0x1000
33 #define T32_EXECUTE 0xf000
34 
35 /* data cycle types */
36 #define T32_DATA_READ 0x2000
37 #define T32_DATA_WRITE 0x3000
38 
39 /* data cycle - data width specifier, use together with T32_DATA_* */
40 #define T32_BYTE 0x0100
41 #define T32_WORD 0x0200
42 #define T32_LONG 0x0400
43 
44 typedef struct
45 {
46  unsigned long tshigh;
47  unsigned long tslow;
48  unsigned long address;
49  unsigned long data;
50 }
52 
53 typedef struct
54 {
56  long size;
57  volatile long index;
58  long tindex;
59  long iflags;
60  long oflags;
61  long reserved1;
62  long reserved2;
64 }
66 
77 void T32_LoggerInit();
78 
90 void T32_LoggerData(int cycletype, void* address, unsigned long data);
91 
101 void T32_LoggerDataFast(int cycletype, void* address, unsigned long data);
102 
115 void T32_TimerInit();
116 
126 unsigned long long T32_TimerGet();
127 
128 #endif
unsigned long tslow
low part of timestamp
Definition: logger.h:47
void T32_LoggerDataFast(int cycletype, void *address, unsigned long data)
Add a new event to the LOGGER without timestamp.
Definition: logger.c:59
long iflags
incoming flags, Bit 0: ARM, Bit 8: Stack Mode
Definition: logger.h:59
unsigned long data
number of executed bytes for T32_EXECUTE, data value of load/store transaction
Definition: logger.h:49
void T32_LoggerData(int cycletype, void *address, unsigned long data)
Add a new event to the LOGGER.
Definition: logger.c:34
long size
size of trace buffer
Definition: logger.h:56
T32_loggerData_t * ptr
pointer to trace data
Definition: logger.h:55
unsigned long tshigh
high part of timestamp (upper 16 bit) and cycle info (lower 16 bit)
Definition: logger.h:46
unsigned long long T32_TimerGet()
Get current timestamp of architecture specific timer.
Definition: logger.c:17
long tindex
index of trigger record
Definition: logger.h:58
unsigned long address
program instruction address or address of data load/store transaction
Definition: logger.h:48
void T32_TimerInit()
Initialize the architecture specific timer.
Definition: logger.c:12
void T32_LoggerInit()
Initialize the LOGGER internal data structures.
Definition: logger.c:22
long oflags
outgoing flags, Bit 0: Overflow, Bit 8: Trigger, Bit 9: Break
Definition: logger.h:60
Definition: logger.h:44
volatile long index
current write pointer
Definition: logger.h:57
#define T32_LOGGER_SIZE
Size of the LOGGER Ringbuffer, must be a power of 2.
Definition: logger.h:29
Definition: logger.h:53