Hi Steve (et al)

The issue is essentially that the System inherits from MemObject, and placing a 
system = Param.System(...) in MemObject creates a cycle. params/System.hh ends 
up including MemObject.hh and vice versa. I have tried a number of permutations 
of forward declarations etc using the cxx_predecls vs swig_decls for the 
System/MemObject but not managed to solve it so far. It is starting to look 
pretty nasty, but I will keep on going and see if I can solve the circular 
dependency this creates in a decent way.

Andreas

From: Steve Reinhardt [mailto:[email protected]]
Sent: 04 January 2012 15:55
To: gem5 Developer List
Cc: Andreas Hansson; Ali Saidi
Subject: Re: [gem5-dev] Review Request: MEM: Add the system port as a central 
access point


On Wed, Jan 4, 2012 at 7:09 AM, Andreas Hansson 
<[email protected]<mailto:[email protected]>> wrote:


> On 2012-01-03 16<tel:2012-01-03%2016>:42:00, Ali Saidi wrote:
> > Why do you need setParent()? You could make every simobject have a 
> > parameter called System and have the default value be Parent.any (see 
> > src/dev/Device.py).
After attempting a "simple" implementation as suggested, with one line in 
SimObject.py my conclusion is that it is more complicated than what it seems. 
Conceptually it is a good idea (there is no inherent reason why the whole 
setParent() is needed), but I struggle to get Python to appreciate the Param 
and Parent objects. Do you have any suggestions on how to do this?

Can you be more specific with what you tried and why/how it didn't work?

BTW, I intend to get to your other patches on reviewboard soon; between work 
and the holidays I've been kind of swamped lately.  Thanks for your patience!

Steve


-- 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