I am able to answer the question by myself. Thanks for any attention. chen
On Wed, Jan 16, 2013 at 5:00 PM, Chen Tian <[email protected]> wrote: > Hi, > > I am reading the source code of GEM5. I am curious about how a python > object gets translated to a C++ object. In particular, how does the > statement "self._ccObject = params.create()" in SimObject.py eventually > call the C++ constructor? Using cache object as an example, > I can see the value of params in python scripts printed out as : > > <m5.internal.param_BaseCache.BaseCacheParams; proxy of <Swig Object of > type 'BaseCacheParams *' at 0x4d74ed0> > > > And on the C++ side, I can print out a message from the constructor > of Cache<TagStore>: > > warn: create cache p->name is system.cpu.icache > > It looks like Swig may be the magic piece I am missing, but can some body > give me a coarse-grained call trace from params.create() to the C++ > constructor? > > Thanks a lot. > > Best, > Chen > > >
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
