1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
32
33 34 35 36 37 38
39
40 package ti.uia.runtime;
41 import xdc.runtime.Types;
42 import xdc.runtime.Log;
43 import ti.uia.runtime.IUIATraceSyncProvider;
44
45 /*!
46 * ======== LoggerTypes ========
47 * Function pointer type definitions for various types of loggers
48 *
49 * This module defines function prototypes for use in defining
50 * callback functions that support device-specific features (e.g.
51 * synchronization with CPU Trace) and support customization and
52 * extensibility of core UIA features (e.g. logging a range of memory values).
53 */
54 module LoggerTypes {
55
56 /*!
57 * ======== LogMemoryRangeFxn ========
58 * Log an event along with values from a range of memory addresses
59 *
60 * Note that this function can support logging of null terminated strings,
61 * arrays of characters and memory mapped registgers as well as blocks of
62 * memory. The LogSnapshot module uses this callback function.
63 * Modules that implement the ILoggerSnapshot interface provide implementations
64 * of this callback function.
65 *
66 * @param(ptr) module instance object handle
67 * @param(evt) event to be logged
68 * @param(snapshotId) 0 = no other snapshot groups, Use value from
69 * LogSnapshot.getSnapshotId() for all snapshots to be
70 * grouped.
71 * @param(fileName) __FILE__ result
72 * @param(lineNum) __LINE__ result
73 * @param(fmt) a `printf` style format string
74 * @param(startAdrs) value for first format conversion character
75 * @param(lengthInMAUs) value for second format conversion character
76 *
77 * @see Log#Event
78 * @see ILoggerSnapshot#writeMemoryRange
79 */
80 typedef Void (*LogMemoryRangeFxn)(Ptr, xdc.runtime.Log.Event,
81 UInt32, UInt32, IArg, IArg, IArg, IArg, IArg);
82
83 /*!
84 * ====== InjectIntoTraceFxn ======
85 * Callback function that injects syncPoint info into GEM Trace
86 *
87 * This callback function injects correlation info into the trace stream
88 * to enable correlation between software events and hardware trace.
89 *
90 * @param(serialNum) the serial number that is to be injected
91 * @param(ctxType) the context type ID to be injected into the trace
92 *
93 * @see IUIATraceSyncProvider
94 * @see IUIATraceSyncClient
95 */
96 typedef Void (*InjectIntoTraceFxn)(UInt32, IUIATraceSyncProvider.ContextType);
97 }