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
This commit is contained in:
parent
8a53da22c2
commit
de366a16f1
@@ -147,6 +147,13 @@ def simulate(*args, **kwargs):
|
||||
for obj in root.descendants(): obj.startup()
|
||||
need_startup = False
|
||||
|
||||
# Python exit handlers happen in reverse order.
|
||||
# We want to dump stats last.
|
||||
atexit.register(stats.dump)
|
||||
|
||||
# register our C++ exit callback function with Python
|
||||
atexit.register(internal.core.doExitCleanup)
|
||||
|
||||
for root in need_resume:
|
||||
resume(root)
|
||||
need_resume = []
|
||||
@@ -157,12 +164,6 @@ def simulate(*args, **kwargs):
|
||||
def curTick():
|
||||
return internal.core.curTick()
|
||||
|
||||
# Python exit handlers happen in reverse order. We want to dump stats last.
|
||||
atexit.register(stats.dump)
|
||||
|
||||
# register our C++ exit callback function with Python
|
||||
atexit.register(internal.core.doExitCleanup)
|
||||
|
||||
# Drain the system in preparation of a checkpoint or memory mode
|
||||
# switch.
|
||||
def drain(root):
|
||||
|
||||
Reference in New Issue
Block a user