-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathREADME
65 lines (41 loc) · 2.02 KB
/
README
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SimpleSim Readme
================
SimpleSim is a simple computer system simulator using the QSim emulation infrastructure. It
provides a processor pipeline model for the back-end (issue through retirement) of an out-of-
order x86 core.
Discrete Event Simulator
------------------------
Code for the discrete event simulator is in des.h and des.cpp. The SimpleSim DES provides a
prioritized cycle-based simulation. The interface is primarily through the following:
uint64_t Slide::_now
The current simulation cycle.
bool Slide::_advance(uint64_t)
Advance the simulation to cycle t.
bool Slide::_tick()
Run the next event. Return true if more events remain to process.
void Slide::_terminate()
Stop the simulation before the next event is processed.
template <typename T> void Slide::schedule(uint64_t t, T* o, void (*f)(T*), uint8_t p)
Call member f of object pointed to by o t cycles into the future, with priority p. This can be
used with t=0 to insert events into the queue to happen within the same simulation cycle as
called. Events are allowed to create new events with higher priority (smaller p).
Memory System
-------------
The memory system is made of a hierarchy of MemSysDevice objects, usually a CPU, a collection
of coherent caches, and a memory controller. Memory system objects (other than the CPU) are
defined in cache.h and cache.cpp.
CPU
---
There are several options in SimpleSim for simulated CPU. These options, defined in cpu.h and
cpu.cpp, including:
SimpleSim::RandomCpu
Connects to a single lower-level memory device and sends sequential requests, randomly
switching to alternate base addresses. Does not depend on QSim.
SimpleSim::SimpleCpu
Connects to a QSim instance, blocks on stalled memory requests (both load/store and fetch),
otherwise executes one instruction per cycle. SimpleCpu connects to separate instruction and
data MemSysDevice objects, which are considered peers on the coherence network.
SimpleSim::SuperscalarCpu
main.cpp
--------
This file is responsible for wiring up and running the simulation.