AbstractEntry.hh revision 14184
12810Srdreslin@umich.edu/* 212500Snikos.nikoleris@arm.com * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 311051Sandreas.hansson@arm.com * All rights reserved. 411051Sandreas.hansson@arm.com * 511051Sandreas.hansson@arm.com * Redistribution and use in source and binary forms, with or without 611051Sandreas.hansson@arm.com * modification, are permitted provided that the following conditions are 711051Sandreas.hansson@arm.com * met: redistributions of source code must retain the above copyright 811051Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer; 911051Sandreas.hansson@arm.com * redistributions in binary form must reproduce the above copyright 1011051Sandreas.hansson@arm.com * notice, this list of conditions and the following disclaimer in the 1111051Sandreas.hansson@arm.com * documentation and/or other materials provided with the distribution; 1211051Sandreas.hansson@arm.com * neither the name of the copyright holders nor the names of its 1311051Sandreas.hansson@arm.com * contributors may be used to endorse or promote products derived from 1411051Sandreas.hansson@arm.com * this software without specific prior written permission. 1511051Sandreas.hansson@arm.com * 162810Srdreslin@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 172810Srdreslin@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 182810Srdreslin@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 192810Srdreslin@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 202810Srdreslin@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 212810Srdreslin@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 222810Srdreslin@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 232810Srdreslin@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 242810Srdreslin@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 252810Srdreslin@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 262810Srdreslin@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 272810Srdreslin@umich.edu */ 282810Srdreslin@umich.edu 292810Srdreslin@umich.edu#ifndef __MEM_RUBY_SLICC_INTERFACE_ABSTRACTENTRY_HH__ 302810Srdreslin@umich.edu#define __MEM_RUBY_SLICC_INTERFACE_ABSTRACTENTRY_HH__ 312810Srdreslin@umich.edu 322810Srdreslin@umich.edu#include <iostream> 332810Srdreslin@umich.edu 342810Srdreslin@umich.edu#include "mem/ruby/protocol/AccessPermission.hh" 352810Srdreslin@umich.edu 362810Srdreslin@umich.educlass AbstractEntry 372810Srdreslin@umich.edu{ 382810Srdreslin@umich.edu public: 392810Srdreslin@umich.edu AbstractEntry(); 402810Srdreslin@umich.edu virtual ~AbstractEntry() = 0; 412810Srdreslin@umich.edu 4211051Sandreas.hansson@arm.com // Get/Set permission of the entry 4311051Sandreas.hansson@arm.com AccessPermission getPermission() const; 442810Srdreslin@umich.edu void changePermission(AccessPermission new_perm); 4511051Sandreas.hansson@arm.com 4611051Sandreas.hansson@arm.com virtual void print(std::ostream& out) const = 0; 4712349Snikos.nikoleris@arm.com 482810Srdreslin@umich.edu AccessPermission m_Permission; // Access permission for this 492810Srdreslin@umich.edu // block, required by CacheMemory 502810Srdreslin@umich.edu}; 512810Srdreslin@umich.edu 5211051Sandreas.hansson@arm.cominline std::ostream& 532810Srdreslin@umich.eduoperator<<(std::ostream& out, const AbstractEntry& obj) 542810Srdreslin@umich.edu{ 5511051Sandreas.hansson@arm.com obj.print(out); 562810Srdreslin@umich.edu out << std::flush; 5712334Sgabeblack@google.com return out; 5811051Sandreas.hansson@arm.com} 5911051Sandreas.hansson@arm.com 6011051Sandreas.hansson@arm.com#endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTENTRY_HH__ 6111051Sandreas.hansson@arm.com