On Oct 14, 2009, at 8:52 PM, nathan binkert wrote: >> I see you did this: >> >> Tick transmitTick = txEvent.scheduled() ? txEvent.when() - >> curTick : 0; >> SERIALIZE_SCALAR(transmitTick); >> >> Any reason not to serialize txEvent.when() directly? That's what we >> were planning to do. > > It's probably fine. Ali's i8254x ethernet model does just that. > > I think that, in the past, we didn't serialize curTick. We also used > to have hopes of unserializing things in much more flexible ways than > we actually do. e.g. unserialize two different systems from two > different checkpoints into one combined system. In those cases, > curTick may not be the same when you unserialize. > > We should probably figure out a way to use the serialize and > unserialize methods for statically constructed events. Probably > beyond the scope of this fix though. If you decide to try to do this, > let me know. I've got ideas. Some day, we'll serialize stuff using > pickle! (though there are simpler improvements we can make before > that point.) The logic there isn't really needed, but you'll need to either assign txEvent.when() to a local variable for the SERIALIZE_SCALAR() macro to work right. You can use paramOut/In manually.
Was there some reason that we just don't serialize the event directly? Event has serialize/unserialize methods. However if you have more than one event in an object there is probably a name issue. We kinda want a SERIALIZE_SUBOBJECT() method which swizzles the naming. Ali _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
