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 24

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 6 lampret
#define RAW_RANGE       13
24 2 cvs
 
25
struct dstats_entry {
26
        char insn1[OPERANDNAME_LEN];
27
        char insn2[OPERANDNAME_LEN];
28
        int  cnt_dynamic;
29
        int  depend;
30
};
31
 
32
struct sstats_entry {
33
        char insn[OPERANDNAME_LEN];
34
        int  cnt_static;
35
        int  cnt_dynamic;
36
};      /* single stats */
37
 
38
struct fstats_entry {
39
        enum insn_type insn1;
40
        enum insn_type insn2;
41
        int  cnt_dynamic;
42
        int  depend;
43
};      /* functional units stats */
44
 
45
struct branchstat {
46
        int taken;
47
        int nottaken;
48 24 lampret
        int forward;
49
        int backward;
50 2 cvs
};
51
 
52 24 lampret
struct staticbp_stat {
53
        int correct;
54
        int all;
55
};
56
 
57 2 cvs
struct bpbstat {
58
        int hit;
59
        int miss;
60
        int correct;
61
        int incorrect;
62
};
63
 
64
struct bticstat {
65
        int hit;
66
        int miss;
67
};
68
 
69
struct mstats_entry {
70
        int  byteadd;
71
        struct branchstat beqz;
72
        struct branchstat bnez;
73 24 lampret
        struct staticbp_stat sbp_bf;
74
        struct staticbp_stat sbp_bnf;
75 2 cvs
        struct bpbstat bpb;
76
        struct bticstat btic;
77
};      /* misc units stats */
78
 
79 6 lampret
struct cachestats_entry {
80
        int readhit;
81
        int readmiss;
82
        int writehit;
83
        int writemiss;
84
};      /* cache stats */
85
 
86
struct raw_stats {
87
        int reg[64];
88
        int range[RAW_RANGE];
89
};      /* RAW hazard stats */
90
 
91 2 cvs
extern struct mstats_entry mstats;
92
extern struct sstats_entry sstats[SSTATS_LEN];
93
extern struct dstats_entry dstats[DSTATS_LEN];
94
extern struct fstats_entry fstats[FSTATS_LEN];
95 6 lampret
extern struct cachestats_entry ic_stats;
96
extern struct cachestats_entry dc_stats;
97
extern struct raw_stats raw_stats;
98 2 cvs
 
99
extern int check_depend();
100
extern void addsstats(char *item, int cnt_dynamic, int cnt_static);
101
extern void adddstats(char *item1, char *item2, int cnt_dynamic, int depend);
102
extern void addfstats(enum insn_type item1, enum insn_type item2, int cnt_dynamic, int depend);
103
extern void initstats();
104
extern void printstats();

powered by: WebSVN 2.1.0

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