The right thing to do is to either rely on the existing python
framework, or move statements into the normal BaseCPU constructor.

In this instance, I think the former is the correct answer since it's
not exactly clear to me why those three variables must be set to null
in C++.  I think the issue is that the parameters aren't in the
BaseCPU python class, but rather in derived classes.   "tracer" is
already in BaseCPU, so that's fine, just rely on the python. "profile"
should be easily moved to the BaseCPU since I think all CPUs use it.
The real issue is "checker" which could either be in BaseCPU, or only
in the derived classes since they each require a specific type of
checker.  I don't think there's anything in the BaseCPU object that
helps the checker stuff, but it would be easy enough to just put it
there.

 Nate

On Sun, Jun 29, 2008 at 9:12 PM, Rick Strong <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am attempting to cleanup the cpu models in how they instantiate params to
> look like the rest of the files in M5 (that is removing the Param structures
> in AtomicSimpleCPU and BaseCPU to start ). I have worked through many of the
> problems but I am wondering what is  the best way to call the Params()
> constructor from python in src/base/cpu.cc. This will be necessary because I
> intend to remove the Params struct in BaseCPU class.
>
> I could see how I can move profile variable declaration into python BaseCPU
> class, but I don't know how I would set checker and tracer to null while
> still letting them be pointers to the correct class.
>
> Thanks in advance,
> -Rick
>
>
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to