tlb.hh revision 3569
12650Ssaidi@eecs.umich.edu/*
22650Ssaidi@eecs.umich.edu * Copyright (c) 2006 The Regents of The University of Michigan
32650Ssaidi@eecs.umich.edu * All rights reserved.
42650Ssaidi@eecs.umich.edu *
52650Ssaidi@eecs.umich.edu * Redistribution and use in source and binary forms, with or without
62650Ssaidi@eecs.umich.edu * modification, are permitted provided that the following conditions are
72650Ssaidi@eecs.umich.edu * met: redistributions of source code must retain the above copyright
82650Ssaidi@eecs.umich.edu * notice, this list of conditions and the following disclaimer;
92650Ssaidi@eecs.umich.edu * redistributions in binary form must reproduce the above copyright
102650Ssaidi@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the
112650Ssaidi@eecs.umich.edu * documentation and/or other materials provided with the distribution;
122650Ssaidi@eecs.umich.edu * neither the name of the copyright holders nor the names of its
132650Ssaidi@eecs.umich.edu * contributors may be used to endorse or promote products derived from
142650Ssaidi@eecs.umich.edu * this software without specific prior written permission.
152650Ssaidi@eecs.umich.edu *
162650Ssaidi@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172650Ssaidi@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182650Ssaidi@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192650Ssaidi@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202650Ssaidi@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212650Ssaidi@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222650Ssaidi@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232650Ssaidi@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242650Ssaidi@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252650Ssaidi@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262650Ssaidi@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272650Ssaidi@eecs.umich.edu *
282650Ssaidi@eecs.umich.edu * Authors: Ali Saidi
292650Ssaidi@eecs.umich.edu */
302650Ssaidi@eecs.umich.edu
312650Ssaidi@eecs.umich.edu#ifndef __ARCH_SPARC_TLB_HH__
322650Ssaidi@eecs.umich.edu#define __ARCH_SPARC_TLB_HH__
332650Ssaidi@eecs.umich.edu
343569Sgblack@eecs.umich.edu#include "mem/request.hh"
353468Sgblack@eecs.umich.edu#include "sim/faults.hh"
363569Sgblack@eecs.umich.edu#include "sim/sim_object.hh"
373468Sgblack@eecs.umich.edu
383468Sgblack@eecs.umich.educlass ThreadContext;
393468Sgblack@eecs.umich.edu
403468Sgblack@eecs.umich.edunamespace SparcISA
413468Sgblack@eecs.umich.edu{
423569Sgblack@eecs.umich.edu    class TLB : public SimObject
433468Sgblack@eecs.umich.edu    {
443569Sgblack@eecs.umich.edu      public:
453569Sgblack@eecs.umich.edu        TLB(const std::string &name, int size) : SimObject(name)
463569Sgblack@eecs.umich.edu        {
473569Sgblack@eecs.umich.edu        }
483468Sgblack@eecs.umich.edu    };
493468Sgblack@eecs.umich.edu
503468Sgblack@eecs.umich.edu    class ITB : public TLB
513468Sgblack@eecs.umich.edu    {
523468Sgblack@eecs.umich.edu      public:
533569Sgblack@eecs.umich.edu        ITB(const std::string &name, int size) : TLB(name, size)
543569Sgblack@eecs.umich.edu        {
553569Sgblack@eecs.umich.edu        }
563569Sgblack@eecs.umich.edu
573468Sgblack@eecs.umich.edu        Fault translate(RequestPtr &req, ThreadContext *tc) const
583468Sgblack@eecs.umich.edu        {
593468Sgblack@eecs.umich.edu            return NoFault;
603468Sgblack@eecs.umich.edu        }
613468Sgblack@eecs.umich.edu    };
623468Sgblack@eecs.umich.edu
633468Sgblack@eecs.umich.edu    class DTB : public TLB
643468Sgblack@eecs.umich.edu    {
653468Sgblack@eecs.umich.edu      public:
663569Sgblack@eecs.umich.edu        DTB(const std::string &name, int size) : TLB(name, size)
673569Sgblack@eecs.umich.edu        {
683569Sgblack@eecs.umich.edu        }
693569Sgblack@eecs.umich.edu
703468Sgblack@eecs.umich.edu        Fault translate(RequestPtr &req, ThreadContext *tc, bool write) const
713468Sgblack@eecs.umich.edu        {
723468Sgblack@eecs.umich.edu            return NoFault;
733468Sgblack@eecs.umich.edu        }
743468Sgblack@eecs.umich.edu    };
753468Sgblack@eecs.umich.edu}
762650Ssaidi@eecs.umich.edu
772650Ssaidi@eecs.umich.edu#endif // __ARCH_SPARC_TLB_HH__
78