AbstractCacheEntry.hh revision 7039
112950Sgabeblack@google.com/* 212950Sgabeblack@google.com * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 312950Sgabeblack@google.com * All rights reserved. 412950Sgabeblack@google.com * 512950Sgabeblack@google.com * Redistribution and use in source and binary forms, with or without 612950Sgabeblack@google.com * modification, are permitted provided that the following conditions are 712950Sgabeblack@google.com * met: redistributions of source code must retain the above copyright 812950Sgabeblack@google.com * notice, this list of conditions and the following disclaimer; 912950Sgabeblack@google.com * redistributions in binary form must reproduce the above copyright 1012950Sgabeblack@google.com * notice, this list of conditions and the following disclaimer in the 1112950Sgabeblack@google.com * documentation and/or other materials provided with the distribution; 1212950Sgabeblack@google.com * neither the name of the copyright holders nor the names of its 1312950Sgabeblack@google.com * contributors may be used to endorse or promote products derived from 1412950Sgabeblack@google.com * this software without specific prior written permission. 1512950Sgabeblack@google.com * 1612950Sgabeblack@google.com * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1712950Sgabeblack@google.com * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1812950Sgabeblack@google.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1912950Sgabeblack@google.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2012950Sgabeblack@google.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2112950Sgabeblack@google.com * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2212950Sgabeblack@google.com * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2312950Sgabeblack@google.com * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2412950Sgabeblack@google.com * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2512950Sgabeblack@google.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2612950Sgabeblack@google.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2712950Sgabeblack@google.com */ 2812950Sgabeblack@google.com 2912950Sgabeblack@google.com/* 3012950Sgabeblack@google.com * Common base class for a machine node. 3112950Sgabeblack@google.com */ 3212988Sgabeblack@google.com 3312988Sgabeblack@google.com#ifndef __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__ 3412950Sgabeblack@google.com#define __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__ 3512950Sgabeblack@google.com 3612953Sgabeblack@google.com#include "mem/protocol/AccessPermission.hh" 3712950Sgabeblack@google.com#include "mem/ruby/common/Address.hh" 3812950Sgabeblack@google.com#include "mem/ruby/common/Global.hh" 3912950Sgabeblack@google.com#include "mem/ruby/slicc_interface/AbstractEntry.hh" 4012950Sgabeblack@google.com 4112950Sgabeblack@google.comclass DataBlock; 4212950Sgabeblack@google.com 4312950Sgabeblack@google.comclass AbstractCacheEntry : public AbstractEntry 4412950Sgabeblack@google.com{ 4512950Sgabeblack@google.com public: 4612950Sgabeblack@google.com AbstractCacheEntry(); 4712950Sgabeblack@google.com virtual ~AbstractCacheEntry() = 0; 4812950Sgabeblack@google.com 4912950Sgabeblack@google.com Address m_Address; // Address of this block, required by CacheMemory 5012950Sgabeblack@google.com Time m_LastRef; // Last time this block was referenced, required 5112950Sgabeblack@google.com // by CacheMemory 5212950Sgabeblack@google.com AccessPermission m_Permission; // Access permission for this 5312950Sgabeblack@google.com // block, required by CacheMemory 5412950Sgabeblack@google.com}; 5512950Sgabeblack@google.com 5612950Sgabeblack@google.cominline ostream& 5712950Sgabeblack@google.comoperator<<(ostream& out, const AbstractCacheEntry& obj) 5812950Sgabeblack@google.com{ 5912950Sgabeblack@google.com obj.print(out); 6012950Sgabeblack@google.com out << flush; 6112950Sgabeblack@google.com return out; 6212950Sgabeblack@google.com} 6312950Sgabeblack@google.com 6412950Sgabeblack@google.com#endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCACHEENTRY_HH__ 6512950Sgabeblack@google.com 6612950Sgabeblack@google.com