From de366a16f11b7e27a5b5e064a2a773052568428e Mon Sep 17 00:00:00 2001 From: "Steve Reinhardt ext:(%2C%20Nilay%20Vaish%20%3Cnilay%40cs.wisc.edu%3E%2C%20Ali%20Saidi%20%3CAli.Saidi%40ARM.com%3E)" Date: Mon, 25 Nov 2013 11:21:00 -0600 Subject: 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 --- src/dev/etherlink.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/dev/etherlink.cc') diff --git a/src/dev/etherlink.cc b/src/dev/etherlink.cc index 5ebc4fba5..0117bb7c2 100644 --- a/src/dev/etherlink.cc +++ b/src/dev/etherlink.cc @@ -142,7 +142,9 @@ class LinkDelayEvent : public Event void process(); virtual void serialize(ostream &os); - virtual void unserialize(Checkpoint *cp, const string §ion); + void unserialize(Checkpoint *cp, const string §ion) {} + void unserialize(Checkpoint *cp, const string §ion, + EventQueue *eventq); static Serializable *createForUnserialize(Checkpoint *cp, const string §ion); }; @@ -259,9 +261,10 @@ LinkDelayEvent::serialize(ostream &os) void -LinkDelayEvent::unserialize(Checkpoint *cp, const string §ion) +LinkDelayEvent::unserialize(Checkpoint *cp, const string §ion, + EventQueue *eventq) { - Event::unserialize(cp, section); + Event::unserialize(cp, section, eventq); EtherLink *parent; bool number; -- cgit v1.2.3