Last change
on this file since 77 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
File size:
1.4 KB
|
Line | |
---|
1 | /* Author : Rick van der Zwet
|
---|
2 | * S-number : 0433373
|
---|
3 | * Version : $Id: memory.h 363 2007-12-03 06:07:31Z rick $
|
---|
4 | * Copyright : FreeBSD Licence
|
---|
5 | * Description : Small libary to include most common functions
|
---|
6 | * cycles, header
|
---|
7 | */
|
---|
8 | #ifndef COMMON_H
|
---|
9 | #define COMMON_H
|
---|
10 |
|
---|
11 | #define FALSE 0
|
---|
12 | #define TRUE 1
|
---|
13 |
|
---|
14 | /* Memory transfer time in cycles */
|
---|
15 | #define TRANSFER 1
|
---|
16 |
|
---|
17 | /* BUS2 output captured in a struct */
|
---|
18 | struct bus2_t
|
---|
19 | {
|
---|
20 | unsigned char type; /* Read/Write */
|
---|
21 | unsigned int size; /* Number of words requested */
|
---|
22 | unsigned int address; /* Memory location */
|
---|
23 | unsigned int rcount; /* Number of registers accessed meanwhile */
|
---|
24 | unsigned int icount; /* Number of instructions accessed meanwhile */
|
---|
25 | };
|
---|
26 |
|
---|
27 | /* Made a struct for the results to make it more general */
|
---|
28 | struct result_t
|
---|
29 | {
|
---|
30 | long int cycles; /* Total needed cycles */
|
---|
31 | long int incache; /* Total words fetched from cache */
|
---|
32 | long int misses; /* Cache misses */
|
---|
33 | long int conflicts; /* Bank conflics occured */
|
---|
34 | };
|
---|
35 |
|
---|
36 | /* Print of struct bus2_t mainly for debugging purposes */
|
---|
37 | void fprintfbus2(FILE * output, struct bus2_t * line);
|
---|
38 |
|
---|
39 | /* Push the bus2 lines into a bus2 struct */
|
---|
40 | int fscanfbus2(struct bus2_t * line);
|
---|
41 |
|
---|
42 | /* Set statictics of input to output */
|
---|
43 | void setstats(struct bus2_t * line, struct result_t * output);
|
---|
44 |
|
---|
45 | /* Result printer */
|
---|
46 | void printfresult(FILE * output, struct result_t * result);
|
---|
47 |
|
---|
48 | #endif /* COMMON_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.