gem5 ruby中的L2 latency

本文详细阐述了在使用gem5ruby进行模拟时,修改L2Cache延迟设置后,性能统计数据未发生变化的现象。通过分析发现,这种现象是因为gem5的协议文件直接规定了不同端口的延迟,而不是从配置文件中获取,从而导致修改配置文件中的延迟值并未直接影响性能计算。此外,文章还解释了L2与主内存之间的延迟在gem5模拟中的实现方式,提供了深入理解gem5内存系统配置和延迟影响机制的见解。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下面是本人使用gem5 ruby过程中遇到的问题:


1. 在使用ruby过程中,笔者采用protocol:MESI_CMP_directory编译和运行,运行后的

输出有config.ini, ruby.stats, 以及stats.txt三个文件,一切正常;

然后,我修改MESI_CMP_directory.py:

class L2Cache(RubyCache):

    latency = 15

将上述的latency = 15 修改为 20,我本来期望看到性能的差别,即stats.txt中的sim_ticks中

看到明显增加,因为l2的latency增加了嘛,但是实际上在l2的latency的修改前后,两者的值

一样,没有差别;

====

另外在修改L2的latency后,运行产生的config.ini的确显示l2的latency为20;


网上搜了下,看到下面的内容:

https://www.mail-archive.com/gem5-users@gem5.org/msg06258.html
 
HI Jordan,
 
The protocol files themselves specified latencies for the different
ports, rather than pulling them from the config files. For example in
the MESI_CMP_directory-L1cache.sm file:
 
 int l2_select_num_bits,
 int l1_request_latency = 2,
 int l1_response_latency = 2,
 int to_l2_latency = 1,
 
these variables are used to indicate the latency of a protocol message
when it is enqueued to a port. Thus, each port for the same cache
could have different access latencies.
 
Malek
 
On Fri, Dec 21, 2012 at 5:14 PM, Jordan Fix <j...@cs.princeton.edu> wrote:
> Hello,
> I'm doing simulations with the Ruby memory system. I found a comment in 
> configs/ruby/MESI_CMP_directory.py that says:
> "# Note: the L2 Cache latency is not currently used"
> Does this mean that the ruby memory system for MESI_CMP_directory is not 
> timing accurate when going to the L2? What about latency when going to main 
> memory?
> Thanks.

原来l2 cache的延时并没有在性能计算中被使用到,难怪我前面修改latency从15ns 到 20ns,并没有明显效果。

那要产生效果的话,应该根据实际需要,修改MESI_CMP_directory-L2cache.sm中的相关参数和过程。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值