MessageBuffer.hh (11036:3de670f298b1) | MessageBuffer.hh (11049:dfb0aa3f0649) |
---|---|
1/* 2 * Copyright (c) 1999-2008 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; --- 122 unchanged lines hidden (view full) --- 131 132 void clear(); 133 void print(std::ostream& out) const; 134 void clearStats() { m_not_avail_count = 0; m_msg_counter = 0; } 135 136 void setIncomingLink(int link_id) { m_input_link_id = link_id; } 137 void setVnet(int net) { m_vnet_id = net; } 138 | 1/* 2 * Copyright (c) 1999-2008 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; --- 122 unchanged lines hidden (view full) --- 131 132 void clear(); 133 void print(std::ostream& out) const; 134 void clearStats() { m_not_avail_count = 0; m_msg_counter = 0; } 135 136 void setIncomingLink(int link_id) { m_input_link_id = link_id; } 137 void setVnet(int net) { m_vnet_id = net; } 138 |
139 // Function for figuring out if any of the messages in the buffer can 140 // satisfy the read request for the address in the packet. 141 // Return value, if true, indicates that the request was fulfilled. 142 bool functionalRead(Packet *pkt); 143 |
|
139 // Function for figuring out if any of the messages in the buffer need 140 // to be updated with the data from the packet. 141 // Return value indicates the number of messages that were updated. 142 // This required for debugging the code. 143 uint32_t functionalWrite(Packet *pkt); 144 145 private: 146 //added by SS --- 27 unchanged lines hidden (view full) --- 174 Tick m_time_last_time_pop; 175 Tick m_last_arrival_time; 176 177 unsigned int m_size_at_cycle_start; 178 unsigned int m_msgs_this_cycle; 179 180 int m_not_avail_count; // count the # of times I didn't have N 181 // slots available | 144 // Function for figuring out if any of the messages in the buffer need 145 // to be updated with the data from the packet. 146 // Return value indicates the number of messages that were updated. 147 // This required for debugging the code. 148 uint32_t functionalWrite(Packet *pkt); 149 150 private: 151 //added by SS --- 27 unchanged lines hidden (view full) --- 179 Tick m_time_last_time_pop; 180 Tick m_last_arrival_time; 181 182 unsigned int m_size_at_cycle_start; 183 unsigned int m_msgs_this_cycle; 184 185 int m_not_avail_count; // count the # of times I didn't have N 186 // slots available |
182 uint64_t m_msg_counter; | 187 uint64 m_msg_counter; |
183 int m_priority_rank; 184 const bool m_strict_fifo; 185 const bool m_randomization; 186 187 int m_input_link_id; 188 int m_vnet_id; 189}; 190 191Cycles random_time(); 192 193inline std::ostream& 194operator<<(std::ostream& out, const MessageBuffer& obj) 195{ 196 obj.print(out); 197 out << std::flush; 198 return out; 199} 200 201#endif // __MEM_RUBY_BUFFERS_MESSAGEBUFFER_HH__ | 188 int m_priority_rank; 189 const bool m_strict_fifo; 190 const bool m_randomization; 191 192 int m_input_link_id; 193 int m_vnet_id; 194}; 195 196Cycles random_time(); 197 198inline std::ostream& 199operator<<(std::ostream& out, const MessageBuffer& obj) 200{ 201 obj.print(out); 202 out << std::flush; 203 return out; 204} 205 206#endif // __MEM_RUBY_BUFFERS_MESSAGEBUFFER_HH__ |