mem_object.hh revision 2665
12381SN/A/*
22381SN/A * Copyright (c) 2002-2005 The Regents of The University of Michigan
32381SN/A * All rights reserved.
42381SN/A *
52381SN/A * Redistribution and use in source and binary forms, with or without
62381SN/A * modification, are permitted provided that the following conditions are
72381SN/A * met: redistributions of source code must retain the above copyright
82381SN/A * notice, this list of conditions and the following disclaimer;
92381SN/A * redistributions in binary form must reproduce the above copyright
102381SN/A * notice, this list of conditions and the following disclaimer in the
112381SN/A * documentation and/or other materials provided with the distribution;
122381SN/A * neither the name of the copyright holders nor the names of its
132381SN/A * contributors may be used to endorse or promote products derived from
142381SN/A * this software without specific prior written permission.
152381SN/A *
162381SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172381SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182381SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192381SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202381SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212381SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222381SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232381SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242381SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252381SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262381SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Ron Dreslinski
292381SN/A */
302381SN/A
312381SN/A/**
322381SN/A * @file
332381SN/A * Base Memory Object decleration.
342381SN/A */
352381SN/A
362381SN/A#ifndef __MEM_MEM_OBJECT_HH__
372381SN/A#define __MEM_MEM_OBJECT_HH__
382381SN/A
392381SN/A#include "sim/sim_object.hh"
402383SN/A#include "mem/port.hh"
412381SN/A
422381SN/A/**
432381SN/A * The base MemoryObject class, allows for an accesor function to a
442381SN/A * simobj that returns the Port.
452381SN/A */
462394SN/Aclass MemObject : public SimObject
472381SN/A{
482381SN/A  public:
492463SN/A    MemObject(const std::string &name);
502394SN/A
512394SN/A  public:
522381SN/A    /** Additional function to return the Port of a memory object. */
532499SN/A    virtual Port *getPort(const std::string &if_name) = 0;
542381SN/A};
552381SN/A
562381SN/A#endif //__MEM_MEM_OBJECT_HH__
57