Shouldn't this be a fatal() error instead of just silently fixing it to be 0?
Nate On Wed, Nov 18, 2009 at 6:05 PM, Brad Beckmann <brad.beckm...@amd.com> wrote: > changeset c2dfa12ea482 in /z/repo/m5 > details: http://repo.m5sim.org/m5?cmd=changeset;node=c2dfa12ea482 > description: > ruby: getPort function fix > Fixed RubyMemory::getPort function to not pass in a -1 for the idx > parameter > > diffstat: > > 1 file changed, 9 insertions(+) > src/mem/rubymem.cc | 9 +++++++++ > > diffs (23 lines): > > diff -r 5ea2e2b3b39f -r c2dfa12ea482 src/mem/rubymem.cc > --- a/src/mem/rubymem.cc Wed Nov 18 13:55:58 2009 -0800 > +++ b/src/mem/rubymem.cc Wed Nov 18 13:55:58 2009 -0800 > @@ -186,10 +186,19 @@ > ruby_ports.size(), > ruby_dma_ports.size()); > > + // > + // By default, getPort will be passed an idx of -1. Of course this is an > + // invalid ruby port index and must be a modified > + // > + if (idx == -1) { > + idx = 0; > + } > + > // Accept request for "functional" port for backwards compatibility > // with places where this function is called from C++. I'd prefer > // to move all these into Python someday. > if (if_name == "functional") { > + assert(idx < ruby_ports.size()); > return new Port(csprintf("%s-functional", name()), > this, > ruby_ports[idx]); > _______________________________________________ > m5-dev mailing list > m5-dev@m5sim.org > http://m5sim.org/mailman/listinfo/m5-dev > > _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev