mem loads and stores error cuz two seperate mem modules

This commit is contained in:
felsabbagh3 2019-02-10 05:54:02 -05:00
parent 3c74a13009
commit d9138a1493
3 changed files with 75 additions and 482 deletions

View file

@ -4,7 +4,7 @@
#ifndef __DEBUG_H
#define __DEBUG_H
// #define USE_DEBUG 9
#define USE_DEBUG 9
#ifdef USE_DEBUG
#include <iostream>

View file

@ -1,202 +1,4 @@
start
./riscv_tests/rv32ui-p-add.hex
INTERRUPT ECALL
Total steps: 453
Total insts: 453
=== Warp 0 ===
Steps : 453
Insts : 453
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-addi.hex
INTERRUPT ECALL
Total steps: 230
Total insts: 230
=== Warp 0 ===
Steps : 230
Insts : 230
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-and.hex
INTERRUPT ECALL
Total steps: 473
Total insts: 473
=== Warp 0 ===
Steps : 473
Insts : 473
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-andi.hex
INTERRUPT ECALL
Total steps: 186
Total insts: 186
=== Warp 0 ===
Steps : 186
Insts : 186
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-auipc.hex
INTERRUPT ECALL
Total steps: 47
Total insts: 47
=== Warp 0 ===
Steps : 47
Insts : 47
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-beq.hex
INTERRUPT ECALL
Total steps: 279
Total insts: 279
=== Warp 0 ===
Steps : 279
Insts : 279
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-bge.hex
INTERRUPT ECALL
Total steps: 297
Total insts: 297
=== Warp 0 ===
Steps : 297
Insts : 297
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-bgeu.hex
INTERRUPT ECALL
Total steps: 322
Total insts: 322
=== Warp 0 ===
Steps : 322
Insts : 322
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-blt.hex
INTERRUPT ECALL
Total steps: 279
Total insts: 279
=== Warp 0 ===
Steps : 279
Insts : 279
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-bltu.hex
INTERRUPT ECALL
Total steps: 304
Total insts: 304
=== Warp 0 ===
Steps : 304
Insts : 304
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-bne.hex
INTERRUPT ECALL
Total steps: 279
Total insts: 279
=== Warp 0 ===
Steps : 279
Insts : 279
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-jal.hex
INTERRUPT ECALL
Total steps: 43
Total insts: 43
=== Warp 0 ===
Steps : 43
Insts : 43
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-jalr.hex
INTERRUPT ECALL
Total steps: 96
Total insts: 96
=== Warp 0 ===
Steps : 96
Insts : 96
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-lb.hex
INTERRUPT ECALL
Total steps: 43
Total insts: 43
=== Warp 0 ===
Steps : 43
Insts : 43
Loads : 0
Stores: 0
GRADE: FAILED 3
./riscv_tests/rv32ui-p-lbu.hex
INTERRUPT ECALL
Total steps: 43
Total insts: 43
=== Warp 0 ===
Steps : 43
Insts : 43
Loads : 0
Stores: 0
GRADE: FAILED 3
./riscv_tests/rv32ui-p-lh.hex
INTERRUPT ECALL
Total steps: 43
Total insts: 43
=== Warp 0 ===
Steps : 43
Insts : 43
Loads : 0
Stores: 0
GRADE: FAILED 3
./riscv_tests/rv32ui-p-lhu.hex
INTERRUPT ECALL
Total steps: 44
Total insts: 44
=== Warp 0 ===
Steps : 44
Insts : 44
Loads : 0
Stores: 0
GRADE: FAILED 3
./riscv_tests/rv32ui-p-lui.hex
INTERRUPT ECALL
Total steps: 53
Total insts: 53
=== Warp 0 ===
Steps : 53
Insts : 53
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-lw.hex
INTERRUPT ECALL
Total steps: 45
@ -208,212 +10,3 @@ Loads : 0
Stores: 0
GRADE: FAILED 3
./riscv_tests/rv32ui-p-or.hex
INTERRUPT ECALL
Total steps: 476
Total insts: 476
=== Warp 0 ===
Steps : 476
Insts : 476
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-ori.hex
INTERRUPT ECALL
Total steps: 193
Total insts: 193
=== Warp 0 ===
Steps : 193
Insts : 193
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-sb.hex
INTERRUPT ECALL
Total steps: 39
Total insts: 39
=== Warp 0 ===
Steps : 39
Insts : 39
Loads : 0
Stores: 1
GRADE: FAILED 2
./riscv_tests/rv32ui-p-sh.hex
INTERRUPT ECALL
Total steps: 39
Total insts: 39
=== Warp 0 ===
Steps : 39
Insts : 39
Loads : 0
Stores: 1
GRADE: FAILED 2
./riscv_tests/rv32ui-p-simple.hex
INTERRUPT ECALL
Total steps: 29
Total insts: 29
=== Warp 0 ===
Steps : 29
Insts : 29
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-sll.hex
INTERRUPT ECALL
Total steps: 481
Total insts: 481
=== Warp 0 ===
Steps : 481
Insts : 481
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-slli.hex
INTERRUPT ECALL
Total steps: 229
Total insts: 229
=== Warp 0 ===
Steps : 229
Insts : 229
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-slt.hex
INTERRUPT ECALL
Total steps: 447
Total insts: 447
=== Warp 0 ===
Steps : 447
Insts : 447
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-slti.hex
INTERRUPT ECALL
Total steps: 225
Total insts: 225
=== Warp 0 ===
Steps : 225
Insts : 225
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-sltiu.hex
INTERRUPT ECALL
Total steps: 225
Total insts: 225
=== Warp 0 ===
Steps : 225
Insts : 225
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-sltu.hex
INTERRUPT ECALL
Total steps: 447
Total insts: 447
=== Warp 0 ===
Steps : 447
Insts : 447
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-sra.hex
INTERRUPT ECALL
Total steps: 500
Total insts: 500
=== Warp 0 ===
Steps : 500
Insts : 500
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-srai.hex
INTERRUPT ECALL
Total steps: 244
Total insts: 244
=== Warp 0 ===
Steps : 244
Insts : 244
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-srl.hex
INTERRUPT ECALL
Total steps: 494
Total insts: 494
=== Warp 0 ===
Steps : 494
Insts : 494
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-srli.hex
INTERRUPT ECALL
Total steps: 41
Total insts: 41
=== Warp 0 ===
Steps : 41
Insts : 41
Loads : 0
Stores: 0
GRADE: FAILED 3
./riscv_tests/rv32ui-p-sub.hex
INTERRUPT ECALL
Total steps: 445
Total insts: 445
=== Warp 0 ===
Steps : 445
Insts : 445
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-sw.hex
INTERRUPT ECALL
Total steps: 41
Total insts: 41
=== Warp 0 ===
Steps : 41
Insts : 41
Loads : 0
Stores: 1
GRADE: FAILED 2
./riscv_tests/rv32ui-p-xor.hex
INTERRUPT ECALL
Total steps: 475
Total insts: 475
=== Warp 0 ===
Steps : 475
Insts : 475
Loads : 0
Stores: 0
GRADE: PASSED
./riscv_tests/rv32ui-p-xori.hex
INTERRUPT ECALL
Total steps: 195
Total insts: 195
=== Warp 0 ===
Steps : 195
Insts : 195
Loads : 0
Stores: 0
GRADE: PASSED

View file

@ -1,115 +1,115 @@
echo start > results.txt
echo ./riscv_tests/rv32ui-p-add.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-add.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-add.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-add.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-addi.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-addi.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-addi.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-addi.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-and.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-and.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-and.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-and.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-andi.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-andi.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-andi.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-andi.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-auipc.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-auipc.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-auipc.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-auipc.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-beq.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-beq.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-beq.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-beq.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-bge.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bge.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-bge.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bge.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-bgeu.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bgeu.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-bgeu.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bgeu.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-blt.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-blt.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-blt.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-blt.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-bltu.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bltu.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-bltu.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bltu.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-bne.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bne.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-bne.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-bne.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-jal.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-jal.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-jal.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-jal.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-jalr.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-jalr.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-jalr.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-jalr.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-lb.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lb.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-lb.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lb.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-lbu.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lbu.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-lbu.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lbu.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-lh.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lh.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-lh.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lh.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-lhu.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lhu.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-lhu.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lhu.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-lui.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lui.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-lui.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lui.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-lw.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-lw.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-or.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-or.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-or.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-or.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-ori.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-ori.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-ori.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-ori.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sb.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sb.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sb.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sb.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sh.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sh.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sh.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sh.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-simple.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-simple.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-simple.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-simple.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sll.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sll.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sll.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sll.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-slli.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-slli.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-slli.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-slli.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-slt.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-slt.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-slt.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-slt.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-slti.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-slti.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-slti.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-slti.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sltiu.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sltiu.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sltiu.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sltiu.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sltu.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sltu.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sltu.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sltu.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sra.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sra.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sra.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sra.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-srai.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-srai.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-srai.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-srai.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-srl.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-srl.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-srl.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-srl.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-srli.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-srli.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-srli.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-srli.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sub.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sub.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sub.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sub.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-sw.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sw.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-sw.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-sw.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-xor.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-xor.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-xor.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-xor.hex -s -b >> results.txt
echo ./riscv_tests/rv32ui-p-xori.hex >> results.txt
./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-xori.hex -s -b >> results.txt
# echo ./riscv_tests/rv32ui-p-xori.hex >> results.txt
# ./harptool -E -a rv32i --core ./riscv_tests/rv32ui-p-xori.hex -s -b >> results.txt