On Tue, Jul 21, 2009 at 10:55 AM, Derek Hower<[email protected]> wrote: >> >>> 2) What's the best way to add multiple protocols to the regression >>> tests, so that all ruby related tests are run for each protocol? >>> Somayeh is almost done with MESI and we need to make sure it's tested. >> I don't have a mechanism for that yet, but I will work on getting >> something together as soon as I can. Basically, the right thing to do >> is have a RubyMemory for each protocol compiled into the m5 library. >> Then add a protocol= parameter to the SimObject to pick the protocol >> that we want. To do this correctly requires some SCons magic to >> compile things multiple times, each with a different protocol. So we >> can link all of them in at once though, we'll need to add something >> like namespace PROTOCOL { } around everything (where PROTOCOL is the >> #defined protocol name. Does this make sense. Anyone have better >> ideas for how to do this? Steve? >> > > I'm a little concerned about this approach. Historically we haven't > compiled all the protocols in GEMS at the same time, and whether > through good planning or just good luck it has worked well. It's not > uncommon that when working on a specific problem you may make a small > change to SLICC that breaks all the protocols except the one you are > working with. Assuming that whatever it is your working on is just an > experiment to test a specific hypothesis, chances are you'll never > want to check in those changes and so don't care that you've broken > other protocols in the process. With the build approach above, > however, you'd have to either modify the build system or fix all the > protocols every time you make a change. > > We deal with this in GEMS by building a different binary for each > protocol you want to use. Is there opposition to doing something like > this in gem5 too?
If we do it right, it should work either way... m5 as a whole doesn't really care what SimObjects are linked in and which aren't; it will just complain if your config script tries to use one it doesn't know about. So as long as the scons magic lets you set a flag to choose protocols (like the CPU_MODELS flag lets you choose CPU models) then you should have the option of compiling them all in or just the one(s) you care about. I think Nate's idea above would work; in this case, you'd get an error if your RubyMemory protocol parameter setting asked for a protocol that wasn't compiled in. Based on what I just wrote above we might want to consider instead having an abstract base protocol SimObject class and then have the different protocols be distinct SimObjects that derive from that. I don't know if that's better or worse, just a different model to consider. However we do it, we should plan ahead for when the various Ruby objects (caches etc.) are independent SimObjects themselves instead of being inside this opaque RubyMemory box. Steve _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
