Re: [m5-dev] Gem5 configuration

2009-07-13 Thread Somayeh Sardashti
Hi, Does M5 keep any order when calling init() of different objects? In Ruby, because of dependencies among some objects (like topology and network), the order of calling init() is important and handled in constructor of System (the main module). How can I keep this kind of ordering in M5?

Re: [m5-dev] Gem5 configuration

2009-07-13 Thread Steve Reinhardt
There's no real control over ordering... I believe init() is called on objects in the same order that they were constructed, but you don't have a lot of control over the construction order (short of the fact that if B is a parameter to A then B will be constructed first) and it's probably best not

Re: [m5-dev] Gem5 configuration

2009-07-13 Thread Derek Hower
I believe there are only a few (maybe one?) case(s) where the Ruby initialization dependencies are pretty ugly. The one I know about is a dependency between the Ruby network and the topology class. Given the limited scope of the problem, I think Steve's null init function should suffice. -Derek

Re: [m5-dev] Gem5 configuration

2009-07-09 Thread Steve Reinhardt
(moving this over to m5-dev) M5 has a multi-phase startup process too for dealing with these dependencies. I don't see it documented explicitly anywhere unfortunately. Here's the gist of it though (based on a combination of memory and quick code browsing, so it may not be authoritative): - As

Re: [m5-dev] Gem5 configuration

2009-07-09 Thread nathan binkert
- You're guaranteed that any SimObject that is passed to you as a parameter has been constructed before your constructor is called, so that the pointer in the params struct is valid.  Since init() hasn't been called yet you can't assume too much about what that other object is prepared to do

Re: [m5-dev] Gem5 configuration

2009-07-09 Thread Steve Reinhardt
On Thu, Jul 9, 2009 at 1:24 PM, nathan binkert n...@binkert.org wrote: - You're guaranteed that any SimObject that is passed to you as a parameter has been constructed before your constructor is called, so that the pointer in the params struct is valid. Since init() hasn't been called

Re: [m5-dev] Gem5 configuration

2009-07-09 Thread Gabriel Michael Black
Quoting nathan binkert n...@binkert.org: - You're guaranteed that any SimObject that is passed to you as a parameter has been constructed before your constructor is called, so that the pointer in the params struct is valid.  Since init() hasn't been called yet you can't assume too much about