Last change
on this file since 26 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.1 KB
|
Rev | Line | |
---|
[2] | 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 : standard memory with random access time of RAS clock
|
---|
| 6 | * cycles
|
---|
| 7 | */
|
---|
| 8 |
|
---|
| 9 | #include <stdio.h>
|
---|
| 10 | #include <stdlib.h>
|
---|
| 11 | #include <string.h>
|
---|
| 12 | #include "common.h"
|
---|
| 13 |
|
---|
| 14 | void
|
---|
| 15 | memory_std(const int RAS)
|
---|
| 16 | {
|
---|
| 17 | struct bus2_t line;
|
---|
| 18 | struct result_t output = {0, 0, 0, 0};
|
---|
| 19 |
|
---|
| 20 | while (fscanfbus2(&line) != EOF) {
|
---|
| 21 | /* Process the counts */
|
---|
| 22 | setstats(&line, &output);
|
---|
| 23 |
|
---|
| 24 | /* fprintfbus2(stderr, &line);
|
---|
| 25 | * Every request will need a call to memory and as all
|
---|
| 26 | * is simple, every call will be a blocking one and
|
---|
| 27 | * request will need to wait for previous request to
|
---|
| 28 | * memory to be ready. We could simple say every
|
---|
| 29 | * request to memory will be 9 cycles (8 memory, 1
|
---|
| 30 | * bus transfer)
|
---|
| 31 | */
|
---|
| 32 | output.cycles += RAS + TRANSFER;
|
---|
| 33 | output.conflicts++;
|
---|
| 34 |
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | /* Compensation, cause first call is not a actual conflict */
|
---|
| 38 | output.conflicts--;
|
---|
| 39 | output.misses--;
|
---|
| 40 |
|
---|
| 41 | printfresult(stdout, &output);
|
---|
| 42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.