mem_object.hh revision 2665
12023SN/A/*
22023SN/A * Copyright (c) 2002-2005 The Regents of The University of Michigan
32023SN/A * All rights reserved.
42023SN/A *
52023SN/A * Redistribution and use in source and binary forms, with or without
62023SN/A * modification, are permitted provided that the following conditions are
72023SN/A * met: redistributions of source code must retain the above copyright
82023SN/A * notice, this list of conditions and the following disclaimer;
92023SN/A * redistributions in binary form must reproduce the above copyright
102023SN/A * notice, this list of conditions and the following disclaimer in the
112023SN/A * documentation and/or other materials provided with the distribution;
122023SN/A * neither the name of the copyright holders nor the names of its
132023SN/A * contributors may be used to endorse or promote products derived from
142023SN/A * this software without specific prior written permission.
152023SN/A *
162023SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172023SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182023SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192023SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202023SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212023SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222023SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232023SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242023SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252023SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262023SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272023SN/A *
282665Ssaidi@eecs.umich.edu * Authors: Ron Dreslinski
292665Ssaidi@eecs.umich.edu */
302665Ssaidi@eecs.umich.edu
312023SN/A/**
322023SN/A * @file
332023SN/A * Base Memory Object decleration.
342023SN/A */
352023SN/A
362023SN/A#ifndef __MEM_MEM_OBJECT_HH__
372023SN/A#define __MEM_MEM_OBJECT_HH__
382023SN/A
392023SN/A#include "sim/sim_object.hh"
402023SN/A#include "mem/port.hh"
412023SN/A
422023SN/A/**
432023SN/A * The base MemoryObject class, allows for an accesor function to a
442023SN/A * simobj that returns the Port.
452023SN/A */
462023SN/Aclass MemObject : public SimObject
472023SN/A{
482023SN/A  public:
492152SN/A    MemObject(const std::string &name);
502152SN/A
513592Sgblack@eecs.umich.edu  public:
523592Sgblack@eecs.umich.edu    /** Additional function to return the Port of a memory object. */
533586Sgblack@eecs.umich.edu    virtual Port *getPort(const std::string &if_name) = 0;
543592Sgblack@eecs.umich.edu};
552023SN/A
562023SN/A#endif //__MEM_MEM_OBJECT_HH__
572023SN/A