Hi Zhangyi,

A small note on the modelling style: having a periodic wakeup like this is
a sure way of creating a slow simulation model. To really benefit from the
event-based simulation that gem5 offers, try and stay away from a "Cycle
Callable Model" and only schedule events when you really need to do
something. For example, see src/mem/simple_dram.cc. If you wake up every
cycle you create more stress on the event scheduler, and also execute a
bunch of code that does nothing besides concluding that you have nothing
to do. Similarly, instead of waking up every cycle and do counter += 1;,
rather do counter += n and then schedule the event after n cycles (or
similar).

I hope that helps.

Andreas



On 06/05/2013 10:09, "Jason Power" <[email protected]> wrote:

>This is updated in the most recent version of gem5 (gem5, not gem5-stable)
>
>See
>http://repo.gem5.org/gem5/file/00dca8a9b560/src/mem/ruby/system/RubyMemory
>Control.cc
>
>Jason
>
>
>On Mon, May 6, 2013 at 3:23 AM, zhangyi <[email protected]> wrote:
>
>> hi all,
>>
>> I'm reading the source code of ruby. In
>> src/mem/ruby/system/MemoryController.cc, I find the MC wakeup per 10ps.
>>Is
>> this reasonable?The code is:
>>
>>
>>     if (m_idleCount > 0) {
>>         assert(!m_event.scheduled());
>>         schedule(m_event, curTick() + m_mem_bus_cycle_multiplier);
>>     }
>>
>> The version of gem5 is gem5-stable-f75ee4849c40
>>
>> Any answers are appreciated!
>>
>>
>>
>>
>> zhangyi
>> _______________________________________________
>> gem5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/gem5-dev
>>
>_______________________________________________
>gem5-dev mailing list
>[email protected]
>http://m5sim.org/mailman/listinfo/gem5-dev


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to