tsunami_io.hh revision 768
181Sstever@eecs.umich.edu/* 281Sstever@eecs.umich.edu * Copyright (c) 2003 The Regents of The University of Michigan 381Sstever@eecs.umich.edu * All rights reserved. 481Sstever@eecs.umich.edu * 581Sstever@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 681Sstever@eecs.umich.edu * modification, are permitted provided that the following conditions are 781Sstever@eecs.umich.edu * met: redistributions of source code must retain the above copyright 881Sstever@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 981Sstever@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 1081Sstever@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 1181Sstever@eecs.umich.edu * documentation and/or other materials provided with the distribution; 1281Sstever@eecs.umich.edu * neither the name of the copyright holders nor the names of its 1381Sstever@eecs.umich.edu * contributors may be used to endorse or promote products derived from 1481Sstever@eecs.umich.edu * this software without specific prior written permission. 1581Sstever@eecs.umich.edu * 1681Sstever@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1781Sstever@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1881Sstever@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1981Sstever@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2081Sstever@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2181Sstever@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2281Sstever@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2381Sstever@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2481Sstever@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2581Sstever@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2681Sstever@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2781Sstever@eecs.umich.edu */ 2881Sstever@eecs.umich.edu 2981Sstever@eecs.umich.edu/* @file 3081Sstever@eecs.umich.edu * Tsunnami Fake DMA memory map 3181Sstever@eecs.umich.edu */ 3281Sstever@eecs.umich.edu 3381Sstever@eecs.umich.edu#ifndef __TSUNAMI_DMA_HH__ 3481Sstever@eecs.umich.edu#define __TSUNAMI_DMA_HH__ 3581Sstever@eecs.umich.edu 3681Sstever@eecs.umich.edu#include "mem/functional_mem/mmap_device.hh" 3781Sstever@eecs.umich.edu#include "dev/tsunami.hh" 3881Sstever@eecs.umich.edu 3981Sstever@eecs.umich.edu/* 40 * Tsunami CChip 41 */ 42class TsunamiDMA : public MmapDevice 43{ 44 public: 45 46 protected: 47 48 public: 49 TsunamiDMA(const std::string &name, /*Tsunami *t,*/ 50 Addr addr, Addr mask, MemoryController *mmu); 51 52 virtual Fault read(MemReqPtr req, uint8_t *data); 53 virtual Fault write(MemReqPtr req, const uint8_t *data); 54 55 virtual void serialize(std::ostream &os); 56 virtual void unserialize(Checkpoint *cp, const std::string §ion); 57}; 58 59#endif // __TSUNAMI_DMA_HH__ 60