sim: simulate with multiple threads and event queues
authorSteve Reinhardt ext:(%2C%20Nilay%20Vaish%20%3Cnilay%40cs.wisc.edu%3E%2C%20Ali%20Saidi%20%3CAli.Saidi%40ARM.com%3E) <stever@gmail.com>
Mon, 25 Nov 2013 17:21:00 +0000 (11:21 -0600)
committerSteve Reinhardt ext:(%2C%20Nilay%20Vaish%20%3Cnilay%40cs.wisc.edu%3E%2C%20Ali%20Saidi%20%3CAli.Saidi%40ARM.com%3E) <stever@gmail.com>
Mon, 25 Nov 2013 17:21:00 +0000 (11:21 -0600)
commitde366a16f11b7e27a5b5e064a2a773052568428e
tree9bed0ebc9801c118e0f17702a979a659a59a67df
parent8a53da22c2f07aed924a45ab296f7468d842d7f6
sim: simulate with multiple threads and event queues
This patch adds support for simulating with multiple threads, each of
which operates on an event queue.  Each sim object specifies which eventq
is would like to be on.  A custom barrier implementation is being added
using which eventqs synchronize.

The patch was tested in two different configurations:
1. ruby_network_test.py: in this simulation L1 cache controllers receive
   requests from the cpu. The requests are replied to immediately without
   any communication taking place with any other level.
2. twosys-tsunami-simple-atomic: this configuration simulates a client-server
   system which are connected by an ethernet link.

We still lack the ability to communicate using message buffers or ports. But
other things like simulation start and end, synchronizing after every quantum
are working.

Committed by: Nilay Vaish
30 files changed:
src/base/barrier.hh [new file with mode: 0644]
src/cpu/base.cc
src/cpu/kvm/base.cc
src/dev/etherlink.cc
src/dev/x86/Pc.py
src/python/m5/SimObject.py
src/python/m5/event.py
src/python/m5/main.py
src/python/m5/simulate.py
src/python/swig/event.i
src/sim/Root.py
src/sim/SConscript
src/sim/core.cc
src/sim/core.hh
src/sim/debug.cc
src/sim/eventq.cc
src/sim/eventq.hh
src/sim/eventq_impl.hh
src/sim/global_event.cc [new file with mode: 0644]
src/sim/global_event.hh [new file with mode: 0644]
src/sim/root.cc
src/sim/serialize.cc
src/sim/serialize.hh
src/sim/sim_events.cc
src/sim/sim_events.hh
src/sim/sim_exit.hh
src/sim/sim_object.cc
src/sim/simulate.cc
src/sim/simulate.hh
src/sim/stat_control.cc