From 71bc1229d67e7ddde351d92ccebfabf0ba79c814 Mon Sep 17 00:00:00 2001 From: bd Date: Wed, 16 Apr 2025 17:38:42 -0400 Subject: Wrap all addresses immediately --- inc/dram.h | 9 --------- inc/storage.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'inc') diff --git a/inc/dram.h b/inc/dram.h index 2a4e358..847642d 100644 --- a/inc/dram.h +++ b/inc/dram.h @@ -5,15 +5,6 @@ #include #include -// clang-format off -/** - * Ensures address is within the current memory size using a clean wrap. - * @param an address - */ -#define WRAP_ADDRESS(a) \ - ((a < 0) ? ((a % MEM_WORDS) + MEM_WORDS) % MEM_WORDS : a % MEM_WORDS) -// clang-format on - class Dram : public Storage { public: diff --git a/inc/storage.h b/inc/storage.h index 1bf5805..994bb8f 100644 --- a/inc/storage.h +++ b/inc/storage.h @@ -7,6 +7,15 @@ #include #include +// clang-format off +/** + * Ensures address is within the current memory size using a clean wrap. + * @param an address + */ +#define WRAP_ADDRESS(a) \ + ((a < 0) ? ((a % MEM_WORDS) + MEM_WORDS) % MEM_WORDS : a % MEM_WORDS) +// clang-format on + class Storage { public: -- cgit v1.2.3 From 644b9ef0c380a7fc0ec3496de1c3a54793ca1fbf Mon Sep 17 00:00:00 2001 From: bd Date: Thu, 17 Apr 2025 20:05:07 -0400 Subject: Remove useless macro --- inc/definitions.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'inc') diff --git a/inc/definitions.h b/inc/definitions.h index 8513361..a9077b2 100644 --- a/inc/definitions.h +++ b/inc/definitions.h @@ -30,11 +30,6 @@ */ #define MEM_DELAY 3 -/** - * The total number of cycles a level one cache access takes - */ -#define L1_CACHE_DELAY 0 - /** * Return the N least-significant bits from integer K using a bit mask * @param the integer to be parsed -- cgit v1.2.3