Thanks for you reply, Korey, I have read an example in the tutorial and
working on it now, thanks !

>
> > Hi, Korey, thanks for your reply. Do you mean that every class should
> have
> > a create() function that return to the type xxxParams ?
> >
> Not every class, every SimObject class... In my interpretation, SimObjects
> allow the visibility through the python interface.
>
> There is some autogeneration of params for SimObject, so the best thing I
> would think is check out the M5 tutorial slides on creating a new object
> and
> then reference a similar SimObject class like PhysMem or BaseCache.
>
> Some trial/error might be needed to get it exactly right like you want it,
> but that's what programming is right :)
>
>
> > I  want to implement RaceCache as something like Physicamem, so if I
> > inheriet it from Phycisalmem, will it work ? Do I have to add
> > an extra create function ?
> >
> > can you please tell me briefly what the xxxParams is ? I have seen the
> kind
> > of things in many place but I can't understand how it works. Thank you !
> >
> >>
> >> Message: 5
> >> Date: Sat, 14 Mar 2009 11:38:20 -0400
> >> From: Korey Sewell <[email protected]>
> >> Subject: Re: [m5-users] a question about adding new class to M5
> >> To: M5 users mailing list <[email protected]>
> >> Message-ID:
> >>        <[email protected]>
> >> Content-Type: text/plain; charset="iso-8859-1"
> >>
> >>
> >> Did this class derive from BaseCache?
> >>
> >> If so, then you are probably creating a new "SimObject" which gets
> >> instantiated via the swig-python(?)/Params interface.
> >>
> >> Look in src/mem/cache/builder.cc.
> >>
> >> In there, you'll see a BaseCache "create()" function that is used to
> >> create
> >> a cache object with the typical M5 params.
> >>
> >> Somewhere, you are going to need a "create() function for you SimObject
> if
> >> you intend to be able to instantiate it through a config file.
> >>
> >> On Sat, Mar 14, 2009 at 10:43 AM, Veydan Wu <[email protected]> wrote:
> >>
> >> > Hi, all, I am confused of how to add new class to M5. When I added a
> new
> >> > class called RaceCache in the src/mem/cache, and modified the
> SConscript
> >> and
> >> > some other files, I got an compile error as followed:
> >> >
> >> > *build/ALPHA_FS/libm5_opt.a(params_wrap.o): In function
> >> > `_wrap_RaceCacheParams_create':
> >> > /m5-stable-733318abb7b1/build/ALPHA_FS/params/params_wrap.cc:31843:
> >> > undefined reference to `RaceCacheParams::create()'
> >> > collect2: ld returned 1 exit status
> >> > scons: *** [build/ALPHA_FS/m5.opt] Error 1
> >> > *
> >> > I am always confused with anything related to params, I think that may
> >> be a
> >> > simple error because of my unfamiliarity of M5, can somebody give me
> >> some
>
>
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users

Reply via email to