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; --- 19 unchanged lines hidden (view full) --- 28 29#ifndef __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 30#define __MEM_RUBY_SYSTEM_SEQUENCER_HH__ 31 32#include <iostream> 33 34#include "base/hashmap.hh" 35#include "mem/protocol/GenericMachineType.hh" |
36#include "mem/protocol/RubyRequestType.hh" 37#include "mem/ruby/common/Address.hh" 38#include "mem/ruby/common/Consumer.hh" |
39#include "mem/ruby/system/RubyPort.hh" 40 41class DataBlock; 42class CacheMsg; 43class MachineID; 44class CacheMemory; 45 46class RubySequencerParams; 47 48struct SequencerRequest 49{ |
50 PacketPtr pkt; 51 RubyRequestType m_type; |
52 Time issue_time; 53 |
54 SequencerRequest(PacketPtr _pkt, RubyRequestType _m_type, Time _issue_time) 55 : pkt(_pkt), m_type(_m_type), issue_time(_issue_time) |
56 {} 57}; 58 59std::ostream& operator<<(std::ostream& out, const SequencerRequest& obj); 60 61class Sequencer : public RubyPort, public Consumer 62{ 63 public: --- 29 unchanged lines hidden (view full) --- 93 94 void readCallback(const Address& address, 95 GenericMachineType mach, 96 DataBlock& data, 97 Time initialRequestTime, 98 Time forwardRequestTime, 99 Time firstResponseTime); 100 |
101 RequestStatus makeRequest(PacketPtr pkt); |
102 bool empty() const; 103 104 void print(std::ostream& out) const; 105 void printStats(std::ostream& out) const; 106 void checkCoherence(const Address& address); 107 108 void markRemoved(); 109 void removeRequest(SequencerRequest* request); 110 111 private: |
112 void issueRequest(PacketPtr pkt, RubyRequestType type); |
113 114 void hitCallback(SequencerRequest* request, 115 GenericMachineType mach, 116 DataBlock& data, 117 bool success, 118 Time initialRequestTime, 119 Time forwardRequestTime, 120 Time firstResponseTime); 121 |
122 RequestStatus insertRequest(PacketPtr pkt, RubyRequestType request_type); |
123 124 bool handleLlsc(const Address& address, SequencerRequest* request); 125 126 // Private copy constructor and assignment operator 127 Sequencer(const Sequencer& obj); 128 Sequencer& operator=(const Sequencer& obj); 129 130 private: --- 44 unchanged lines hidden --- |