summaryrefslogtreecommitdiff
path: root/memory/line.h
blob: 3377ec879ae2ee49aae19bcd550a122c20a21d59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include <array>
#include <cstdint>

#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<std::uint8_t, LINE_BYTES> line;
}