-
Notifications
You must be signed in to change notification settings - Fork 1
/
Summary.txt
63 lines (46 loc) · 1.12 KB
/
Summary.txt
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
PARSER
-instructions
-Parser(String fileName)=> constructor
-readFile(String fileName)
-getInstructions()
SYNTAX CHECKER
-instTypes
-SyntaxChecker(Hashmap insts)
-check(Hashmap insts)
-isCorrectReg(String op)
HAZARD CHECKER
-instructions
-depMatrix
-noOfInst
-NO_HAZARD = 0 -|
-RAW = -1 | for lookup table
-WAR = -2 |
-WAW = -3 -|
-OP1 = 1 -|for readable indexing
-OP2 = 2 -|
-HazardChecker(HashMap insts)
-buildDepMatrix()
-checkTwoInsts(int inst1, int inst2)
-getDepMatrix()
CYCLE
-instructions
-stages
-set
-depMatrix
-clockCycle
-currInstr
-Cycle(Parser p, HazardChecker h)
-updateClock()
-getClockCycles()
STAGES
- fetch
* Enqueues every instruction to the mbr queue
* Instructions in the mbr queue are waiting to be decoded
- decode
* Reads the instruction type and saves the values to be used in the execution stage
- execute
* Simulates the instruction that has been read and holds the values to be saved to memory
- memory
* stores the values to be put in the registers
- writeback
* stores the values from the memory stage to the respective registers