gem5 运行测试程序时如何设置cache的大小

在gem5的syscall emulation模式下运行测试程序时,用户尝试通过命令行参数设定L1(32K)、L2(256K)和L3(8192K)缓存的大小。然而,似乎这些配置并未在实际模拟中生效,导致L1、L2和L3缓存未被正确使用。
摘要由CSDN通过智能技术生成

L1, L2, L3 cache sizes notbeing used?

Hello,I am running gem5 in syscall emulation mode and specifying the cache sizes. This appears to work as desired. bpayne <at> bpayne-VirtualBox64:~/gem5$ build/X86/gem5.opt configs/example/se.py --clock=2.8GHz--l1d_size=32K --l1i_size=32K --l2_size=256K --l3_size=8192K -c tests/test-progs/hello/bin/x86/linux/hellogem5 Simulator System.

 

这句话的大体意思是,gem5在运行测试程序时,虽然通过参数设置了L1,L2,L3的大小,但是L1,L2,L3没有被用到

 

Re: L1, L2, L3 cache sizes not being used?

You seem to be running without caches.

Try --caches and --l2cache
回复的解决方法是,L1cache 前加上 “--caches”,在l2cache前加上 “--l2cache“
 
按照此种方法,我在我的机器上测试,命令如下:
 build/X86/gem5.opt configs/example/se.py --caches --l1d_size=32kB --l1i_size=32kB --l2cache --l2_size=256kB --l3_size=8192kB  -c tests/test-progs/hello/bin/x86/linux/hello 
 
 
查看 ./m5out/stats.txt,运行结果如下:
 
 

---------- Begin Simulation Statistics ---------- sim_seconds                                  0.000006                       # Number of seconds simulated sim_ticks                                     5950500                       # Number of ticks simulated final_tick                                    5950500                       # Number of ticks from beginning of simulation (restored from checkpoints and never reset) sim_freq                                 1000000000000                       # Frequency of simulated ticks host_inst_rate                                 493559                       # Simulator instruction rate (inst/s) host_op_rate                                   889540                       # Simulator op (including micro ops) rate (op/s) host_tick_rate                              511707881                       # Simulator tick rate (ticks/s) host_mem_usage                                 621232                       # Number of bytes of host memory used host_seconds                                     0.01                       # Real time elapsed on the host sim_insts                                        5721                       # Number of instructions simulated sim_ops                                         10328                       # Number of ops (including micro ops) simulated system.physmem.bytes_read::cpu.inst             14656                       # Number of bytes read from this memory system.physmem.bytes_read::cpu.data              8640                       # Number of bytes read from this memory system.physmem.bytes_read::total                23296                       # Number of bytes read from this memory system.physmem.bytes_inst_read::cpu.inst        14656                       # Number of instructions bytes read from this memory system.physmem.bytes_inst_read::total           14656                       # Number of instructions bytes read from this memory system.physmem.num_reads::cpu.inst                229                       # Number of read requests responded to by this memory system.physmem.num_reads::cpu.data                135                       # Number of read requests responded to by this memory system.physmem.num_reads::total                   364                       # Number of read requests responded to by this memory system.physmem.bw_read::cpu.inst           2462986304                       # Total read bandwidth from this memory (bytes/s) system.physmem.bw_read::cpu.data           1451978825                       # Total read bandwidth from this memory (bytes/s) system.physmem.bw_read::total              3914965129                       # Total read bandwidth from this memory (bytes/s) system.physmem.bw_inst_read::cpu.inst      2462986304                       # Instruction read bandwidth from this memory (bytes/s) system.physmem.bw_inst_read::total         2462986304                       # Instruction read bandwidth from this memory (bytes/s) system.physmem.bw_total::cpu.inst          2462986304                       # Total bandwidth to/from this memory (bytes/s) system.physmem.bw_total::cpu.data          1451978825                       # Total bandwidth to/from this memory (bytes/s) system.physmem.bw_total::total             3914965129                       # Total bandwidth to/from this memory (bytes/s) system.l2.replacements                              0                       # number of replacements system.l2.tagsinuse                        144.093545                       # Cycle average of tags in use system.l2.total_refs                                1                       # Total

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值