Files
NJU_PA/nemu/Kconfig
tracer-ics2023 abd1085a05 > compile NEMU
221220000 张三
Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 23:03:46 up 5 days, 11:12,  3 users,  load average: 0.50, 0.80, 0.64
2024-09-10 23:03:48 +08:00

288 lines
5.6 KiB
Plaintext

mainmenu "NEMU Configuration Menu"
menu "NEMU Configuration Options"
config WATCHPOINT
bool "Enable Watchpoint"
default n
help
Say Y here if you want to enable watchpoint functionality.
This will add performance overhead but is useful for debugging.
config LOG_EXPR
bool "Enable make_token Log"
default n
help
Say Y here if you want to enable match rules Log
config TEST_EXPR
bool "Enable test expr program"
default n
endmenu
choice
prompt "Base ISA"
default ISA_riscv
config ISA_x86
bool "x86"
config ISA_mips32
bool "mips32"
config ISA_riscv
bool "riscv"
config ISA_loongarch32r
bool "loongarch32r"
endchoice
config ISA
string
default "x86" if ISA_x86
default "mips32" if ISA_mips32
default "riscv32" if ISA_riscv && !RV64
default "riscv64" if ISA_riscv && RV64
default "loongarch32r" if ISA_loongarch32r
default "none"
config ISA64
depends on ISA_riscv && RV64
bool
default y
if ISA_riscv
source "src/isa/riscv32/Kconfig"
endif
choice
prompt "NEMU execution engine"
default ENGINE_INTERPRETER
config ENGINE_INTERPRETER
bool "Interpreter"
help
Interpreter guest instructions one by one.
endchoice
config ENGINE
string
default "interpreter" if ENGINE_INTERPRETER
default "none"
choice
prompt "Running mode"
default MODE_SYSTEM
config MODE_SYSTEM
bool "System mode"
help
Support full-system functionality, including privileged instructions, MMU and devices.
endchoice
choice
prompt "Build target"
default TARGET_NATIVE_ELF
config TARGET_NATIVE_ELF
bool "Executable on Linux Native"
config TARGET_SHARE
bool "Shared object (used as REF for differential testing)"
config TARGET_AM
bool "Application on Abstract-Machine (DON'T CHOOSE)"
endchoice
menu "Build Options"
choice
prompt "Compiler"
default CC_GCC
config CC_GCC
bool "gcc"
config CC_GPP
bool "g++"
config CC_CLANG
depends on !TARGET_AM
bool "clang"
endchoice
config CC
string
default "gcc" if CC_GCC
default "g++" if CC_GPP
default "clang" if CC_CLANG
default "none"
choice
prompt "Optimization Level"
default CC_O2
config CC_O0
bool "O0"
config CC_O1
bool "O1"
config CC_O2
bool "O2"
config CC_O3
bool "O3"
endchoice
config CC_OPT
string
default "-O0" if CC_O0
default "-O1" if CC_O1
default "-O2" if CC_O2
default "-O3" if CC_O3
default "none"
config CC_LTO
depends on !TARGET_AM
bool "Enable link-time optimization"
default n
config CC_DEBUG
bool "Enable debug information"
default n
config CC_ASAN
depends on MODE_SYSTEM
bool "Enable address sanitizer"
default n
endmenu
menu "Testing and Debugging"
config TRACE
bool "Enable tracer"
default y
config TRACE_START
depends on TRACE
int "When tracing is enabled (unit: number of instructions)"
default 0
config TRACE_END
depends on TRACE
int "When tracing is disabled (unit: number of instructions)"
default 10000
config ITRACE
depends on TRACE && TARGET_NATIVE_ELF && ENGINE_INTERPRETER
bool "Enable instruction tracer"
default y
config ITRACE_COND
depends on ITRACE
string "Only trace instructions when the condition is true"
default "true"
config IRINGBUF
depends on TRACE && TARGET_NATIVE_ELF && ENGINE_INTERPRETER
bool "Enable iringbuf tracer"
default n
config IRINGBUF_LINENUM
depends on IRINGBUF
int "Instruction ring buffer size"
default 16
config IRINGBUF_ASSERT_DISPLAY
depends on IRINGBUF
bool "Enable to log when assert failure(Warning it may display twice in `IRINGBUF_DISPLAY`)"
default y
config IRINGBUF_DISPLAY
depends on IRINGBUF
bool "Enable to iringbuf log in 'statistic'(must end of log file) otherwise just in assert failure to log"
default n
config MTRACE
depends on TRACE && TARGET_NATIVE_ELF && ENGINE_INTERPRETER
bool "Enable memory tracer"
default n
config MTRACE_COND
depends on MTRACE
string "Only trace memory when the condition is true (you can use 'addr' variable)"
default "addr != 0"
config MTRACE_WRITE
depends on MTRACE
bool "Enable memory trace on write"
default y
config MTRACE_READ
depends on MTRACE
bool "Enable memory trace on read"
default y
config FTRACE
depends on TRACE && TARGET_NATIVE_ELF && ENGINE_INTERPRETER
bool "Enable function tracer"
default n
config FTRACE_DISPLAY
depends on FTRACE
bool "Enable to ftrace log in 'statistic'(must end of log file)"
default n
config DIFFTEST
depends on TARGET_NATIVE_ELF
bool "Enable differential testing"
default n
help
Enable differential testing with a reference design.
Note that this will significantly reduce the performance of NEMU.
choice
prompt "Reference design"
default DIFFTEST_REF_SPIKE if ISA_riscv
default DIFFTEST_REF_KVM if ISA_x86
default DIFFTEST_REF_QEMU
depends on DIFFTEST
config DIFFTEST_REF_QEMU
bool "QEMU, communicate with socket"
if ISA_riscv
config DIFFTEST_REF_SPIKE
bool "Spike"
endif
if ISA_x86
config DIFFTEST_REF_KVM
bool "KVM"
endif
endchoice
config DIFFTEST_REF_PATH
string
default "tools/qemu-diff" if DIFFTEST_REF_QEMU
default "tools/kvm-diff" if DIFFTEST_REF_KVM
default "tools/spike-diff" if DIFFTEST_REF_SPIKE
default "none"
config DIFFTEST_REF_NAME
string
default "qemu" if DIFFTEST_REF_QEMU
default "kvm" if DIFFTEST_REF_KVM
default "spike" if DIFFTEST_REF_SPIKE
default "none"
endmenu
if MODE_SYSTEM
source "src/memory/Kconfig"
source "src/device/Kconfig"
endif
menu "Miscellaneous"
choice
depends on !TARGET_AM
prompt "Host timer"
default TIMER_GETTIMEOFDAY
config TIMER_GETTIMEOFDAY
bool "gettimeofday"
config TIMER_CLOCK_GETTIME
bool "clock_gettime"
endchoice
config RT_CHECK
bool "Enable runtime checking"
default y
endmenu