AbstractController.hh (10304:a2f88c6d9e54) AbstractController.hh (10311:ad9c042dce54)
1/*
2 * Copyright (c) 2009 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 82 unchanged lines hidden (view full) ---

91 { fatal("Prefetches not implemented!");}
92
93 //! Function for collating statistics from all the controllers of this
94 //! particular type. This function should only be called from the
95 //! version 0 of this controller type.
96 virtual void collateStats()
97 {fatal("collateStats() should be overridden!");}
98
1/*
2 * Copyright (c) 2009 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 82 unchanged lines hidden (view full) ---

91 { fatal("Prefetches not implemented!");}
92
93 //! Function for collating statistics from all the controllers of this
94 //! particular type. This function should only be called from the
95 //! version 0 of this controller type.
96 virtual void collateStats()
97 {fatal("collateStats() should be overridden!");}
98
99 //! Set the message buffer with given name.
100 virtual void setNetQueue(const std::string& name, MessageBuffer *b) = 0;
101
99 public:
100 MachineID getMachineID() const { return m_machineID; }
101
102 Stats::Histogram& getDelayHist() { return m_delayHistogram; }
103 Stats::Histogram& getDelayVCHist(uint32_t index)
104 { return *(m_delayVCHistogram[index]); }
105
102 public:
103 MachineID getMachineID() const { return m_machineID; }
104
105 Stats::Histogram& getDelayHist() { return m_delayHistogram; }
106 Stats::Histogram& getDelayVCHist(uint32_t index)
107 { return *(m_delayVCHistogram[index]); }
108
106 MessageBuffer *getPeerQueue(uint32_t pid)
107 {
108 std::map<uint32_t, MessageBuffer *>::iterator it =
109 peerQueueMap.find(pid);
110 assert(it != peerQueueMap.end());
111 return (*it).second;
112 }
113
114 protected:
115 //! Profiles original cache requests including PUTs
116 void profileRequest(const std::string &request);
117 //! Profiles the delay associated with messages.
118 void profileMsgDelay(uint32_t virtualNetwork, Cycles delay);
119
109 protected:
110 //! Profiles original cache requests including PUTs
111 void profileRequest(const std::string &request);
112 //! Profiles the delay associated with messages.
113 void profileMsgDelay(uint32_t virtualNetwork, Cycles delay);
114
120 //! Function for connecting peer controllers
121 void connectWithPeer(AbstractController *);
122 virtual void getQueuesFromPeer(AbstractController *)
123 { fatal("getQueuesFromPeer() should be called only if implemented!"); }
124
125 void stallBuffer(MessageBuffer* buf, Address addr);
126 void wakeUpBuffers(Address addr);
127 void wakeUpAllBuffers(Address addr);
128 void wakeUpAllBuffers();
129
130 protected:
131 NodeID m_version;
132 MachineID m_machineID;

--- 9 unchanged lines hidden (view full) ---

142
143 unsigned int m_in_ports;
144 unsigned int m_cur_in_port;
145 int m_number_of_TBEs;
146 int m_transitions_per_cycle;
147 unsigned int m_buffer_size;
148 Cycles m_recycle_latency;
149
115 void stallBuffer(MessageBuffer* buf, Address addr);
116 void wakeUpBuffers(Address addr);
117 void wakeUpAllBuffers(Address addr);
118 void wakeUpAllBuffers();
119
120 protected:
121 NodeID m_version;
122 MachineID m_machineID;

--- 9 unchanged lines hidden (view full) ---

132
133 unsigned int m_in_ports;
134 unsigned int m_cur_in_port;
135 int m_number_of_TBEs;
136 int m_transitions_per_cycle;
137 unsigned int m_buffer_size;
138 Cycles m_recycle_latency;
139
150 //! Map from physical network number to the Message Buffer.
151 std::map<uint32_t, MessageBuffer*> peerQueueMap;
152
153 //! Counter for the number of cycles when the transitions carried out
154 //! were equal to the maximum allowed
155 Stats::Scalar m_fully_busy_cycles;
156
157 //! Histogram for profiling delay for the messages this controller
158 //! cares for
159 Stats::Histogram m_delayHistogram;
160 std::vector<Stats::Histogram *> m_delayVCHistogram;

--- 16 unchanged lines hidden ---
140 //! Counter for the number of cycles when the transitions carried out
141 //! were equal to the maximum allowed
142 Stats::Scalar m_fully_busy_cycles;
143
144 //! Histogram for profiling delay for the messages this controller
145 //! cares for
146 Stats::Histogram m_delayHistogram;
147 std::vector<Stats::Histogram *> m_delayVCHistogram;

--- 16 unchanged lines hidden ---