Skip to content
mariusmonton edited this page Dec 17, 2018 · 8 revisions

Tests performed

Here I summarize the test performed to the simulator.

Toolchain

I'm using riscv-gnu-toolchain compiled with the following config options:

./configure --prefix=/opt/riscv --with-arch=rv32i --with-abi=ilp32

Basic ASM code test

Basic ASM code to test some of the basic instructions. Very basic code with few instructions.

To compile the code, the following instructions do the job:

$ riscv32-unknown-linux-gnu-as  EternalLoop.asm -o EternalLoop.o
$ riscv32-unknown-linux-gnu-ld -T ../my_linker_script.ld EternalLoop.o -o EternalLoop.elf
$ objcopy -O ihex EternalLoop.elf EternalLoop.hex

Basic C code test

Few tiny projects to test more complex code running in the simulator.

Each project is compiled without std libraries and with some tricks:

CFLAGS = -Wall -I. -O0 -nostdlib -march=rv32i -mabi=ilp32 --entry main

riscv-tests

Almost all riscv-tests tests passed (see below)

Here the list of tests RISCV-TLM are currently passing:

rv32mi-p-breakpoint, rv32mi-p-ma_addr, rv32mi-p-ma_fetch, rv32si-p-scall, rv32ui-p-add, rv32ui-p-addi, rv32ui-p-and, rv32ui-p-andi, rv32ui-p-auipc, rv32ui-p-beq, rv32ui-p-bge, rv32ui-p-bgeu, rv32ui-p-blt, rv32ui-p-bltu, rv32ui-p-bne, rv32ui-p-fence_i, rv32ui-p-jal, rv32ui-p-jalr, rv32ui-p-lb, rv32ui-p-lbu, rv32ui-p-lh, rv32ui-p-lhu, rv32ui-p-lui, rv32ui-p-lw, rv32ui-p-or, rv32ui-p-ori, rv32ui-p-sb, rv32ui-p-sh, rv32ui-p-simple, rv32ui-p-sll, rv32ui-p-slli, rv32ui-p-slt, rv32ui-p-slti, rv32ui-p-sltiu, rv32ui-p-sltu, rv32ui-p-sra, rv32ui-p-srai, rv32ui-p-srl, rv32ui-p-srli, rv32ui-p-sub, rv32ui-p-sw, rv32ui-p-xor, rv32ui-p-xori, rv32um-p-div, rv32um-p-divu, rv32um-p-mul, rv32um-p-mulh, rv32um-p-mulhsu, rv32um-p-mulhu, rv32um-p-rem, rv32um-p-remu, rv32uc-p-rvc, rv32si-p-wfi, rv32mi-p-csr, rv32mi-p-mcsr, rv32mi-p-shamt, rv32mi-p-sbreak, rv32mi-p-illegal, rv32ua-p-lrsc rv32ua-p-amoadd_w, rv32ua-p-amoand_w, rv32ua-p-amomaxu_w,rv32ua-p-amomax_w, rv32ua-p-amomax_w, rv32ua-p-amomin_w, rv32ua-p-amoor_w, rv32ua-p-amoswap_w, rv32ua-p-amoxor_w

Tests failing (why?): rv32si-p-dirty, rv32si-p-sbreak

Clone this wiki locally