Yikes! I hope not... Here's my take: Addr is important for actual memory addresses because all the modules have to agree on how big they are. A secondary but notable issue is that they're used all over the place (i.e., there are many many dynamic instances of Addr) in things like Request and Packet, so if you only need 32-bit addresses, you probably could get some notable savings by changing that typedef. Note that a long time ago Addr was defined by the ISA, but we ended that practice, I think because it created huge otherwise unnecessary dependencies on the ISA definition.
On the other hand, things like the maximum size of a memory module aren't really exposed to other modules (as long as the maximum is big enough), and there aren't enough dynamic instances to make shrinking it to 32 bits much of an optimization. So even if someone went and changed the Addr typedef to uint32_t (a possible if unlikely thing), changing the type of the memory module size field wouldn't really be necessary or useful. Thus I'm OK with leaving it as a uint64_t. However, that's just a practical opinion, not a religious conviction... Steve On Sun, Aug 26, 2012 at 8:02 AM, Andreas Hansson <[email protected]>wrote: > Let's switch that one as well then :) > > Perhaps we need another religious discussion of whether an Addr is just an > absolute single value or if it can also denote a relative value as for the > size. > > Andreas > > On 26/08/2012 07:03, "Nilay Vaish" <[email protected]> wrote: > > >On Sun, 26 Aug 2012, Andreas Hansson wrote: > > > >> > >> ----------------------------------------------------------- > >> This is an automatically generated e-mail. To reply, visit: > >> http://reviews.gem5.org/r/1373/#review3328 > >> ----------------------------------------------------------- > >> > >> > >> > >> src/mem/ruby/system/MemoryVector.hh > >> <http://reviews.gem5.org/r/1373/#comment3426> > >> > >> If we want to align this with the rest of gem5 then the type should > >> be Addr (which is typedef'ed to uint64_t). Perhaps a good idea to take > >> the hit and change the memory-size related things to Addr? > >> > >> > > > >I think size is expressed as a uint64_t. I checked src/mem/physical.hh. > > > >-- > >Nilay > > > > > -- 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 > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
