Skip to content

Commit

Permalink
Iniciando escrita dos testes basicos do RV32I
Browse files Browse the repository at this point in the history
  • Loading branch information
JN513 committed Dec 13, 2024
1 parent ff04268 commit 966d208
Show file tree
Hide file tree
Showing 83 changed files with 854 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/RV32I/advanced/memory/012-jal.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
00300693
00c000ef
00500713
02e02e23
00a00793
008000ef
02f02e23
00f00813
03002e23
10 changes: 10 additions & 0 deletions tests/RV32I/advanced/memory/013-jalr.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
00300693
00d686b3
00000897
01488893
000880e7
00700713
02e02e23
00a00793
00008067
02f02e23
25 changes: 25 additions & 0 deletions tests/RV32I/advanced/src/012-jal.s
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# jal implementation
.text

.global _start

_start:
addi a3, zero, 3;

jal subrotina;

addi a4, zero, 5;

sw a4, 60(zero);


subrotina:
addi a5, zero, 10;

jal subrotina2;

sw a5, 60(zero);

subrotina2:
addi a6, zero, 15;

sw a6, 60(zero);
21 changes: 21 additions & 0 deletions tests/RV32I/advanced/src/013-jalr.s
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# jalr implementation
.text

.global _start

_start:
addi a3, zero, 3;
add a3, a3, a3;

la a7, subrotina;

jalr ra, a7, 0;

addi a4, zero, 7;

sw a4, 60(zero);

subrotina:
addi a5, zero, 10;
jalr zero, ra, 0;

sw a5, 60(zero);
5 changes: 5 additions & 0 deletions tests/RV32I/basic/memory/000-addi.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
00500593
00000013
00000013
00000013
02b02e23
2 changes: 2 additions & 0 deletions tests/RV32I/basic/memory/001-sw.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
00a00593
02d02e23
5 changes: 5 additions & 0 deletions tests/RV32I/basic/memory/002-slti.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
00400593
0015a693
0055a713
02d02c23
02e02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/003-sltiu.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00800593
7ff5b613
02c02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/004-xori.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00500593
00300613
00c5c6b3
02d02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/005-ori.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00500593
0035e693
02d02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/006-andi.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00500593
0035f693
02d02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/007-slli.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00400593
00159693
02d02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/008-srli.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00400593
0015d693
02d02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/009-srai.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00800593
4015d613
02c02e23
2 changes: 2 additions & 0 deletions tests/RV32I/basic/memory/010-lui.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
6d0005b7
02b02e23
5 changes: 5 additions & 0 deletions tests/RV32I/basic/memory/011-auipc.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
6d000617
6d000697
00c68633
02d02c23
02c02e23
6 changes: 6 additions & 0 deletions tests/RV32I/basic/memory/012-jal.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
00300693
00c000ef
00500713
02e02e23
00a00793
02f02e23
8 changes: 8 additions & 0 deletions tests/RV32I/basic/memory/013-jalr.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
00300693
00d686b3
00c000ef
00700713
02e02e23
00a00793
00008067
02f02e23
14 changes: 14 additions & 0 deletions tests/RV32I/basic/memory/014-beq.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
00100593
00200613
02b58063
00a00693
02d02e23
01400793
02f02e23
00000013
00000013
00000013
00f00713
00c70733
fec582e3
02e02e23
14 changes: 14 additions & 0 deletions tests/RV32I/basic/memory/015-bne.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
00100593
00200613
02c59063
00a00693
02d02e23
01400793
02f02e23
00000013
00000013
00000013
00f00713
00c70733
feb592e3
02e02e23
14 changes: 14 additions & 0 deletions tests/RV32I/basic/memory/016-blt.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
00100593
00200613
02c5c063
00a00693
02d02e23
01400793
02f02e23
00000013
00000013
00000013
00f00713
00c70733
feb642e3
02e02e23
14 changes: 14 additions & 0 deletions tests/RV32I/basic/memory/017-bge.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
00100593
00200613
02b65063
00a00693
02d02e23
01400793
02f02e23
00000013
00000013
00000013
00f00713
00c70733
fec5d2e3
02e02e23
14 changes: 14 additions & 0 deletions tests/RV32I/basic/memory/018-bltu.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
00100593
00200613
02c5e063
00a00693
02d02e23
01400793
02f02e23
00000013
00000013
00000013
00f00713
00c70733
feb662e3
02e02e23
14 changes: 14 additions & 0 deletions tests/RV32I/basic/memory/019-bgeu.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
00100593
00200613
02b67063
00a00693
02d02e23
01400793
02f02e23
00000013
00000013
00000013
00f00713
00c70733
fec5f2e3
02e02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/020-lb.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
7ff00593
02b02423
02800603
02c02e23
6 changes: 6 additions & 0 deletions tests/RV32I/basic/memory/021-lh.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
7ff00593
00b585b3
00559593
02b02423
02801603
02c02e23
6 changes: 6 additions & 0 deletions tests/RV32I/basic/memory/022-lw.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
00a00593
7ff00613
00b606b3
00d02e23
01c02703
02e02e23
5 changes: 5 additions & 0 deletions tests/RV32I/basic/memory/025-sb.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
7ff00593
00b585b3
02b00823
03002603
02c02e23
5 changes: 5 additions & 0 deletions tests/RV32I/basic/memory/026-sh.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
7ff00593
00659593
02b01823
03002603
02c02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/027-add.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00500593
00b585b3
02b02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/028-sub.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00f00593
00500613
40c586b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/029-sll.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00400593
00100613
00c596b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/030-slt.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00400593
00100613
00c5a6b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/031-sltu.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00400593
00100613
00c5b6b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/032-xor.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00500593
00300613
00c5c6b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/033-srl.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00400593
00100613
00c5d6b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/034-sra.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00400593
00100613
40c5d6b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/035-or.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00500593
00300613
00c5e6b3
02d02e23
4 changes: 4 additions & 0 deletions tests/RV32I/basic/memory/036-and.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
00500593
00300613
00c5f6b3
02d02e23
3 changes: 3 additions & 0 deletions tests/RV32I/basic/memory/040-timeout.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
00000593
00158593
ffdff06f
7 changes: 7 additions & 0 deletions tests/RV32I/basic/memory/041-forwarding.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
00a00593
01400613
00c586b3
0016d693
00c58733
00d707b3
02f02e23
8 changes: 8 additions & 0 deletions tests/RV32I/basic/memory/042-forwarding-lw.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
00a00593
01400613
00c586b3
02d02423
00100713
02802783
00e787b3
02f02e23
Empty file.
Empty file.
Empty file.
13 changes: 13 additions & 0 deletions tests/RV32I/basic/src/000-addi.s
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# addi implementation
.text

.global _start;

_start:
addi a1, zero, 5; # a1 = zero + 5

nop;
nop;
nop; # 3 nops to not cause forwarding

sw a1, 60(zero);

8 changes: 8 additions & 0 deletions tests/RV32I/basic/src/001-sw.s
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# sw implementation
.text

.global _start

_start:
addi a1, zero, 10 # Carrega o primeiro número (10) em a1

sw a3, 60(zero)
13 changes: 13 additions & 0 deletions tests/RV32I/basic/src/002-slti.s
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# slti implementation
.text

.global _start;

_start:
addi a1, zero, 4; # a1 = zero + 5

slti a3, a1, 1; # a3 = a1 < 1
slti a4, a1, 5; # a4 = a1 < 5

sw a3, 56(zero);
sw a4, 60(zero);

10 changes: 10 additions & 0 deletions tests/RV32I/basic/src/003-sltiu.s
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# sltiu implementation
.text

.global _start;

_start:
addi a1, zero, 8; # a1 = zero + 5

sltiu a2, a1, 2047; # a2 = a1 < 2047

sw a2, 60(zero);
12 changes: 12 additions & 0 deletions tests/RV32I/basic/src/004-xori.s
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# xori implementation
.text

.global _start;

_start:
addi a1, zero, 5; # a1 = zero + 5
addi a2, zero, 3; # a2 = zero + 3

xor a3, a1, a2;

sw a3, 60(zero);

Loading

0 comments on commit 966d208

Please sign in to comment.