Sequencer.cc (8188:20dbef14192d) Sequencer.cc (8214:02cb69e5cfeb)
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;

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

224 // See if we should schedule a deadlock check
225 if (deadlockCheckEvent.scheduled() == false) {
226 schedule(deadlockCheckEvent, m_deadlock_threshold + curTick());
227 }
228
229 Address line_addr(request->ruby_request.m_PhysicalAddress);
230 line_addr.makeLineAddress();
231 if ((request->ruby_request.m_Type == RubyRequestType_ST) ||
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;

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

224 // See if we should schedule a deadlock check
225 if (deadlockCheckEvent.scheduled() == false) {
226 schedule(deadlockCheckEvent, m_deadlock_threshold + curTick());
227 }
228
229 Address line_addr(request->ruby_request.m_PhysicalAddress);
230 line_addr.makeLineAddress();
231 if ((request->ruby_request.m_Type == RubyRequestType_ST) ||
232 (request->ruby_request.m_Type == RubyRequestType_ATOMIC) ||
232 (request->ruby_request.m_Type == RubyRequestType_RMW_Read) ||
233 (request->ruby_request.m_Type == RubyRequestType_RMW_Write) ||
234 (request->ruby_request.m_Type == RubyRequestType_Load_Linked) ||
235 (request->ruby_request.m_Type == RubyRequestType_Store_Conditional) ||
236 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Read) ||
237 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Write) ||
238 (request->ruby_request.m_Type == RubyRequestType_FLUSH)) {
239 pair<RequestTable::iterator, bool> r =

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

376 RequestTable::iterator i = m_writeRequestTable.find(address);
377 assert(i != m_writeRequestTable.end());
378 SequencerRequest* request = i->second;
379
380 m_writeRequestTable.erase(i);
381 markRemoved();
382
383 assert((request->ruby_request.m_Type == RubyRequestType_ST) ||
233 (request->ruby_request.m_Type == RubyRequestType_RMW_Read) ||
234 (request->ruby_request.m_Type == RubyRequestType_RMW_Write) ||
235 (request->ruby_request.m_Type == RubyRequestType_Load_Linked) ||
236 (request->ruby_request.m_Type == RubyRequestType_Store_Conditional) ||
237 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Read) ||
238 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Write) ||
239 (request->ruby_request.m_Type == RubyRequestType_FLUSH)) {
240 pair<RequestTable::iterator, bool> r =

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

377 RequestTable::iterator i = m_writeRequestTable.find(address);
378 assert(i != m_writeRequestTable.end());
379 SequencerRequest* request = i->second;
380
381 m_writeRequestTable.erase(i);
382 markRemoved();
383
384 assert((request->ruby_request.m_Type == RubyRequestType_ST) ||
385 (request->ruby_request.m_Type == RubyRequestType_ATOMIC) ||
384 (request->ruby_request.m_Type == RubyRequestType_RMW_Read) ||
385 (request->ruby_request.m_Type == RubyRequestType_RMW_Write) ||
386 (request->ruby_request.m_Type == RubyRequestType_Load_Linked) ||
387 (request->ruby_request.m_Type == RubyRequestType_Store_Conditional) ||
388 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Read) ||
389 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Write) ||
390 (request->ruby_request.m_Type == RubyRequestType_FLUSH));
391

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

643 // coherence protocol to ensure they follow the proper semantics. In
644 // particular, by identifying the operations as atomic, the protocol
645 // should understand that migratory sharing optimizations should not be
646 // performed (i.e. a load between the LL and SC should not steal away
647 // exclusive permission).
648 //
649 case RubyRequestType_Load_Linked:
650 case RubyRequestType_Store_Conditional:
386 (request->ruby_request.m_Type == RubyRequestType_RMW_Read) ||
387 (request->ruby_request.m_Type == RubyRequestType_RMW_Write) ||
388 (request->ruby_request.m_Type == RubyRequestType_Load_Linked) ||
389 (request->ruby_request.m_Type == RubyRequestType_Store_Conditional) ||
390 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Read) ||
391 (request->ruby_request.m_Type == RubyRequestType_Locked_RMW_Write) ||
392 (request->ruby_request.m_Type == RubyRequestType_FLUSH));
393

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

645 // coherence protocol to ensure they follow the proper semantics. In
646 // particular, by identifying the operations as atomic, the protocol
647 // should understand that migratory sharing optimizations should not be
648 // performed (i.e. a load between the LL and SC should not steal away
649 // exclusive permission).
650 //
651 case RubyRequestType_Load_Linked:
652 case RubyRequestType_Store_Conditional:
653 case RubyRequestType_ATOMIC:
651 ctype = RubyRequestType_ATOMIC;
652 break;
653 default:
654 assert(0);
655 }
656
657 RubyAccessMode amtype;
658 switch(request.m_AccessMode){

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

666 amtype = RubyAccessMode_User;
667 break;
668 default:
669 assert(0);
670 }
671
672 Address line_addr(request.m_PhysicalAddress);
673 line_addr.makeLineAddress();
654 ctype = RubyRequestType_ATOMIC;
655 break;
656 default:
657 assert(0);
658 }
659
660 RubyAccessMode amtype;
661 switch(request.m_AccessMode){

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

669 amtype = RubyAccessMode_User;
670 break;
671 default:
672 assert(0);
673 }
674
675 Address line_addr(request.m_PhysicalAddress);
676 line_addr.makeLineAddress();
674 int proc_id = request.pkt->req->hasContextId() ?
675 request.pkt->req->contextId() : -1;
677 int proc_id = -1;
678 if (request.pkt != NULL && request.pkt->req->hasContextId()) {
679 proc_id = request.pkt->req->contextId();
680 }
676 RubyRequest *msg = new RubyRequest(request.m_PhysicalAddress.getAddress(),
677 request.data, request.m_Size,
678 request.m_ProgramCounter.getAddress(),
679 ctype, amtype, request.pkt,
680 PrefetchBit_No, proc_id);
681
682 DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\n",
683 g_eventQueue_ptr->getTime(), m_version, "Seq", "Begin", "", "",

--- 64 unchanged lines hidden ---
681 RubyRequest *msg = new RubyRequest(request.m_PhysicalAddress.getAddress(),
682 request.data, request.m_Size,
683 request.m_ProgramCounter.getAddress(),
684 ctype, amtype, request.pkt,
685 PrefetchBit_No, proc_id);
686
687 DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\n",
688 g_eventQueue_ptr->getTime(), m_version, "Seq", "Begin", "", "",

--- 64 unchanged lines hidden ---