Hi Nate, I think a wrapper class make sense and it would indeed present a huge reduction in the risk of mixing ticks and cycle counts. We could also do it the other way round and make ticks a wrapper (or both). What makes more sense?
I am not sure I understand the template idea. Won't it still be possible to have e.g different objects of the same type using each others cycle counters by mistake? What would the templated type be? Andreas ________________________________________ From: [email protected] [[email protected]] On Behalf Of nathan binkert [[email protected]] Sent: Tuesday, July 31, 2012 2:27 AM To: Steve Reinhardt Cc: Andreas Hansson; gem5 Developer List; Ali Saidi Subject: Re: [gem5-dev] Review Request: Clock: Rework clocks to avoid tick-to-cycle transformations > - Let's create a uint64_t typedef called CycleCount (or maybe CycleCounter). I've been lurking, but I'd vote for having a real object wrapper instead of a typedef. This will make it much more difficult to assign ticks to clocks. I'd even consider going so far as to have it templated (or declared perhaps using a template within a container class) so that the CycleCount for one object is different from the cycle count of another. Nate -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
