AbstractCacheEntry.hh revision 7039
11689SN/A/* 22326SN/A * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 31689SN/A * All rights reserved. 41689SN/A * 51689SN/A * Redistribution and use in source and binary forms, with or without 61689SN/A * modification, are permitted provided that the following conditions are 71689SN/A * met: redistributions of source code must retain the above copyright 81689SN/A * notice, this list of conditions and the following disclaimer; 91689SN/A * redistributions in binary form must reproduce the above copyright 101689SN/A * notice, this list of conditions and the following disclaimer in the 111689SN/A * documentation and/or other materials provided with the distribution; 121689SN/A * neither the name of the copyright holders nor the names of its 131689SN/A * contributors may be used to endorse or promote products derived from 141689SN/A * this software without specific prior written permission. 151689SN/A * 161689SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 171689SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 181689SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 191689SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 201689SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 211689SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 221689SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 231689SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 241689SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 251689SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 261689SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272665Ssaidi@eecs.umich.edu */ 282665Ssaidi@eecs.umich.edu 292831Sksewell@umich.edu/* 301689SN/A * Common base class for a machine node. 311689SN/A */ 322064SN/A 331060SN/A#ifndef __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__ 341060SN/A#define __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__ 352292SN/A 361717SN/A#include "mem/protocol/AccessPermission.hh" 374762Snate@binkert.org#include "mem/ruby/common/Address.hh" 384762Snate@binkert.org#include "mem/ruby/common/Global.hh" 391060SN/A#include "mem/ruby/slicc_interface/AbstractEntry.hh" 401061SN/A 412292SN/Aclass DataBlock; 422292SN/A 432292SN/Aclass AbstractCacheEntry : public AbstractEntry 442292SN/A{ 452326SN/A public: 461060SN/A AbstractCacheEntry(); 472292SN/A virtual ~AbstractCacheEntry() = 0; 482292SN/A 492292SN/A Address m_Address; // Address of this block, required by CacheMemory 502292SN/A Time m_LastRef; // Last time this block was referenced, required 512292SN/A // by CacheMemory 522292SN/A AccessPermission m_Permission; // Access permission for this 532292SN/A // block, required by CacheMemory 542326SN/A}; 552292SN/A 562292SN/Ainline ostream& 572292SN/Aoperator<<(ostream& out, const AbstractCacheEntry& obj) 582292SN/A{ 592292SN/A obj.print(out); 602292SN/A out << flush; 612292SN/A return out; 622292SN/A} 634873Sstever@eecs.umich.edu 642292SN/A#endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__ 652292SN/A 662292SN/A