OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cpu/] [common/] [stats.h] - Blame information for rev 3

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 cvs
/* stats.h -- Header file for stats.c
2
   Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
3
 
4
This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
 
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
GNU General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19
 
20
#define DSTATS_LEN      3000
21
#define SSTATS_LEN      300
22
#define FSTATS_LEN      200
23
 
24
struct dstats_entry {
25
        char insn1[OPERANDNAME_LEN];
26
        char insn2[OPERANDNAME_LEN];
27
        int  cnt_dynamic;
28
        int  depend;
29
};
30
 
31
struct sstats_entry {
32
        char insn[OPERANDNAME_LEN];
33
        int  cnt_static;
34
        int  cnt_dynamic;
35
};      /* single stats */
36
 
37
struct fstats_entry {
38
        enum insn_type insn1;
39
        enum insn_type insn2;
40
        int  cnt_dynamic;
41
        int  depend;
42
};      /* functional units stats */
43
 
44
struct branchstat {
45
        int taken;
46
        int nottaken;
47
};
48
 
49
struct bpbstat {
50
        int hit;
51
        int miss;
52
        int correct;
53
        int incorrect;
54
};
55
 
56
struct bticstat {
57
        int hit;
58
        int miss;
59
};
60
 
61
struct mstats_entry {
62
        int  byteadd;
63
        struct branchstat beqz;
64
        struct branchstat bnez;
65
        struct bpbstat bpb;
66
        struct bticstat btic;
67
};      /* misc units stats */
68
 
69
extern struct mstats_entry mstats;
70
extern struct sstats_entry sstats[SSTATS_LEN];
71
extern struct dstats_entry dstats[DSTATS_LEN];
72
extern struct fstats_entry fstats[FSTATS_LEN];
73
 
74
extern int check_depend();
75
extern void addsstats(char *item, int cnt_dynamic, int cnt_static);
76
extern void adddstats(char *item1, char *item2, int cnt_dynamic, int depend);
77
extern void addfstats(enum insn_type item1, enum insn_type item2, int cnt_dynamic, int depend);
78
extern void initstats();
79
extern void printstats();

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.