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 package ti.uia.family.c64p;
37 import ti.uia.runtime.IUIATraceSyncProvider;
38 import ti.uia.events.UIASync;
39
40 /*!
41 * ======== GemTraceSync.xdc ========
42 * C64X+ specific code for injecting sync point info into the GEM Trace stream
43 *
44 * The OVERLAY register (a.k.a. TSDR register) is an undocumented register
45 * availble on C64X+ Full GEM targets. Writes into this register are injected
46 * into the trace stream. The data that is written is used by the host to
47 * determine what target-side context was active at the time the trace data
48 * was recorded.
49 *
50 * The register only has 30 writable bits, so in order to inject a 32b value
51 * into the trace stream (e.g. the thread handle of the currently executing
52 * thread), the 32b address needs to be split into two pieces and written into
53 * the OVERLAY register in two successive write operations. To make it possible
54 * to use the OVERLAY register to inject different types of context info into
55 * the trace stream, the following bit assignments need to be used when
56 * writing data into the OVERLAY register:
57 *
58 * OVERLAY register bit assignments:
59 * 2 LSBs fixed (011b)
60 * 6 MSBs used to determine what type of data the OVERLAY register contains
61 *
62 * b31-b26 : a 6 bit ?type ID? that describes what context info the sync point
63 * contains
64 * 000000b : reserved
65 * 000001b : b25-b2 of OVERLAY register contains the 24 LSBs
66 * of the sequence number of the Sync Point event
67 * that contains correlation info. Only 1 OVERLAY
68 * register write is required for this info.
69 * 000010b : b25-b2 of OVERLAY register contains the 24 LSBs
70 * of the sequence number of the Context Change event
71 * that contains context change info. Only 1 OVERLAY
72 * register write is required for this info.
73 * . . . : reserved
74 * 000011b : b25-b2 of OVERLAY register contains the 24 LSBs
75 * of the snapshot ID of the snapshot event
76 * that contains snapshot info. Only 1 OVERLAY register
77 * write is required for this info.
78 * 10XXXXb : contains first word of a 2 word OVERLAY register sequence.
79 * b25-b2 : the 24 MSBs of 32b context data.
80 *
81 * 11XXXXb: contains second word of a 2 word OVERLAY register sequence.
82 * b29-b10 contain the 20LSBs of the sequence number of an event that contains
83 * context info.
84 * b9-b2 contain 8 LSBs of 32b context data.
85 *
86 * If the 2 word OVERLAY register protocol is being used and there is a sync
87 * loss, then only the OVERLAY register data with b31-b30 = 11b will be
88 * available since it was the last data written into the register. Since this
89 * contains a sequence number, it may be possible for the host to recover the
90 * lost sync data by finding the context change event that has the same sequence
91 * number.
92 */
93
94 @Gated
95 module GemTraceSync inherits ti.uia.runtime.IUIATraceSyncProvider {
96
97 /*!
98 * ====== injectIntoTrace ======
99 * Inject syncPoint info into GEM Trace
100 *
101 * This method logs a sync point event and injects
102 * correlation info into the trace stream (if available)
103 * to enable correlation between software events and hardware trace.
104 *
105 * @param(serialNumber) a sync point serial number to inject into the trace
106 * stream
107 * @param(ctxType) the CtxChg_ContextType constant that describes what
108 * context info the 2 words contain
109 */
110 @DirectCall
111 override Void injectIntoTrace(UInt32 serialNum,
112 IUIATraceSyncProvider.ContextType ctxType);
113
114 }