ok I was wrong. thanks On 2/24/12, Steve Reinhardt <[email protected]> wrote: > Note also that this isn't "is this a valid address" but "is the address > field of the packet valid", so if you're hitting this assertion in > getAddr() then you're trying to read garbage. If you're not expecting that > it could be garbage, then you need to know that right then and there. > > Steve > > On Fri, Feb 24, 2012 at 8:00 AM, Paul Rosenfeld <[email protected]>wrote: > >> The packet tracks extra information about whether an address is valid. >> Without this extra data, it's impossible to tell whether an address is >> valid just by looking at it. Having to do >> >> if (pkt->hasAddr()) pkt->getAddr() >> >> would get tedious real fast considering how often this operation is >> performed.... >> >> On Fri, Feb 24, 2012 at 4:15 AM, Mahmood Naderan >> <[email protected]>wrote: >> >>> I put some packets into a vector. Later when I wanted to access some >>> of them in the vector (just working with their addr), the assertion >>> failed. This is useful since I am now aware that some of the packets I >>> pushed in the vector are no longer valid. However I think this >>> assertion should go to somewhere else when a manipulation is going to >>> be done on a packet. getAddr() should only return addr. >>> >>> >>> On 2/24/12, Paul Rosenfeld <[email protected]> wrote: >>> > But if the address is not valid, what happens if you use it? I think >>> it's >>> > just a way to stop non-determinism before it spreads throughout the >>> > simulation and the root cause of an error becomes obscured. >>> > >>> > >>> > >>> > On Thu, Feb 23, 2012 at 6:41 AM, Mahmood Naderan >>> > <[email protected]>wrote: >>> > >>> >> Hi, >>> >> The getAddr() in packet.hh first assert that the address must be >>> >> valid. What is the need for such assertion? normally we want to get >>> >> the address of a packet, either it is valid or not. >>> >> >>> >> -- >>> >> // Naderan *Mahmood; >>> >> _______________________________________________ >>> >> gem5-users mailing list >>> >> [email protected] >>> >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>> >> >>> > >>> >>> >>> -- >>> -- >>> // Naderan *Mahmood; >>> _______________________________________________ >>> gem5-users mailing list >>> [email protected] >>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>> >> >> >> _______________________________________________ >> gem5-users mailing list >> [email protected] >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> >
-- -- // Naderan *Mahmood; _______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
