-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (36 loc) · 1.24 KB
/
Makefile
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
CC = g++
CFLAGS = -std=c++11 -c -Wall -pedantic -g
# input parameters - taken from project.pdf
INP_FILE_NAME="prog.dat"
NF=4 # number of instructions fetched per cycle by the fetch unit
NI=16 # instruction queue max capacity of instructions held in the decode unit
NW=4 # number of instructions issued per cycle to reservation stations
NB=4 # number of common data buses
NR=8 # number of entries available in the circular reorder buffer (ROB)
all: main
debug:
./main $(INP_FILE_NAME) $(NF) $(NI) $(NW) $(NB) $(NR) 1
run:
./main $(INP_FILE_NAME) $(NF) $(NI) $(NW) $(NB) $(NR)
main: common.o main.o simulator.o branchPredictor.o alu.o fetch.o decode.o issue.o execute.o
$(CC) -o main common.o main.o simulator.o branchPredictor.o alu.o fetch.o decode.o issue.o execute.o
main.o: main.cpp
$(CC) $(CFLAGS) main.cpp
common.o: common.cpp
$(CC) $(CFLAGS) common.cpp
simulator.o: simulator.cpp
$(CC) $(CFLAGS) simulator.cpp
branchPredictor.o: branchPredictor.cpp
$(CC) $(CFLAGS) branchPredictor.cpp
alu.o: alu.cpp
$(CC) $(CFLAGS) alu.cpp
fetch.o: fetch.cpp
$(CC) $(CFLAGS) fetch.cpp
decode.o: decode.cpp
$(CC) $(CFLAGS) decode.cpp
issue.o: issue.cpp
$(CC) $(CFLAGS) issue.cpp
execute.o: execute.cpp
$(CC) $(CFLAGS) execute.cpp
clean:
rm *.o main