Skip to content

Commit 47fdda0

Browse files
committed
Fixed the readme.
1 parent 37854f4 commit 47fdda0

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

README.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,30 @@ A implementation of a 32-bit single cycle MIPS processor in Verilog. This versio
44

55
To tun the test bench:
66

7+
```
78
$ iverilog *.v
89
$ ./a.out; gtkwave dump.vcd test.gtkw
10+
```
911

1012
Each of the memories is a 64-word × 32-bit array. The instruction memory contains some initial values representing a test program.
1113

12-
## Test MIPS instructions.
13-
14+
## Test MIPS instructions
15+
```
1416
main: addi $2, $0, 5 # 20020005
15-
addi $7, $0, 3 # 20070003
16-
addi $3, $0, 0xc # 2003000c
17-
or $4, $7, $2 # 00e22025
18-
and $5, $3, $4 # 00642824
19-
add $5, $5, $4 # 00a42820
20-
beq $5, $7, end # 10a70008
21-
slt $6, $3, $4 # 0064302a
22-
beq $6, $0, around # 10c00001
23-
addi $5, $0, 10 # 2005000a
17+
addi $7, $0, 3 # 20070003
18+
addi $3, $0, 0xc # 2003000c
19+
or $4, $7, $2 # 00e22025
20+
and $5, $3, $4 # 00642824
21+
add $5, $5, $4 # 00a42820
22+
beq $5, $7, end # 10a70008
23+
slt $6, $3, $4 # 0064302a
24+
beq $6, $0, around # 10c00001
25+
addi $5, $0, 10 # 2005000a
2426
around: slt $6, $7, $2 # 00e2302a
25-
add $7, $6, $5 # 00c53820
26-
sub $7, $7, $2 # 00e23822
27-
j end # 0800000f
28-
lw $7, 0($0) # 8c070000
27+
add $7, $6, $5 # 00c53820
28+
sub $7, $7, $2 # 00e23822
29+
j end # 0800000f
30+
lw $7, 0($0) # 8c070000
2931
end: sw $7, 71($2) # ac470047
32+
```
3033

0 commit comments

Comments
 (0)