AbstractController.hh revision 6876
16285Snate@binkert.org
26285Snate@binkert.org#ifndef ABSTRACTCONTROLLER_H
36285Snate@binkert.org#define ABSTRACTCONTROLLER_H
46285Snate@binkert.org
56876Ssteve.reinhardt@amd.com#include "sim/sim_object.hh"
66876Ssteve.reinhardt@amd.com#include "params/RubyController.hh"
76876Ssteve.reinhardt@amd.com
86285Snate@binkert.org#include "mem/ruby/common/Consumer.hh"
96285Snate@binkert.org#include "mem/protocol/MachineType.hh"
106506Spdudnik@gmail.com#include "mem/ruby/common/Address.hh"
116285Snate@binkert.org
126285Snate@binkert.orgclass MessageBuffer;
136285Snate@binkert.orgclass Network;
146285Snate@binkert.org
156876Ssteve.reinhardt@amd.comclass AbstractController : public SimObject, public Consumer {
166285Snate@binkert.orgpublic:
176876Ssteve.reinhardt@amd.com    typedef RubyControllerParams Params;
186876Ssteve.reinhardt@amd.com    AbstractController(const Params *p) : SimObject(p) {}
196285Snate@binkert.org  virtual void init(Network* net_ptr, const vector<string> & argv) = 0;
206285Snate@binkert.org
216285Snate@binkert.org  // returns the number of controllers created of the specific subtype
226285Snate@binkert.org  //  virtual int getNumberOfControllers() const = 0;
236285Snate@binkert.org  virtual MessageBuffer* getMandatoryQueue() const = 0;
246285Snate@binkert.org  virtual const int & getVersion() const = 0;
256285Snate@binkert.org  virtual const string toString() const = 0;  // returns text version of controller type
266285Snate@binkert.org  virtual const string getName() const = 0;   // return instance name
276285Snate@binkert.org  virtual const MachineType getMachineType() const = 0;
286863Sdrh5@cs.wisc.edu  virtual void blockOnQueue(Address, MessageBuffer*) = 0;
296863Sdrh5@cs.wisc.edu  virtual void unblock(Address) = 0;
306285Snate@binkert.org
316285Snate@binkert.org  virtual void print(ostream & out) const = 0;
326285Snate@binkert.org  virtual void printStats(ostream & out) const = 0;
336285Snate@binkert.org  virtual void printConfig(ostream & out) const = 0;
346285Snate@binkert.org  virtual void wakeup() = 0;
356285Snate@binkert.org  //  virtual void dumpStats(ostream & out) = 0;
366285Snate@binkert.org  virtual void clearStats() = 0;
376285Snate@binkert.org
386285Snate@binkert.org};
396285Snate@binkert.org
406285Snate@binkert.org#endif
41