source: SVN/cambria/redboot/packages/devs/eth/intel/npe/common/current/include/IxPerfProfAcc.h @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 57.1 KB
Line 
1/**
2 * @file IxPerfProfAcc.h
3 *
4 * @brief  Header file for the IXP400 Perf Prof component (IxPerfProfAcc)
5 *
6 *
7 * @par
8 * IXP400 SW Release version 2.3
9 *
10 * -- Copyright Notice --
11 *
12 * @par
13 * Copyright (c) 2001-2005, Intel Corporation.
14 * All rights reserved.
15 *
16 * @par
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 *    notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 *    notice, this list of conditions and the following disclaimer in the
24 *    documentation and/or other materials provided with the distribution.
25 * 3. Neither the name of the Intel Corporation nor the names of its contributors
26 *    may be used to endorse or promote products derived from this software
27 *    without specific prior written permission.
28 *
29 *
30 * @par
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
32 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
35 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * SUCH DAMAGE.
42 *
43 *
44 * @par
45 * -- End of Copyright Notice --
46 */
47
48/**
49 * @defgroup IxPerfProfAcc Intel (R) IXP400 Software Performance Profiling (IxPerfProfAcc) API
50 *
51 * @brief IXP400 Performance Profiling Utility component Public API.
52 * @li NOTE: Xcycle measurement is not supported in Linux*.
53 *
54 *
55 * @{
56 */
57#ifndef IXPERFPROFACC_H
58#define IXPERFPROFACC_H
59
60#include "IxOsal.h"
61
62#ifdef __linux
63#include <linux/proc_fs.h>
64#endif
65
66/*
67 * Section for #define
68 */
69/**
70 * @ingroup IxPerfProfAcc
71 *
72 * @def IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES
73 *
74 * @brief This is the maximum number of profiling samples allowed, which can be
75 * modified according to the user's discretion
76 */
77#define IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES  0xFFFF
78
79/**
80 * @ingroup IxPerfProfAcc
81 *
82 * @def IX_PERFPROF_ACC_BUS_PMU_MAX_PECS     
83 *
84 * @brief This is the maximum number of Programmable Event Counters available.
85 *        This is a hardware specific and fixed value. Do not change.
86 *       
87 */
88#define IX_PERFPROF_ACC_BUS_PMU_MAX_PECS        7
89
90/** 
91 * @ingroup IxPerfProfAcc
92 *
93 * @def IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS
94 *
95 * @brief Max number of measurement allowed. This constant is used when
96 *        creating storage array for Xcycle. When run in continuous mode, 
97 *        Xcycle will wrap around and re-use buffer.
98 */
99#define IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS 600
100
101#ifdef __linux
102/**
103 * @ingroup IxPerfProfAcc
104 *
105 * @def IX_PERFPROF_ACC_XSCALE_PMU_SYMBOL_ACCURACY
106 *
107 * @brief Level of accuracy required for matching the PC Address to
108 *        symbol address. This is used when the Intel XScale(R) Processor PMU time/event
109 *        sampling functions get the PC address and search for the
110 *        corresponding symbol address.
111 */
112#define IX_PERFPROF_ACC_XSCALE_PMU_SYMBOL_ACCURACY 0xffff
113
114#endif /*__linux*/
115
116/** 
117 * @ingroup IxPerfProfAcc
118 *
119 * @def IX_PERFPROF_ACC_LOG
120 *
121 * @brief Mechanism for logging a formatted message for the PerfProfAcc component
122 *
123 * @param level UINT32 [in] - trace level
124 * @param device UINT32 [in] - output device
125 * @param str char* [in] - format string, similar to printf().
126 * @param a UINT32 [in] - first argument to display
127 * @param b UINT32 [in] - second argument to display
128 * @param c UINT32 [in] - third argument to display
129 * @param d UINT32 [in] - fourth argument to display
130 * @param e UINT32 [in] - fifth argument to display
131 * @param f UINT32 [in] - sixth argument to display
132 *
133 * @return none
134 */
135#ifndef NDEBUG
136#define IX_PERFPROF_ACC_LOG(level, device, str, a, b, c, d, e, f)\
137             (ixOsalLog (level, device, str, a, b, c, d, e, f))
138#else /*do nothing*/
139#define IX_PERFPROF_ACC_LOG(level, device, str, a, b, c, d, e, f)
140#endif /*ifdef NDEBUG */
141
142/*
143 * Section for struct
144 */
145
146/**
147 * @brief contains summary of samples taken
148 *
149 * Structure contains all details of each program counter value - frequency
150 * that PC occurs
151 */
152typedef struct
153{
154        UINT32 programCounter;  /**<the program counter value of the sample*/
155        UINT32 freq;            /**<the frequency of the occurence of the sample*/
156} IxPerfProfAccXscalePmuSamplePcProfile;
157
158/**
159 * @brief contains results of a counter
160 *
161 * Structure contains the results of a counter, which are split into the lower
162 * and upper 32 bits of the final count
163 */
164typedef struct
165{
166    UINT32 lower32BitsEventCount; /**<lower 32bits value of the event counter*/       
167    UINT32 upper32BitsEventCount; /**<upper 32bits value of the event counter*/
168}   IxPerfProfAccXscalePmuEvtCnt;
169
170/**
171 * @brief contains results of counters and their overflow
172 *
173 * Structure contains all values of counters and associated overflows.  The
174 * specific event and clock counters are determined by the user
175 */
176typedef struct
177{
178    UINT32 clk_value;           /**<current value of clock counter*/                 
179    UINT32 clk_samples;        /**<number of clock counter overflows*/
180    UINT32 event1_value;        /**<current value of event 1 counter*/   
181    UINT32 event1_samples;     /**<number of event 1 counter overflows*/
182    UINT32 event2_value;        /**<current value of event 2 counter*/
183    UINT32 event2_samples;     /**<number of event 2 counter overflows*/
184    UINT32 event3_value;        /**<current value of event 3 counter*/
185    UINT32 event3_samples;     /**<number of event 3 counter overflows*/
186    UINT32 event4_value;        /**<current value of event 4 counter*/
187    UINT32 event4_samples;     /**<number of event 4 counter overflows*/
188} IxPerfProfAccXscalePmuResults;
189
190/**
191 *
192 * @brief Results obtained from Xcycle run
193 */ 
194typedef struct 
195{
196    float maxIdlePercentage;            /**<maximum percentage of Idle cycles*/
197    float minIdlePercentage;            /**<minimum percentage of Idle cycles*/
198    float aveIdlePercentage;            /**<average percentage of Idle cycles*/
199    UINT32 totalMeasurements;           /**<total number of measurement made */
200} IxPerfProfAccXcycleResults; 
201
202/**
203 *
204 * @brief Results obtained from running the Bus Pmu component. The results
205 *        are obtained when the get functions is called.
206 *       
207 */
208typedef struct
209{
210    UINT32 statsToGetLower27Bit[IX_PERFPROF_ACC_BUS_PMU_MAX_PECS]; /**<Lower 27 Bit of counter value */
211    UINT32 statsToGetUpper32Bit[IX_PERFPROF_ACC_BUS_PMU_MAX_PECS]; /**<Upper 32 Bit of counter value */
212} IxPerfProfAccBusPmuResults;
213
214/*
215 * Section for enum
216 */
217
218/**
219 * @ingroup IxPerfProfAcc
220 *
221 * @enum IxPerfProfAccBusPmuEventCounters1
222 *
223 * @brief Type of bus pmu events supported on PEC 1.
224 *
225 * Lists all bus pmu events. 
226 */
227typedef enum
228{
229        IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEA_GRANT_SELECT = 1, /**< Select North NPEA grant on PEC1*/
230        IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEB_GRANT_SELECT, /**< Select North NPEB grant on PEC1*/
231        IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEC_GRANT_SELECT, /**< Select North NPEC grant on PEC1*/
232        IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_BUS_IDLE_SELECT, /**< Select North bus idle on PEC1*/
233        IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEA_REQ_SELECT, /**< Select North NPEA req on PEC1*/
234        IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEB_REQ_SELECT, /**< Select North NPEB req on PEC1*/
235        IX_PERFPROF_ACC_BUS_PMU_PEC1_NORTH_NPEC_REQ_SELECT, /**< Select North NPEC req on PEC1*/
236
237        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_GSKT_GRANT_SELECT, /**< Select south gasket grant on PEC1*/
238        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_ABB_GRANT_SELECT, /**< Select south abb grant on PEC1*/
239        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_PCI_GRANT_SELECT, /**< Select south pci grant on PEC1*/
240        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_APB_GRANT_SELECT, /**< Select south apb grant on PEC1*/
241        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_GSKT_REQ_SELECT, /**< Select south gasket request on PEC1*/
242        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_ABB_REQ_SELECT, /**< Select south abb request on PEC1*/
243        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_PCI_REQ_SELECT, /**< Select south pci request on PEC1*/
244        IX_PERFPROF_ACC_BUS_PMU_PEC1_SOUTH_APB_REQ_SELECT, /**< Select south apb request on PEC1*/
245
246        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_0_HIT_SELECT, /**< Select sdram0 hit on PEC1*/
247        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_1_HIT_SELECT, /**< Select sdram1 hit on PEC1*/
248        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_2_HIT_SELECT, /**< Select sdram2 hit on PEC1*/
249        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC1*/
250        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_4_MISS_SELECT, /**< Select sdram4 miss on PEC1*/
251        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_5_MISS_SELECT, /**< Select sdram5 miss on PEC1*/
252        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_6_MISS_SELECT, /**< Select sdram6 miss on PEC1*/
253        IX_PERFPROF_ACC_BUS_PMU_PEC1_SDR_7_MISS_SELECT /**< Select sdram7 miss on PEC1*/
254} IxPerfProfAccBusPmuEventCounters1;
255
256/**
257 * @ingroup IxPerfProfAcc
258 *
259 * @enum IxPerfProfAccBusPmuEventCounters2
260 *
261 * @brief Type of bus pmu events supported on PEC 2.
262 *
263 * Lists all bus pmu events.
264 */
265typedef enum
266{
267        IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEA_XFER_SELECT = 24, /**< Select North NPEA transfer on PEC2*/
268        IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEB_XFER_SELECT, /**< Select North NPEB transfer on PEC2*/
269        IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEC_XFER_SELECT, /**< Select North NPEC transfer on PEC2*/
270        IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_BUS_WRITE_SELECT, /**< Select North bus write on PEC2*/
271        IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEA_OWN_SELECT, /**< Select North NPEA own on PEC2*/
272        IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEB_OWN_SELECT, /**< Select North NPEB own on PEC2*/
273        IX_PERFPROF_ACC_BUS_PMU_PEC2_NORTH_NPEC_OWN_SELECT, /**< Select North NPEC own on PEC2*/
274
275        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_GSKT_XFER_SELECT, /**< Select South gasket transfer on PEC2*/
276        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_ABB_XFER_SELECT, /**< Select South abb transfer on PEC2*/
277        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_PCI_XFER_SELECT, /**< Select South pci transfer on PEC2*/
278        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_APB_XFER_SELECT, /**< Select South apb transfer on PEC2*/
279        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_GSKT_OWN_SELECT, /**< Select South gasket own on PEC2*/
280        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_ABB_OWN_SELECT, /**< Select South abb own on PEC2*/
281        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_PCI_OWN_SELECT, /**< Select South pci own on PEC2*/
282        IX_PERFPROF_ACC_BUS_PMU_PEC2_SOUTH_APB_OWN_SELECT, /**< Select South apb own transfer on PEC2*/
283
284        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_1_HIT_SELECT, /**< Select sdram1 hit on PEC2*/
285        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_2_HIT_SELECT, /**< Select sdram2 hit on PEC2*/
286        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC2*/
287        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_4_HIT_SELECT, /**< Select sdram4 hit on PEC2*/
288        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_5_MISS_SELECT, /**< Select sdram5 miss on PEC2*/
289        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_6_MISS_SELECT, /**< Select sdram6 miss on PEC2*/
290        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_7_MISS_SELECT, /**< Select sdram7 miss on PEC2*/
291        IX_PERFPROF_ACC_BUS_PMU_PEC2_SDR_0_MISS_SELECT /**< Select sdram0 miss on PEC2*/
292} IxPerfProfAccBusPmuEventCounters2;
293
294/**
295 * @ingroup IxPerfProfAcc
296 *
297 * @enum IxPerfProfAccBusPmuEventCounters3
298 *
299 * @brief Type of bus pmu events supported on PEC 3.
300 *
301 * Lists all bus pmu events.
302 */
303typedef enum
304{
305        IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEA_RETRY_SELECT = 47, /**< Select north NPEA retry on PEC3*/
306        IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEB_RETRY_SELECT, /**< Select north NPEB retry on PEC3*/
307        IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEC_RETRY_SELECT, /**< Select north NPEC retry on PEC3*/
308        IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_BUS_READ_SELECT, /**< Select north bus read on PEC3*/
309        IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEA_WRITE_SELECT, /**< Select north NPEA write on PEC3*/
310        IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEB_WRITE_SELECT, /**< Select north NPEB write on PEC3*/
311        IX_PERFPROF_ACC_BUS_PMU_PEC3_NORTH_NPEC_WRITE_SELECT, /**< Select north NPEC wirte on PEC3*/
312
313        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_GSKT_RETRY_SELECT, /**< Select south gasket retry on PEC3*/
314        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_ABB_RETRY_SELECT, /**< Select south abb retry on PEC3*/
315        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_PCI_RETRY_SELECT, /**< Select south pci retry on PEC3*/
316        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_APB_RETRY_SELECT, /**< Select south apb retry on PEC3*/
317        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_GSKT_WRITE_SELECT, /**< Select south gasket write on PEC3*/
318        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_ABB_WRITE_SELECT, /**< Select south abb write on PEC3*/
319        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_PCI_WRITE_SELECT, /**< Select south pci write on PEC3*/
320        IX_PERFPROF_ACC_BUS_PMU_PEC3_SOUTH_APB_WRITE_SELECT, /**< Select south apb write on PEC3*/
321
322        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_2_HIT_SELECT, /**< Select sdram2 hit on PEC3*/
323        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC3*/
324        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_4_HIT_SELECT, /**< Select sdram4 hit on PEC3*/
325        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_5_HIT_SELECT, /**< Select sdram5 hit on PEC3*/
326        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_6_MISS_SELECT, /**< Select sdram6 miss on PEC3*/
327        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_7_MISS_SELECT, /**< Select sdram7 miss on PEC3*/
328        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_0_MISS_SELECT, /**< Select sdram0 miss on PEC3*/
329        IX_PERFPROF_ACC_BUS_PMU_PEC3_SDR_1_MISS_SELECT /**< Select sdram1 miss on PEC3*/
330} IxPerfProfAccBusPmuEventCounters3;
331
332/**
333 * @ingroup IxPerfProfAcc
334 *
335 * @enum IxPerfProfAccBusPmuEventCounters4
336 *
337 * @brief Type of bus pmu events supported on PEC 4.
338 *
339 * Lists all bus pmu events.
340 */
341typedef enum
342{
343        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_PCI_SPLIT_SELECT = 70, /**< Select south pci split on PEC4*/
344        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_EXP_SPLIT_SELECT, /**< Select south expansion split on PEC4*/
345        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_APB_GRANT_SELECT, /**< Select south apb grant on PEC4*/
346        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_APB_XFER_SELECT, /**< Select south apb transfer on PEC4*/
347        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_GSKT_READ_SELECT, /**< Select south gasket read on PEC4*/
348        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_ABB_READ_SELECT, /**< Select south abb read on PEC4*/
349        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_PCI_READ_SELECT, /**< Select south pci read on PEC4*/
350        IX_PERFPROF_ACC_BUS_PMU_PEC4_SOUTH_APB_READ_SELECT, /**< Select south apb read on PEC4*/
351
352        IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_ABB_SPLIT_SELECT, /**< Select north abb split on PEC4*/
353        IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEA_REQ_SELECT, /**< Select north NPEA req on PEC4*/
354        IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEA_READ_SELECT, /**< Select north NPEA read on PEC4*/
355        IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEB_READ_SELECT, /**< Select north NPEB read on PEC4*/
356        IX_PERFPROF_ACC_BUS_PMU_PEC4_NORTH_NPEC_READ_SELECT, /**< Select north NPEC read on PEC4*/
357
358        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_3_HIT_SELECT, /**< Select sdram3 hit on PEC4*/
359        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_4_HIT_SELECT, /**< Select sdram4 hit on PEC4*/
360        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_5_HIT_SELECT, /**< Select sdram5 hit on PEC4*/
361        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_6_HIT_SELECT, /**< Select sdram6 hit on PEC4*/
362        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_7_MISS_SELECT, /**< Select sdram7 miss on PEC4*/
363        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_0_MISS_SELECT, /**< Select sdram0 miss on PEC4*/
364        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_1_MISS_SELECT, /**< Select sdram1 miss on PEC4*/
365        IX_PERFPROF_ACC_BUS_PMU_PEC4_SDR_2_MISS_SELECT /**< Select sdram2 miss on PEC4*/
366} IxPerfProfAccBusPmuEventCounters4;
367
368/**
369 * @ingroup IxPerfProfAcc
370 *
371 * @enum IxPerfProfAccBusPmuEventCounters5
372 *
373 * @brief Type of bus pmu events supported on PEC 5.
374 *
375 * Lists all bus pmu events.
376 */
377typedef enum
378{
379        IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_GRANT_SELECT = 91, /**< Select south abb grant on PEC5*/
380        IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_XFER_SELECT, /**< Select south abb transfer on PEC5*/
381        IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_RETRY_SELECT, /**< Select south abb retry on PEC5*/
382        IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_EXP_SPLIT_SELECT, /**< Select south expansion split on PEC5*/
383        IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_REQ_SELECT, /**< Select south abb request on PEC5*/
384        IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_ABB_OWN_SELECT, /**< Select south abb own on PEC5*/
385        IX_PERFPROF_ACC_BUS_PMU_PEC5_SOUTH_BUS_IDLE_SELECT, /**< Select south bus idle on PEC5*/
386
387        IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_GRANT_SELECT, /**< Select north NPEB grant on PEC5*/
388        IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_XFER_SELECT, /**< Select north NPEB transfer on PEC5*/
389        IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_RETRY_SELECT, /**< Select north NPEB retry on PEC5*/
390        IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_REQ_SELECT, /**< Select north NPEB request on PEC5*/
391        IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_OWN_SELECT, /**< Select north NPEB own on PEC5*/
392        IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_WRITE_SELECT, /**< Select north NPEB write on PEC5*/
393        IX_PERFPROF_ACC_BUS_PMU_PEC5_NORTH_NPEB_READ_SELECT, /**< Select north NPEB read on PEC5*/
394
395        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_4_HIT_SELECT, /**< Select north sdram4 hit on PEC5*/
396        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_5_HIT_SELECT, /**< Select north sdram5 hit on PEC5*/
397        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_6_HIT_SELECT, /**< Select north sdram6 hit on PEC5*/
398        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_7_HIT_SELECT, /**< Select north sdram7 hit on PEC5*/
399        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_0_MISS_SELECT, /**< Select north sdram0 miss on PEC5*/
400        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_1_MISS_SELECT, /**< Select north sdram1 miss on PEC5*/
401        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_2_MISS_SELECT, /**< Select north sdram2 miss on PEC5*/
402        IX_PERFPROF_ACC_BUS_PMU_PEC5_SDR_3_MISS_SELECT /**< Select north sdram3 miss on PEC5*/
403} IxPerfProfAccBusPmuEventCounters5;
404
405/**
406 * @ingroup IxPerfProfAcc
407 *
408 * @enum IxPerfProfAccBusPmuEventCounters6
409 *
410 * @brief Type of bus pmu events supported on PEC 6.
411 *
412 * Lists all bus pmu events.
413 */
414typedef enum
415{
416        IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_GRANT_SELECT = 113, /**< Select south pci grant on PEC6*/
417        IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_XFER_SELECT, /**< Select south pci transfer on PEC6*/
418        IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_RETRY_SELECT, /**< Select south pci retry on PEC6*/
419        IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_SPLIT_SELECT, /**< Select south pci split on PEC6*/
420        IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_REQ_SELECT, /**< Select south pci request on PEC6*/
421        IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_PCI_OWN_SELECT, /**< Select south pci own on PEC6*/
422        IX_PERFPROF_ACC_BUS_PMU_PEC6_SOUTH_BUS_WRITE_SELECT, /**< Select south pci write on PEC6*/
423
424        IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_GRANT_SELECT, /**< Select north NPEC grant on PEC6*/
425        IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_XFER_SELECT, /**< Select north NPEC transfer on PEC6*/
426        IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_RETRY_SELECT, /**< Select north NPEC retry on PEC6*/
427        IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_REQ_SELECT, /**< Select north NPEC request on PEC6*/
428        IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_OWN_SELECT, /**< Select north NPEC own on PEC6*/
429        IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEB_WRITE_SELECT, /**< Select north NPEB write on PEC6*/
430        IX_PERFPROF_ACC_BUS_PMU_PEC6_NORTH_NPEC_READ_SELECT, /**< Select north NPEC read on PEC6*/
431
432        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_5_HIT_SELECT, /**< Select sdram5 hit on PEC6*/
433        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_6_HIT_SELECT, /**< Select sdram6 hit on PEC6*/
434        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_7_HIT_SELECT, /**< Select sdram7 hit on PEC6*/
435        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_0_HIT_SELECT, /**< Select sdram0 hit on PEC6*/
436        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_1_MISS_SELECT, /**< Select sdram1 miss on PEC6*/
437        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_2_MISS_SELECT, /**< Select sdram2 miss on PEC6*/
438        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_3_MISS_SELECT, /**< Select sdram3 miss on PEC6*/
439        IX_PERFPROF_ACC_BUS_PMU_PEC6_SDR_4_MISS_SELECT /**< Select sdram4 miss on PEC6*/
440} IxPerfProfAccBusPmuEventCounters6;
441
442/**
443 * @ingroup IxPerfProfAcc
444 *
445 * @enum IxPerfProfAccBusPmuEventCounters7
446 *
447 * @brief Type of bus pmu events supported on PEC 7.
448 *
449 * Lists all bus pmu events.
450 */
451typedef enum
452{
453        IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_APB_RETRY_SELECT = 135, /**< Select south apb retry on PEC7*/
454        IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_APB_REQ_SELECT, /**< Select south apb request on PEC7*/
455        IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_APB_OWN_SELECT, /**< Select south apb own on PEC7*/
456        IX_PERFPROF_ACC_BUS_PMU_PEC7_SOUTH_BUS_READ_SELECT, /**< Select south bus read on PEC7*/
457        IX_PERFPROF_ACC_BUS_PMU_PEC7_CYCLE_COUNT_SELECT /**< Select cycle count on PEC7*/
458} IxPerfProfAccBusPmuEventCounters7;
459
460/**
461 * @ingroup IxPerfProfAcc
462 *
463 * @enum IxPerfProfAccXscalePmuEvent
464 *
465 * @brief Type of Intel XScale (R) Processor PMU events supported
466 *
467 * Lists all Intel XScale (R) Processor PMU events.  The maximum is a default value that the user
468 * should not exceed.
469 */ 
470typedef enum 
471{
472    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_CACHE_MISS=0,      /**< cache miss*/ 
473    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_CACHE_INSTRUCTION,/**< cache instruction*/ 
474    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_STALL,     /**< event stall*/ 
475    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_INST_TLB_MISS, /**< instruction tlb miss*/ 
476    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_TLB_MISS, /**< data tlb miss*/ 
477    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_BRANCH_EXEC,   /**< branch executed*/ 
478    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_BRANCH_MISPREDICT, /**<branch mispredict*/ 
479    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_INST_EXEC, /**< instruction executed*/ 
480    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_FULL_EVERYCYCLE,   /**<
481                                                         *Stall - data cache
482                                                         *buffers are full.
483                                                                                                                 *This event occurs
484                                                                                                                 *every cycle where
485                                                                                                                 *condition present
486                                                                                                                 */ 
487    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_ONCE,    /**<
488                                               *Stall - data cache buffers are
489                                                                                   *full.This event occurs once
490                                                                                   *for each contiguous sequence
491                                                                                   */ 
492    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_CACHE_ACCESS, /**< data cache access*/ 
493    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_CACHE_MISS,   /**< data cache miss*/ 
494    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_DATA_CACHE_WRITEBACK,  /**<data cache
495                                                             *writeback
496                                                                                                         */ 
497    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_SW_CHANGE_PC,  /**< sw change pc*/ 
498    IX_PERFPROF_ACC_XSCALE_PMU_EVENT_MAX    /**< max value*/ 
499} IxPerfProfAccXscalePmuEvent;
500
501/**
502 * @ingroup IxPerfProfAcc
503 *
504 * @enum IxPerfProfAccStatus
505 *
506 * @brief Invalid Status Definitions 
507 *
508 * These status will be used by the APIs to return to the user.
509 */
510typedef enum
511{
512        IX_PERFPROF_ACC_STATUS_SUCCESS = IX_SUCCESS,    /**< success*/
513        IX_PERFPROF_ACC_STATUS_FAIL = IX_FAIL,          /**< fail*/
514        IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS,/**<another utility in
515                                                                                                         *progress
516                                                                                                         */ 
517        IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS, /**<measurement in
518                                                                                                                        *progress
519                                                                                                                        */
520        IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE, /**<no baseline yet*/         
521        IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_REQUEST_OUT_OF_RANGE, /**<
522                                                                                                                        * Measurement chosen
523                                                                                                                        * is out of range
524                                                                                                                        */
525        IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL,  /**<
526                                                             * Cannot set
527                                                                                                                 * task priority
528                                                             */
529        IX_PERFPROF_ACC_STATUS_XCYCLE_THREAD_CREATE_FAIL, /**<
530                                                             * Fail create thread
531                                                             */
532        IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_RESTORE_FAIL,  /**<
533                                                                 *cannot restore
534                                                                 *priority
535                                                                 */
536        IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING, /**< xcycle not running*/
537        IX_PERFPROF_ACC_STATUS_XSCALE_PMU_NUM_INVALID, /**< invalid number
538                                                        *entered
539                                                        */
540        IX_PERFPROF_ACC_STATUS_XSCALE_PMU_EVENT_INVALID, /**< invalid pmu event*/
541        IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED, /**<a start process
542                                                                                                         *was not called
543                                                                                                         *before attempting
544                                                                                                         *a stop or results
545                                                                                                         *get
546                                                                                                         */
547        IX_PERFPROF_ACC_STATUS_BUS_PMU_MODE_ERROR,  /**< invalid mode*/
548        IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC1_ERROR,      /**< invalid pec1 entered*/
549        IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC2_ERROR,      /**< invalid pec2 entered*/
550        IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC3_ERROR,      /**< invalid pec3 entered*/
551        IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC4_ERROR,      /**< invalid pec4 entered*/
552        IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC5_ERROR,      /**< invalid pec5 entered*/
553        IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC6_ERROR,      /**< invalid pec6 entered*/
554        IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC7_ERROR,      /**< invalid pec7 entered*/
555        IX_PERFPROF_ACC_STATUS_BUS_PMU_START_NOT_CALLED, /**<a start process
556                                                                                                 *was not called
557                                                                                                 *before attempting
558                                                                                                 *a stop
559                                                                                                         */
560        IX_PERFPROF_ACC_STATUS_COMPONENT_NOT_SUPPORTED /**<Device or OS does not support component*/
561} IxPerfProfAccStatus;
562
563/**
564 * @ingroup IxPerfProfAcc
565 *
566 * @enum IxPerfProfAccBusPmuMode
567 *
568 * @brief State selection of counters.
569 *
570 * These states will be used to determine the counters whose values are to be
571 * read.
572 */
573typedef enum
574{
575        IX_PERFPROF_ACC_BUS_PMU_MODE_HALT=0,   /**< halt state*/
576        IX_PERFPROF_ACC_BUS_PMU_MODE_SOUTH,    /**< south state*/
577        IX_PERFPROF_ACC_BUS_PMU_MODE_NORTH,    /**< north state*/
578        IX_PERFPROF_ACC_BUS_PMU_MODE_SDRAM    /**< SDRAM state*/
579} IxPerfProfAccBusPmuMode;
580
581/*
582 * Section for prototypes interface functions
583 */
584
585/**
586 * @ingroup IxPerfProfAcc
587 *
588 * @fn ixPerfProfAccXscalePmuEventCountStart(
589                BOOL clkCntDiv,
590                UINT32 numEvents,
591                IxPerfProfAccXscalePmuEvent pmuEvent1,
592                IxPerfProfAccXscalePmuEvent pmuEvent2,
593                IxPerfProfAccXscalePmuEvent pmuEvent3,
594                IxPerfProfAccXscalePmuEvent pmuEvent4 )
595 *
596 * @brief This API will start the clock and event counting
597 *
598 * @param       clkCntDiv BOOL [in] - enables/disables the clock divider. When
599 *                      true, the divider is enabled and the clock count will be incremented
600 *          by one at each 64th processor clock cycle.  When false, the divider
601 *                      is disabled and the clock count will be incremented at every
602 *                      processor clock cycle.
603 * @param       numEvents UINT32 [in] - the number of PMU events that are to be
604 *                      monitored as specified by the user. For clock counting only, this
605 *                      is set to zero.
606 * @param       pmuEvent1 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
607 *              event to be monitored by counter 1
608 * @param       pmuEvent2 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
609 *              event to be monitored by counter 2
610 * @param       pmuEvent3 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
611 *              event to be monitored by counter 3
612 * @param       pmuEvent4 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
613 *              event to be monitored by counter 4
614 *
615 * This API will start the clock and Intel XScale (R) Processor PMU event counting.  Up to
616 * 4 events can be monitored simultaneously. This API has to be called before
617 * ixPerfProfAccXscalePmuEventCountStop can be called.
618 *
619 * @return
620 *      - IX_PERFPROF_ACC_STATUS_SUCCESS if clock and events counting are
621 *        started successfully
622 *      - IX_PERFPROF_ACC_STATUS_FAIL if unable to start the counting
623 *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_NUM_INVALID if the number of events
624 *        specified is out of the valid range
625 *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_EVENT_INVALID if the value of the PMU
626 *        event specified does not exist
627 *      - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
628 *        running
629 *             
630 * @li   Reentrant    : no
631 * @li   ISR Callable : no
632 *
633 */
634PUBLIC IxPerfProfAccStatus
635ixPerfProfAccXscalePmuEventCountStart(
636        BOOL clkCntDiv,
637        UINT32 numEvents,
638        IxPerfProfAccXscalePmuEvent pmuEvent1,
639        IxPerfProfAccXscalePmuEvent pmuEvent2,
640        IxPerfProfAccXscalePmuEvent pmuEvent3,
641        IxPerfProfAccXscalePmuEvent pmuEvent4 );
642
643/**
644 * @ingroup IxPerfProfAcc
645 *
646 * @fn ixPerfProfAccXscalePmuEventCountStop (
647   IxPerfProfAccXscalePmuResults *eventCountStopResults)
648 *
649 * @brief This API will stop the clock and event counting
650 *
651 * @param *eventCountStopResults @ref IxPerfProfAccXscalePmuResults [out] - pointer
652 *                to struct containing results of counters and their overflow. It is the
653 *                users's responsibility to allocate the memory for this pointer.
654 *
655 * This API will stop the clock and Intel XScale (R) Processor PMU events that are being counted.
656 * The results of the clock and events count will be stored in the pointer
657 * allocated by the user. It can only be called once
658 * IxPerfProfAccEventCountStart has been called.
659 *
660 * @return
661 *      - IX_PERFPROF_ACC_STATUS_SUCCESS if clock and events counting are
662 *        stopped successfully
663 *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if
664 *        ixPerfProfAccXscalePmuEventCountStart is not called first.
665 *             
666 * @li   Reentrant    : no
667 * @li   ISR Callable : no
668 *
669 */
670
671PUBLIC IxPerfProfAccStatus
672ixPerfProfAccXscalePmuEventCountStop(
673   IxPerfProfAccXscalePmuResults *eventCountStopResults); 
674
675/**
676 * @ingroup IxPerfProfAcc
677 *
678 * @fn ixPerfProfAccXscalePmuTimeSampStart(
679   UINT32 samplingRate,
680   BOOL clkCntDiv)
681 *
682 * @brief Starts the time based sampling
683 *
684 * @param       samplingRate UINT32 [in] - sampling rate is the number of
685 *              clock counts before a counter overflow interrupt is generated,
686 *              at which, a sample is taken; the rate specified cannot be greater
687 *          than the counter size of 32bits or set to zero.
688 * @param       clkCntDiv BOOL [in] - enables/disables the clock divider. When
689 *              true, the divider is enabled and the clock count will be incremented
690 *          by one at each 64th processor clock cycle.  When false, the divider
691 *                      is disabled and the clock count will be incremented at every
692 *                      processor clock cycle.
693 *
694 * This API starts the time based sampling to determine the frequency with
695 * which lines of code are being executed.  Sampling is done at the rate
696 * specified by the user.  At each sample,the value of the program counter
697 * is determined.  Each of these occurrences are recorded to determine the
698 * frequency with which the Xscale code is being executed. This API has to be
699 * called before ixPerfProfAccXscalePmuTimeSampStop can be called.
700 *
701 * @return
702 *      - IX_PERFPROF_ACC_STATUS_SUCCESS if time based sampling is started
703 *        successfully
704 *      - IX_PERFPROF_ACC_STATUS_FAIL if unable to start the sampling
705 *      - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
706 *        running
707 *             
708 * @li   Reentrant    : no
709 * @li   ISR Callable : no
710 *
711 */
712PUBLIC IxPerfProfAccStatus
713ixPerfProfAccXscalePmuTimeSampStart(
714        UINT32 samplingRate, 
715        BOOL clkCntDiv);
716
717/**
718 * @ingroup IxPerfProfAcc
719 *
720 * @fn ixPerfProfAccXscalePmuTimeSampStop(
721   IxPerfProfAccXscalePmuEvtCnt *clkCount,
722   IxPerfProfAccXscalePmuSamplePcProfile *timeProfile)
723 *
724 * @brief Stops the time based sampling
725 *
726 * @param       *clkCount @ref IxPerfProfAccXscalePmuEvtCnt [out]  - pointer to the
727 *                      struct containing the final clock count and its overflow.  It is the
728 *                      user's responsibility to allocate the memory for this pointer.
729 * @param       *timeProfile @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
730 *          pointer to the array of profiles for each program counter value;
731 *          the user should set the size of the array to
732 *                      IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the user's
733 *                      responsibility to allocate the memory for this pointer.
734 *
735 * This API stops the time based sampling.  The results are stored in the
736 * pointers allocated by the user.  It can only be called once
737 * ixPerfProfAccXscalePmuTimeSampStart has been called.
738 *
739 * @return
740 *      - IX_PERFPROF_ACC_STATUS_SUCCESS if time based sampling is stopped
741 *        successfully
742 *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if
743 *        ixPerfProfAccXscalePmuTimeSampStart not called first
744 *             
745 * @li   Reentrant    : no
746 * @li   ISR Callable : no
747 *
748 */
749PUBLIC IxPerfProfAccStatus
750ixPerfProfAccXscalePmuTimeSampStop(
751        IxPerfProfAccXscalePmuEvtCnt *clkCount,
752        IxPerfProfAccXscalePmuSamplePcProfile *timeProfile);
753
754/**
755 * @ingroup IxPerfProfAcc
756 *
757 * @fn ixPerfProfAccXscalePmuEventSampStart(
758   UINT32 numEvents,
759   IxPerfProfAccXscalePmuEvent pmuEvent1,
760   UINT32 eventRate1,
761   IxPerfProfAccXscalePmuEvent pmuEvent2,
762   UINT32 eventRate2,
763   IxPerfProfAccXscalePmuEvent pmuEvent3,
764   UINT32 eventRate3,
765   IxPerfProfAccXscalePmuEvent pmuEvent4,
766   UINT32 eventRate4)
767 *
768 * @brief Starts the event based sampling
769 *
770 * @param       numEvents UINT32 [in] - the number of PMU events that are
771 *                      to be monitored as specified by the user. The value should be
772 *          between 1-4 events at a time.
773 * @param       pmuEvent1 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
774 *              event to be monitored by counter 1
775 * @param       eventRate1 UINT32 [in] - sampling rate of counter 1. The rate is
776 *                      the number of events before a sample taken.  If 0 is specified, the
777 *                      the full counter value (0xFFFFFFFF) is used. The rate must not be
778 *                      greater than the full counter value.
779 * @param       pmuEvent2 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
780 *              event to be monitored by counter 2
781 * @param       eventRate2 UINT32 [in] -  sampling rate of counter 2. The rate is
782 *                      the number of events before a sample taken. If 0 is specified, the
783 *                      full counter value (0xFFFFFFFF) is used. The rate must not be
784 *          greater than the full counter value.
785 * @param       pmuEvent3 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
786 *              event to be monitored by counter 3
787 * @param       eventRate3 UINT32 [in] -  sampling rate of counter 3. The rate is
788 *                      the number of events before a sample taken.  If 0 is specified, the
789 *                      full counter value (0xFFFFFFFF) is used.  The rate must not be
790 *          greater than the full counter value.
791 * @param       pmuEvent4 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU
792 *              event to be monitored by counter 4
793 * @param       eventRate4 UINT32 [in] -  sampling rate of counter 4. The rate is
794 *                      the number of events before a sample taken.  If 0 is specified, the
795 *                      full counter value (0xFFFFFFFF) is used. The rate must not be
796 *          greater than the full counter value.
797 *
798 * Starts the event based sampling to determine the frequency with
799 * which events are being executed.  The sampling rate is the number of events,
800 * as specified by the user,  before a counter overflow interrupt is
801 * generated.  A sample is taken at each counter overflow interrupt.  At each
802 * sample,the value of the program counter determines the corresponding
803 * location in the code.  Each of these occurrences are recorded to determine
804 * the frequency with which the Xscale code in each event is executed. This API
805 * has to be called before ixPerfProfAccXscalePmuEventSampStop can be called.
806 *
807 * @return
808 *      - IX_PERFPROF_ACC_STATUS_SUCCESS if event based sampling is started
809 *        successfully
810 *      - IX_PERFPROF_ACC_STATUS_FAIL if unable to start the sampling
811 *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_NUM_INVALID if the number of events
812 *        specified is out of the valid range
813 *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_EVENT_INVALID if the value of the
814 *        PMU event specified does not exist
815 *      - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
816 *        running
817 *             
818 * @li   Reentrant    : no
819 * @li   ISR Callable : no
820 *
821 */
822PUBLIC IxPerfProfAccStatus
823ixPerfProfAccXscalePmuEventSampStart(
824        UINT32 numEvents,
825        IxPerfProfAccXscalePmuEvent pmuEvent1,
826        UINT32 eventRate1,
827    IxPerfProfAccXscalePmuEvent pmuEvent2,
828    UINT32 eventRate2,
829    IxPerfProfAccXscalePmuEvent pmuEvent3,
830    UINT32 eventRate3,
831    IxPerfProfAccXscalePmuEvent pmuEvent4,
832    UINT32 eventRate4);
833
834/**
835 * @ingroup IxPerfProfAcc
836 *
837 * @fn ixPerfProfAccXscalePmuEventSampStop(
838   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile1,
839   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile2,
840   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile3,
841   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile4)
842 *
843 * @brief Stops the event based sampling
844 *
845 * @param       *eventProfile1 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
846 *              pointer to the array of profiles for each program counter value;
847 *              the user should set the size of the array to
848 *                              IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES. It is the
849 *                              users's responsibility to allocate memory for this pointer.
850 * @param       *eventProfile2 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
851 *              pointer to the array of profiles for each program counter value;
852 *              the user should set the size of the array to
853 *                              IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the
854 *                              users's responsibility to allocate memory for this pointer.
855 * @param       *eventProfile3 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
856 *              pointer to the array of profiles for each program counter value;
857 *              the user should set the size of the array to
858 *                              IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the
859 *                              users's responsibility to allocate memory for this pointer.
860 * @param       *eventProfile4 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -
861 *              pointer to the array of profiles for each program counter value;
862 *              the user should set the size of the array to
863 *                              IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the
864 *                              users's responsibility to allocate memory for this pointer.
865 *
866 * This API stops the event based sampling.  The results are stored in the
867 * pointers allocated by the user.  It can only be called once
868 * ixPerfProfAccEventSampStart has been called.
869 *
870 * @return
871 *      - IX_PERFPROF_ACC_STATUS_SUCCESS if event based sampling is stopped
872 *         successfully
873 *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if
874 *          ixPerfProfAccEventSampStart not called first.
875 *             
876 * @li   Reentrant    : no
877 * @li   ISR Callable : no
878 *
879 */
880PUBLIC IxPerfProfAccStatus
881ixPerfProfAccXscalePmuEventSampStop(
882    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile1,
883    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile2,
884    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile3,
885    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile4);
886
887/**                                                                             
888 * @ingroup IxPerfProfAcc                                                     
889 *                                                                             
890 * @fn ixPerfProfAccXscalePmuResultsGet(IxPerfProfAccXscalePmuResults *results)     
891 *                                                                             
892 * @brief Reads the current value of the counters and their overflow                                       
893 *                                                                             
894 * @param *results @ref IxPerfProfAccXscalePmuResults [out] - pointer to the
895          results struct.  It is the user's responsibility to allocate memory
896          for this pointer
897 *                                                                             
898 * This API reads the value of all four event counters and the clock counter,
899 * and the associated overflows.  It does not give results associated with
900 * sampling, i.e. PC and their frequencies.  This API can be called at any time
901 * once a process has been started. If it is called before a process has started
902 * the user should be aware that the values it contains are default values and
903 * might be meaningless.  The values of the counters are stored in the pointer
904 * allocated by the client.
905 *                                                                   
906 * @return - none
907 *             
908 * @li   Reentrant    : no
909 * @li   ISR Callable : no
910 *
911 */                                                                             
912PUBLIC void                                                     
913ixPerfProfAccXscalePmuResultsGet(IxPerfProfAccXscalePmuResults *results);   
914
915/**
916 * @ingroup IxPerfProfAcc
917 *
918 * @fn ixPerfProfAccBusPmuStart(
919        IxPerfProfAccBusPmuMode mode,
920        IxPerfProfAccBusPmuEventCounters1 pecEvent1,
921        IxPerfProfAccBusPmuEventCounters2 pecEvent2,
922        IxPerfProfAccBusPmuEventCounters3 pecEvent3,
923        IxPerfProfAccBusPmuEventCounters4 pecEvent4,
924        IxPerfProfAccBusPmuEventCounters5 pecEvent5,
925        IxPerfProfAccBusPmuEventCounters6 pecEvent6,
926        IxPerfProfAccBusPmuEventCounters7 pecEvent7)
927 * @brief Initializes all the counters and selects events to be monitored.
928 *
929 * Function initializes all the counters and assigns the events associated
930 * with the counters. Users send in the mode and events they want to count.
931 * This API verifies if the combination chosen is appropriate
932 * and sets all the registers accordingly. Selecting HALT mode will result
933 * in an error. User should use ixPerfProfAccBusPmuStop() to HALT.
934 *
935 *
936 * @param mode @ref IxPerfProfAccStateBusPmuMode [in] - Mode selection.
937 * @param pecEvent1 @ref IxPerfProfAccBusPmuEventCounters1 [in] - Event for PEC1.
938 * @param pecEvent2 @ref IxPerfProfAccBusPmuEventCounters2 [in] - Event for PEC2.
939 * @param pecEvent3 @ref IxPerfProfAccBusPmuEventCounters3 [in] - Event for PEC3.
940 * @param pecEvent4 @ref IxPerfProfAccBusPmuEventCounters4 [in] - Event for PEC4.
941 * @param pecEvent5 @ref IxPerfProfAccBusPmuEventCounters5 [in] - Event for PEC5.
942 * @param pecEvent6 @ref IxPerfProfAccBusPmuEventCounters6 [in] - Event for PEC6.
943 * @param pecEvent7 @ref IxPerfProfAccBusPmuEventCounters7 [in] - Event for PEC7.
944 *
945 * @return
946 *      - IX_PERFPROF_ACC_STATUS_SUCCESS - Initialization executed
947 *        successfully. 
948 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_MODE_ERROR - Error in selection of
949 *                mode. Only NORTH, SOUTH and SDRAM modes are allowed.
950 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC1_ERROR - Error in selection of
951 *        event for PEC1
952 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC2_ERROR - Error in selection of
953 *        event for PEC2
954 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC3_ERROR - Error in selection of
955 *        event for PEC3
956 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC4_ERROR - Error in selection of
957 *        event for PEC4
958 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC5_ERROR - Error in selection of
959 *        event for PEC5
960 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC6_ERROR - Error in selection of
961 *        event for PEC6
962 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC7_ERROR - Error in selection of
963 *        event for PEC7
964 *              - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility
965 *                is running
966 *              - IX_PERFPROF_ACC_STATUS_FAIL - Failed to start because interrupt
967 *                service routine fails to bind. 
968 *             
969 * @li   Reentrant    : no
970 * @li   ISR Callable : no
971 *
972 **/
973PUBLIC
974IxPerfProfAccStatus ixPerfProfAccBusPmuStart (
975        IxPerfProfAccBusPmuMode mode, 
976        IxPerfProfAccBusPmuEventCounters1 pecEvent1,
977        IxPerfProfAccBusPmuEventCounters2 pecEvent2, 
978        IxPerfProfAccBusPmuEventCounters3 pecEvent3, 
979        IxPerfProfAccBusPmuEventCounters4 pecEvent4,
980        IxPerfProfAccBusPmuEventCounters5 pecEvent5, 
981        IxPerfProfAccBusPmuEventCounters6 pecEvent6, 
982        IxPerfProfAccBusPmuEventCounters7 pecEvent7);
983
984/**
985 * @ingroup IxPerfProfAcc
986 *
987 * @fn ixPerfProfAccBusPmuStop(void)
988 * @brief Stops all counters.
989 *
990 * This function stops all the PECs by setting the halt bit in the ESR.
991 *
992 *
993 * @return
994 *      - IX_PERFPROF_ACC_STATUS_SUCCESS - Counters successfully halted.
995 *      - IX_PERFPROF_ACC_STATUS_FAIL - Counters could'nt be halted.
996 *              - IX_PERFPROF_ACC_STATUS_BUS_PMU_START_NOT_CALLED - the
997 *                ixPerfProfAccBusPmuStart() function is not called.
998 *             
999 * @li   Reentrant    : no
1000 * @li   ISR Callable : no
1001 *
1002 **/
1003PUBLIC IxPerfProfAccStatus
1004ixPerfProfAccBusPmuStop (void);
1005
1006/**
1007 * @ingroup IxPerfProfAcc
1008 *
1009 * @fn ixPerfProfAccBusPmuResultsGet (
1010                IxPerfProfAccBusPmuResults *busPmuResults)
1011 * @brief Gets values of all counters
1012 *
1013 * This function is responsible for getting all the counter values from the
1014 * lower API and putting it into an array for the user.
1015 *
1016 * @param *busPmuResults @ref IxPerfProfAccBusPmuResults [out]
1017 *           - Pointer to a structure of arrays to store all counter values.
1018 *
1019 * @return  none
1020 *             
1021 * @li   Reentrant    : no
1022 * @li   ISR Callable : no
1023 *
1024 **/
1025PUBLIC void
1026ixPerfProfAccBusPmuResultsGet (IxPerfProfAccBusPmuResults *BusPmuResults);
1027
1028/**
1029 * @ingroup IxPerfProfAcc
1030 *
1031 * @fn ixPerfProfAccBusPmuPMSRGet (
1032        UINT32 *pmsrValue)
1033 * @brief Get values of PMSR 
1034 *
1035 * This API gets the Previous Master Slave Register
1036 * value and returns it to the calling function. This value indicates
1037 * which master or slave accessed the north, south bus or sdram last.
1038 * The value returned by this function is a 32 bit value and is read
1039 * from location of an offset 0x0024 of the base value.
1040 *
1041 * The PMSR value returned indicate the following:
1042 * <pre>
1043 *
1044 * *************************************************************************************
1045 * *  Bit    *  Name  *       Description                                              *
1046 * *                                                                                   *
1047 * *************************************************************************************
1048 * * [31:18]  *Reserved*                                                               *
1049 * *************************************************************************************
1050 * * [17:12] *  PSS   * Indicates which of the slaves on                               *
1051 * *         *        *  ARBS was previously                                           *
1052 * *         *        * accessed by the AHBS.                                          *
1053 * *         *        * [000001] Expansion Bus                                         *
1054 * *         *        * [000010] SDRAM Controller                                      *
1055 * *         *        * [000100] PCI                                                   *
1056 * *         *        * [001000] Queue Manager                                         *
1057 * *         *        * [010000] AHB-APB Bridge                                        *
1058 * *         *        * [100000] Reserved                                              *
1059 * *************************************************************************************
1060 * * [11:8]  *  PSN   * Indicates which of the Slaves on                               *
1061 * *         *        * ARBN was previously                                            *
1062 * *         *        * accessed the AHBN.                                             *
1063 * *         *        * [0001] SDRAM Controller                                        *
1064 * *         *        * [0010] AHB-AHB Bridge                                          *
1065 * *         *        * [0100] Reserved                                                *
1066 * *         *        * [1000] Reserved                                                *
1067 * *************************************************************************************
1068 * *  [7:4]  *  PMS   * Indicates which of the Masters on                              *
1069 * *         *        * ARBS was previously                                            *
1070 * *         *        * accessing the AHBS.                                            *
1071 * *         *        * [0001] Gasket                                                  *
1072 * *         *        * [0010] AHB-AHB Bridge                                          *
1073 * *         *        * [0100] PCI                                                     *
1074 * *         *        * [1000] APB                                                     *
1075 * *************************************************************************************
1076 * *  [3:0]  *  PMN   * Indicates which of the Masters on                              *
1077 * *         *        * ARBN was previously                                            *
1078 * *         *        * accessing the AHBN.                                            *
1079 * *         *        * [0001] NPEA                                                    *
1080 * *         *        * [0010] NPEB                                                    *
1081 * *         *        * [0100] NPEC                                                    *
1082 * *         *        * [1000] Reserved                                                *
1083 * *************************************************************************************
1084 * </pre>
1085 *
1086 * @param *pmsrValue UINT32 [out] - Pointer to return PMSR value. Users need to
1087 *                                                        allocate storage for psmrValue.   
1088 *
1089 * @return none
1090 *
1091 * @li   Reentrant    : no
1092 * @li   ISR Callable : no
1093 *
1094 **/
1095PUBLIC void
1096ixPerfProfAccBusPmuPMSRGet (
1097UINT32 *pmsrValue);
1098
1099
1100/**
1101 * The APIs below are specifically used for Xcycle module.
1102 **/
1103
1104/**
1105 * @ingroup IxPerfProfAcc
1106 *
1107 * @fn ixPerfProfAccXcycleBaselineRun (
1108                UINT32 *numBaselineCycle)
1109 *
1110 * @brief Perform baseline for Xcycle
1111 *
1112 * @param *numBaselineCycle UINT32 [out] - pointer to baseline value after
1113 *                                      calibration. Calling function are responsible for
1114 *                                      allocating memory space for this pointer.
1115 *
1116 * Global Data  :
1117 *                        - None.
1118 *                       
1119 * This function MUST be run before the Xcycle tool can be used. This
1120 * function must be run immediately when the OS boots up with no other
1121 * addition programs running.
1122 * Addition note :     This API will measure the time needed to perform
1123 * a fix amount of CPU instructions (~ 1 second worth of loops) as a
1124 * highest priority task and with interrupt disabled. The time measured
1125 * is known as the baseline - interpreted as the shortest time
1126 * needed to complete the amount of CPU instructions. The baseline is
1127 * returned as unit of time in 66Mhz clock tick. 
1128 *
1129 * @return
1130 *      - IX_PERFPROF_ACC_STATUS_SUCCESS - successful run, result is returned
1131 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL - failed to change
1132 *         task priority
1133 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_RESTORE_FAIL - failed to
1134 *         restore task priority
1135 *      - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility
1136 *         is running
1137 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS  - Xcycle
1138 *        tool has already started
1139 *             
1140 * @li   Reentrant    : no
1141 * @li   ISR Callable : no
1142 *
1143 */
1144PUBLIC IxPerfProfAccStatus
1145ixPerfProfAccXcycleBaselineRun(
1146        UINT32 *numBaselineCycle); 
1147
1148/**
1149 * @ingroup IxPerfProfAcc
1150 *
1151 * @fn ixPerfProfAccXcycleStart(
1152                UINT32 numMeasurementsRequested);
1153 *
1154 * @brief Start the measurement
1155 *
1156 * @param  numMeasurementsRequested UINT32 [in] - number of measurements
1157 *                                                      to perform. Value can be 0 to 
1158 *                                                      IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS.
1159 *                                                      0 indicate continuous measurement.
1160 *
1161 * Global Data  :
1162 *                        - None.
1163 *                       
1164 *
1165 * Start the measurements immediately.
1166 * numMeasurementsRequested specifies number of measurements to run.
1167 * If numMeasurementsRequested is set to 0, the measurement will
1168 * be performed continuously until IxPerfProfAccXcycleStop()
1169 * is called. 
1170 * It is estimated that 1 measurement takes approximately 1 second during
1171 * low CPU utilization, therefore 128 measurement takes approximately 128 sec.
1172 * When CPU utilization is high, the measurement will take longer.
1173 * This function spawn a task the perform the measurement and returns.
1174 * The measurement may continue even if this function returns.
1175 *
1176 * IMPORTANT: Under heavy CPU utilization, the task spawn by this
1177 * function may starve and fail to respond to stop command. User
1178 * may need to kill the task manually in this case. 
1179 *
1180 * There are only IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS
1181 * storage available so storing is wrapped around if measurements are 
1182 * more than IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS.
1183 *
1184 *
1185 * @return
1186 *      - IX_PERFPROF_ACC_STATUS_SUCCESS - successful start, a thread is created
1187 *         in the background to perform measurement.
1188 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL - failed to set
1189 *         task priority
1190 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_THREAD_CREATE_FAIL - failed to create
1191 *         thread to perform measurement.
1192 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE - baseline is not available
1193 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_REQUEST_OUT_OF_RANGE -
1194 *         value is larger than IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS
1195 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS - Xcycle tool
1196 *         has already started
1197 *      - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is
1198 *         running
1199 *             
1200 * @li   Reentrant    : no
1201 * @li   ISR Callable : no
1202 *
1203 */
1204PUBLIC IxPerfProfAccStatus
1205ixPerfProfAccXcycleStart (
1206        UINT32 numMeasurementsRequested); 
1207
1208/**
1209 * @ingroup IxPerfProfAcc
1210 *
1211 * @fn ixPerfProfAccXcycleStop(void);
1212 *
1213 * @brief Stop the Xcycle measurement
1214 *
1215 * @param None
1216 *
1217 * Global Data  :
1218 *                        - None.
1219 *                       
1220 * Stop Xcycle measurements immediately. If the measurements have stopped
1221 * or not started, return IX_PERFPROF_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING.
1222 * Note: This function does not stop measurement cold. The measurement thread
1223 * may need a few seconds to complete the last measurement. User needs to use
1224 * ixPerfProfAccXcycleInProgress() to determine if measurement is indeed
1225 * completed.
1226 *
1227 * @return
1228 *      - IX_PERFPROF_ACC_STATUS_SUCCESS - successful measurement is stopped
1229 *      - IX_PERFPROF_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING - no measurement running
1230 *             
1231 * @li   Reentrant    : no
1232 * @li   ISR Callable : no
1233 *
1234 */
1235PUBLIC IxPerfProfAccStatus
1236ixPerfProfAccXcycleStop(void); 
1237
1238/**
1239 * @ingroup IxPerfProfAcc
1240 *
1241 * @fn ixPerfProfAccXcycleResultsGet(
1242        IxPerfProfAccXcycleResults *xcycleResult )
1243 *
1244 * @brief Get the results of Xcycle measurement
1245 *
1246 * @param *xcycleResult @ref IxPerfProfAccXcycleResults [out] - Pointer to
1247 *                              results of last measurements. Calling function are
1248 *                              responsible for allocating memory space for this pointer.
1249 *
1250 * Global Data  :
1251 *                        - None.
1252 *                       
1253 * Retrieve the results of last measurement. User should use
1254 * ixPerfProfAccXcycleInProgress() to check if measurement is completed
1255 * before getting the results.
1256 *
1257 * @return
1258 *      - IX_PERFPROF_ACC_STATUS_SUCCESS - successful
1259 *      - IX_PERFPROF_ACC_STATUS_FAIL - result is not complete.
1260 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE - baseline is performed
1261 *      - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS  - Xcycle
1262 *         tool is still running
1263 *             
1264 * @li   Reentrant    : no
1265 * @li   ISR Callable : no
1266 *
1267 */
1268PUBLIC IxPerfProfAccStatus
1269ixPerfProfAccXcycleResultsGet (
1270    IxPerfProfAccXcycleResults *xcycleResult); 
1271
1272/**
1273 * @ingroup IxPerfProfAcc
1274 *
1275 * @fn ixPerfProfAccXcycleInProgress (void)
1276 *
1277 * @brief Check if Xcycle is running
1278 *
1279 * @param None
1280 * Global Data  :
1281 *                        - None.
1282 *                       
1283 * Check if Xcycle measuring task is running.
1284 *
1285 * @return
1286 *      - TRUE - Xcycle is running 
1287 *      - FALSE - Xcycle is not running 
1288 *             
1289 * @li   Reentrant    : no
1290 * @li   ISR Callable : no
1291 *
1292 */
1293PUBLIC BOOL
1294ixPerfProfAccXcycleInProgress(void); 
1295
1296#ifdef __linux
1297/**
1298 * @ingroup IxPerfProfAcc
1299 *
1300 * @fn ixPerfProfAccXscalePmuTimeSampCreateProcFile
1301 *
1302 * @brief Enables proc file to call module function
1303 *
1304 * @param None
1305 *
1306 * Global Data  :
1307 *                        - None.
1308 *
1309 * This function is declared globally to enable /proc directory system to call
1310 * and execute the function when the registered file is called. This function is not meant to
1311 * be called by the user.
1312 *
1313 * @return
1314 *      - Length of data written to file.
1315 *
1316 * @li   Reentrant    : no
1317 * @li   ISR Callable : no
1318 *
1319 */
1320int
1321ixPerfProfAccXscalePmuTimeSampCreateProcFile (char *buf, char **start, off_t offset,
1322                                      int count, int *eof, void *data);
1323
1324/**
1325 * @ingroup IxPerfProfAcc
1326 *
1327 * @fn ixPerfProfAccXscalePmuEventSampCreateProcFile
1328 *
1329 * @brief Enables proc file to call module function
1330 *
1331 * @param None
1332 *
1333 * Global Data  :
1334 *                        - None.
1335 *
1336 * This function is declared globally to enable /proc directory system to call
1337 * and execute the function when the registered file is called. This function is not meant to
1338 * be called by the user.
1339 *
1340 * @return
1341 *      - Length of data written to file.
1342 *
1343 * @li   Reentrant    : no
1344 * @li   ISR Callable : no
1345 *
1346 */
1347int
1348ixPerfProfAccXscalePmuEventSampCreateProcFile (char *buf, char **start, off_t offset,
1349                                      int count, int *eof, void *data);
1350
1351
1352#endif /* ifdef __linux */
1353
1354#endif /* ndef IXPERFPROFACC_H */
1355
1356/**
1357 *@} defgroup IxPerfProfAcc
1358 */
1359
1360
Note: See TracBrowser for help on using the repository browser.