-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* cv32e20/bsp/crt0.s: add tohost symbol declaration * cv32e20/bsp/link.ld: add tohost symbol linking address * cv32e20/bsp/syscalls.c: add tohost store in the exit function * cv32e20/env/corev-dv/cv32e20_instr_gen_config.sv: add rule to enforce not ZERO reg used in the scratch reg. This constraint was already implemented but not working with vsim * cv32e20/env/uvme/uvme_cv32e20_env.sv: add mechanism to load symbols from the binary for the execution exit. * cv32e20/env/uvme/vseq/uvme_cv32e20_vp_status_flags_seq.sv: Adapt code to host format ( {exit_value, 1} ) * cv32e40p/env/uvme/uvme_rv32isa_covg_trn.sv: substitute uvm_objects_utils(begin/end) for a simple uvm_object_utils * lib/corev-dv/corev_asm_program_gen.sv: delete wfi for locking the core and add tohost mechanism * lib/uvm_agents/uvma_obi_memory/src/comps/uvma_obi_memory_mon.sv: vsim complaining for using passive_mp * lib/uvm_libs/uvml_sb/uvml_sb_cntxt.sv: delete T_TRN type for event as it causes vsim to fail simulation * mk/Common.mk: add compilation for elfloader vendor * mk/uvmt/vsim.mk: add comilation for elfloader vendor and delete clean_riscv-dv on each corev-dv generation * vendor/elfloader/Makefile: add elfloader vendor * vendor/elfloader/elfloader.cc: add elfloader vendor * lib/corev-dv/corev_asm_program_gen.sv: delete wfi and add syscall on ecall * cv32e20/tests/programs/custom/riscv_arithmetic_basic_test_*: change align of trap handler to 8
- Loading branch information
1 parent
69fca51
commit 7c9cf7d
Showing
40 changed files
with
652 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#pragma once | ||
|
||
#include <sys/stat.h> | ||
#include <sys/timeb.h> | ||
#include <sys/times.h> | ||
#include <sys/utime.h> | ||
#include <newlib.h> | ||
#include <unistd.h> | ||
#include <errno.h> | ||
#include <machine/syscall.h> | ||
#include <assert.h> | ||
#undef errno | ||
extern int errno; | ||
extern volatile uint64_t tohost; | ||
extern volatile uint64_t fromhost; | ||
|
||
/* write to this reg for outputting strings */ | ||
#define STDOUT_REG 0x10000000 | ||
/* write test result of program to this reg */ | ||
#define RESULT_REG 0x20000000 | ||
/* write exit value of program to this reg */ | ||
#define EXIT_REG 0x20000004 | ||
|
||
#define STDOUT_FILENO 1 | ||
|
||
/* It turns out that older newlib versions use different symbol names which goes | ||
* against newlib recommendations. Anyway this is fixed in later version. | ||
*/ | ||
#if __NEWLIB__ <= 2 && __NEWLIB_MINOR__ <= 5 | ||
#define _sbrk sbrk | ||
#define _write write | ||
#define _close close | ||
#define _lseek lseek | ||
#define _read read | ||
#define _fstat fstat | ||
#define _isatty isatty | ||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "utils.h" | ||
|
||
void test_exit(int value) { | ||
asm inline(" \ | ||
mv a7, %0; \ | ||
mv t0, %0; \ | ||
mv a0, %1; \ | ||
ecall;" | ||
: | ||
: "r" (SYS_exit), "r" (value) ); | ||
} | ||
|
||
void test_fail() { test_exit(1); } | ||
|
||
void test_pass() { test_exit(0); } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
#include <sys/stat.h> | ||
#include <sys/timeb.h> | ||
#include <sys/times.h> | ||
#include <sys/utime.h> | ||
#include <newlib.h> | ||
#include <unistd.h> | ||
#include <errno.h> | ||
#include <machine/syscall.h> | ||
#include <assert.h> | ||
#undef errno | ||
|
||
void test_exit(int value); | ||
|
||
void test_fail(); | ||
void test_pass(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.