gem5启动Linux跑Linux bench过程

gem5启动Linux跑Linux bench过程

1.安装git scons g++ python-dev swig

sudo apt-get install git scons g++ python-dev swig m4

2、下载gem5源码;

源码链接:http://pan.baidu.com/s/1kU9uZun

3、编译gem5;

在Linux终端输入(当前目录gem5):scons build/ARM/gem5.opt

编译无错,完成会在gem5目录下生成build文件夹,在build/ARM/下生成gem.opt文件,将configs文件夹和gem5.opt文件链接到任意文件夹下,可以在gem5下新建一个文件夹,比如:stdout。链接命令为:

帮我整理下面的help,配置参数的意义,可以设置的值,请详细介绍列出来:ubuntu@studyubuntu:~/gem5$ build/X86/gem5.opt configs/deprecated/example/se.py --help gem5 Simulator System. https://www.gem5.org gem5 is copyrighted software; use the --copyright option for details. gem5 version 25.0.0.1 gem5 compiled Oct 15 2025 14:07:26 gem5 started Oct 22 2025 14:01:40 gem5 executing on studyubuntu, pid 3588 command line: build/X86/gem5.opt configs/deprecated/example/se.py --help warn: The se.py script is deprecated. It will be removed in future releases of gem5. usage: se.py [-h] [-n NUM_CPUS] [--sys-voltage SYS_VOLTAGE] [--sys-clock SYS_CLOCK] [--list-mem-types] [--mem-type {CfiMemory,DDR3_1600_8x8,DDR3_2133_8x8,DDR4_2400_16x4,DDR4_2400_4x16,DDR4_2400_8x8,DDR5_4400_4x8,DDR5_6400_4x8,DDR5_8400_4x8,DRAMInterface,GDDR5_4000_2x32,HBM_1000_4H_1x128,HBM_1000_4H_1x64,HBM_2000_4H_1x64,HMC_2500_1x32,LPDDR2_S4_1066_1x32,LPDDR3_1600_1x32,LPDDR5_5500_1x16_8B_BL32,LPDDR5_5500_1x16_BG_BL16,LPDDR5_5500_1x16_BG_BL32,LPDDR5_6400_1x16_8B_BL32,LPDDR5_6400_1x16_BG_BL16,LPDDR5_6400_1x16_BG_BL32,NVMInterface,NVM_2400_1x64,QoSMemSinkInterface,SimpleMemory,WideIO_200_1x128}] [--mem-channels MEM_CHANNELS] [--mem-ranks MEM_RANKS] [--mem-size MEM_SIZE] [--enable-dram-powerdown] [--mem-channels-intlv MEM_CHANNELS_INTLV] [--memchecker] [--external-memory-system EXTERNAL_MEMORY_SYSTEM] [--tlm-memory TLM_MEMORY] [--caches] [--l2cache] [--num-dirs NUM_DIRS] [--num-l2caches NUM_L2CACHES] [--num-l3caches NUM_L3CACHES] [--l1d_size L1D_SIZE] [--l1i_size L1I_SIZE] [--l2_size L2_SIZE] [--l3_size L3_SIZE] [--l1d_assoc L1D_ASSOC] [--l1i_assoc L1I_ASSOC] [--l2_assoc L2_ASSOC] [--l3_assoc L3_ASSOC] [--cacheline_size CACHELINE_SIZE] [--ruby] [-m TICKS] [--rel-max-tick TICKS] [--maxtime MAXTIME] [-P PARAM] [--list-cpu-types] [--cpu-type {AtomicSimpleCPU,BaseAtomicSimpleCPU,BaseMinorCPU,BaseNonCachingSimpleCPU,BaseO3CPU,BaseTimingSimpleCPU,DerivO3CPU,NonCachingSimpleCPU,O3CPU,TimingSimpleCPU,X86AtomicSimpleCPU,X86KvmCPU,X86MinorCPU,X86NonCachingSimpleCPU,X86O3CPU,X86TimingSimpleCPU}] [--list-bp-types] [--list-indirect-bp-types] [--bp-type {BiModeBP,LTAGE,LocalBP,MultiperspectivePerceptron64KB,MultiperspectivePerceptron8KB,MultiperspectivePerceptronTAGE64KB,MultiperspectivePerceptronTAGE8KB,TAGE,TAGE_SC_L_64KB,TAGE_SC_L_8KB,TournamentBP}] [--indirect-bp-type {SimpleIndirectPredictor}] [--list-rp-types] [--list-hwp-types] [--l1i-hwp-type {AMPMPrefetcher,BOPPrefetcher,DCPTPrefetcher,IndirectMemoryPrefetcher,IrregularStreamBufferPrefetcher,MultiPrefetcher,PIFPrefetcher,SBOOEPrefetcher,STeMSPrefetcher,SignaturePathPrefetcher,SignaturePathPrefetcherV2,SlimAMPMPrefetcher,SmsPrefetcher,StridePrefetcher,TaggedPrefetcher}] [--l1d-hwp-type {AMPMPrefetcher,BOPPrefetcher,DCPTPrefetcher,IndirectMemoryPrefetcher,IrregularStreamBufferPrefetcher,MultiPrefetcher,PIFPrefetcher,SBOOEPrefetcher,STeMSPrefetcher,SignaturePathPrefetcher,SignaturePathPrefetcherV2,SlimAMPMPrefetcher,SmsPrefetcher,StridePrefetcher,TaggedPrefetcher}] [--l2-hwp-type {AMPMPrefetcher,BOPPrefetcher,DCPTPrefetcher,IndirectMemoryPrefetcher,IrregularStreamBufferPrefetcher,MultiPrefetcher,PIFPrefetcher,SBOOEPrefetcher,STeMSPrefetcher,SignaturePathPrefetcher,SignaturePathPrefetcherV2,SlimAMPMPrefetcher,SmsPrefetcher,StridePrefetcher,TaggedPrefetcher}] [--checker] [--cpu-clock CPU_CLOCK] [--smt] [--elastic-trace-en] [--inst-trace-file INST_TRACE_FILE] [--data-trace-file DATA_TRACE_FILE] [--dist] [--dist-sync-on-pseudo-op] [--is-switch] [--dist-rank DIST_RANK] [--dist-size DIST_SIZE] [--dist-server-name DIST_SERVER_NAME] [--dist-server-port DIST_SERVER_PORT] [--dist-sync-repeat DIST_SYNC_REPEAT] [--dist-sync-start DIST_SYNC_START] [--ethernet-linkspeed ETHERNET_LINKSPEED] [--ethernet-linkdelay ETHERNET_LINKDELAY] [-I MAXINSTS] [--work-item-id WORK_ITEM_ID] [--num-work-ids NUM_WORK_IDS] [--work-begin-cpu-id-exit WORK_BEGIN_CPU_ID_EXIT] [--work-end-exit-count WORK_END_EXIT_COUNT] [--work-begin-exit-count WORK_BEGIN_EXIT_COUNT] [--init-param INIT_PARAM] [--initialize-only] [--simpoint-profile] [--simpoint-interval SIMPOINT_INTERVAL] [--take-simpoint-checkpoints TAKE_SIMPOINT_CHECKPOINTS] [--restore-simpoint-checkpoint] [--take-checkpoints TAKE_CHECKPOINTS] [--max-checkpoints MAX_CHECKPOINTS] [--checkpoint-dir CHECKPOINT_DIR] [-r CHECKPOINT_RESTORE] [--checkpoint-at-end] [--work-begin-checkpoint-count WORK_BEGIN_CHECKPOINT_COUNT] [--work-end-checkpoint-count WORK_END_CHECKPOINT_COUNT] [--work-cpus-checkpoint-count WORK_CPUS_CHECKPOINT_COUNT] [--restore-with-cpu {AtomicSimpleCPU,BaseAtomicSimpleCPU,BaseMinorCPU,BaseNonCachingSimpleCPU,BaseO3CPU,BaseTimingSimpleCPU,DerivO3CPU,NonCachingSimpleCPU,O3CPU,TimingSimpleCPU,X86AtomicSimpleCPU,X86KvmCPU,X86MinorCPU,X86NonCachingSimpleCPU,X86O3CPU,X86TimingSimpleCPU}] [--repeat-switch REPEAT_SWITCH] [-s STANDARD_SWITCH] [-p PROG_INTERVAL] [-W WARMUP_INSTS] [--bench BENCH] [-F FAST_FORWARD] [-S] [--at-instruction] [--spec-input {ref,test,train,smred,mdred,lgred}] [--arm-iset {arm,thumb,aarch64}] [--stats-root STATS_ROOT] [--override-vendor-string OVERRIDE_VENDOR_STRING] [-c CMD] [-o OPTIONS] [-e ENV] [-i INPUT] [--output OUTPUT] [--errout ERROUT] [--chroot CHROOT] [--interp-dir INTERP_DIR] [--redirects REDIRECTS] [--wait-gdb] options: -h, --help show this help message and exit -n NUM_CPUS, --num-cpus NUM_CPUS --sys-voltage SYS_VOLTAGE Top-level voltage for blocks running at system power supply --sys-clock SYS_CLOCK Top-level clock for blocks running at system speed --list-mem-types List available memory types --mem-type {CfiMemory,DDR3_1600_8x8,DDR3_2133_8x8,DDR4_2400_16x4,DDR4_2400_4x16,DDR4_2400_8x8,DDR5_4400_4x8,DDR5_6400_4x8,DDR5_8400_4x8,DRAMInterface,GDDR5_4000_2x32,HBM_1000_4H_1x128,HBM_1000_4H_1x64,HBM_2000_4H_1x64,HMC_2500_1x32,LPDDR2_S4_1066_1x32,LPDDR3_1600_1x32,LPDDR5_5500_1x16_8B_BL32,LPDDR5_5500_1x16_BG_BL16,LPDDR5_5500_1x16_BG_BL32,LPDDR5_6400_1x16_8B_BL32,LPDDR5_6400_1x16_BG_BL16,LPDDR5_6400_1x16_BG_BL32,NVMInterface,NVM_2400_1x64,QoSMemSinkInterface,SimpleMemory,WideIO_200_1x128} type of memory to use --mem-channels MEM_CHANNELS number of memory channels --mem-ranks MEM_RANKS number of memory ranks per channel --mem-size MEM_SIZE Specify the physical memory size (single memory) --enable-dram-powerdown Enable low-power states in DRAMInterface --mem-channels-intlv MEM_CHANNELS_INTLV Memory channels interleave --memchecker --external-memory-system EXTERNAL_MEMORY_SYSTEM use external ports of this port_type for caches --tlm-memory TLM_MEMORY use external port for SystemC TLM cosimulation --caches --l2cache --num-dirs NUM_DIRS --num-l2caches NUM_L2CACHES --num-l3caches NUM_L3CACHES --l1d_size L1D_SIZE --l1i_size L1I_SIZE --l2_size L2_SIZE --l3_size L3_SIZE --l1d_assoc L1D_ASSOC --l1i_assoc L1I_ASSOC --l2_assoc L2_ASSOC --l3_assoc L3_ASSOC --cacheline_size CACHELINE_SIZE --ruby -m TICKS, --abs-max-tick TICKS Run to absolute simulated tick specified including ticks from a restored checkpoint --rel-max-tick TICKS Simulate for specified number of ticks relative to the simulation start tick (e.g. if restoring a checkpoint) --maxtime MAXTIME Run to the specified absolute simulated time in seconds -P PARAM, --param PARAM Set a SimObject parameter relative to the root node. An extended Python multi range slicing syntax can be used for arrays. For example: 'system.cpu[0,1,3:8:2].max_insts_all_threads = 42' sets max_insts_all_threads for cpus 0, 1, 3, 5 and 7 Direct parameters of the root object are not accessible, only parameters of its children. --list-cpu-types List available CPU types --cpu-type {AtomicSimpleCPU,BaseAtomicSimpleCPU,BaseMinorCPU,BaseNonCachingSimpleCPU,BaseO3CPU,BaseTimingSimpleCPU,DerivO3CPU,NonCachingSimpleCPU,O3CPU,TimingSimpleCPU,X86AtomicSimpleCPU,X86KvmCPU,X86MinorCPU,X86NonCachingSimpleCPU,X86O3CPU,X86TimingSimpleCPU} type of cpu to run with --list-bp-types List available branch predictor types --list-indirect-bp-types List available indirect branch predictor types --bp-type {BiModeBP,LTAGE,LocalBP,MultiperspectivePerceptron64KB,MultiperspectivePerceptron8KB,MultiperspectivePerceptronTAGE64KB,MultiperspectivePerceptronTAGE8KB,TAGE,TAGE_SC_L_64KB,TAGE_SC_L_8KB,TournamentBP} type of branch predictor to run with (if not set, use the default branch predictor of the selected CPU) --indirect-bp-type {SimpleIndirectPredictor} type of indirect branch predictor to run with --list-rp-types List available replacement policy types --list-hwp-types List available hardware prefetcher types --l1i-hwp-type {AMPMPrefetcher,BOPPrefetcher,DCPTPrefetcher,IndirectMemoryPrefetcher,IrregularStreamBufferPrefetcher,MultiPrefetcher,PIFPrefetcher,SBOOEPrefetcher,STeMSPrefetcher,SignaturePathPrefetcher,SignaturePathPrefetcherV2,SlimAMPMPrefetcher,SmsPrefetcher,StridePrefetcher,TaggedPrefetcher} type of hardware prefetcher to use with the L1 instruction cache. (if not set, use the default prefetcher of the selected cache) --l1d-hwp-type {AMPMPrefetcher,BOPPrefetcher,DCPTPrefetcher,IndirectMemoryPrefetcher,IrregularStreamBufferPrefetcher,MultiPrefetcher,PIFPrefetcher,SBOOEPrefetcher,STeMSPrefetcher,SignaturePathPrefetcher,SignaturePathPrefetcherV2,SlimAMPMPrefetcher,SmsPrefetcher,StridePrefetcher,TaggedPrefetcher} type of hardware prefetcher to use with the L1 data cache. (if not set, use the default prefetcher of the selected cache) --l2-hwp-type {AMPMPrefetcher,BOPPrefetcher,DCPTPrefetcher,IndirectMemoryPrefetcher,IrregularStreamBufferPrefetcher,MultiPrefetcher,PIFPrefetcher,SBOOEPrefetcher,STeMSPrefetcher,SignaturePathPrefetcher,SignaturePathPrefetcherV2,SlimAMPMPrefetcher,SmsPrefetcher,StridePrefetcher,TaggedPrefetcher} type of hardware prefetcher to use with the L2 cache. (if not set, use the default prefetcher of the selected cache) --checker --cpu-clock CPU_CLOCK Clock for blocks running at CPU speed --smt Only used if multiple programs are specified. If true, then the number of threads per cpu is same as the number of programs. --elastic-trace-en Enable capture of data dependency and instruction fetch traces using elastic trace probe. --inst-trace-file INST_TRACE_FILE Instruction fetch trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation --data-trace-file DATA_TRACE_FILE Data dependency trace file input to Elastic Trace probe in a capture simulation and Trace CPU in a replay simulation --dist Parallel distributed gem5 simulation. --dist-sync-on-pseudo-op Use a pseudo-op to start dist-gem5 synchronization. --is-switch Select the network switch simulator process for adistributed gem5 run --dist-rank DIST_RANK Rank of this system within the dist gem5 run. --dist-size DIST_SIZE Number of gem5 processes within the dist gem5 run. --dist-server-name DIST_SERVER_NAME Name of the message server host DEFAULT: localhost --dist-server-port DIST_SERVER_PORT Message server listen port DEFAULT: 2200 --dist-sync-repeat DIST_SYNC_REPEAT Repeat interval for synchronisation barriers among dist-gem5 processes DEFAULT: --ethernet-linkdelay --dist-sync-start DIST_SYNC_START Time to schedule the first dist synchronisation barrier DEFAULT:5200000000000t --ethernet-linkspeed ETHERNET_LINKSPEED Link speed in bps DEFAULT: 10Gbps --ethernet-linkdelay ETHERNET_LINKDELAY Link delay in seconds DEFAULT: 10us -I MAXINSTS, --maxinsts MAXINSTS Total number of instructions to simulate (default: run forever) --work-item-id WORK_ITEM_ID the specific work id for exit & checkpointing --num-work-ids NUM_WORK_IDS Number of distinct work item types --work-begin-cpu-id-exit WORK_BEGIN_CPU_ID_EXIT exit when work starts on the specified cpu --work-end-exit-count WORK_END_EXIT_COUNT exit at specified work end count --work-begin-exit-count WORK_BEGIN_EXIT_COUNT exit at specified work begin count --init-param INIT_PARAM Parameter available in simulation with m5 initparam --initialize-only Exit after initialization. Do not simulate time. Useful when gem5 is run as a library. --simpoint-profile Enable basic block profiling for SimPoints --simpoint-interval SIMPOINT_INTERVAL SimPoint interval in num of instructions --take-simpoint-checkpoints TAKE_SIMPOINT_CHECKPOINTS <simpoint file,weight file,interval-length,warmup- length> --restore-simpoint-checkpoint restore from a simpoint checkpoint taken with --take- simpoint-checkpoints --take-checkpoints TAKE_CHECKPOINTS <M,N> take checkpoints at tick M and every N ticks thereafter --max-checkpoints MAX_CHECKPOINTS the maximum number of checkpoints to drop --checkpoint-dir CHECKPOINT_DIR Place all checkpoints in this absolute directory -r CHECKPOINT_RESTORE, --checkpoint-restore CHECKPOINT_RESTORE restore from checkpoint <N> --checkpoint-at-end take a checkpoint at end of run --work-begin-checkpoint-count WORK_BEGIN_CHECKPOINT_COUNT checkpoint at specified work begin count --work-end-checkpoint-count WORK_END_CHECKPOINT_COUNT checkpoint at specified work end count --work-cpus-checkpoint-count WORK_CPUS_CHECKPOINT_COUNT checkpoint and exit when active cpu count is reached --restore-with-cpu {AtomicSimpleCPU,BaseAtomicSimpleCPU,BaseMinorCPU,BaseNonCachingSimpleCPU,BaseO3CPU,BaseTimingSimpleCPU,DerivO3CPU,NonCachingSimpleCPU,O3CPU,TimingSimpleCPU,X86AtomicSimpleCPU,X86KvmCPU,X86MinorCPU,X86NonCachingSimpleCPU,X86O3CPU,X86TimingSimpleCPU} cpu type for restoring from a checkpoint --repeat-switch REPEAT_SWITCH switch back and forth between CPUs with period <N> -s STANDARD_SWITCH, --standard-switch STANDARD_SWITCH switch from timing to Detailed CPU after warmup period of <N> -p PROG_INTERVAL, --prog-interval PROG_INTERVAL CPU Progress Interval -W WARMUP_INSTS, --warmup-insts WARMUP_INSTS Warmup period in total instructions (requires --standard-switch) --bench BENCH base names for --take-checkpoint and --checkpoint- restore -F FAST_FORWARD, --fast-forward FAST_FORWARD Number of instructions to fast forward before switching -S, --simpoint Use workload simpoints as an instruction offset for --checkpoint-restore or --take-checkpoint. --at-instruction Treat value of --checkpoint-restore or --take- checkpoint as a number of instructions. --spec-input {ref,test,train,smred,mdred,lgred} Input set size for SPEC CPU2000 benchmarks. --arm-iset {arm,thumb,aarch64} ARM instruction set. --stats-root STATS_ROOT If given, dump only stats of objects under the given SimObject. SimObjects are identified with Python notation as in: system.cpu[0].mmu. All elements of an array can be selected at once with: system.cpu[:].mmu. If given multiple times, dump stats that are present under any of the roots. If not given, dump all stats. --override-vendor-string OVERRIDE_VENDOR_STRING Override vendor string returned by CPUID instruction in X86. -c CMD, --cmd CMD The binary to run in syscall emulation mode. -o OPTIONS, --options OPTIONS The options to pass to the binary, use around the entire string -e ENV, --env ENV Initialize workload environment from text file. -i INPUT, --input INPUT Read stdin from a file. --output OUTPUT Redirect stdout to a file. --errout ERROUT Redirect stderr to a file. --chroot CHROOT The chroot option allows a user to alter the search path for processes running in SE mode. Normally, the search path would begin at the root of the filesystem (i.e. /). With chroot, a user can force the process to begin looking atsome other location (i.e. /home/user/rand_dir).The intended use is to trick sophisticated software which queries the __HOST__ filesystem for information or functionality. Instead of finding files on the __HOST__ filesystem, the process will find the user's replacment files. --interp-dir INTERP_DIR The interp-dir option is used for setting the interpreter's path. This will allow to load the guest dynamic linker/loader itself from the elf binary. The option points to the parent folder of the guest /lib in the host fs --redirects REDIRECTS A collection of one or more redirect paths to be used in syscall emulation.Usage: gem5.opt [...] --redirects /dir1=/path/to/host/dir1 --redirects /dir2=/path/to/host/dir2 --wait-gdb Wait for remote GDB to connect.
最新发布
10-24
<think>嗯,用户这次问的是gem5中se.py脚本的配置参数详情。从用户引用内容看,ta应该已经接触过gem5的基础配置脚本(比如simple.py),现在想深入理解更复杂的se.py。用户引用中特别提到“配置脚本完全由用户定义”[^2]和缓存层次结构[^3],说明ta可能正在搭建自定义系统。 上次我详细解释了缓存相关的参数,这次需要覆盖更全面的系统配置项。用户要求“详细列出”,意味着需要分门别类说明,比如CPU模式、内存系统、仿真控制等模块。注意到引用[4]提到Options.py包含命令行选项,这提示我应该关联se.py实际支持的参数表。 重点参数应该包括:CPU类型(AtomicSimple/Timing/O3),缓存结构(和上次部分重复但需保持完整),内存模式(经典/DRAMsim3),多核配置(核数、亲和性),检查点恢复等高级功能。每个参数要说明可选值和默认值,比如--cpu-type的三种常用选项。 需要提醒用户查看官方文档:gem5中se.py本身就有详细的help选项(--help),源代码里也有参数解析部分。不过用户想要中文解释,我得把关键参数整理成表格形式更清晰。最后保留相关问题建议,引导用户后续探索方向(如多核扩展、DVFS)。 </think>以下是 gem5 中 `se.py`(Syscall Emulation 模式)配置文件核心参数详解,结合其功能与典型取值: --- ### **一、CPU 核心配置参数** | 参数 | 默认值 | 可选值 | 说明 | |------|--------|--------|------| | `--cpu-type` | `TimingSimpleCPU` | `AtomicSimpleCPU`, `TimingSimpleCPU`, `O3CPU`, `MinorCPU`, `KvmCPU` | CPU 执行模型:<br>- **Atomic**:无时序模型,快速功能仿真<br>- **Timing**:基础时序模型<br>- **O3**:乱序执行模型<br>- **Minor**:有序流水线模型<br>- **Kvm**:硬件虚拟化加速 | | `--num-cpus` | 1 | ≥1 整数 | 模拟的 CPU 核心数量(多核系统) | | `--cpu-clock` | `1GHz` | 频率字符串 (e.g. `2GHz`, `500MHz`) | CPU 主频设置,影响时序计算 | | `--simpoint-profile` | 未启用 | 文件名 | 启用 SimPoint 分析,生成基本块采样文件 | --- ### **二、缓存层次结构参数** | 参数 | 默认值 | 可选值 | 说明 | |------|--------|--------|------| | `--caches` | 禁用 | `--caches` | 启用经典 L1 缓存(指令+数据) | | `--l2cache` | 禁用 | `--l2cache` | 添加统一 L2 缓存层 | | `--l1d_size` | `64kB` | e.g. `32kB`, `128kB` | L1 数据缓存大小 | | `--l1i_size` | `32kB` | e.g. `16kB`, `64kB` | L1 指令缓存大小 | | `--l2_size` | `2MB` | e.g. `1MB`, `4MB` | L2 缓存大小(需启用 `--l2cache`) | | `--l1d_assoc` | 2 | 2, 4, 8... | L1 数据缓存关联度 | | `--l1i_assoc` | 2 | 2, 4, 8... | L1 指令缓存关联度 | | `--l2_assoc` | 8 | 8, 16... | L2 缓存关联度 | | `--cacheline_size` | 64 | 32, 64 (Bytes) | 缓存行大小 | --- ### **三、内存系统参数** | 参数 | 默认值 | 可选值 | 说明 | |------|--------|--------|------| | `--mem-type` | `DDR3_1600_8x8` | `DDR3_2133_8x8`, `DDR4_2400_8x8`, `LPDDR3_1600_1x32`, `<class-name>` | DRAM 内存类型或自定义类名 | | `--mem-size` | `2GB` | e.g. `4GB`, `8GB` | 物理内存容量 | | `--mem-channels` | 1 | 1, 2, 4... | 内存控制器通道数 | --- ### **四、仿真控制参数** | 参数 | 默认值 | 可选值 | 说明 | |------|--------|--------|------| | `--cmd` | 无 | 可执行文件路径 | 待模拟的用户态程序(必选项) | | `--options` | 无 | 命令行参数 | 传递给模拟程序的参数 | | `--maxinsts` | 0 (无限) | >0 整数 | 最大指令数上限(每CPU) | | `--checkpoint-dir` | 无 | 目录路径 | 检查点保存/恢复目录 | | `--restore-simpoint-checkpoint` | 禁用 | 检查点ID | 从 SimPoint 检查点恢复执行 | | `--at-instruction` | 禁用 | `--at-instruction` | 按指令计数生成检查点(需 `--take-checkpoints`) | --- ### **五、系统配置参数** | 参数 | 默认值 | 可选值 | 说明 | |------|--------|--------|------| | `--sys-voltage` | `1.0V` | e.g. `0.9V`, `1.2V` | 系统供电电压(用于能耗模型) | | `--sys-clock` | `1GHz` | 频率字符串 | 系统总线频率 | | `--kernel` | 无 | vmlinux 路径 | 在 SE 模式下加载内核符号(调试用) | --- ### **使用示例** ```bash # 双核 O3 CPU + 两级缓存 + 4GB DDR4 内存 build/X86/gem5.opt configs/example/se.py \ --cmd=benchmarks/x86/bzip2 \ --options="input.program" \ --cpu-type=O3CPU \ --num-cpus=2 \ --caches \ --l2cache \ --l1d_size=64kB \ --l1i_size=32kB \ --l2_size=2MB \ --mem-type=DDR4_2400_8x8 \ --mem-size=4GB ``` --- ### **查看完整参数列表** ```bash build/X86/gem5.opt configs/example/se.py --help ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值