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 6

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
};
49
 
50
struct bpbstat {
51
        int hit;
52
        int miss;
53
        int correct;
54
        int incorrect;
55
};
56
 
57
struct bticstat {
58
        int hit;
59
        int miss;
60
};
61
 
62
struct mstats_entry {
63
        int  byteadd;
64
        struct branchstat beqz;
65
        struct branchstat bnez;
66
        struct bpbstat bpb;
67
        struct bticstat btic;
68
};      /* misc units stats */
69
 
70 6 lampret
struct cachestats_entry {
71
        int readhit;
72
        int readmiss;
73
        int writehit;
74
        int writemiss;
75
};      /* cache stats */
76
 
77
struct raw_stats {
78
        int reg[64];
79
        int range[RAW_RANGE];
80
};      /* RAW hazard stats */
81
 
82 2 cvs
extern struct mstats_entry mstats;
83
extern struct sstats_entry sstats[SSTATS_LEN];
84
extern struct dstats_entry dstats[DSTATS_LEN];
85
extern struct fstats_entry fstats[FSTATS_LEN];
86 6 lampret
extern struct cachestats_entry ic_stats;
87
extern struct cachestats_entry dc_stats;
88
extern struct raw_stats raw_stats;
89 2 cvs
 
90
extern int check_depend();
91
extern void addsstats(char *item, int cnt_dynamic, int cnt_static);
92
extern void adddstats(char *item1, char *item2, int cnt_dynamic, int depend);
93
extern void addfstats(enum insn_type item1, enum insn_type item2, int cnt_dynamic, int depend);
94
extern void initstats();
95
extern void printstats();

powered by: WebSVN 2.1.0

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