From eaef9348431ea331ecf118aefc21246dbcf2c998 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sat, 15 Oct 2022 14:03:28 -0700 Subject: Add memory implementation as well; reorg. --- memory/line.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 memory/line.h (limited to 'memory/line.h') diff --git a/memory/line.h b/memory/line.h new file mode 100644 index 0000000..3377ec8 --- /dev/null +++ b/memory/line.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +#include "infra/port.h" +#include "infra/sim.h" + +namespace memory { + constexpr std::uint64_t LINE_BYTES_LOG2 = 4; + constexpr std::uint64_t LINE_BYTES = 1 << LINE_BYTES_LOG2; + constexpr std::uint64_t LINE_BYTE_OFFSET_MASK = LINE_BYTES - 1; + + typedef std::array line; +} -- cgit v1.2.3