AbstractEntry.hh revision 7039
15086Sgblack@eecs.umich.edu/*
25086Sgblack@eecs.umich.edu * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
38466Snilay@cs.wisc.edu * All rights reserved.
45086Sgblack@eecs.umich.edu *
55086Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
67087Snate@binkert.org * modification, are permitted provided that the following conditions are
77087Snate@binkert.org * met: redistributions of source code must retain the above copyright
87087Snate@binkert.org * notice, this list of conditions and the following disclaimer;
97087Snate@binkert.org * redistributions in binary form must reproduce the above copyright
107087Snate@binkert.org * notice, this list of conditions and the following disclaimer in the
117087Snate@binkert.org * documentation and/or other materials provided with the distribution;
127087Snate@binkert.org * neither the name of the copyright holders nor the names of its
137087Snate@binkert.org * contributors may be used to endorse or promote products derived from
145086Sgblack@eecs.umich.edu * this software without specific prior written permission.
157087Snate@binkert.org *
167087Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
177087Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
187087Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
197087Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
207087Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
217087Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
227087Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
235086Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
247087Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
255086Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
265086Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
275086Sgblack@eecs.umich.edu */
285086Sgblack@eecs.umich.edu
295086Sgblack@eecs.umich.edu#ifndef __MEM_RUBY_SLICC_INTERFACE_ABSTRACTENTRY_HH__
305086Sgblack@eecs.umich.edu#define __MEM_RUBY_SLICC_INTERFACE_ABSTRACTENTRY_HH__
315086Sgblack@eecs.umich.edu
325086Sgblack@eecs.umich.edu#include "mem/ruby/common/Address.hh"
335086Sgblack@eecs.umich.edu#include "mem/ruby/common/Global.hh"
345086Sgblack@eecs.umich.edu#include "mem/protocol/AccessPermission.hh"
355086Sgblack@eecs.umich.edu
365086Sgblack@eecs.umich.educlass DataBlock;
375086Sgblack@eecs.umich.edu
385086Sgblack@eecs.umich.educlass AbstractEntry
395086Sgblack@eecs.umich.edu{
405086Sgblack@eecs.umich.edu  public:
415647Sgblack@eecs.umich.edu    AbstractEntry();
428466Snilay@cs.wisc.edu    virtual ~AbstractEntry() = 0;
438466Snilay@cs.wisc.edu
445086Sgblack@eecs.umich.edu    // The methods below are those called by ruby runtime, add when it
455135Sgblack@eecs.umich.edu    // is absolutely necessary and should all be virtual function.
465647Sgblack@eecs.umich.edu    virtual DataBlock& getDataBlk() = 0;
479889Sandreas@sandberg.pp.se
485234Sgblack@eecs.umich.edu    virtual void print(ostream& out) const = 0;
495086Sgblack@eecs.umich.edu};
505086Sgblack@eecs.umich.edu
515086Sgblack@eecs.umich.eduinline ostream&
527707Sgblack@eecs.umich.eduoperator<<(ostream& out, const AbstractEntry& obj)
537707Sgblack@eecs.umich.edu{
547707Sgblack@eecs.umich.edu    obj.print(out);
5510553Salexandru.dutu@amd.com    out << flush;
569887Sandreas@sandberg.pp.se    return out;
579887Sandreas@sandberg.pp.se}
589887Sandreas@sandberg.pp.se
599887Sandreas@sandberg.pp.se#endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTENTRY_HH__
609887Sandreas@sandberg.pp.se
619887Sandreas@sandberg.pp.se