-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemory_map.h
More file actions
40 lines (29 loc) · 844 Bytes
/
memory_map.h
File metadata and controls
40 lines (29 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _memory_map_h
#define _memory_map_h
#include <vector>
using namespace std;
class MemoryMap {
public:
MemoryMap();
void set_single_bank_params(uint64_t filter_offset, uint64_t ofmap_offset);
int64_t num_mappings;
int64_t num_banks;
vector<uint64_t> ifmap_map_list;
vector<uint64_t> filter_map_list;
vector<uint64_t> ofmap_map_list;
bool map_data_valid = false;
};
MemoryMap::MemoryMap() {
num_mappings = 1;
num_banks = 1;
map_data_valid = false;
}
void MemoryMap::set_single_bank_params(uint64_t filter_offset, uint64_t ofmap_offset) {
num_mappings = 1;
num_banks = 1;
ifmap_map_list.push_back(filter_offset);
filter_map_list.push_back(ofmap_offset);
ofmap_map_list.push_back((uint64_t)-1);
map_data_valid = true;
}
#endif