加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Kconfig 5.38 KB
一键复制 编辑 原始数据 按行查看 历史
mainmenu "NEMU Configuration Menu"
choice
prompt "Base ISA"
default ISA_riscv32
config ISA_x86
bool "x86"
config ISA_mips32
bool "mips32"
config ISA_riscv32
bool "riscv32"
config ISA_riscv64
bool "riscv64"
endchoice
config ISA
string
default "x86" if ISA_x86
default "mips32" if ISA_mips32
default "riscv32" if ISA_riscv32
default "riscv64" if ISA_riscv64
default "none"
config ILEN_MIN
int
default 1 if ISA_x86
default 4 if ISA_mips32
default 4 if ISA_riscv32
default 2 if ISA_riscv64
default 1
config ISA64
depends on ISA_riscv64
bool
default y
if ISA_x86
source "src/isa/x86/Kconfig"
endif
if ISA_riscv64
source "src/isa/riscv64/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.
config MODE_USER
bool "User mode"
help
Only support non-privileged instructions. System calls are forwarded to NEMU or Linux host.
endchoice
menu "Build Options"
choice
prompt "Compiler"
default CC_GCC
config CC_GCC
bool "gcc"
config CC_GPP
bool "g++"
config CC_CLANG
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
bool "Enable link-time optimization"
default y
config CC_DEBUG
bool "Enable debug information"
default n
config CC_ASAN
depends on !MODE_USER
bool "Enable address sanitizer"
default n
endmenu
menu "Testing and Debugging"
config DEBUG
depends on !SHARE
bool "Enable debug features"
default n
help
Enable debug features, which include instruction tracing and watchpoint.
config DIFFTEST
depends on !SHARE
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_QEMU_DL
depends on DIFFTEST
config DIFFTEST_REF_QEMU_DL
bool "QEMU, communicate with dynamic linking"
config DIFFTEST_REF_QEMU_SOCKET
bool "QEMU, communicate with socket"
config DIFFTEST_REF_KVM
bool "KVM"
config DIFFTEST_REF_NEMU
bool "NEMU"
endchoice
config DIFFTEST_REF_QEMU
depends on DIFFTEST_REF_QEMU_DL || DIFFTEST_REF_QEMU_SOCKET
bool
default y
config DIFFTEST_REF_PATH
string
default "tools/qemu-dl-diff" if DIFFTEST_REF_QEMU_DL
default "tools/qemu-socket-diff" if DIFFTEST_REF_QEMU_SOCKET
default "tools/kvm-diff" if DIFFTEST_REF_KVM
default "." if DIFFTEST_REF_NEMU
default "none"
config DIFFTEST_REF_NAME
string
default "qemu" if DIFFTEST_REF_QEMU_DL
default "qemu" if DIFFTEST_REF_QEMU_SOCKET
default "kvm" if DIFFTEST_REF_KVM
default "nemu-interpreter" if DIFFTEST_REF_NEMU
default "none"
config DETERMINISTIC
bool "Make the behavior of NEMU deterministic"
default n
config IQUEUE
bool "Record the last instrucitons executed"
default n
endmenu
if !MODE_USER
source "src/memory/Kconfig"
source "src/device/Kconfig"
endif
choice
prompt "FPU Emulation"
default FPU_HOST
config FPU_HOST
bool "Use host floating point operation"
config FPU_SOFT
bool "Use softfloat library"
config FPU_NONE
bool "Disable FPU Emulation"
endchoice
choice
prompt "Detecting misaligned memory accessing"
default AC_HOST
config AC_HOST
bool "By host CPU (x86 host only)"
config AC_SOFT
bool "By software emulation"
config AC_NONE
bool "Disable"
endchoice
menu "Processor difftest reference config"
config SHARE
bool "Build shared library as processor difftest reference"
default n
config DIFFTEST_STORE_COMMIT
depends on SHARE
bool "Maintain a committed store queue for processor ref"
default y
config GUIDED_EXEC
depends on SHARE
bool "Enable DUT guided execution"
default y
config LARGE_COPY
depends on SHARE && !MEM_RANDOM
bool "Enable difftest large memory copy optimization"
default n
config PANIC_ON_UNIMP_CSR
depends on SHARE
bool "Panic if an unimplemented CSR is being accessed"
default n
endmenu
menu "Miscellaneous"
choice
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
config PERF_OPT
depends on !SHARE
bool "Performance optimization"
default y
if PERF_OPT
config TCACHE_SIZE
int "Number of entries in trace cache"
default 8192
config BB_LIST_SIZE
int "Number of entries in basic block metadata list"
default 1024
config BB_POOL_SIZE
int "Number of entries in basic block metadata pool"
default 1024
if !DEBUG && !SHARE
config DISABLE_INSTR_CNT
bool "Disable instruction counting (single step is also disabled)"
default y
endif
endif
config ENABLE_INSTR_CNT
bool
default n if DISABLE_INSTR_CNT
default y
endmenu
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化