io_device.hh revision 1762
17008Snate@binkert.org/* 27008Snate@binkert.org * Copyright (c) 2004-2005 The Regents of The University of Michigan 37008Snate@binkert.org * All rights reserved. 47008Snate@binkert.org * 57008Snate@binkert.org * Redistribution and use in source and binary forms, with or without 67008Snate@binkert.org * modification, are permitted provided that the following conditions are 77008Snate@binkert.org * met: redistributions of source code must retain the above copyright 87008Snate@binkert.org * notice, this list of conditions and the following disclaimer; 97008Snate@binkert.org * redistributions in binary form must reproduce the above copyright 107008Snate@binkert.org * notice, this list of conditions and the following disclaimer in the 117008Snate@binkert.org * documentation and/or other materials provided with the distribution; 127008Snate@binkert.org * neither the name of the copyright holders nor the names of its 137008Snate@binkert.org * contributors may be used to endorse or promote products derived from 147008Snate@binkert.org * this software without specific prior written permission. 157008Snate@binkert.org * 167008Snate@binkert.org * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 177008Snate@binkert.org * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 187008Snate@binkert.org * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 197008Snate@binkert.org * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 207008Snate@binkert.org * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 217008Snate@binkert.org * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 227008Snate@binkert.org * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 237008Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 247008Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 257008Snate@binkert.org * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 267008Snate@binkert.org * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 277008Snate@binkert.org */ 286285Snate@binkert.org 297039Snate@binkert.org#ifndef __DEV_IO_DEVICE_HH__ 307039Snate@binkert.org#define __DEV_IO_DEVICE_HH__ 316285Snate@binkert.org 327055Snate@binkert.org#include "mem/functional/functional.hh" 337055Snate@binkert.org 346876Ssteve.reinhardt@amd.comclass BaseInterface; 359745Snilay@cs.wisc.educlass Bus; 368341Snilay@cs.wisc.educlass HierParams; 379596Snilay@cs.wisc.educlass Platform; 386506Spdudnik@gmail.comtemplate <class BusType> class DMAInterface; 397055Snate@binkert.org 408436SBrad.Beckmann@amd.comclass PioDevice : public FunctionalMemory 419497Snilay@cs.wisc.edu{ 426881SBrad.Beckmann@amd.com protected: 438683Snilay@cs.wisc.edu Platform *platform; 449364Snilay@cs.wisc.edu BaseInterface *pioInterface; 459364Snilay@cs.wisc.edu Tick pioLatency; 467055Snate@binkert.org 479465Snilay@cs.wisc.edu public: 486285Snate@binkert.org PioDevice(const std::string &name, Platform *p); 496285Snate@binkert.org virtual ~PioDevice(); 506285Snate@binkert.org}; 519465Snilay@cs.wisc.edu 527039Snate@binkert.orgclass DmaDevice : public PioDevice 537039Snate@binkert.org{ 546876Ssteve.reinhardt@amd.com protected: 558436SBrad.Beckmann@amd.com DMAInterface<Bus> *dmaInterface; 569496Snilay@cs.wisc.edu 578257SBrad.Beckmann@amd.com public: 589745Snilay@cs.wisc.edu DmaDevice(const std::string &name, Platform *p); 5910078Snilay@cs.wisc.edu virtual ~DmaDevice(); 6010078Snilay@cs.wisc.edu}; 6110078Snilay@cs.wisc.edu 629819Snilay@cs.wisc.edu#endif // __DEV_IO_DEVICE_HH__ 639819Snilay@cs.wisc.edu