Sequencer.cc (9216:a5f937d152bf) Sequencer.cc (9224:b0539d08bda8)
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;

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

209 // See if we should schedule a deadlock check
210 if (deadlockCheckEvent.scheduled() == false) {
211 schedule(deadlockCheckEvent,
212 g_system_ptr->clockPeriod() * m_deadlock_threshold + curTick());
213 }
214
215 Address line_addr(pkt->getAddr());
216 line_addr.makeLineAddress();
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;

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

209 // See if we should schedule a deadlock check
210 if (deadlockCheckEvent.scheduled() == false) {
211 schedule(deadlockCheckEvent,
212 g_system_ptr->clockPeriod() * m_deadlock_threshold + curTick());
213 }
214
215 Address line_addr(pkt->getAddr());
216 line_addr.makeLineAddress();
217 // Create a default entry, mapping the address to NULL, the cast is
218 // there to make gcc 4.4 happy
219 RequestTable::value_type default_entry(line_addr,
220 (SequencerRequest*) NULL);
221
217 if ((request_type == RubyRequestType_ST) ||
218 (request_type == RubyRequestType_RMW_Read) ||
219 (request_type == RubyRequestType_RMW_Write) ||
220 (request_type == RubyRequestType_Load_Linked) ||
221 (request_type == RubyRequestType_Store_Conditional) ||
222 (request_type == RubyRequestType_Locked_RMW_Read) ||
223 (request_type == RubyRequestType_Locked_RMW_Write) ||
224 (request_type == RubyRequestType_FLUSH)) {
225
226 // Check if there is any outstanding read request for the same
227 // cache line.
228 if (m_readRequestTable.count(line_addr) > 0) {
229 m_store_waiting_on_load_cycles++;
230 return RequestStatus_Aliased;
231 }
232
233 pair<RequestTable::iterator, bool> r =
222 if ((request_type == RubyRequestType_ST) ||
223 (request_type == RubyRequestType_RMW_Read) ||
224 (request_type == RubyRequestType_RMW_Write) ||
225 (request_type == RubyRequestType_Load_Linked) ||
226 (request_type == RubyRequestType_Store_Conditional) ||
227 (request_type == RubyRequestType_Locked_RMW_Read) ||
228 (request_type == RubyRequestType_Locked_RMW_Write) ||
229 (request_type == RubyRequestType_FLUSH)) {
230
231 // Check if there is any outstanding read request for the same
232 // cache line.
233 if (m_readRequestTable.count(line_addr) > 0) {
234 m_store_waiting_on_load_cycles++;
235 return RequestStatus_Aliased;
236 }
237
238 pair<RequestTable::iterator, bool> r =
234 m_writeRequestTable.insert(RequestTable::value_type(line_addr, 0));
239 m_writeRequestTable.insert(default_entry);
235 if (r.second) {
236 RequestTable::iterator i = r.first;
237 i->second = new SequencerRequest(pkt, request_type,
238 g_system_ptr->getTime());
239 m_outstanding_count++;
240 } else {
241 // There is an outstanding write request for the cache line
242 m_store_waiting_on_store_cycles++;
243 return RequestStatus_Aliased;
244 }
245 } else {
246 // Check if there is any outstanding write request for the same
247 // cache line.
248 if (m_writeRequestTable.count(line_addr) > 0) {
249 m_load_waiting_on_store_cycles++;
250 return RequestStatus_Aliased;
251 }
252
253 pair<RequestTable::iterator, bool> r =
240 if (r.second) {
241 RequestTable::iterator i = r.first;
242 i->second = new SequencerRequest(pkt, request_type,
243 g_system_ptr->getTime());
244 m_outstanding_count++;
245 } else {
246 // There is an outstanding write request for the cache line
247 m_store_waiting_on_store_cycles++;
248 return RequestStatus_Aliased;
249 }
250 } else {
251 // Check if there is any outstanding write request for the same
252 // cache line.
253 if (m_writeRequestTable.count(line_addr) > 0) {
254 m_load_waiting_on_store_cycles++;
255 return RequestStatus_Aliased;
256 }
257
258 pair<RequestTable::iterator, bool> r =
254 m_readRequestTable.insert(RequestTable::value_type(line_addr, 0));
259 m_readRequestTable.insert(default_entry);
255
256 if (r.second) {
257 RequestTable::iterator i = r.first;
258 i->second = new SequencerRequest(pkt, request_type,
259 g_system_ptr->getTime());
260 m_outstanding_count++;
261 } else {
262 // There is an outstanding read request for the cache line

--- 470 unchanged lines hidden ---
260
261 if (r.second) {
262 RequestTable::iterator i = r.first;
263 i->second = new SequencerRequest(pkt, request_type,
264 g_system_ptr->getTime());
265 m_outstanding_count++;
266 } else {
267 // There is an outstanding read request for the cache line

--- 470 unchanged lines hidden ---