Skip to content

Commit 77bd104

Browse files
committed
Readme & Typo fix
1 parent 3c2d7b0 commit 77bd104

File tree

12 files changed

+46
-30
lines changed

12 files changed

+46
-30
lines changed

README.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
1-
<p align="center" style="
2-
font-size: xx-large;
3-
font-weight: bold;
4-
padding-top: 2rem;
5-
">A graphical MIPS Assembler and pipeline simulator</p>
1+
# A Graphical MIPS Assembler and Pipeline Simulator
62

7-
###### This repository is our Computer Organization and Design course project that we had to create a MIPS pipeline simulator.
8-
9-
## About MIPS
10-
11-
MIPS (Microprocessor without Interlocked Pipelined Stages) is a reduced instruction set computer (RISC) instruction set architecture (ISA) developed by MIPS Computer Systems (an American company that is now called MIPS Technologies).
3+
###### This repository is our Computer Organization and Design course project that we had to create a MIPS pipeline simulator.
124

135
## About this project
146

15-
Assembles and simulates 9 basic instructions (add, sub, and, or, nor, slt, beq, lw, sw) of the MIPS instruction set
7+
<table>
8+
<tr>
9+
<td align="center">
10+
<img src="images/main.jpg" alt="Main Window" style="width: 300px;"/>
11+
<p>Main Window</p>
12+
</td>
13+
<td align="center">
14+
<img src="images/pipeline.jpg" alt="Pipeline Simulator" style="width: 300px;"/>
15+
<p>Pipeline Simulator</p>
16+
</td>
17+
<td align="center">
18+
<img src="images/text.jpg" alt="Pipeline Information" style="width: 300px;"/>
19+
<p>Pipeline Information</p>
20+
</td>
21+
</tr>
22+
</table>
23+
24+
Assembles and simulates 9 basic instructions (add, sub, and, or, nor, slt, beq, lw, sw) of the MIPS instruction set
1625
Our guideline reference for implementing the instruction set was _Computer Organization and Design, Fifth Edition by Patterson and Hennessy_.
1726

1827
Implemented exceptions for the project are:
28+
1929
1. IllegalRegisterNumberException
2030
2. SymbolNotFoundException (for labels)
2131
3. UndefinedInstructionException (for unsupported instructions or wrong instructions)
22-
4. UnformattedInstructionException
32+
4. UnformattedInstructionException
2333

34+
## How to use the program
2435

25-
## How to use
36+
- [Download the artifact](https://github.com/amir-ni/Java-asm-compiler/releases/download/v1.0.0/Java-asm-compiler.jar) and open the program
37+
- Clone the code, import it to the IDE of your choice, and run the **JavaAsmCompiler.java** file to open the program.
2638

27-
Start **JavaAsmCompiler.java** write code, click on the run button if console displayed successful compile click on pipeline button to display the simulation.
39+
Write your MIPS code, click on the run button; if console displayed successful compile click on pipeline button to display the simulation.
2840

2941
## Custom features
3042

@@ -40,6 +52,10 @@ We had to develop this editor & emulator with many custom features that I listed
4052
- - Forwarding Unit: _Handles forwarding in execution stage_
4153
- - Hazard detection unit in Instruction Detection (ID) stage: _Handles lw data hazard with nop and beq control hazard using 3 bubble technique_
4254

55+
## About MIPS
56+
57+
MIPS (Microprocessor without Interlocked Pipelined Stages) is a reduced instruction set computer (RISC) instruction set architecture (ISA) developed by MIPS Computer Systems (an American company that is now called MIPS Technologies).
58+
4359
## License
4460

4561
This project is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

images/main.jpg

145 KB
Loading

images/pipeline.jpg

109 KB
Loading

images/text.jpg

140 KB
Loading

src/Core/Assembler/Assembler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import Core.Exceptions.IllegalRegisterNumberException;
44
import Core.Exceptions.SymbolNotFoundException;
5-
import Core.Exceptions.UndefindInstructionException;
5+
import Core.Exceptions.UndefinedInstructionException;
66
import Core.Exceptions.UnformattedInstructionException;
77
import Core.Instructions.*;
88
import Core.Pipeline.Pipeline;
@@ -26,7 +26,7 @@ public class Assembler {
2626
/*private Map<String, Prediction> predictionMap;*/
2727

2828

29-
public Assembler(List<String> instructions, JTable registerTable) throws UndefindInstructionException,
29+
public Assembler(List<String> instructions, JTable registerTable) throws UndefinedInstructionException,
3030
UnformattedInstructionException, IllegalRegisterNumberException,
3131
SymbolNotFoundException {
3232
this.instructions = new ArrayList<>();
@@ -93,7 +93,7 @@ public Assembler(List<String> instructions, JTable registerTable) throws Undefin
9393
// branchInsCounterChecker = true;
9494
// }
9595
} else {
96-
throw new UndefindInstructionException(i); // start lines from 1
96+
throw new UndefinedInstructionException(i); // start lines from 1
9797
}
9898
}
9999
if (ins != null) {

src/Core/Core.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Core.Assembler.Assembler;
44
import Core.Exceptions.IllegalRegisterNumberException;
55
import Core.Exceptions.SymbolNotFoundException;
6-
import Core.Exceptions.UndefindInstructionException;
6+
import Core.Exceptions.UndefinedInstructionException;
77
import Core.Exceptions.UnformattedInstructionException;
88
import Core.Images.Images;
99
import Core.Instructions.nop;
@@ -126,7 +126,7 @@ public class Core {
126126
JLabel wb_instruction_lbl;
127127

128128

129-
public Core(List<String> normalInstructions, JTable registerTable) throws UnformattedInstructionException, SymbolNotFoundException, UndefindInstructionException, IllegalRegisterNumberException {
129+
public Core(List<String> normalInstructions, JTable registerTable) throws UnformattedInstructionException, SymbolNotFoundException, UndefinedInstructionException, IllegalRegisterNumberException {
130130
assembler = new Assembler(normalInstructions, registerTable);
131131
assembler.runPipeline();
132132

src/Core/ExampleFrame.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//// e.printStackTrace();
1111
//// } catch (UnformattedInstructionException e) {
1212
//// e.printStackTrace();
13-
//// } catch (UndefindInstructionException e) {
13+
//// } catch (UndefinedInstructionException e) {
1414
//// e.printStackTrace();
1515
//// }
1616
//// try {
@@ -29,7 +29,7 @@
2929
////class frame extends JFrame {
3030
////
3131
////
32-
//// public frame() throws IllegalRegisterNumberException, SymbolNotFoundException, UnformattedInstructionException, UndefindInstructionException {
32+
//// public frame() throws IllegalRegisterNumberException, SymbolNotFoundException, UnformattedInstructionException, UndefinedInstructionException {
3333
//// Core core = new Core("Start:\n" +
3434
//// "add $t0, $t0,$t2\n" +
3535
//// "beq $t0, $t2, Start\n" +

src/Core/Exceptions/UndefindInstructionException.java renamed to src/Core/Exceptions/UndefinedInstructionException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package Core.Exceptions;
22

3-
public class UndefindInstructionException extends Exception {
3+
public class UndefinedInstructionException extends Exception {
44
private int line;
55

6-
public UndefindInstructionException(int line) {
6+
public UndefinedInstructionException(int line) {
77
this.line = line;
88
}
99

src/Core/Functions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//import Core.Assembler.Assembler;
44
//import Core.Exceptions.IllegalRegisterNumberException;
55
//import Core.Exceptions.SymbolNotFoundException;
6-
//import Core.Exceptions.UndefindInstructionException;
6+
//import Core.Exceptions.UndefinedInstructionException;
77
//import Core.Exceptions.UnformattedInstructionException;
88
//import Core.Pipeline.Pipeline;
99
//import Core.Pipeline.Stages.IF_Stage;
@@ -69,7 +69,7 @@
6969
// }
7070
//
7171
//
72-
// } catch (UndefindInstructionException e) {
72+
// } catch (UndefinedInstructionException e) {
7373
// System.err.println("Execution terminated with an error:");
7474
// System.err.println("UndefinedInstructionException at line " + e.getLine() + ": " +
7575
// normalInstructions.get(e.getLine() - 1));

src/Core/View/PipelinePanels.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import Core.Core;
44
import Core.Exceptions.IllegalRegisterNumberException;
55
import Core.Exceptions.SymbolNotFoundException;
6-
import Core.Exceptions.UndefindInstructionException;
6+
import Core.Exceptions.UndefinedInstructionException;
77
import Core.Exceptions.UnformattedInstructionException;
88
import Core.Images.Images;
99

@@ -34,7 +34,7 @@ public void setClock(int clock){
3434
private JButton showBtn = new JButton();
3535
private JTextField clockTextField = new JTextField("0");
3636
private JLabel clockLbl = new JLabel("Clock:");
37-
public PipelinePanels(List<String> normalInstructions, JTable registerTable) throws IllegalRegisterNumberException, SymbolNotFoundException, UnformattedInstructionException, UndefindInstructionException {
37+
public PipelinePanels(List<String> normalInstructions, JTable registerTable) throws IllegalRegisterNumberException, SymbolNotFoundException, UnformattedInstructionException, UndefinedInstructionException {
3838
setSize(1000, 720);
3939
setLayout(null);
4040
setResizable(false);

0 commit comments

Comments
 (0)