Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate riscv-compliance #5

Closed
wants to merge 5 commits into from

Conversation

sammer1107
Copy link
Contributor

  • This pull request integrate riscv-compliance (riscv-arch-test) 2.0 into rv32emu-next
  • The Makefile target support running all test cases or a specific test case. The command line options are explained in README.md
  • Some tests does not pass because it still doesn't have a correct value defined yet.

+ Added --compliance option to rv32emu in order to dump
test signature.
+ Since the Makefile.include for different extensions
is the same, the folders in "test-rv32emu/device/rv32i_m" are all
symbolic links to "I".
Also rename test-rv32emu/work to build/compliance
Makefile Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
+ Also rename `test-rv32emu` to `compliance-target`
+ Remove unnecessary `RISCV_PREFIX` line in Makefile.include
@jserv
Copy link
Contributor

jserv commented Mar 16, 2021

Can you avoid using symbolic links in source tree? In directory build, we can create symbolic links. However, if symbol links exists outside build directory, it is a bit difficult and confusing to remove the linked entries.

export TARGETDIR = $(shell pwd)
export XLEN = 32
export JOBS ?= -j
export WORK = $(TARGETDIR)/build/compliance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why pwd is necessary. Can you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the build process of compliance involves multiple makefiles in different places, I found out that the makefile from the compliance will fail to find our target file if I just set TARGETDIR to .. Therefore, I set it to the absolute path of our project root.

main.c Outdated Show resolved Hide resolved
+ Switch to using real directories and files.
+ Also simplified the help message for `--compliance` option
@jserv
Copy link
Contributor

jserv commented Jan 20, 2022

Close in favor of #12

@jserv jserv closed this Jan 20, 2022
vacantron pushed a commit to vacantron/rv32emu that referenced this pull request Dec 14, 2024
-fsanitize=address report when CTRL+a x exiting:
=================================================================
==297977==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 23400 byte(s) in 117 object(s) allocated from:
    #0 0x761b706fd340 in calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x633ad9c5e310 in block_translate src/emulate.c:649
    sysprog21#2 0x633ad9c5e310 in block_find_or_translate src/emulate.c:865
    sysprog21#3 0x633ad9c5e310 in rv_step src/emulate.c:1029
    sysprog21#4 0x633ad9c5e310 in rv_run src/riscv.c:498
    sysprog21#5 0x633ad9c5e310 in main src/main.c:279

Direct leak of 3136 byte(s) in 125 object(s) allocated from:
    #0 0x761b706fd9c7 in malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x633ad9c5fea4 in match_pattern src/emulate.c:767
    sysprog21#2 0x633ad9c5fea4 in block_find_or_translate src/emulate.c:872
    sysprog21#3 0x633ad9c5fea4 in rv_step src/emulate.c:1029
    sysprog21#4 0x633ad9c5fea4 in rv_run src/riscv.c:498
    sysprog21#5 0x633ad9c5fea4 in main src/main.c:279

Register a clean up callback, async_block_clear() to free all the
allocated memory fix this when emulator exits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants