AbstractController.hh revision 6506
16285Snate@binkert.org
26285Snate@binkert.org#ifndef ABSTRACTCONTROLLER_H
36285Snate@binkert.org#define ABSTRACTCONTROLLER_H
46285Snate@binkert.org
56285Snate@binkert.org#include "mem/ruby/common/Consumer.hh"
66285Snate@binkert.org#include "mem/protocol/MachineType.hh"
76506Spdudnik@gmail.com#include "mem/ruby/common/Address.hh"
86285Snate@binkert.org
96285Snate@binkert.orgclass MessageBuffer;
106285Snate@binkert.orgclass Network;
116285Snate@binkert.org
126285Snate@binkert.orgclass AbstractController : public Consumer {
136285Snate@binkert.orgpublic:
146285Snate@binkert.org  AbstractController() {}
156285Snate@binkert.org  virtual void init(Network* net_ptr, const vector<string> & argv) = 0;
166285Snate@binkert.org
176285Snate@binkert.org  // returns the number of controllers created of the specific subtype
186285Snate@binkert.org  //  virtual int getNumberOfControllers() const = 0;
196285Snate@binkert.org  virtual MessageBuffer* getMandatoryQueue() const = 0;
206285Snate@binkert.org  virtual const int & getVersion() const = 0;
216285Snate@binkert.org  virtual const string toString() const = 0;  // returns text version of controller type
226285Snate@binkert.org  virtual const string getName() const = 0;   // return instance name
236285Snate@binkert.org  virtual const MachineType getMachineType() const = 0;
246506Spdudnik@gmail.com  virtual void set_atomic(Address addr) = 0;
256506Spdudnik@gmail.com  virtual void clear_atomic() = 0;
266285Snate@binkert.org
276285Snate@binkert.org  virtual void print(ostream & out) const = 0;
286285Snate@binkert.org  virtual void printStats(ostream & out) const = 0;
296285Snate@binkert.org  virtual void printConfig(ostream & out) const = 0;
306285Snate@binkert.org  virtual void wakeup() = 0;
316285Snate@binkert.org  //  virtual void dumpStats(ostream & out) = 0;
326285Snate@binkert.org  virtual void clearStats() = 0;
336285Snate@binkert.org
346285Snate@binkert.org};
356285Snate@binkert.org
366285Snate@binkert.org#endif
37