41 #ifndef __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCONTROLLER_HH__ 42 #define __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCONTROLLER_HH__ 58 #include "mem/ruby/protocol/AccessPermission.hh" 60 #include "params/RubyController.hh" 70 virtual const char*
what()
const throw()
71 {
return "Port rejected message based on type"; }
80 const Params *
params()
const {
return (
const Params *)_params; }
83 MachineType
getType()
const {
return m_machineID.getType(); }
89 bool isBlocked(
Addr)
const;
96 virtual AccessPermission getAccessPermission(
const Addr &
addr) = 0;
98 virtual void print(std::ostream & out)
const = 0;
99 virtual void wakeup() = 0;
100 virtual void resetStats() = 0;
101 virtual void regStats();
103 virtual void recordCacheTrace(
int cntrl,
CacheRecorder* tr) = 0;
104 virtual Sequencer* getCPUSequencer()
const = 0;
113 {
return m_mandatory_queue_latency; }
117 virtual bool functionalReadBuffers(
PacketPtr&) = 0;
118 virtual void functionalRead(
const Addr &addr,
PacketPtr) = 0;
122 virtual int functionalWriteBuffers(
PacketPtr&) = 0;
123 virtual int functionalWrite(
const Addr &addr,
PacketPtr) = 0;
128 {
fatal(
"Prefetches not implemented!");}
134 {
fatal(
"collateStats() should be overridden!");}
137 virtual void initNetQueues() = 0;
140 Port &getPort(
const std::string &if_name,
153 {
return *(m_delayVCHistogram[
index]); }
168 MachineID mapAddressToMachine(
Addr addr, MachineType mtype)
const;
172 void profileRequest(
const std::string &request);
174 void profileMsgDelay(uint32_t virtualNetwork,
Cycles delay);
177 void wakeUpBuffers(
Addr addr);
178 void wakeUpAllBuffers(
Addr addr);
179 void wakeUpAllBuffers();
180 bool serviceMemoryQueue();
245 const std::string &_label);
271 #endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCONTROLLER_HH__
std::map< Addr, MsgVecType *> WaitingBufType
Ports are used to interface objects to each other.
WaitingBufType m_waiting_buffers
Cycles is a wrapper class for representing cycle counts, i.e.
#define fatal(...)
This implements a cprintf based fatal() function.
const unsigned int m_buffer_size
const PortID InvalidPortID
virtual const char * what() const
The QueuedMasterPort combines two queues, a request queue and a snoop response queue, that both share the same port.
const Cycles m_mandatory_queue_latency
AbstractController * controller
std::map< Addr, MessageBuffer * > m_block_map
virtual void enqueuePrefetch(const Addr &, const RubyRequestType &)
Function for enqueuing a prefetch request.
const AddrRangeList & getAddrRanges() const
std::set< MessageBuffer * > MsgBufType
SnoopRespPacketQueue snoopRespQueue
std::vector< MessageBuffer * > MsgVecType
This is a simple scalar statistic, like a counter.
Port that forwards requests and receives responses from the memory controller.
void process()
virtual process function that is invoked when the callback queue is executed.
RubyControllerParams Params
NodeID getVersion() const
Declaration of the queued port.
Callback class used for collating statistics from all the controller of this type.
MachineID getMachineID() const
const AddrRangeList addrRanges
The address range to which the controller responds on the CPU side.
uint64_t Tick
Tick count type.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
std::vector< Stats::Histogram * > m_delayVCHistogram
ClockedObject declaration and implementation.
Stats::Histogram & getDelayVCHist(uint32_t index)
virtual void collateStats()
Function for collating statistics from all the controllers of this particular type.
SenderState(MachineID _id)
Stats::Scalar m_fully_busy_cycles
Counter for the number of cycles when the transitions carried out were equal to the maximum allowed...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const int m_transitions_per_cycle
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
unsigned int m_cur_in_port
A virtual base opaque structure used to hold state associated with the packet (e.g., an MSHR), specific to a SimObject that sees the packet.
MachineType getType() const
Declaration of the Packet class.
virtual Cycles mandatoryQueueLatency(const RubyRequestType ¶m_type)
const int m_number_of_TBEs
Stats::Histogram & getDelayHist()
const Params * params() const
StatsCallback(AbstractController *_ctr)
const MasterID m_masterId
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
void initNetworkPtr(Network *net_ptr)
const FlagsType init
This Stat is Initialized.
Stats::Histogram m_delayHistogram
Histogram for profiling delay for the messages this controller cares for.