You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,10 +19,36 @@ PS: I recommend testing 2.s ( a really long programme that checks all the ALU fu
19
19
./test_sequential.sh 6.s
20
20
```
21
21
22
+
## Pipelined Implementation
23
+
24
+
The pipelined implementation features a 5-stage pipeline with hazard detection, data forwarding, and branch prediction. To run tests on the pipelined CPU:
25
+
26
+
27
+
```sh
28
+
cd pipelined
29
+
chmod +x test_pipelined.sh
30
+
./test_pipelined.sh <filename>.s
31
+
```
32
+
33
+
### Key Pipelined Features:
34
+
35
+
- 5-stage pipeline: IF, ID, EX, MEM, and WB stages
36
+
- Static branch prediction: Always-taken strategy for branches
37
+
- Data hazard handling: Forwarding paths for most hazards, stalling for load-use hazards
38
+
- Control hazard handling: Pipeline flush on branch misprediction
39
+
- Performance: Multiple test cases demonstrate improved throughput over sequential design
40
+
41
+
42
+
### Test Cases:
43
+
- 2.s: Tests loop with data dependencies, showcasing forwarding paths
44
+
- 4.s: Tests branch prediction with unconditional branches
45
+
- 7.s: Tests branch prediction and control hazard handling
46
+
- 8.s: Tests load-use hazard detection and stalling mechanism
47
+
22
48
## Assembly Instructions Supported
23
49
24
50
The assembler supports a subset of RISC-V instructions:
0 commit comments