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 |
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 |
187 uint64 m_msg_counter; |
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__ |