summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/cache.h4
-rw-r--r--inc/dram.h4
-rw-r--r--inc/response.h8
-rw-r--r--inc/storage.h7
4 files changed, 8 insertions, 15 deletions
diff --git a/inc/cache.h b/inc/cache.h
index 312f3d1..f1fb942 100644
--- a/inc/cache.h
+++ b/inc/cache.h
@@ -17,8 +17,8 @@ class Cache : public Storage
Cache(int lines, Storage *lower, int delay);
~Cache();
- Response *write(Accessor accessor, signed int data, int address) override;
- Response *read(Accessor accessor, int address) override;
+ Response write(Accessor accessor, signed int data, int address) override;
+ Response read(Accessor accessor, int address) override;
};
#endif /* CACHE_H_INCLUDED */
diff --git a/inc/dram.h b/inc/dram.h
index c1e86b9..cfac799 100644
--- a/inc/dram.h
+++ b/inc/dram.h
@@ -15,8 +15,8 @@ class Dram : public Storage
Dram(int lines, int delay);
~Dram();
- Response *write(Accessor accessor, signed int data, int address) override;
- Response *read(Accessor accessor, int address) override;
+ Response write(Accessor accessor, signed int data, int address) override;
+ Response read(Accessor accessor, int address) override;
};
#endif /* DRAM_H_INCLUDED */
diff --git a/inc/response.h b/inc/response.h
index c8141fd..d945e0f 100644
--- a/inc/response.h
+++ b/inc/response.h
@@ -1,16 +1,10 @@
#ifndef RESPONSE_H
#define RESPONSE_H
-enum Status {
+enum Response {
OK,
WAIT,
BLOCKED,
};
-struct Response {
- Status status;
- int *line;
- int val;
-};
-
#endif /* RESPONSE_H_INCLUDED */
diff --git a/inc/storage.h b/inc/storage.h
index 841c531..a38f17d 100644
--- a/inc/storage.h
+++ b/inc/storage.h
@@ -7,7 +7,7 @@
#include <vector>
enum Accessor {
- MEMORY,
+ MEM,
FETCH,
L1CACHE,
IDLE,
@@ -24,8 +24,7 @@ class Storage
* @param the address to write to.
* @return a status code reflecting the state of the request.
*/
- virtual Response *
- write(Accessor accessor, signed int data, int address) = 0;
+ virtual Response write(Accessor accessor, signed int data, int address) = 0;
/**
* Get the data at `address`.
* @param the source making the request.
@@ -33,7 +32,7 @@ class Storage
* @return a status code reflecting the state of the request, and the
* data being returned.
*/
- virtual Response *read(Accessor accessor, int address) = 0;
+ virtual Response read(Accessor accessor, int address) = 0;
/**
* Sidedoor view of `lines` of memory starting at `base`.
* @param The base line to start getting memory from.