下面是本人使用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/[email protected]/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 <[email protected]> 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中的相关参数和过程。