-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleCPU.h
More file actions
29 lines (23 loc) · 791 Bytes
/
SimpleCPU.h
File metadata and controls
29 lines (23 loc) · 791 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
#pragma once
#include <array>
#include <iostream>
#include <libcachesim/CacheToolbox.h>
#include "CacheController.h"
#include "TraceReplayer.h"
class SimpleCPU
{
TraceReplayer replayer_0;
TraceReplayer replayer_1;
unsigned instruction_latency;
std::array<uint64_t, 2> instruction_count;
std::array<uint64_t, 2> mem_accesses;
std::array<uint64_t, 2> cycles;
CacheController cache_controller;
public:
SimpleCPU(const std::string& trace_file_0, const std::string& trace_file_1,
const CacheConfig& L1_config, const CacheConfig& L2_config,
unsigned instruction_latency, unsigned L1_latency, unsigned L2_latency,
unsigned dram_latency);
void run(void);
void print_statistics(std::ostream& os = std::cout);
};