-
Notifications
You must be signed in to change notification settings - Fork 105
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
Conversation
sammer1107
commented
Mar 15, 2021
- 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
+ Also rename `test-rv32emu` to `compliance-target` + Remove unnecessary `RISCV_PREFIX` line in Makefile.include
Can you avoid using symbolic links in source tree? In directory |
export TARGETDIR = $(shell pwd) | ||
export XLEN = 32 | ||
export JOBS ?= -j | ||
export WORK = $(TARGETDIR)/build/compliance |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
+ Switch to using real directories and files. + Also simplified the help message for `--compliance` option
Close in favor of #12 |
-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.