diff options
author | bd <bdunaisky@umass.edu> | 2025-03-23 17:47:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-23 17:47:34 +0000 |
commit | fab7d9dcf249762eeac89a11487856e7569c66d5 (patch) | |
tree | 79287fc411c4c1195654560f494091ec38781e8a | |
parent | cef3753c74ec68ed0d99c1ae07af042dfc964344 (diff) | |
parent | 28f9c5e13d77ba1f160d83373144b691da75d7e2 (diff) |
Merge pull request #30 from bdunahu/bdunahu
Add controller.h, implementation and tests.
-rw-r--r-- | inc/definitions.h | 7 | ||||
-rw-r--r-- | inc/dram.h | 2 | ||||
-rw-r--r-- | src/storage/cache.cc | 1 | ||||
-rw-r--r-- | tests/cache.cc | 1 | ||||
-rw-r--r-- | tests/dram.cc | 1 |
5 files changed, 6 insertions, 6 deletions
diff --git a/inc/definitions.h b/inc/definitions.h index eced554..ff2f7c6 100644 --- a/inc/definitions.h +++ b/inc/definitions.h @@ -32,7 +32,7 @@ #define L1_CACHE_LINES static_cast<int>(pow(2, L1_CACHE_LINE_SPEC)) /** - * The total number of cycles a memory access takes. + * The total number of cycles a memory access takes */ #define MEM_DELAY 3 @@ -42,6 +42,11 @@ #define L1_CACHE_DELAY 0 /** + * The number of general purpose registers + */ +#define GPR_NUM 16 + +/** * Return the N least-significant bits from integer K using a bit mask * @param the integer to be parsed * @param the number of bits to be parsed @@ -9,8 +9,6 @@ class Dram : public Storage public: /** * Constructor. - * @param The number of `lines` contained in memory. The total number of - * words is this number multiplied by LINE_SIZE. * @param The number of clock cycles each access takes. * @return A new memory object. */ diff --git a/src/storage/cache.cc b/src/storage/cache.cc index d96efe2..dccab47 100644 --- a/src/storage/cache.cc +++ b/src/storage/cache.cc @@ -3,7 +3,6 @@ #include "response.h" #include "utils.h" #include <bits/stdc++.h> -#include <bitset> #include <iostream> #include <iterator> diff --git a/tests/cache.cc b/tests/cache.cc index c64f00e..0b04bce 100644 --- a/tests/cache.cc +++ b/tests/cache.cc @@ -1,5 +1,4 @@ #include "cache.h" -#include "definitions.h" #include "dram.h" #include <catch2/catch_test_macros.hpp> diff --git a/tests/dram.cc b/tests/dram.cc index 7329bf2..0e97e81 100644 --- a/tests/dram.cc +++ b/tests/dram.cc @@ -1,5 +1,4 @@ #include "dram.h" -#include "definitions.h" #include <array> #include <catch2/catch_test_macros.hpp> |