> On Jan. 8, 2016, 5:22 p.m., Andreas Hansson wrote: > > src/dev/etherswitch.cc, line 529 > > <http://reviews.gem5.org/r/3230/diff/1/?file=52019#file52019line529> > > > > This is not a very nice way to design things... > > > > It would be much better if this module was event based. Is there a > > reason why it is not? > > Mohammad Alian wrote: > I couldn't think of any better implementation. We should retry sending > packets when some of them cannot make it through the fabric (due to > contention). We periodically try to drain packets from input ports if there > is any packet in any of the input ports. This implementation is very similar > to what we have for i8254xGBe device model. > > Andreas Hansson wrote: > I must admit I really don't like the idea of a ticket interconnect model. > We should stick to making it event based. See for example the caches, > crossbar, memory controller etc. If we need to take an action at time T, > schedule an event. Typically all things that need to happen are either > because someone tells us to (reactive), or because some time has elapsed (use > an event). I don't see any good reason why we would stick with a ticked model.
I understand what you mean. I think even here we are doing the same thing: when a packet is received on a port, we enable rxTick and schedule an event which call tick() function after "curTick() + clockPeriod"; then inside tick(), we call forwardingEngine() method which disable rxTick first and then try to forward outstanding packets in the input ports. We re-enable rxTick only if some of the packets could not be forwarded to their dest-port due to contention on the fabric. This story is the same for txTick. We call tick() if and only if there is some work to do. - Mohammad ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3230/#review7843 ----------------------------------------------------------- On Jan. 11, 2016, 5:58 a.m., Mohammad Alian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3230/ > ----------------------------------------------------------- > > (Updated Jan. 11, 2016, 5:58 a.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11292:ed7527fcc338 > --------------------------- > dist,dev: add an ethernet switch model > > > Diffs > ----- > > src/dev/net/Ethernet.py 9d2364203316 > src/dev/net/SConscript 9d2364203316 > src/dev/net/etherswitch.hh PRE-CREATION > src/dev/net/etherswitch.cc PRE-CREATION > > Diff: http://reviews.gem5.org/r/3230/diff/ > > > Testing > ------- > > several testing done with different benchmarks and different switch sizes > > > Thanks, > > Mohammad Alian > > _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev